@refinn/core-ui 0.1.1 → 0.1.3

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/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes } from 'react';
2
+ import react__default, { HTMLAttributes, ReactNode, ButtonHTMLAttributes, ReactElement, InputHTMLAttributes } from 'react';
3
3
 
4
- type AccordionSize = 'small' | 'medium' | 'large';
5
4
  interface AccordionItemData {
6
5
  id?: string;
7
6
  title: ReactNode;
@@ -12,30 +11,28 @@ interface AccordionItemData {
12
11
  }
13
12
  interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
14
13
  items: AccordionItemData[];
15
- size?: AccordionSize;
16
14
  multiple?: boolean;
17
15
  loading?: boolean;
18
16
  }
19
17
  declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
20
18
 
21
- type AlertVariant = 'info' | 'success' | 'warning' | 'danger' | 'common';
22
- type AlertMode = 'inline' | 'page';
19
+ type AlertVariant = 'none' | 'info' | 'danger' | 'warning' | 'success';
20
+ type AlertMode = 'page' | 'section' | 'inline';
23
21
  interface AlertBannerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
24
22
  variant?: AlertVariant;
25
23
  mode?: AlertMode;
26
24
  title?: ReactNode;
27
25
  description?: ReactNode;
26
+ action?: [string?, string?];
28
27
  icon?: ReactNode;
29
28
  onClose?: () => void;
30
29
  }
31
30
  declare const AlertBanner: react.ForwardRefExoticComponent<AlertBannerProps & react.RefAttributes<HTMLDivElement>>;
32
31
 
33
- type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
34
- type AvatarShape = 'circle' | 'square';
35
- type AvatarStatus = 'online' | 'offline' | 'busy';
32
+ type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
33
+ type AvatarStatus = 'online' | 'offline' | 'busy' | '';
36
34
  interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
37
35
  size?: AvatarSize;
38
- shape?: AvatarShape;
39
36
  src?: string;
40
37
  alt?: string;
41
38
  name?: string;
@@ -54,12 +51,11 @@ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
54
51
  size?: BadgeSize;
55
52
  shape?: BadgeShape;
56
53
  icon?: ReactNode;
57
- dot?: boolean;
58
54
  }
59
55
  declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
60
56
 
61
- type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'contrast' | 'transparent';
62
- type ButtonSize = 'small' | 'medium' | 'large' | 'extra-large';
57
+ type ButtonVariant = "primary" | "secondary" | "tertiary" | "contrast" | "transparent";
58
+ type ButtonSize = "sm" | "md" | "lg" | "xl";
63
59
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
64
60
  variant?: ButtonVariant;
65
61
  size?: ButtonSize;
@@ -70,17 +66,51 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
70
66
  }
71
67
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
72
68
 
73
- type CheckboxSize = 'small' | 'medium';
74
- interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
75
- size?: CheckboxSize;
69
+ type BottomSheetSize = 'sm' | 'md' | 'lg';
70
+ interface BottomSheetProps extends HTMLAttributes<HTMLSpanElement> {
71
+ isForceOpen?: boolean;
72
+ setIsForceOpen?: (val: boolean) => void;
73
+ isClosedAble?: boolean;
74
+ children: ReactNode;
75
+ startModalBtn?: ReactElement<{
76
+ onClick?: (e: react__default.MouseEvent) => void;
77
+ }>;
78
+ stopModalBtn?: ReactElement<{
79
+ onClick?: (e: react__default.MouseEvent) => void;
80
+ }>;
81
+ afterStopBtn?: ReactElement<() => void>;
82
+ size?: BottomSheetSize;
83
+ modalTitle: string;
84
+ modalDesc: string;
85
+ }
86
+ declare const BottomSheet: react__default.ForwardRefExoticComponent<BottomSheetProps & react__default.RefAttributes<HTMLSpanElement>>;
87
+
88
+ interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
76
89
  label?: ReactNode;
77
90
  description?: ReactNode;
78
- indeterminate?: boolean;
79
91
  error?: boolean;
80
92
  contrast?: boolean;
93
+ indeterminate?: boolean;
81
94
  }
82
95
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
83
96
 
