@banyan_cloud/roots 2.0.43 → 2.0.44

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 (39) hide show
  1. package/dist/esm/index.js +867 -2449
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/src/components/index.d.ts +0 -1
  4. package/dist/esm/src/components/input/richEditor/RichEditor.d.ts +3 -8
  5. package/dist/esm/src/components/input/richEditor/assets/index.d.ts +22 -22
  6. package/dist/esm/src/components/input/richEditor/types/index.d.ts +28 -0
  7. package/dist/esm/src/components/modal/constants/index.d.ts +15 -15
  8. package/dist/esm/src/components/modal/dialogBox/DialogBox.d.ts +2 -1
  9. package/dist/esm/src/components/modal/types/index.d.ts +1 -2
  10. package/dist/esm/src/components/sidePanel/BaseSidePanel.d.ts +33 -13
  11. package/dist/esm/src/components/sidePanel/index.d.ts +1 -1
  12. package/dist/esm/src/components/skeleton/Skeleton.d.ts +11 -28
  13. package/dist/esm/src/components/toggle/Toggle.d.ts +1 -1
  14. package/dist/esm/src/components/widget/BaseWidget.d.ts +80 -1
  15. package/dist/esm/src/components/widget/index.d.ts +1 -1
  16. package/package.json +1 -6
  17. package/dist/esm/src/components/chartsV2/BarChart/BaseVerticalBarChart.d.ts +0 -4
  18. package/dist/esm/src/components/chartsV2/BarChart/BaseVerticalBarChartData.d.ts +0 -121
  19. package/dist/esm/src/components/chartsV2/BarChart/index.d.ts +0 -1
  20. package/dist/esm/src/components/chartsV2/BarChart/types/index.d.ts +0 -94
  21. package/dist/esm/src/components/chartsV2/LineChart/BaseAreaChart.d.ts +0 -66
  22. package/dist/esm/src/components/chartsV2/LineChart/BaseAreaChartData.d.ts +0 -81
  23. package/dist/esm/src/components/chartsV2/LineChart/index.d.ts +0 -1
  24. package/dist/esm/src/components/chartsV2/capsuleChart/CapsuleChart.d.ts +0 -39
  25. package/dist/esm/src/components/chartsV2/capsuleChart/index.d.ts +0 -1
  26. package/dist/esm/src/components/chartsV2/index.d.ts +0 -5
  27. package/dist/esm/src/components/chartsV2/nestedPieChart/NestedPieChart.d.ts +0 -15
  28. package/dist/esm/src/components/chartsV2/nestedPieChart/Skeleton/BasePieChart.skeleton.d.ts +0 -5
  29. package/dist/esm/src/components/chartsV2/nestedPieChart/Skeleton/index.d.ts +0 -1
  30. package/dist/esm/src/components/chartsV2/nestedPieChart/index.d.ts +0 -1
  31. package/dist/esm/src/components/chartsV2/pieChart/BasePieChart.d.ts +0 -3
  32. package/dist/esm/src/components/chartsV2/pieChart/BasePieChartData.d.ts +0 -62
  33. package/dist/esm/src/components/chartsV2/pieChart/index.d.ts +0 -1
  34. package/dist/esm/src/components/chartsV2/pieChart/types/index.d.ts +0 -101
  35. package/dist/esm/src/components/chartsV2/utils/index.d.ts +0 -2
  36. package/dist/esm/src/components/widget/BaseV2Widget/BaseV2Widget.d.ts +0 -2
  37. package/dist/esm/src/components/widget/BaseV2Widget/index.d.ts +0 -1
  38. package/dist/esm/src/components/widget/fallback/WidgetFallback.d.ts +0 -23
  39. package/dist/esm/src/components/widget/fallback/index.d.ts +0 -1
@@ -5,7 +5,6 @@ export * from './buttons';
5
5
  export * from './callout';
6
6
  export * from './cell';
7
7
  export * from './charts';
8
- export * from './chartsV2';
9
8
  export * from './codeSnippet';
