@banyan_cloud/roots 2.0.55 → 2.0.57

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 (24) hide show
  1. package/dist/esm/index.js +1083 -241
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/src/components/accordion/types/index.d.ts +1 -0
  4. package/dist/esm/src/components/alert/types/index.d.ts +6 -1
  5. package/dist/esm/src/components/icons/Checked/Checked.d.ts +4 -0
  6. package/dist/esm/src/components/icons/Checked/index.d.ts +1 -0
  7. package/dist/esm/src/components/icons/Info/InfoHex.d.ts +4 -0
  8. package/dist/esm/src/components/icons/Info/index.d.ts +1 -0
  9. package/dist/esm/src/components/icons/index.d.ts +1 -0
  10. package/dist/esm/src/components/input/checkbox/types/index.d.ts +1 -0
  11. package/dist/esm/src/components/input/checkbox/v2/CheckBox.d.ts +4 -0
  12. package/dist/esm/src/components/input/checkbox/v2/index.d.ts +1 -0
  13. package/dist/esm/src/components/input/dropdown/Dropdown.d.ts +1 -0
  14. package/dist/esm/src/components/input/dropdown/dropdown-item/types/index.d.ts +2 -0
  15. package/dist/esm/src/components/input/dropdown/dropdown-item/v2/DropdownItem.d.ts +3 -0
  16. package/dist/esm/src/components/input/dropdown/dropdown-item/v2/index.d.ts +1 -0
  17. package/dist/esm/src/components/input/dropdown/dropdown-item/v2/types/index.d.ts +20 -0
  18. package/dist/esm/src/components/input/dropdown/v2/Dropdown.d.ts +52 -0
  19. package/dist/esm/src/components/input/dropdown/v2/index.d.ts +1 -0
  20. package/dist/esm/src/components/v2/accordion/Accordion.d.ts +10 -0
  21. package/dist/esm/src/components/v2/accordion/index.d.ts +1 -0
  22. package/dist/esm/src/components/v2/accordion/types/index.d.ts +56 -0
  23. package/dist/esm/src/components/v2/input/textField/TextField.d.ts +2 -1
  24. package/package.json +1 -1
@@ -52,4 +52,5 @@ export interface AccordionProps {
52
52
  * If provided, a *See More* button will be shown that triggers this callback when clicked.
53
53
  */
54
54
  onExpand?: () => void;
55
+ v2?: boolean;
55
56
  }
@@ -1,16 +1,21 @@
1
- import type { ComponentType } from 'react';
1
+ import type { ComponentType, ReactNode } from 'react';
2
2
  type AlertType = 'info' | 'error' | 'warning' | 'success' | 'danger';
3
3
  type AlertPosition = 'bottom-right' | 'bottom-center' | 'top-right' | 'top-center';
4
+ export type AlertVariant = 'inline' | 'card';
5
+ export type AlertTheme = 'light' | 'dark';
4
6
  export interface AlertProps {
5
7
  showIcon?: boolean;
6
8
  shadow?: boolean;
7
9
  position?: AlertPosition;
8
10
  animation?: boolean;
9
11
  className?: string;
12
+ variant?: AlertVariant;
13
+ theme?: AlertTheme;
10
14
  }
