@lunit/design-system 1.0.0-a.4 → 1.0.0-a.5
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/README.md +2 -2
- package/dist/cjs/components/Alert/index.js +1 -1
- package/dist/cjs/components/Alert/index.js.map +1 -1
- package/dist/cjs/components/Button/index.js +1 -1
- package/dist/cjs/components/Button/index.js.map +1 -1
- package/dist/cjs/components/TextField/index.js +1 -1
- package/dist/cjs/components/TextField/index.js.map +1 -1
- package/dist/cjs/components/ToggleButton/index.js +1 -1
- package/dist/cjs/components/ToggleButton/index.js.map +1 -1
- package/dist/cjs/components/Typography/index.js +2 -0
- package/dist/cjs/components/Typography/index.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.styled.js +42 -21
- package/dist/components/Button/Button.styled.js.map +1 -1
- package/dist/components/TextField/TextField.js +3 -3
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.style.js +3 -0
- package/dist/components/TextField/TextField.style.js.map +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/index.js.map +1 -1
- package/dist/components/Typography/index.js +3 -0
- package/dist/components/Typography/index.js.map +1 -0
- package/dist/foundation/Typography/index.js.map +1 -1
- package/dist/foundation/colors/index.js +9 -11
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/foundation/colors/token/component.js +22 -38
- package/dist/foundation/colors/token/component.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +39 -19
- package/dist/types/components/Button/Button.types.d.ts +1 -1
- package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
- package/dist/types/components/Chip/Chip.types.d.ts +1 -0
- package/dist/types/components/TextField/TextField.style.d.ts +3 -1
- package/dist/types/components/TextField/TextField.types.d.ts +2 -3
- package/dist/types/components/TextField/TextFieldIcon.d.ts +1 -0
- package/dist/types/components/Toast/index.d.ts +2 -1
- package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
- package/dist/types/components/Typography/index.d.ts +7 -0
- package/dist/types/foundation/Typography/index.d.ts +1 -5
- package/dist/types/foundation/colors/index.d.ts +9 -11
- package/dist/types/foundation/colors/types.d.ts +9 -11
- package/dist/types/foundation/index.d.ts +9 -11
- package/dist/types/index.d.ts +3 -0
- package/package.json +21 -16
- package/src/components/Button/Button.styled.ts +42 -22
- package/src/components/Button/Button.tsx +12 -10
- package/src/components/Button/Button.types.ts +1 -1
- package/src/components/TextField/TextField.style.ts +3 -0
- package/src/components/TextField/TextField.tsx +3 -3
- package/src/components/TextField/TextField.types.ts +1 -3
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Toast/index.tsx +2 -1
- package/src/components/Typography/index.ts +9 -0
- package/src/foundation/Typography/index.ts +2 -6
- package/src/foundation/colors/index.ts +9 -11
- package/src/foundation/colors/token/component.ts +22 -38
- package/src/foundation/colors/types.ts +9 -11
- package/src/index.ts +3 -0
- package/src/stories/components/Button/Kind.stories.tsx +38 -5
- package/src/stories/components/Toast/Toast.stories.tsx +1 -1
- package/src/stories/foundation/Typography/Typography.mdx +1 -1
- package/src/stories/foundation/Typography/Typography.stories.tsx +3 -1
- package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +2 -2
- package/src/stories/foundation/Typography/TypographyGroup.tsx +3 -7
|
@@ -68,76 +68,96 @@ export const kindStyle = ({ kind, color, token }: KindStyleParams) => ({
|
|
|
68
68
|
// kind: container
|
|
69
69
|
...(kind === "contained" &&
|
|
70
70
|
color === "primary" && {
|
|
71
|
-
color: token.component.
|
|
72
|
-
backgroundColor: token.component.
|
|
73
|
-
"&:hover": getHoverStyle(token.component.
|
|
71
|
+
color: token.component.btn_primary_text_2,
|
|
72
|
+
backgroundColor: token.component.btn_primary_bg,
|
|
73
|
+
"&:hover": getHoverStyle(token.component.btn_primary_bg),
|
|
74
74
|
"&.Mui-disabled": {
|
|
75
75
|
opacity: 0.38,
|
|
76
76
|
border: "none",
|
|
77
|
-
color: token.component.
|
|
77
|
+
color: token.component.btn_primary_text_2,
|
|
78
78
|
},
|
|
79
79
|
}),
|
|
80
80
|
...(kind === "contained" &&
|
|
81
81
|
color === "secondary" && {
|
|
82
|
-
color: token.component.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"&:hover": getHoverStyle(token.component.btn_contained_secondary_bg),
|
|
82
|
+
color: token.component.btn_secondary_text,
|
|
83
|
+
backgroundColor: token.component.btn_secondary_bg,
|
|
84
|
+
"&:hover": getHoverStyle(token.component.btn_secondary_bg),
|
|
86
85
|
"&.Mui-disabled": {
|
|
87
86
|
opacity: 0.38,
|
|
88
87
|
border: "none",
|
|
89
|
-
color: token.component.
|
|
88
|
+
color: token.component.btn_secondary_text,
|
|
90
89
|
},
|
|
91
90
|
}),
|
|
92
91
|
...(kind === "contained" &&
|
|
93
92
|
color === "error" && {
|
|
94
|
-
color: token.component.
|
|
95
|
-
backgroundColor: token.component.
|
|
96
|
-
"&:hover": getHoverStyle(token.component.
|
|
93
|
+
color: token.component.btn_primary_text_2,
|
|
94
|
+
backgroundColor: token.component.btn_error_bg,
|
|
95
|
+
"&:hover": getHoverStyle(token.component.btn_error_bg),
|
|
97
96
|
"&.Mui-disabled": {
|
|
98
97
|
opacity: 0.38,
|
|
99
98
|
border: "none",
|
|
100
|
-
color: token.component.
|
|
99
|
+
color: token.component.btn_primary_text_2,
|
|
101
100
|
},
|
|
102
101
|
}),
|
|
103
102
|
// kind: ghost
|
|
104
103
|
...(kind === "ghost" &&
|
|
105
104
|
color === "primary" && {
|
|
106
|
-
color: token.component.
|
|
105
|
+
color: token.component.btn_primary_text_1,
|
|
107
106
|
border: "none",
|
|
108
107
|
"&:hover": getHoverStyle("none"),
|
|
109
108
|
"&.Mui-disabled": {
|
|
110
109
|
opacity: 0.38,
|
|
111
110
|
border: "none",
|
|
112
|
-
color: token.component.
|
|
111
|
+
color: token.component.btn_primary_text_1,
|
|
113
112
|
},
|
|
114
113
|
}),
|
|
115
114
|
...(kind === "ghost" &&
|
|
116
115
|
color === "secondary" && {
|
|
117
|
-
color: token.component.
|
|
116
|
+
color: token.component.btn_secondary_text,
|
|
118
117
|
border: "none",
|
|
119
118
|
"&:hover": getHoverStyle("none"),
|
|
120
119
|
"&.Mui-disabled": {
|
|
121
120
|
opacity: 0.38,
|
|
122
121
|
border: "none",
|
|
123
|
-
color: token.component.
|
|
122
|
+
color: token.component.btn_secondary_text,
|
|
124
123
|
},
|
|
125
124
|
}),
|
|
126
125
|
...(kind === "ghost" &&
|
|
127
126
|
color === "error" && {
|
|
128
|
-
color: token.component.
|
|
127
|
+
color: token.component.btn_error_text,
|
|
129
128
|
"&:hover": getHoverStyle("none"),
|
|
130
129
|
"&.Mui-disabled": {
|
|
131
130
|
opacity: 0.38,
|
|
132
131
|
border: "none",
|
|
133
|
-
color: token.component.
|
|
132
|
+
color: token.component.btn_error_text,
|
|
134
133
|
},
|
|
135
134
|
}),
|
|
136
135
|
// kind: outlined
|
|
137
136
|
...(kind === "outlined" &&
|
|
138
137
|
color === "primary" && {
|
|
139
|
-
color: token.component.
|
|
140
|
-
border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.
|
|
138
|
+
color: token.component.btn_primary_text_1,
|
|
139
|
+
border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_primary_border}`,
|
|
140
|
+
"&:hover": getHoverStyle("none"),
|
|
141
|
+
"&:hover:before": {
|
|
142
|
+
content: "''",
|
|
143
|
+
position: "absolute",
|
|
144
|
+
left: "-1px",
|
|
145
|
+
top: "-1px",
|
|
146
|
+
width: "calc(100% + 2px)",
|
|
147
|
+
height: "calc(100% + 2px)",
|
|
148
|
+
zIndex: -1,
|
|
149
|
+
backgroundColor: token.core.hover,
|
|
150
|
+
borderRadius,
|
|
151
|
+
},
|
|
152
|
+
"&.Mui-disabled": {
|
|
153
|
+
opacity: 0.38,
|
|
154
|
+
color: token.component.btn_primary_text_1,
|
|
155
|
+
},
|
|
156
|
+
}),
|
|
157
|
+
...(kind === "outlined" &&
|
|
158
|
+
color === "secondary" && {
|
|
159
|
+
color: token.component.btn_secondary_text,
|
|
160
|
+
border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_secondary_border}`,
|
|
141
161
|
"&:hover": getHoverStyle("none"),
|
|
142
162
|
"&:hover:before": {
|
|
143
163
|
content: "''",
|
|
@@ -152,7 +172,7 @@ export const kindStyle = ({ kind, color, token }: KindStyleParams) => ({
|
|
|
152
172
|
},
|
|
153
173
|
"&.Mui-disabled": {
|
|
154
174
|
opacity: 0.38,
|
|
155
|
-
color: token.component.
|
|
175
|
+
color: token.component.btn_secondary_text,
|
|
156
176
|
},
|
|
157
177
|
}),
|
|
158
178
|
});
|
|
@@ -6,7 +6,6 @@ import type { ButtonProps } from "./Button.types";
|
|
|
6
6
|
|
|
7
7
|
const Button = (props: ButtonProps) => {
|
|
8
8
|
const {
|
|
9
|
-
kind = "contained",
|
|
10
9
|
size = "small",
|
|
11
10
|
color = "primary",
|
|
12
11
|
icon,
|
|
@@ -18,27 +17,30 @@ const Button = (props: ButtonProps) => {
|
|
|
18
17
|
|
|
19
18
|
return (
|
|
20
19
|
<>
|
|
21
|
-
{kind
|
|
20
|
+
{/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}
|
|
21
|
+
{props.kind === "outlined" ? (
|
|
22
22
|
<CustomButton
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
{...buttonProps}
|
|
24
|
+
className={`outlined ${className ? className : ""}`}
|
|
25
|
+
kind="outlined"
|
|
26
|
+
color={props.color ?? "primary"}
|
|
26
27
|
size={size}
|
|
27
28
|
startIcon={icon}
|
|
28
29
|
hasIconOnly={hasIconOnly}
|
|
29
|
-
{...buttonProps}
|
|
30
30
|
>
|
|
31
31
|
{!hasIconOnly && <>{children}</>}
|
|
32
32
|
</CustomButton>
|
|
33
33
|
) : (
|
|
34
34
|
<CustomButton
|
|
35
|
-
|
|
36
|
-
kind
|
|
37
|
-
|
|
35
|
+
{...buttonProps}
|
|
36
|
+
className={`${props.kind ?? "contained"} ${
|
|
37
|
+
className ? className : ""
|
|
38
|
+
}`}
|
|
39
|
+
kind={props.kind ?? "contained"}
|
|
40
|
+
color={props.color ?? "primary"}
|
|
38
41
|
size={size}
|
|
39
42
|
startIcon={icon}
|
|
40
43
|
hasIconOnly={hasIconOnly}
|
|
41
|
-
{...buttonProps}
|
|
42
44
|
>
|
|
43
45
|
{!hasIconOnly && <>{children}</>}
|
|
44
46
|
</CustomButton>
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
|
|
12
12
|
const SingleTextField = (props: SingleTextFieldProps) => {
|
|
13
13
|
const {
|
|
14
|
-
size,
|
|
14
|
+
size = "small",
|
|
15
15
|
leftIcon,
|
|
16
16
|
rightIcon,
|
|
17
17
|
leftIconSx,
|
|
@@ -48,7 +48,7 @@ const SingleTextField = (props: SingleTextFieldProps) => {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
const MultiTextField = ({
|
|
51
|
-
size,
|
|
51
|
+
size = "small",
|
|
52
52
|
onChange,
|
|
53
53
|
...restProps
|
|
54
54
|
}: MultiTextFieldProps) => {
|
|
@@ -58,7 +58,7 @@ const MultiTextField = ({
|
|
|
58
58
|
const TextField = (props: TextFieldProps) => {
|
|
59
59
|
const {
|
|
60
60
|
rows,
|
|
61
|
-
size
|
|
61
|
+
size,
|
|
62
62
|
multiline = false,
|
|
63
63
|
variant = "outlined",
|
|
64
64
|
...restProps
|
|
@@ -10,7 +10,7 @@ export interface BaseTextFieldProps
|
|
|
10
10
|
/**
|
|
11
11
|
* The design system TextField variable is outlined fixed.
|
|
12
12
|
*/
|
|
13
|
-
variant
|
|
13
|
+
variant?: "outlined";
|
|
14
14
|
value?: string;
|
|
15
15
|
helperText?: string;
|
|
16
16
|
|
|
@@ -21,7 +21,6 @@ export interface BaseTextFieldProps
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface SingleTextFieldProps extends BaseTextFieldProps {
|
|
24
|
-
size: TextFieldSize;
|
|
25
24
|
leftIcon?: JSX.Element;
|
|
26
25
|
rightIcon?: JSX.Element;
|
|
27
26
|
leftIconSx?: SxProps;
|
|
@@ -32,7 +31,6 @@ export interface SingleTextFieldProps extends BaseTextFieldProps {
|
|
|
32
31
|
|
|
33
32
|
export interface MultiTextFieldProps extends BaseTextFieldProps {
|
|
34
33
|
rows?: number | string;
|
|
35
|
-
size: TextFieldSize;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
export type TextFieldProps = SingleTextFieldProps | MultiTextFieldProps;
|
|
@@ -18,6 +18,7 @@ const MAPPED_ICON = {
|
|
|
18
18
|
error: <Error variant="filled" />,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
// this forwardRef is required for using with Snackbar component
|
|
21
22
|
const Toast = forwardRef<HTMLDivElement, ToastProps>((props, ref) => {
|
|
22
23
|
const {
|
|
23
24
|
severity = "normal",
|
|
@@ -62,5 +63,4 @@ const Toast = forwardRef<HTMLDivElement, ToastProps>((props, ref) => {
|
|
|
62
63
|
);
|
|
63
64
|
});
|
|
64
65
|
|
|
65
|
-
// this forwardRef is required for using with Snackbar component
|
|
66
66
|
export default Toast;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default } from "./Toast";
|
|
2
|
+
export type { ToastProps } from "./Toast.types";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Typography from "@mui/material/Typography";
|
|
2
|
+
import type { TypographyPropsVariantOverridesType } from "../../foundation/Typography";
|
|
3
|
+
|
|
4
|
+
declare module "@mui/material/Typography" {
|
|
5
|
+
interface TypographyPropsVariantOverrides
|
|
6
|
+
extends TypographyPropsVariantOverridesType {}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default Typography;
|
|
@@ -24,11 +24,7 @@ declare module "@mui/material/styles" {
|
|
|
24
24
|
interface TypographyVariantsOptions extends Partial<DSVariantsType> {}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
type TypographyPropsVariantOverridesType = Record<DSVariants, true>;
|
|
28
|
-
declare module "@mui/material/Typography" {
|
|
29
|
-
interface TypographyPropsVariantOverrides
|
|
30
|
-
extends TypographyPropsVariantOverridesType {}
|
|
31
|
-
}
|
|
27
|
+
export type TypographyPropsVariantOverridesType = Record<DSVariants, true>;
|
|
32
28
|
|
|
33
29
|
const fontFamily = [
|
|
34
30
|
"Pretendard",
|
|
@@ -93,4 +89,4 @@ export const createTypographyCssBaseline = () => {
|
|
|
93
89
|
};
|
|
94
90
|
};
|
|
95
91
|
|
|
96
|
-
export default typographyOptions;
|
|
92
|
+
export default typographyOptions;
|
|
@@ -197,17 +197,15 @@ const paletteOptions = {
|
|
|
197
197
|
shadow_04: "var(--shadow_04)",
|
|
198
198
|
},
|
|
199
199
|
component: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
btn_ghost_secondary_text: "var(--btn_ghost_secondary_text)",
|
|
210
|
-
btn_ghost_error_text: "var(--btn_ghost_error_text)",
|
|
200
|
+
btn_primary_bg: "var(--btn_primary_bg)",
|
|
201
|
+
btn_secondary_bg: "var(--btn_secondary_bg)",
|
|
202
|
+
btn_error_bg: "var(--btn_error_bg)",
|
|
203
|
+
btn_primary_border: "var(--btn_primary_border)",
|
|
204
|
+
btn_secondary_border: "var(--btn_secondary_border)",
|
|
205
|
+
btn_primary_text_1: "var(--btn_primary_text_1)",
|
|
206
|
+
btn_primary_text_2: "var(--btn_primary_text_2)",
|
|
207
|
+
btn_secondary_text: "var(--btn_secondary_text)",
|
|
208
|
+
btn_error_text: "var(--btn_error_text)",
|
|
211
209
|
btn_selected_primary_bg: "var(--btn_selected_primary_bg)",
|
|
212
210
|
btn_selected_primary_text: "var(--btn_selected_primary_text)",
|
|
213
211
|
btn_selected_secondary_bg: "var(--btn_selected_secondary_bg)",
|
|
@@ -8,7 +8,7 @@ export interface TokenComponentColorValue {
|
|
|
8
8
|
|
|
9
9
|
export const tokenComponentColor: TokenComponentColorValue = {
|
|
10
10
|
btn: {
|
|
11
|
-
|
|
11
|
+
btn_primary_bg: {
|
|
12
12
|
light1: "--lunit_teal_30",
|
|
13
13
|
light2: "--lunit_teal_30",
|
|
14
14
|
dark1: "--lunit_teal_40",
|
|
@@ -16,15 +16,7 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
16
16
|
dark3: "--lunit_teal_40",
|
|
17
17
|
dark4: "--lunit_teal_40",
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
light1: "--grey_95",
|
|
21
|
-
light2: "--grey_95",
|
|
22
|
-
dark1: "--grey_95",
|
|
23
|
-
dark2: "--grey_95",
|
|
24
|
-
dark3: "--grey_95",
|
|
25
|
-
dark4: "--grey_95",
|
|
26
|
-
},
|
|
27
|
-
btn_contained_secondary_bg: {
|
|
19
|
+
btn_secondary_bg: {
|
|
28
20
|
light1: "--grey_15",
|
|
29
21
|
light2: "--grey_15",
|
|
30
22
|
dark1: "--grey_60",
|
|
@@ -32,15 +24,7 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
32
24
|
dark3: "--grey_60",
|
|
33
25
|
dark4: "--grey_60",
|
|
34
26
|
},
|
|
35
|
-
|
|
36
|
-
light1: "--grey_95",
|
|
37
|
-
light2: "--grey_95",
|
|
38
|
-
dark1: "--grey_5",
|
|
39
|
-
dark2: "--grey_5",
|
|
40
|
-
dark3: "--grey_5",
|
|
41
|
-
dark4: "--grey_5",
|
|
42
|
-
},
|
|
43
|
-
btn_contained_error_bg: {
|
|
27
|
+
btn_error_bg: {
|
|
44
28
|
light1: "--red_30",
|
|
45
29
|
light2: "--red_30",
|
|
46
30
|
dark1: "--red_40",
|
|
@@ -48,15 +32,7 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
48
32
|
dark3: "--red_40",
|
|
49
33
|
dark4: "--red_40",
|
|
50
34
|
},
|
|
51
|
-
|
|
52
|
-
light1: "--grey_95",
|
|
53
|
-
light2: "--grey_95",
|
|
54
|
-
dark1: "--grey_95",
|
|
55
|
-
dark2: "--grey_95",
|
|
56
|
-
dark3: "--grey_95",
|
|
57
|
-
dark4: "--grey_95",
|
|
58
|
-
},
|
|
59
|
-
btn_outlined_primary_border: {
|
|
35
|
+
btn_primary_border: {
|
|
60
36
|
light1: "--lunit_teal_40",
|
|
61
37
|
light2: "--lunit_teal_40",
|
|
62
38
|
dark1: "--lunit_teal_40",
|
|
@@ -64,15 +40,15 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
64
40
|
dark3: "--lunit_teal_40",
|
|
65
41
|
dark4: "--lunit_teal_40",
|
|
66
42
|
},
|
|
67
|
-
|
|
68
|
-
light1: "--
|
|
69
|
-
light2: "--
|
|
70
|
-
dark1: "--
|
|
71
|
-
dark2: "--
|
|
72
|
-
dark3: "--
|
|
73
|
-
dark4: "--
|
|
43
|
+
btn_secondary_border: {
|
|
44
|
+
light1: "--grey_15",
|
|
45
|
+
light2: "--grey_15",
|
|
46
|
+
dark1: "--grey_5",
|
|
47
|
+
dark2: "--grey_5",
|
|
48
|
+
dark3: "--grey_5",
|
|
49
|
+
dark4: "--grey_5",
|
|
74
50
|
},
|
|
75
|
-
|
|
51
|
+
btn_primary_text_1: {
|
|
76
52
|
light1: "--lunit_teal_50",
|
|
77
53
|
light2: "--lunit_teal_50",
|
|
78
54
|
dark1: "--lunit_teal_40",
|
|
@@ -80,7 +56,15 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
80
56
|
dark3: "--lunit_teal_40",
|
|
81
57
|
dark4: "--lunit_teal_40",
|
|
82
58
|
},
|
|
83
|
-
|
|
59
|
+
btn_primary_text_2: {
|
|
60
|
+
light1: "--grey_95",
|
|
61
|
+
light2: "--grey_95",
|
|
62
|
+
dark1: "--grey_95",
|
|
63
|
+
dark2: "--grey_95",
|
|
64
|
+
dark3: "--grey_95",
|
|
65
|
+
dark4: "--grey_95",
|
|
66
|
+
},
|
|
67
|
+
btn_secondary_text: {
|
|
84
68
|
light1: "--grey_95",
|
|
85
69
|
light2: "--grey_95",
|
|
86
70
|
dark1: "--grey_5",
|
|
@@ -88,7 +72,7 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
88
72
|
dark3: "--grey_5",
|
|
89
73
|
dark4: "--grey_5",
|
|
90
74
|
},
|
|
91
|
-
|
|
75
|
+
btn_error_text: {
|
|
92
76
|
light1: "--red_40",
|
|
93
77
|
light2: "--red_40",
|
|
94
78
|
dark1: "--red_40",
|
|
@@ -29,17 +29,15 @@ export interface ColorToken {
|
|
|
29
29
|
shadow_04: CSSPropertyColor;
|
|
30
30
|
};
|
|
31
31
|
component: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
btn_ghost_secondary_text: CSSPropertyColor;
|
|
42
|
-
btn_ghost_error_text: CSSPropertyColor;
|
|
32
|
+
btn_primary_bg: CSSPropertyColor;
|
|
33
|
+
btn_secondary_bg: CSSPropertyColor;
|
|
34
|
+
btn_error_bg: CSSPropertyColor;
|
|
35
|
+
btn_primary_border: CSSPropertyColor;
|
|
36
|
+
btn_secondary_border: CSSPropertyColor;
|
|
37
|
+
btn_primary_text_1: CSSPropertyColor;
|
|
38
|
+
btn_primary_text_2: CSSPropertyColor;
|
|
39
|
+
btn_secondary_text: CSSPropertyColor;
|
|
40
|
+
btn_error_text: CSSPropertyColor;
|
|
43
41
|
btn_selected_primary_bg: CSSPropertyColor;
|
|
44
42
|
btn_selected_primary_text: CSSPropertyColor;
|
|
45
43
|
btn_selected_secondary_bg: CSSPropertyColor;
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { base as baseColors } from "./foundation/colors";
|
|
|
4
4
|
export { default as Alert } from "./components/Alert";
|
|
5
5
|
export { default as Button } from "./components/Button";
|
|
6
6
|
export { default as Chip } from "./components/Chip";
|
|
7
|
+
export { default as Checkbox } from "./components/Checkbox";
|
|
7
8
|
export { default as DataTable } from "./components/DataTable";
|
|
8
9
|
export { default as DatePicker } from "./components/DatePicker";
|
|
9
10
|
export { default as Dropdown } from "./components/Dropdown";
|
|
@@ -12,7 +13,9 @@ export { default as Modal } from "./components/Modal";
|
|
|
12
13
|
export { default as Radio } from "./components/Radio";
|
|
13
14
|
export { default as RadioGroup } from "./components/RadioGroup";
|
|
14
15
|
export { default as TextField } from "./components/TextField";
|
|
16
|
+
export { default as Toast } from "./components/Toast";
|
|
15
17
|
export { default as Toggle } from "./components/Toggle";
|
|
16
18
|
export { default as ToggleButton } from "./components/ToggleButton";
|
|
17
19
|
export { default as ToggleButtonGroup } from "./components/ToggleButtonGroup";
|
|
18
20
|
export { default as Tooltip } from "./components/Tooltip";
|
|
21
|
+
export { default as Typography } from "./components/Typography";
|
|
@@ -450,13 +450,16 @@ const OutlinedButtonTemplate: StoryFn<typeof Button> = ({
|
|
|
450
450
|
}) => {
|
|
451
451
|
return (
|
|
452
452
|
<>
|
|
453
|
-
<Table sx={{ width:
|
|
453
|
+
<Table sx={{ width: 600 }}>
|
|
454
454
|
<TableHead>
|
|
455
455
|
<TableRow>
|
|
456
456
|
<TableCell></TableCell>
|
|
457
457
|
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
458
458
|
Outlined Primary
|
|
459
459
|
</TableCell>
|
|
460
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
461
|
+
Outlined Secondary
|
|
462
|
+
</TableCell>
|
|
460
463
|
</TableRow>
|
|
461
464
|
</TableHead>
|
|
462
465
|
<TableBody>
|
|
@@ -468,7 +471,12 @@ const OutlinedButtonTemplate: StoryFn<typeof Button> = ({
|
|
|
468
471
|
</TableCell>
|
|
469
472
|
<TableCell>
|
|
470
473
|
<Button {...restProps} kind="outlined">
|
|
471
|
-
|
|
474
|
+
{restProps.children}
|
|
475
|
+
</Button>
|
|
476
|
+
</TableCell>
|
|
477
|
+
<TableCell>
|
|
478
|
+
<Button {...restProps} kind="outlined" color="secondary">
|
|
479
|
+
{restProps.children}
|
|
472
480
|
</Button>
|
|
473
481
|
</TableCell>
|
|
474
482
|
</TableRow>
|
|
@@ -480,7 +488,17 @@ const OutlinedButtonTemplate: StoryFn<typeof Button> = ({
|
|
|
480
488
|
</TableCell>
|
|
481
489
|
<TableCell>
|
|
482
490
|
<Button {...restProps} id="hover7" kind="outlined">
|
|
483
|
-
|
|
491
|
+
{restProps.children}
|
|
492
|
+
</Button>
|
|
493
|
+
</TableCell>
|
|
494
|
+
<TableCell>
|
|
495
|
+
<Button
|
|
496
|
+
{...restProps}
|
|
497
|
+
id="hover7"
|
|
498
|
+
kind="outlined"
|
|
499
|
+
color="secondary"
|
|
500
|
+
>
|
|
501
|
+
{restProps.children}
|
|
484
502
|
</Button>
|
|
485
503
|
</TableCell>
|
|
486
504
|
</TableRow>
|
|
@@ -496,7 +514,17 @@ const OutlinedButtonTemplate: StoryFn<typeof Button> = ({
|
|
|
496
514
|
kind="outlined"
|
|
497
515
|
className="Mui-focusVisible"
|
|
498
516
|
>
|
|
499
|
-
|
|
517
|
+
{restProps.children}
|
|
518
|
+
</Button>
|
|
519
|
+
</TableCell>
|
|
520
|
+
<TableCell>
|
|
521
|
+
<Button
|
|
522
|
+
{...restProps}
|
|
523
|
+
kind="outlined"
|
|
524
|
+
color="secondary"
|
|
525
|
+
className="Mui-focusVisible"
|
|
526
|
+
>
|
|
527
|
+
{restProps.children}
|
|
500
528
|
</Button>
|
|
501
529
|
</TableCell>
|
|
502
530
|
</TableRow>
|
|
@@ -508,7 +536,12 @@ const OutlinedButtonTemplate: StoryFn<typeof Button> = ({
|
|
|
508
536
|
</TableCell>
|
|
509
537
|
<TableCell>
|
|
510
538
|
<Button {...restProps} kind="outlined" disabled>
|
|
511
|
-
|
|
539
|
+
{restProps.children}
|
|
540
|
+
</Button>
|
|
541
|
+
</TableCell>
|
|
542
|
+
<TableCell>
|
|
543
|
+
<Button {...restProps} kind="outlined" color="secondary" disabled>
|
|
544
|
+
{restProps.children}
|
|
512
545
|
</Button>
|
|
513
546
|
</TableCell>
|
|
514
547
|
</TableRow>
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StoryFn, Meta } from "@storybook/react";
|
|
3
3
|
import { Box } from "@mui/material";
|
|
4
4
|
|
|
5
|
-
import Toast from "@/components/Toast
|
|
5
|
+
import Toast from "@/components/Toast";
|
|
6
6
|
import { action } from "@storybook/addon-actions";
|
|
7
7
|
import Button from "@/components/Button";
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, Canvas, Story } from "@storybook/blocks";
|
|
2
2
|
import * as TypographyStories from "./TypographyExamples.stories";
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import Typography from "@/components/Typography";
|
|
5
5
|
|
|
6
6
|
import { variants } from "./const";
|
|
7
7
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
import { StoryFn } from "@storybook/react";
|
|
4
|
-
import { Box
|
|
4
|
+
import { Box } from "@mui/material";
|
|
5
5
|
import { styled } from "@mui/material/styles";
|
|
6
6
|
|
|
7
|
+
import Typography from "@/components/Typography";
|
|
8
|
+
|
|
7
9
|
import { variantArray } from "./const";
|
|
8
10
|
|
|
9
11
|
export default {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Typography } from "@mui/material";
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import Typography from "@/components/Typography";
|
|
5
4
|
|
|
5
|
+
import { variants } from "./const";
|
|
6
6
|
import TypographyGroup from "./TypographyGroup";
|
|
7
7
|
|
|
8
8
|
const AllVariants = () => (
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
styled,
|
|
7
|
-
useTheme,
|
|
8
|
-
TypographyProps,
|
|
9
|
-
} from "@mui/material";
|
|
3
|
+
import { Box, styled, useTheme, TypographyProps } from "@mui/material";
|
|
4
|
+
|
|
5
|
+
import Typography from "@/components/Typography";
|
|
10
6
|
|
|
11
7
|
export const TypographyContent = styled(Box)({
|
|
12
8
|
display: "flex",
|