97
+ interface DialogProps extends HTMLAttributes<HTMLSpanElement> {
98
+ isForceOpen?: boolean;
99
+ setIsForceOpen?: (val: boolean) => void;
100
+ isClosedAble?: boolean;
101
+ isCloseIcon?: boolean;
102
+ children: ReactNode;
103
+ startModalBtn?: ReactElement<{
104
+ onClick?: (e: react__default.MouseEvent) => void;
105
+ }>;
106
+ stopModalBtn: ReactElement<{
107
+ onClick?: (e: react__default.MouseEvent) => void;
108
+ }>;
109
+ afterStopBtn?: ReactElement<() => void>;
110
+ p?: string;
111
+ }
112
+ declare const Dialog: react__default.ForwardRefExoticComponent<DialogProps & react__default.RefAttributes<HTMLSpanElement>>;
113
+
84
114
  type IconSize = 16 | 20 | 24;
85
115
  type IconWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;
86
116
  type IconGrade = -25 | 0 | 200;
@@ -94,13 +124,12 @@ interface IconProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
94
124
  }
95
125
  declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<HTMLSpanElement>>;
96
126
 
97
- type RadioSize = 'small' | 'medium';
98
- interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
127
+ type RadioSize = "sm" | "md";
128
+ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
99
129
  size?: RadioSize;
100
130
  label?: ReactNode;
101
131
  description?: ReactNode;
102
132
  error?: boolean;
103
- contrast?: boolean;
104
133
  }
105
134
  declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
106
135
 
@@ -131,4 +160,4 @@ interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
131
160
  }
132
161
  declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
133
162
 
134
- export { Accordion, type AccordionItemData, type AccordionProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Icon, type IconProps, Radio, type RadioProps, Slider, type SliderProps, Toast, type ToastProps };
163
+ export { Accordion, type AccordionItemData, type AccordionProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BottomSheet, type BottomSheetProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Dialog, type DialogProps, Icon, type IconProps, Radio, type RadioProps, Slider, type SliderProps, Toast, type ToastProps };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, InputHTMLAttributes } from 'react';
2
+ import react__default, { HTMLAttributes, ReactNode, ButtonHTMLAttributes, ReactElement, InputHTMLAttributes } from 'react';
3
3
 
4
- type AccordionSize = 'small' | 'medium' | 'large';
5
4
  interface AccordionItemData {
6
5
  id?: string;
7
6
  title: ReactNode;
@@ -12,30 +11,28 @@ interface AccordionItemData {
12
11
  }
13
12
  interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
14
13
  items: AccordionItemData[];
15
- size?: AccordionSize;
16
14
  multiple?: boolean;
17
15
  loading?: boolean;
18
16
  }
19
17
  declare const Accordion: react.ForwardRefExoticComponent<AccordionProps & react.RefAttributes<HTMLDivElement>>;
20
18
 
21
- type AlertVariant = 'info' | 'success' | 'warning' | 'danger' | 'common';
22
- type AlertMode = 'inline' | 'page';
19
+ type AlertVariant = 'none' | 'info' | 'danger' | 'warning' | 'success';
20
+ type AlertMode = 'page' | 'section' | 'inline';
23
21
  interface AlertBannerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
24
22
  variant?: AlertVariant;
25
23
  mode?: AlertMode;
26
24
  title?: ReactNode;
27
25
  description?: ReactNode;
26
+ action?: [string?, string?];
28
27
  icon?: ReactNode;
29
28
  onClose?: () => void;
30
29
  }
31
30
  declare const AlertBanner: react.ForwardRefExoticComponent<AlertBannerProps & react.RefAttributes<HTMLDivElement>>;
32
31
 
33
- type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
34
- type AvatarShape = 'circle' | 'square';
35
- type AvatarStatus = 'online' | 'offline' | 'busy';
32
+ type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
33
+ type AvatarStatus = 'online' | 'offline' | 'busy' | '';
36
34
  interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
37
35
  size?: AvatarSize;
38
- shape?: AvatarShape;
39
36
  src?: string;
40
37
  alt?: string;
41
38
  name?: string;
@@ -54,12 +51,11 @@ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
54
51
  size?: BadgeSize;
55
52
  shape?: BadgeShape;
56
53
  icon?: ReactNode;
57
- dot?: boolean;
58
54
  }
