@cloudtower/eagle 0.27.3 → 0.27.4

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.
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import BarChart from ".";
3
+ declare const meta: Meta<typeof BarChart>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BarChart>;
6
+ export declare const Demo: Story;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export declare function getWidth(input: number): string;
3
+ declare const BarChart: React.FC<{
4
+ data: Array<{
5
+ value: number;
6
+ color: string;
7
+ }>;
8
+ total: number;
9
+ }>;
10
+ export default BarChart;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import ChartWithTooltip from "./";
3
+ declare const meta: Meta<typeof ChartWithTooltip>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ChartWithTooltip>;
6
+ export declare const BarChart: Story;
7
+ export declare const DountChart: Story;
@@ -0,0 +1,40 @@
1
+ import React from "react";
2
+ import { ChartType, IUnitWithChartProps } from "../UnitWithChart";
3
+ export interface ICWTProps {
4
+ title: {
5
+ label: string;
6
+ value?: number | null;
7
+ };
8
+ items: {
9
+ label: string;
10
+ color: string;
11
+ value: number;
12
+ saturated?: boolean;
13
+ }[];
14
+ rawValue?: number | null;
15
+ unit: IUnitWithChartProps["unit"];
16
+ chartType?: ChartType;
17
+ /**
18
+ * pass the parameter if table cell unit different with tooltip
19
+ */
20
+ tableUnit?: IUnitWithChartProps["unit"];
21
+ saturated?: boolean;
22
+ }
23
+ export type IChartWithUnitProps = {
24
+ total: number;
25
+ items: {
26
+ label: string;
27
+ color: string;
28
+ value: number;
29
+ }[];
30
+ rawValue?: number | null;
31
+ unit: IUnitWithChartProps["unit"];
32
+ chartType?: ChartType;
33
+ /**
34
+ * pass the parameter if table cell unit different with tooltip
35
+ */
36
+ tableUnit?: IUnitWithChartProps["unit"];
37
+ };
38
+ export declare const ChartWithUnit: React.FC<IChartWithUnitProps>;
39
+ declare const ChartWithTooltip: React.FunctionComponent<ICWTProps>;
40
+ export default ChartWithTooltip;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import DonutChart from ".";
3
+ declare const meta: Meta<typeof DonutChart>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DonutChart>;
6
+ export declare const Demo: Story;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export interface IDonutChartProps {
3
+ data: Array<object>;
4
+ dataKey: string;
5
+ width: number;
6
+ height: number;
7
+ barSize: number;
8
+ innerRadius: number;
9
+ outerRadius: number;
10
+ }
11
+ declare const DonutChart: React.FC<IDonutChartProps>;
12
+ export default DonutChart;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import UnitWithChart from ".";
3
+ declare const meta: Meta<typeof UnitWithChart>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof UnitWithChart>;
6
+ export declare const BarChart: Story;
7
+ export declare const DountChart: Story;
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ declare const units: {
3
+ Percent: import("../../spec").PercentFn;
4
+ Byte: import("../../spec").UnitFn;
5
+ Frequency: import("../../spec").UnitFn;
6
+ Speed: import("../../spec").UnitFn;
7
+ Bps: import("../../spec").UnitFn;
8
+ BitPerSecond: import("../../spec").UnitFn;
9
+ Bit: import("../../spec").UnitFn;
10
+ Second: import("../../spec").UnitFn;
11
+ };
12
+ type Size = "small" | "medium" | "large";
13
+ export type ChartType = "donutChart" | "barChart";
14
+ export declare const UnitWrapper: import("@linaria/core").LinariaClassName;
15
+ export interface IUnitWithChartProps {
16
+ rawValue?: number | null;
17
+ total?: number | null;
18
+ data?: {
19
+ label: string;
20
+ color: string;
21
+ value: number;
22
+ }[];
23
+ unit: keyof typeof units;
24
+ color?: string;
25
+ size?: Size;
26
+ chartType?: ChartType;
27
+ saturated?: boolean;
28
+ }
29
+ declare const UnitWithChart: React.FC<IUnitWithChartProps>;
30
+ export default UnitWithChart;