@banyan_cloud/roots 2.0.44 → 2.0.46

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.
@@ -13,6 +13,7 @@ type RightComponentType = React.ComponentType<LeftRightIconProps>;
13
13
  interface AutocompleteOptions {
14
14
  /** Decide when to open based on the current input */
15
15
  predicate?: (input: string) => boolean;
16
+ open?: (input: string) => boolean;
16
17
  /** Popover placement (kept broad to avoid coupling to the popper types) */
17
18
  placement?: Placement;
18
19
  /** Popover middleware options (library-specific) */
@@ -1,35 +1,3 @@
1
- import { type ComponentType } from 'react';
2
- import { type ButtonColors } from '../../buttons';
3
- export type DialogSize = 'sm' | 'md';
4
- export interface DialogBoxProps {
5
- className?: string;
6
- size?: DialogSize;
7
- }
8
- export interface DialogActionHandlers {
9
- dismiss: () => void;
10
- setNoDismissEnabled?: ((enabled: boolean) => void) | undefined;
11
- }
12
- export type DialogActionCallback = (handlers: DialogActionHandlers) => void;
13
- export interface DialogOpenOptions {
14
- title?: string | null;
15
- description?: string | null;
16
- actionText?: string;
17
- cancelText?: string;
18
- variant?: ButtonColors;
19
- onAction?: DialogActionCallback | null;
20
- onCancel?: (() => void) | null;
21
- size?: DialogSize;
22
- customAction?: ComponentType<DialogActionHandlers> | null;
23
- body?: ComponentType<{
24
- dismiss: () => void;
25
- setNoDismissEnabled?: (enabled: boolean) => void;
26
- }> | null;
27
- hideCancel?: boolean;
28
- noDismiss?: boolean;
29
- hideCrossDismiss?: boolean;
30
- }
31
- export interface DialogBoxHandle {
32
- dialog: (options: DialogOpenOptions) => void;
33
- }
1
+ import type { DialogBoxHandle, DialogBoxProps } from './types';
34
2
  declare const DialogBox: import("react").ForwardRefExoticComponent<DialogBoxProps & import("react").RefAttributes<DialogBoxHandle>>;
35
3
  export default DialogBox;
@@ -0,0 +1,47 @@
1
+ import type { ButtonColors } from 'components/buttons';
2
+ import type { ComponentType } from 'react';
3
+ export type DialogSize = 'sm' | 'md';
4
+ export interface DialogBoxProps {
5
+ className?: string;
6
+ size?: DialogSize;
7
+ }
8
+ export interface DialogActionHandlers {
9
+ dismiss: () => void;
10
+ setNoDismissEnabled?: ((enabled: boolean) => void) | undefined;
11
+ }
12
+ export type DialogActionCallback = (handlers: DialogActionHandlers) => void;
13
+ export interface DialogOpenOptions {
14
+ title?: string | null;
15
+ description?: string | null;
16
+ actionText?: string;
17
+ cancelText?: string;
18
+ variant?: ButtonColors;
19
+ onAction?: DialogActionCallback | null;
20
+ onCancel?: (() => void) | null;
21
+ size?: DialogSize;
22
+ customAction?: ComponentType<DialogActionHandlers> | null;
23
+ body?: ComponentType<{
24
+ dismiss: () => void;
25
+ setNoDismissEnabled?: (enabled: boolean) => void;
26
+ }> | null;
27
+ hideCancel?: boolean;
28
+ noDismiss?: boolean;
29
+ hideCrossDismiss?: boolean;
30
+ }
31
+ export interface DialogBoxHandle {
32
+ dialog: (options: DialogOpenOptions) => void;
33
+ }
34
+ export interface FooterInnerProps {
35
+ action: string;
36
+ cancel: string;
37
+ variant: ButtonColors;
38
+ customAction?: ComponentType<{
39
+ dismiss: () => void;
40
+ setNoDismissEnabled?: ((enabled: boolean) => void) | undefined;
41
+ }> | null | undefined;
42
+ setOpen: (open: boolean) => void;
43
+ hideCancel: boolean;
44
+ onAction?: DialogActionCallback | undefined;
45
+ onCancel?: (() => void) | undefined;
46
+ setNoDismissEnabled?: ((enabled: boolean) => void) | undefined;
47
+ }
@@ -12,7 +12,7 @@ export interface ToggleProps {
12
12
  multi?: boolean;
13
13
  defaultValue?: string | string[];
14
14
  theme?: 'light' | 'dark';
15
- value?: string | string[];
15
+ value?: string | string[] | number | null;
16
16
  onChange?: (value: string | string[]) => void;
17
17
  className?: string;
18
18
  smooth?: boolean;
@@ -11,7 +11,7 @@ interface BaseOptionData {
11
11
  id: string;
12
12
  title?: string;
13
13
  placeholder?: string;
14
- value?: string | number | boolean | Date | null;
14
+ value?: string | string[] | number | null;
15
15
  className?: string;
16
16
  }
17
17
  interface DropdownOptionData extends BaseOptionData {
@@ -36,7 +36,7 @@ interface FilterOptionData extends BaseOptionData {
36
36
  interface ToggleOptionData extends BaseOptionData {
37
37
  id: 'toggle';
38
38
  options: ToggleOption[];
39
- onChange?: (value: string | number | boolean) => void;
39
+ onChange?: (value: string | string[]) => void;
40
40
  }
41
41
  interface CustomOptionData extends BaseOptionData {
42
42
  id: 'custom';
@@ -3,4 +3,4 @@ export declare const getInitialsOfName: (name: string) => string;
3
3
  export declare function classes(...args: (string | false | null | undefined)[]): string;
4
4
  export declare const isEmptyHtmlString: (htmlString: string) => boolean;
5
5
  export declare const getCSSVariableValue: (variable: `--${string}`) => string;
6
- export declare const doubleDigitted: (number: number) => string;
6
+ export declare const doubleDigitted: (number?: number) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banyan_cloud/roots",
3
- "version": "2.0.44",
3
+ "version": "2.0.46",
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",