59
55
  declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
60
56
 
61
- type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'contrast' | 'transparent';
62
- type ButtonSize = 'small' | 'medium' | 'large' | 'extra-large';
57
+ type ButtonVariant = "primary" | "secondary" | "tertiary" | "contrast" | "transparent";
58
+ type ButtonSize = "sm" | "md" | "lg" | "xl";
63
59
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
64
60
  variant?: ButtonVariant;
65
61
  size?: ButtonSize;
@@ -70,17 +66,51 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
70
66
  }
71
67
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
72
68
 
73
- type CheckboxSize = 'small' | 'medium';
74
- interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
75
- size?: CheckboxSize;
69
+ type BottomSheetSize = 'sm' | 'md' | 'lg';
70
+ interface BottomSheetProps extends HTMLAttributes<HTMLSpanElement> {
71
+ isForceOpen?: boolean;
72
+ setIsForceOpen?: (val: boolean) => void;
73
+ isClosedAble?: boolean;
74
+ children: ReactNode;
75
+ startModalBtn?: ReactElement<{
76
+ onClick?: (e: react__default.MouseEvent) => void;
77
+ }>;
78
+ stopModalBtn?: ReactElement<{
79
+ onClick?: (e: react__default.MouseEvent) => void;
80
+ }>;
81
+ afterStopBtn?: ReactElement<() => void>;
82
+ size?: BottomSheetSize;
83
+ modalTitle: string;
84
+ modalDesc: string;
85
+ }
86
+ declare const BottomSheet: react__default.ForwardRefExoticComponent<BottomSheetProps & react__default.RefAttributes<HTMLSpanElement>>;
87
+
88
+ interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
76
89
  label?: ReactNode;
77
90
  description?: ReactNode;
78
- indeterminate?: boolean;
79
91
  error?: boolean;
80
92
  contrast?: boolean;
93
+ indeterminate?: boolean;
81
94
  }
82
95
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
83
96
 
97
+ interface DialogProps extends HTMLAttributes<HTMLSpanElement> {
98
+ isForceOpen?: boolean;
99
+ setIsForceOpen?: (val: boolean) => void;
100
+ isClosedAble?: boolean;
101
+ isCloseIcon?: boolean;
102
+ children: ReactNode;
103
+ startModalBtn?: ReactElement<{
104
+ onClick?: (e: react__default.MouseEvent) => void;
105
+ }>;
106
+ stopModalBtn: ReactElement<{
107
+ onClick?: (e: react__default.MouseEvent) => void;
108
+ }>;
109
+ afterStopBtn?: ReactElement<() => void>;
110
+ p?: string;
111
+ }
112
+ declare const Dialog: react__default.ForwardRefExoticComponent<DialogProps & react__default.RefAttributes<HTMLSpanElement>>;
113
+
84
114
  type IconSize = 16 | 20 | 24;
85
115
  type IconWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;
86
116
  type IconGrade = -25 | 0 | 200;
@@ -94,13 +124,12 @@ interface IconProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
94
124
  }
95
125
  declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<HTMLSpanElement>>;
96
126
 
97
- type RadioSize = 'small' | 'medium';
98
- interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
127
+ type RadioSize = "sm" | "md";
128
+ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
99
129
  size?: RadioSize;
100
130
  label?: ReactNode;
101
131
  description?: ReactNode;
102
132
  error?: boolean;
103
- contrast?: boolean;
104
133
  }
105
134
  declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
106
135
 
@@ -131,4 +160,4 @@ interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
131
160
  }
132
161
  declare const Toast: react.ForwardRefExoticComponent<ToastProps & react.RefAttributes<HTMLDivElement>>;
133
162
 
134
- export { Accordion, type AccordionItemData, type AccordionProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Icon, type IconProps, Radio, type RadioProps, Slider, type SliderProps, Toast, type ToastProps };
163
+ export { Accordion, type AccordionItemData, type AccordionProps, AlertBanner, type AlertBannerProps, Avatar, type AvatarProps, Badge, type BadgeProps, BottomSheet, type BottomSheetProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Dialog, type DialogProps, Icon, type IconProps, Radio, type RadioProps, Slider, type SliderProps, Toast, type ToastProps };