bruv-ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/area-chart.d.ts +84 -0
  2. package/dist/area-chart.js +2002 -0
  3. package/dist/area-chart.js.map +1 -0
  4. package/dist/bar-chart.d.ts +80 -0
  5. package/dist/bar-chart.js +2251 -0
  6. package/dist/bar-chart.js.map +1 -0
  7. package/dist/chart-background-BK77UXhl.d.ts +9 -0
  8. package/dist/chart-brush-BoxY9aDm.d.ts +72 -0
  9. package/dist/chart-dot-8H287EDv.d.ts +17 -0
  10. package/dist/chart-legend-Dv9pqes-.d.ts +16 -0
  11. package/dist/chart-tooltip-DajpzJRy.d.ts +68 -0
  12. package/dist/charts.d.ts +17 -0
  13. package/dist/charts.js +5097 -0
  14. package/dist/charts.js.map +1 -0
  15. package/dist/composed-chart.d.ts +93 -0
  16. package/dist/composed-chart.js +2338 -0
  17. package/dist/composed-chart.js.map +1 -0
  18. package/dist/form-dK_DJRTw.d.ts +43 -0
  19. package/dist/form-rhf.d.ts +26 -0
  20. package/dist/form-rhf.js +268 -0
  21. package/dist/form-rhf.js.map +1 -0
  22. package/dist/index.d.ts +2881 -0
  23. package/dist/index.js +9368 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/line-chart.d.ts +81 -0
  26. package/dist/line-chart.js +1879 -0
  27. package/dist/line-chart.js.map +1 -0
  28. package/dist/pie-chart.d.ts +64 -0
  29. package/dist/pie-chart.js +1094 -0
  30. package/dist/pie-chart.js.map +1 -0
  31. package/dist/radar-chart.d.ts +67 -0
  32. package/dist/radar-chart.js +1318 -0
  33. package/dist/radar-chart.js.map +1 -0
  34. package/dist/radial-chart.d.ts +56 -0
  35. package/dist/radial-chart.js +1051 -0
  36. package/dist/radial-chart.js.map +1 -0
  37. package/dist/sankey-chart.d.ts +58 -0
  38. package/dist/sankey-chart.js +1179 -0
  39. package/dist/sankey-chart.js.map +1 -0
  40. package/package.json +135 -0
  41. package/src/scales.css +288 -0
  42. package/src/shiki.css +37 -0
  43. package/src/styles.css +23 -0
  44. package/src/theme.css +659 -0
