@lunit/design-system 1.0.0-a.4 → 1.0.0-b.1

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.
Files changed (117) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/components/Alert/index.js +1 -1
  3. package/dist/cjs/components/Alert/index.js.map +1 -1
  4. package/dist/cjs/components/Button/index.js +1 -1
  5. package/dist/cjs/components/Button/index.js.map +1 -1
  6. package/dist/cjs/components/Checkbox/index.js +1 -1
  7. package/dist/cjs/components/Checkbox/index.js.map +1 -1
  8. package/dist/cjs/components/Chip/index.js +1 -1
  9. package/dist/cjs/components/Chip/index.js.map +1 -1
  10. package/dist/cjs/components/Radio/index.js +1 -1
  11. package/dist/cjs/components/Radio/index.js.map +1 -1
  12. package/dist/cjs/components/TextField/index.js +1 -1
  13. package/dist/cjs/components/TextField/index.js.map +1 -1
  14. package/dist/cjs/components/Toggle/index.js +1 -1
  15. package/dist/cjs/components/Toggle/index.js.map +1 -1
  16. package/dist/cjs/components/ToggleButton/index.js +1 -1
  17. package/dist/cjs/components/ToggleButton/index.js.map +1 -1
  18. package/dist/cjs/components/Typography/index.js +2 -0
  19. package/dist/cjs/components/Typography/index.js.map +1 -0
  20. package/dist/cjs/index.js +1 -1
  21. package/dist/cjs/index.js.map +1 -1
  22. package/dist/components/Alert/Alert.js.map +1 -1
  23. package/dist/components/Alert/Alert.styled.js +2 -2
  24. package/dist/components/Alert/Alert.styled.js.map +1 -1
  25. package/dist/components/Alert/Alert.utils.js +12 -12
  26. package/dist/components/Alert/Alert.utils.js.map +1 -1
  27. package/dist/components/Button/Button.js +2 -2
  28. package/dist/components/Button/Button.js.map +1 -1
  29. package/dist/components/Button/Button.styled.js +50 -29
  30. package/dist/components/Button/Button.styled.js.map +1 -1
  31. package/dist/components/Checkbox/Checkbox.js +4 -4
  32. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  33. package/dist/components/Chip/Chip.styled.js +15 -15
  34. package/dist/components/Chip/Chip.styled.js.map +1 -1
  35. package/dist/components/Radio/Radio.js +3 -3
  36. package/dist/components/Radio/Radio.js.map +1 -1
  37. package/dist/components/TextField/TextField.js +3 -3
  38. package/dist/components/TextField/TextField.js.map +1 -1
  39. package/dist/components/TextField/TextField.style.js +30 -27
  40. package/dist/components/TextField/TextField.style.js.map +1 -1
  41. package/dist/components/Toast/Toast.js +1 -1
  42. package/dist/components/Toast/Toast.js.map +1 -1
  43. package/dist/components/Toast/Toast.styled.js +3 -3
  44. package/dist/components/Toast/Toast.styled.js.map +1 -1
  45. package/dist/components/Toast/Toast.utils.js +4 -4
  46. package/dist/components/Toast/Toast.utils.js.map +1 -1
  47. package/dist/components/Toast/index.js +1 -1
  48. package/dist/components/Toast/index.js.map +1 -1
  49. package/dist/components/Toggle/Toggle.styled.js +20 -20
  50. package/dist/components/Toggle/Toggle.styled.js.map +1 -1
  51. package/dist/components/ToggleButton/ToggleButton.styled.js +7 -7
  52. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
  53. package/dist/components/Typography/index.js +3 -0
  54. package/dist/components/Typography/index.js.map +1 -0
  55. package/dist/foundation/Elevation/index.js +4 -4
  56. package/dist/foundation/Elevation/index.js.map +1 -1
  57. package/dist/foundation/Typography/index.js.map +1 -1
  58. package/dist/foundation/colors/index.js +12 -13
  59. package/dist/foundation/colors/index.js.map +1 -1
  60. package/dist/foundation/colors/token/component.js +22 -38
  61. package/dist/foundation/colors/token/component.js.map +1 -1
  62. package/dist/index.js +4 -1
  63. package/dist/index.js.map +1 -1
  64. package/dist/theme.js +3 -2
  65. package/dist/theme.js.map +1 -1
  66. package/dist/types/components/Button/Button.styled.d.ts +40 -20
  67. package/dist/types/components/Button/Button.types.d.ts +1 -1
  68. package/dist/types/components/Chip/Chip.types.d.ts +1 -0
  69. package/dist/types/components/TextField/TextField.style.d.ts +3 -1
  70. package/dist/types/components/TextField/TextField.types.d.ts +2 -3
  71. package/dist/types/components/TextField/TextFieldIcon.d.ts +1 -0
  72. package/dist/types/components/Toast/index.d.ts +2 -1
  73. package/dist/types/components/Toggle/Toggle.styled.d.ts +1 -1
  74. package/dist/types/components/Typography/index.d.ts +7 -0
  75. package/dist/types/foundation/Typography/index.d.ts +1 -5
  76. package/dist/types/foundation/colors/index.d.ts +15 -17
  77. package/dist/types/foundation/colors/types.d.ts +9 -11
  78. package/dist/types/foundation/index.d.ts +11 -13
  79. package/dist/types/index.d.ts +4 -1
  80. package/dist/types/theme.d.ts +2 -0
  81. package/package.json +21 -16
  82. package/src/components/Alert/Alert.styled.ts +2 -2
  83. package/src/components/Alert/Alert.utils.ts +12 -12
  84. package/src/components/Button/Button.styled.ts +51 -31
  85. package/src/components/Button/Button.tsx +12 -10
  86. package/src/components/Button/Button.types.ts +1 -1
  87. package/src/components/Checkbox/Checkbox.tsx +4 -4
  88. package/src/components/Chip/Chip.styled.ts +15 -15
  89. package/src/components/Radio/Radio.tsx +3 -3
  90. package/src/components/TextField/TextField.style.ts +31 -28
  91. package/src/components/TextField/TextField.tsx +3 -3
  92. package/src/components/TextField/TextField.types.ts +1 -3
  93. package/src/components/Toast/Toast.styled.ts +3 -3
  94. package/src/components/Toast/Toast.tsx +1 -1
  95. package/src/components/Toast/Toast.utils.ts +4 -4
  96. package/src/components/Toast/index.tsx +2 -1
  97. package/src/components/Toggle/Toggle.styled.ts +42 -39
  98. package/src/components/ToggleButton/ToggleButton.styled.ts +7 -7
  99. package/src/components/Typography/index.ts +9 -0
  100. package/src/foundation/Elevation/index.ts +4 -4
  101. package/src/foundation/Typography/index.ts +2 -6
  102. package/src/foundation/colors/index.ts +38 -37
  103. package/src/foundation/colors/token/component.ts +22 -38
  104. package/src/foundation/colors/types.ts +9 -11
  105. package/src/index.ts +4 -1
  106. package/src/stories/components/Alert/Alert.stories.tsx +1 -1
  107. package/src/stories/components/Button/Kind.stories.tsx +38 -5
  108. package/src/stories/components/Toast/Toast.stories.tsx +1 -1
  109. package/src/stories/foundation/Typography/Typography.mdx +1 -1
  110. package/src/stories/foundation/Typography/Typography.stories.tsx +3 -1
  111. package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +2 -2
  112. package/src/stories/foundation/Typography/TypographyGroup.tsx +4 -8
  113. package/src/stories/foundation/colors/Colors.stories.tsx +3 -3
  114. package/src/stories/foundation/colors/Token.inComponent.stories.tsx +21 -19
  115. package/src/stories/foundation/colors/TokenPaletteTable.tsx +6 -4
  116. package/src/stories/foundation/colors/styled.ts +1 -1
  117. package/src/theme.ts +5 -3
