@yamada-ui/charts 2.0.0-next-20240704080818 → 2.0.0-next-20240706053520

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/dist/area-chart.js +112 -16
  2. package/dist/area-chart.js.map +1 -1
  3. package/dist/area-chart.mjs +11 -11
  4. package/dist/bar-chart.js +112 -16
  5. package/dist/bar-chart.js.map +1 -1
  6. package/dist/bar-chart.mjs +11 -11
  7. package/dist/chart-legend.mjs +3 -3
  8. package/dist/chart-tooltip.mjs +3 -3
  9. package/dist/chart.types.d.mts +2 -1
  10. package/dist/chart.types.d.ts +2 -1
  11. package/dist/chart.types.js.map +1 -1
  12. package/dist/{chunk-LM2DQK2P.mjs → chunk-5Q6O726L.mjs} +2 -2
  13. package/dist/{chunk-SEBQBOCB.mjs → chunk-B7M3YMES.mjs} +2 -2
  14. package/dist/{chunk-LGMALZCN.mjs → chunk-D7EZKGCJ.mjs} +2 -2
  15. package/dist/{chunk-NEGDEVRX.mjs → chunk-DGOXJ373.mjs} +2 -2
  16. package/dist/{chunk-LAYNVROX.mjs → chunk-DWLZIGGL.mjs} +44 -14
  17. package/dist/chunk-DWLZIGGL.mjs.map +1 -0
  18. package/dist/{chunk-AIM5FCJI.mjs → chunk-F2RBOLDY.mjs} +7 -7
  19. package/dist/{chunk-OSNFBRHL.mjs → chunk-F34FV5DY.mjs} +13 -2
  20. package/dist/{chunk-OSNFBRHL.mjs.map → chunk-F34FV5DY.mjs.map} +1 -1
  21. package/dist/{chunk-JXZPTLLZ.mjs → chunk-HZSEVGCR.mjs} +19 -3
  22. package/dist/chunk-HZSEVGCR.mjs.map +1 -0
  23. package/dist/{chunk-OS3525CT.mjs → chunk-IOVOXWUL.mjs} +44 -14
  24. package/dist/chunk-IOVOXWUL.mjs.map +1 -0
  25. package/dist/{chunk-SAP2SGIZ.mjs → chunk-K6OUXJQK.mjs} +44 -14
  26. package/dist/chunk-K6OUXJQK.mjs.map +1 -0
  27. package/dist/{chunk-D3YZFAFO.mjs → chunk-MVKJVXAK.mjs} +19 -3
  28. package/dist/chunk-MVKJVXAK.mjs.map +1 -0
  29. package/dist/{chunk-JSDS6QWX.mjs → chunk-OSSQ2IHJ.mjs} +7 -7
  30. package/dist/{chunk-K6OJ62SA.mjs → chunk-P4MMHTAP.mjs} +7 -7
  31. package/dist/{chunk-LBC2B6UX.mjs → chunk-PSJKBKOF.mjs} +2 -2
  32. package/dist/{chunk-MWPICUEW.mjs → chunk-Q7CCSKX3.mjs} +2 -2
  33. package/dist/{chunk-XIFDRM7J.mjs → chunk-STBYN5JW.mjs} +2 -2
  34. package/dist/{chunk-RN6PXJAD.mjs → chunk-UK6B6KJ7.mjs} +2 -2
  35. package/dist/{chunk-P7AFSM5W.mjs → chunk-XHDDK4ZU.mjs} +56 -14
  36. package/dist/chunk-XHDDK4ZU.mjs.map +1 -0
  37. package/dist/{chunk-IIBF2GUV.mjs → chunk-XZVWGY4J.mjs} +18 -3
  38. package/dist/chunk-XZVWGY4J.mjs.map +1 -0
  39. package/dist/{chunk-MFYRHF3O.mjs → chunk-YGKNNA34.mjs} +2 -2
  40. package/dist/donut-chart.js.map +1 -1
  41. package/dist/donut-chart.mjs +8 -8
  42. package/dist/index.js +209 -24
  43. package/dist/index.js.map +1 -1
  44. package/dist/index.mjs +20 -20
  45. package/dist/line-chart.js +111 -16
  46. package/dist/line-chart.js.map +1 -1
  47. package/dist/line-chart.mjs +11 -11
  48. package/dist/pie-chart.js.map +1 -1
  49. package/dist/pie-chart.mjs +8 -8
  50. package/dist/radar-chart.js.map +1 -1
  51. package/dist/radar-chart.mjs +8 -8
  52. package/dist/rechart-properties.d.mts +2 -1
  53. package/dist/rechart-properties.d.ts +2 -1
  54. package/dist/rechart-properties.js +12 -0
  55. package/dist/rechart-properties.js.map +1 -1
  56. package/dist/rechart-properties.mjs +3 -1
  57. package/dist/use-area-chart.d.mts +9 -1
  58. package/dist/use-area-chart.d.ts +9 -1
  59. package/dist/use-area-chart.js +17 -1
  60. package/dist/use-area-chart.js.map +1 -1
  61. package/dist/use-area-chart.mjs +2 -2
  62. package/dist/use-bar-chart.d.mts +9 -1
  63. package/dist/use-bar-chart.d.ts +9 -1
  64. package/dist/use-bar-chart.js +17 -1
  65. package/dist/use-bar-chart.js.map +1 -1
  66. package/dist/use-bar-chart.mjs +2 -2
  67. package/dist/use-chart-axis.d.mts +20 -2
  68. package/dist/use-chart-axis.d.ts +20 -2
  69. package/dist/use-chart-axis.js +63 -12
  70. package/dist/use-chart-axis.js.map +1 -1
  71. package/dist/use-chart-axis.mjs +2 -2
  72. package/dist/use-chart-grid.js.map +1 -1
  73. package/dist/use-chart-grid.mjs +2 -2
  74. package/dist/use-chart-legend.js.map +1 -1
  75. package/dist/use-chart-legend.mjs +2 -2
  76. package/dist/use-chart-reference-line.js.map +1 -1
  77. package/dist/use-chart-reference-line.mjs +2 -2
  78. package/dist/use-chart-tooltip.js.map +1 -1
  79. package/dist/use-chart-tooltip.mjs +2 -2
  80. package/dist/use-chart.js.map +1 -1
  81. package/dist/use-chart.mjs +2 -2
  82. package/dist/use-line-chart.d.mts +9 -1
  83. package/dist/use-line-chart.d.ts +9 -1
  84. package/dist/use-line-chart.js +16 -1
  85. package/dist/use-line-chart.js.map +1 -1
  86. package/dist/use-line-chart.mjs +2 -2
  87. package/dist/use-pie-chart.js.map +1 -1
  88. package/dist/use-pie-chart.mjs +2 -2
  89. package/dist/use-radar-chart.js.map +1 -1
  90. package/dist/use-radar-chart.mjs +2 -2
  91. package/package.json +3 -3
  92. package/dist/chunk-D3YZFAFO.mjs.map +0 -1
  93. package/dist/chunk-IIBF2GUV.mjs.map +0 -1
  94. package/dist/chunk-JXZPTLLZ.mjs.map +0 -1
  95. package/dist/chunk-LAYNVROX.mjs.map +0 -1
  96. package/dist/chunk-OS3525CT.mjs.map +0 -1
  97. package/dist/chunk-P7AFSM5W.mjs.map +0 -1
  98. package/dist/chunk-SAP2SGIZ.mjs.map +0 -1
  99. /package/dist/{chunk-LM2DQK2P.mjs.map → chunk-5Q6O726L.mjs.map} +0 -0
  100. /package/dist/{chunk-SEBQBOCB.mjs.map → chunk-B7M3YMES.mjs.map} +0 -0
  101. /package/dist/{chunk-LGMALZCN.mjs.map → chunk-D7EZKGCJ.mjs.map} +0 -0
  102. /package/dist/{chunk-NEGDEVRX.mjs.map → chunk-DGOXJ373.mjs.map} +0 -0
  103. /package/dist/{chunk-AIM5FCJI.mjs.map → chunk-F2RBOLDY.mjs.map} +0 -0
  104. /package/dist/{chunk-JSDS6QWX.mjs.map → chunk-OSSQ2IHJ.mjs.map} +0 -0
  105. /package/dist/{chunk-K6OJ62SA.mjs.map → chunk-P4MMHTAP.mjs.map} +0 -0
  106. /package/dist/{chunk-LBC2B6UX.mjs.map → chunk-PSJKBKOF.mjs.map} +0 -0
  107. /package/dist/{chunk-MWPICUEW.mjs.map → chunk-Q7CCSKX3.mjs.map} +0 -0
  108. /package/dist/{chunk-XIFDRM7J.mjs.map → chunk-STBYN5JW.mjs.map} +0 -0
  109. /package/dist/{chunk-RN6PXJAD.mjs.map → chunk-UK6B6KJ7.mjs.map} +0 -0
  110. /package/dist/{chunk-MFYRHF3O.mjs.map → chunk-YGKNNA34.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/use-chart-axis.ts"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { useTheme } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { SVGProps } from \"react\"\nimport { useCallback, useMemo } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getComponentProps } from \"./chart-utils\"\nimport type {\n ChartAxisType,\n ChartLayoutType,\n XAxisProps,\n YAxisProps,\n ChartPropGetter,\n AreaChartType,\n LabelProps,\n} from \"./chart.types\"\nimport {\n labelProperties,\n xAxisProperties,\n yAxisProperties,\n} from \"./rechart-properties\"\n\nexport type UseChartAxisOptions = {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: string\n /**\n * Controls how chart areas are positioned relative to each other\n *\n * @default `default`\n */\n type?: AreaChartType\n /**\n * Chart orientation.\n *\n * @default 'horizontal'\n */\n layoutType?: ChartLayoutType\n /**\n * The option is the configuration of tick lines.\n *\n * @default 'y'\n */\n tickLine?: ChartAxisType\n /**\n * Specifies which lines should be displayed in the grid.\n *\n * @default 'x'\n */\n gridAxis?: ChartAxisType\n /**\n * If `true`, X axis is visible.\n *\n * @default true\n */\n withXAxis?: boolean\n /**\n * If `true`, Y axis is visible.\n *\n * @default true\n */\n withYAxis?: boolean\n /**\n * Props passed down to recharts 'XAxis' component.\n */\n xAxisProps?: XAxisProps\n /**\n * Props passed down to recharts 'YAxis' component.\n */\n yAxisProps?: YAxisProps\n /**\n * A label to display below the X axis.\n */\n xAxisLabel?: string\n /**\n * A label to display below the Y axis.\n */\n yAxisLabel?: string\n /**\n * Props passed down to recharts 'XAxisLabel' component.\n */\n xAxisLabelProps?: LabelProps\n /**\n * Props passed down to recharts 'YAxisLabel' component.\n */\n yAxisLabelProps?: LabelProps\n /**\n * Unit displayed next to each tick in y-axis.\n */\n unit?: string\n /**\n * A function to format values on Y axis and inside the tooltip\n */\n valueFormatter?: (value: number) => string\n}\n\nexport type UseChartAxisProps = UseChartAxisOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const useChartAxis = ({\n dataKey,\n type,\n layoutType = \"horizontal\",\n tickLine = \"y\",\n gridAxis = \"x\",\n withXAxis = true,\n withYAxis = true,\n xAxisLabel: xAxisLabelProp,\n yAxisLabel: yAxisLabelProp,\n unit,\n valueFormatter,\n styles,\n ...rest\n}: UseChartAxisProps) => {\n const { theme } = useTheme()\n const xAxisKey: Recharts.XAxisProps = useMemo(\n () => (layoutType === \"vertical\" ? { type: \"number\" } : { dataKey }),\n [dataKey, layoutType],\n )\n\n const yAxisKey: Recharts.YAxisProps = useMemo(\n () =>\n layoutType === \"vertical\"\n ? { dataKey, type: \"category\" }\n : { type: \"number\" },\n [dataKey, layoutType],\n )\n const withXTickLine =\n gridAxis !== \"none\" && (tickLine === \"x\" || tickLine === \"xy\")\n const withYTickLine =\n gridAxis !== \"none\" && (tickLine === \"y\" || tickLine === \"xy\")\n const getTickLine = (\n withTickLine: boolean,\n ): boolean | SVGProps<SVGTextElement> =>\n withTickLine ? { stroke: \"currentColor\" } : false\n const xTickLine = getTickLine(withXTickLine)\n const yTickLine = getTickLine(withYTickLine)\n const yAxisTickFormatter =\n type === \"percent\" && layoutType !== \"vertical\"\n ? valueToPercent\n : valueFormatter\n const xAxisTickFormatter =\n type === \"percent\" && layoutType === \"vertical\"\n ? valueToPercent\n : valueFormatter\n\n const xAxisLabel = layoutType === \"vertical\" ? yAxisLabelProp : xAxisLabelProp\n const yAxisLabel = layoutType === \"vertical\" ? xAxisLabelProp : yAxisLabelProp\n\n const [xAxisProps, xAxisClassName] = getComponentProps<Dict, string>(\n [rest.xAxisProps ?? {}, xAxisProperties],\n styles.xAxis,\n )(theme)\n\n const [yAxisProps, yAxisClassName] = getComponentProps<Dict, string>(\n [rest.yAxisProps ?? {}, yAxisProperties],\n styles.yAxis,\n )(theme)\n\n const [xAxisLabelProps, xAxisLabelClassName] = getComponentProps<\n Dict,\n string\n >(\n [rest.xAxisLabelProps ?? {}, labelProperties],\n styles.xAxisLabel,\n )(theme)\n\n const [yAxisLabelProps, yAxisLabelClassName] = getComponentProps<\n Dict,\n string\n >(\n [rest.yAxisLabelProps ?? {}, labelProperties],\n styles.yAxisLabel,\n )(theme)\n\n const getXAxisProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.XAxisProps>,\n Recharts.XAxisProps\n > = useCallback(\n ({ className, ...props } = {}) => ({\n className: cx(className, xAxisClassName),\n hide: !withXAxis,\n ...xAxisKey,\n tick: {\n transform: \"translate(0, 10)\",\n fill: \"currentColor\",\n },\n stroke: \"\",\n interval: \"preserveStartEnd\",\n tickLine: xTickLine,\n minTickGap: 5,\n tickFormatter: xAxisTickFormatter,\n ...props,\n ...(xAxisProps as Recharts.XAxisProps),\n }),\n [\n xAxisClassName,\n withXAxis,\n xAxisKey,\n xTickLine,\n xAxisTickFormatter,\n xAxisProps,\n ],\n )\n\n const getYAxisProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.YAxisProps>,\n Recharts.YAxisProps\n > = useCallback(\n ({ className, ...props } = {}) => ({\n className: cx(className, yAxisClassName),\n hide: !withYAxis,\n axisLine: false,\n ...yAxisKey,\n tickLine: yTickLine,\n tick: {\n transform: \"translate(-10, 0)\",\n fill: \"currentColor\",\n },\n allowDecimals: true,\n unit: unit,\n tickFormatter: yAxisTickFormatter,\n ...props,\n ...(yAxisProps as Recharts.YAxisProps),\n }),\n [\n yAxisClassName,\n withYAxis,\n yAxisKey,\n yTickLine,\n unit,\n yAxisTickFormatter,\n yAxisProps,\n ],\n )\n\n const getXAxisLabelProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.LabelProps>,\n Recharts.LabelProps\n > = useCallback(\n ({ className, ...props } = {}) => ({\n className: cx(className, xAxisLabelClassName),\n value: xAxisLabel,\n position: \"insideBottom\",\n offset: -20,\n ...props,\n ...xAxisLabelProps,\n }),\n [xAxisLabel, xAxisLabelClassName, xAxisLabelProps],\n )\n\n const getYAxisLabelProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.LabelProps>,\n Recharts.LabelProps\n > = useCallback(\n ({ className, ...props } = {}) => ({\n className: cx(className, yAxisLabelClassName),\n value: yAxisLabel,\n position: \"insideLeft\",\n angle: -90,\n textAnchor: \"middle\",\n offset: -5,\n ...props,\n ...yAxisLabelProps,\n }),\n [yAxisLabel, yAxisLabelClassName, yAxisLabelProps],\n )\n\n return {\n getXAxisProps,\n getYAxisProps,\n getXAxisLabelProps,\n getYAxisLabelProps,\n }\n}\n\nconst valueToPercent = (value: number) => {\n return `${(value * 100).toFixed(0)}%`\n}\n"],"mappings":";;;;;;;;;;;AACA,SAAS,gBAAgB;AAEzB,SAAS,UAAU;AAEnB,SAAS,aAAa,eAAe;AAiG9B,IAAM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jC,WAAW,GAAG,WAAW,mBAAmB;AAAA,MAC5C,OAAO;AAAA,MACP,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,CAAC,YAAY,qBAAqB,eAAe;AAAA,EACnD;AAEA,QAAM,qBAIF;AAAA,IACF,CAAC,EAAE,WAAW,GAAG,MAAM,IAAI,CAAC,OAAO;AAAA,MACjC,WAAW,GAAG,WAAW,mBAAmB;AAAA,MAC5C,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,CAAC,YAAY,qBAAqB,eAAe;AAAA,EACnD;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAM,iBAAiB,CAAC,UAAkB;AACxC,SAAO,IAAI,QAAQ,KAAK,QAAQ,CAAC,CAAC;AACpC;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  dotProperties,
