@hybr1d-tech/charizard 0.6.45 → 0.6.47

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.
@@ -5,8 +5,9 @@ interface BaseButtonProps {
5
5
  variant?: BUTTON_V2_VARIANT;
6
6
  disabled?: boolean;
7
7
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
8
- size?: BUTTON_V2_SIZE;
8
+ size?: BUTTON_V2_SIZE | 'xs' | 'sm' | 'md' | 'adapt';
9
9
  customStyles?: React.CSSProperties;
10
+ btnType?: 'button' | 'reset' | 'submit';
10
11
  }
11
12
  interface IconOnlyButtonV2TypeProps extends BaseButtonProps {
12
13
  type: BUTTON_V2_TYPE.ICON_ONLY;
@@ -19,14 +20,14 @@ interface IconButtonV2TypeProps extends BaseButtonProps {
19
20
  children: React.ReactNode;
20
21
  }
21
22
  interface OtherButtonV2TypeProps extends BaseButtonProps {
22
- type?: Exclude<BUTTON_V2_TYPE, BUTTON_V2_TYPE.ICON_LEFT | BUTTON_V2_TYPE.ICON_RIGHT | BUTTON_V2_TYPE.ICON_ONLY>;
23
+ type?: BUTTON_V2_TYPE.BASIC | BUTTON_V2_TYPE.BUTTON | BUTTON_V2_TYPE.RESET;
23
24
  icon?: React.ReactNode;
24
25
  children: React.ReactNode;
25
26
  }
26
27
  export type ButtonV2Props = IconOnlyButtonV2TypeProps | IconButtonV2TypeProps | OtherButtonV2TypeProps;
27
- export declare function ButtonV2({ children, variant, disabled, onClick, type, size, customStyles, icon, }: ButtonV2Props): import("react/jsx-runtime").JSX.Element;
28
+ export declare function ButtonV2({ children, variant, disabled, onClick, type, size, customStyles, icon, btnType, }: ButtonV2Props): import("react/jsx-runtime").JSX.Element;
28
29
  export declare namespace ButtonV2 {
29
- var GroupAction: ({ children, variant, disabled, menuItems, customData, size, actionsDropdownOptions, positionerProps, isTable, showDownIconBtn, customStyles, }: GroupActionProps) => import("react/jsx-runtime").JSX.Element;
30
+ var GroupAction: ({ children, variant, disabled, menuItems, customData, size, actionsDropdownOptions, positionerProps, isTable, showDownIconBtn, customStyles, onClick, }: GroupActionProps) => import("react/jsx-runtime").JSX.Element;
30
31
  var ActionsDropdown: typeof import("./ButtonV2").ActionsDropdown;
31
32
  }
32
33
  export type MenuItemV2 = {
@@ -53,6 +54,7 @@ export interface GroupActionProps {
53
54
  customStyles?: {
54
55
  customMenuStyles?: React.CSSProperties;
55
56
  };
57
+ onClick?: any;
56
58
  }
57
59
  export interface ActionsDropdownProps {
58
60
  variant?: BUTTON_V2_VARIANT;
@@ -1,7 +1,11 @@
1
1
  export declare enum BUTTON_V2_VARIANT {
2
2
  PRIMARY = "primary",
3
3
  SECONDARY = "secondary",
4
- TERTIARY = "tertiary"
4
+ TERTIARY = "tertiary",
5
+ GHOST = "tertiary",
6
+ DANGER = "primary",
7
+ LINK = "link",
8
+ MINIMAL = "tertiary"
5
9
  }
6
10
  export declare enum BUTTON_V2_SIZE {
7
11
  SMALL = "small",
@@ -11,5 +15,7 @@ export declare enum BUTTON_V2_TYPE {
11
15
  BASIC = "basic",
12
16
  ICON_LEFT = "iconLeft",
13
17
  ICON_RIGHT = "iconRight",
14
- ICON_ONLY = "iconOnly"
18
+ ICON_ONLY = "iconOnly",
19
+ BUTTON = "button",
20
+ RESET = "reset"
15
21
  }
@@ -0,0 +1,83 @@
1
+ import { BUTTON_V2_SIZE, BUTTON_V2_TYPE, BUTTON_V2_VARIANT } from '../button-v2';
2
+ import * as React from 'react';
3
+ export type DrawerFooterButtons = Array<{
4
+ variant?: BUTTON_V2_VARIANT;
5
+ onClick: () => void;
6
+ btnText: string;
7
+ btnType?: 'button' | 'submit' | 'reset';
8
+ btnSize?: BUTTON_V2_SIZE;
9
+ disabled?: boolean;
10
+ isLoading?: boolean;
11
+ loadingText?: string;
12
+ type?: BUTTON_V2_TYPE;
13
+ }>;
14
+ interface DrawerProps {
15
+ /**
16
+ * Drawer footer className
17
+ */
18
+ footerClassName?: string;
19
+ /**
20
+ * Drawer header className
21
+ */
22
+ headerClassName?: string;
23
+ /**
24
+ * Drawer content className
25
+ */
26
+ contentClassName?: string;
27
+ /**
28
+ * Drawer is open or not
29
+ */
30
+ isOpen: boolean;
31
+ /**
32
+ * Callback function when drawer is closed
33
+ */
34
+ onClose: () => void;
35
+ /**
36
+ * Drawer content
37
+ */
38
+ children: React.ReactNode;
39
+ /**
40
+ * Drawer title
41
+ */
42
+ title?: string;
43
+ /**
44
+ * Drawer subTitle
45
+ */
46
+ subTitle?: string;
47
+ /**
48
+ * Custom drawer header
49
+ */
50
+ customHeader?: React.ReactNode;
51
+ /**
52
+ * Custom drawer footer
53
+ */
54
+ customFooter?: React.ReactNode;
55
+ /**
56
+ * Drawer size
57
+ */
58
+ size?: 'sm' | 'md' | 'lg' | 'xlg' | 'xxlg';
59
+ /**
60
+ * Show backdrop or not
61
+ */
62
+ showBackdrop?: boolean;
63
+ /**
64
+ * Show header or not
65
+ */
66
+ showHeader?: boolean;
67
+ /**
68
+ * Show footer or not
69
+ */
70
+ showFooter?: boolean;
71
+ /**
72
+ * footer buttons to show
73
+ */
74
+ buttons?: DrawerFooterButtons;
75
+ footerAddon?: React.ReactNode;
76
+ /**
77
+ * Drawer position
78
+ */
79
+ drawerPosition?: 'left' | 'right';
80
+ customContainerStyles?: React.CSSProperties;
81
+ }
82
+ export declare function DrawerV2({ isOpen, onClose, children, title, subTitle, customHeader, customFooter, size, showBackdrop, showHeader, showFooter, buttons, footerAddon, headerClassName, contentClassName, footerClassName, drawerPosition, customContainerStyles, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
83
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Drawer';
@@ -35,3 +35,4 @@ export * from './select-v2';
35
35
  export * from './skeleton';
36
36
  export * from './AsyncImage';
37
37
  export * from './date-picker';
38
+ export * from './drawer-v2';
@@ -1,15 +1,17 @@
1
1
  import { BUTTON_VARIANT } from '../button';
2
+ import { BUTTON_V2_VARIANT, BUTTON_V2_SIZE, BUTTON_V2_TYPE } from '../button-v2';
2
3
 
3
4
  export type FooterButtons = Array<{
4
- variant: BUTTON_VARIANT;
5
+ variant?: BUTTON_VARIANT | BUTTON_V2_VARIANT;
5
6
  onClick: () => void;
6
7
  btnText: string;
7
- btnType?: 'button' | 'submit' | 'reset';
8
- btnSize?: 'xs' | 'sm' | 'md' | 'adapt';
8
+ btnType?: BUTTON_V2_TYPE | 'submit';
9
+ btnSize?: BUTTON_V2_SIZE;
9
10
  disabled?: boolean;
10
11
  isLoading?: boolean;
11
12
  loadingText?: string;
12
13
  }>;
14
+ export declare const mapVariant: (variant?: BUTTON_VARIANT | BUTTON_V2_VARIANT) => BUTTON_V2_VARIANT | undefined;
13
15
  interface ModalFooterProps {
14
16
  /**
15
17
  * Modal footer children