@lunit/design-system 1.0.0-a.5 → 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 (79) hide show
  1. package/README.md +1 -1
  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/index.js +1 -1
  19. package/dist/cjs/index.js.map +1 -1
  20. package/dist/components/Alert/Alert.styled.js +2 -2
  21. package/dist/components/Alert/Alert.styled.js.map +1 -1
  22. package/dist/components/Alert/Alert.utils.js +12 -12
  23. package/dist/components/Alert/Alert.utils.js.map +1 -1
  24. package/dist/components/Button/Button.styled.js +33 -33
  25. package/dist/components/Button/Button.styled.js.map +1 -1
  26. package/dist/components/Checkbox/Checkbox.js +4 -4
  27. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  28. package/dist/components/Chip/Chip.styled.js +15 -15
  29. package/dist/components/Chip/Chip.styled.js.map +1 -1
  30. package/dist/components/Radio/Radio.js +3 -3
  31. package/dist/components/Radio/Radio.js.map +1 -1
  32. package/dist/components/TextField/TextField.style.js +27 -27
  33. package/dist/components/TextField/TextField.style.js.map +1 -1
  34. package/dist/components/Toast/Toast.styled.js +3 -3
  35. package/dist/components/Toast/Toast.styled.js.map +1 -1
  36. package/dist/components/Toast/Toast.utils.js +4 -4
  37. package/dist/components/Toast/Toast.utils.js.map +1 -1
  38. package/dist/components/Toggle/Toggle.styled.js +20 -20
  39. package/dist/components/Toggle/Toggle.styled.js.map +1 -1
  40. package/dist/components/ToggleButton/ToggleButton.styled.js +7 -7
  41. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
  42. package/dist/foundation/Elevation/index.js +4 -4
  43. package/dist/foundation/Elevation/index.js.map +1 -1
  44. package/dist/foundation/colors/index.js +3 -2
  45. package/dist/foundation/colors/index.js.map +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/theme.js +3 -2
  49. package/dist/theme.js.map +1 -1
  50. package/dist/types/components/Button/Button.styled.d.ts +7 -7
  51. package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
  52. package/dist/types/components/Toggle/Toggle.styled.d.ts +1 -1
  53. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
  54. package/dist/types/foundation/colors/index.d.ts +6 -6
  55. package/dist/types/foundation/index.d.ts +2 -2
  56. package/dist/types/index.d.ts +1 -1
  57. package/dist/types/theme.d.ts +2 -0
  58. package/package.json +1 -1
  59. package/src/components/Alert/Alert.styled.ts +2 -2
  60. package/src/components/Alert/Alert.utils.ts +12 -12
  61. package/src/components/Button/Button.styled.ts +34 -34
  62. package/src/components/Checkbox/Checkbox.tsx +4 -4
  63. package/src/components/Chip/Chip.styled.ts +15 -15
  64. package/src/components/Radio/Radio.tsx +3 -3
  65. package/src/components/TextField/TextField.style.ts +28 -28
  66. package/src/components/Toast/Toast.styled.ts +3 -3
  67. package/src/components/Toast/Toast.utils.ts +4 -4
  68. package/src/components/Toggle/Toggle.styled.ts +42 -39
  69. package/src/components/ToggleButton/ToggleButton.styled.ts +7 -7
  70. package/src/foundation/Elevation/index.ts +4 -4
  71. package/src/foundation/colors/index.ts +29 -26
  72. package/src/index.ts +1 -1
  73. package/src/stories/components/Alert/Alert.stories.tsx +1 -1
  74. package/src/stories/foundation/Typography/TypographyGroup.tsx +1 -1
  75. package/src/stories/foundation/colors/Colors.stories.tsx +3 -3
  76. package/src/stories/foundation/colors/Token.inComponent.stories.tsx +21 -19
  77. package/src/stories/foundation/colors/TokenPaletteTable.tsx +6 -4
  78. package/src/stories/foundation/colors/styled.ts +1 -1
  79. package/src/theme.ts +5 -3
@@ -6,7 +6,7 @@ export declare const StyledOutlinedChip: import("@emotion/styled").StyledCompone
6
6
  children?: null | undefined;