4
4
  lineChartProperties,
5
5
  lineProperties
6
- } from "./chunk-OSNFBRHL.mjs";
6
+ } from "./chunk-F34FV5DY.mjs";
7
7
  import {
8
8
  getComponentProps
9
9
  } from "./chunk-QL3DB7OJ.mjs";
@@ -24,6 +24,8 @@ var useLineChart = ({
24
24
  referenceLineProps,
25
25
  fillOpacity = 1,
26
26
  syncId,
27
+ xAxisLabel,
28
+ yAxisLabel,
27
29
  styles,
28
30
  ...rest
29
31
  }) => {
@@ -205,10 +207,23 @@ var useLineChart = ({
205
207
  data,
206
208
  layout: layoutType,
207
209
  syncId,
210
+ margin: {
211
+ bottom: xAxisLabel ? 30 : void 0,
212
+ left: yAxisLabel ? 10 : void 0,
213
+ right: yAxisLabel ? 5 : void 0
214
+ },
208
215
  ...props,
209
216
  ...chartProps
210
217
  }),
211
- [data, layoutType, syncId, lineChartClassName, chartProps]
218
+ [
219
+ lineChartClassName,
220
+ data,
221
+ layoutType,
222
+ syncId,
223
+ xAxisLabel,
224
+ yAxisLabel,
225
+ chartProps
226
+ ]
212
227
  );
