@banyan_cloud/roots 2.0.8 → 2.0.9

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/esm/index.js +421 -448
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/src/components/buttons/baseButton/BaseButton.d.ts +3 -1
  4. package/dist/esm/src/components/buttons/baseButton/index.d.ts +2 -1
  5. package/dist/esm/src/components/buttons/baseButton/types/index.d.ts +14 -0
  6. package/dist/esm/src/components/buttons/button/Button.d.ts +3 -20
  7. package/dist/esm/src/components/buttons/button/index.d.ts +2 -1
  8. package/dist/esm/src/components/buttons/button/types/index.d.ts +9 -0
  9. package/dist/esm/src/components/buttons/chip/Chip.d.ts +3 -1
  10. package/dist/esm/src/components/buttons/chip/index.d.ts +2 -1
  11. package/dist/esm/src/components/buttons/chip/types/index.d.ts +11 -0
  12. package/dist/esm/src/components/buttons/index.d.ts +3 -3
  13. package/dist/esm/src/components/cell/BaseCell.d.ts +27 -2
  14. package/dist/esm/src/components/cell/index.d.ts +2 -2
  15. package/dist/esm/src/components/cell/types/index.d.ts +72 -0
  16. package/dist/esm/src/components/chartsV2/BarChart/BaseVerticalBarChart.d.ts +2 -3
  17. package/dist/esm/src/components/chartsV2/utils/index.d.ts +1 -0
  18. package/dist/esm/src/components/displayPicture/DisplayPicture.d.ts +3 -8
  19. package/dist/esm/src/components/displayPicture/types/index.d.ts +8 -0
  20. package/dist/esm/src/components/helpers/index.d.ts +1 -0
  21. package/dist/esm/src/components/helpers/themedContainer/ThemedContainer.d.ts +10 -0
  22. package/dist/esm/src/components/helpers/themedContainer/index.d.ts +1 -0
  23. package/dist/esm/src/components/link/Link.d.ts +3 -1
  24. package/dist/esm/src/components/link/index.d.ts +2 -1
  25. package/dist/esm/src/components/link/types/index.d.ts +18 -0
  26. package/dist/esm/src/components/tabs/Tabs.d.ts +3 -10
  27. package/dist/esm/src/components/tabs/index.d.ts +2 -1
  28. package/dist/esm/src/components/tabs/types/index.d.ts +28 -0
  29. package/dist/esm/src/components/text/Text.d.ts +3 -17
  30. package/dist/esm/src/components/text/index.d.ts +1 -0
  31. package/dist/esm/src/components/text/types/index.d.ts +16 -0
  32. package/dist/esm/src/components/tooltip/Tooltip.d.ts +19 -2
  33. package/dist/esm/src/components/tooltip/index.d.ts +2 -1
  34. package/dist/esm/src/components/tooltip/types/index.d.ts +53 -0
  35. package/dist/esm/src/hooks/index.d.ts +2 -2
  36. package/dist/esm/src/hooks/useOutsideClickListener.d.ts +2 -1
  37. package/dist/esm/src/hooks/useResize.d.ts +12 -1
  38. package/dist/esm/src/styles/index.d.ts +3 -1
  39. package/package.json +2 -1
  40. package/src/styles/index.ts +17 -0
  41. package/dist/esm/src/components/cell/BaseCell.types.d.ts +0 -31
  42. package/dist/esm/src/components/tabs/Skeleton/Tabs.skeleton.d.ts +0 -5
  43. package/dist/esm/src/components/tabs/Skeleton/index.d.ts +0 -1
  44. package/src/styles/index.js +0 -13
@@ -1,2 +1,4 @@
1
+ import { type RefObject } from 'react';
2
+ import type { BaseButtonProps } from './types';
3
+ declare const BaseButton: import("react").ForwardRefExoticComponent<BaseButtonProps & import("react").RefAttributes<RefObject<HTMLElement>>>;
1
4
  export default BaseButton;
