@lunit/design-system 1.0.0-b.3 → 1.0.0-b.4

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 (50) hide show
  1. package/dist/cjs/components/Alert/index.js +1 -1
  2. package/dist/cjs/components/Alert/index.js.map +1 -1
  3. package/dist/cjs/components/Button/index.js +1 -1
  4. package/dist/cjs/components/Button/index.js.map +1 -1
  5. package/dist/cjs/components/Toggle/index.js +1 -1
  6. package/dist/cjs/components/Toggle/index.js.map +1 -1
  7. package/dist/cjs/components/ToggleButton/index.js +1 -1
  8. package/dist/cjs/components/ToggleButton/index.js.map +1 -1
  9. package/dist/cjs/index.js +1 -1
  10. package/dist/cjs/index.js.map +1 -1
  11. package/dist/components/Button/Button.js +11 -5
  12. package/dist/components/Button/Button.js.map +1 -1
  13. package/dist/components/Button/Button.styled.js +2 -8
  14. package/dist/components/Button/Button.styled.js.map +1 -1
  15. package/dist/components/Toggle/Toggle.js +4 -4
  16. package/dist/components/Toggle/Toggle.js.map +1 -1
  17. package/dist/components/Toggle/Toggle.styled.js +2 -3
  18. package/dist/components/Toggle/Toggle.styled.js.map +1 -1
  19. package/dist/components/ToggleButton/ToggleButton.js +6 -5
  20. package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
  21. package/dist/components/ToggleButton/ToggleButton.styled.js +10 -2
  22. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
  23. package/dist/foundation/Typography/index.js +2 -2
  24. package/dist/foundation/Typography/index.js.map +1 -1
  25. package/dist/foundation/Typography/tokens.js +18 -2
  26. package/dist/foundation/Typography/tokens.js.map +1 -1
  27. package/dist/foundation/colors/token/core.js +0 -2
  28. package/dist/foundation/colors/token/core.js.map +1 -1
  29. package/dist/types/components/Button/Button.styled.d.ts +1 -6
  30. package/dist/types/components/Toggle/Toggle.d.ts +1 -1
  31. package/dist/types/components/Toggle/Toggle.styled.d.ts +1 -1
  32. package/dist/types/components/Toggle/Toggle.types.d.ts +5 -5
  33. package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -2
  34. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +4 -0
  35. package/dist/types/components/ToggleButton/ToggleButton.types.d.ts +4 -5
  36. package/dist/types/foundation/Typography/index.d.ts +3 -4
  37. package/dist/types/foundation/Typography/tokens.d.ts +2 -2
  38. package/package.json +1 -1
  39. package/src/components/Button/Button.styled.ts +2 -8
  40. package/src/components/Button/Button.tsx +14 -6
  41. package/src/components/Toggle/Toggle.styled.ts +4 -4
  42. package/src/components/Toggle/Toggle.tsx +28 -9
  43. package/src/components/Toggle/Toggle.types.ts +8 -8
  44. package/src/components/ToggleButton/ToggleButton.styled.ts +15 -7
  45. package/src/components/ToggleButton/ToggleButton.tsx +92 -79
  46. package/src/components/ToggleButton/ToggleButton.types.ts +5 -4
  47. package/src/foundation/Typography/index.ts +2 -2
  48. package/src/foundation/Typography/tokens.ts +18 -2
  49. package/src/foundation/colors/token/core.ts +0 -2
  50. package/src/stories/components/SelectControl/Toggle.stories.tsx +10 -10
@@ -1,19 +1,20 @@
1
- import React from "react";
1
+ import React, { forwardRef } from "react";
2
2
 
3
3
  import { CustomButton } from "./Button.styled";
4
4
 
5
5
  import type { ButtonType, ButtonProps } from "./Button.types";
6
6
 