10
9
  export * from './datePicker';
11
10
  export * from './displayPicture';
@@ -1,9 +1,4 @@
1
+ import React from 'react';
2
+ import type { RichEditorProps } from './types';
3
+ declare const RichEditor: React.FC<RichEditorProps>;
1
4
  export default RichEditor;
2
- declare function RichEditor({ className, defaultContent, setContent, placeholder, hiddenMenu, editable, }: {
3
- className?: string | undefined;
4
- defaultContent?: string | undefined;
5
- setContent?: (() => void) | undefined;
6
- placeholder?: string | undefined;
7
- hiddenMenu?: {} | undefined;
8
- editable?: boolean | undefined;
9
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,23 @@
1
- export function ColorPalletteIcon({ color }: {
1
+ export declare const ColorPalletteIcon: ({ color }: {
2
+ color: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const ColorHighlightIcon: ({ color }: {
5
+ color: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const TextTransformIcon: ({ color }: {
8
+ color: string;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const TextAlignIcon: {
11
+ Left: ({ color }: {
12
+ color?: string | undefined;
13
+ }) => import("react/jsx-runtime").JSX.Element;
14
+ Center: ({ color }: {
15
+ color?: string | undefined;
16
+ }) => import("react/jsx-runtime").JSX.Element;
17
+ Right: ({ color }: {
18
+ color?: string | undefined;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ };
21
+ export declare const TextLinkIcon: ({ color }: {
2
22
  color?: string | undefined;
3
- }): import("react/jsx-runtime").JSX.Element;
4
- export function ColorHighlightIcon({ color }: {
5
- color?: string | undefined;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- export function TextTransformIcon({ color }: {
8
- color?: string | undefined;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export namespace TextAlignIcon {
11
- function Left({ color }: {
12
- color: any;
13
- }): import("react/jsx-runtime").JSX.Element;
14
- function Center({ color }: {
15
- color: any;
16
- }): import("react/jsx-runtime").JSX.Element;
17
- function Right({ color }: {
18
- color: any;
19
- }): import("react/jsx-runtime").JSX.Element;
20
- }
21
- export function TextLinkIcon({ color }: {
22
- color: any;
23
- }): import("react/jsx-runtime").JSX.Element;
23
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import type { Editor } from '@tiptap/core';
2
+ import type React from 'react';
3
+ export type TextType = 'p' | 'h1' | 'h2' | 'h3';
4
+ export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
5
+ export type HiddenMenuKey = 'bold' | 'italic' | 'underline' | 'strike' | 'color' | 'textType' | 'align' | 'link';
6
+ export type HiddenMenu = Partial<Record<HiddenMenuKey, boolean>>;
7
+ export interface RichEditorProps {
8
+ className?: string;
9
+ defaultContent?: string;
10
+ setContent?: (html: string) => void;
11
+ placeholder?: string;
12
+ hiddenMenu?: HiddenMenu;
13
+ editable?: boolean;
14
+ }
15
+ export interface ToolBarProps {
16
+ editor: Editor | null;
17
+ textType: TextType;
18
+ onTextTypeDropdownChange: (e: React.SyntheticEvent, value: string | string[] | null | undefined) => void;
19
+ setLink: () => void;
20
+ hiddenMenu: HiddenMenu;
21
+ }
22
+ /** Small context so the dialog body can read/update the link draft
23
+ * without defining components inside render.
24
+ */
25
+ export interface LinkDialogContextValue {
26
+ linkDraft: string;
27
+ setLinkDraft: (v: string) => void;
28
+ }
@@ -1,21 +1,21 @@
1
1
  export declare const DEFAULT_ANIMATION_PROPS: {
2
- readonly initial: {
3
- readonly opacity: 0;
4
- readonly scale: 0;
5
- readonly x: "-50%";
6
- readonly y: "-50%";
2
+ initial: {
3
+ opacity: number;
4
+ scale: number;
5
+ x: string;
6
+ y: string;
7
7
  };
8
- readonly animate: {
9
- readonly opacity: 1;
10
- readonly scale: 1;
11
- readonly x: "-50%";
12
- readonly y: "-50%";
8
+ animate: {
9
+ opacity: number;
10
+ scale: number;
11
+ x: string;
12
+ y: string;
13
13
  };
14
- readonly exit: {
15
- readonly scale: 0;
16
- readonly opacity: 0;
14
+ exit: {
15
+ scale: number;
16
+ opacity: number;
17
17
  };
18
- readonly transition: {
19
- readonly duration: 0.15;
18
+ transition: {
19
+ duration: number;
20
20
  };
21
21
  };
@@ -7,6 +7,7 @@ export interface DialogBoxProps {
7
7
  }
8
8
  export interface DialogActionHandlers {
9
9
  dismiss: () => void;
10
+ setNoDismissEnabled?: ((enabled: boolean) => void) | undefined;
10
11
  }
11
12
  export type DialogActionCallback = (handlers: DialogActionHandlers) => void;
12
13
  export interface DialogOpenOptions {
@@ -21,7 +22,7 @@ export interface DialogOpenOptions {
21
22
  customAction?: ComponentType<DialogActionHandlers> | null;
22
23
  body?: ComponentType<{
23
24
  dismiss: () => void;
24
- setNoDismissEnabled: (enabled: boolean) => void;
25
+ setNoDismissEnabled?: (enabled: boolean) => void;
25
26
  }> | null;
26
27
  hideCancel?: boolean;
27
28
  noDismiss?: boolean;
@@ -1,6 +1,5 @@
1
1
  import type { MotionProps } from 'framer-motion';
2
2
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
3
- import type { DEFAULT_ANIMATION_PROPS } from '../constants';
4
3
  /**
5
4
  * Footer props available for the default `ModalFooter` component.
6
5
  */
@@ -33,6 +32,6 @@ export interface BaseModalProps {
33
32
  hideCrossDismiss?: boolean | undefined;
34
33
  footerProps?: ModalFooterProps | undefined;
35
34
  animation?: boolean | undefined;
36
- animationProperties?: typeof DEFAULT_ANIMATION_PROPS;
35
+ animationProperties?: Record<string, object>;
37
36
  }
38
37
  export type FooterProps = ComponentPropsWithoutRef<'footer'> & MotionProps;
@@ -1,14 +1,34 @@
1
- export default BaseSidePanel;
2
- declare function BaseSidePanel(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace BaseSidePanel {
4
- namespace propTypes {
5
- let className: any;
6
- let renderHeader: any;
7
- let renderFooter: any;
8
- let open: any;
9
- let isModal: any;
10
- let toggle: any;
11
- let noDismiss: any;
12
- let animation: any;
13
- }
1
+ import React from 'react';
2
+ type TabsConfig = {
3
+ /** Passed straight through to <Tabs>. Kept intentionally broad. */
4
+ tabs?: unknown[];
5
+ className?: string;
6
+ };
7
+ type ToggleTableDrawer = {
8
+ data?: {
9
+ index?: number;
10
+ } & Record<string, unknown>;
11
+ } & Record<string, unknown>;
12
+ export interface BaseSidePanelProps {
13
+ className?: string;
14
+ renderHeader?: React.ReactNode;
15
+ renderFooter?: React.ReactNode;
16
+ children?: React.ReactNode;
17
+ /** When true, render inside BaseModal; otherwise render as a drawer div */
18
+ isModal?: boolean;
19
+ /** Open/close controls */
20
+ open?: boolean;
21
+ toggle?: () => void;
22
+ noDismiss?: boolean;
23
+ /** Slide-in animation (both for modal and drawer) */
24
+ animation?: boolean;
25
+ /** External state that tracks which table drawer/tab is open */
26
+ toggleTableDrawer?: ToggleTableDrawer;
27
+ setToggleTableDrawer?: (next: ToggleTableDrawer) => void;
28
+ /** Zero-based active tab index to sync from parent */
29
+ activeTab?: number;
30
+ /** Tabs configuration passed to <Tabs> */
31
+ tabsConfig?: TabsConfig;
14
32
  }
33
+ declare const BaseSidePanel: React.FC<BaseSidePanelProps>;
34
+ export default BaseSidePanel;
@@ -1 +1 @@
1
- export { default as BaseSidePanel } from "./BaseSidePanel";
1
+ export { default as BaseSidePanel } from './BaseSidePanel';
@@ -1,29 +1,12 @@
1
- export default Skeleton;
2
- declare function Skeleton(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace Skeleton {
4
- namespace propTypes {
5
- let className: any;
6
- let theme: any;
7
- let height: any;
8
- let width: any;
9
- let variant: any;
10
- let noAnimation: any;
11
- let style: any;
12
- }
13
- namespace defaultProps {
14
- let className_1: string;
15
- export { className_1 as className };
16
- let theme_1: string;
17
- export { theme_1 as theme };
18
- let height_1: null;
19
- export { height_1 as height };
20
- let width_1: string;
21
- export { width_1 as width };
22
- let variant_1: string;
23
- export { variant_1 as variant };
24
- let noAnimation_1: boolean;
25
- export { noAnimation_1 as noAnimation };
26
- let style_1: {};
27
- export { style_1 as style };
28
- }
1
+ import type { CSSProperties } from 'react';
2
+ interface SkeletonProps {
3
+ height?: number | string | undefined;
4
+ width?: number | string | undefined;
5
+ variant: 'text' | 'circle' | 'rounded' | 'ellipse';
6
+ theme: 'light' | 'dark';
7
+ className?: string | undefined;
8
+ style: CSSProperties;
9
+ noAnimation: boolean;
29
10
  }
11
+ declare const Skeleton: (props: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default Skeleton;
@@ -7,7 +7,7 @@ interface ToggleOption {
7
7
  disabled?: boolean;
8
8
  className?: string;
9
9
  }
10
- interface ToggleProps {
10
+ export interface ToggleProps {
11
11
  options?: ToggleOption[];
12
12
  multi?: boolean;
13
13
  defaultValue?: string | string[];
@@ -1,2 +1,81 @@
1
+ import React, { type CSSProperties, type MouseEvent, type ReactNode, type TouchEvent } from 'react';
2
+ interface SelectOption {
3
+ title: string;
4
+ value: string;
5
+ }
6
+ interface ToggleOption {
7
+ title: string;
8
+ value: string;
9
+ }
10
+ interface BaseOptionData {
11
+ id: string;
12
+ title?: string;
13
+ placeholder?: string;
14
+ value?: string | number | boolean | Date | null;
15
+ className?: string;
16
+ }
17
+ interface DropdownOptionData extends BaseOptionData {
18
+ id: 'dropdown';
19
+ onChange: (event: React.SyntheticEvent, value: string | string[] | null | undefined) => void;
20
+ selectOption: SelectOption[];
21
+ }
22
+ interface ExpandOptionData extends BaseOptionData {
23
+ id: 'expand';
24
+ onClick: () => void;
25
+ }
26
+ interface DatePickerOptionData extends BaseOptionData {
27
+ id: 'datepicker';
28
+ range?: boolean;
29
+ onApply: (date: Date | Date[] | null) => void;
30
+ onClear: () => void;
31
+ date: Date | Date[] | null;
32
+ }
33
+ interface FilterOptionData extends BaseOptionData {
34
+ id: 'filter';
35
+ }
36
+ interface ToggleOptionData extends BaseOptionData {
37
+ id: 'toggle';
38
+ options: ToggleOption[];
39
+ onChange?: (value: string | number | boolean) => void;
40
+ }
41
+ interface CustomOptionData extends BaseOptionData {
42
+ id: 'custom';
43
+ render: () => ReactNode;
44
+ }
45
+ type OptionData = DropdownOptionData | ExpandOptionData | DatePickerOptionData | FilterOptionData | ToggleOptionData | CustomOptionData;
46
+ interface ToggleDrawerData {
47
+ index: number;
48
+ [key: string]: unknown;
49
+ }
50
+ interface BodyProps {
51
+ toggle: (params?: {
52
+ data?: ToggleDrawerData;
53
+ }) => void;
54
+ }
55
+ interface BaseWidgetProps {
56
+ loading?: boolean;
57
+ title?: string;
58
+ titleOptions?: ReactNode;
59
+ showBack?: boolean;
60
+ onBack?: () => void;
61
+ options?: OptionData[];
62
+ className?: string;
63
+ children?: ReactNode;
64
+ drawerClassName?: string;
65
+ overlayClassName?: string;
66
+ setFallback?: (value: boolean) => void;
67
+ style?: CSSProperties;
68
+ onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
69
+ onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
70
+ onTouchEnd?: (event: TouchEvent<HTMLDivElement>) => void;
71
+ titleDesc?: string;
72
+ body?: React.ComponentType<BodyProps>;
73
+ headerOptions?: OptionData[];
74
+ rightActions?: (toggleDrawerParams: {
75
+ toggleDrawer: (params?: {
76
+ data?: ToggleDrawerData;
77
+ }) => void;
78
+ }) => ReactNode;
79
+ }
80
+ declare const BaseWidget: React.ForwardRefExoticComponent<BaseWidgetProps & React.RefAttributes<HTMLDivElement>>;
1
81
  export default BaseWidget;
2
- declare const BaseWidget: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
@@ -1 +1 @@
1
- export { default as BaseWidget } from "./BaseWidget";
1
+ export { default as BaseWidget } from './BaseWidget';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banyan_cloud/roots",
3
- "version": "2.0.43",
3
+ "version": "2.0.44",
4
4
  "description": "Design System Library which drives the Banyan Cloud products",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -23,16 +23,11 @@
23
23
  "@tiptap/pm": "^2.11.7",
24
24
  "@tiptap/react": "^2.11.7",
25
25
  "@tiptap/starter-kit": "^2.10.3",
26
- "chart.js": "^4.4.4",
27
- "chartjs-plugin-annotation": "^3.0.1",
28
- "chartjs-plugin-datalabels": "^2.2.0",
29
- "d3": "^7.8.5",
30
26
  "echarts": "^5.6.0",
31
27
  "echarts-for-react": "^3.0.2",
32
28
  "fast-equals": "^4.0.3",
33
29
  "framer-motion": "12.23.12",
34
30
  "react": "^18.2.0",
35
- "react-chartjs-2": "^5.2.0",
36
31
  "react-dom": "^18.2.0",
37
32
  "react-error-boundary": "^4.0.10",
38
33
  "react-syntax-highlighter": "^15.6.1"
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { BaseBarChartProps } from './types';
3
- declare const BaseBarChart: React.FC<BaseBarChartProps>;
4
- export default BaseBarChart;
@@ -1,121 +0,0 @@
1
- export declare const sampleData: {
2
- chartData: {
3
- MySql: {
4
- x1: number;
5
- };
6
- PgSql: {
7
- x1: number;
8
- };
9
- Oracle: {
10
- x1: number;
11
- };
12
- Oradcdcle: {
13
- x1: number;
14
- };
15
- Oracdcdcle: {
16
- x1: number;
17
- };
18
- };
19
- metaData: {
20
- totalControls: {
21
- x1: number;
22
- };
23
- };
24
- };
25
- export declare const sampleStackData: {
26
- chartData: {
27
- Authentication: {
28
- MySql: {
29
- x1: number;
30
- x2: number;
31
- x3: number;
32
- };
33
- PgSql: {
34
- x1: number;
35
- x2: number;
36
- x3: number;
37
- };
38
- };
39
- Setting: {
40
- MySql: {
41
- x1: number;
42
- x2: number;
43
- x3: number;
44
- };
45
- PgSql: {
46
- x1: number;
47
- x2: number;
48
- x3: number;
49
- };
50
- };
51
- 'High Availability': {
52
- MySql: {
53
- x1: number;
54
- x2: number;
55
- x3: number;
56
- };
57
- PgSql: {
58
- x1: number;
59
- x2: number;
60
- x3: number;
61
- };
62
- };
63
- Audit: {
64
- MySql: {
65
- x1: number;
66
- x2: number;
67
- x3: number;
68
- };
69
- PgSql: {
70
- x1: number;
71
- x2: number;
72
- x3: number;
73
- };
74
- };
75
- Authorization: {
76
- MySql: {
77
- x1: number;
78
- x2: number;
79
- x3: number;
80
- };
81
- PgSql: {
82
- x1: number;
83
- x2: number;
84
- x3: number;
85
- };
86
- };
87
- Patches: {
88
- MySql: {
89
- x1: number;
90
- x2: number;
91
- x3: number;
92
- };
93
- PgSql: {
94
- x1: number;
95
- x2: number;
96
- x3: number;
97
- };
98
- };
99
- };
100
- metaData: {
101
- controlsApplied: {
102
- MySql: {
103
- x1: number;
104
- };
105
- PgSql: {
106
- x1: number;
107
- };
108
- Oracle: {
109
- x1: number;
110
- };
111
- };
112
- keyData: {
113
- x1: string;
114
- x2: string;
115
- x3: string;
116
- };
117
- totalControls: {
118
- x1: number;
119
- };
120
- };
121
- };
@@ -1 +0,0 @@
1
- export { default as BaseBarChartV2 } from './BaseVerticalBarChart';
@@ -1,94 +0,0 @@
1
- import type { ChartDataset, ChartOptions, TooltipOptions } from 'chart.js';
2
- import type { Context } from 'chartjs-plugin-datalabels';
3
- import React from 'react';
4
- export type ChartDataItem = Record<string, number | null>;
5
- interface SeriesData {
6
- chartData: Record<string, ChartDataItem>;
7
- }
8
- interface TitleConfig {
9
- text?: string;
10
- left?: number;
11
- textStyle?: {
12
- fontSize?: number;
13
- };
14
- }
15
- interface GridOptions {
16
- gridContainLabel?: boolean;
17
- }
18
- export type AxisOptions = Record<string, string | number | boolean | object | undefined>;
19
- type BarChartType = 'bar';
20
- interface CustomFontOptions {
21
- size?: number;
22
- weight?: 'normal' | 'bold' | 'lighter' | 'bolder' | number;
23
- family?: string;
24
- lineHeight?: number | string;
25
- color?: string;
26
- }
27
- interface CustomTooltipOptions {
28
- borderWidth?: number;
29
- backgroundColor?: string;
30
- bodySpacing?: number;
31
- displayColors?: boolean;
32
- colorBoxWidth?: number;
33
- colorBoxHeight?: number;
34
- usePointStyle?: boolean;
35
- titleColor?: string;
36
- bodyColor?: string;
37
- bodyFont?: CustomFontOptions;
38
- callbacks?: TooltipOptions<BarChartType>['callbacks'];
39
- }
40
- export interface ChartDataLabelsOptions {
41
- anchor?: 'start' | 'center' | 'end';
42
- align?: 'start' | 'center' | 'end' | 'left' | 'right' | 'top' | 'bottom';
43
- backgroundColor?: string | CanvasGradient | CanvasPattern | ((context: Context) => string);
44
- borderColor?: string;
45
- borderRadius?: number;
46
- borderWidth?: number;
47
- clamp?: boolean;
48
- clip?: boolean;
49
- color?: string | ((context: Context) => string);
50
- display?: boolean | ((context: Context) => boolean);
51
- font?: Partial<CustomFontOptions>;
52
- formatter?: (value: unknown, context: Context) => string | number;
53
- offset?: number;
54
- opacity?: number;
55
- padding?: number | {
56
- top?: number;
57
- right?: number;
58
- bottom?: number;
59
- left?: number;
60
- };
61
- rotation?: number;
62
- textAlign?: 'left' | 'right' | 'center' | 'start' | 'end';
63
- textStrokeColor?: string;
64
- textStrokeWidth?: number;
65
- textShadowColor?: string;
66
- textShadowBlur?: number;
67
- }
68
- export interface BaseBarChartProps {
69
- loading?: boolean;
70
- seriesData: SeriesData;
71
- title?: TitleConfig;
72
- gridOptions?: GridOptions;
73
- width?: string | number;
74
- height?: string | number;
75
- barThickness?: number;
76
- borderRadius?: number;
77
- barColor1?: string;
78
- barColor2?: string;
79
- xAxisTitle?: string;
80
- yAxisTitle?: string;
81
- tooltip?: CustomTooltipOptions;
82
- legends?: object;
83
- chartOptions?: ChartOptions<'bar'>;
84
- chartDatasets?: Partial<ChartDataset<'bar'>>;
85
- xAxis?: AxisOptions;
86
- yAxis?: AxisOptions;
87
- styles?: React.CSSProperties;
88
- vertical?: boolean;
89
- stacked?: ChartDataset<'bar'>;
90
- extra?: object;
91
- dataLabelsOptions?: ChartDataLabelsOptions;
92
- barColors?: Record<string, string>;
93
- }
94
- export {};
@@ -1,66 +0,0 @@
1
- import { type ChartData, type ChartOptions, type TooltipCallbacks } from 'chart.js';
2
- import React from 'react';
3
- interface ChartDataType {
4
- metaData: {
5
- xAxisData: string[];
6
- };
7
- chartData: Record<string, number[]>;
8
- }
9
- interface TooltipConfig {
10
- bodySpacing?: number;
11
- displayColors?: boolean;
12
- colorBoxWidth?: number;
13
- colorBoxHeight?: number;
14
- usePointStyle?: boolean;
15
- displayTitle?: boolean;
16
- bodyFont?: Record<string, string>;
17
- titleColor?: string;
18
- bodyColor?: string;
19
- borderWidth?: number;
20
- callbacks?: Partial<TooltipCallbacks<'line'>>;
21
- }
22
- interface ChartProps {
23
- title?: string;
24
- seriesData: ChartDataType;
25
- tooltip?: TooltipConfig;
26
- legend?: {
27
- display?: boolean;
28
- position?: 'top' | 'left' | 'bottom' | 'right';
29
- icon?: boolean;
30
- legendStyles?: React.CSSProperties;
31
- circle?: boolean;
32
- customLabels?: (args: {
33
- label: string;
34
- index: number;
35
- color: string;
36
- }) => React.ReactElement;
37
- };
38
- xAxisLabelShow?: boolean;
39
- yAxisLabelShow?: boolean;
40
- xAxisLabel?: string;
41
- yAxisLabel?: string;
42
- axisLabelColor?: string;
43
- stacked?: boolean;
44
- smooth?: boolean;
45
- theme?: string;
46
- isLineChart?: boolean;
47
- xAxisPosition?: 'top' | 'bottom';
48
- xSplitLineShow?: boolean;
49
- xAxisLineShow?: boolean;
50
- axisSplitColor?: string;
51
- cursor?: string;
52
- xAxis?: Record<string, string>;
53
- yAxis?: Record<string, string>;
54
- width?: string | number;
55
- height?: string | number;
56
- chartOptions?: Partial<ChartOptions<'line'>>;
57
- chartOptionsProps?: Partial<ChartOptions<'line'>>;
58
- extra?: Record<string, string>;
59
- dataSetOptions?: Partial<ChartData<'line'>>;
60
- lineColors?: string[];
61
- borderColors?: string[];
62
- style?: React.CSSProperties;
63
- hoverEffect?: boolean;
64
- }
65
- declare const BaseAreaChart: React.FC<ChartProps>;
66
- export default BaseAreaChart;