2
- declare const BaseButton: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
@@ -1 +1,2 @@
1
- export { default as BaseButton } from "./BaseButton";
1
+ export { default as BaseButton } from './BaseButton';
2
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ import type { BaseCellProps } from 'components/cell';
2
+ import type { MouseEvent, ReactElement } from 'react';
3
+ type ButtonType = 'button' | 'submit' | 'reset';
4
+ type ButtonVariant = 'contained' | 'outlined' | 'text';
5
+ export interface BaseButtonProps extends BaseCellProps<'button', false> {
6
+ title: ReactElement | string;
7
+ disabled?: boolean | undefined;
8
+ id?: string | undefined;
9
+ type?: ButtonType;
10
+ onClick: (event: MouseEvent<HTMLElement>) => void;
11
+ blurOnClick?: boolean;
12
+ variant?: ButtonVariant;
13
+ }
14
+ export {};
@@ -1,21 +1,4 @@
1
+ import { type RefObject } from 'react';
2
+ import type { ButtonProps } from './types';
3
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<RefObject<HTMLElement>>>;
1
4
  export default Button;
2
- /**
3
- * Renders a customized button component wrapped in an ErrorBoundary component.
4
- *
5
- * @param {string} className - The CSS class name for the button.
6
- * @param {string} type - The type attribute for the button element.
7
- * @param {React.Component} leftComponent - The component to be rendered on the left side of the button.
8
- * @param {string} title - The text to be displayed as the button's title.
9
- * @param {React.Component} rightComponent - The component to be rendered on the right side of the button.
10
- * @param {string} size - The size variant of the button.
11
- * @param {boolean} flexible - Whether the button should have flexible width.
12
- * @param {string} radius - The border radius variant of the button.
13
- * @param {boolean} disabled - Whether the button is disabled.
14
- * @param {function} onClick - The event handler for the button's click event.
15
- * @param {boolean} blurOnClick - Whether the button should lose focus after being clicked.
16
- * @param {string} variant - The variant style of the button.
17
- * @param {string} color - The color variant of the button.
18
- * @param {React.Component} custom - A custom component to be rendered instead of the default error boundary fallback.
19
- * @returns {JSX.Element} - The rendered BaseButton component wrapped in an ErrorBoundary component.
20
- */
21
- declare const Button: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
@@ -1 +1,2 @@
1
- export { default as Button } from "./Button";
1
+ export { default as Button } from './Button';
2
+ export * from './types';
@@ -0,0 +1,9 @@
1
+ import type { BaseButtonProps } from 'components/buttons/baseButton/types';
2
+ import type { ComponentType } from 'react';
3
+ type ButtonColors = 'primary' | 'success' | 'danger' | 'warning';
4
+ export interface ButtonProps extends BaseButtonProps {
5
+ color?: ButtonColors;
6
+ leftComponent?: ComponentType | undefined;
7
+ rightComponent?: ComponentType | undefined;
8
+ }
9
+ export {};
@@ -1,2 +1,4 @@
1
+ import { type RefObject } from 'react';
2
+ import type { ChipProps } from './types';
3
+ declare const Chip: import("react").ForwardRefExoticComponent<ChipProps & import("react").RefAttributes<RefObject<HTMLElement>>>;
1
4
  export default Chip;