213
228
  const getLineProps = useCallback(
214
229
  ({ index, className: classNameProp, ...props }, ref = null) => {
@@ -243,4 +258,4 @@ var useLineChart = ({
243
258
  export {
244
259
  useLineChart
245
260
  };
246
- //# sourceMappingURL=chunk-IIBF2GUV.mjs.map
261
+ //# sourceMappingURL=chunk-XZVWGY4J.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/use-line-chart.ts"],"sourcesContent":["import { useTheme } from \"@yamada-ui/core\"\nimport type { CSSUIObject, CSSUIProps } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport type { ComponentPropsWithoutRef } from \"react\"\nimport { useCallback, useMemo, useState } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getComponentProps } from \"./chart-utils\"\nimport type {\n ChartLayoutType,\n LineProps,\n LineChartProps,\n ReferenceLineProps,\n ChartPropGetter,\n ChartCurveType,\n RequiredChartPropGetter,\n} from \"./chart.types\"\nimport {\n dotProperties,\n lineChartProperties,\n lineProperties,\n} from \"./rechart-properties\"\n\nexport type UseLineChartOptions = {\n /**\n * Chart data.\n */\n data: Dict[]\n /**\n * An array of objects with `dataKey` and `color` keys. Determines which data should be consumed from the `data` array.\n */\n series: LineProps[]\n /**\n * Props for the lines.\n */\n lineProps?: Partial<LineProps>\n /**\n * If any two categorical charts have the same syncId,\n * these two charts can sync the position tooltip, and the startIndex, endIndex of Brush.\n */\n syncId?: number | string\n /**\n * Props passed down to recharts `LineChart` component.\n */\n chartProps?: LineChartProps\n /**\n * Chart orientation.\n *\n * @default 'horizontal'\n */\n layoutType?: ChartLayoutType\n /**\n * Determines whether dots should be displayed.\n *\n * @default true\n */\n withDots?: boolean\n /**\n * Determines whether activeDots should be displayed.\n *\n * @default true\n */\n withActiveDots?: boolean\n /**\n * Type of the curve.\n *\n * @default `monotone`\n */\n curveType?: ChartCurveType\n /**\n * Stroke width for the chart lines.\n *\n * @default 2\n */\n strokeWidth?: number\n /**\n * Determines whether points with `null` values should be connected.\n *\n * @default true\n */\n connectNulls?: boolean\n /**\n * Reference lines that should be displayed on the chart.\n */\n referenceLineProps?: ReferenceLineProps[]\n /**\n * Controls fill opacity of all lines.\n *\n * @default 1\n */\n fillOpacity?: number | [number, number]\n /**\n * A label to display below the X axis.\n */\n xAxisLabel?: string\n /**\n * A label to display below the Y axis.\n */\n yAxisLabel?: string\n}\n\ntype UseLineChartProps = UseLineChartOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const useLineChart = ({\n data,\n series,\n layoutType = \"horizontal\",\n withDots = true,\n withActiveDots = true,\n curveType = \"monotone\",\n strokeWidth = 2,\n connectNulls = true,\n referenceLineProps,\n fillOpacity = 1,\n syncId,\n xAxisLabel,\n yAxisLabel,\n styles,\n ...rest\n}: UseLineChartProps) => {\n const { theme } = useTheme()\n const [highlightedArea, setHighlightedArea] = useState<string | null>(null)\n const shouldHighlight = highlightedArea !== null\n const {\n dot = {},\n activeDot = {},\n dimDot = {},\n dimLine = {},\n ...computedLineProps\n } = rest.lineProps ?? {}\n\n const lineColors: CSSUIProps[\"var\"] = useMemo(\n () =>\n series.map(({ color }, index) => ({\n __prefix: \"ui\",\n name: `line-${index}`,\n token: \"colors\",\n value: color ?? \"transparent\",\n })),\n [series],\n )\n\n const referenceLineColors: CSSUIProps[\"var\"] = useMemo(\n () =>\n referenceLineProps\n ? referenceLineProps.map(({ color }, index) => ({\n __prefix: \"ui\",\n name: `reference-line-${index}`,\n token: \"colors\",\n value: color ?? \"transparent\",\n }))\n : [],\n [referenceLineProps],\n )\n\n const lineVars: CSSUIProps[\"var\"] = useMemo(\n () => [\n ...lineColors,\n ...referenceLineColors,\n { __prefix: \"ui\", name: \"fill-opacity\", value: fillOpacity },\n ],\n [fillOpacity, lineColors, referenceLineColors],\n )\n\n const [chartProps, lineChartClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [rest.chartProps ?? {}, lineChartProperties],\n styles.chart,\n )(theme),\n [rest.chartProps, styles.chart, theme],\n )\n\n const [lineProps, lineClassName] = useMemo(() => {\n const resolvedLineProps = {\n fillOpacity: \"var(--ui-fill-opacity)\",\n strokeOpacity: \"var(--ui-fill-opacity)\",\n ...computedLineProps,\n }\n\n return getComponentProps<Dict, string>(\n [resolvedLineProps, lineProperties],\n styles.line,\n )(theme)\n }, [computedLineProps, styles.line, theme])\n\n const [dimLineProps, dimLineClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [dimLine, lineProperties],\n styles.dimLine,\n )(theme),\n [dimLine, styles.dimLine, theme],\n )\n\n const [dotProps, dotClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>([dot, dotProperties], styles.dot)(theme),\n [dot, styles.dot, theme],\n )\n\n const [activeDotProps, activeDotClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [activeDot, dotProperties],\n styles.activeDot,\n )(theme),\n [activeDot, styles.activeDot, theme],\n )\n\n const [dimDotProps, dimDotClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [dimDot, dotProperties],\n styles.dimDot,\n )(theme),\n [dimDot, styles.dimDot, theme],\n )\n\n const linePropList = useMemo(\n () =>\n series.map((props, index) => {\n const {\n dataKey,\n dot = {},\n activeDot = {},\n dimDot = {},\n dimLine = {},\n ...computedProps\n } = props\n const color = `var(--ui-line-${index})`\n const dimmed = shouldHighlight && highlightedArea !== dataKey\n const computedDimLine = { ...dimLineProps, ...dimLine }\n const resolvedProps = {\n ...lineProps,\n ...computedProps,\n ...(dimmed ? computedDimLine : {}),\n }\n\n const rest = getComponentProps<Dict, string>(\n [resolvedProps, lineProperties],\n lineClassName,\n dimmed ? dimLineClassName : undefined,\n )(theme, true)\n\n let resolvedActiveDot: Recharts.DotProps | boolean\n\n if (withActiveDots) {\n const computedActiveDot = { ...activeDotProps, ...activeDot }\n\n const [rest, className] = getComponentProps(\n [computedActiveDot, dotProperties],\n activeDotClassName,\n )(theme)\n\n resolvedActiveDot = {\n className: cx(\"ui-line-chart__active-dot\", className),\n fill: color,\n stroke: color,\n r: 4,\n ...rest,\n } as Recharts.DotProps\n } else {\n resolvedActiveDot = false\n }\n\n let resolvedDot: Recharts.DotProps | boolean\n\n if (withDots) {\n const computedDimDot = { ...dimDotProps, ...dimDot }\n const computedDot = {\n ...dotProps,\n ...dot,\n ...(dimmed ? computedDimDot : {}),\n }\n\n const [rest, className] = getComponentProps(\n [computedDot, dotProperties],\n dotClassName,\n dimmed ? dimDotClassName : undefined,\n )(theme)\n\n resolvedDot = {\n className: cx(\"ui-line-chart__dot\", className),\n fill: color,\n ...rest,\n } as Recharts.DotProps\n } else {\n resolvedDot = false\n }\n\n return {\n ...rest,\n color,\n dataKey,\n activeDot: resolvedActiveDot,\n dot: resolvedDot,\n }\n }),\n [\n series,\n shouldHighlight,\n highlightedArea,\n dimLineProps,\n lineProps,\n lineClassName,\n dimLineClassName,\n theme,\n withActiveDots,\n withDots,\n activeDotProps,\n activeDotClassName,\n dimDotProps,\n dotProps,\n dotClassName,\n dimDotClassName,\n ],\n )\n\n const getLineChartProps: ChartPropGetter<\n \"div\",\n ComponentPropsWithoutRef<typeof Recharts.LineChart>,\n ComponentPropsWithoutRef<typeof Recharts.LineChart>\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(className, lineChartClassName),\n data,\n layout: layoutType,\n syncId,\n margin: {\n bottom: xAxisLabel ? 30 : undefined,\n left: yAxisLabel ? 10 : undefined,\n right: yAxisLabel ? 5 : undefined,\n },\n ...props,\n ...chartProps,\n }),\n [\n lineChartClassName,\n data,\n layoutType,\n syncId,\n xAxisLabel,\n yAxisLabel,\n chartProps,\n ],\n )\n\n const getLineProps: RequiredChartPropGetter<\n \"div\",\n {\n index: number\n },\n Omit<Recharts.LineProps, \"ref\">\n > = useCallback(\n ({ index, className: classNameProp, ...props }, ref = null) => {\n const { color, className, dataKey, activeDot, dot, ...rest } =\n linePropList[index]\n\n return {\n ref,\n className: cx(classNameProp, className),\n activeDot,\n dot,\n name: dataKey as string,\n type: curveType,\n dataKey,\n fill: color,\n strokeWidth,\n stroke: color,\n isAnimationActive: false,\n connectNulls,\n ...(props as Omit<Recharts.LineProps, \"dataKey\">),\n ...rest,\n }\n },\n [connectNulls, curveType, linePropList, strokeWidth],\n )\n\n return {\n getLineProps,\n getLineChartProps,\n lineVars,\n setHighlightedArea,\n }\n}\n\nexport type UseLineChartReturn = ReturnType<typeof useLineChart>\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,gBAAgB;AAEzB,SAAS,UAAU;AAGnB,SAAS,aAAa,SAAS,gBAAgB;AAoGxC,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyB;AAzHzB;AA0HE,QAAM,EAAE,MAAM,IAAI,SAAS;AAC3B,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAwB,IAAI;AAC1E,QAAM,kBAAkB,oBAAoB;AAC5C,QAAM;AAAA,IACJ,MAAM,CAAC;AAAA,IACP,YAAY,CAAC;AAAA,IACb,SAAS,CAAC;AAAA,IACV,UAAU,CAAC;AAAA,IACX,GAAG;AAAA,EACL,KAAI,UAAK,cAAL,YAAkB,CAAC;AAEvB,QAAM,aAAgC;AAAA,IACpC,MACE,OAAO,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW;AAAA,MAChC,UAAU;AAAA,MACV,MAAM,QAAQ,KAAK;AAAA,MACnB,OAAO;AAAA,MACP,OAAO,wBAAS;AAAA,IAClB,EAAE;AAAA,IACJ,CAAC,MAAM;AA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,aAAa,IAAI;AAAA,MAC1B;AAAA,MACA,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,eAMF;AAAA,IACF,CAAC,EAAE,OAAO,WAAW,eAAe,GAAG,MAAM,GAAG,MAAM,SAAS;AAC7D,YAAM,EAAE,OAAO,WAAW,SAAS,WAAAH,YAAW,KAAAD,MAAK,GAAGI,MAAK,IACzD,aAAa,KAAK;AAEpB,aAAO;AAAA,QACL;AAAA,QACA,WAAW,GAAG,eAAe,SAAS;AAAA,QACtC,WAAAH;AAAA,QACA,KAAAD;AAAA,QACA,MAAM;AAAA,QACN,MAAM;AAAA,QACN;AAAA,QACA,MAAM;AAAA,QACN;AAAA,QACA,QAAQ;AAAA,QACR,mBAAmB;AAAA,QACnB;AAAA,QACA,GAAI;AAAA,QACJ,GAAGI;AAAA,MACL;AAAA,IACF;AAAA,IACA,CAAC,cAAc,WAAW,cAAc,WAAW;AAAA,EACrD;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["_a","dot","activeDot","dimDot","dimLine","rest"]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pieChartProperties,
4
4
  pieProperties
5
- } from "./chunk-OSNFBRHL.mjs";
5
+ } from "./chunk-F34FV5DY.mjs";
6
6
  import {
7
7
  getClassName,
8
8
  getComponentProps
@@ -212,4 +212,4 @@ var usePieChart = ({
212
212
  export {
213
213
  usePieChart
214
214
  };
215
- //# sourceMappingURL=chunk-MFYRHF3O.mjs.map
215
+ //# sourceMappingURL=chunk-YGKNNA34.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/donut-chart.tsx","../src/chart-legend.tsx","../src/use-chart.ts","../src/chart-utils.ts","../src/rechart-properties.ts","../src/chart-tooltip.tsx","../src/use-chart-legend.ts","../src/use-chart-tooltip.ts","../src/use-pie-chart.ts"],"sourcesContent":["import {\n forwardRef,\n omitThemeProps,\n ui,\n useMultiComponentStyle,\n} from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useMemo } from \"react\"\nimport {\n Cell,\n Legend,\n Pie,\n PieChart as RechartsPieChart,\n ResponsiveContainer,\n Tooltip,\n} from \"recharts\"\nimport { ChartLegend } from \"./chart-legend\"\nimport { ChartTooltip } from \"./chart-tooltip\"\nimport type { PieChartProps } from \"./pie-chart\"\nimport { ChartProvider, useChart } from \"./use-chart\"\nimport { useChartLegend } from \"./use-chart-legend\"\nimport { useChartTooltip } from \"./use-chart-tooltip\"\nimport { usePieChart } from \"./use-pie-chart\"\n\ntype DonutChartOptions = {\n /**\n * Controls innerRadius of the chart segments.\n * If it is a number, it is the width of the radius.\n * For example, `60` means the radius is `60px` and the diameter is `120px`.\n *\n * @default '60%'\n */\n innerRadius?: number | string\n}\n\nexport type DonutChartProps = PieChartProps & DonutChartOptions\n\n/**\n * `DonutChart` is a component for drawing donut charts to compare multiple sets of data.\n *\n * @see Docs https://yamada-ui.com/components/feedback/donut-chart\n */\nexport const DonutChart = forwardRef<DonutChartProps, \"div\">((props, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"DonutChart\", props)\n const {\n className,\n data,\n pieProps,\n chartProps,\n cellProps,\n containerProps,\n withTooltip = true,\n withLegend = false,\n tooltipProps,\n tooltipAnimationDuration,\n tooltipDataSource = \"all\",\n valueFormatter,\n unit,\n paddingAngle,\n startAngle,\n endAngle,\n withLabels,\n withLabelLines,\n innerRadius = withLabels ? \"60%\" : \"80%\",\n outerRadius,\n strokeWidth,\n legendProps,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const {\n pieVars,\n getPieProps,\n getPieChartProps,\n getCellProps,\n setHighlightedArea,\n } = usePieChart({\n data,\n pieProps,\n chartProps,\n cellProps,\n innerRadius,\n outerRadius,\n paddingAngle,\n startAngle,\n endAngle,\n strokeWidth,\n withLabels,\n withLabelLines,\n styles,\n })\n const { getContainerProps } = useChart({ containerProps })\n const { tooltipProps: computedTooltipProps, getTooltipProps } =\n useChartTooltip({\n tooltipProps,\n tooltipAnimationDuration,\n styles,\n })\n const { legendProps: computedLegendProps, getLegendProps } = useChartLegend({\n legendProps,\n })\n\n const cells = useMemo(\n () =>\n data.map(({ name }, index) => (\n <Cell\n key={`donut-cell-${name}`}\n {...getCellProps({ index, className: \"ui-donut-chart__cell\" })}\n />\n )),\n [data, getCellProps],\n )\n\n return (\n <ChartProvider value={{ styles }}>\n <ui.div\n ref={ref}\n className={cx(\"ui-donut-chart\", className)}\n var={pieVars}\n __css={{ ...styles.container }}\n {...rest}\n >\n <ResponsiveContainer\n {...getContainerProps({ className: \"ui-donut-chart__container\" })}\n >\n <RechartsPieChart\n {...getPieChartProps({ className: \"ui-donut-chart__chart\" })}\n >\n <Pie\n {...getPieProps({\n className: \"ui-donut-chart__donut\",\n labelClassName: \"ui-donut-chart__label\",\n labelLineClassName: \"ui-donut-chart__label-line\",\n })}\n >\n {cells}\n </Pie>\n\n {withLegend ? (\n <Legend\n content={({ payload }) => (\n <ChartLegend\n className=\"ui-donut-chart__legend\"\n payload={payload}\n onHighlight={setHighlightedArea}\n {...computedLegendProps}\n />\n )}\n {...getLegendProps()}\n />\n ) : null}\n\n {withTooltip ? (\n <Tooltip\n content={({ label, payload }) => (\n <ChartTooltip\n className=\"ui-donut-chart__tooltip\"\n label={label}\n payload={tooltipDataSource === \"segment\" ? payload : data}\n valueFormatter={valueFormatter}\n unit={unit}\n {...computedTooltipProps}\n />\n )}\n {...getTooltipProps()}\n />\n ) : null}\n </RechartsPieChart>\n </ResponsiveContainer>\n </ui.div>\n </ChartProvider>\n )\n})\n","import type { HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx, type Dict } from \"@yamada-ui/utils\"\nimport { useLegend } from \"./use-chart\"\n\ntype ChartLegendOptions = {\n payload?: Dict[]\n onHighlight: (area: string | null) => void\n}\n\nexport type ChartLegendProps = HTMLUIProps<\"div\"> & ChartLegendOptions\n\nexport const ChartLegend = forwardRef<ChartLegendProps, \"div\">(\n ({ className, payload = [], onHighlight, ...rest }, ref) => {\n const { styles } = useLegend()\n\n const items = payload.map(({ dataKey, value: valueProp, color }, index) => {\n const value = dataKey ?? valueProp\n\n return (\n <ui.div\n className=\"ui-chart__legend-item\"\n key={`legend-${index}`}\n onMouseEnter={() => onHighlight(value)}\n onMouseLeave={() => onHighlight(null)}\n __css={styles.legendItem}\n >\n <ui.div\n className=\"ui-chart__legend-swatch\"\n background={color}\n __css={styles.legendSwatch}\n />\n\n <ui.span className=\"ui-chart__legend-label\">{value}</ui.span>\n </ui.div>\n )\n })\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-chart__legend\", className)}\n __css={styles.legend}\n {...rest}\n >\n {items}\n </ui.div>\n )\n },\n)\n","import { useTheme, type CSSUIObject } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { createContext, cx } from \"@yamada-ui/utils\"\nimport { useCallback } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getComponentProps } from \"./chart-utils\"\nimport type { ChartPropGetter, ResponsiveContainerProps } from \"./chart.types\"\nimport { containerProperties } from \"./rechart-properties\"\n\ntype ChartContext = { styles: Record<string, CSSUIObject> }\n\nexport const [ChartProvider, useChartContext] = createContext<ChartContext>({\n name: \"ChartContext\",\n errorMessage: `useChartContext returned is 'undefined'. Seems you forgot to wrap the components in \"<LineChart />\" or \"<BarChart />\" etc.`,\n})\n\nexport type UseChartProps = {\n /**\n * Props passed down to recharts `ResponsiveContainer` component.\n */\n containerProps?: ResponsiveContainerProps\n}\n\nexport const useChart = ({ containerProps = {} }: UseChartProps) => {\n const { theme } = useTheme()\n const [reChartsProps, propClassName] = getComponentProps<Dict, string>([\n containerProps,\n containerProperties,\n ])(theme)\n\n const getContainerProps: ChartPropGetter<\n \"div\",\n Partial<Omit<Recharts.ResponsiveContainerProps, \"children\">>,\n Omit<Recharts.ResponsiveContainerProps, \"children\">\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(\"ui-chart__container\", className as string, propClassName),\n ...props,\n ...reChartsProps,\n }),\n [propClassName, reChartsProps],\n )\n\n return {\n getContainerProps,\n }\n}\n\nexport type UseChartReturn = ReturnType<typeof useChart>\n\nexport type UseLegendProps = {}\n\nexport const useLegend = ({}: UseLegendProps = {}) => {\n const { styles } = useChartContext()\n return {\n styles,\n }\n}\nexport type UseLegendReturn = ReturnType<typeof useLegend>\n\nexport type UseTooltipProps = {}\n\nexport const useTooltip = ({}: UseTooltipProps = {}) => {\n const { styles } = useChartContext()\n return {\n styles,\n }\n}\nexport type UseTooltipReturn = ReturnType<typeof useTooltip>\n","import type { StyledTheme } from \"@yamada-ui/core\"\nimport { getCSS } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx, isString, splitObject } from \"@yamada-ui/utils\"\n\nexport const getClassName =\n (...styles: (Dict | string | undefined)[]) =>\n (theme: StyledTheme) =>\n cx(\n ...styles.map((style) =>\n isString(style) ? style : getCSS(style)(theme),\n ),\n )\n\nexport const getComponentProps =\n <T extends Dict, K extends keyof T>(\n [obj, keys]: [T, K[]],\n ...props: (Dict | string | undefined)[]\n ) =>\n <P extends boolean = false>(theme: StyledTheme, isContain?: P) => {\n const [pickedProps, omittedProps] = splitObject<T, K>(obj, keys)\n const className = getClassName(...props, omittedProps)(theme)\n\n return (\n !isContain ? [pickedProps, className] : { ...pickedProps, className }\n ) as P extends false\n ? [{ [P in K]: T[P] }, string]\n : { [P in K]: T[P] } & { className: string }\n }\n","import type { ComponentPropsWithoutRef } from \"react\"\nimport type * as Recharts from \"recharts\"\n\nexport const areaChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.AreaChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"stackOffset\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const barChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.BarChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"barCategoryGap\",\n \"barGap\",\n \"barSize\",\n \"maxBarSize\",\n \"stackOffset\",\n \"reverseStackOrder\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const lineChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.LineChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const radarChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.RadarChart\n>)[] = [\n \"width\",\n \"height\",\n \"data\",\n \"cx\",\n \"cy\",\n \"startAngle\",\n \"endAngle\",\n \"innerRadius\",\n \"outerRadius\",\n \"margin\",\n \"onMouseEnter\",\n \"onClick\",\n]\n\nexport const pieChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.PieChart\n>)[] = [\"width\", \"height\", \"margin\", \"onClick\", \"onMouseEnter\", \"onMouseLeave\"]\n\nexport const referenceLineProperties: (keyof Recharts.ReferenceLineProps)[] = [\n \"xAxisId\",\n \"yAxisId\",\n \"x\",\n \"y\",\n \"ifOverflow\",\n \"viewBox\",\n \"xAxis\",\n \"yAxis\",\n \"label\",\n \"isFront\",\n \"strokeWidth\",\n \"segment\",\n]\n\nexport const containerProperties: (keyof Omit<\n Recharts.ResponsiveContainerProps,\n \"children\"\n>)[] = [\n \"aspect\",\n \"width\",\n \"height\",\n \"minWidth\",\n \"minHeight\",\n \"debounce\",\n \"onResize\",\n]\n\nexport const gridProperties: (keyof Recharts.CartesianGridProps)[] = [\n \"x\",\n \"y\",\n \"width\",\n \"height\",\n \"horizontal\",\n \"vertical\",\n \"horizontalPoints\",\n \"horizontalCoordinatesGenerator\",\n \"verticalPoints\",\n \"verticalCoordinatesGenerator\",\n \"fill\",\n \"fillOpacity\",\n \"strokeDasharray\",\n]\n\nexport const xAxisProperties: (keyof Recharts.XAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"xAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"angle\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const yAxisProperties: (keyof Recharts.YAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"yAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const legendProperties: (keyof Omit<Recharts.LegendProps, \"ref\">)[] = [\n \"width\",\n \"height\",\n \"layout\",\n \"align\",\n \"verticalAlign\",\n \"iconSize\",\n \"iconType\",\n \"payload\",\n \"chartWidth\",\n \"chartHeight\",\n \"margin\",\n \"content\",\n \"formatter\",\n \"wrapperStyle\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const tooltipProperties: (keyof Recharts.TooltipProps<any, any>)[] = [\n \"offset\",\n \"filterNull\",\n \"itemStyle\",\n \"wrapperStyle\",\n \"contentStyle\",\n \"labelStyle\",\n \"cursor\",\n \"viewBox\",\n \"allowEscapeViewBox\",\n \"active\",\n \"position\",\n \"coordinate\",\n \"payload\",\n \"label\",\n \"content\",\n \"formatter\",\n \"labelFormatter\",\n \"itemSorter\",\n \"isAnimationActive\",\n \"animationDuration\",\n \"animationEasing\",\n]\n\nexport const areaProperties: (keyof Omit<Recharts.AreaProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"baseLine\",\n \"points\",\n \"stackId\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const barProperties: (keyof Omit<Recharts.BarProps, \"ref\">)[] = [\n \"layout\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"label\",\n \"data\",\n \"barSize\",\n \"maxBarSize\",\n \"minPointSize\",\n \"background\",\n \"shape\",\n \"activeBar\",\n \"stackId\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"radius\",\n]\n\nexport const radarProperties: (keyof Omit<Recharts.RadarProps, \"ref\">)[] = [\n \"dataKey\",\n \"points\",\n \"shape\",\n \"dot\",\n \"activeDot\",\n \"legendType\",\n \"label\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n]\n\nexport const lineProperties: (keyof Omit<Recharts.LineProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"hide\",\n \"points\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"strokeDasharray\",\n]\n\nexport const pieProperties: (keyof Omit<Recharts.PieProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"startAngle\",\n \"endAngle\",\n \"minAngle\",\n \"paddingAngle\",\n \"nameKey\",\n \"dataKey\",\n \"legendType\",\n \"label\",\n \"labelLine\",\n \"data\",\n \"activeIndex\",\n \"activeShape\",\n \"inactiveShape\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const dotProperties: (keyof Omit<Recharts.DotProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"r\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const polarGridProperties: (keyof Recharts.PolarGridProps)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"polarAngles\",\n \"polarRadius\",\n \"gridType\",\n]\n\nexport const polarAngleAxisProperties: (keyof Recharts.PolarAngleAxisProps)[] =\n [\n \"dataKey\",\n \"cx\",\n \"cy\",\n \"radius\",\n \"axisLine\",\n \"axisLineType\",\n \"tickLine\",\n \"tickSize\",\n \"tick\",\n \"ticks\",\n \"orient\",\n \"tickFormatter\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\nexport const polarRadiusAxisProperties: (keyof Recharts.PolarRadiusAxisProps)[] =\n [\n \"angle\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"cx\",\n \"cy\",\n \"domain\",\n \"reversed\",\n \"label\",\n \"orientation\",\n \"axisLine\",\n \"tick\",\n \"tickSize\",\n \"tickFormatter\",\n \"tickCount\",\n \"scale\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\n","import { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx, isArray, type Dict } from \"@yamada-ui/utils\"\nimport { useTooltip } from \"./use-chart\"\n\nexport type ChartTooltipProps = {\n label: string | undefined\n payload: Dict[] | undefined\n valueFormatter?: (value: number) => string\n unit?: string\n}\n\nexport const ChartTooltip = forwardRef<ChartTooltipProps, \"div\">(\n ({ label, className, payload = [], valueFormatter, unit, ...rest }, ref) => {\n const { styles } = useTooltip()\n\n const items = payload.map(\n ({ color: colorProp, name, value: valueProp, payload } = {}, index) => {\n const color = colorProp ?? payload?.color\n let value: string\n\n if (isArray(valueProp)) {\n value = valueProp\n .map((value) => {\n return `${valueFormatter?.(value) ?? value}`\n })\n .join(\" - \")\n } else {\n value = valueFormatter?.(valueProp) ?? valueProp\n }\n\n return (\n <ui.div\n className=\"ui-chart__tooltip-item\"\n key={`tooltip-payload-${index}`}\n __css={styles.tooltipItem}\n >\n <ui.div\n className=\"ui-chart__tooltip-swatch\"\n background={color}\n __css={styles.tooltipSwatch}\n />\n\n <ui.span\n className=\"ui-chart__tooltip-label\"\n __css={styles.tooltipLabel}\n >\n {name}\n </ui.span>\n\n <ui.span\n className=\"ui-chart__tooltip-value\"\n __css={styles.tooltipValue}\n >\n {value}\n {unit ? unit : \"\"}\n </ui.span>\n </ui.div>\n )\n },\n )\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-chart__tooltip\", className)}\n __css={styles.tooltip}\n {...rest}\n >\n {label ? (\n <ui.p className=\"ui-chart__tooltip-title\" __css={styles.tooltipTitle}>\n {label}\n </ui.p>\n ) : null}\n\n <ui.div className=\"ui-chart__tooltip-list\" __css={styles.tooltipList}>\n {items}\n </ui.div>\n </ui.div>\n )\n },\n)\n","import type { Dict } from \"@yamada-ui/utils\"\nimport { splitObject } from \"@yamada-ui/utils\"\nimport { useCallback } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport type { ChartPropGetter, LegendProps } from \"./chart.types\"\nimport { legendProperties } from \"./rechart-properties\"\n\nexport type UseChartLegendProps = {\n /**\n * Props passed down to recharts 'Legend' component.\n */\n legendProps?: LegendProps\n}\n\nexport const useChartLegend = ({\n legendProps: _legendProps = {},\n}: UseChartLegendProps) => {\n const [rest, legendProps] = splitObject<Dict, string>(\n _legendProps,\n legendProperties,\n )\n\n const getLegendProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.LegendProps>,\n Omit<Recharts.LegendProps, \"ref\">\n > = useCallback(\n (props, ref = null) => {\n return {\n ref,\n verticalAlign: \"top\",\n ...props,\n ...rest,\n }\n },\n [rest],\n )\n\n return { legendProps, getLegendProps }\n}\n","import { useTheme, type CSSUIObject } from \"@yamada-ui/core\"\nimport { splitObject, type Dict, cx } from \"@yamada-ui/utils\"\nimport { useCallback, useMemo } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getClassName } from \"./chart-utils\"\nimport type { ChartPropGetter, TooltipProps } from \"./chart.types\"\nimport { tooltipProperties } from \"./rechart-properties\"\n\nexport type UseChartTooltipOptions = {\n /**\n * Props passed down to recharts 'Tooltip' component.\n */\n tooltipProps?: TooltipProps\n /**\n * Specifies the duration of animation, the unit of this option is ms.\n *\n * @default 0\n */\n tooltipAnimationDuration?: number\n}\n\ntype UseChartTooltipProps = UseChartTooltipOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const useChartTooltip = ({\n tooltipProps: _tooltipProps = {},\n tooltipAnimationDuration = 0,\n styles,\n}: UseChartTooltipProps) => {\n const { theme } = useTheme()\n const { cursor, ...rest } = _tooltipProps\n const cursorClassName = useMemo(\n () => getClassName({ ...styles.cursor, ...cursor })(theme),\n [cursor, styles.cursor, theme],\n )\n\n const [tooltipProps, tooltipUIProps] = splitObject<Dict, string>(\n rest,\n tooltipProperties,\n )\n\n const getTooltipProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.TooltipProps<any, any>>,\n Omit<Recharts.TooltipProps<any, any>, \"ref\">\n > = useCallback(\n (props, ref = null) => ({\n ref,\n animationDuration: tooltipAnimationDuration,\n isAnimationActive: (tooltipAnimationDuration || 0) > 0,\n cursor: {\n className: cx(\"ui-chart__cursor\", cursorClassName),\n },\n ...props,\n ...tooltipProps,\n }),\n [cursorClassName, tooltipAnimationDuration, tooltipProps],\n )\n\n return { tooltipProps: tooltipUIProps, getTooltipProps }\n}\n","import { useTheme, type CSSUIObject, type CSSUIProps } from \"@yamada-ui/core\"\nimport { cx, type Dict } from \"@yamada-ui/utils\"\nimport type { ComponentPropsWithoutRef } from \"react\"\nimport { useCallback, useMemo, useState } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getClassName, getComponentProps } from \"./chart-utils\"\nimport type {\n CellProps,\n ChartPropGetter,\n PieChartProps,\n PieProps,\n RequiredChartPropGetter,\n} from \"./chart.types\"\nimport { pieChartProperties, pieProperties } from \"./rechart-properties\"\n\nexport type UsePieChartOptions = {\n /**\n * Chart data.\n */\n data: CellProps[]\n /**\n * Props passed down to recharts `PieChart` component.\n */\n chartProps?: PieChartProps\n /**\n * Props for the pie.\n */\n pieProps?: Partial<PieProps>\n /**\n * Props for the cell.\n */\n cellProps?: Partial<CellProps>\n /**\n * Determines whether each segment should have associated label.\n *\n * @default false\n */\n withLabels?: boolean\n /**\n * Determines whether segments labels should have lines that connect the segment with the label.\n *\n * @default false\n */\n withLabelLines?: boolean\n /**\n * Controls innerRadius of the chart segments.\n * If it is a number, it is the width of the radius.\n * For example, `60` means the radius is `60px` and the diameter is `120px`.\n *\n * @default '0%'\n */\n innerRadius?: number | string\n /**\n * Controls thickness of the chart segments. If it is a number, it is calculated as px.\n * If it is a number, it is the width of the radius.\n * For example, `60` means the radius is `60px` and the diameter is `120px`.\n *\n * @default '80%'\n */\n outerRadius?: number | string\n /**\n * Controls padding between segments.\n *\n * @default 0\n */\n paddingAngle?: number\n /**\n * Stroke width for the chart pies.\n *\n * @default 1\n */\n strokeWidth?: number\n /**\n * Controls angle at which chart starts.\n *\n * @default 90\n */\n startAngle?: number\n /**\n * Controls angle at which chart ends.\n *\n * @default -270\n */\n endAngle?: number\n /**\n * Controls fill opacity of all pies.\n *\n * @default 1\n */\n fillOpacity?: number | [number, number]\n /**\n * A function to format values inside the tooltip.\n */\n valueFormatter?: (value: number) => string\n}\n\ntype UsePieChartProps = UsePieChartOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const usePieChart = ({\n data,\n withLabels = false,\n withLabelLines = false,\n strokeWidth = 1,\n fillOpacity = 1,\n innerRadius = \"0%\",\n outerRadius = withLabels ? \"80%\" : \"100%\",\n paddingAngle = 0,\n startAngle = 90,\n endAngle = -270,\n styles,\n ...rest\n}: UsePieChartProps) => {\n const { theme } = useTheme()\n const [highlightedArea, setHighlightedArea] = useState<string | null>(null)\n const shouldHighlight = highlightedArea !== null\n const { dimCell, ...computedCellProps } = rest.cellProps ?? {}\n const {\n activeShape = {},\n inactiveShape = {},\n label,\n labelLine,\n ...computedPieProps\n } = rest.pieProps ?? {}\n\n const cellColors: CSSUIProps[\"var\"] = useMemo(\n () =>\n data.map(({ color }, index) => ({\n __prefix: \"ui\",\n name: `cell-${index}`,\n token: \"colors\",\n value: color ?? \"transparent\",\n })),\n [data],\n )\n\n const pieVars: CSSUIProps[\"var\"] = useMemo(\n () =>\n [\n ...cellColors,\n { __prefix: \"ui\", name: \"fill-opacity\", value: fillOpacity },\n ] as Required<CSSUIProps>[\"var\"],\n [fillOpacity, cellColors],\n )\n\n const [chartProps, chartClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [rest.chartProps ?? {}, pieChartProperties],\n styles.chart,\n )(theme),\n [rest.chartProps, styles.chart, theme],\n )\n\n const [pieProps, pieClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [computedPieProps, pieProperties],\n styles.pie,\n )(theme),\n [computedPieProps, styles.pie, theme],\n )\n\n const cellClassName = useMemo(() => {\n const resolvedCellProps = {\n fillOpacity: \"var(--ui-fill-opacity)\",\n ...styles.cell,\n ...computedCellProps,\n }\n\n return getClassName(resolvedCellProps)(theme)\n }, [computedCellProps, styles.cell, theme])\n\n const dimCellClassName = useMemo(() => {\n const resolvedDimCell = { ...styles.dimCell, ...dimCell }\n\n return getClassName(resolvedDimCell)(theme)\n }, [dimCell, styles.dimCell, theme])\n\n const activeShapeProps = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [activeShape, pieProperties],\n styles.activeShape,\n )(theme, true),\n [activeShape, styles.activeShape, theme],\n )\n\n const inactiveShapeProps = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [inactiveShape, pieProperties],\n styles.inactiveShape,\n )(theme, true),\n [inactiveShape, styles.inactiveShape, theme],\n )\n\n const labelClassName = useMemo(\n () => getClassName({ ...styles.label, ...label })(theme),\n [label, styles.label, theme],\n )\n\n const labelLineClassName = useMemo(\n () => getClassName({ ...styles.labelLine, ...labelLine })(theme),\n [labelLine, styles.labelLine, theme],\n )\n\n const cellPropList = useMemo(\n () =>\n data.map((props, index) => {\n const { name, dimCell = {}, ...computedProps } = props\n const color = `var(--ui-cell-${index})`\n const dimmed = shouldHighlight && highlightedArea !== name\n const resolvedProps = {\n ...computedProps,\n ...(dimmed ? dimCell : {}),\n }\n\n const className = getClassName(\n {\n cellClassName,\n ...resolvedProps,\n },\n dimmed ? dimCellClassName : undefined,\n )(theme)\n\n return {\n color,\n className,\n }\n }),\n [\n cellClassName,\n data,\n dimCellClassName,\n highlightedArea,\n shouldHighlight,\n theme,\n ],\n )\n\n const getPieChartProps: ChartPropGetter<\n \"div\",\n ComponentPropsWithoutRef<typeof Recharts.PieChart>,\n ComponentPropsWithoutRef<typeof Recharts.PieChart>\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(className, chartClassName),\n ...props,\n ...chartProps,\n }),\n [chartProps, chartClassName],\n )\n\n const getPieProps: RequiredChartPropGetter<\n \"div\",\n Partial<Recharts.PieProps> & {\n labelClassName: string\n labelLineClassName: string\n },\n Omit<Recharts.PieProps, \"ref\">\n > = useCallback(\n (\n {\n className,\n labelClassName: labelClassNameProp,\n labelLineClassName: labelLineClassNameProp,\n ...props\n },\n ref = null,\n ) => ({\n ref,\n className: cx(className, pieClassName),\n dataKey: \"value\",\n data,\n rootTabIndex: -1,\n outerRadius,\n innerRadius,\n paddingAngle,\n startAngle,\n endAngle,\n isAnimationActive: false,\n label: withLabels\n ? { className: cx(labelClassNameProp, labelClassName) }\n : false,\n labelLine: withLabelLines\n ? { className: cx(labelLineClassNameProp, labelLineClassName) }\n : false,\n activeShape: activeShapeProps,\n inactiveShape: inactiveShapeProps,\n ...(props as Omit<Recharts.PieProps, \"dataKey\">),\n ...pieProps,\n }),\n [\n pieClassName,\n data,\n outerRadius,\n innerRadius,\n paddingAngle,\n startAngle,\n endAngle,\n withLabels,\n labelClassName,\n withLabelLines,\n labelLineClassName,\n activeShapeProps,\n inactiveShapeProps,\n pieProps,\n ],\n )\n\n const getCellProps: RequiredChartPropGetter<\n \"div\",\n Omit<Recharts.CellProps, \"ref\"> & { index: number },\n Omit<Recharts.CellProps, \"ref\">\n > = useCallback(\n ({ index, className: classNameProp, ...props }, ref = null) => {\n const { className, color } = cellPropList[index]\n\n return {\n ref,\n className: cx(classNameProp, className),\n fill: color,\n stroke: color,\n strokeWidth,\n ...(props as Recharts.CellProps),\n }\n },\n [cellPropList, strokeWidth],\n )\n\n return {\n pieVars,\n getPieProps,\n getPieChartProps,\n getCellProps,\n setHighlightedArea,\n }\n}\n\nexport type UsePieChartReturn = ReturnType<typeof usePieChart>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,eAKO;AACP,IAAAC,gBAAmB;AACnB,IAAAC,gBAAwB;AACxB,sBAOO;;;ACdP,IAAAC,eAA+B;AAC/B,IAAAC,gBAA8B;;;ACF9B,IAAAC,eAA2C;AAE3C,IAAAC,gBAAkC;AAClC,mBAA4B;;;ACF5B,kBAAuB;AAEvB,mBAA0C;AAEnC,IAAM,eACX,IAAI,WACJ,CAAC,cACC;AAAA,EACE,GAAG,OAAO;AAAA,IAAI,CAAC,cACb,uBAAS,KAAK,IAAI,YAAQ,oB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C;AAAA;AAAA,oBACC,SAAS,CAAC,EAAE,OAAO,QAAQ,MACzB;AAAA,sBAAC;AAAA;AAAA,wBACC,WAAU;AAAA,wBACV;AAAA,wBACA,SAAS,sBAAsB,YAAY,UAAU;AAAA,wBACrD;AAAA,wBACA;AAAA,wBACC,GAAG;AAAA;AAAA,oBACN;AAAA,oBAED,GAAG,gBAAgB;AAAA;AAAA,gBACtB,IACE;AAAA;AAAA;AAAA,UACN;AAAA;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAEJ,CAAC;","names":["import_core","import_utils","import_react","import_core","import_utils","import_core","import_utils","import_core","import_utils","import_jsx_runtime","payload","value","_a","import_utils","import_react","import_core","import_utils","import_react","import_core","import_utils","import_react","_a","dimCell","import_jsx_runtime","RechartsPieChart"]}
1
+ {"version":3,"sources":["../src/donut-chart.tsx","../src/chart-legend.tsx","../src/use-chart.ts","../src/chart-utils.ts","../src/rechart-properties.ts","../src/chart-tooltip.tsx","../src/use-chart-legend.ts","../src/use-chart-tooltip.ts","../src/use-pie-chart.ts"],"sourcesContent":["import {\n forwardRef,\n omitThemeProps,\n ui,\n useMultiComponentStyle,\n} from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useMemo } from \"react\"\nimport {\n Cell,\n Legend,\n Pie,\n PieChart as RechartsPieChart,\n ResponsiveContainer,\n Tooltip,\n} from \"recharts\"\nimport { ChartLegend } from \"./chart-legend\"\nimport { ChartTooltip } from \"./chart-tooltip\"\nimport type { PieChartProps } from \"./pie-chart\"\nimport { ChartProvider, useChart } from \"./use-chart\"\nimport { useChartLegend } from \"./use-chart-legend\"\nimport { useChartTooltip } from \"./use-chart-tooltip\"\nimport { usePieChart } from \"./use-pie-chart\"\n\ntype DonutChartOptions = {\n /**\n * Controls innerRadius of the chart segments.\n * If it is a number, it is the width of the radius.\n * For example, `60` means the radius is `60px` and the diameter is `120px`.\n *\n * @default '60%'\n */\n innerRadius?: number | string\n}\n\nexport type DonutChartProps = PieChartProps & DonutChartOptions\n\n/**\n * `DonutChart` is a component for drawing donut charts to compare multiple sets of data.\n *\n * @see Docs https://yamada-ui.com/components/feedback/donut-chart\n */\nexport const DonutChart = forwardRef<DonutChartProps, \"div\">((props, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"DonutChart\", props)\n const {\n className,\n data,\n pieProps,\n chartProps,\n cellProps,\n containerProps,\n withTooltip = true,\n withLegend = false,\n tooltipProps,\n tooltipAnimationDuration,\n tooltipDataSource = \"all\",\n valueFormatter,\n unit,\n paddingAngle,\n startAngle,\n endAngle,\n withLabels,\n withLabelLines,\n innerRadius = withLabels ? \"60%\" : \"80%\",\n outerRadius,\n strokeWidth,\n legendProps,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const {\n pieVars,\n getPieProps,\n getPieChartProps,\n getCellProps,\n setHighlightedArea,\n } = usePieChart({\n data,\n pieProps,\n chartProps,\n cellProps,\n innerRadius,\n outerRadius,\n paddingAngle,\n startAngle,\n endAngle,\n strokeWidth,\n withLabels,\n withLabelLines,\n styles,\n })\n const { getContainerProps } = useChart({ containerProps })\n const { tooltipProps: computedTooltipProps, getTooltipProps } =\n useChartTooltip({\n tooltipProps,\n tooltipAnimationDuration,\n styles,\n })\n const { legendProps: computedLegendProps, getLegendProps } = useChartLegend({\n legendProps,\n })\n\n const cells = useMemo(\n () =>\n data.map(({ name }, index) => (\n <Cell\n key={`donut-cell-${name}`}\n {...getCellProps({ index, className: \"ui-donut-chart__cell\" })}\n />\n )),\n [data, getCellProps],\n )\n\n return (\n <ChartProvider value={{ styles }}>\n <ui.div\n ref={ref}\n className={cx(\"ui-donut-chart\", className)}\n var={pieVars}\n __css={{ ...styles.container }}\n {...rest}\n >\n <ResponsiveContainer\n {...getContainerProps({ className: \"ui-donut-chart__container\" })}\n >\n <RechartsPieChart\n {...getPieChartProps({ className: \"ui-donut-chart__chart\" })}\n >\n <Pie\n {...getPieProps({\n className: \"ui-donut-chart__donut\",\n labelClassName: \"ui-donut-chart__label\",\n labelLineClassName: \"ui-donut-chart__label-line\",\n })}\n >\n {cells}\n </Pie>\n\n {withLegend ? (\n <Legend\n content={({ payload }) => (\n <ChartLegend\n className=\"ui-donut-chart__legend\"\n payload={payload}\n onHighlight={setHighlightedArea}\n {...computedLegendProps}\n />\n )}\n {...getLegendProps()}\n />\n ) : null}\n\n {withTooltip ? (\n <Tooltip\n content={({ label, payload }) => (\n <ChartTooltip\n className=\"ui-donut-chart__tooltip\"\n label={label}\n payload={tooltipDataSource === \"segment\" ? payload : data}\n valueFormatter={valueFormatter}\n unit={unit}\n {...computedTooltipProps}\n />\n )}\n {...getTooltipProps()}\n />\n ) : null}\n </RechartsPieChart>\n </ResponsiveContainer>\n </ui.div>\n </ChartProvider>\n )\n})\n","import type { HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx, type Dict } from \"@yamada-ui/utils\"\nimport { useLegend } from \"./use-chart\"\n\ntype ChartLegendOptions = {\n payload?: Dict[]\n onHighlight: (area: string | null) => void\n}\n\nexport type ChartLegendProps = HTMLUIProps<\"div\"> & ChartLegendOptions\n\nexport const ChartLegend = forwardRef<ChartLegendProps, \"div\">(\n ({ className, payload = [], onHighlight, ...rest }, ref) => {\n const { styles } = useLegend()\n\n const items = payload.map(({ dataKey, value: valueProp, color }, index) => {\n const value = dataKey ?? valueProp\n\n return (\n <ui.div\n className=\"ui-chart__legend-item\"\n key={`legend-${index}`}\n onMouseEnter={() => onHighlight(value)}\n onMouseLeave={() => onHighlight(null)}\n __css={styles.legendItem}\n >\n <ui.div\n className=\"ui-chart__legend-swatch\"\n background={color}\n __css={styles.legendSwatch}\n />\n\n <ui.span className=\"ui-chart__legend-label\">{value}</ui.span>\n </ui.div>\n )\n })\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-chart__legend\", className)}\n __css={styles.legend}\n {...rest}\n >\n {items}\n </ui.div>\n )\n },\n)\n","import { useTheme, type CSSUIObject } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { createContext, cx } from \"@yamada-ui/utils\"\nimport { useCallback } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getComponentProps } from \"./chart-utils\"\nimport type { ChartPropGetter, ResponsiveContainerProps } from \"./chart.types\"\nimport { containerProperties } from \"./rechart-properties\"\n\ntype ChartContext = { styles: Record<string, CSSUIObject> }\n\nexport const [ChartProvider, useChartContext] = createContext<ChartContext>({\n name: \"ChartContext\",\n errorMessage: `useChartContext returned is 'undefined'. Seems you forgot to wrap the components in \"<LineChart />\" or \"<BarChart />\" etc.`,\n})\n\nexport type UseChartProps = {\n /**\n * Props passed down to recharts `ResponsiveContainer` component.\n */\n containerProps?: ResponsiveContainerProps\n}\n\nexport const useChart = ({ containerProps = {} }: UseChartProps) => {\n const { theme } = useTheme()\n const [reChartsProps, propClassName] = getComponentProps<Dict, string>([\n containerProps,\n containerProperties,\n ])(theme)\n\n const getContainerProps: ChartPropGetter<\n \"div\",\n Partial<Omit<Recharts.ResponsiveContainerProps, \"children\">>,\n Omit<Recharts.ResponsiveContainerProps, \"children\">\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(\"ui-chart__container\", className as string, propClassName),\n ...props,\n ...reChartsProps,\n }),\n [propClassName, reChartsProps],\n )\n\n return {\n getContainerProps,\n }\n}\n\nexport type UseChartReturn = ReturnType<typeof useChart>\n\nexport type UseLegendProps = {}\n\nexport const useLegend = ({}: UseLegendProps = {}) => {\n const { styles } = useChartContext()\n return {\n styles,\n }\n}\nexport type UseLegendReturn = ReturnType<typeof useLegend>\n\nexport type UseTooltipProps = {}\n\nexport const useTooltip = ({}: UseTooltipProps = {}) => {\n const { styles } = useChartContext()\n return {\n styles,\n }\n}\nexport type UseTooltipReturn = ReturnType<typeof useTooltip>\n","import type { StyledTheme } from \"@yamada-ui/core\"\nimport { getCSS } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport { cx, isString, splitObject } from \"@yamada-ui/utils\"\n\nexport const getClassName =\n (...styles: (Dict | string | undefined)[]) =>\n (theme: StyledTheme) =>\n cx(\n ...styles.map((style) =>\n isString(style) ? style : getCSS(style)(theme),\n ),\n )\n\nexport const getComponentProps =\n <T extends Dict, K extends keyof T>(\n [obj, keys]: [T, K[]],\n ...props: (Dict | string | undefined)[]\n ) =>\n <P extends boolean = false>(theme: StyledTheme, isContain?: P) => {\n const [pickedProps, omittedProps] = splitObject<T, K>(obj, keys)\n const className = getClassName(...props, omittedProps)(theme)\n\n return (\n !isContain ? [pickedProps, className] : { ...pickedProps, className }\n ) as P extends false\n ? [{ [P in K]: T[P] }, string]\n : { [P in K]: T[P] } & { className: string }\n }\n","import type { ComponentPropsWithoutRef } from \"react\"\nimport type * as Recharts from \"recharts\"\n\nexport const areaChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.AreaChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"stackOffset\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const barChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.BarChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"barCategoryGap\",\n \"barGap\",\n \"barSize\",\n \"maxBarSize\",\n \"stackOffset\",\n \"reverseStackOrder\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const lineChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.LineChart\n>)[] = [\n \"layout\",\n \"syncId\",\n \"syncMethod\",\n \"width\",\n \"height\",\n \"data\",\n \"margin\",\n \"onClick\",\n \"onMouseEnter\",\n \"onMouseMove\",\n \"onMouseLeave\",\n]\n\nexport const radarChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.RadarChart\n>)[] = [\n \"width\",\n \"height\",\n \"data\",\n \"cx\",\n \"cy\",\n \"startAngle\",\n \"endAngle\",\n \"innerRadius\",\n \"outerRadius\",\n \"margin\",\n \"onMouseEnter\",\n \"onClick\",\n]\n\nexport const pieChartProperties: (keyof ComponentPropsWithoutRef<\n typeof Recharts.PieChart\n>)[] = [\"width\", \"height\", \"margin\", \"onClick\", \"onMouseEnter\", \"onMouseLeave\"]\n\nexport const referenceLineProperties: (keyof Recharts.ReferenceLineProps)[] = [\n \"xAxisId\",\n \"yAxisId\",\n \"x\",\n \"y\",\n \"ifOverflow\",\n \"viewBox\",\n \"xAxis\",\n \"yAxis\",\n \"label\",\n \"isFront\",\n \"strokeWidth\",\n \"segment\",\n]\n\nexport const containerProperties: (keyof Omit<\n Recharts.ResponsiveContainerProps,\n \"children\"\n>)[] = [\n \"aspect\",\n \"width\",\n \"height\",\n \"minWidth\",\n \"minHeight\",\n \"debounce\",\n \"onResize\",\n]\n\nexport const gridProperties: (keyof Recharts.CartesianGridProps)[] = [\n \"x\",\n \"y\",\n \"width\",\n \"height\",\n \"horizontal\",\n \"vertical\",\n \"horizontalPoints\",\n \"horizontalCoordinatesGenerator\",\n \"verticalPoints\",\n \"verticalCoordinatesGenerator\",\n \"fill\",\n \"fillOpacity\",\n \"strokeDasharray\",\n]\n\nexport const xAxisProperties: (keyof Recharts.XAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"xAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"angle\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const yAxisProperties: (keyof Recharts.YAxisProps)[] = [\n \"hide\",\n \"dataKey\",\n \"yAxisId\",\n \"width\",\n \"height\",\n \"orientation\",\n \"type\",\n \"tickCount\",\n \"domain\",\n \"includeHidden\",\n \"interval\",\n \"padding\",\n \"minTickGap\",\n \"allowDecimals\",\n \"allowDataOverflow\",\n \"allowDuplicatedCategory\",\n \"axisLine\",\n \"tickLine\",\n \"tickSize\",\n \"tickFormatter\",\n \"ticks\",\n \"tick\",\n \"mirror\",\n \"reversed\",\n \"label\",\n \"scale\",\n \"unit\",\n \"name\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"tickMargin\",\n]\n\nexport const legendProperties: (keyof Omit<Recharts.LegendProps, \"ref\">)[] = [\n \"width\",\n \"height\",\n \"layout\",\n \"align\",\n \"verticalAlign\",\n \"iconSize\",\n \"iconType\",\n \"payload\",\n \"chartWidth\",\n \"chartHeight\",\n \"margin\",\n \"content\",\n \"formatter\",\n \"wrapperStyle\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const tooltipProperties: (keyof Recharts.TooltipProps<any, any>)[] = [\n \"offset\",\n \"filterNull\",\n \"itemStyle\",\n \"wrapperStyle\",\n \"contentStyle\",\n \"labelStyle\",\n \"cursor\",\n \"viewBox\",\n \"allowEscapeViewBox\",\n \"active\",\n \"position\",\n \"coordinate\",\n \"payload\",\n \"label\",\n \"content\",\n \"formatter\",\n \"labelFormatter\",\n \"itemSorter\",\n \"isAnimationActive\",\n \"animationDuration\",\n \"animationEasing\",\n]\n\nexport const areaProperties: (keyof Omit<Recharts.AreaProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"baseLine\",\n \"points\",\n \"stackId\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const barProperties: (keyof Omit<Recharts.BarProps, \"ref\">)[] = [\n \"layout\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"label\",\n \"data\",\n \"barSize\",\n \"maxBarSize\",\n \"minPointSize\",\n \"background\",\n \"shape\",\n \"activeBar\",\n \"stackId\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"radius\",\n]\n\nexport const radarProperties: (keyof Omit<Recharts.RadarProps, \"ref\">)[] = [\n \"dataKey\",\n \"points\",\n \"shape\",\n \"dot\",\n \"activeDot\",\n \"legendType\",\n \"label\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n]\n\nexport const lineProperties: (keyof Omit<Recharts.LineProps, \"ref\">)[] = [\n \"type\",\n \"dataKey\",\n \"xAxisId\",\n \"yAxisId\",\n \"legendType\",\n \"dot\",\n \"activeDot\",\n \"label\",\n \"hide\",\n \"points\",\n \"stroke\",\n \"strokeWidth\",\n \"layout\",\n \"connectNulls\",\n \"unit\",\n \"name\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"id\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"strokeDasharray\",\n]\n\nexport const pieProperties: (keyof Omit<Recharts.PieProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"startAngle\",\n \"endAngle\",\n \"minAngle\",\n \"paddingAngle\",\n \"nameKey\",\n \"dataKey\",\n \"legendType\",\n \"label\",\n \"labelLine\",\n \"data\",\n \"activeIndex\",\n \"activeShape\",\n \"inactiveShape\",\n \"isAnimationActive\",\n \"animationBegin\",\n \"animationDuration\",\n \"animationEasing\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const dotProperties: (keyof Omit<Recharts.DotProps, \"ref\">)[] = [\n \"cx\",\n \"cy\",\n \"r\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n]\n\nexport const polarGridProperties: (keyof Recharts.PolarGridProps)[] = [\n \"cx\",\n \"cy\",\n \"innerRadius\",\n \"outerRadius\",\n \"polarAngles\",\n \"polarRadius\",\n \"gridType\",\n]\n\nexport const polarAngleAxisProperties: (keyof Recharts.PolarAngleAxisProps)[] =\n [\n \"dataKey\",\n \"cx\",\n \"cy\",\n \"radius\",\n \"axisLine\",\n \"axisLineType\",\n \"tickLine\",\n \"tickSize\",\n \"tick\",\n \"ticks\",\n \"orient\",\n \"tickFormatter\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\n\nexport const polarRadiusAxisProperties: (keyof Recharts.PolarRadiusAxisProps)[] =\n [\n \"angle\",\n \"type\",\n \"allowDuplicatedCategory\",\n \"cx\",\n \"cy\",\n \"domain\",\n \"reversed\",\n \"label\",\n \"orientation\",\n \"axisLine\",\n \"tick\",\n \"tickSize\",\n \"tickFormatter\",\n \"tickCount\",\n \"scale\",\n \"onClick\",\n \"onMouseDown\",\n \"onMouseUp\",\n \"onMouseMove\",\n \"onMouseOver\",\n \"onMouseOut\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n ]\n\nexport const labelProperties: (keyof Recharts.LabelProps)[] = [\n \"viewBox\",\n \"formatter\",\n \"value\",\n \"position\",\n \"offset\",\n \"children\",\n \"content\",\n \"id\",\n]\n","import { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx, isArray, type Dict } from \"@yamada-ui/utils\"\nimport { useTooltip } from \"./use-chart\"\n\nexport type ChartTooltipProps = {\n label: string | undefined\n payload: Dict[] | undefined\n valueFormatter?: (value: number) => string\n unit?: string\n}\n\nexport const ChartTooltip = forwardRef<ChartTooltipProps, \"div\">(\n ({ label, className, payload = [], valueFormatter, unit, ...rest }, ref) => {\n const { styles } = useTooltip()\n\n const items = payload.map(\n ({ color: colorProp, name, value: valueProp, payload } = {}, index) => {\n const color = colorProp ?? payload?.color\n let value: string\n\n if (isArray(valueProp)) {\n value = valueProp\n .map((value) => {\n return `${valueFormatter?.(value) ?? value}`\n })\n .join(\" - \")\n } else {\n value = valueFormatter?.(valueProp) ?? valueProp\n }\n\n return (\n <ui.div\n className=\"ui-chart__tooltip-item\"\n key={`tooltip-payload-${index}`}\n __css={styles.tooltipItem}\n >\n <ui.div\n className=\"ui-chart__tooltip-swatch\"\n background={color}\n __css={styles.tooltipSwatch}\n />\n\n <ui.span\n className=\"ui-chart__tooltip-label\"\n __css={styles.tooltipLabel}\n >\n {name}\n </ui.span>\n\n <ui.span\n className=\"ui-chart__tooltip-value\"\n __css={styles.tooltipValue}\n >\n {value}\n {unit ? unit : \"\"}\n </ui.span>\n </ui.div>\n )\n },\n )\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-chart__tooltip\", className)}\n __css={styles.tooltip}\n {...rest}\n >\n {label ? (\n <ui.p className=\"ui-chart__tooltip-title\" __css={styles.tooltipTitle}>\n {label}\n </ui.p>\n ) : null}\n\n <ui.div className=\"ui-chart__tooltip-list\" __css={styles.tooltipList}>\n {items}\n </ui.div>\n </ui.div>\n )\n },\n)\n","import type { Dict } from \"@yamada-ui/utils\"\nimport { splitObject } from \"@yamada-ui/utils\"\nimport { useCallback } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport type { ChartPropGetter, LegendProps } from \"./chart.types\"\nimport { legendProperties } from \"./rechart-properties\"\n\nexport type UseChartLegendProps = {\n /**\n * Props passed down to recharts 'Legend' component.\n */\n legendProps?: LegendProps\n}\n\nexport const useChartLegend = ({\n legendProps: _legendProps = {},\n}: UseChartLegendProps) => {\n const [rest, legendProps] = splitObject<Dict, string>(\n _legendProps,\n legendProperties,\n )\n\n const getLegendProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.LegendProps>,\n Omit<Recharts.LegendProps, \"ref\">\n > = useCallback(\n (props, ref = null) => {\n return {\n ref,\n verticalAlign: \"top\",\n ...props,\n ...rest,\n }\n },\n [rest],\n )\n\n return { legendProps, getLegendProps }\n}\n","import { useTheme, type CSSUIObject } from \"@yamada-ui/core\"\nimport { splitObject, type Dict, cx } from \"@yamada-ui/utils\"\nimport { useCallback, useMemo } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getClassName } from \"./chart-utils\"\nimport type { ChartPropGetter, TooltipProps } from \"./chart.types\"\nimport { tooltipProperties } from \"./rechart-properties\"\n\nexport type UseChartTooltipOptions = {\n /**\n * Props passed down to recharts 'Tooltip' component.\n */\n tooltipProps?: TooltipProps\n /**\n * Specifies the duration of animation, the unit of this option is ms.\n *\n * @default 0\n */\n tooltipAnimationDuration?: number\n}\n\ntype UseChartTooltipProps = UseChartTooltipOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const useChartTooltip = ({\n tooltipProps: _tooltipProps = {},\n tooltipAnimationDuration = 0,\n styles,\n}: UseChartTooltipProps) => {\n const { theme } = useTheme()\n const { cursor, ...rest } = _tooltipProps\n const cursorClassName = useMemo(\n () => getClassName({ ...styles.cursor, ...cursor })(theme),\n [cursor, styles.cursor, theme],\n )\n\n const [tooltipProps, tooltipUIProps] = splitObject<Dict, string>(\n rest,\n tooltipProperties,\n )\n\n const getTooltipProps: ChartPropGetter<\n \"div\",\n Partial<Recharts.TooltipProps<any, any>>,\n Omit<Recharts.TooltipProps<any, any>, \"ref\">\n > = useCallback(\n (props, ref = null) => ({\n ref,\n animationDuration: tooltipAnimationDuration,\n isAnimationActive: (tooltipAnimationDuration || 0) > 0,\n cursor: {\n className: cx(\"ui-chart__cursor\", cursorClassName),\n },\n ...props,\n ...tooltipProps,\n }),\n [cursorClassName, tooltipAnimationDuration, tooltipProps],\n )\n\n return { tooltipProps: tooltipUIProps, getTooltipProps }\n}\n","import { useTheme, type CSSUIObject, type CSSUIProps } from \"@yamada-ui/core\"\nimport { cx, type Dict } from \"@yamada-ui/utils\"\nimport type { ComponentPropsWithoutRef } from \"react\"\nimport { useCallback, useMemo, useState } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport { getClassName, getComponentProps } from \"./chart-utils\"\nimport type {\n CellProps,\n ChartPropGetter,\n PieChartProps,\n PieProps,\n RequiredChartPropGetter,\n} from \"./chart.types\"\nimport { pieChartProperties, pieProperties } from \"./rechart-properties\"\n\nexport type UsePieChartOptions = {\n /**\n * Chart data.\n */\n data: CellProps[]\n /**\n * Props passed down to recharts `PieChart` component.\n */\n chartProps?: PieChartProps\n /**\n * Props for the pie.\n */\n pieProps?: Partial<PieProps>\n /**\n * Props for the cell.\n */\n cellProps?: Partial<CellProps>\n /**\n * Determines whether each segment should have associated label.\n *\n * @default false\n */\n withLabels?: boolean\n /**\n * Determines whether segments labels should have lines that connect the segment with the label.\n *\n * @default false\n */\n withLabelLines?: boolean\n /**\n * Controls innerRadius of the chart segments.\n * If it is a number, it is the width of the radius.\n * For example, `60` means the radius is `60px` and the diameter is `120px`.\n *\n * @default '0%'\n */\n innerRadius?: number | string\n /**\n * Controls thickness of the chart segments. If it is a number, it is calculated as px.\n * If it is a number, it is the width of the radius.\n * For example, `60` means the radius is `60px` and the diameter is `120px`.\n *\n * @default '80%'\n */\n outerRadius?: number | string\n /**\n * Controls padding between segments.\n *\n * @default 0\n */\n paddingAngle?: number\n /**\n * Stroke width for the chart pies.\n *\n * @default 1\n */\n strokeWidth?: number\n /**\n * Controls angle at which chart starts.\n *\n * @default 90\n */\n startAngle?: number\n /**\n * Controls angle at which chart ends.\n *\n * @default -270\n */\n endAngle?: number\n /**\n * Controls fill opacity of all pies.\n *\n * @default 1\n */\n fillOpacity?: number | [number, number]\n /**\n * A function to format values inside the tooltip.\n */\n valueFormatter?: (value: number) => string\n}\n\ntype UsePieChartProps = UsePieChartOptions & {\n styles: Dict<CSSUIObject>\n}\n\nexport const usePieChart = ({\n data,\n withLabels = false,\n withLabelLines = false,\n strokeWidth = 1,\n fillOpacity = 1,\n innerRadius = \"0%\",\n outerRadius = withLabels ? \"80%\" : \"100%\",\n paddingAngle = 0,\n startAngle = 90,\n endAngle = -270,\n styles,\n ...rest\n}: UsePieChartProps) => {\n const { theme } = useTheme()\n const [highlightedArea, setHighlightedArea] = useState<string | null>(null)\n const shouldHighlight = highlightedArea !== null\n const { dimCell, ...computedCellProps } = rest.cellProps ?? {}\n const {\n activeShape = {},\n inactiveShape = {},\n label,\n labelLine,\n ...computedPieProps\n } = rest.pieProps ?? {}\n\n const cellColors: CSSUIProps[\"var\"] = useMemo(\n () =>\n data.map(({ color }, index) => ({\n __prefix: \"ui\",\n name: `cell-${index}`,\n token: \"colors\",\n value: color ?? \"transparent\",\n })),\n [data],\n )\n\n const pieVars: CSSUIProps[\"var\"] = useMemo(\n () =>\n [\n ...cellColors,\n { __prefix: \"ui\", name: \"fill-opacity\", value: fillOpacity },\n ] as Required<CSSUIProps>[\"var\"],\n [fillOpacity, cellColors],\n )\n\n const [chartProps, chartClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [rest.chartProps ?? {}, pieChartProperties],\n styles.chart,\n )(theme),\n [rest.chartProps, styles.chart, theme],\n )\n\n const [pieProps, pieClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [computedPieProps, pieProperties],\n styles.pie,\n )(theme),\n [computedPieProps, styles.pie, theme],\n )\n\n const cellClassName = useMemo(() => {\n const resolvedCellProps = {\n fillOpacity: \"var(--ui-fill-opacity)\",\n ...styles.cell,\n ...computedCellProps,\n }\n\n return getClassName(resolvedCellProps)(theme)\n }, [computedCellProps, styles.cell, theme])\n\n const dimCellClassName = useMemo(() => {\n const resolvedDimCell = { ...styles.dimCell, ...dimCell }\n\n return getClassName(resolvedDimCell)(theme)\n }, [dimCell, styles.dimCell, theme])\n\n const activeShapeProps = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [activeShape, pieProperties],\n styles.activeShape,\n )(theme, true),\n [activeShape, styles.activeShape, theme],\n )\n\n const inactiveShapeProps = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [inactiveShape, pieProperties],\n styles.inactiveShape,\n )(theme, true),\n [inactiveShape, styles.inactiveShape, theme],\n )\n\n const labelClassName = useMemo(\n () => getClassName({ ...styles.label, ...label })(theme),\n [label, styles.label, theme],\n )\n\n const labelLineClassName = useMemo(\n () => getClassName({ ...styles.labelLine, ...labelLine })(theme),\n [labelLine, styles.labelLine, theme],\n )\n\n const cellPropList = useMemo(\n () =>\n data.map((props, index) => {\n const { name, dimCell = {}, ...computedProps } = props\n const color = `var(--ui-cell-${index})`\n const dimmed = shouldHighlight && highlightedArea !== name\n const resolvedProps = {\n ...computedProps,\n ...(dimmed ? dimCell : {}),\n }\n\n const className = getClassName(\n {\n cellClassName,\n ...resolvedProps,\n },\n dimmed ? dimCellClassName : undefined,\n )(theme)\n\n return {\n color,\n className,\n }\n }),\n [\n cellClassName,\n data,\n dimCellClassName,\n highlightedArea,\n shouldHighlight,\n theme,\n ],\n )\n\n const getPieChartProps: ChartPropGetter<\n \"div\",\n ComponentPropsWithoutRef<typeof Recharts.PieChart>,\n ComponentPropsWithoutRef<typeof Recharts.PieChart>\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(className, chartClassName),\n ...props,\n ...chartProps,\n }),\n [chartProps, chartClassName],\n )\n\n const getPieProps: RequiredChartPropGetter<\n \"div\",\n Partial<Recharts.PieProps> & {\n labelClassName: string\n labelLineClassName: string\n },\n Omit<Recharts.PieProps, \"ref\">\n > = useCallback(\n (\n {\n className,\n labelClassName: labelClassNameProp,\n labelLineClassName: labelLineClassNameProp,\n ...props\n },\n ref = null,\n ) => ({\n ref,\n className: cx(className, pieClassName),\n dataKey: \"value\",\n data,\n rootTabIndex: -1,\n outerRadius,\n innerRadius,\n paddingAngle,\n startAngle,\n endAngle,\n isAnimationActive: false,\n label: withLabels\n ? { className: cx(labelClassNameProp, labelClassName) }\n : false,\n labelLine: withLabelLines\n ? { className: cx(labelLineClassNameProp, labelLineClassName) }\n : false,\n activeShape: activeShapeProps,\n inactiveShape: inactiveShapeProps,\n ...(props as Omit<Recharts.PieProps, \"dataKey\">),\n ...pieProps,\n }),\n [\n pieClassName,\n data,\n outerRadius,\n innerRadius,\n paddingAngle,\n startAngle,\n endAngle,\n withLabels,\n labelClassName,\n withLabelLines,\n labelLineClassName,\n activeShapeProps,\n inactiveShapeProps,\n pieProps,\n ],\n )\n\n const getCellProps: RequiredChartPropGetter<\n \"div\",\n Omit<Recharts.CellProps, \"ref\"> & { index: number },\n Omit<Recharts.CellProps, \"ref\">\n > = useCallback(\n ({ index, className: classNameProp, ...props }, ref = null) => {\n const { className, color } = cellPropList[index]\n\n return {\n ref,\n className: cx(classNameProp, className),\n fill: color,\n stroke: color,\n strokeWidth,\n ...(props as Recharts.CellProps),\n }\n },\n [cellPropList, strokeWidth],\n )\n\n return {\n pieVars,\n getPieProps,\n getPieChartProps,\n getCellProps,\n setHighlightedArea,\n }\n}\n\nexport type UsePieChartReturn = ReturnType<typeof usePieChart>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,eAKO;AACP,IAAAC,gBAAmB;AACnB,IAAAC,gBAAwB;AACxB,sBAOO;;;ACdP,IAAAC,eAA+B;AAC/B,IAAAC,gBAA8B;;;ACF9B,IAAAC,eAA2C;AAE3C,IAAAC,gBAAkC;AAClC,mBAA4B;;;ACF5B,kBAAuB;AAEvB,mBAA0C;AAEnC,IAAM,eACX,IAAI,WACJ,CAAC,cACC;AAAA,EACE,GAAG,OAAO;AAAA,IAAI,CAAC,cACb,uBAAS,KAAK,IAAI,YAAQ,oBAAO,KAAK,EAAE,KAAK;AAAA,EAC/C;AACF;AAEG,IAAM,oBACX,CACE,CAAC,KAAK,IAAI,MACP,UAEL,CAA4B,OAAoB,cAAkB;AAChE,QAAM,CAAC,aAAa,YAAY,QAAI,0BAAkB,KAAK,IAAI;AAC/D,QAAM,YAAY,aAAa,GAAG,OAAO,YAAY,EAAE,KAAK;AAE5D,SACE,CAAC,YAAY,CAAC,aAAa,SAAS,IAAI,EAAE,GAAG,aAAa,UAAU;AAIxE;;;AC+CK,IAAM,qBAEN,CAAC,SAAS,UAAU,UAAU,WAAW,gBAAgB,cAAc;AAiBvE,IAAM,sBAGN;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAmGO,IAAM,mBAAgE;AAAA,EAC3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A,eAAW,kBAAG,kBAAkB,SAAS;AAAA,MACzC,KAAK;AAAA,MACL,OAAO,EAAE,GAAG,OAAO,UAAU;AAAA,MAC5B,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACE,GAAG,kBAAkB,EAAE,WAAW,4BAA4B,CAAC;AAAA,UAEhE;AAAA,YAAC,gBAAAC;AAAA,YAAA;AAAA,cACE,GAAG,iBAAiB,EAAE,WAAW,wBAAwB,CAAC;AAAA,cAE3D;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACE,GAAG,YAAY;AAAA,sBACd,WAAW;AAAA,sBACX,gBAAgB;AAAA,sBAChB,oBAAoB;AAAA,oBACtB,CAAC;AAAA,oBAEA;AAAA;AAAA,gBACH;AAAA,gBAEC,aACC;AAAA,kBAAC;AAAA;AAAA,oBACC,SAAS,CAAC,EAAE,QAAQ,MAClB;AAAA,sBAAC;AAAA;AAAA,wBACC,WAAU;AAAA,wBACV;AAAA,wBACA,aAAa;AAAA,wBACZ,GAAG;AAAA;AAAA,oBACN;AAAA,oBAED,GAAG,eAAe;AAAA;AAAA,gBACrB,IACE;AAAA,gBAEH,cACC;AAAA,kBAAC;AAAA;AAAA,oBACC,SAAS,CAAC,EAAE,OAAO,QAAQ,MACzB;AAAA,sBAAC;AAAA;AAAA,wBACC,WAAU;AAAA,wBACV;AAAA,wBACA,SAAS,sBAAsB,YAAY,UAAU;AAAA,wBACrD;AAAA,wBACA;AAAA,wBACC,GAAG;AAAA;AAAA,oBACN;AAAA,oBAED,GAAG,gBAAgB;AAAA;AAAA,gBACtB,IACE;AAAA;AAAA;AAAA,UACN;AAAA;AAAA,MACF;AAAA;AAAA,EACF,GACF;AAEJ,CAAC;","names":["import_core","import_utils","import_react","import_core","import_utils","import_core","import_utils","import_core","import_utils","import_jsx_runtime","payload","value","_a","import_utils","import_react","import_core","import_utils","import_react","import_core","import_utils","import_react","_a","dimCell","import_jsx_runtime","RechartsPieChart"]}
@@ -1,14 +1,14 @@
1
1
  "use client"
2
2
  import {
3
3
  DonutChart
4
- } from "./chunk-K6OJ62SA.mjs";
5
- import "./chunk-MFYRHF3O.mjs";
6
- import "./chunk-LM2DQK2P.mjs";
7
- import "./chunk-RN6PXJAD.mjs";
8
- import "./chunk-NEGDEVRX.mjs";
9
- import "./chunk-LBC2B6UX.mjs";
10
- import "./chunk-XIFDRM7J.mjs";
11
- import "./chunk-OSNFBRHL.mjs";
4
+ } from "./chunk-P4MMHTAP.mjs";
5
+ import "./chunk-YGKNNA34.mjs";
6
+ import "./chunk-5Q6O726L.mjs";
7
+ import "./chunk-UK6B6KJ7.mjs";
8
+ import "./chunk-DGOXJ373.mjs";
9
+ import "./chunk-PSJKBKOF.mjs";
10
+ import "./chunk-STBYN5JW.mjs";
11
+ import "./chunk-F34FV5DY.mjs";
12
12
  import "./chunk-QL3DB7OJ.mjs";
13
13
  export {
14
14
  DonutChart