@lobehub/charts 5.7.0 → 5.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/AccuracyBarChart/index.d.mts +62 -0
- package/es/AccuracyBarChart/index.mjs +326 -0
- package/es/AccuracyBarChart/index.mjs.map +1 -0
- package/es/AccuracyBarChart/styles.d.mts +14 -0
- package/es/AccuracyBarChart/styles.mjs +71 -0
- package/es/AccuracyBarChart/styles.mjs.map +1 -0
- package/es/AreaChart/index.d.mts +13 -0
- package/es/AreaChart/index.mjs +308 -0
- package/es/AreaChart/index.mjs.map +1 -0
- package/es/AreaChart/styles.d.mts +9 -0
- package/es/AreaChart/styles.mjs +28 -0
- package/es/AreaChart/styles.mjs.map +1 -0
- package/es/BarChart/index.d.mts +11 -0
- package/es/BarChart/index.mjs +290 -0
- package/es/BarChart/index.mjs.map +1 -0
- package/es/BarChart/{renderShape.d.ts → renderShape.d.mts} +3 -1
- package/es/BarChart/renderShape.mjs +28 -0
- package/es/BarChart/renderShape.mjs.map +1 -0
- package/es/BarChart/styles.d.mts +9 -0
- package/es/BarChart/styles.mjs +28 -0
- package/es/BarChart/styles.mjs.map +1 -0
- package/es/BarList/index.d.mts +32 -0
- package/es/BarList/index.mjs +128 -0
- package/es/BarList/index.mjs.map +1 -0
- package/es/BarList/styles.d.mts +13 -0
- package/es/BarList/styles.mjs +63 -0
- package/es/BarList/styles.mjs.map +1 -0
- package/es/BenchmarkColumnChart/index.d.mts +144 -0
- package/es/BenchmarkColumnChart/index.mjs +514 -0
- package/es/BenchmarkColumnChart/index.mjs.map +1 -0
- package/es/BenchmarkColumnChart/styles.d.mts +19 -0
- package/es/BenchmarkColumnChart/styles.mjs +129 -0
- package/es/BenchmarkColumnChart/styles.mjs.map +1 -0
- package/es/BenchmarkRankingChart/index.d.mts +91 -0
- package/es/BenchmarkRankingChart/index.mjs +347 -0
- package/es/BenchmarkRankingChart/index.mjs.map +1 -0
- package/es/BenchmarkRankingChart/styles.d.mts +36 -0
- package/es/BenchmarkRankingChart/styles.mjs +265 -0
- package/es/BenchmarkRankingChart/styles.mjs.map +1 -0
- package/es/BenchmarkScatterChart/index.d.mts +148 -0
- package/es/BenchmarkScatterChart/index.mjs +668 -0
- package/es/BenchmarkScatterChart/index.mjs.map +1 -0
- package/es/BenchmarkScatterChart/styles.d.mts +28 -0
- package/es/BenchmarkScatterChart/styles.mjs +193 -0
- package/es/BenchmarkScatterChart/styles.mjs.map +1 -0
- package/es/BenchmarkScatterChart/{utils.d.ts → utils.d.mts} +32 -29
- package/es/BenchmarkScatterChart/utils.mjs +214 -0
- package/es/BenchmarkScatterChart/utils.mjs.map +1 -0
- package/es/ComposedChart/index.d.mts +6 -0
- package/es/ComposedChart/index.mjs +254 -0
- package/es/ComposedChart/index.mjs.map +1 -0
- package/es/ComposedChart/styles.d.mts +9 -0
- package/es/ComposedChart/styles.mjs +28 -0
- package/es/ComposedChart/styles.mjs.map +1 -0
- package/es/ComposedChart/types.d.mts +71 -0
- package/es/ComposedChart/types.mjs +0 -0
- package/es/DataBars/CategoryBar.d.mts +17 -0
- package/es/DataBars/CategoryBar.mjs +146 -0
- package/es/DataBars/CategoryBar.mjs.map +1 -0
- package/es/DataBars/DeltaBar.d.mts +16 -0
- package/es/DataBars/DeltaBar.mjs +102 -0
- package/es/DataBars/DeltaBar.mjs.map +1 -0
- package/es/DataBars/MarkerBar.d.mts +19 -0
- package/es/DataBars/MarkerBar.mjs +74 -0
- package/es/DataBars/MarkerBar.mjs.map +1 -0
- package/es/DataBars/ProgressBar.d.mts +15 -0
- package/es/DataBars/ProgressBar.mjs +53 -0
- package/es/DataBars/ProgressBar.mjs.map +1 -0
- package/es/DataBars/index.d.mts +5 -0
- package/es/DataBars/index.mjs +5 -0
- package/es/DataBars/styles.d.mts +10 -0
- package/es/DataBars/styles.mjs +31 -0
- package/es/DataBars/styles.mjs.map +1 -0
- package/es/DonutChart/DonutChartTooltip.d.mts +14 -0
- package/es/DonutChart/DonutChartTooltip.mjs +25 -0
- package/es/DonutChart/DonutChartTooltip.mjs.map +1 -0
- package/es/DonutChart/index.d.mts +33 -0
- package/es/DonutChart/index.mjs +160 -0
- package/es/DonutChart/index.mjs.map +1 -0
- package/es/DonutChart/inputParser.d.mts +5 -0
- package/es/DonutChart/inputParser.mjs +8 -0
- package/es/DonutChart/inputParser.mjs.map +1 -0
- package/es/DonutChart/renderInactiveShape.d.mts +4 -0
- package/es/DonutChart/renderInactiveShape.mjs +22 -0
- package/es/DonutChart/renderInactiveShape.mjs.map +1 -0
- package/es/DonutChart/styles.d.mts +9 -0
- package/es/DonutChart/styles.mjs +28 -0
- package/es/DonutChart/styles.mjs.map +1 -0
- package/es/FunnelChart/ArrowRightIcon.d.mts +8 -0
- package/es/FunnelChart/ArrowRightIcon.mjs +14 -0
- package/es/FunnelChart/ArrowRightIcon.mjs.map +1 -0
- package/es/FunnelChart/index.d.mts +21 -0
- package/es/FunnelChart/index.mjs +421 -0
- package/es/FunnelChart/index.mjs.map +1 -0
- package/es/FunnelChart/styles.d.mts +9 -0
- package/es/FunnelChart/styles.mjs +28 -0
- package/es/FunnelChart/styles.mjs.map +1 -0
- package/es/FunnelChart/types.d.mts +31 -0
- package/es/FunnelChart/types.mjs +0 -0
- package/es/Heatmaps/Calendar.d.mts +21 -0
- package/es/Heatmaps/Calendar.mjs +108 -0
- package/es/Heatmaps/Calendar.mjs.map +1 -0
- package/es/Heatmaps/ChartLabels.d.mts +17 -0
- package/es/Heatmaps/ChartLabels.mjs +84 -0
- package/es/Heatmaps/ChartLabels.mjs.map +1 -0
- package/es/Heatmaps/Footer.d.mts +24 -0
- package/es/Heatmaps/Footer.mjs +81 -0
- package/es/Heatmaps/Footer.mjs.map +1 -0
- package/es/Heatmaps/index.d.mts +31 -0
- package/es/Heatmaps/index.mjs +188 -0
- package/es/Heatmaps/index.mjs.map +1 -0
- package/es/Heatmaps/styles.d.mts +10 -0
- package/es/Heatmaps/styles.mjs +47 -0
- package/es/Heatmaps/styles.mjs.map +1 -0
- package/es/Legend/LegendItem.d.mts +12 -0
- package/es/Legend/LegendItem.mjs +65 -0
- package/es/Legend/LegendItem.mjs.map +1 -0
- package/es/Legend/ScrollButton.d.mts +11 -0
- package/es/Legend/ScrollButton.mjs +50 -0
- package/es/Legend/ScrollButton.mjs.map +1 -0
- package/es/Legend/index.d.mts +16 -0
- package/es/Legend/index.mjs +152 -0
- package/es/Legend/index.mjs.map +1 -0
- package/es/LineChart/index.d.mts +11 -0
- package/es/LineChart/index.mjs +271 -0
- package/es/LineChart/index.mjs.map +1 -0
- package/es/LineChart/styles.d.mts +9 -0
- package/es/LineChart/styles.mjs +28 -0
- package/es/LineChart/styles.mjs.map +1 -0
- package/es/RadarChart/index.d.mts +27 -0
- package/es/RadarChart/index.mjs +157 -0
- package/es/RadarChart/index.mjs.map +1 -0
- package/es/RadarChart/styles.d.mts +8 -0
- package/es/RadarChart/styles.mjs +23 -0
- package/es/RadarChart/styles.mjs.map +1 -0
- package/es/ScatterChart/ScatterChartTooltip.d.mts +19 -0
- package/es/ScatterChart/ScatterChartTooltip.mjs +52 -0
- package/es/ScatterChart/ScatterChartTooltip.mjs.map +1 -0
- package/es/ScatterChart/ScatterChartTooltipRow.d.mts +10 -0
- package/es/ScatterChart/ScatterChartTooltipRow.mjs +36 -0
- package/es/ScatterChart/ScatterChartTooltipRow.mjs.map +1 -0
- package/es/ScatterChart/index.d.mts +58 -0
- package/es/ScatterChart/index.mjs +241 -0
- package/es/ScatterChart/index.mjs.map +1 -0
- package/es/ScatterChart/{renderShape.d.ts → renderShape.d.mts} +4 -1
- package/es/ScatterChart/renderShape.mjs +18 -0
- package/es/ScatterChart/renderShape.mjs.map +1 -0
- package/es/ScatterChart/styles.d.mts +9 -0
- package/es/ScatterChart/styles.mjs +28 -0
- package/es/ScatterChart/styles.mjs.map +1 -0
- package/es/SparkChart/SparkAreaChart.d.mts +14 -0
- package/es/SparkChart/SparkAreaChart.mjs +109 -0
- package/es/SparkChart/SparkAreaChart.mjs.map +1 -0
- package/es/SparkChart/SparkBarChart.d.mts +11 -0
- package/es/SparkChart/SparkBarChart.mjs +69 -0
- package/es/SparkChart/SparkBarChart.mjs.map +1 -0
- package/es/SparkChart/SparkLineChart.d.mts +12 -0
- package/es/SparkChart/SparkLineChart.mjs +73 -0
- package/es/SparkChart/SparkLineChart.mjs.map +1 -0
- package/es/SparkChart/index.d.mts +4 -0
- package/es/SparkChart/index.mjs +4 -0
- package/es/Tracker/TrackerBlock.d.mts +11 -0
- package/es/Tracker/TrackerBlock.mjs +52 -0
- package/es/Tracker/TrackerBlock.mjs.map +1 -0
- package/es/Tracker/index.d.mts +21 -0
- package/es/Tracker/index.mjs +69 -0
- package/es/Tracker/index.mjs.map +1 -0
- package/es/Tracker/styles.d.mts +8 -0
- package/es/Tracker/styles.mjs +24 -0
- package/es/Tracker/styles.mjs.map +1 -0
- package/es/common/BaseAnimationTimingProps.d.mts +10 -0
- package/es/common/BaseAnimationTimingProps.mjs +0 -0
- package/es/common/BaseChartProps.d.mts +61 -0
- package/es/common/BaseChartProps.mjs +0 -0
- package/es/common/BaseSparkChartProps.d.mts +17 -0
- package/es/common/BaseSparkChartProps.mjs +0 -0
- package/es/common/ChartLegend.d.mts +8 -0
- package/es/common/ChartLegend.mjs +32 -0
- package/es/common/ChartLegend.mjs.map +1 -0
- package/es/common/ChartTooltip/ChartTooltipFrame.d.mts +8 -0
- package/es/common/ChartTooltip/ChartTooltipFrame.mjs +27 -0
- package/es/common/ChartTooltip/ChartTooltipFrame.mjs.map +1 -0
- package/es/common/ChartTooltip/ChartTooltipRow.d.mts +10 -0
- package/es/common/ChartTooltip/ChartTooltipRow.mjs +51 -0
- package/es/common/ChartTooltip/ChartTooltipRow.mjs.map +1 -0
- package/es/common/ChartTooltip/index.d.mts +18 -0
- package/es/common/ChartTooltip/index.mjs +50 -0
- package/es/common/ChartTooltip/index.mjs.map +1 -0
- package/es/common/CustomTooltipProps.d.mts +15 -0
- package/es/common/CustomTooltipProps.mjs +0 -0
- package/es/common/CustomYAxisTick.d.mts +18 -0
- package/es/common/CustomYAxisTick.mjs +24 -0
- package/es/common/CustomYAxisTick.mjs.map +1 -0
- package/es/common/NoData.d.mts +13 -0
- package/es/common/NoData.mjs +25 -0
- package/es/common/NoData.mjs.map +1 -0
- package/es/common/benchmark/index.d.mts +3 -0
- package/es/common/benchmark/{index.js → index.mjs} +1 -1
- package/es/common/benchmark/types.d.mts +125 -0
- package/es/common/benchmark/types.mjs +0 -0
- package/es/common/benchmark/{utils.d.ts → utils.d.mts} +38 -36
- package/es/common/benchmark/utils.mjs +115 -0
- package/es/common/benchmark/utils.mjs.map +1 -0
- package/es/common/{utils.d.ts → utils.d.mts} +3 -0
- package/es/common/utils.mjs +36 -0
- package/es/common/utils.mjs.map +1 -0
- package/es/hooks/useOnWindowResize.d.mts +6 -0
- package/es/hooks/useOnWindowResize.mjs +18 -0
- package/es/hooks/useOnWindowResize.mjs.map +1 -0
- package/es/hooks/usePrefersReducedMotion.d.mts +4 -0
- package/es/hooks/usePrefersReducedMotion.mjs +24 -0
- package/es/hooks/usePrefersReducedMotion.mjs.map +1 -0
- package/es/hooks/useThemeColorRange.d.mts +4 -0
- package/es/hooks/useThemeColorRange.mjs +28 -0
- package/es/hooks/useThemeColorRange.mjs.map +1 -0
- package/es/index.d.mts +34 -0
- package/es/index.mjs +28 -0
- package/es/types/{charts.d.ts → charts.d.mts} +26 -26
- package/es/types/charts.mjs +12 -0
- package/es/types/charts.mjs.map +1 -0
- package/es/utils/{calendar.d.ts → calendar.d.mts} +21 -18
- package/es/utils/calendar.mjs +154 -0
- package/es/utils/calendar.mjs.map +1 -0
- package/es/utils/getMaxLabelLength.d.mts +13 -0
- package/es/utils/getMaxLabelLength.mjs +48 -0
- package/es/utils/getMaxLabelLength.mjs.map +1 -0
- package/es/utils/{index.d.ts → index.d.mts} +4 -1
- package/es/utils/index.mjs +19 -0
- package/es/utils/index.mjs.map +1 -0
- package/es/utils/{theme.d.ts → theme.d.mts} +3 -0
- package/es/utils/theme.mjs +33 -0
- package/es/utils/theme.mjs.map +1 -0
- package/package.json +144 -4
- package/es/AccuracyBarChart/index.d.ts +0 -60
- package/es/AccuracyBarChart/index.js +0 -454
- package/es/AccuracyBarChart/index.mdx +0 -52
- package/es/AccuracyBarChart/styles.d.ts +0 -11
- package/es/AccuracyBarChart/styles.js +0 -18
- package/es/AreaChart/index.d.ts +0 -11
- package/es/AreaChart/index.js +0 -430
- package/es/AreaChart/index.mdx +0 -49
- package/es/AreaChart/styles.d.ts +0 -6
- package/es/AreaChart/styles.js +0 -13
- package/es/BarChart/index.d.ts +0 -9
- package/es/BarChart/index.js +0 -392
- package/es/BarChart/index.mdx +0 -73
- package/es/BarChart/renderShape.js +0 -34
- package/es/BarChart/styles.d.ts +0 -6
- package/es/BarChart/styles.js +0 -13
- package/es/BarList/index.d.ts +0 -29
- package/es/BarList/index.js +0 -174
- package/es/BarList/index.mdx +0 -34
- package/es/BarList/styles.d.ts +0 -10
- package/es/BarList/styles.js +0 -18
- package/es/BenchmarkColumnChart/index.d.ts +0 -140
- package/es/BenchmarkColumnChart/index.js +0 -686
- package/es/BenchmarkColumnChart/index.mdx +0 -66
- package/es/BenchmarkColumnChart/styles.d.ts +0 -16
- package/es/BenchmarkColumnChart/styles.js +0 -23
- package/es/BenchmarkRankingChart/index.d.ts +0 -87
- package/es/BenchmarkRankingChart/index.js +0 -455
- package/es/BenchmarkRankingChart/index.mdx +0 -59
- package/es/BenchmarkRankingChart/styles.d.ts +0 -33
- package/es/BenchmarkRankingChart/styles.js +0 -41
- package/es/BenchmarkScatterChart/index.d.ts +0 -145
- package/es/BenchmarkScatterChart/index.js +0 -857
- package/es/BenchmarkScatterChart/index.mdx +0 -61
- package/es/BenchmarkScatterChart/styles.d.ts +0 -25
- package/es/BenchmarkScatterChart/styles.js +0 -33
- package/es/BenchmarkScatterChart/utils.js +0 -353
- package/es/ComposedChart/index.d.ts +0 -5
- package/es/ComposedChart/index.js +0 -335
- package/es/ComposedChart/index.mdx +0 -43
- package/es/ComposedChart/styles.d.ts +0 -6
- package/es/ComposedChart/styles.js +0 -13
- package/es/ComposedChart/types.d.ts +0 -68
- package/es/ComposedChart/types.js +0 -1
- package/es/DataBars/CategoryBar.d.ts +0 -15
- package/es/DataBars/CategoryBar.js +0 -201
- package/es/DataBars/DeltaBar.d.ts +0 -13
- package/es/DataBars/DeltaBar.js +0 -117
- package/es/DataBars/MarkerBar.d.ts +0 -16
- package/es/DataBars/MarkerBar.js +0 -94
- package/es/DataBars/ProgressBar.d.ts +0 -12
- package/es/DataBars/ProgressBar.js +0 -71
- package/es/DataBars/index.d.ts +0 -4
- package/es/DataBars/index.js +0 -4
- package/es/DataBars/index.mdx +0 -36
- package/es/DataBars/styles.d.ts +0 -7
- package/es/DataBars/styles.js +0 -14
- package/es/DonutChart/DonutChartTooltip.d.ts +0 -11
- package/es/DonutChart/DonutChartTooltip.js +0 -26
- package/es/DonutChart/index.d.ts +0 -31
- package/es/DonutChart/index.js +0 -232
- package/es/DonutChart/index.mdx +0 -48
- package/es/DonutChart/inputParser.d.ts +0 -2
- package/es/DonutChart/inputParser.js +0 -9
- package/es/DonutChart/renderInactiveShape.d.ts +0 -2
- package/es/DonutChart/renderInactiveShape.js +0 -27
- package/es/DonutChart/styles.d.ts +0 -6
- package/es/DonutChart/styles.js +0 -13
- package/es/FunnelChart/ArrowRightIcon.d.ts +0 -5
- package/es/FunnelChart/ArrowRightIcon.js +0 -22
- package/es/FunnelChart/index.d.ts +0 -19
- package/es/FunnelChart/index.js +0 -499
- package/es/FunnelChart/index.mdx +0 -21
- package/es/FunnelChart/styles.d.ts +0 -6
- package/es/FunnelChart/styles.js +0 -13
- package/es/FunnelChart/types.d.ts +0 -28
- package/es/FunnelChart/types.js +0 -1
- package/es/Heatmaps/Calendar.d.ts +0 -18
- package/es/Heatmaps/Calendar.js +0 -155
- package/es/Heatmaps/ChartLabels.d.ts +0 -15
- package/es/Heatmaps/ChartLabels.js +0 -106
- package/es/Heatmaps/Footer.d.ts +0 -22
- package/es/Heatmaps/Footer.js +0 -105
- package/es/Heatmaps/index.d.ts +0 -28
- package/es/Heatmaps/index.js +0 -227
- package/es/Heatmaps/index.mdx +0 -70
- package/es/Heatmaps/styles.d.ts +0 -7
- package/es/Heatmaps/styles.js +0 -14
- package/es/Legend/LegendItem.d.ts +0 -10
- package/es/Legend/LegendItem.js +0 -58
- package/es/Legend/ScrollButton.d.ts +0 -9
- package/es/Legend/ScrollButton.js +0 -63
- package/es/Legend/index.d.ts +0 -14
- package/es/Legend/index.js +0 -184
- package/es/Legend/index.mdx +0 -13
- package/es/LineChart/index.d.ts +0 -9
- package/es/LineChart/index.js +0 -388
- package/es/LineChart/index.mdx +0 -49
- package/es/LineChart/styles.d.ts +0 -6
- package/es/LineChart/styles.js +0 -13
- package/es/RadarChart/index.d.ts +0 -24
- package/es/RadarChart/index.js +0 -254
- package/es/RadarChart/index.mdx +0 -52
- package/es/RadarChart/styles.d.ts +0 -5
- package/es/RadarChart/styles.js +0 -12
- package/es/ScatterChart/ScatterChartTooltip.d.ts +0 -16
- package/es/ScatterChart/ScatterChartTooltip.js +0 -76
- package/es/ScatterChart/ScatterChartTooltipRow.d.ts +0 -7
- package/es/ScatterChart/ScatterChartTooltipRow.js +0 -40
- package/es/ScatterChart/index.d.ts +0 -56
- package/es/ScatterChart/index.js +0 -342
- package/es/ScatterChart/index.mdx +0 -49
- package/es/ScatterChart/renderShape.js +0 -18
- package/es/ScatterChart/styles.d.ts +0 -6
- package/es/ScatterChart/styles.js +0 -13
- package/es/SparkChart/SparkAreaChart.d.ts +0 -12
- package/es/SparkChart/SparkAreaChart.js +0 -148
- package/es/SparkChart/SparkBarChart.d.ts +0 -9
- package/es/SparkChart/SparkBarChart.js +0 -106
- package/es/SparkChart/SparkLineChart.d.ts +0 -10
- package/es/SparkChart/SparkLineChart.js +0 -110
- package/es/SparkChart/index.d.ts +0 -3
- package/es/SparkChart/index.js +0 -3
- package/es/SparkChart/index.mdx +0 -29
- package/es/Tracker/TrackerBlock.d.ts +0 -8
- package/es/Tracker/TrackerBlock.js +0 -64
- package/es/Tracker/index.d.ts +0 -18
- package/es/Tracker/index.js +0 -105
- package/es/Tracker/index.mdx +0 -41
- package/es/Tracker/styles.d.ts +0 -5
- package/es/Tracker/styles.js +0 -12
- package/es/common/BaseAnimationTimingProps.d.ts +0 -7
- package/es/common/BaseAnimationTimingProps.js +0 -1
- package/es/common/BaseChartProps.d.ts +0 -58
- package/es/common/BaseChartProps.js +0 -1
- package/es/common/BaseSparkChartProps.d.ts +0 -14
- package/es/common/BaseSparkChartProps.js +0 -1
- package/es/common/ChartLegend.d.ts +0 -5
- package/es/common/ChartLegend.js +0 -40
- package/es/common/ChartTooltip/ChartTooltipFrame.d.ts +0 -6
- package/es/common/ChartTooltip/ChartTooltipFrame.js +0 -32
- package/es/common/ChartTooltip/ChartTooltipRow.d.ts +0 -8
- package/es/common/ChartTooltip/ChartTooltipRow.js +0 -55
- package/es/common/ChartTooltip/index.d.ts +0 -15
- package/es/common/ChartTooltip/index.js +0 -66
- package/es/common/CustomTooltipProps.d.ts +0 -12
- package/es/common/CustomTooltipProps.js +0 -1
- package/es/common/CustomYAxisTick.d.ts +0 -15
- package/es/common/CustomYAxisTick.js +0 -27
- package/es/common/NoData.d.ts +0 -10
- package/es/common/NoData.js +0 -24
- package/es/common/benchmark/index.d.ts +0 -2
- package/es/common/benchmark/types.d.ts +0 -122
- package/es/common/benchmark/types.js +0 -1
- package/es/common/benchmark/utils.js +0 -159
- package/es/common/utils.js +0 -85
- package/es/hooks/useOnWindowResize.d.ts +0 -3
- package/es/hooks/useOnWindowResize.js +0 -15
- package/es/hooks/usePrefersReducedMotion.d.ts +0 -1
- package/es/hooks/usePrefersReducedMotion.js +0 -28
- package/es/hooks/useThemeColorRange.d.ts +0 -1
- package/es/hooks/useThemeColorRange.js +0 -8
- package/es/index.d.ts +0 -24
- package/es/index.js +0 -22
- package/es/types/charts.js +0 -8
- package/es/types/global.d.ts +0 -9
- package/es/utils/calendar.js +0 -199
- package/es/utils/getMaxLabelLength.d.ts +0 -10
- package/es/utils/getMaxLabelLength.js +0 -110
- package/es/utils/index.js +0 -32
- package/es/utils/theme.js +0 -40
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _templateObject;
|
|
5
|
-
var _excluded = ["data", "categories", "index", "colors", "stack", "relative", "animationDuration", "showAnimation", "noDataText", "loading", "autoMinValue", "minValue", "maxValue", "className", "width", "height", "style"];
|
|
6
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
import { Flexbox } from '@lobehub/ui';
|
|
15
|
-
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
16
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
17
|
-
import { forwardRef } from 'react';
|
|
18
|
-
import { Bar, BarChart as ReChartsBarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
|
|
19
|
-
import NoData from "../common/NoData";
|
|
20
|
-
import { constructCategoryColors, getYAxisDomain } from "../common/utils";
|
|
21
|
-
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
|
22
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
var SparkBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25
|
-
var themeColorRange = useThemeColorRange();
|
|
26
|
-
var _props$data = props.data,
|
|
27
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
28
|
-
_props$categories = props.categories,
|
|
29
|
-
categories = _props$categories === void 0 ? [] : _props$categories,
|
|
30
|
-
index = props.index,
|
|
31
|
-
_props$colors = props.colors,
|
|
32
|
-
colors = _props$colors === void 0 ? themeColorRange : _props$colors,
|
|
33
|
-
_props$stack = props.stack,
|
|
34
|
-
stack = _props$stack === void 0 ? false : _props$stack,
|
|
35
|
-
_props$relative = props.relative,
|
|
36
|
-
relative = _props$relative === void 0 ? false : _props$relative,
|
|
37
|
-
_props$animationDurat = props.animationDuration,
|
|
38
|
-
animationDuration = _props$animationDurat === void 0 ? 900 : _props$animationDurat,
|
|
39
|
-
_props$showAnimation = props.showAnimation,
|
|
40
|
-
showAnimation = _props$showAnimation === void 0 ? false : _props$showAnimation,
|
|
41
|
-
_props$noDataText = props.noDataText,
|
|
42
|
-
noDataText = _props$noDataText === void 0 ? /*#__PURE__*/_jsx("div", {}) : _props$noDataText,
|
|
43
|
-
loading = props.loading,
|
|
44
|
-
_props$autoMinValue = props.autoMinValue,
|
|
45
|
-
autoMinValue = _props$autoMinValue === void 0 ? false : _props$autoMinValue,
|
|
46
|
-
minValue = props.minValue,
|
|
47
|
-
maxValue = props.maxValue,
|
|
48
|
-
className = props.className,
|
|
49
|
-
_props$width = props.width,
|
|
50
|
-
width = _props$width === void 0 ? 112 : _props$width,
|
|
51
|
-
_props$height = props.height,
|
|
52
|
-
height = _props$height === void 0 ? 48 : _props$height,
|
|
53
|
-
style = props.style,
|
|
54
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
55
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
56
|
-
height: height,
|
|
57
|
-
width: width
|
|
58
|
-
});
|
|
59
|
-
var categoryColors = constructCategoryColors(categories, colors);
|
|
60
|
-
var yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
61
|
-
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
62
|
-
className: className,
|
|
63
|
-
height: height,
|
|
64
|
-
ref: ref,
|
|
65
|
-
style: _objectSpread({
|
|
66
|
-
position: 'relative'
|
|
67
|
-
}, style),
|
|
68
|
-
width: width
|
|
69
|
-
}, rest), {}, {
|
|
70
|
-
children: /*#__PURE__*/_jsx(ResponsiveContainer, {
|
|
71
|
-
children: data !== null && data !== void 0 && data.length ? /*#__PURE__*/_jsxs(ReChartsBarChart, {
|
|
72
|
-
data: data,
|
|
73
|
-
margin: {
|
|
74
|
-
bottom: 0,
|
|
75
|
-
left: -1.5,
|
|
76
|
-
right: -1.5,
|
|
77
|
-
top: 0
|
|
78
|
-
},
|
|
79
|
-
stackOffset: relative ? 'expand' : 'none',
|
|
80
|
-
children: [/*#__PURE__*/_jsx(YAxis, {
|
|
81
|
-
domain: yAxisDomain,
|
|
82
|
-
hide: true
|
|
83
|
-
}), /*#__PURE__*/_jsx(XAxis, {
|
|
84
|
-
dataKey: index,
|
|
85
|
-
hide: true
|
|
86
|
-
}), categories.map(function (category) {
|
|
87
|
-
var _categoryColors$get;
|
|
88
|
-
return /*#__PURE__*/_jsx(Bar, {
|
|
89
|
-
animationDuration: animationDuration,
|
|
90
|
-
className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n fill: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary)),
|
|
91
|
-
dataKey: category,
|
|
92
|
-
fill: "",
|
|
93
|
-
isAnimationActive: showAnimation,
|
|
94
|
-
name: category,
|
|
95
|
-
stackId: stack || relative ? 'a' : undefined,
|
|
96
|
-
type: "linear"
|
|
97
|
-
}, category);
|
|
98
|
-
})]
|
|
99
|
-
}) : /*#__PURE__*/_jsx(NoData, {
|
|
100
|
-
noDataText: noDataText
|
|
101
|
-
})
|
|
102
|
-
})
|
|
103
|
-
}));
|
|
104
|
-
});
|
|
105
|
-
SparkBarChart.displayName = 'SparkBarChart';
|
|
106
|
-
export default SparkBarChart;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import BaseSparkChartProps from "../common/BaseSparkChartProps";
|
|
3
|
-
import { CurveType } from "../types/charts";
|
|
4
|
-
export interface SparkLineChartProps extends BaseSparkChartProps {
|
|
5
|
-
connectNulls?: boolean;
|
|
6
|
-
curveType?: CurveType;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const SparkLineChart: import("react").ForwardRefExoticComponent<SparkLineChartProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default SparkLineChart;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _templateObject;
|
|
5
|
-
var _excluded = ["data", "categories", "index", "colors", "animationDuration", "showAnimation", "curveType", "connectNulls", "noDataText", "autoMinValue", "minValue", "maxValue", "className", "width", "height", "style", "loading"];
|
|
6
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
import { Flexbox } from '@lobehub/ui';
|
|
15
|
-
import { Skeleton } from '@lobehub/ui/base-ui';
|
|
16
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
17
|
-
import { forwardRef } from 'react';
|
|
18
|
-
import { Line, LineChart as ReChartsLineChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
|
|
19
|
-
import NoData from "../common/NoData";
|
|
20
|
-
import { constructCategoryColors, getYAxisDomain } from "../common/utils";
|
|
21
|
-
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
|
22
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
var SparkLineChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25
|
-
var themeColorRange = useThemeColorRange();
|
|
26
|
-
var _props$data = props.data,
|
|
27
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
28
|
-
_props$categories = props.categories,
|
|
29
|
-
categories = _props$categories === void 0 ? [] : _props$categories,
|
|
30
|
-
index = props.index,
|
|
31
|
-
_props$colors = props.colors,
|
|
32
|
-
colors = _props$colors === void 0 ? themeColorRange : _props$colors,
|
|
33
|
-
_props$animationDurat = props.animationDuration,
|
|
34
|
-
animationDuration = _props$animationDurat === void 0 ? 900 : _props$animationDurat,
|
|
35
|
-
_props$showAnimation = props.showAnimation,
|
|
36
|
-
showAnimation = _props$showAnimation === void 0 ? false : _props$showAnimation,
|
|
37
|
-
_props$curveType = props.curveType,
|
|
38
|
-
curveType = _props$curveType === void 0 ? 'linear' : _props$curveType,
|
|
39
|
-
_props$connectNulls = props.connectNulls,
|
|
40
|
-
connectNulls = _props$connectNulls === void 0 ? false : _props$connectNulls,
|
|
41
|
-
_props$noDataText = props.noDataText,
|
|
42
|
-
noDataText = _props$noDataText === void 0 ? /*#__PURE__*/_jsx("div", {}) : _props$noDataText,
|
|
43
|
-
_props$autoMinValue = props.autoMinValue,
|
|
44
|
-
autoMinValue = _props$autoMinValue === void 0 ? false : _props$autoMinValue,
|
|
45
|
-
minValue = props.minValue,
|
|
46
|
-
maxValue = props.maxValue,
|
|
47
|
-
className = props.className,
|
|
48
|
-
_props$width = props.width,
|
|
49
|
-
width = _props$width === void 0 ? 112 : _props$width,
|
|
50
|
-
_props$height = props.height,
|
|
51
|
-
height = _props$height === void 0 ? 48 : _props$height,
|
|
52
|
-
style = props.style,
|
|
53
|
-
loading = props.loading,
|
|
54
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
55
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
56
|
-
height: height,
|
|
57
|
-
width: width
|
|
58
|
-
});
|
|
59
|
-
var categoryColors = constructCategoryColors(categories, colors);
|
|
60
|
-
var yAxisDomain = getYAxisDomain(autoMinValue, minValue, maxValue);
|
|
61
|
-
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
62
|
-
className: className,
|
|
63
|
-
height: height,
|
|
64
|
-
ref: ref,
|
|
65
|
-
style: _objectSpread({
|
|
66
|
-
position: 'relative'
|
|
67
|
-
}, style),
|
|
68
|
-
width: width
|
|
69
|
-
}, rest), {}, {
|
|
70
|
-
children: /*#__PURE__*/_jsx(ResponsiveContainer, {
|
|
71
|
-
children: data !== null && data !== void 0 && data.length ? /*#__PURE__*/_jsxs(ReChartsLineChart, {
|
|
72
|
-
data: data,
|
|
73
|
-
margin: {
|
|
74
|
-
bottom: 1,
|
|
75
|
-
left: 1,
|
|
76
|
-
right: 1,
|
|
77
|
-
top: 1
|
|
78
|
-
},
|
|
79
|
-
children: [/*#__PURE__*/_jsx(YAxis, {
|
|
80
|
-
domain: yAxisDomain,
|
|
81
|
-
hide: true
|
|
82
|
-
}), /*#__PURE__*/_jsx(XAxis, {
|
|
83
|
-
dataKey: index,
|
|
84
|
-
hide: true
|
|
85
|
-
}), categories.map(function (category) {
|
|
86
|
-
var _categoryColors$get;
|
|
87
|
-
return /*#__PURE__*/_jsx(Line, {
|
|
88
|
-
animationDuration: animationDuration,
|
|
89
|
-
className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n stroke: ", ";\n "])), (_categoryColors$get = categoryColors.get(category)) !== null && _categoryColors$get !== void 0 ? _categoryColors$get : cssVar.colorPrimary)),
|
|
90
|
-
connectNulls: connectNulls,
|
|
91
|
-
dataKey: category,
|
|
92
|
-
dot: false,
|
|
93
|
-
isAnimationActive: showAnimation,
|
|
94
|
-
name: category,
|
|
95
|
-
stroke: "",
|
|
96
|
-
strokeLinecap: "round",
|
|
97
|
-
strokeLinejoin: "round",
|
|
98
|
-
strokeOpacity: 1,
|
|
99
|
-
strokeWidth: 2,
|
|
100
|
-
type: curveType
|
|
101
|
-
}, category);
|
|
102
|
-
})]
|
|
103
|
-
}) : /*#__PURE__*/_jsx(NoData, {
|
|
104
|
-
noDataText: noDataText
|
|
105
|
-
})
|
|
106
|
-
})
|
|
107
|
-
}));
|
|
108
|
-
});
|
|
109
|
-
SparkLineChart.displayName = 'SparkLineChart';
|
|
110
|
-
export default SparkLineChart;
|
package/es/SparkChart/index.d.ts
DELETED
package/es/SparkChart/index.js
DELETED
package/es/SparkChart/index.mdx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: SparkChart
|
|
3
|
-
description: A small graph capable of visualizing data in a simplified form.
|
|
4
|
-
category: Visualizations
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
import DemoSparkAreaChart from './demos/SparkAreaChart.tsx?demo';
|
|
8
|
-
import DemoSparkBarChart from './demos/SparkBarChart.tsx?demo';
|
|
9
|
-
import DemoSparkLineChart from './demos/SparkLineChart.tsx?demo';
|
|
10
|
-
|
|
11
|
-
## Spark AreaC hart
|
|
12
|
-
|
|
13
|
-
<Demo of={DemoSparkAreaChart} layout="center" />
|
|
14
|
-
|
|
15
|
-
## Spark Bar Chart
|
|
16
|
-
|
|
17
|
-
<Demo of={DemoSparkBarChart} layout="center" />
|
|
18
|
-
|
|
19
|
-
## Spark Line Chart
|
|
20
|
-
|
|
21
|
-
<Demo of={DemoSparkLineChart} layout="center" />
|
|
22
|
-
|
|
23
|
-
## API
|
|
24
|
-
|
|
25
|
-
<Api name="SparkAreaChart" />
|
|
26
|
-
|
|
27
|
-
<Api name="SparkBarChart" />
|
|
28
|
-
|
|
29
|
-
<Api name="SparkLineChart" />
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface TrackerBlockProps {
|
|
3
|
-
color?: 'success' | 'warning' | 'error' | string;
|
|
4
|
-
key?: string | number;
|
|
5
|
-
tooltip?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare const TrackerBlock: import("react").ForwardRefExoticComponent<Omit<TrackerBlockProps & import("@lobehub/ui").FlexBasicProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export default TrackerBlock;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _excluded = ["color", "tooltip", "width", "style"];
|
|
5
|
-
var _templateObject;
|
|
6
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
import { Flexbox } from '@lobehub/ui';
|
|
15
|
-
import { Tooltip } from '@lobehub/ui/base-ui';
|
|
16
|
-
import { createStaticStyles, cssVar } from 'antd-style';
|
|
17
|
-
import { forwardRef, useMemo } from 'react';
|
|
18
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
var styles = createStaticStyles(function (_ref) {
|
|
20
|
-
var css = _ref.css;
|
|
21
|
-
return {
|
|
22
|
-
block: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n\n &:first-child {\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n }\n\n &:last-child {\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n }\n\n &:hover {\n opacity: 0.5;\n }\n "])), cssVar.colorFill, cssVar.borderRadiusSM, cssVar.borderRadiusSM, cssVar.borderRadiusSM, cssVar.borderRadiusSM)
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
var TrackerBlock = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
26
|
-
var color = _ref2.color,
|
|
27
|
-
tooltip = _ref2.tooltip,
|
|
28
|
-
width = _ref2.width,
|
|
29
|
-
style = _ref2.style,
|
|
30
|
-
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
31
|
-
var blockColor = useMemo(function () {
|
|
32
|
-
switch (color) {
|
|
33
|
-
case 'success':
|
|
34
|
-
{
|
|
35
|
-
return cssVar.colorSuccess;
|
|
36
|
-
}
|
|
37
|
-
case 'warning':
|
|
38
|
-
{
|
|
39
|
-
return cssVar.colorWarning;
|
|
40
|
-
}
|
|
41
|
-
case 'error':
|
|
42
|
-
{
|
|
43
|
-
return cssVar.colorError;
|
|
44
|
-
}
|
|
45
|
-
default:
|
|
46
|
-
{
|
|
47
|
-
return color;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}, [color]);
|
|
51
|
-
return /*#__PURE__*/_jsx(Tooltip, {
|
|
52
|
-
title: tooltip,
|
|
53
|
-
children: /*#__PURE__*/_jsx(Flexbox, _objectSpread({
|
|
54
|
-
className: styles.block,
|
|
55
|
-
height: '100%',
|
|
56
|
-
ref: ref,
|
|
57
|
-
style: _objectSpread({
|
|
58
|
-
background: blockColor
|
|
59
|
-
}, style),
|
|
60
|
-
width: width || '100%'
|
|
61
|
-
}, rest))
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
export default TrackerBlock;
|
package/es/Tracker/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FlexboxProps } from '@lobehub/ui';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { TrackerBlockProps } from './TrackerBlock';
|
|
4
|
-
interface DataItem extends TrackerBlockProps {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface TrackerProps extends FlexboxProps {
|
|
8
|
-
blockGap?: number | string;
|
|
9
|
-
blockHeight?: number | string;
|
|
10
|
-
blockWidth?: number | string;
|
|
11
|
-
customTooltip?: (payload: DataItem) => ReactNode;
|
|
12
|
-
data: DataItem[];
|
|
13
|
-
leftLabel?: ReactNode;
|
|
14
|
-
onValueChange?: (payload: DataItem) => void;
|
|
15
|
-
rightLabel?: ReactNode;
|
|
16
|
-
}
|
|
17
|
-
declare const Tracker: import("react").ForwardRefExoticComponent<Omit<TrackerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export default Tracker;
|
package/es/Tracker/index.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _excluded = ["data", "className", "height", "width", "blockWidth", "blockHeight", "blockGap", "customTooltip", "onValueChange", "leftLabel", "rightLabel", "style"];
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Flexbox } from '@lobehub/ui';
|
|
13
|
-
import { TooltipGroup } from '@lobehub/ui/base-ui';
|
|
14
|
-
import { cx } from 'antd-style';
|
|
15
|
-
import { forwardRef } from 'react';
|
|
16
|
-
import TrackerBlock from "./TrackerBlock";
|
|
17
|
-
import { styles } from "./styles";
|
|
18
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
var Tracker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
-
var _props$data = props.data,
|
|
22
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
23
|
-
className = props.className,
|
|
24
|
-
height = props.height,
|
|
25
|
-
_props$width = props.width,
|
|
26
|
-
width = _props$width === void 0 ? 'fit-content' : _props$width,
|
|
27
|
-
_props$blockWidth = props.blockWidth,
|
|
28
|
-
blockWidth = _props$blockWidth === void 0 ? 12 : _props$blockWidth,
|
|
29
|
-
_props$blockHeight = props.blockHeight,
|
|
30
|
-
blockHeight = _props$blockHeight === void 0 ? 40 : _props$blockHeight,
|
|
31
|
-
_props$blockGap = props.blockGap,
|
|
32
|
-
blockGap = _props$blockGap === void 0 ? 4 : _props$blockGap,
|
|
33
|
-
customTooltip = props.customTooltip,
|
|
34
|
-
onValueChange = props.onValueChange,
|
|
35
|
-
leftLabel = props.leftLabel,
|
|
36
|
-
rightLabel = props.rightLabel,
|
|
37
|
-
style = props.style,
|
|
38
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
39
|
-
var content = /*#__PURE__*/_jsx(TooltipGroup, {
|
|
40
|
-
children: data.map(function (item, idx) {
|
|
41
|
-
var _item$key;
|
|
42
|
-
return /*#__PURE__*/_jsx(TrackerBlock, {
|
|
43
|
-
color: item.color,
|
|
44
|
-
height: blockHeight,
|
|
45
|
-
onClick: function onClick() {
|
|
46
|
-
return onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(item);
|
|
47
|
-
},
|
|
48
|
-
style: {
|
|
49
|
-
cursor: onValueChange ? 'pointer' : 'default'
|
|
50
|
-
},
|
|
51
|
-
tooltip: customTooltip ? customTooltip(item) : item.tooltip,
|
|
52
|
-
width: blockWidth
|
|
53
|
-
}, (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : idx);
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
if (leftLabel || rightLabel) {
|
|
57
|
-
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
58
|
-
className: className,
|
|
59
|
-
gap: 8,
|
|
60
|
-
height: height,
|
|
61
|
-
ref: ref,
|
|
62
|
-
style: _objectSpread({
|
|
63
|
-
position: 'relative'
|
|
64
|
-
}, style),
|
|
65
|
-
width: width
|
|
66
|
-
}, rest), {}, {
|
|
67
|
-
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
68
|
-
align: 'center',
|
|
69
|
-
horizontal: true,
|
|
70
|
-
justify: 'space-between',
|
|
71
|
-
width: '100%',
|
|
72
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
73
|
-
className: cx(styles.strongLabel, styles.emphasis),
|
|
74
|
-
children: leftLabel
|
|
75
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
76
|
-
className: cx(styles.label, styles.emphasis),
|
|
77
|
-
style: {
|
|
78
|
-
textAlign: 'right'
|
|
79
|
-
},
|
|
80
|
-
children: rightLabel
|
|
81
|
-
})]
|
|
82
|
-
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
83
|
-
align: 'center',
|
|
84
|
-
gap: blockGap,
|
|
85
|
-
height: blockHeight,
|
|
86
|
-
horizontal: true,
|
|
87
|
-
width: '100%',
|
|
88
|
-
children: content
|
|
89
|
-
})]
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
return /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
93
|
-
align: 'center',
|
|
94
|
-
className: className,
|
|
95
|
-
gap: blockGap,
|
|
96
|
-
height: height || blockHeight,
|
|
97
|
-
horizontal: true,
|
|
98
|
-
ref: ref,
|
|
99
|
-
width: width
|
|
100
|
-
}, rest), {}, {
|
|
101
|
-
children: content
|
|
102
|
-
}));
|
|
103
|
-
});
|
|
104
|
-
Tracker.displayName = 'Tracker';
|
|
105
|
-
export default Tracker;
|
package/es/Tracker/index.mdx
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Tracker
|
|
3
|
-
description: Component for visualizing activity logs or other data related to monitoring.
|
|
4
|
-
category: Visualizations
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
import DemoIndex from './demos/index.tsx?demo';
|
|
8
|
-
import DemoExample from './demos/example.tsx?demo';
|
|
9
|
-
import DemoClickEvent from './demos/clickEvent.tsx?demo';
|
|
10
|
-
import DemoCustomTooltip from './demos/customTooltip.tsx?demo';
|
|
11
|
-
import DemoCustomColors from './demos/customColors.tsx?demo';
|
|
12
|
-
|
|
13
|
-
<Demo of={DemoIndex} layout="bare" />
|
|
14
|
-
|
|
15
|
-
## Usage example
|
|
16
|
-
|
|
17
|
-
The example below shows a composition of an uptime monitor with a `Tracker` component. The \`tooltip property acts as pop-up information and displays the provided status.
|
|
18
|
-
|
|
19
|
-
<Demo of={DemoExample} layout="center" />
|
|
20
|
-
|
|
21
|
-
## Usage example with click event
|
|
22
|
-
|
|
23
|
-
The example below shows an interacive chart using the `onValueChange` prop.
|
|
24
|
-
|
|
25
|
-
<Demo of={DemoClickEvent} />
|
|
26
|
-
|
|
27
|
-
## Usage example with custom tooltip
|
|
28
|
-
|
|
29
|
-
The example below shows a custom tooltip using `customTooltip` prop.
|
|
30
|
-
|
|
31
|
-
<Demo of={DemoCustomTooltip} layout="center" />
|
|
32
|
-
|
|
33
|
-
## Usage example with a custom colors
|
|
34
|
-
|
|
35
|
-
The example below shows a chart with custom `colors`.
|
|
36
|
-
|
|
37
|
-
<Demo of={DemoCustomColors} layout="center" />
|
|
38
|
-
|
|
39
|
-
## API
|
|
40
|
-
|
|
41
|
-
<Api name="Tracker" />
|
package/es/Tracker/styles.d.ts
DELETED
package/es/Tracker/styles.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
2
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from 'antd-style';
|
|
4
|
-
export var styles = createStaticStyles(function (_ref) {
|
|
5
|
-
var css = _ref.css,
|
|
6
|
-
cssVar = _ref.cssVar;
|
|
7
|
-
return {
|
|
8
|
-
emphasis: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
|
|
9
|
-
label: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 16px;\n color: ", ";\n "])), cssVar.colorTextDescription),
|
|
10
|
-
strongLabel: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n fill: ", ";\n "])), cssVar.colorTextSecondary)
|
|
11
|
-
};
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ComponentType, HTMLAttributes } from 'react';
|
|
2
|
-
import type { AxisDomain } from 'recharts/types/util/types';
|
|
3
|
-
import type { NoDataProps } from "./NoData";
|
|
4
|
-
import { IntervalType, LabelFormatter, ValueFormatter } from "../types/charts";
|
|
5
|
-
import type BaseAnimationTimingProps from './BaseAnimationTimingProps';
|
|
6
|
-
import { CustomTooltipProps } from './CustomTooltipProps';
|
|
7
|
-
type FixedProps = {
|
|
8
|
-
categoryClicked: string;
|
|
9
|
-
eventType: 'dot' | 'category' | 'bar' | 'slice' | 'bubble';
|
|
10
|
-
};
|
|
11
|
-
type BaseEventProps = FixedProps & {
|
|
12
|
-
[key: string]: number | string;
|
|
13
|
-
};
|
|
14
|
-
export type EventProps = BaseEventProps | null | undefined;
|
|
15
|
-
interface BaseChartProps extends BaseAnimationTimingProps, HTMLAttributes<HTMLDivElement> {
|
|
16
|
-
allowDecimals?: boolean;
|
|
17
|
-
autoMinValue?: boolean;
|
|
18
|
-
categories: string[];
|
|
19
|
-
colors?: string[];
|
|
20
|
-
customCategories?: {
|
|
21
|
-
[key: string]: string;
|
|
22
|
-
};
|
|
23
|
-
customTooltip?: ComponentType<CustomTooltipProps>;
|
|
24
|
-
data: any[];
|
|
25
|
-
enableLegendSlider?: boolean;
|
|
26
|
-
height?: string | number;
|
|
27
|
-
index: string;
|
|
28
|
-
intervalType?: IntervalType;
|
|
29
|
-
loading?: boolean;
|
|
30
|
-
maxValue?: number;
|
|
31
|
-
minValue?: number;
|
|
32
|
-
noDataText?: NoDataProps['noDataText'];
|
|
33
|
-
onValueChange?: (value: EventProps) => void;
|
|
34
|
-
rotateLabelX?: {
|
|
35
|
-
angle: number;
|
|
36
|
-
verticalShift?: number;
|
|
37
|
-
xAxisHeight?: number;
|
|
38
|
-
};
|
|
39
|
-
showGridLines?: boolean;
|
|
40
|
-
showLegend?: boolean;
|
|
41
|
-
showTooltip?: boolean;
|
|
42
|
-
showXAxis?: boolean;
|
|
43
|
-
showYAxis?: boolean;
|
|
44
|
-
startEndOnly?: boolean;
|
|
45
|
-
tickGap?: number;
|
|
46
|
-
valueFormatter?: ValueFormatter;
|
|
47
|
-
width?: string | number;
|
|
48
|
-
xAxisLabel?: string;
|
|
49
|
-
xAxisLabelFormatter?: LabelFormatter;
|
|
50
|
-
yAxisAlign?: 'left' | 'right';
|
|
51
|
-
/**
|
|
52
|
-
* Forward to recharts `YAxis.domain`. When set, overrides `autoMinValue` / `minValue` / `maxValue`.
|
|
53
|
-
*/
|
|
54
|
-
yAxisDomain?: AxisDomain;
|
|
55
|
-
yAxisLabel?: string;
|
|
56
|
-
yAxisWidth?: number;
|
|
57
|
-
}
|
|
58
|
-
export default BaseChartProps;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { NoDataProps } from "./NoData";
|
|
3
|
-
import BaseAnimationTimingProps from './BaseAnimationTimingProps';
|
|
4
|
-
interface BaseSparkChartProps extends BaseAnimationTimingProps, HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
autoMinValue?: boolean;
|
|
6
|
-
categories: string[];
|
|
7
|
-
colors?: string[];
|
|
8
|
-
data: any[];
|
|
9
|
-
index: string;
|
|
10
|
-
maxValue?: number;
|
|
11
|
-
minValue?: number;
|
|
12
|
-
noDataText?: NoDataProps['noDataText'];
|
|
13
|
-
}
|
|
14
|
-
export default BaseSparkChartProps;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
declare const ChartLegend: ({ payload }: any, categoryColors: Map<string, string>, setLegendHeight: Dispatch<SetStateAction<number>>, activeLegend: string | undefined, onClick?: ((category: string, color: string) => void) | undefined, enableLegendSlider?: boolean, customCategories?: {
|
|
3
|
-
[key: string]: string;
|
|
4
|
-
} | undefined) => import("react").JSX.Element;
|
|
5
|
-
export default ChartLegend;
|