2
- declare const Chip: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
@@ -1 +1,2 @@
1
- export { default as Chip } from "./Chip";
1
+ export { default as Chip } from './Chip';
2
+ export * from './types';
@@ -0,0 +1,11 @@
1
+ import type { BaseButtonProps } from 'components/buttons/baseButton/types';
2
+ import type { ComponentType } from 'react';
3
+ type ChipColors = 'success' | 'info' | 'warning' | 'danger' | 'default';
4
+ type ChipVariant = 'status' | 'input';
5
+ export interface ChipProps extends BaseButtonProps {
6
+ color?: ChipColors;
7
+ vaiant?: ChipVariant;
8
+ leftComponent?: ComponentType;
9
+ rightComponent?: ComponentType;
10
+ }
11
+ export {};
@@ -1,3 +1,3 @@
1
- export * from "./baseButton";
2
- export * from "./button";
3
- export * from "./chip";
1
+ export * from './baseButton';
2
+ export * from './button';
3
+ export * from './chip';
@@ -1,3 +1,28 @@
1
- export const BaseCell: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
1
+ import { type ReactElement, type RefObject } from 'react';
2
+ /**
3
+ * BaseCell - A flexible container component for displaying up to three components in a structured layout
4
+ *
5
+ * @returns A React component or null
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <BaseCell
10
+ * component1={<Icon />}
11
+ * component2={<div>hello world!</div>}
12
+ * component3={<Button>Action</Button>}
13
+ * />
14
+ * ```
15
+ */
16
+ export declare const BaseCell: import("react").ForwardRefExoticComponent<{
17
+ className?: string | undefined;
18
+ size?: "sm" | "md" | "lg" | "auto";
19
+ flexible?: boolean | undefined;
20
+ component1?: ReactElement | undefined;
21
+ component3?: ReactElement | undefined;
22
+ RootDOM?: "div" | "span" | "button";
23
+ attrs?: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement> | import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
24
+ radius?: "none" | "default" | "round" | "ellipse";
25
+ } & {
26
+ component2: ReactElement;
27
+ } & import("react").RefAttributes<RefObject<HTMLElement>>>;
2
28
  export default BaseCell;
3
- import React from 'react';
@@ -1,2 +1,2 @@
1
- export { default as BaseCell } from "./BaseCell";
2
- export * from "./BaseCell.types";
1
+ export { default as BaseCell } from './BaseCell';
2
+ export * from './types';
@@ -0,0 +1,72 @@
1
+ import type { ComponentProps, JSX, ReactElement } from 'react';
2
+ /**
3
+ * Defines the possible size values for the cell component.
4
+ * - 'sm': Small size
5
+ * - 'md': Medium size
6
+ * - 'lg': Large size
7
+ * - 'auto': Automatic sizing based on content
8
+ */
9
+ type ElementSizeTypes = 'sm' | 'md' | 'lg' | 'auto';
10
+ /**
11
+ * Specifies the allowed root DOM element types for the cell.
12
+ * - 'div': Standard block-level container
13
+ * - 'span': Inline container
14
+ * - 'button': Button element
15
+ */
16
+ type RootDOMTypes = 'div' | 'span' | 'button';
17
+ /**
18
+ * Specifies the border radius options for the cell.
19
+ * - 'none': No border radius
20
+ * - 'default': Default border radius
21
+ * - 'round': Fully rounded (pill-shaped)
22
+ * - 'ellipse': Elliptical border radius
23
+ */
24
+ type RadiusTypes = 'none' | 'default' | 'round' | 'ellipse';
25
+ /**
26
+ * Specifies the Component Type to be rendered as it is dynamic.
27
+ * - 'button': default as button
28
+ * - 'div': Otherwise as div
29
+ */
30
+ export type BaseCellComponentType = 'button' | 'div';
31
+ /**
32
+ * Props for the base cell component.
33
+ */
34
+ export type BaseCellProps<T extends keyof JSX.IntrinsicElements, TComponent2 extends boolean = true> = {
35
+ /**
36
+ * Additional CSS class names to apply to the cell.
37
+ */
38
+ className?: string | undefined;
39
+ /**
40
+ * Size of the cell. Can be 'sm', 'md', 'lg', or 'auto'.
41
+ */
42
+ size?: ElementSizeTypes;
43
+ /**
44
+ * If true, the cell will be flexible and expand to fill available space.
45
+ */
46
+ flexible?: boolean | undefined;
47
+ /**
48
+ * An optional React element to render inside the cell.
49
+ */
50
+ component1?: ReactElement | undefined;
51
+ /**
52
+ * An optional tertiary React element to render inside the cell.
53
+ */
54
+ component3?: ReactElement | undefined;
55
+ /**
56
+ * The root DOM element type for the cell. Can be 'div', 'span', or 'button'.
57
+ */
58
+ RootDOM?: RootDOMTypes;
59
+ /**
60
+ * Additional HTML attributes to apply to the root element.
61
+ */
62
+ attrs?: ComponentProps<T>;
63
+ /**
64
+ * Border radius style for the cell. Can be 'none', 'default', 'round', or 'ellipse'.
65
+ */
66
+ radius?: RadiusTypes;
67
+ } & (TComponent2 extends true ? {
68
+ component2: ReactElement;
69
+ } : {
70
+ component2?: ReactElement | undefined;
71
+ });
72
+ export {};
@@ -1,5 +1,5 @@
1
1
  export default BaseBarChart;