7
7
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
8
8
  clickable?: boolean | undefined;
9
- color?: "primary" | "secondary" | "error" | "success" | "info" | "warning" | "default" | undefined;
9
+ color?: "success" | "info" | "warning" | "error" | "primary" | "secondary" | "default" | undefined;
10
10
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
11
11
  disabled?: boolean | undefined;
12
12
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -16,16 +16,16 @@ export declare const StyledOutlinedChip: import("@emotion/styled").StyledCompone
16
16
  skipFocusWhenDisabled?: boolean | undefined;
17
17
  sx?: import("@mui/material").SxProps<Theme> | undefined;
18
18
  tabIndex?: number | undefined;
19
- variant?: "outlined" | "filled" | undefined;
19
+ variant?: "filled" | "outlined" | undefined;
20
20
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
21
21
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
22
- }, "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "tabIndex" | "color" | "children" | "disabled" | "sx" | "size" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & OutlinedChipProps, {}, {}>;
22
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & OutlinedChipProps, {}, {}>;
23
23
  export declare const StyledContainedChipBase: import("@emotion/styled").StyledComponent<{
24
24
  avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
25
25
  children?: null | undefined;
26
26
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
27
27
  clickable?: boolean | undefined;
28
- color?: "primary" | "secondary" | "error" | "success" | "info" | "warning" | "default" | undefined;
28
+ color?: "success" | "info" | "warning" | "error" | "primary" | "secondary" | "default" | undefined;
29
29
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
30
30
  disabled?: boolean | undefined;
31
31
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -35,16 +35,16 @@ export declare const StyledContainedChipBase: import("@emotion/styled").StyledCo
35
35
  skipFocusWhenDisabled?: boolean | undefined;
36
36
  sx?: import("@mui/material").SxProps<Theme> | undefined;
37
37
  tabIndex?: number | undefined;
38
- variant?: "outlined" | "filled" | undefined;
38
+ variant?: "filled" | "outlined" | undefined;
39
39
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
40
40
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
41
- }, "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "tabIndex" | "color" | "children" | "disabled" | "sx" | "size" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
41
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
42
42
  export declare const StyledContainedChipEnable: import("@emotion/styled").StyledComponent<{
43
43
  avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
44
44
  children?: null | undefined;
45
45
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
46
46
  clickable?: boolean | undefined;
47
- color?: "primary" | "secondary" | "error" | "success" | "info" | "warning" | "default" | undefined;
47
+ color?: "success" | "info" | "warning" | "error" | "primary" | "secondary" | "default" | undefined;
48
48
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
49
49
  disabled?: boolean | undefined;
50
50
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -54,16 +54,16 @@ export declare const StyledContainedChipEnable: import("@emotion/styled").Styled
54
54
  skipFocusWhenDisabled?: boolean | undefined;
55
55
  sx?: import("@mui/material").SxProps<Theme> | undefined;
56
56
  tabIndex?: number | undefined;
57
- variant?: "outlined" | "filled" | undefined;
57
+ variant?: "filled" | "outlined" | undefined;
58
58
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
59
59
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
60
- }, "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "tabIndex" | "color" | "children" | "disabled" | "sx" | "size" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps & EnableContainedChipProps, {}, {}>;
60
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps & EnableContainedChipProps, {}, {}>;
61
61
  export declare const StyledContainedChipDeletable: import("@emotion/styled").StyledComponent<{
62
62
  avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
63
63
  children?: null | undefined;
64
64
  classes?: Partial<import("@mui/material").ChipClasses> | undefined;
65
65
  clickable?: boolean | undefined;
66
- color?: "primary" | "secondary" | "error" | "success" | "info" | "warning" | "default" | undefined;
66
+ color?: "success" | "info" | "warning" | "error" | "primary" | "secondary" | "default" | undefined;
67
67
  deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
68
68
  disabled?: boolean | undefined;
69
69
  icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
@@ -73,7 +73,7 @@ export declare const StyledContainedChipDeletable: import("@emotion/styled").Sty
73
73
  skipFocusWhenDisabled?: boolean | undefined;
74
74
  sx?: import("@mui/material").SxProps<Theme> | undefined;
75
75
  tabIndex?: number | undefined;
76
- variant?: "outlined" | "filled" | undefined;
76
+ variant?: "filled" | "outlined" | undefined;
77
77
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
78
78
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
79
- }, "icon" | keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "tabIndex" | "color" | "children" | "disabled" | "sx" | "size" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
79
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "label" | "tabIndex" | "color" | "icon" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<Theme> & BaseContainedChipProps, {}, {}>;
@@ -1,6 +1,6 @@
1
1
  import { SwitchProps } from "@mui/material";