11
15
  export interface AlertConfig {
12
16
  title: string | null | undefined;
13
17
  description: string | null | undefined;
18
+ tag?: ReactNode;
14
19
  icon?: ComponentType<{
15
20
  className?: string;
16
21
  }> | undefined;
@@ -0,0 +1,4 @@
1
+ declare const Checked: (props: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default Checked;
@@ -0,0 +1 @@
1
+ export { default as CheckedIcon } from './Checked';
@@ -0,0 +1,4 @@
1
+ declare const Info: (props: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default Info;
@@ -1 +1,2 @@
1
1
  export { default as InfoIcon } from './Info';
2
+ export { default as InfoHexIcon } from './InfoHex';
@@ -4,6 +4,7 @@ export * from './Calender';
4
4
  export * from './Caret';
5
5
  export * from './ChartsIcon';
6
6
  export * from './CheckboxIcon';
7
+ export * from './Checked';
7
8
  export * from './Chevron';
8
9
  export * from './Clock';
9
10
  export * from './Close';
@@ -20,5 +20,6 @@ export interface CheckboxProps {
20
20
  disabledAsChild?: boolean;
21
21
  /** Shows the intermediate (indeterminate) icon when true */
22
22
  intermediate?: boolean;
23
+ v2?: boolean;
23
24
  }
24
25
  export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { CheckboxProps } from '../types';
3
+ declare const Checkbox: React.FC<CheckboxProps>;
4
+ export default Checkbox;
@@ -0,0 +1 @@
1
+ export { default as CheckboxV2 } from './CheckBox';
@@ -41,6 +41,7 @@ export interface DropdownProps {
41
41
  value: string | number;
42
42
  onChange: (value: string | number) => void;
43
43
  };
44
+ v2?: boolean;
44
45
  }
45
46
  /** What parent components can call on the ref */
46
47
  export interface DropdownRef {
@@ -6,6 +6,8 @@ export interface DropdownItemProps {
6
6
  variant?: DropdownItemVariant;
7
7
  error?: string | undefined;
8
8
  selected?: boolean;
9
+ intermediate?: boolean;
10
+ v2?: boolean;
9
11
  onKeyDown?: KeyboardEventHandler<HTMLLIElement>;
10
12
  onMouseEnter?: MouseEventHandler<HTMLLIElement>;
11
13
  onClick?: MouseEventHandler<HTMLLIElement>;
@@ -0,0 +1,3 @@
1
+ import type { DropdownItemProps } from './types';
2
+ declare const DropdownItem: import("react").ForwardRefExoticComponent<DropdownItemProps & import("react").RefAttributes<HTMLLIElement>>;
3
+ export default DropdownItem;
@@ -0,0 +1 @@
1
+ export { default as DropdownItemv3 } from './DropdownItem';
@@ -0,0 +1,20 @@
1
+ import type { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
2
+ export type DropdownItemVariant = 'checkbox' | 'radio' | undefined;
3
+ export interface DropdownItemProps {
4
+ title: string | ReactNode;
5
+ value: string | number | null;
6
+ variant?: DropdownItemVariant;
7
+ error?: string | undefined;
8
+ selected?: boolean;
9
+ intermediate?: boolean;
10
+ onKeyDown?: KeyboardEventHandler<HTMLLIElement>;
11
+ onMouseEnter?: MouseEventHandler<HTMLLIElement>;
12
+ onClick?: MouseEventHandler<HTMLLIElement>;
13
+ /** Additional data-* attributes to spread on the <li> */
14
+ dataAttrs?: Record<string, string | number | boolean | undefined>;
15
+ className?: string;
16
+ tabIndex?: number;
17
+ disabled?: boolean;
18
+ /** If provided, replaces the default label+tooltip block */
19
+ customComponent?: ReactNode;
20
+ }
@@ -0,0 +1,52 @@
1
+ import React, { type ReactNode, type SyntheticEvent } from 'react';
2
+ type FeedbackType = 'success' | 'warning' | 'info' | 'error';
3
+ interface Feedback {
4
+ type: FeedbackType;
5
+ message?: string;
6
+ }
7
+ type LeftComponentWithVariants = React.ComponentType | {
8
+ Active?: React.ComponentType;
9
+ InActive?: React.ComponentType;
10
+ };
11
+ export interface DropdownProps {
12
+ className?: string | undefined;
13
+ popperClassName?: string | undefined;
14
+ /** Controlled value: string for single, string[] for multi. Omit for uncontrolled */
15
+ value?: string | string[];
16
+ onChange: (event: SyntheticEvent, value: string | string[] | null | undefined) => void;
17
+ leftComponent?: LeftComponentWithVariants;
18
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
19
+ /** Children must be DropdownItem elements */
20
+ children?: ReactNode;
21
+ highlightOnSelect?: boolean;
22
+ label?: string;
23
+ placeholder?: ReactNode;
24
+ multi?: boolean;
25
+ disabled?: boolean;
26
+ readOnly?: boolean;
27
+ /** string shows tooltip + error state; boolean acts as a flag only */
28
+ error?: string | boolean;
29
+ warning?: string | boolean;
30
+ id?: string;
31
+ name?: string;
32
+ feedback?: Feedback;
33
+ /** Format the summary text when multiple values are selected */
34
+ formatter?: (totalSelected: number) => ReactNode;
35
+ required?: boolean;
36
+ multiSelectActionTitle?: string;
37
+ /** When true, always show count for a single selected value in multi mode */
38
+ valueAsCount?: boolean;
39
+ /** Show caret as up/down variant */
40
+ caretAsUpDown?: boolean;
41
+ search?: {
42
+ placeholder: string;
43
+ value: string | number;
44
+ onChange: (value: string | number) => void;
45
+ };
46
+ }
47
+ /** What parent components can call on the ref */
48
+ export interface DropdownRef {
49
+ value: () => string | string[] | null;
50
+ }
51
+ declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<DropdownRef>>;
52
+ export default Dropdown;
@@ -0,0 +1 @@
1
+ export { default as Dropdownv3 } from './Dropdown';
@@ -0,0 +1,10 @@
1
+ import type { AccordionProps } from './types';
2
+ /**
3
+ * Accordion – A simple disclosure component with an optional left and right icon.
4
+ *
5
+ * This component works in both **controlled** and **uncontrolled** modes.
6
+ * - In controlled mode supply the `open` prop and handle the state change in `onToggle`.
7
+ * - In uncontrolled mode omit the `open` prop and optionally set `defaultOpen`.
8
+ */
9
+ export declare function Accordion(props: AccordionProps): import("react/jsx-runtime").JSX.Element;
10
+ export default Accordion;
@@ -0,0 +1 @@
1
+ export { default as Accordion } from './Accordion';
@@ -0,0 +1,56 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ export interface AccordionProps {
3
+ /**
4
+ * Controls the open / close state when the component is used in a controlled manner
5
+ */
6
+ open?: boolean;
7
+ /**
8
+ * Handler that is triggered when the header is clicked while the component is controlled.
9
+ * Receives the current `open` state as an argument so that the parent can update it accordingly.
10
+ */
11
+ onToggle?: (open: boolean | undefined) => void;
12
+ /**
13
+ * Sets the default open state when the component is used in an uncontrolled manner.
14
+ */
15
+ defaultOpen?: boolean;
16
+ /**
17
+ * Optional component rendered on the very left side of the header.
18
+ * Usually an Icon. Receives the `className` needed for styling.
19
+ */
20
+ leftComponent?: ComponentType<{
21
+ className?: string;
22
+ }> | null;
23
+ /**
24
+ * Optional component rendered on the very right side of the header.
25
+ * Usually an Icon. Receives the `className` needed for styling.
26
+ */
27
+ rightComponent?: ComponentType<{
28
+ className?: string;
29
+ }> | null;
30
+ /**
31
+ * Title shown inside the header.
32
+ */
33
+ title?: ReactNode;
34
+ /**
35
+ * Optional description shown at the top of the body.
36
+ */
37
+ description?: string;
38
+ /**
39
+ * Children rendered inside the body when the accordion is open.
40
+ */
41
+ children?: ReactNode;
42
+ /**
43
+ * Callback executed when the uncontrolled component toggles its state.
44
+ * Receives the new open state.
45
+ */
46
+ onClick?: (open: boolean) => void;
47
+ /**
48
+ * Additional className appended to the root element.
49
+ */
50
+ className?: string;
51
+ /**
52
+ * If provided, a *See More* button will be shown that triggers this callback when clicked.
53
+ */
54
+ onExpand?: () => void;
55
+ disabled?: boolean;
56
+ }
@@ -51,8 +51,9 @@ export interface TextFieldProps {
51
51
  /** Whether to enable autocomplete popover */
52
52
  autocompleteOptions?: AutocompleteOptions | undefined;
53
53
  helperText?: string;
54
- forgotPasswordLink?: string;
54
+ linkAction?: string | (() => void);
55
55
  readOnly?: boolean;
56
+ linkText?: string;
56
57
  }
57
58
  declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
58
59
  export default TextField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banyan_cloud/roots",
3
- "version": "2.0.55",
3
+ "version": "2.0.57",
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",