7
- const Button: ButtonType = (props: ButtonProps) => {
7
+ const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
8
8
  const {
9
9
  size = "small",
10
10
  color = "primary",
11
11
  icon,
12
12
  className,
13
13
  children,
14
+ startIcon,
14
15
  ...buttonProps
15
16
  } = props;
16
- const hasIconOnly = Boolean(icon && !children);
17
+ const hasIconOnly = Boolean((startIcon || icon) && !children);
17
18
 
18
19
  return (
19
20
  <>
@@ -21,11 +22,12 @@ const Button: ButtonType = (props: ButtonProps) => {
21
22
  {props.kind === "outlined" ? (
22
23
  <CustomButton
23
24
  {...buttonProps}
25
+ ref={ref}
24
26
  className={`outlined ${className ? className : ""}`}
25
27
  kind="outlined"
26
28
  color={props.color ?? "primary"}
27
29
  size={size}
28
- startIcon={icon}
30
+ startIcon={startIcon || icon}
29
31
  hasIconOnly={hasIconOnly}
30
32
  >
31
33
  {!hasIconOnly && <>{children}</>}
@@ -33,13 +35,14 @@ const Button: ButtonType = (props: ButtonProps) => {
33
35
  ) : (
34
36
  <CustomButton
35
37
  {...buttonProps}
38
+ ref={ref}
36
39
  className={`${props.kind ?? "contained"} ${
37
40
  className ? className : ""
38
41
  }`}
39
42
  kind={props.kind ?? "contained"}
40
43
  color={props.color ?? "primary"}
41
44
  size={size}
42
- startIcon={icon}
45
+ startIcon={startIcon || icon}
43
46
  hasIconOnly={hasIconOnly}
44
47
  >
45
48
  {!hasIconOnly && <>{children}</>}
@@ -47,6 +50,11 @@ const Button: ButtonType = (props: ButtonProps) => {
47
50
  )}
48
51
  </>
49
52
  );
50
- };
53
+ /**
54
+ * There is an issue between React 18, Mui's OverridableComponent type and the
55
+ * type coercion to temporarily fix it.
56
+ * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232
57
+ */
58
+ }) as ButtonType;
51
59
 
52
60
  export default Button;
@@ -1,10 +1,10 @@
1
1
  import { styled, Switch as MuiSwitch, SwitchProps } from "@mui/material";
2
2
  interface ToggleProps extends SwitchProps {
3
- toggleSize: "medium" | "large";
3
+ toggleSize: "small" | "large";
4
4
  }
5
5
 
6
6
  const toggleStyles = {
7
- medium: {
7
+ small: {
8
8
  root: {
9
9
  width: 28,
10
10
  height: 18,
@@ -65,7 +65,7 @@ const indeterminateStyles = {
65
65
  borderRadius: 2,
66
66
  },
67
67
  },
68
- medium: {
68
+ small: {
69
69
  switchChecked: {
70
70
  top: 6,
71
71
  left: -4,
@@ -94,7 +94,7 @@ export const CommonToggle = styled(MuiSwitch, {
94
94
 
95
95
  return {
96
96
  ...toggleStyle.root,
97
- display: "flex",
97
+
98
98
  padding: 0,
99
99
  overflow: "visible",
100
100
  backgroundColor: "transparent",
@@ -1,18 +1,37 @@
1
- import React from 'react'
2
- import { CommonToggle, CommonIndeterminateToggle } from './Toggle.styled'
3
- import type { ToggleProps } from './Toggle.types'
4
-
1
+ import React from "react";
2
+ import { CommonToggle, CommonIndeterminateToggle } from "./Toggle.styled";
3
+ import type { ToggleProps } from "./Toggle.types";
5
4
 
6
5
  const Toggle = (props: ToggleProps) => {
7
- const { size = "medium", indeterminate = false, disableRipple, ...switchProps } = props
6
+ const {
7
+ size = "small",
8
+ indeterminate = false,
9
+ disableRipple,
10
+ ...switchProps
11
+ } = props;
8
12
 
9
13
  if (indeterminate) {
10
14
  const { checked: _, ...restProps } = switchProps;
11
15
  // can't use checked props with indeterminate
12
- return <CommonIndeterminateToggle toggleSize={size} checked focusRipple={false} disableRipple={disableRipple} {...restProps} />
16
+ return (
17
+ <CommonIndeterminateToggle
18
+ toggleSize={size}
19
+ checked
20
+ focusRipple={false}
21
+ disableRipple={disableRipple}
22
+ {...restProps}
23
+ />
24
+ );
13
25
  }
14
26
 
15
- return <CommonToggle toggleSize={size} focusRipple={false} disableRipple={disableRipple} {...switchProps}/>
16
- }
27
+ return (
28
+ <CommonToggle
29
+ toggleSize={size}
30
+ focusRipple={false}
31
+ disableRipple={disableRipple}
32
+ {...switchProps}
33
+ />
34
+ );
35
+ };
17
36
 
18
- export default Toggle
37
+ export default Toggle;
@@ -1,14 +1,14 @@
1
- import type { SwitchProps } from "@mui/material"
1
+ import type { SwitchProps } from "@mui/material";
2
2
 
3
- export interface ToggleProps extends Omit<SwitchProps, "size" > {
3
+ export interface ToggleProps extends Omit<SwitchProps, "size"> {
4
4
  /**
5
5
  * The size of the component.
6
- * @default medium
6
+ * @default small
7
7
  */
8
- size?: 'medium' | 'large'
8
+ size?: "small" | "large";
9
9
  /**
10
- * If `true`, the component has consistent 'checked' value and change shape.
11
- * @default false
12
- */
13
- indeterminate?: boolean
10
+ * If `true`, the component has consistent 'checked' value and change shape.
11
+ * @default false
12
+ */
13
+ indeterminate?: boolean;
14
14
  }
@@ -2,12 +2,7 @@ import { styled } from "@mui/material/styles";
2
2
  import { ToggleButton as MuiToggleButton } from "@mui/material";
3
3
 
4
4
  import type { ToggleButtonProps } from "../ToggleButton/ToggleButton.types";
5
- import {
6
- commonStyle,
7
- sizeStyle,
8
- kindStyle,
9
- iconStyle,
10
- } from "../Button/Button.styled";
5
+ import { commonStyle, sizeStyle, kindStyle } from "../Button/Button.styled";
11
6
 
12
7
  type CustomToggleButtonProps = ToggleButtonProps & { hasIconOnly: boolean };
13
8
 
@@ -31,7 +26,6 @@ export const CustomToggleButton = styled(MuiToggleButton, {
31
26
  return {
32
27
  border: "none",
33
28
  ...commonStyle({ lunit_token }),
34
- ...iconStyle({ size, hasIconOnly }),
35
29
  ...sizeStyle({ size, kind, hasIconOnly, selected, typography }),
36
30
  ...kindStyle({ kind, color, lunit_token }),
37
31
  ...(selectedColor === "primary" && {
@@ -56,3 +50,17 @@ export const IconAndChildrenWrapper = styled("div")({
56
50
  display: "flex",
57
51
  alignItems: "center",
58
52
  });
53
+
54
+ export const IconWrapper = styled("div")<{
55
+ hasIconOnly: boolean;
56
+ size: string;
57
+ }>(({ hasIconOnly, size }) => ({
58
+ width: "20px",
59
+ height: "20px",
60
+ padding: "1px",
61
+ marginRight: hasIconOnly ? "0px" : size === "large" ? "8px" : "4px",
62
+
63
+ "*:nth-of-type(1)": {
64
+ fontSize: "18px",
65
+ },
66
+ }));
@@ -1,89 +1,102 @@
1
- import React from "react";
1
+ import React, { forwardRef } from "react";
2
2
  import {
3
+ IconWrapper,
3
4
  CustomToggleButton,
4
5
  IconAndChildrenWrapper,
5
6
  } from "./ToggleButton.styled";
6
7
  import type { ToggleButtonProps } from "./ToggleButton.types";
7
8
 
8
- const ToggleButton = (props: ToggleButtonProps) => {
9
- const {
10
- kind = "contained",
11
- size = "small",
12
- color = "primary",
13
- selectedColor = "primary",
14
- className = "",
15
- icon,
16
- selected,
17
- children,
18
- ...buttonProps
19
- } = props;
9
+ const ToggleButton = forwardRef<HTMLButtonElement, ToggleButtonProps>(
10
+ (props, ref) => {
11
+ const {
12
+ kind = "contained",
13
+ size = "small",
14
+ color = "primary",
15
+ selectedColor = "primary",
16
+ className = "",
17
+ icon,
18
+ selected,
19
+ children,
20
+ ...buttonProps
21
+ } = props;
20
22
 
21
- const hasIconOnly = Boolean(icon && !children);
22
- const excludeToggleGroupClass = className
23
- .replace("MuiToggleButtonGroup-grouped", "")
24
- .replace("MuiToggleButtonGroup-groupedHorizontal", "");
23
+ const hasIconOnly = Boolean(icon && !children);
24
+ const excludeToggleGroupClass = className
25
+ .replace("MuiToggleButtonGroup-grouped", "")
26
+ .replace("MuiToggleButtonGroup-groupedHorizontal", "");
25
27
 
26
- return (
27
- <>
28
- {kind === "contained" || kind === "ghost" ? (
29
- <CustomToggleButton
30
- className={`${kind} ${excludeToggleGroupClass}`}
31
- selected={selected}
32
- kind={kind}
33
- color={color}
34
- size={size}
35
- hasIconOnly={hasIconOnly}
36
- selectedColor={selectedColor}
37
- disableRipple
38
- disableFocusRipple
39
- {...buttonProps}
40
- >
41
- {!hasIconOnly ? (
42
- <>
43
- {icon ? (
44
- <IconAndChildrenWrapper>
45
- {icon}
46
- {children}
47
- </IconAndChildrenWrapper>
48
- ) : (
49
- children
50
- )}
51
- </>
52
- ) : (
53
- icon
54
- )}
55
- </CustomToggleButton>
56
- ) : (
57
- <CustomToggleButton
58
- className={`outlined ${excludeToggleGroupClass}`}
59
- selected={selected}
60
- kind="outlined"
61
- color="primary"
62
- size={size}
63
- hasIconOnly={hasIconOnly}
64
- selectedColor={selectedColor}
65
- disableRipple
66
- disableFocusRipple
67
- {...buttonProps}
68
- >
69
- {!hasIconOnly ? (
70
- <>
71
- {icon ? (
72
- <IconAndChildrenWrapper>
73
- {icon}
74
- {children}
75
- </IconAndChildrenWrapper>
76
- ) : (
77
- children
78
- )}
79
- </>
80
- ) : (
81
- icon
82
- )}
83
- </CustomToggleButton>
84
- )}
85
- </>
86
- );
87
- };
28
+ return (
29
+ <>
30
+ {kind === "contained" || kind === "ghost" ? (
31
+ <CustomToggleButton
32
+ ref={ref}
33
+ className={`${kind} ${excludeToggleGroupClass}`}
34
+ selected={selected}
35
+ kind={kind}
36
+ color={color}
37
+ size={size}
38
+ hasIconOnly={hasIconOnly}
39
+ selectedColor={selectedColor}
40
+ disableRipple
41
+ disableFocusRipple
42
+ {...buttonProps}
43
+ >
44
+ {!hasIconOnly ? (
45
+ <>
46
+ {icon ? (
47
+ <IconAndChildrenWrapper>
48
+ <IconWrapper size={size} hasIconOnly={hasIconOnly}>
49
+ {icon}
50
+ </IconWrapper>
51
+ {children}
52
+ </IconAndChildrenWrapper>
53
+ ) : (
54
+ children
55
+ )}
56
+ </>
57
+ ) : (
58
+ <IconWrapper size={size} hasIconOnly={hasIconOnly}>
59
+ {icon}
60
+ </IconWrapper>
61
+ )}
62
+ </CustomToggleButton>
63
+ ) : (
64
+ <CustomToggleButton
65
+ ref={ref}
66
+ className={`outlined ${excludeToggleGroupClass}`}
67
+ selected={selected}
68
+ kind="outlined"
69
+ color="primary"
70
+ size={size}
71
+ hasIconOnly={hasIconOnly}
72
+ selectedColor={selectedColor}
73
+ disableRipple
74
+ disableFocusRipple
75
+ {...buttonProps}
76
+ >
77
+ {!hasIconOnly ? (
78
+ <>
79
+ {icon ? (
80
+ <IconAndChildrenWrapper>
81
+ <IconWrapper size={size} hasIconOnly={hasIconOnly}>
82
+ {icon}
83
+ </IconWrapper>
84
+ {children}
85
+ </IconAndChildrenWrapper>
86
+ ) : (
87
+ children
88
+ )}
89
+ </>
90
+ ) : (
91
+ <IconWrapper size={size} hasIconOnly={hasIconOnly}>
92
+ {icon}
93
+ </IconWrapper>
94
+ )}
95
+ </CustomToggleButton>
96
+ )}
97
+ </>
98
+ );
99
+ }
100
+ );
88
101
 
89
102
  export default ToggleButton;
@@ -1,20 +1,21 @@
1
1
  import type { ToggleButtonProps as MuiToggleButtonProps } from "@mui/material";
2
2
 
3
- interface ToggleButtonBaseProps extends Omit<MuiToggleButtonProps, "variant"> {
3
+ export interface ToggleButtonBaseProps
4
+ extends Omit<MuiToggleButtonProps, "variant"> {
4
5
  selectedColor?: "primary" | "secondary";
5
6
  icon?: React.ReactNode;
6
7
  }
7
- interface ContainedToggleButtonProps extends ToggleButtonBaseProps {
8
+ export interface ContainedToggleButtonProps extends ToggleButtonBaseProps {
8
9
  kind?: "contained";
9
10
  color?: "primary" | "secondary";
10
11
  }
11
12
 
12
- interface GhostToggleButtonProps extends ToggleButtonBaseProps {
13
+ export interface GhostToggleButtonProps extends ToggleButtonBaseProps {
13
14
  kind?: "ghost";
14
15
  color?: "primary" | "secondary";
15
16
  }
16
17
 
17
- interface OutlinedToggleButtonProps extends ToggleButtonBaseProps {
18
+ export interface OutlinedToggleButtonProps extends ToggleButtonBaseProps {
18
19
  kind?: "outlined";
19
20
  color?: "primary";
20
21
  }
@@ -79,8 +79,8 @@ export const typographyDefaultProps = {
79
79
 
80
80
  export const createTypographyCssBaseline = () => {
81
81
  return {
82
- html: {
83
- fontFamily,
82
+ "*, *:before, *:after": {
83
+ // @font-face: font-feature-settings로 대체 가능하나, 브라우저 지원이 부족함 https://caniuse.com/mdn-css_at-rules_font-face_font-feature-settings
84
84
  fontFeatureSettings: `'tnum', 'ss01', 'ss02', 'ss08'`,
85
85
  },
86
86
  ":root": {
@@ -13,10 +13,10 @@ const headline = {
13
13
  "--headline1-line-height": "68px",
14
14
  "--headline2-font-weight": "var(--font-weight-bold)",
15
15
  "--headline2-font-size": "38px",
16
- "--headline2-line-height": "48px",
16
+ "--headline2-line-height": "65px",
17
17
  "--headline3-font-weight": "var(--font-weight-semibold)",
18
18
  "--headline3-font-size": "24px",
19
- "--headline3-line-height": "36px",
19
+ "--headline3-line-height": "57px",
20
20
  "--headline4-font-weight": "var(--font-weight-semibold)",
21
21
  "--headline4-font-size": "20px",
22
22
  "--headline4-line-height": "28px",
@@ -69,61 +69,73 @@ const fontVariants: Record<string, TypographyStyleOptions> = {
69
69
  fontWeight: "var(--headline1-font-weight)",
70
70
  fontSize: "var(--headline1-font-size)",
71
71
  lineHeight: "var(--headline1-line-height)",
72
+ color: "var(--text_normal)",
72
73
  },
73
74
  headline2: {
74
75
  fontWeight: "var(--headline2-font-weight)",
75
76
  fontSize: "var(--headline2-font-size)",
76
77
  lineHeight: "var(--headline2-line-height)",
78
+ color: "var(--text_normal)",
77
79
  },
78
80
  headline3: {
79
81
  fontWeight: "var(--headline3-font-weight)",
80
82
  fontSize: "var(--headline3-font-size)",
81
83
  lineHeight: "var(--headline3-line-height)",
84
+ color: "var(--text_normal)",
82
85
  },
83
86
  headline4: {
84
87
  fontWeight: "var(--headline4-font-weight)",
85
88
  fontSize: "var(--headline4-font-size)",
86
89
  lineHeight: "var(--headline4-line-height)",
90
+ color: "var(--text_normal)",
87
91
  },
88
92
  headline5: {
89
93
  fontWeight: "var(--headline5-font-weight)",
90
94
  fontSize: "var(--headline5-font-size)",
91
95
  lineHeight: "var(--headline5-line-height)",
96
+ color: "var(--text_normal)",
92
97
  },
93
98
  body1_16_semibold: {
94
99
  fontWeight: "var(--body1-16-semibold-font-weight)",
95
100
  fontSize: "var(--body1-16-semibold-font-size)",
96
101
  lineHeight: "var(--body1-16-semibold-line-height)",
102
+ color: "var(--text_normal)",
97
103
  },
98
104
  body1_16_regular: {
99
105
  fontWeight: "var(--body1-16-regular-font-weight)",
100
106
  fontSize: "var(--body1-16-regular-font-size)",
101
107
  lineHeight: "var(--body1-16-regular-line-height)",
108
+ color: "var(--text_normal)",
102
109
  },
103
110
  body2_14_bold: {
104
111
  fontWeight: "var(--body2-14-bold-font-weight)",
105
112
  fontSize: "var(--body2-14-bold-font-size)",
106
113
  lineHeight: "var(--body2-14-bold-line-height)",
114
+ color: "var(--text_normal)",
107
115
  },
108
116
  body2_14_medium: {
109
117
  fontWeight: "var(--body2-14-medium-font-weight)",
110
118
  fontSize: "var(--body2-14-medium-font-size)",
111
119
  lineHeight: "var(--body2-14-medium-line-height)",
120
+ color: "var(--text_normal)",
112
121
  },
113
122
  body2_14_regular: {
114
123
  fontWeight: "var(--body2-14-regular-font-weight)",
115
124
  fontSize: "var(--body2-14-regular-font-size)",
116
125
  lineHeight: "var(--body2-14-regular-line-height)",
126
+ color: "var(--text_normal)",
117
127
  },
118
128
  body3_12_semibold: {
119
129
  fontWeight: "var(--body3-12-semibold-font-weight)",
120
130
  fontSize: "var(--body3-12-semibold-font-size)",
121
131
  lineHeight: "var(--body3-12-semibold-line-height)",
132
+ color: "var(--text_normal)",
122
133
  },
123
134
  body3_12_regular: {
124
135
  fontWeight: "var(--body3-12-regular-font-weight)",
125
136
  fontSize: "var(--body3-12-regular-font-size)",
126
137
  lineHeight: "var(--body3-12-regular-line-height)",
138
+ color: "var(--text_normal)",
127
139
  },
128
140
  overline: {
129
141
  fontWeight: "var(--overline-font-weight)",
@@ -131,12 +143,14 @@ const fontVariants: Record<string, TypographyStyleOptions> = {
131
143
  lineHeight: "var(--overline-line-height)",
132
144
  letterSpacing: "1px",
133
145
  textTransform: "uppercase",
146
+ color: "var(--text_normal)",
134
147
  },
135
148
  button1: {
136
149
  fontWeight: "var(--button1-font-weight)",
137
150
  fontSize: "var(--button1-font-size)",
138
151
  lineHeight: "var(--button1-line-height)",
139
152
  textTransform: "capitalize",
153
+ color: "var(--text_normal)",
140
154
  },
141
155
  button2: {
142
156
  fontWeight: "var(--button2-font-weight)",
@@ -144,11 +158,13 @@ const fontVariants: Record<string, TypographyStyleOptions> = {
144
158
  lineHeight: "var(--button2-line-height)",
145
159
  letterSpacing: "0.2px",
146
160
  textTransform: "capitalize",
161
+ color: "var(--text_normal)",
147
162
  },
148
163
  caption: {
149
164
  fontWeight: "var(--caption-font-weight)",
150
165
  fontSize: "var(--caption-font-size)",
151
166
  lineHeight: "var(--caption-line-height)",
167
+ color: "var(--text_normal)",
152
168
  },
153
169
  };
154
170
 
@@ -70,7 +70,6 @@ export const tokenCoreColor: TokenCoreColorValue = {
70
70
  dark4: "--red_30",
71
71
  },
72
72
  text_success: {
73
- // TODO: sucess -> success 로 바뀌었으니 코드 내 사용되는 부분 확인해서 업데이트. 개발자들에게도 공지할것.
74
73
  light1: "--green_40",
75
74
  light2: "--green_40",
76
75
  dark1: "--green_40",
@@ -127,7 +126,6 @@ export const tokenCoreColor: TokenCoreColorValue = {
127
126
  dark4: "--red_30",
128
127
  },
129
128
  icon_success_02: {
130
- // TODO: sucess -> success 로 바뀌었으니 코드 내 사용되는 부분 확인해서 업데이트. 개발자들에게도 공지할것.
131
129
  light1: "--green_40",
132
130
  light2: "--green_40",
133
131
  dark1: "--green_30",
@@ -45,7 +45,7 @@ export default {
45
45
  },
46
46
  },
47
47
  args: {
48
- size: "medium",
48
+ size: "small",
49
49
  indeterminate: false,
50
50
  disabled: false,
51
51
  },
@@ -103,7 +103,7 @@ const Template: StoryFn<typeof Toggle> = (args) => (
103
103
  </TableHead>
104
104
  <TableBody>
105
105
  <TableRow>
106
- <TableCell>MEDIUM DEFAULT</TableCell>
106
+ <TableCell>SMALL DEFAULT</TableCell>
107
107
  <TableCell>
108
108
  <Toggle {...args} checked />
109
109
  </TableCell>
@@ -115,7 +115,7 @@ const Template: StoryFn<typeof Toggle> = (args) => (
115
115
  </TableCell>
116
116
  </TableRow>
117
117
  <TableRow>
118
- <TableCell>MEDIUM FOCUS</TableCell>
118
+ <TableCell>SMALL FOCUS</TableCell>
119
119
  <TableCell>
120
120
  <Toggle {...args} className="focus-test" checked />
121
121
  </TableCell>
@@ -166,15 +166,15 @@ const DisabledTemplate: StoryFn<typeof Toggle> = (args) => (
166
166
  </TableHead>
167
167
  <TableBody>
168
168
  <TableRow>
169
- <TableCell>MEDIUM DEFAULT</TableCell>
169
+ <TableCell>SMALL DEFAULT</TableCell>
170
170
  <TableCell>
171
- <Toggle {...args} checked />
171
+ <Toggle {...args} size="small" checked />
172
172
  </TableCell>
173
173
  <TableCell>
174
- <Toggle {...args} indeterminate />
174
+ <Toggle {...args} size="small" indeterminate />
175
175
  </TableCell>
176
176
  <TableCell>
177
- <Toggle {...args} />
177
+ <Toggle {...args} size="small" />
178
178
  </TableCell>
179
179
  </TableRow>
180
180
  <TableRow>
@@ -205,7 +205,7 @@ const TemplateWithLabel: StoryFn<typeof Toggle> = (args) => (
205
205
  </TableHead>
206
206
  <TableBody>
207
207
  <TableRow>
208
- <TableCell>MEDIUM DEFAULT</TableCell>
208
+ <TableCell>SMALL DEFAULT</TableCell>
209
209
  <TableCell>
210
210
  <FormLabel label="Label 1" control={<Toggle {...args} checked />} />
211
211
  </TableCell>
@@ -223,7 +223,7 @@ const TemplateWithLabel: StoryFn<typeof Toggle> = (args) => (
223
223
  </TableCell>
224
224
  </TableRow>
225
225
  <TableRow>
226
- <TableCell>MEDIUM FOCUS</TableCell>
226
+ <TableCell>SMALL FOCUS</TableCell>
227
227
  <TableCell>
228
228
  <FormLabel
229
229
  className="focus-test"
@@ -319,7 +319,7 @@ const IndeterminateTemplate: StoryFn<typeof Toggle> = (args) => {
319
319
  <Table>
320
320
  <TableHead>
321
321
  <TableRow>
322
- <TableCell>MEDIUM</TableCell>
322
+ <TableCell>SMALL</TableCell>
323
323
  <TableCell>LARGE</TableCell>
324
324
  </TableRow>
325
325
  </TableHead>