@ctlyst.id/internal-ui 1.0.4-canary.9 → 2.0.0-canary.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/components/checkbox/__stories__/checkbox.stories.d.ts +12 -0
- package/dist/components/checkbox/components/checkbox.d.ts +16 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/field/components/field.d.ts +5 -2
- package/dist/components/field/index.d.ts +0 -2
- package/dist/components/form/__stories__/textarea.stories.d.ts +10 -0
- package/dist/components/{field/components/textarea-field.d.ts → form/components/textarea.d.ts} +2 -6
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/{base/stories/checkbox.stories.d.ts → loader/__stories__/loader.stories.d.ts} +3 -2
- package/dist/components/loader/components/loader.d.ts +9 -0
- package/dist/components/loader/index.d.ts +2 -0
- package/dist/config/{foundations.stories.d.ts → __stories__/foundations.stories.d.ts} +1 -0
- package/dist/config/theme/components/checkbox.d.ts +86 -2
- package/dist/config/theme/components/index.d.ts +2 -1
- package/dist/config/theme/components/loader.d.ts +85 -0
- package/dist/config/theme/components/textarea.d.ts +54 -2
- package/dist/config/theme/foundations/index.d.ts +3 -2
- package/dist/config/theme/foundations/shadows.d.ts +15 -0
- package/dist/config/theme/foundations/typography.d.ts +25 -7
- package/dist/internal-ui.cjs.development.js +451 -164
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +10 -10
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +464 -179
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/{provider.d.ts → components/provider.d.ts} +2 -1
- package/dist/provider/index.d.ts +2 -2
- package/package.json +2 -2
- /package/dist/components/base/{stories → __stories__}/button.stories.d.ts +0 -0
- /package/dist/components/base/{stories → __stories__}/input.stories.d.ts +0 -0
- /package/dist/components/base/{stories → __stories__}/radio.stories.d.ts +0 -0
- /package/dist/components/base/{stories → __stories__}/switch.stories.d.ts +0 -0
- /package/dist/components/breadcrumb/{components/BreadCrumb.stories.d.ts → __stories__/breadcrumb.stories.d.ts} +0 -0
- /package/dist/components/data-table/{stories/data-table.stories.d.ts → __stories__/datatable.stories.d.ts} +0 -0
- /package/dist/components/datepicker/{components → __stories__}/datepicker.stories.d.ts +0 -0
- /package/dist/components/header/{stories → __stories__}/header.stories.d.ts +0 -0
- /package/dist/components/modal/{stories → __stories__}/modal.stories.d.ts +0 -0
- /package/dist/components/navigation/{stories → __stories__}/navigation.stories.d.ts +0 -0
- /package/dist/components/pagination/{stories → __stories__}/pagination.stories.d.ts +0 -0
- /package/dist/components/select/{stories → __stories__}/select.stories.d.ts +0 -0
- /package/dist/components/tabs/{stories → __stories__}/tabs.stories.d.ts +0 -0
- /package/dist/components/uploader/{stories → __stories__}/uploader.stories.d.ts +0 -0
- /package/dist/provider/{provider.stories.d.ts → __stories__/provider.stories.d.ts} +0 -0
package/README.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
## @ctlyst.id/internal-ui
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
declare const _default: {
|
3
|
+
chakra: {
|
4
|
+
theme: Record<string, any>;
|
5
|
+
};
|
6
|
+
title: string;
|
7
|
+
decorators: ((Story: React.ElementType) => JSX.Element)[];
|
8
|
+
};
|
9
|
+
export default _default;
|
10
|
+
export declare const Default: () => JSX.Element;
|
11
|
+
export declare const WithLabel: () => JSX.Element;
|
12
|
+
export declare const WithHelpText: () => JSX.Element;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { CheckboxProps } from '@chakra-ui/react';
|
2
|
+
import type { PropsWithChildren } from 'react';
|
3
|
+
export interface CheckboxComponentProps extends CheckboxProps, PropsWithChildren {
|
4
|
+
isError?: boolean;
|
5
|
+
helpText?: string;
|
6
|
+
errorText?: string;
|
7
|
+
}
|
8
|
+
declare function CheckboxComponent({ isError, helpText, errorText, children, isDisabled, ...rest }: CheckboxComponentProps): JSX.Element;
|
9
|
+
declare namespace CheckboxComponent {
|
10
|
+
var defaultProps: {
|
11
|
+
isError: boolean;
|
12
|
+
helpText: string;
|
13
|
+
errorText: string;
|
14
|
+
};
|
15
|
+
}
|
16
|
+
export default CheckboxComponent;
|
@@ -2,8 +2,11 @@ import type { FC, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
export interface Props {
|
3
3
|
label?: string | ReactNode;
|
4
4
|
isError?: boolean;
|
5
|
-
|
6
|
-
|
5
|
+
isSuccess?: boolean;
|
6
|
+
isDisabled?: boolean;
|
7
|
+
errorMessage?: string | ReactNode;
|
8
|
+
leftHelperText?: string | ReactNode;
|
9
|
+
rightHelperText?: string | ReactNode;
|
7
10
|
isRequired?: boolean;
|
8
11
|
}
|
9
12
|
export declare type FieldProps<T = unknown> = Props & T;
|
@@ -2,5 +2,3 @@ export { default as Field } from './components/field';
|
|
2
2
|
export * from './components/field';
|
3
3
|
export { default as InputField } from './components/input-field';
|
4
4
|
export * from './components/input-field';
|
5
|
-
export { default as TextareaField } from './components/textarea-field';
|
6
|
-
export * from './components/textarea-field';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare const _default: {
|
3
|
+
chakra: {
|
4
|
+
theme: Record<string, any>;
|
5
|
+
};
|
6
|
+
title: string;
|
7
|
+
decorators: ((Story: React.ElementType) => JSX.Element)[];
|
8
|
+
};
|
9
|
+
export default _default;
|
10
|
+
export declare const TextArea: () => JSX.Element;
|
package/dist/components/{field/components/textarea-field.d.ts → form/components/textarea.d.ts}
RENAMED
@@ -1,12 +1,8 @@
|
|
1
1
|
import type { TextareaProps as ChakraTextareaProps } from '@chakra-ui/react';
|
2
|
-
import type { ReactNode } from 'react';
|
3
2
|
import React from 'react';
|
4
|
-
import type { FieldProps } from '
|
3
|
+
import type { FieldProps } from '../../field';
|
5
4
|
export interface TextAreaProps extends ChakraTextareaProps, FieldProps {
|
6
|
-
|
7
|
-
addOnRight?: ReactNode;
|
8
|
-
elementLeft?: ReactNode;
|
9
|
-
elementRight?: ReactNode;
|
5
|
+
isLoading?: boolean;
|
10
6
|
}
|
11
7
|
declare const TextareaField: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
12
8
|
export default TextareaField;
|
@@ -1,8 +1,11 @@
|
|
1
1
|
export * from './breadcrumb';
|
2
|
+
export * from './checkbox';
|
2
3
|
export * from './data-table';
|
3
4
|
export * from './datepicker';
|
4
5
|
export * from './field';
|
6
|
+
export * from './form';
|
5
7
|
export * from './header';
|
8
|
+
export * from './loader';
|
6
9
|
export * from './modal';
|
7
10
|
export * from './navigation';
|
8
11
|
export * from './pagination';
|
@@ -7,5 +7,6 @@ declare const _default: {
|
|
7
7
|
decorators: ((Story: React.ElementType) => JSX.Element)[];
|
8
8
|
};
|
9
9
|
export default _default;
|
10
|
-
export declare const
|
11
|
-
export declare const
|
10
|
+
export declare const Default: () => JSX.Element;
|
11
|
+
export declare const Variant: () => JSX.Element;
|
12
|
+
export declare const Size: () => JSX.Element;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { HTMLChakraProps, ThemingProps } from '@chakra-ui/react';
|
2
|
+
export interface LoaderProps {
|
3
|
+
size?: string;
|
4
|
+
variant?: string;
|
5
|
+
}
|
6
|
+
export interface CustomBadgeProps extends HTMLChakraProps<'span'>, ThemingProps {
|
7
|
+
}
|
8
|
+
declare const Loader: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", CustomBadgeProps>;
|
9
|
+
export default Loader;
|
@@ -9,5 +9,6 @@ declare const _default: {
|
|
9
9
|
export default _default;
|
10
10
|
export declare const Color: () => JSX.Element;
|
11
11
|
export declare const Typography: () => JSX.Element;
|
12
|
+
export declare const Shadow: () => JSX.Element;
|
12
13
|
export declare const Spacing: () => JSX.Element;
|
13
14
|
export declare const Sizes: () => JSX.Element;
|
@@ -1,3 +1,87 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
declare const Checkbox: {
|
2
|
+
baseStyle?: {
|
3
|
+
control: {
|
4
|
+
borderRadius: string;
|
5
|
+
width: string;
|
6
|
+
height: string;
|
7
|
+
border: string;
|
8
|
+
};
|
9
|
+
icon: {
|
10
|
+
color: string;
|
11
|
+
width: string;
|
12
|
+
};
|
13
|
+
label: {
|
14
|
+
fontWeight: string;
|
15
|
+
lineHeight: string;
|
16
|
+
color: string;
|
17
|
+
ml: string;
|
18
|
+
};
|
19
|
+
_disabled: {
|
20
|
+
background: string;
|
21
|
+
border: string;
|
22
|
+
borderColor: string;
|
23
|
+
cursor: string;
|
24
|
+
};
|
25
|
+
} | undefined;
|
26
|
+
sizes?: {
|
27
|
+
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
28
|
+
keys: ("container" | "icon" | "label" | "control")[];
|
29
|
+
}>;
|
30
|
+
} | undefined;
|
31
|
+
variants?: {
|
32
|
+
errors: {
|
33
|
+
control: {
|
34
|
+
borderColor: string;
|
35
|
+
_checked: {
|
36
|
+
borderColor: string;
|
37
|
+
backgroundColor: string;
|
38
|
+
_hover: {
|
39
|
+
borderColor: string;
|
40
|
+
backgroundColor: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
_indeterminate: {
|
44
|
+
borderColor: string;
|
45
|
+
backgroundColor: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
label: {
|
49
|
+
fontSize: string;
|
50
|
+
};
|
51
|
+
};
|
52
|
+
unstyled: {
|
53
|
+
control: {
|
54
|
+
borderColor: string;
|
55
|
+
_checked: {
|
56
|
+
borderColor: string;
|
57
|
+
backgroundColor: string;
|
58
|
+
_hover: {
|
59
|
+
borderColor: string;
|
60
|
+
backgroundColor: string;
|
61
|
+
};
|
62
|
+
_disabled: {
|
63
|
+
backgroundColor: string;
|
64
|
+
borderColor: string;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
_disabled: {
|
68
|
+
backgroundColor: string;
|
69
|
+
};
|
70
|
+
_indeterminate: {
|
71
|
+
borderColor: string;
|
72
|
+
backgroundColor: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
label: {
|
76
|
+
fontSize: string;
|
77
|
+
};
|
78
|
+
};
|
79
|
+
} | undefined;
|
80
|
+
defaultProps?: {
|
81
|
+
size?: string | number | undefined;
|
82
|
+
variant?: "errors" | "unstyled" | undefined;
|
83
|
+
colorScheme?: string | undefined;
|
84
|
+
} | undefined;
|
85
|
+
parts: ("container" | "icon" | "label" | "control")[];
|
86
|
+
};
|
3
87
|
export default Checkbox;
|
@@ -2,7 +2,8 @@ export { default as Button } from './button';
|
|
2
2
|
export { default as Checkbox } from './checkbox';
|
3
3
|
export { default as FormLabel } from './form-label';
|
4
4
|
export { default as Input } from './input';
|
5
|
+
export { default as LoaderStyle } from './loader';
|
6
|
+
export { default as Popover } from './popover';
|
5
7
|
export { default as Radio } from './radio';
|
6
8
|
export { default as Switch } from './switch';
|
7
|
-
export { default as Popover } from './popover';
|
8
9
|
export { default as Textarea } from './textarea';
|
@@ -0,0 +1,85 @@
|
|
1
|
+
declare const LoaderStyle: {
|
2
|
+
baseStyle?: ((props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
3
|
+
borderRadius: string;
|
4
|
+
display: string;
|
5
|
+
justifyContent: string;
|
6
|
+
alignItems: string;
|
7
|
+
animation: string;
|
8
|
+
background: string;
|
9
|
+
':before': {
|
10
|
+
content: string;
|
11
|
+
display: string;
|
12
|
+
borderRadius: string;
|
13
|
+
width: string;
|
14
|
+
height: string;
|
15
|
+
position: string;
|
16
|
+
bottom: number;
|
17
|
+
background: string;
|
18
|
+
};
|
19
|
+
}) | undefined;
|
20
|
+
sizes?: {
|
21
|
+
xs: {
|
22
|
+
width: string;
|
23
|
+
height: string;
|
24
|
+
WebkitMask: string;
|
25
|
+
':before': {
|
26
|
+
width: string;
|
27
|
+
height: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
sm: {
|
31
|
+
width: string;
|
32
|
+
height: string;
|
33
|
+
WebkitMask: string;
|
34
|
+
':before': {
|
35
|
+
width: string;
|
36
|
+
height: string;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
md: {
|
40
|
+
width: string;
|
41
|
+
height: string;
|
42
|
+
WebkitMask: string;
|
43
|
+
':before': {
|
44
|
+
width: string;
|
45
|
+
height: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
lg: {
|
49
|
+
width: string;
|
50
|
+
height: string;
|
51
|
+
WebkitMask: string;
|
52
|
+
':before': {
|
53
|
+
width: string;
|
54
|
+
height: string;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
xl: {
|
58
|
+
width: string;
|
59
|
+
height: string;
|
60
|
+
WebkitMask: string;
|
61
|
+
':before': {
|
62
|
+
width: string;
|
63
|
+
height: string;
|
64
|
+
};
|
65
|
+
};
|
66
|
+
xxl: {
|
67
|
+
width: string;
|
68
|
+
height: string;
|
69
|
+
WebkitMask: string;
|
70
|
+
':before': {
|
71
|
+
width: string;
|
72
|
+
height: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
} | undefined;
|
76
|
+
variants?: {
|
77
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
78
|
+
} | undefined;
|
79
|
+
defaultProps?: {
|
80
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "xxl" | undefined;
|
81
|
+
variant?: string | number | undefined;
|
82
|
+
colorScheme?: string | undefined;
|
83
|
+
} | undefined;
|
84
|
+
};
|
85
|
+
export default LoaderStyle;
|
@@ -1,3 +1,55 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
export declare const Textarea: {
|
2
|
+
baseStyle?: import("@chakra-ui/styled-system").CSSWithMultiValues | (import("@chakra-ui/styled-system").CSSWithMultiValues & import("@chakra-ui/styled-system").RecursivePseudo<import("@chakra-ui/styled-system").CSSWithMultiValues>) | (import("@chakra-ui/styled-system").CSSWithMultiValues & import("@chakra-ui/styled-system").RecursiveCSSSelector<import("@chakra-ui/styled-system").CSSWithMultiValues>) | import("@chakra-ui/styled-system").SystemStyleFunction | undefined;
|
3
|
+
sizes?: {
|
4
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
5
|
+
} | undefined;
|
6
|
+
variants?: {
|
7
|
+
outline: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
8
|
+
background: string;
|
9
|
+
color: string;
|
10
|
+
borderColor: string;
|
11
|
+
fontSize: string;
|
12
|
+
padding: number;
|
13
|
+
borderRadius: string;
|
14
|
+
borderWidth: string;
|
15
|
+
outline: string;
|
16
|
+
_disabled: {
|
17
|
+
opacity: number;
|
18
|
+
color: string;
|
19
|
+
background: string;
|
20
|
+
};
|
21
|
+
_placeholder: {
|
22
|
+
color: string;
|
23
|
+
};
|
24
|
+
_hover: {
|
25
|
+
borderColor: string;
|
26
|
+
};
|
27
|
+
_focus: {
|
28
|
+
outline: string;
|
29
|
+
borderColor: string;
|
30
|
+
boxShadow: string;
|
31
|
+
};
|
32
|
+
_focusVisible: {
|
33
|
+
outline: string;
|
34
|
+
borderColor: string;
|
35
|
+
boxShadow: string;
|
36
|
+
};
|
37
|
+
_focusWithin: {
|
38
|
+
outline: string;
|
39
|
+
borderColor: string;
|
40
|
+
boxShadow: string;
|
41
|
+
};
|
42
|
+
_invalid: {
|
43
|
+
outline: string;
|
44
|
+
borderColor: string;
|
45
|
+
boxShadow: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
} | undefined;
|
49
|
+
defaultProps?: {
|
50
|
+
size?: string | number | undefined;
|
51
|
+
variant?: "outline" | undefined;
|
52
|
+
colorScheme?: string | undefined;
|
53
|
+
} | undefined;
|
54
|
+
};
|
3
55
|
export default Textarea;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export { default as colors } from './colors';
|
2
2
|
export { default as radii } from './radius';
|
3
|
-
export { default as
|
3
|
+
export { default as shadows } from './shadows';
|
4
4
|
export { default as sizes } from './sizes';
|
5
|
-
export {
|
5
|
+
export { default as space } from './spacing';
|
6
|
+
export { fonts, fontSizes, letterSpacings, lineHeights, textStyles } from './typography';
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare const shadows: {
|
2
|
+
raised: string;
|
3
|
+
xs: string;
|
4
|
+
sm: string;
|
5
|
+
base: string;
|
6
|
+
md: string;
|
7
|
+
lg: string;
|
8
|
+
xl: string;
|
9
|
+
"2xl": string;
|
10
|
+
outline: string;
|
11
|
+
inner: string;
|
12
|
+
none: string;
|
13
|
+
"dark-lg": string;
|
14
|
+
};
|
15
|
+
export default shadows;
|
@@ -20,6 +20,11 @@ declare const lineHeights: {
|
|
20
20
|
short: number;
|
21
21
|
base: number;
|
22
22
|
tall: number;
|
23
|
+
64: string;
|
24
|
+
56: string;
|
25
|
+
48: string;
|
26
|
+
40: string;
|
27
|
+
36: string;
|
23
28
|
34: string;
|
24
29
|
32: string;
|
25
30
|
30: string;
|
@@ -33,6 +38,14 @@ declare const lineHeights: {
|
|
33
38
|
14: string;
|
34
39
|
12: string;
|
35
40
|
};
|
41
|
+
declare const letterSpacings: {
|
42
|
+
tighter: string;
|
43
|
+
tight: string;
|
44
|
+
normal: string;
|
45
|
+
wide: string;
|
46
|
+
wider: string;
|
47
|
+
widest: string;
|
48
|
+
};
|
36
49
|
declare const fontSizes: {
|
37
50
|
heading: {
|
38
51
|
1: string;
|
@@ -67,37 +80,37 @@ declare const textStyles: {
|
|
67
80
|
heading: {
|
68
81
|
1: {
|
69
82
|
fontSize: string;
|
70
|
-
fontWeight:
|
83
|
+
fontWeight: number;
|
71
84
|
lineHeight: string;
|
72
85
|
letterSpacing: string;
|
73
86
|
};
|
74
87
|
2: {
|
75
88
|
fontSize: string;
|
76
|
-
fontWeight:
|
89
|
+
fontWeight: number;
|
77
90
|
lineHeight: string;
|
78
91
|
letterSpacing: string;
|
79
92
|
};
|
80
93
|
3: {
|
81
94
|
fontSize: string;
|
82
|
-
fontWeight:
|
95
|
+
fontWeight: number;
|
83
96
|
lineHeight: string;
|
84
97
|
letterSpacing: string;
|
85
98
|
};
|
86
99
|
4: {
|
87
100
|
fontSize: string;
|
88
|
-
fontWeight:
|
101
|
+
fontWeight: number;
|
89
102
|
lineHeight: string;
|
90
103
|
letterSpacing: string;
|
91
104
|
};
|
92
105
|
5: {
|
93
106
|
fontSize: string;
|
94
|
-
fontWeight:
|
107
|
+
fontWeight: number;
|
95
108
|
lineHeight: string;
|
96
109
|
letterSpacing: string;
|
97
110
|
};
|
98
111
|
6: {
|
99
112
|
fontSize: string;
|
100
|
-
fontWeight:
|
113
|
+
fontWeight: number;
|
101
114
|
lineHeight: string;
|
102
115
|
letterSpacing: string;
|
103
116
|
};
|
@@ -105,26 +118,31 @@ declare const textStyles: {
|
|
105
118
|
text: {
|
106
119
|
xl: {
|
107
120
|
fontSize: string;
|
121
|
+
fontWeight: number;
|
108
122
|
lineHeight: string;
|
109
123
|
letterSpacing: string;
|
110
124
|
};
|
111
125
|
lg: {
|
112
126
|
fontSize: string;
|
127
|
+
fontWeight: number;
|
113
128
|
lineHeight: string;
|
114
129
|
letterSpacing: string;
|
115
130
|
};
|
116
131
|
md: {
|
117
132
|
fontSize: string;
|
133
|
+
fontWeight: number;
|
118
134
|
lineHeight: string;
|
119
135
|
letterSpacing: string;
|
120
136
|
};
|
121
137
|
sm: {
|
122
138
|
fontSize: string;
|
139
|
+
fontWeight: number;
|
123
140
|
lineHeight: string;
|
124
141
|
letterSpacing: string;
|
125
142
|
};
|
126
143
|
xs: {
|
127
144
|
fontSize: string;
|
145
|
+
fontWeight: number;
|
128
146
|
lineHeight: string;
|
129
147
|
letterSpacing: string;
|
130
148
|
};
|
@@ -170,4 +188,4 @@ declare const textStyles: {
|
|
170
188
|
};
|
171
189
|
};
|
172
190
|
};
|
173
|
-
export { fonts, fontSizes, fontWeights, lineHeights, textStyles };
|
191
|
+
export { fonts, fontSizes, fontWeights, letterSpacings, lineHeights, textStyles };
|