2
2
  interface ToggleProps extends SwitchProps {
3
- toggleSize: 'medium' | 'large';
3
+ toggleSize: "medium" | "large";
4
4
  }
5
5
  export declare const CommonToggle: import("@emotion/styled").StyledComponent<SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & ToggleProps, {}, {}>;
6
6
  export declare const CommonIndeterminateToggle: import("@emotion/styled").StyledComponent<SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & ToggleProps, {}, {}>;
@@ -6,7 +6,7 @@ type CustomToggleButtonProps = ToggleButtonProps & {
6
6
  export declare const CustomToggleButton: import("@emotion/styled").StyledComponent<{
7
7
  children?: import("react").ReactNode;
8
8
  classes?: Partial<import("@mui/material").ToggleButtonClasses> | undefined;
9
- color?: "primary" | "secondary" | "error" | "success" | "info" | "warning" | "standard" | undefined;
9
+ color?: "success" | "info" | "warning" | "error" | "standard" | "primary" | "secondary" | undefined;
10
10
  disabled?: boolean | undefined;
11
11
  disableFocusRipple?: boolean | undefined;
12
12
  fullWidth?: boolean | undefined;
@@ -34,6 +34,6 @@ export declare const CustomToggleButton: import("@emotion/styled").StyledCompone
34
34
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
35
35
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
36
36
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
37
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "onChange" | "onClick" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "fullWidth" | "size" | "value" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CustomToggleButtonProps, {}, {}>;
37
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "tabIndex" | "color" | "onChange" | "onClick" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "fullWidth" | "size" | "value" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & CustomToggleButtonProps, {}, {}>;
38
38
  export declare const IconAndChildrenWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
39
39
  export {};
@@ -5,7 +5,7 @@ export type BaseColor = Record<keyof typeof base.blue, PaletteColor>;
5
5
  export type GreyColor = Record<keyof typeof base.grey, PaletteColor>;
6
6
  declare module "@mui/material/styles/createPalette" {
7
7
  interface PaletteOptions {
8
- lunit?: {
8
+ lunit_global?: {
9
9
  grey: GreyColor;
10
10
  blue: BaseColor;
11
11
  green: BaseColor;
@@ -16,10 +16,10 @@ declare module "@mui/material/styles/createPalette" {
16
16
  red: BaseColor;
17
17
  yellow: BaseColor;
18
18
  };
19
- token?: ColorToken;
19
+ lunit_token?: ColorToken;
20
20
  }
21
21
  interface Palette {
22
- lunit: {
22
+ lunit_global: {
23
23
  grey: GreyColor;
24
24
  blue: BaseColor;
25
25
  green: BaseColor;
@@ -30,7 +30,7 @@ declare module "@mui/material/styles/createPalette" {
30
30
  red: BaseColor;
31
31
  yellow: BaseColor;
32
32
  };
33
- token: ColorToken;
33
+ lunit_token: ColorToken;
34
34
  }
35
35
  }
36
36
  export declare const createColorCssBaseline: () => {
@@ -91,7 +91,7 @@ declare const paletteOptions: {
91
91
  A400: string;
92
92
  A700: string;
93
93
  };
94
- lunit: {
94
+ lunit_global: {
95
95
  grey: GreyColor;
96
96
  blue: BaseColor;
97
97
  green: BaseColor;
@@ -102,7 +102,7 @@ declare const paletteOptions: {
102
102
  red: BaseColor;
103
103
  yellow: BaseColor;
104
104
  } | undefined;
105
- token: {
105
+ lunit_token: {
106
106
  core: {
107
107
  bg_01: string;
108
108
  bg_02: string;
@@ -38,7 +38,7 @@ export declare const palette: {
38
38
  A400: string;
39
39
  A700: string;
40
40
  };
41
- lunit: {
41
+ lunit_global: {
42
42
  grey: import("./colors").GreyColor;
43
43
  blue: import("./colors").BaseColor;
44
44
  green: import("./colors").BaseColor;
@@ -49,7 +49,7 @@ export declare const palette: {
49
49
  red: import("./colors").BaseColor;
50
50
  yellow: import("./colors").BaseColor;
51
51
  } | undefined;
52
- token: {
52
+ lunit_token: {
53
53
  core: {
54
54
  bg_01: string;
55
55
  bg_02: string;
@@ -1,4 +1,4 @@
1
- export { default as theme } from "./theme";
1
+ export { default as theme, themeOptions } from "./theme";
2
2
  export { base as baseColors } from "./foundation/colors";
3
3
  export { default as Alert } from "./components/Alert";
4
4
  export { default as Button } from "./components/Button";
@@ -1,2 +1,4 @@
1
+ import { ThemeOptions } from "@mui/material";
2
+ export declare const themeOptions: ThemeOptions;
1
3
  declare const theme: import("@mui/material").Theme;
2
4
  export default theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunit/design-system",
3
- "version": "1.0.0-a.5",
3
+ "version": "1.0.0-b.1",
4
4
  "description": "Lunit Design System",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/index.js",
@@ -50,12 +50,12 @@ export const StyledAlertTitle = styled(MuiAlertTitle)(({ theme }) => ({
50
50
  fontWeight: 700,
51
51
  fontSize: "14px",
52
52
  lineHeight: "20px",
53
- color: theme.palette.token.core.text_normal,
53
+ color: theme.palette.lunit_token.core.text_normal,
54
54
  },
55
55
  }));
56
56
 
57
57
  export const StyledAlertChildren = styled("div")(({ theme }) => ({
58
- color: theme.palette.token.core.text_normal,
58
+ color: theme.palette.lunit_token.core.text_normal,
59
59
  }));
60
60
 
61
61
  export const StyledBottomAction = styled("div")({
@@ -6,13 +6,13 @@ export const getBackgroundColor = (
6
6
  ) => {
7
7
  switch (severity) {
8
8
  case "info":
9
- return theme.palette.token.component.alert_info_bg;
9
+ return theme.palette.lunit_token.component.alert_info_bg;
10
10
  case "warning":
11
- return theme.palette.token.component.alert_warning_bg;
11
+ return theme.palette.lunit_token.component.alert_warning_bg;
12
12
  case "error":
13
- return theme.palette.token.component.alert_error_bg;
13
+ return theme.palette.lunit_token.component.alert_error_bg;
14
14
  default:
15
- return theme.palette.token.component.alert_success_bg;
15
+ return theme.palette.lunit_token.component.alert_success_bg;
16
16
  }
17
17
  };
18
18
 
@@ -22,13 +22,13 @@ export const getBorderColor = (
22
22
  ) => {
23
23
  switch (severity) {
24
24
  case "info":
25
- return theme.palette.token.component.alert_info_border;
25
+ return theme.palette.lunit_token.component.alert_info_border;
26
26
  case "warning":
27
- return theme.palette.token.component.alert_warning_border;
27
+ return theme.palette.lunit_token.component.alert_warning_border;
28
28
  case "error":
29
- return theme.palette.token.component.alert_error_border;
29
+ return theme.palette.lunit_token.component.alert_error_border;
30
30
  default:
31
- return theme.palette.token.component.alert_success_border;
31
+ return theme.palette.lunit_token.component.alert_success_border;
32
32
  }
33
33
  };
34
34
 
@@ -38,12 +38,12 @@ export const getIconColor = (
38
38
  ) => {
39
39
  switch (severity) {
40
40
  case "info":
41
- return theme.palette.token.core.icon_info_02;
41
+ return theme.palette.lunit_token.core.icon_info_02;
42
42
  case "warning":
43
- return theme.palette.token.core.icon_warning_02;
43
+ return theme.palette.lunit_token.core.icon_warning_02;
44
44
  case "error":
45
- return theme.palette.token.core.icon_error_02;
45
+ return theme.palette.lunit_token.core.icon_error_02;
46
46
  default:
47
- return theme.palette.token.core.icon_success_02;
47
+ return theme.palette.lunit_token.core.icon_success_02;
48
48
  }
49
49
  };
@@ -12,7 +12,7 @@ import type { ToggleButtonProps } from "../ToggleButton/ToggleButton.types";
12
12
  import type { Typography } from "@mui/material/styles/createTypography";
13
13
 
14
14
  type KindStyleParams = Pick<ButtonProps, "kind" | "color"> & {
15
- token: ColorToken;
15
+ lunit_token: ColorToken;
16
16
  };
17
17
 
18
18
  type CustomButtonProps = ButtonProps & { hasIconOnly: boolean };
@@ -64,79 +64,79 @@ export const sizeStyle = ({
64
64
  }),
65
65
  });
66
66
 
67
- export const kindStyle = ({ kind, color, token }: KindStyleParams) => ({
67
+ export const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({
68
68
  // kind: container
69
69
  ...(kind === "contained" &&
70
70
  color === "primary" && {
71
- color: token.component.btn_primary_text_2,
72
- backgroundColor: token.component.btn_primary_bg,
73
- "&:hover": getHoverStyle(token.component.btn_primary_bg),
71
+ color: lunit_token.component.btn_primary_text_2,
72
+ backgroundColor: lunit_token.component.btn_primary_bg,
73
+ "&:hover": getHoverStyle(lunit_token.component.btn_primary_bg),
74
74
  "&.Mui-disabled": {
75
75
  opacity: 0.38,
76
76
  border: "none",
77
- color: token.component.btn_primary_text_2,
77
+ color: lunit_token.component.btn_primary_text_2,
78
78
  },
79
79
  }),
80
80
  ...(kind === "contained" &&
81
81
  color === "secondary" && {
82
- color: token.component.btn_secondary_text,
83
- backgroundColor: token.component.btn_secondary_bg,
84
- "&:hover": getHoverStyle(token.component.btn_secondary_bg),
82
+ color: lunit_token.component.btn_secondary_text,
83
+ backgroundColor: lunit_token.component.btn_secondary_bg,
84
+ "&:hover": getHoverStyle(lunit_token.component.btn_secondary_bg),
85
85
  "&.Mui-disabled": {
86
86
  opacity: 0.38,
87
87
  border: "none",
88
- color: token.component.btn_secondary_text,
88
+ color: lunit_token.component.btn_secondary_text,
89
89
  },
90
90
  }),
91
91
  ...(kind === "contained" &&
92
92
  color === "error" && {
93
- color: token.component.btn_primary_text_2,
94
- backgroundColor: token.component.btn_error_bg,
95
- "&:hover": getHoverStyle(token.component.btn_error_bg),
93
+ color: lunit_token.component.btn_primary_text_2,
94
+ backgroundColor: lunit_token.component.btn_error_bg,
95
+ "&:hover": getHoverStyle(lunit_token.component.btn_error_bg),
96
96
  "&.Mui-disabled": {
97
97
  opacity: 0.38,
98
98
  border: "none",
99
- color: token.component.btn_primary_text_2,
99
+ color: lunit_token.component.btn_primary_text_2,
100
100
  },
101
101
  }),
102
102
  // kind: ghost
103
103
  ...(kind === "ghost" &&
104
104
  color === "primary" && {
105
- color: token.component.btn_primary_text_1,
105
+ color: lunit_token.component.btn_primary_text_1,
106
106
  border: "none",
107
107
  "&:hover": getHoverStyle("none"),
108
108
  "&.Mui-disabled": {
109
109
  opacity: 0.38,
110
110
  border: "none",
111
- color: token.component.btn_primary_text_1,
111
+ color: lunit_token.component.btn_primary_text_1,
112
112
  },
113
113
  }),
114
114
  ...(kind === "ghost" &&
115
115
  color === "secondary" && {
116
- color: token.component.btn_secondary_text,
116
+ color: lunit_token.component.btn_secondary_text,
117
117
  border: "none",
118
118
  "&:hover": getHoverStyle("none"),
119
119
  "&.Mui-disabled": {
120
120
  opacity: 0.38,
121
121
  border: "none",
122
- color: token.component.btn_secondary_text,
122
+ color: lunit_token.component.btn_secondary_text,
123
123
  },
124
124
  }),
125
125
  ...(kind === "ghost" &&
126
126
  color === "error" && {
127
- color: token.component.btn_error_text,
127
+ color: lunit_token.component.btn_error_text,
128
128
  "&:hover": getHoverStyle("none"),
129
129
  "&.Mui-disabled": {
130
130
  opacity: 0.38,
131
131
  border: "none",
132
- color: token.component.btn_error_text,
132
+ color: lunit_token.component.btn_error_text,
133
133
  },
134
134
  }),
135
135
  // kind: outlined
136
136
  ...(kind === "outlined" &&
137
137
  color === "primary" && {
138
- color: token.component.btn_primary_text_1,
139
- border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_primary_border}`,
138
+ color: lunit_token.component.btn_primary_text_1,
139
+ border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.component.btn_primary_border}`,
140
140
  "&:hover": getHoverStyle("none"),
141
141
  "&:hover:before": {
142
142
  content: "''",
@@ -146,18 +146,18 @@ export const kindStyle = ({ kind, color, token }: KindStyleParams) => ({
146
146
  width: "calc(100% + 2px)",
147
147
  height: "calc(100% + 2px)",
148
148
  zIndex: -1,
149
- backgroundColor: token.core.hover,
149
+ backgroundColor: lunit_token.core.hover,
150
150
  borderRadius,
151
151
  },
152
152
  "&.Mui-disabled": {
153
153
  opacity: 0.38,
154
- color: token.component.btn_primary_text_1,
154
+ color: lunit_token.component.btn_primary_text_1,
155
155
  },
156
156
  }),
157
157
  ...(kind === "outlined" &&
158
158
  color === "secondary" && {
159
- color: token.component.btn_secondary_text,
160
- border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_secondary_border}`,
159
+ color: lunit_token.component.btn_secondary_text,
160
+ border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.component.btn_secondary_border}`,
161
161
  "&:hover": getHoverStyle("none"),
162
162
  "&:hover:before": {
163
163
  content: "''",
@@ -167,17 +167,17 @@ export const kindStyle = ({ kind, color, token }: KindStyleParams) => ({
167
167
  width: "calc(100% + 2px)",
168
168
  height: "calc(100% + 2px)",
169
169
  zIndex: -1,
170
- backgroundColor: token.core.hover,
170
+ backgroundColor: lunit_token.core.hover,
171
171
  borderRadius,
172
172
  },
173
173
  "&.Mui-disabled": {
174
174
  opacity: 0.38,
175
- color: token.component.btn_secondary_text,
175
+ color: lunit_token.component.btn_secondary_text,
176
176
  },
177
177
  }),
178
178
  });
179
179
 
180
- export const commonStyle = ({ token }: { token: ColorToken }) =>
180
+ export const commonStyle = ({ lunit_token }: { lunit_token: ColorToken }) =>
181
181
  ({
182
182
  fontWeight: "500",
183
183
  borderRadius,
@@ -189,7 +189,7 @@ export const commonStyle = ({ token }: { token: ColorToken }) =>
189
189
  height: `calc(100% + ${PADDING_OF_FOCUS}px)`,
190
190
  content: '""',
191
191
  borderRadius: "11px",
192
- border: `1px solid ${token.core.focused}`,
192
+ border: `1px solid ${lunit_token.core.focused}`,
193
193
  boxSizing: "border-box",
194
194
  },
195
195
  },
@@ -201,7 +201,7 @@ export const commonStyle = ({ token }: { token: ColorToken }) =>
201
201
  width: "100%",
202
202
  height: "100%",
203
203
  zIndex: -1,
204
- backgroundColor: token.core.hover,
204
+ backgroundColor: lunit_token.core.hover,
205
205
  borderRadius,
206
206
  },
207
207
  } as const);
@@ -237,16 +237,16 @@ export const CustomButton = styled(MuiButton, {
237
237
  ({
238
238
  theme: {
239
239
  typography,
240
- palette: { token },
240
+ palette: { lunit_token },
241
241
  },
242
242
  kind,
243
243
  size,
244
244
  color,
245
245
  hasIconOnly,
246
246
  }) => ({
247
- ...commonStyle({ token }),
247
+ ...commonStyle({ lunit_token }),
248
248
  ...iconStyle({ size, hasIconOnly }),
249
249
  ...sizeStyle({ size, kind, hasIconOnly, typography }),
250
- ...kindStyle({ kind, color, token }),
250
+ ...kindStyle({ kind, color, lunit_token }),
251
251
  })
252
252
  );
@@ -15,7 +15,7 @@ const CustomCheckbox = styled(MuiCheckbox)(({ theme }) => ({
15
15
  position: "absolute",
16
16
  width: 24,
17
17
  height: 24,
18
- border: `1px solid ${theme.palette.token.core.focused}`,
18
+ border: `1px solid ${theme.palette.lunit_token.core.focused}`,
19
19
  borderRadius: "7px",
20
20
  },
21
21
  }));
@@ -27,7 +27,7 @@ const iconSize = {
27
27
 
28
28
  const DefaultIcon = styled("span")(({ theme }) => ({
29
29
  ...iconSize,
30
- backgroundColor: theme.palette.token.component.selectcontrol_off,
30
+ backgroundColor: theme.palette.lunit_token.component.selectcontrol_off,
31
31
  maskImage:
32
32
  "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath" +
33
33
  " fill-rule='evenodd' clip-rule='evenodd' d='M14 1.5H4C2.61929 1.5 1.5 2.61929 1.5 4V14C1.5 15.3807 2.61929 16.5 4 16.5H14C15.3807 " +
@@ -36,7 +36,7 @@ const DefaultIcon = styled("span")(({ theme }) => ({
36
36
 
37
37
  const CheckedIcon = styled("span")(({ theme }) => ({
38
38
  ...iconSize,
39
- backgroundColor: theme.palette.token.component.selectcontrol_on,
39
+ backgroundColor: theme.palette.lunit_token.component.selectcontrol_on,
40
40
  maskImage:
41
41
  "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath" +
42
42
  " fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4ZM14.2516 " +
@@ -45,7 +45,7 @@ const CheckedIcon = styled("span")(({ theme }) => ({
45
45
 
46
46
  const IndeterminateIcon = styled("span")(({ theme }) => ({
47
47
  ...iconSize,
48
- backgroundColor: theme.palette.token.component.selectcontrol_on,
48
+ backgroundColor: theme.palette.lunit_token.component.selectcontrol_on,
49
49
  maskImage:
50
50
  "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath" +
51
51
  " fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 " +
@@ -36,32 +36,32 @@ const getColorToken = (
36
36
  if (token === "text") {
37
37
  switch (color) {
38
38
  case CHIP_COLORS.PRIMARY:
39
- return theme.palette.token.component.chip_primary_text;
39
+ return theme.palette.lunit_token.component.chip_primary_text;
40
40
  case CHIP_COLORS.SECONDARY:
41
- return theme.palette.token.component.chip_secondary_text;
41
+ return theme.palette.lunit_token.component.chip_secondary_text;
42
42
  case CHIP_COLORS.ERROR:
43
- return theme.palette.token.component.chip_error_text;
43
+ return theme.palette.lunit_token.component.chip_error_text;
44
44
  case CHIP_COLORS.WARNING:
45
- return theme.palette.token.component.chip_warning_text;
45
+ return theme.palette.lunit_token.component.chip_warning_text;
46
46
  case CHIP_COLORS.SUCCESS:
47
- return theme.palette.token.component.chip_success_text;
47
+ return theme.palette.lunit_token.component.chip_success_text;
48
48
  default:
49
- return theme.palette.token.component.chip_primary_text;
49
+ return theme.palette.lunit_token.component.chip_primary_text;
50
50
  }
51
51
  } else {
52
52
  switch (color) {
53
53
  case CHIP_COLORS.PRIMARY:
54
- return theme.palette.token.component.chip_primary_bg;
54
+ return theme.palette.lunit_token.component.chip_primary_bg;
55
55
  case CHIP_COLORS.SECONDARY:
56
- return theme.palette.token.component.chip_secondary_bg;
56
+ return theme.palette.lunit_token.component.chip_secondary_bg;
57
57
  case CHIP_COLORS.ERROR:
58
- return theme.palette.token.component.chip_error_bg;
58
+ return theme.palette.lunit_token.component.chip_error_bg;
59
59
  case CHIP_COLORS.WARNING:
60
- return theme.palette.token.component.chip_warning_bg;
60
+ return theme.palette.lunit_token.component.chip_warning_bg;
61
61
  case CHIP_COLORS.SUCCESS:
62
- return theme.palette.token.component.chip_success_bg;
62
+ return theme.palette.lunit_token.component.chip_success_bg;
63
63
  default:
64
- return theme.palette.token.component.chip_primary_bg;
64
+ return theme.palette.lunit_token.component.chip_primary_bg;
65
65
  }
66
66
  }
67
67
  };
@@ -82,7 +82,7 @@ export const StyledContainedChipBase = styled(MuiChip, {
82
82
  ...COMMON_STYLES,
83
83
  ...theme.typography.caption,
84
84
 
85
- color: theme.palette.token.core.text_normal,
85
+ color: theme.palette.lunit_token.core.text_normal,
86
86
  backgroundColor: getColorToken("bg", theme, color),
87
87
 
88
88
  "& .MuiSvgIcon-root": {
@@ -134,7 +134,7 @@ export const StyledContainedChipEnable = styled(StyledContainedChipBase, {
134
134
  left: 0,
135
135
  right: 0,
136
136
  bottom: 0,
137
- backgroundColor: theme.palette.token.core.hover,
137
+ backgroundColor: theme.palette.lunit_token.core.hover,
138
138
  borderRadius: "11px",
139
139
  },
140
140
  }));
@@ -155,7 +155,7 @@ export const StyledContainedChipDeletable = styled(
155
155
  right: 0,
156
156
  bottom: 0,
157
157
  opacity: 0,
158
- color: theme.palette.token.core.hover,
158
+ color: theme.palette.lunit_token.core.hover,
159
159
  ":hover": {
160
160
  cursor: "pointer",
161
161
  opacity: 1,
@@ -13,7 +13,7 @@ const CustomRadio = styled(MuiRadio)(({ theme }) => ({
13
13
  display: "block",
14
14
  width: 24,
15
15
  height: 24,
16
- backgroundColor: theme.palette.token.core.focused,
16
+ backgroundColor: theme.palette.lunit_token.core.focused,
17
17
  maskImage:
18
18
  "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath" +
19
19
  " fill-rule='evenodd' clip-rule='evenodd' d='M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 " +
@@ -28,7 +28,7 @@ const iconSize = {
28
28
 
29
29
  const DefaultIcon = styled("span")(({ theme }) => ({
30
30
  ...iconSize,
31
- backgroundColor: theme.palette.token.component.selectcontrol_off,
31
+ backgroundColor: theme.palette.lunit_token.component.selectcontrol_off,
32
32
  maskImage:
33
33
  "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath" +
34
34
  " fill-rule='evenodd' clip-rule='evenodd' d='M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 " +
@@ -37,7 +37,7 @@ const DefaultIcon = styled("span")(({ theme }) => ({
37
37
 
38
38
  const CheckedIcon = styled("span")(({ theme }) => ({
39
39
  ...iconSize,
40
- backgroundColor: theme.palette.token.component.selectcontrol_on,
40
+ backgroundColor: theme.palette.lunit_token.component.selectcontrol_on,
41
41
  maskImage:
42
42
  "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath" +
43
43
  " fill-rule='evenodd' clip-rule='evenodd' d='M10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5C7.23858 5 5" +