@refinn/core-ui 0.1.1 → 0.1.2

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,7 +51,6 @@ 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
 
@@ -70,17 +66,50 @@ 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
+ children: ReactNode;
102
+ startModalBtn?: ReactElement<{
103
+ onClick?: (e: react__default.MouseEvent) => void;
104
+ }>;
105
+ stopModalBtn: ReactElement<{
106
+ onClick?: (e: react__default.MouseEvent) => void;
107
+ }>;
108
+ afterStopBtn?: ReactElement<() => void>;
109
+ p?: string;
110
+ }
111
+ declare const Dialog: react__default.ForwardRefExoticComponent<DialogProps & react__default.RefAttributes<HTMLSpanElement>>;
112
+
84
113
  type IconSize = 16 | 20 | 24;
85
114
  type IconWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;
86
115
  type IconGrade = -25 | 0 | 200;
@@ -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,7 +51,6 @@ 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
 
@@ -70,17 +66,50 @@ 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
+ children: ReactNode;
102
+ startModalBtn?: ReactElement<{
103
+ onClick?: (e: react__default.MouseEvent) => void;
104
+ }>;
105
+ stopModalBtn: ReactElement<{
106
+ onClick?: (e: react__default.MouseEvent) => void;
107
+ }>;
108
+ afterStopBtn?: ReactElement<() => void>;
109
+ p?: string;
110
+ }
111
+ declare const Dialog: react__default.ForwardRefExoticComponent<DialogProps & react__default.RefAttributes<HTMLSpanElement>>;
112
+
84
113
  type IconSize = 16 | 20 | 24;
85
114
  type IconWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700;
86
115
  type IconGrade = -25 | 0 | 200;
@@ -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 };