{"version":3,"sources":["../src/use-area-chart.ts"],"sourcesContent":["import type {\n  CSSUIObject,\n  CSSUIProps,\n  PropGetter,\n  RequiredPropGetter,\n} from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport type { ComponentPropsWithoutRef } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport type { AreaGradientProps } from \"./area-chart-gradient\"\nimport type { AreaSplitProps } from \"./area-chart-split\"\nimport type {\n  AreaChartProps,\n  AreaChartType,\n  AreaProps,\n  ChartCurveType,\n  ChartLayoutType,\n  ReferenceLineProps,\n} from \"./chart.types\"\nimport { getVar, useTheme } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useCallback, useId, useMemo, useState } from \"react\"\nimport { getComponentProps } from \"./chart-utils\"\nimport {\n  areaChartProperties,\n  areaProperties,\n  dotProperties,\n} from \"./rechart-properties\"\n\nexport interface UseAreaChartOptions {\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: AreaProps[]\n  /**\n   * Controls how chart areas are positioned relative to each other.\n   *\n   * @default `default`\n   */\n  type?: AreaChartType\n  /**\n   * Determines whether points with `null` values should be connected.\n   *\n   * @default true\n   */\n  connectNulls?: boolean\n  /**\n   * Type of the curve.\n   *\n   * @default `monotone`\n   */\n  curveType?: ChartCurveType\n  /**\n   * Controls fill opacity of all areas.\n   *\n   * @default 0.4\n   */\n  fillOpacity?: [number, number] | number\n  /**\n   * Chart orientation.\n   *\n   * @default 'horizontal'\n   */\n  layoutType?: ChartLayoutType\n  /**\n   * A tuple of colors used when `type=\"split\"` is set, ignored in all other cases.\n   *\n   * @default '[\"red.400\", \"green.400\"]'\n   */\n  splitColors?: [string, string]\n  /**\n   * Offset for the split gradient. By default, value is inferred from `data` and `series` if possible.\n   * Must be generated from the data array with `getSplitOffset` function.\n   */\n  splitOffset?: number\n  /**\n   * Stroke width for the chart areas.\n   *\n   * @default 2\n   */\n  strokeWidth?: number\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   * Determines whether activeDots should be displayed.\n   *\n   * @default true\n   */\n  withActiveDots?: boolean\n  /**\n   * Determines whether dots should be displayed.\n   *\n   * @default true\n   */\n  withDots?: boolean\n  /**\n   * Determines whether the chart area should be represented with a gradient instead of the solid color.\n   */\n  withGradient?: boolean\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 for the areas.\n   */\n  areaProps?: Partial<AreaProps>\n  /**\n   * Props passed down to recharts `AreaChart` component.\n   */\n  chartProps?: AreaChartProps\n  /**\n   * Reference lines that should be displayed on the chart.\n   */\n  referenceLineProps?: ReferenceLineProps[]\n}\n\ninterface UseAreaChartProps extends UseAreaChartOptions {\n  styles: Dict<CSSUIObject | undefined>\n}\n\nexport const useAreaChart = ({\n  type,\n  connectNulls = true,\n  curveType = \"monotone\",\n  data,\n  fillOpacity = 0.4,\n  layoutType = \"horizontal\",\n  series,\n  splitColors = [\"#ee6a5d\", \"#5fce7d\"],\n  splitOffset,\n  strokeWidth = 2,\n  styles,\n  syncId,\n  withActiveDots = true,\n  withDots = true,\n  withGradient: withGradientProp,\n  xAxisLabel,\n  yAxisLabel,\n  referenceLineProps,\n  ...rest\n}: UseAreaChartProps) => {\n  const uuid = useId()\n  const { theme } = useTheme()\n  const [highlightedArea, setHighlightedArea] = useState<null | string>(null)\n  const splitId = `${uuid}-split`\n  const stacked = type === \"stacked\" || type === \"percent\"\n  const withGradient =\n    typeof withGradientProp === \"boolean\"\n      ? withGradientProp\n      : type === \"default\"\n  const shouldHighlight = highlightedArea !== null\n  const {\n    activeDot = {},\n    dimArea,\n    dimDot,\n    dot = {},\n    ...computedAreaProps\n  } = rest.areaProps ?? {}\n\n  const areaColors: CSSUIProps[\"vars\"] = useMemo(\n    () =>\n      series.map(({ color }, index) => ({\n        name: `area-${index}`,\n        token: \"colors\",\n        value: color ?? \"transparent\",\n      })),\n    [series],\n  )\n\n  const areaSplitColors: CSSUIProps[\"vars\"] = useMemo(\n    () =>\n      splitColors.map((color, index) => ({\n        name: `area-split-${index}`,\n        token: \"colors\",\n        value: color || \"transparent\",\n      })),\n    [splitColors],\n  )\n\n  const referenceLineColors: CSSUIProps[\"vars\"] = useMemo(\n    () =>\n      referenceLineProps\n        ? referenceLineProps.map(({ color }, index) => ({\n            name: `reference-line-${index}`,\n            token: \"colors\",\n            value: color ?? \"transparent\",\n          }))\n        : [],\n    [referenceLineProps],\n  )\n\n  const areaVars: CSSUIProps[\"vars\"] = useMemo(() => {\n    return [\n      ...areaColors,\n      ...areaSplitColors,\n      ...referenceLineColors,\n      { name: \"fill-opacity\", value: fillOpacity },\n    ]\n  }, [areaColors, areaSplitColors, referenceLineColors, fillOpacity])\n  const fillOpacityVar = useMemo(() => getVar(\"fill-opacity\")(theme), [theme])\n\n  const [chartProps, areaChartClassName] = useMemo(\n    () =>\n      getComponentProps<Dict, string>(\n        [rest.chartProps ?? {}, areaChartProperties],\n        styles.chart,\n      )(theme),\n    [rest.chartProps, styles.chart, theme],\n  )\n\n  const [areaProps, areaClassName] = useMemo(() => {\n    const resolvedAreaProps = {\n      fillOpacity: 1,\n      strokeOpacity: 1,\n      ...computedAreaProps,\n    }\n\n    return getComponentProps<Dict, string>(\n      [resolvedAreaProps, areaProperties],\n      styles.area,\n    )(theme)\n  }, [computedAreaProps, styles.area, theme])\n\n  const [dimAreaProps, dimAreaClassName] = useMemo(() => {\n    const resolvedDimArea = {\n      fillOpacity: 0,\n      strokeOpacity: 0.3,\n      ...dimArea,\n    }\n\n    return getComponentProps<Dict, string>([resolvedDimArea, areaProperties])(\n      theme,\n    )\n  }, [dimArea, theme])\n\n  const [dotProps, dotClassName] = useMemo(() => {\n    const resolvedDot = { fillOpacity: 1, strokeWidth: 2, ...dot }\n\n    return getComponentProps<Dict, string>(\n      [resolvedDot, dotProperties],\n      styles.dot,\n    )(theme)\n  }, [dot, styles.dot, theme])\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    const resolvedDimDot = { fillOpacity: 0, strokeOpacity: 0, ...dimDot }\n    return getComponentProps<Dict, string>([resolvedDimDot, dotProperties])(\n      theme,\n    )\n  }, [dimDot, theme])\n\n  const defaultSplitOffset = useMemo(() => {\n    if (series.length === 1) {\n      const dataKey = series[0]?.dataKey as string\n\n      if (dataKey) {\n        const dataMax = Math.max(...data.map((item) => item[dataKey]))\n        const dataMin = Math.min(...data.map((item) => item[dataKey]))\n\n        if (dataMax <= 0) return 0\n        if (dataMin >= 0) return 1\n\n        return dataMax / (dataMax - dataMin)\n      }\n    }\n\n    return 0.5\n  }, [data, series])\n\n  const areaPropsList = useMemo(\n    () =>\n      series.map((props, index) => {\n        const {\n          activeDot = {},\n          dataKey,\n          dimArea = {},\n          dimDot = {},\n          dot = {},\n          strokeDasharray,\n          ...computedProps\n        } = props\n        const id = `${uuid}-${dataKey}`\n        const color = getVar(`area-${index}`)(theme)\n        const dimmed = shouldHighlight && highlightedArea !== dataKey\n        const computedDimArea = { ...dimAreaProps, ...dimArea }\n\n        const resolvedProps = {\n          ...areaProps,\n          ...computedProps,\n          ...(dimmed ? computedDimArea : {}),\n        }\n        const rest = getComponentProps<Dict, string>(\n          [resolvedProps, areaProperties],\n          areaClassName,\n          dimmed ? dimAreaClassName : undefined,\n        )(theme, true)\n\n        let resolvedActiveDot: boolean | Recharts.DotProps\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-area-chart__active-dot\", className),\n            r: 4,\n            stroke: color,\n            ...rest,\n          } as Recharts.DotProps\n        } else {\n          resolvedActiveDot = false\n        }\n\n        let resolvedDot: boolean | Recharts.DotProps\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-area-chart__dot\", className),\n            fill: color,\n            r: 4,\n            ...rest,\n          } as Recharts.DotProps\n        } else {\n          resolvedDot = false\n        }\n\n        return {\n          ...rest,\n          id,\n          activeDot: resolvedActiveDot,\n          color,\n          dataKey,\n          dot: resolvedDot,\n          strokeDasharray,\n        }\n      }),\n    [\n      series,\n      uuid,\n      shouldHighlight,\n      highlightedArea,\n      dimAreaProps,\n      dimDotProps,\n      areaProps,\n      areaClassName,\n      dimAreaClassName,\n      theme,\n      withActiveDots,\n      withDots,\n      activeDotProps,\n      activeDotClassName,\n      dotProps,\n      dotClassName,\n      dimDotClassName,\n    ],\n  )\n\n  const getAreaChartProps: RequiredPropGetter<\n    ComponentPropsWithoutRef<typeof Recharts.AreaChart>,\n    ComponentPropsWithoutRef<typeof Recharts.AreaChart>\n  > = useCallback(\n    ({ className, ...props } = {}, ref = null) => ({\n      ref,\n      className: cx(className, areaChartClassName),\n      data,\n      layout: layoutType,\n      margin: {\n        bottom: xAxisLabel ? 30 : undefined,\n        left: yAxisLabel ? 10 : undefined,\n        right: yAxisLabel ? 5 : undefined,\n      },\n      stackOffset: type === \"percent\" ? \"expand\" : undefined,\n      syncId,\n      ...props,\n      ...chartProps,\n    }),\n    [\n      areaChartClassName,\n      data,\n      type,\n      layoutType,\n      syncId,\n      xAxisLabel,\n      yAxisLabel,\n      chartProps,\n    ],\n  )\n\n  const getAreaSplitProps: PropGetter<\n    Partial<AreaSplitProps>,\n    AreaSplitProps\n  > = useCallback(\n    (props = {}) => ({\n      id: splitId,\n      fillOpacity: fillOpacityVar,\n      offset: splitOffset ?? defaultSplitOffset,\n      ...props,\n    }),\n    [defaultSplitOffset, splitId, splitOffset, fillOpacityVar],\n  )\n\n  const getAreaProps: RequiredPropGetter<\n    { index: number } & Partial<Recharts.AreaProps>,\n    Omit<Recharts.AreaProps, \"ref\">\n  > = useCallback(\n    ({ className: classNameProp, index, ...props }, ref = null) => {\n      const {\n        id,\n        className,\n        activeDot,\n        color,\n        dataKey = \"\",\n        dot,\n        strokeDasharray,\n        ...rest\n      } = areaPropsList[index] ?? {}\n\n      return {\n        id,\n        ref,\n        type: curveType,\n        name: dataKey as string,\n        className: cx(classNameProp, className),\n        activeDot,\n        connectNulls,\n        dataKey,\n        dot,\n        fill: type === \"split\" ? `url(#${splitId})` : `url(#${id})`,\n        isAnimationActive: false,\n        stackId: stacked ? \"stack\" : undefined,\n        stroke: color,\n        strokeDasharray,\n        strokeWidth,\n        ...(props as Omit<Recharts.AreaProps, \"dataKey\">),\n        ...rest,\n      }\n    },\n    [\n      areaPropsList,\n      connectNulls,\n      curveType,\n      splitId,\n      stacked,\n      strokeWidth,\n      type,\n    ],\n  )\n\n  const getAreaGradientProps: PropGetter<\n    Partial<AreaGradientProps>,\n    AreaGradientProps\n  > = useCallback(\n    (props = {}) => ({\n      fillOpacity: fillOpacityVar,\n      withGradient,\n      ...props,\n    }),\n    [withGradient, fillOpacityVar],\n  )\n\n  return {\n    areaVars,\n    setHighlightedArea,\n    getAreaChartProps,\n    getAreaGradientProps,\n    getAreaProps,\n    getAreaSplitProps,\n  }\n}\n\nexport type UseAreaChartReturn = ReturnType<typeof useAreaChart>\n"],"mappings":";;;;;;;;;;;AAmBA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,UAAU;AACnB,SAAS,aAAa,OAAO,SAAS,gBAAgB;AA+G/C,IAAM,eAAe,CAAC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