@banyan_cloud/roots 2.0.42 → 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.
- package/dist/esm/index.js +969 -2556
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/components/buttons/baseButton/types/index.d.ts +1 -1
- package/dist/esm/src/components/codeSnippet/CodeSnippet.d.ts +2 -13
- package/dist/esm/src/components/codeSnippet/index.d.ts +1 -1
- package/dist/esm/src/components/codeSnippet/types/index.d.ts +29 -0
- package/dist/esm/src/components/icons/Clock/Clock.d.ts +5 -3
- package/dist/esm/src/components/icons/Clock/index.d.ts +1 -1
- package/dist/esm/src/components/index.d.ts +0 -1
- package/dist/esm/src/components/input/richEditor/RichEditor.d.ts +3 -8
- package/dist/esm/src/components/input/richEditor/assets/index.d.ts +22 -22
- package/dist/esm/src/components/input/richEditor/types/index.d.ts +28 -0
- package/dist/esm/src/components/input/textField/TextField.d.ts +3 -7
- package/dist/esm/src/components/modal/constants/index.d.ts +15 -15
- package/dist/esm/src/components/modal/dialogBox/DialogBox.d.ts +2 -1
- package/dist/esm/src/components/modal/types/index.d.ts +1 -2
- package/dist/esm/src/components/popover/Popover.d.ts +10 -8
- package/dist/esm/src/components/popper/Popper.d.ts +4 -2
- package/dist/esm/src/components/sidePanel/BaseSidePanel.d.ts +33 -13
- package/dist/esm/src/components/sidePanel/index.d.ts +1 -1
- package/dist/esm/src/components/skeleton/Skeleton.d.ts +11 -28
- package/dist/esm/src/components/table/types/index.d.ts +1 -0
- package/dist/esm/src/components/toggle/Toggle.d.ts +1 -1
- package/dist/esm/src/components/widget/BaseWidget.d.ts +80 -1
- package/dist/esm/src/components/widget/index.d.ts +1 -1
- package/package.json +2 -6
- package/dist/esm/src/components/chartsV2/BarChart/BaseVerticalBarChart.d.ts +0 -4
- package/dist/esm/src/components/chartsV2/BarChart/BaseVerticalBarChartData.d.ts +0 -121
- package/dist/esm/src/components/chartsV2/BarChart/index.d.ts +0 -1
- package/dist/esm/src/components/chartsV2/BarChart/types/index.d.ts +0 -94
- package/dist/esm/src/components/chartsV2/LineChart/BaseAreaChart.d.ts +0 -66
- package/dist/esm/src/components/chartsV2/LineChart/BaseAreaChartData.d.ts +0 -81
- package/dist/esm/src/components/chartsV2/LineChart/index.d.ts +0 -1
- package/dist/esm/src/components/chartsV2/capsuleChart/CapsuleChart.d.ts +0 -39
- package/dist/esm/src/components/chartsV2/capsuleChart/index.d.ts +0 -1
- package/dist/esm/src/components/chartsV2/index.d.ts +0 -5
- package/dist/esm/src/components/chartsV2/nestedPieChart/NestedPieChart.d.ts +0 -15
- package/dist/esm/src/components/chartsV2/nestedPieChart/Skeleton/BasePieChart.skeleton.d.ts +0 -5
- package/dist/esm/src/components/chartsV2/nestedPieChart/Skeleton/index.d.ts +0 -1
- package/dist/esm/src/components/chartsV2/nestedPieChart/index.d.ts +0 -1
- package/dist/esm/src/components/chartsV2/pieChart/BasePieChart.d.ts +0 -3
- package/dist/esm/src/components/chartsV2/pieChart/BasePieChartData.d.ts +0 -62
- package/dist/esm/src/components/chartsV2/pieChart/index.d.ts +0 -1
- package/dist/esm/src/components/chartsV2/pieChart/types/index.d.ts +0 -101
- package/dist/esm/src/components/chartsV2/utils/index.d.ts +0 -2
- package/dist/esm/src/components/widget/BaseV2Widget/BaseV2Widget.d.ts +0 -2
- package/dist/esm/src/components/widget/BaseV2Widget/index.d.ts +0 -1
- package/dist/esm/src/components/widget/fallback/WidgetFallback.d.ts +0 -23
- package/dist/esm/src/components/widget/fallback/index.d.ts +0 -1
|
@@ -7,7 +7,7 @@ export interface BaseButtonProps extends BaseCellProps<'button', false> {
|
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
8
|
id?: string | undefined;
|
|
9
9
|
type?: ButtonType;
|
|
10
|
-
onClick?: ((event: MouseEvent<HTMLElement>) => void) | undefined;
|
|
10
|
+
onClick?: ((event: MouseEvent<HTMLElement>) => void | Promise<void>) | undefined;
|
|
11
11
|
blurOnClick?: boolean;
|
|
12
12
|
variant?: ButtonVariant;
|
|
13
13
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
+
import type { CodeSnippetProps } from './types';
|
|
2
|
+
declare const CodeSnippet: (props: CodeSnippetProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
3
|
export default CodeSnippet;
|
|
2
|
-
declare function CodeSnippet(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace CodeSnippet {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
let copy: any;
|
|
6
|
-
let code: any;
|
|
7
|
-
let language: any;
|
|
8
|
-
let showLineNumbers: any;
|
|
9
|
-
let theme: any;
|
|
10
|
-
let className: any;
|
|
11
|
-
let onClick: any;
|
|
12
|
-
let parentKeyToSelect: any;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as CodeSnippet } from
|
|
1
|
+
export { default as CodeSnippet } from './CodeSnippet';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MotionProps } from 'framer-motion';
|
|
2
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export interface CodeSnippetProps {
|
|
4
|
+
/**
|
|
5
|
+
Show Copy Button if true
|
|
6
|
+
*/
|
|
7
|
+
copy?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Code snippet in string format
|
|
10
|
+
*/
|
|
11
|
+
code: string;
|
|
12
|
+
/**
|
|
13
|
+
* Code's programming language
|
|
14
|
+
*/
|
|
15
|
+
language: string;
|
|
16
|
+
/**
|
|
17
|
+
* Show Line numbers in the left if true
|
|
18
|
+
*/
|
|
19
|
+
showLineNumbers?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Theme of Code Snippet
|
|
22
|
+
*/
|
|
23
|
+
theme: 'light' | 'dark';
|
|
24
|
+
/**
|
|
25
|
+
* class name to style the code ("pre" tag). Not the container.
|
|
26
|
+
*/
|
|
27
|
+
className?: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
export type MotionSpanProps = ComponentPropsWithoutRef<'span'> & MotionProps;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
declare const Clock: ({ className, width, height, }: {
|
|
2
|
+
className?: string | undefined;
|
|
3
|
+
width?: number | string | undefined;
|
|
4
|
+
height?: number | string | undefined;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
6
|
export default Clock;
|
|
2
|
-
declare function Clock({ className }: {
|
|
3
|
-
className: any;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as ClockIcon } from
|
|
1
|
+
export { default as ClockIcon } from './Clock';
|
|
@@ -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
|
|
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
|
-
})
|
|
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,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { MiddlewareOptions, Placement } from '../../popover/Popover';
|
|
2
3
|
type InputType = 'text' | 'email' | 'password' | 'textarea' | (string & {});
|
|
3
4
|
interface Feedback {
|
|
4
5
|
error?: string | undefined;
|
|
@@ -10,16 +11,12 @@ interface LeftRightIconProps {
|
|
|
10
11
|
type LeftComponentType = React.ComponentType<LeftRightIconProps>;
|
|
11
12
|
type RightComponentType = React.ComponentType<LeftRightIconProps>;
|
|
12
13
|
interface AutocompleteOptions {
|
|
13
|
-
/** Whether popover is open */
|
|
14
|
-
open?: boolean;
|
|
15
|
-
/** Control open state */
|
|
16
|
-
setOpen?: (open: boolean) => void;
|
|
17
14
|
/** Decide when to open based on the current input */
|
|
18
15
|
predicate?: (input: string) => boolean;
|
|
19
16
|
/** Popover placement (kept broad to avoid coupling to the popper types) */
|
|
20
|
-
placement?:
|
|
17
|
+
placement?: Placement;
|
|
21
18
|
/** Popover middleware options (library-specific) */
|
|
22
|
-
middlewareOptions?:
|
|
19
|
+
middlewareOptions?: MiddlewareOptions;
|
|
23
20
|
/** Renderer for the autocomplete content */
|
|
24
21
|
render?: React.ComponentType<{
|
|
25
22
|
name?: string | undefined;
|
|
@@ -51,7 +48,6 @@ export interface TextFieldProps {
|
|
|
51
48
|
maxLength?: number;
|
|
52
49
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
53
50
|
/** Whether to enable autocomplete popover */
|
|
54
|
-
autocomplete?: boolean | undefined;
|
|
55
51
|
autocompleteOptions?: AutocompleteOptions | undefined;
|
|
56
52
|
}
|
|
57
53
|
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export declare const DEFAULT_ANIMATION_PROPS: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
initial: {
|
|
3
|
+
opacity: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
x: string;
|
|
6
|
+
y: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
animate: {
|
|
9
|
+
opacity: number;
|
|
10
|
+
scale: number;
|
|
11
|
+
x: string;
|
|
12
|
+
y: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
exit: {
|
|
15
|
+
scale: number;
|
|
16
|
+
opacity: number;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
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?:
|
|
35
|
+
animationProperties?: Record<string, object>;
|
|
37
36
|
}
|
|
38
37
|
export type FooterProps = ComponentPropsWithoutRef<'footer'> & MotionProps;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { flip, offset, shift } from '@floating-ui/react-dom-interactions';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
4
|
-
|
|
3
|
+
export type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
4
|
+
interface VirtualElement {
|
|
5
5
|
getBoundingClientRect: () => DOMRect;
|
|
6
6
|
contextElement?: Element | null;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
type ReferenceEl = Element | VirtualElement | null;
|
|
9
|
-
interface MiddlewareOptions {
|
|
9
|
+
export interface MiddlewareOptions {
|
|
10
10
|
offset?: Parameters<typeof offset>[0];
|
|
11
11
|
shift?: Parameters<typeof shift>[0];
|
|
12
12
|
flip?: Parameters<typeof flip>[0];
|
|
@@ -14,14 +14,16 @@ interface MiddlewareOptions {
|
|
|
14
14
|
export interface PopoverProps {
|
|
15
15
|
children: React.ReactNode;
|
|
16
16
|
anchorEl: ReferenceEl;
|
|
17
|
-
open
|
|
18
|
-
setOpen
|
|
17
|
+
open?: boolean | undefined;
|
|
18
|
+
setOpen?: ((open: boolean) => void) | undefined;
|
|
19
19
|
className?: string;
|
|
20
20
|
transparent?: boolean;
|
|
21
21
|
onClose?: () => void;
|
|
22
|
-
placement?: Placement;
|
|
22
|
+
placement?: Placement | undefined;
|
|
23
23
|
theme?: 'light' | 'dark';
|
|
24
|
-
middlewareOptions?: MiddlewareOptions;
|
|
24
|
+
middlewareOptions?: MiddlewareOptions | undefined;
|
|
25
|
+
lockScroll?: boolean;
|
|
26
|
+
withOverlay?: boolean;
|
|
25
27
|
}
|
|
26
28
|
declare const Popover: React.FC<PopoverProps>;
|
|
27
29
|
export default Popover;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface PopperProps {
|
|
3
|
-
open
|
|
3
|
+
open?: boolean | undefined;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
wrapperId?: string;
|
|
6
6
|
backdrop?: boolean;
|
|
7
|
-
className?: string;
|
|
7
|
+
className?: string | undefined;
|
|
8
8
|
transparent?: boolean;
|
|
9
|
+
lockScroll?: boolean | undefined;
|
|
10
|
+
withOverlay?: boolean | undefined;
|
|
9
11
|
}
|
|
10
12
|
declare const Popper: React.FC<PopperProps>;
|
|
11
13
|
export default Popper;
|
|
@@ -1,14 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
1
|
+
export { default as BaseSidePanel } from './BaseSidePanel';
|
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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;
|
|
@@ -23,6 +23,7 @@ export interface TableColumn {
|
|
|
23
23
|
columnFilter?: boolean;
|
|
24
24
|
html?: boolean;
|
|
25
25
|
json?: boolean;
|
|
26
|
+
formatter?: ((value: string, index: number | undefined, datum: Record<string, unknown>) => string) | undefined;
|
|
26
27
|
}
|
|
27
28
|
export interface TableDrawerData {
|
|
28
29
|
datum: Record<string, unknown>;
|
|
@@ -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
|
|
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.
|
|
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"
|
|
@@ -74,6 +69,7 @@
|
|
|
74
69
|
"@types/minimatch": "^6.0.0",
|
|
75
70
|
"@types/react": "^19.1.2",
|
|
76
71
|
"@types/react-dom": "^19.1.3",
|
|
72
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
77
73
|
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
78
74
|
"@typescript-eslint/parser": "^8.32.1",
|
|
79
75
|
"babel-plugin-named-exports-order": "^0.0.2",
|