@@ -70,7 +70,10 @@ const getTextFieldPaddingBySize = ({
70
70
  });
71
71
  };
72
72
 
73
- const commonStyle = ({ token }: { token: ColorToken }) => ({
73
+ const commonStyle = ({ lunit_token }: { lunit_token: ColorToken }) => ({
74
+ "&.MuiTextField-root": {
75
+ width: "100%",
76
+ },
74
77
  "& .MuiOutlinedInput-root": {
75
78
  borderRadius: "8px",
76
79
  width: "100%",
@@ -79,24 +82,24 @@ const commonStyle = ({ token }: { token: ColorToken }) => ({
79
82
  border: "none",
80
83
  },
81
84
  "&.Mui-error fieldset": {
82
- border: `1px solid ${token.component.textfield_border_error}`,
85
+ border: `1px solid ${lunit_token.component.textfield_border_error}`,
83
86
  },
84
87
  "&.Mui-focused fieldset": {
85
- border: `1px solid ${token.core.focused}`,
88
+ border: `1px solid ${lunit_token.core.focused}`,
86
89
  },
87
90
  "&.Mui-disabled": {
88
91
  opacity: 0.38,
89
92
  "&:hover::before": {
90
- backgroundColor: token.component.textfield_bg,
93
+ backgroundColor: lunit_token.component.textfield_bg,
91
94
  },
92
95
  },
93
96
  "& input, textarea": {
94
97
  padding: 0,
95
98
  textOverflow: "ellipsis",
96
99
  "&::placeholder": {
97
- color: token.core.text_medium,
100
+ color: lunit_token.core.text_medium,
98
101
  opacity: 1,
99
- WebkitTextFillColor: token.core.text_medium,
102
+ WebkitTextFillColor: lunit_token.core.text_medium,
100
103
  },
101
104
  },
102
105
  "& textarea": {
@@ -107,16 +110,16 @@ const commonStyle = ({ token }: { token: ColorToken }) => ({
107
110
  },
108
111
  "&::-webkit-scrollbar-thumb": {
109
112
  borderRadius: "6px",
110
- backgroundColor: token.component.scrollbars_bg,
113
+ backgroundColor: lunit_token.component.scrollbars_bg,
111
114
  },
112
115
  },
113
- background: token.component.textfield_bg,
116
+ background: lunit_token.component.textfield_bg,
114
117
  overflow: "hidden",
115
- color: token.core.text_normal,
118
+ color: lunit_token.core.text_normal,
116
119
  "&:hover": {
117
120
  position: "relative",
118
121
  zIndex: 0,
119
- backgroundColor: token.component.textfield_bg,
122
+ backgroundColor: lunit_token.component.textfield_bg,
120
123
  },
121
124
  "&:hover::before": {
122
125
  content: '""',
@@ -126,11 +129,11 @@ const commonStyle = ({ token }: { token: ColorToken }) => ({
126
129
  width: "100%",
127
130
  height: "100%",
128
131
  zIndex: -1,
129
- backgroundColor: token.core.hover,
132
+ backgroundColor: lunit_token.core.hover,
130
133
  },
131
134
  "&.Mui-focused": {
132
135
  "&:hover::before": {
133
- backgroundColor: token.component.textfield_bg,
136
+ backgroundColor: lunit_token.component.textfield_bg,
134
137
  },
135
138
  },
136
139
  },
@@ -139,13 +142,13 @@ const commonStyle = ({ token }: { token: ColorToken }) => ({
139
142
  opacity: 0.38,
140
143
  },
141
144
  "&.Mui-error": {
142
- color: token.core.text_error,
145
+ color: lunit_token.core.text_error,
143
146
  },
144
147
  },
145
148
  });
146
149
 
147
150
  const sizeStyle = ({
148
- token,
151
+ lunit_token,
149
152
  textFieldSize,
150
153
  hasLeftIcon,
151
154
  hasRightIcon,
@@ -154,7 +157,7 @@ const sizeStyle = ({
154
157
  }: Pick<
155
158
  BaseTextFieldProps,
156
159
  "textFieldSize" | "hasLeftIcon" | "hasRightIcon" | "multiline"
157
- > & { token: ColorToken; typography: Typography }) => ({
160
+ > & { lunit_token: ColorToken; typography: Typography }) => ({
158
161
  ...(textFieldSize === "small" && {
159
162
  "& .MuiInputBase-root": {
160
163
  padding: getTextFieldPaddingBySize({
@@ -176,17 +179,17 @@ const sizeStyle = ({
176
179
  },
177
180
  "& .MuiFormHelperText-root": {
178
181
  ...typography.body2_14_regular,
179
- color: token.core.text_medium,
182
+ color: lunit_token.core.text_medium,
180
183
  margin: 0,
181
184
  marginTop: "4px",
182
185
  paddingLeft: "4px",
183
186
 
184
187
  "&.Mui-disabled": {
185
- color: token.core.text_medium,
188
+ color: lunit_token.core.text_medium,
186
189
  opacity: 0.38,
187
190
  },
188
191
  "&.Mui-error": {
189
- color: token.core.text_error,
192
+ color: lunit_token.core.text_error,
190
193
  },
191
194
  },
192
195
  }),
@@ -211,17 +214,17 @@ const sizeStyle = ({
211
214
  },
212
215
  "& .MuiFormHelperText-root": {
213
216
  ...typography.body2_14_regular,
214
- color: token.core.text_medium,
217
+ color: lunit_token.core.text_medium,
215
218
  margin: 0,
216
219
  marginTop: "4px",
217
220
  paddingLeft: "4px",
218
221
 
219
222
  "&.Mui-disabled": {
220
- color: token.core.text_medium,
223
+ color: lunit_token.core.text_medium,
221
224
  opacity: 0.38,
222
225
  },
223
226
  "&.Mui-error": {
224
- color: token.core.text_error,
227
+ color: lunit_token.core.text_error,
225
228
  },
226
229
  },
227
230
  }),
@@ -246,17 +249,17 @@ const sizeStyle = ({
246
249
  },
247
250
  "& .MuiFormHelperText-root": {
248
251
  ...typography.body1_16_regular,
249
- color: token.core.text_medium,
252
+ color: lunit_token.core.text_medium,
250
253
  margin: 0,
251
254
  marginTop: "4px",
252
255
  paddingLeft: "4px",
253
256
 
254
257
  "&.Mui-disabled": {
255
- color: token.core.text_medium,
258
+ color: lunit_token.core.text_medium,
256
259
  opacity: 0.38,
257
260
  },
258
261
  "&.Mui-error": {
259
- color: token.core.text_error,
262
+ color: lunit_token.core.text_error,
260
263
  },
261
264
  },
262
265
  }),
@@ -279,16 +282,16 @@ const BaseTextField = styled(MuiTextField, {
279
282
  ({
280
283
  theme: {
281
284
  typography,
282
- palette: { token },
285
+ palette: { lunit_token },
283
286
  },
284
287
  multiline,
285
288
  textFieldSize,
286
289
  hasLeftIcon,
287
290
  hasRightIcon,
288
291
  }) => ({
289
- ...commonStyle({ token }),
292
+ ...commonStyle({ lunit_token }),
290
293
  ...sizeStyle({
291
- token,
294
+ lunit_token,
292
295
  textFieldSize,
293
296
  hasLeftIcon,
294
297
  hasRightIcon,
@@ -309,7 +312,7 @@ const IconWrapper = styled("div")(({ theme }) => ({
309
312
  "& svg": {
310
313
  width: "20px",
311
314
  height: "20px",
312
- color: theme.palette.token.core.text_normal,
315
+ color: theme.palette.lunit_token.core.text_normal,
313
316
  },
314
317
  }));
315
318
 
@@ -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 = "small",
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: "outlined";
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;
@@ -10,8 +10,8 @@ export const StyledToast = styled(Alert)(({ theme, severity }) => {
10
10
  "&.MuiAlert-root": {
11
11
  padding: "8px 16px 8px 16px",
12
12
  margin: 0,
13
- color: theme.palette.token.core.text_normal,
14
- backgroundColor: theme.palette.token.core.bg_03,
13
+ color: theme.palette.lunit_token.core.text_normal,
14
+ backgroundColor: theme.palette.lunit_token.core.bg_03,
15
15
  borderRadius: "8px",
16
16
  },
17
17
  "& .MuiAlert-icon": {
@@ -42,7 +42,7 @@ export const StyledToast = styled(Alert)(({ theme, severity }) => {
42
42
  marginRight: "0px",
43
43
  padding: 0,
44
44
  "& .MuiSvgIcon-root": {
45
- color: theme.palette.token.core.text_normal,
45
+ color: theme.palette.lunit_token.core.text_normal,
46
46
  },
47
47
  },
48
48
  };
@@ -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;
@@ -6,12 +6,12 @@ export const getIconColor = (
6
6
  ) => {
7
7
  switch (severity) {
8
8
  case "info":
9
- return theme.palette.token.core.icon_info_02;
9
+ return theme.palette.lunit_token.core.icon_info_02;
10
10
  case "warning":
11
- return theme.palette.token.core.icon_warning_02;
11
+ return theme.palette.lunit_token.core.icon_warning_02;
12
12
  case "error":
13
- return theme.palette.token.core.icon_error_02;
13
+ return theme.palette.lunit_token.core.icon_error_02;
14
14
  default:
15
- return theme.palette.token.core.icon_success_02;
15
+ return theme.palette.lunit_token.core.icon_success_02;
16
16
  }
17
17
  };
@@ -1 +1,2 @@
1
- export { default as Toast } from './Toast'
1
+ export { default } from "./Toast";
2
+ export type { ToastProps } from "./Toast.types";
@@ -1,6 +1,6 @@
1
1
  import { styled, Switch as MuiSwitch, SwitchProps } from "@mui/material";
2
2
  interface ToggleProps extends SwitchProps {
3
- toggleSize: 'medium' | 'large'
3
+ toggleSize: "medium" | "large";
4
4
  }
5
5
 
6
6
  const toggleStyles = {
@@ -19,15 +19,15 @@ const toggleStyles = {
19
19
  transition: "all 100ms ease-in-out",
20
20
  },
21
21
  switchChecked: {
22
- transform: 'translateX(10px)',
22
+ transform: "translateX(10px)",
23
23
  },
24
24
  thumb: {
25
- width: 14,
26
- height: 14,
27
- }
25
+ width: 14,
26
+ height: 14,
27
+ },
28
28
  },
29
29
  large: {
30
- root:{
30
+ root: {
31
31
  width: 44,
32
32
  height: 24,
33
33
  borderRadius: 12,
@@ -41,20 +41,20 @@ const toggleStyles = {
41
41
  transition: "all 150ms ease-in-out",
42
42
  },
43
43
  switchChecked: {
44
- transform: 'translateX(20px)',
44
+ transform: "translateX(20px)",
45
45
  },
46
46
  thumb: {
47
47
  width: 20,
48
48
  height: 20,
49
49
  },
50
50
  },
51
- }
51
+ };
52
52
 
53
53
  const indeterminateStyles = {
54
54
  large: {
55
55
  switchChecked: {
56
- top: 8,
57
- left: -8,
56
+ top: 8,
57
+ left: -8,
58
58
  },
59
59
  track: {
60
60
  borderRadius: 12,
@@ -67,8 +67,8 @@ const indeterminateStyles = {
67
67
  },
68
68
  medium: {
69
69
  switchChecked: {
70
- top: 6,
71
- left: -4,
70
+ top: 6,
71
+ left: -4,
72
72
  },
73
73
  track: {
74
74
  borderRadius: 12,
@@ -78,28 +78,29 @@ const indeterminateStyles = {
78
78
  width: 12,
79
79
  borderRadius: 2,
80
80
  },
81
- }
82
- }
81
+ },
82
+ };
83
83
 
84
84
  export const CommonToggle = styled(MuiSwitch, {
85
- shouldForwardProp: (props) => props !== 'toggleSize',
85
+ shouldForwardProp: (props) => props !== "toggleSize",
86
86
  })<ToggleProps>(({ theme, toggleSize, disabled }) => {
87
- const checkedColor = theme.palette.token.component.selectcontrol_on;
88
- const uncheckedColor = theme.palette.token.component.selectcontrol_off;
89
- const handlerColor = theme.palette.token.component.selectcontrol_handler;
87
+ const checkedColor = theme.palette.lunit_token.component.selectcontrol_on;
88
+ const uncheckedColor = theme.palette.lunit_token.component.selectcontrol_off;
89
+ const handlerColor =
90
+ theme.palette.lunit_token.component.selectcontrol_handler;
90
91
 
91
92
  const toggleStyle = toggleStyles[toggleSize];
92
93
  const toggleOpacity = disabled ? 0.38 : 1;
93
94
 
94
95
  return {
95
96
  ...toggleStyle.root,
96
- display: 'flex',
97
+ display: "flex",
97
98
  padding: 0,
98
99
  overflow: "visible",
99
100
  backgroundColor: "transparent",
100
101
  opacity: toggleOpacity,
101
102
  "& .Mui-focusVisible": {
102
- // clear default focus style
103
+ // clear default focus style
103
104
  boxShadow: "none",
104
105
  background: "transparent",
105
106
  borderColor: "transparent",
@@ -112,51 +113,53 @@ export const CommonToggle = styled(MuiSwitch, {
112
113
  boxSizing: "border-box",
113
114
  top: -3, // border 1px + offset 2px
114
115
  left: -3, // border 1px + offset 2px
115
- }
116
+ },
116
117
  },
117
- '& .MuiSwitch-track': {
118
+ "& .MuiSwitch-track": {
118
119
  opacity: 1,
119
120
  borderRadius: 12,
120
121
  backgroundColor: uncheckedColor,
121
122
  },
122
- '& .MuiSwitch-thumb': {
123
+ "& .MuiSwitch-thumb": {
123
124
  ...toggleStyle.thumb,
124
125
  boxShadow: "0px 0px 1px rgba(0, 0, 0, 0.4)",
125
126
  },
126
- '& .MuiSwitch-switchBase': {
127
+ "& .MuiSwitch-switchBase": {
127
128
  ...toggleStyle.switch,
128
129
  padding: 2,
129
130
  opacity: 1,
130
- '&.Mui-checked': {
131
+ "&.Mui-checked": {
131
132
  ...toggleStyle.switchChecked,
132
133
  color: handlerColor,
133
- '& + .MuiSwitch-track': {
134
+ "& + .MuiSwitch-track": {
134
135
  opacity: 1,
135
136
  backgroundColor: checkedColor,
136
137
  },
137
138
  },
138
139
  },
139
- '& .Mui-disabled + .MuiSwitch-track': {
140
+ "& .Mui-disabled + .MuiSwitch-track": {
140
141
  opacity: 1,
141
142
  },
142
- }});
143
+ };
144
+ });
143
145
 
144
146
  export const CommonIndeterminateToggle = styled(CommonToggle, {
145
- shouldForwardProp: (props) => props !== 'toggleSize',
147
+ shouldForwardProp: (props) => props !== "toggleSize",
146
148
  })(({ toggleSize }) => {
147
149
  const indeterminateStyle = indeterminateStyles[toggleSize];
148
150
 
149
151
  return {
150
- padding: 0,
151
- cursor: "pointer",
152
- '& .MuiSwitch-switchBase.Mui-checked': {
152
+ padding: 0,
153
+ cursor: "pointer",
154
+ "& .MuiSwitch-switchBase.Mui-checked": {
153
155
  ...indeterminateStyle.switchChecked,
154
- '& + .MuiSwitch-track': {
156
+ "& + .MuiSwitch-track": {
155
157
  ...indeterminateStyle.track,
158
+ },
156
159
  },
157
- },
158
- '& .MuiSwitch-thumb': {
159
- ...indeterminateStyle.thumb,
160
- boxShadow: "none",
161
- },
162
- }});
160
+ "& .MuiSwitch-thumb": {
161
+ ...indeterminateStyle.thumb,
162
+ boxShadow: "none",
163
+ },
164
+ };
165
+ });
@@ -19,7 +19,7 @@ export const CustomToggleButton = styled(MuiToggleButton, {
19
19
  ({
20
20
  theme: {
21
21
  typography,
22
- palette: { token },
22
+ palette: { lunit_token },
23
23
  },
24
24
  kind,
25
25
  size,
@@ -30,22 +30,22 @@ export const CustomToggleButton = styled(MuiToggleButton, {
30
30
  }) => {
31
31
  return {
32
32
  border: "none",
33
- ...commonStyle({ token }),
33
+ ...commonStyle({ lunit_token }),
34
34
  ...iconStyle({ size, hasIconOnly }),
35
35
  ...sizeStyle({ size, kind, hasIconOnly, selected, typography }),
36
- ...kindStyle({ kind, color, token }),
36
+ ...kindStyle({ kind, color, lunit_token }),
37
37
  ...(selectedColor === "primary" && {
38
38
  "&.Mui-selected, &.Mui-selected:hover": {
39
39
  border: "none",
40
- backgroundColor: token.component.btn_selected_primary_bg,
41
- color: token.component.btn_selected_primary_text,
40
+ backgroundColor: lunit_token.component.btn_selected_primary_bg,
41
+ color: lunit_token.component.btn_selected_primary_text,
42
42
  },
43
43
  }),
44
44
  ...(selectedColor === "secondary" && {
45
45
  "&.Mui-selected, &.Mui-selected:hover": {
46
46
  border: "none",
47
- backgroundColor: token.component.btn_selected_secondary_bg,
48
- color: token.component.btn_selected_secondary_text,
47
+ backgroundColor: lunit_token.component.btn_selected_secondary_bg,
48
+ color: lunit_token.component.btn_selected_secondary_text,
49
49
  },
50
50
  }),
51
51
  };
@@ -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;
@@ -2,10 +2,10 @@ import paletteOptions from "../colors";
2
2
  import { createCSSVarNames, createCSSVars } from "./utils";
3
3
 
4
4
  export const shadows = {
5
- shadow1: `0px 4px 8px ${paletteOptions.token.core.shadow_01}`,
6
- shadow2: `0px 3px 12px ${paletteOptions.token.core.shadow_02}`,
7
- shadow3: `0px 12px 24px ${paletteOptions.token.core.shadow_03}`,
8
- shadow4: `0px 12px 44px ${paletteOptions.token.core.shadow_04}`,
5
+ shadow1: `0px 4px 8px ${paletteOptions.lunit_token.core.shadow_01}`,
6
+ shadow2: `0px 3px 12px ${paletteOptions.lunit_token.core.shadow_02}`,
7
+ shadow3: `0px 12px 24px ${paletteOptions.lunit_token.core.shadow_03}`,
8
+ shadow4: `0px 12px 44px ${paletteOptions.lunit_token.core.shadow_04}`,
9
9
  };
10
10
 
11
11
  const shadowVars = createCSSVarNames(shadows);
@@ -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;