2
- declare function BaseBarChart({ loading, seriesData, title, gridOptions, width, height, barThickness, borderRadius, barColor1, barColor2, xAxisTitle, yAxisTitle, tooltip, legends, chartOptions, chartDatasets, xAxis, yAxis, styles, vertical, stacked, extra, }: {
2
+ declare function BaseBarChart({ loading, seriesData, title, gridOptions, width, height, barThickness, borderRadius, xAxisTitle, yAxisTitle, tooltip, legends, chartOptions, chartDatasets, xAxis, yAxis, styles, vertical, stacked, extra, barColors, }: {
3
3
  loading: any;
4
4
  seriesData: any;
5
5
  title: any;
@@ -8,8 +8,6 @@ declare function BaseBarChart({ loading, seriesData, title, gridOptions, width,
8
8
  height?: string | undefined;
9
9
  barThickness?: number | undefined;
10
10
  borderRadius?: number | undefined;
11
- barColor1: any;
12
- barColor2: any;
13
11
  xAxisTitle: any;
14
12
  yAxisTitle: any;
15
13
  tooltip: any;
@@ -22,4 +20,5 @@ declare function BaseBarChart({ loading, seriesData, title, gridOptions, width,
22
20
  vertical?: boolean | undefined;
23
21
  stacked: any;
24
22
  extra: any;
23
+ barColors: any;
25
24
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export function getColorGradient(ctx: any, gradientString: any): any;
@@ -1,9 +1,4 @@
1
- type Size = 'sm' | 'md';
2
- interface DisplayPictureProps {
3
- name: string;
4
- className?: string;
5
- url: string;
6
- size?: Size;
7
- }
8
- declare const DisplayPicture: (props: DisplayPictureProps) => React.ReactElement;
1
+ import type { ReactElement } from 'react';
2
+ import type { DisplayPictureProps } from './types';
3
+ declare const DisplayPicture: (props: DisplayPictureProps) => ReactElement;
9
4
  export default DisplayPicture;
@@ -0,0 +1,8 @@
1
+ type Size = 'sm' | 'md';
2
+ export interface DisplayPictureProps {
3
+ name: string;
4
+ className?: string;
5
+ url: string;
6
+ size?: Size;
7
+ }
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './themedContainer';
@@ -0,0 +1,10 @@
1
+ import { type CSSProperties, type ReactElement } from 'react';
2
+ type ThemeType = 'light' | 'dark';
3
+ interface ThemedContainerProps {
4
+ theme?: ThemeType;
5
+ style?: CSSProperties;
6
+ className?: string;
7
+ children: ReactElement;
8
+ }
9
+ declare const ThemedContainer: (props: ThemedContainerProps) => ReactElement;
10
+ export default ThemedContainer;
@@ -0,0 +1 @@
1
+ export { default as ThemedContainer } from './ThemedContainer';
@@ -1,2 +1,4 @@
1
+ import { type RefObject } from 'react';
2
+ import type { LinkProps } from './types';
3
+ declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<RefObject<HTMLElement>>>;
1
4
  export default Link;
2
- declare const Link: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
@@ -1 +1,2 @@
1
- export { default as Link } from "./Link";
1
+ export { default as Link } from './Link';
2
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ import type { HTMLAttributes, ReactElement } from 'react';
2
+ import type { TextFontWeight, TextStroke, TextVariant } from '../../text';
3
+ type LinkTraget = '_blank' | '_self' | '_parent' | '_top';
4
+ type LinkUnderline = 'none' | 'hover' | 'always';
5
+ export interface LinkProps {
6
+ variant: TextVariant;
7
+ stroke: TextStroke;
8
+ weight: TextFontWeight;
9
+ italic: boolean;
10
+ children: ReactElement;
11
+ href: string;
12
+ target: LinkTraget;
13
+ attrs: HTMLAttributes<HTMLAnchorElement>;
14
+ className: string;
15
+ underline: LinkUnderline;
16
+ onClick: () => void;
17
+ }
18
+ export {};
@@ -1,11 +1,4 @@
1
+ import { type ReactElement } from 'react';
2
+ import type { TabsProps } from './types';
3
+ declare const Tabs: (props: TabsProps) => ReactElement;
1
4
  export default Tabs;
2
- declare function Tabs(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace Tabs {
4
- namespace propTypes {
5
- let className: any;
6
- let tabs: any;
7
- let selectedTab: any;
8
- let loading: any;
9
- let fallback: any;
10
- }
11
- }
@@ -1 +1,2 @@
1
- export { default as Tabs } from "./Tabs";
1
+ export { default as Tabs } from './Tabs';
2
+ export * from './types';
@@ -0,0 +1,28 @@
1
+ import type { ComponentType, ReactElement } from 'react';
2
+ interface TabProps {
3
+ id: string;
4
+ title: string;
5
+ disabled?: boolean;
6
+ leftIcon?: ComponentType | {
7
+ Active?: ComponentType;
8
+ InActive?: ComponentType;
9
+ };
10
+ rightIcon?: ComponentType<{
11
+ className?: string | undefined;
12
+ }>;
13
+ dropdown?: boolean;
14
+ dropdownItems?: {
15
+ title: string;
16
+ id: string;
17
+ }[];
18
+ }
19
+ type TabDirection = 'horizontal' | 'vertical';
20
+ export interface TabsProps {
21
+ tabs: TabProps[];
22
+ className?: string;
23
+ selectedTab: string;
24
+ setSelectedTab: (id: string) => void;
25
+ direction: TabDirection;
26
+ children?: ReactElement;
27
+ }
28
+ export {};
@@ -1,18 +1,4 @@
1
- import { type HTMLAttributes } from 'react';
2
- type Variant = 'h1' | 'h2' | 'b1' | 'b2' | 'b3';
3
- type ComponentType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'a';
4
- type Stroke = 'regular' | 'medium' | 'semibold' | 'bold';
5
- type FontWeight = 100 | 200 | 300 | 400 | 500 | 600;
6
- interface TextProps {
7
- variant?: Variant;
8
- component?: ComponentType;
9
- stroke?: Stroke;
10
- weight?: FontWeight;
11
- italic?: boolean;
12
- underline?: boolean;
13
- children?: React.ReactNode;
14
- className?: string;
15
- attrs?: HTMLAttributes<HTMLElement>;
16
- }
17
- declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLElement>>;
1
+ import { type RefObject } from 'react';
2
+ import type { TextComponentType, TextProps } from './types';
3
+ declare const Text: import("react").ForwardRefExoticComponent<TextProps<TextComponentType> & import("react").RefAttributes<RefObject<HTMLElement>>>;
18
4
  export default Text;
@@ -1 +1,2 @@
1
1
  export { default as Text } from './Text';
2
+ export * from './types';
@@ -0,0 +1,16 @@
1
+ import type { ComponentProps, JSX, ReactNode } from 'react';
2
+ export type TextVariant = 'h1' | 'h2' | 'b1' | 'b2' | 'b3';
3
+ export type TextStroke = 'regular' | 'medium' | 'semibold' | 'bold';
4
+ export type TextFontWeight = 100 | 200 | 300 | 400 | 500 | 600;
5
+ export type TextComponentType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'a';
6
+ export interface TextProps<T extends keyof JSX.IntrinsicElements> {
7
+ variant?: TextVariant;
8
+ component?: TextComponentType;
9
+ stroke?: TextStroke;
10
+ weight?: TextFontWeight;
11
+ italic?: boolean;
12
+ underline?: boolean;
13
+ children?: ReactNode;
14
+ className?: string;
15
+ attrs?: ComponentProps<T>;
16
+ }
@@ -1,3 +1,20 @@
1
- export default Tooltip;
2
- declare const Tooltip: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
1
  import React from 'react';
2
+ import type { TooltipProps } from './types';
3
+ /**
4
+ * Tooltip - A tooltip component to be used as a wrapper to show the customised tooltip for the component
5
+ *
6
+ * @returns A React component
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <Tooltip
11
+ * position='top'
12
+ * showPointer={false}
13
+ * content="Hello"
14
+ * >
15
+ * <div>Some Element</div>
16
+ * </Tooltip>
17
+ * ```
18
+ */
19
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<React.RefObject<HTMLElement>>>;
20
+ export default Tooltip;
@@ -1 +1,2 @@
1
- export { default as Tooltip } from "./Tooltip";
1
+ export { default as Tooltip } from './Tooltip';
2
+ export * from './types';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Type definitions for Tooltip component and related types.
3
+ * Provides typings for tooltip position, variant, and props.
4
+ */
5
+ import type { ReactElement, ReactNode, Ref } from 'react';
6
+ /**
7
+ * A ReactElement that optionally includes a ref of type T.
8
+ * Useful for components that need to forward refs.
9
+ *
10
+ * @template T - The type of the ref instance.
11
+ */
12
+ export type ReactElementWithRef<T = unknown> = ReactElement & {
13
+ ref?: Ref<T> | null;
14
+ };
15
+ /**
16
+ * Possible positions for the Tooltip relative to its target element.
17
+ */
18
+ export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
19
+ /**
20
+ * Visual style variants for the Tooltip.
21
+ * @internal
22
+ */
23
+ type TooltipVariant = 'light' | 'dark';
24
+ /**
25
+ * Props for the Tooltip component.
26
+ */
27
+ export interface TooltipProps {
28
+ /**
29
+ * The target element that the tooltip is attached to.
30
+ */
31
+ children: ReactElement;
32
+ /**
33
+ * Position of the tooltip relative to the target element. Can be "top", "bottom", "left", or "right".
34
+ */
35
+ position?: TooltipPosition;
36
+ /**
37
+ * Content to display inside the tooltip.
38
+ */
39
+ content: ReactNode;
40
+ /**
41
+ * Visual style variant of the tooltip. Can be "light" or "dark".
42
+ */
43
+ variant?: TooltipVariant;
44
+ /**
45
+ * Additional CSS class names to apply to the tooltip.
46
+ */
47
+ className?: string;
48
+ /**
49
+ * Whether to show a pointer (arrow) on the tooltip.
50
+ */
51
+ showPointer?: boolean;
52
+ }
53
+ export {};
@@ -1,2 +1,2 @@
1
- export { default as useOutsideClickListener } from "./useOutsideClickListener";
2
- export { default as useResize } from "./useResize";
1
+ export { default as useOutsideClickListener } from './useOutsideClickListener';
2
+ export { default as useResize } from './useResize';
@@ -1,2 +1,3 @@
1
+ import { type RefObject } from 'react';
2
+ declare const useOutsideClickListener: (ref: RefObject<HTMLElement>, callback: () => void) => void;
1
3
  export default useOutsideClickListener;
2
- declare function useOutsideClickListener(ref: any, callback: any): void;
@@ -1,2 +1,13 @@
1
+ import { type RefObject } from 'react';
2
+ interface Style {
3
+ minWidth?: number;
4
+ maxWidth?: number;
5
+ borderSize?: number;
6
+ }
7
+ interface ResizeHookProps {
8
+ ref: RefObject<HTMLElement>;
9
+ styles?: Style;
10
+ enabled?: boolean;
11
+ }
12
+ declare const useResize: (props: ResizeHookProps) => void;
1
13
  export default useResize;
2
- declare function useResize(props: any): void;
@@ -1 +1,3 @@
1
- export const COLORS: {};
1
+ type ColorsType = Record<string, string>;
2
+ declare const COLORS: ColorsType;
3
+ export { COLORS };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banyan_cloud/roots",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
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",
@@ -80,6 +80,7 @@
80
80
  "eslint": "^8.2.0",
81
81
  "eslint-config-airbnb": "19.0.4",
82
82
  "eslint-config-prettier": "^10.1.5",
83
+ "eslint-import-resolver-typescript": "^4.4.2",
83
84
  "eslint-plugin-import": "^2.31.0",
84
85
  "eslint-plugin-jsx-a11y": "^6.10.2",
85
86
  "eslint-plugin-prettier": "^5.4.0",
@@ -0,0 +1,17 @@
1
+ import { getCSSVariableValue } from '../utils';
2
+ import CSS_COLORS from './_colors.exports.module.scss';
3
+
4
+ type CssColorsType = Record<string, string>;
5
+
6
+ type ColorsType = Record<string, string>;
7
+
8
+ const COLORS: ColorsType = Object.keys(CSS_COLORS).reduce<ColorsType>((acc, curr) => {
9
+ if (curr.includes('theme')) {
10
+ acc[curr] = (CSS_COLORS as CssColorsType)[curr] ?? '';
11
+ return acc;
12
+ }
13
+ acc[curr] = getCSSVariableValue((CSS_COLORS as CssColorsType)[curr]);
14
+ return acc;
15
+ }, {});
16
+
17
+ export { COLORS };
@@ -1,31 +0,0 @@
1
- export namespace propTypes {
2
- let className: any;
3
- let component1: any;
4
- let component2: any;
5
- let component3: any;
6
- let size: any;
7
- let flexible: any;
8
- let radius: any;
9
- let RootDOM: any;
10
- let attrs: any;
11
- }
12
- export namespace defaultProps {
13
- let className_1: string;
14
- export { className_1 as className };
15
- let component1_1: null;
16
- export { component1_1 as component1 };
17
- let component2_1: null;
18
- export { component2_1 as component2 };
19
- let component3_1: null;
20
- export { component3_1 as component3 };
21
- let size_1: string;
22
- export { size_1 as size };
23
- let flexible_1: boolean;
24
- export { flexible_1 as flexible };
25
- let radius_1: string;
26
- export { radius_1 as radius };
27
- let RootDOM_1: string;
28
- export { RootDOM_1 as RootDOM };
29
- let attrs_1: {};
30
- export { attrs_1 as attrs };
31
- }
@@ -1,5 +0,0 @@
1
- export default ChartSkeleton;
2
- declare function ChartSkeleton({ theme, fallback }: {
3
- theme: any;
4
- fallback: any;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export { default as Skeleton } from "./Tabs.skeleton";
@@ -1,13 +0,0 @@
1
- import { getCSSVariableValue } from '../utils';
2
- import CSS_COLORS from './_colors.exports.module.scss';
3
-
4
- const COLORS = Object.keys(CSS_COLORS).reduce((acc, curr) => {
5
- if (curr?.includes('theme')) {
6
- acc[curr] = CSS_COLORS[curr];
7
- return acc;
8
- }
9
- acc[curr] = getCSSVariableValue(CSS_COLORS[curr]);
10
- return acc;
11
- }, {});
12
-
13
- export { COLORS };