@@ -0,0 +1,93 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { a as ChartConfig, f as TooltipVariant, T as TooltipRoundness } from './chart-tooltip-DajpzJRy.js';
3
+ import { a as BrushRange } from './chart-brush-BoxY9aDm.js';
4
+ import { b as ChartLegendVariant } from './chart-legend-Dv9pqes-.js';
5
+ import { D as DotVariant } from './chart-dot-8H287EDv.js';
6
+ import { ReactNode, ComponentProps, FC } from 'react';
7
+ import { ComposedChart as ComposedChart$1, Line as Line$1, Bar as Bar$1, CartesianGrid, XAxis as XAxis$1, YAxis as YAxis$1 } from 'recharts';
8
+ import 'recharts/types/component/DefaultTooltipContent';
9
+
10
+ type CurveType = ComponentProps<typeof Line$1>["type"];
11
+ type StrokeVariant = "solid" | "dashed" | "animated-dashed";
12
+ type BarVariant = "default" | "duotone" | "duotone-reverse" | "gradient" | "stripped";
13
+ type ComposedAnimationType = "none" | "left-to-right" | "right-to-left" | "center-out" | "edges-in";
14
+ type ValidateConfigKeys<TData, TConfig> = {
15
+ [K in keyof TConfig]: K extends keyof TData ? ChartConfig[string] : never;
16
+ };
17
+ type ComposedChartBaseProps<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>> = {
18
+ config: TConfig & ValidateConfigKeys<TData, TConfig>;
19
+ data: TData[];
20
+ children: ReactNode;
21
+ className?: string;
22
+ chartProps?: ComponentProps<typeof ComposedChart$1>;
23
+ curveType?: CurveType;
24
+ animationType?: ComposedAnimationType;
25
+ barGap?: number;
26
+ barCategoryGap?: number;
27
+ defaultSelectedDataKey?: string | null;
28
+ onSelectionChange?: (selectedDataKey: string | null) => void;
29
+ isLoading?: boolean;
30
+ loadingBars?: number;
31
+ showBrush?: boolean;
32
+ xDataKey?: keyof TData & string;
33
+ brushHeight?: number;
34
+ brushFormatLabel?: (value: unknown, index: number) => string;
35
+ onBrushChange?: (range: BrushRange) => void;
36
+ };
37
+ type ComposedChartProps<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>> = ComposedChartBaseProps<TData, TConfig>;
38
+
39
+ declare function ComposedChart<TData extends Record<string, unknown>, TConfig extends Record<string, ChartConfig[string]>>({ config, data, children, className, chartProps, curveType, animationType, barGap, barCategoryGap, defaultSelectedDataKey, onSelectionChange, isLoading, loadingBars, showBrush, xDataKey, brushHeight, brushFormatLabel, onBrushChange, }: ComposedChartProps<TData, TConfig>): react_jsx_runtime.JSX.Element;
40
+ type BarProps = {
41
+ dataKey: string;
42
+ variant?: BarVariant;
43
+ radius?: number;
44
+ animationType?: ComposedAnimationType;
45
+ isClickable?: boolean;
46
+ enableHoverHighlight?: boolean;
47
+ barProps?: ComponentProps<typeof Bar$1>;
48
+ };
49
+ declare function Bar({ dataKey, variant, radius, animationType, isClickable, enableHoverHighlight, barProps, }: BarProps): react_jsx_runtime.JSX.Element | null;
50
+ type LineProps = {
51
+ dataKey: string;
52
+ strokeVariant?: StrokeVariant;
53
+ curveType?: CurveType;
54
+ animationType?: ComposedAnimationType;
55
+ connectNulls?: boolean;
56
+ isClickable?: boolean;
57
+ children?: ReactNode;
58
+ lineProps?: ComponentProps<typeof Line$1>;
59
+ };
60
+ declare function Line({ dataKey, strokeVariant, curveType, animationType, connectNulls, isClickable, children, lineProps, }: LineProps): react_jsx_runtime.JSX.Element | null;
61
+ type DotProps = {
62
+ variant?: DotVariant;
63
+ };
64
+ declare const Dot: FC<DotProps>;
65
+ declare const ActiveDot: FC<DotProps>;
66
+ type XAxisProps = ComponentProps<typeof XAxis$1>;
67
+ declare function XAxis({ tickLine, axisLine, tickMargin, minTickGap, ...props }: XAxisProps): react_jsx_runtime.JSX.Element | null;
68
+ type YAxisProps = ComponentProps<typeof YAxis$1>;
69
+ declare function YAxis({ tickLine, axisLine, tickMargin, minTickGap, width, ...props }: YAxisProps): react_jsx_runtime.JSX.Element | null;
70
+ type GridProps = ComponentProps<typeof CartesianGrid>;
71
+ declare function Grid({ vertical, strokeDasharray, ...props }: GridProps): react_jsx_runtime.JSX.Element;
72
+ type TooltipProps = {
73
+ variant?: TooltipVariant;
74
+ roundness?: TooltipRoundness;
75
+ defaultIndex?: number;
76
+ cursor?: boolean;
77
+ };
78
+ declare function Tooltip({ variant, roundness, defaultIndex, cursor, }: TooltipProps): react_jsx_runtime.JSX.Element | null;
79
+ type LegendProps = {
80
+ variant?: ChartLegendVariant;
81
+ align?: "left" | "center" | "right";
82
+ verticalAlign?: "top" | "middle" | "bottom";
83
+ isClickable?: boolean;
84
+ };
85
+ declare function Legend({ variant, align, verticalAlign, isClickable, }: LegendProps): react_jsx_runtime.JSX.Element;
86
+ declare function useLoadingData(isLoading: boolean, loadingBars?: number): {
87
+ loadingData: {
88
+ loading: number;
89
+ }[];
90
+ onShimmerExit: () => void;
91
+ };
92
+
93
+ export { ActiveDot, Bar, ComposedChart, type ComposedChartProps, Dot, Grid, Legend, Line, Tooltip, XAxis, YAxis, useLoadingData };