@lunit/design-system 1.0.0-a.2 → 1.0.0-a.3
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/.babelrc.json +16 -0
- 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/Chip/index.js +1 -1
- package/dist/cjs/components/Chip/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/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/components/Alert/Alert.js +16 -4
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Alert/Alert.styled.js +48 -0
- package/dist/components/Alert/Alert.styled.js.map +1 -0
- package/dist/components/Alert/Alert.types.js +2 -0
- package/dist/components/Alert/Alert.types.js.map +1 -0
- package/dist/components/Alert/Alert.utils..js +38 -0
- package/dist/components/Alert/Alert.utils..js.map +1 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.styled.js +31 -21
- package/dist/components/Button/Button.styled.js.map +1 -1
- package/dist/components/Button/utils/getHoverStyle.js +7 -0
- package/dist/components/Button/utils/getHoverStyle.js.map +1 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/Chip.styled.js +2 -3
- package/dist/components/Chip/Chip.styled.js.map +1 -1
- package/dist/components/TextField/TextField.js +15 -3
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.style.js +245 -0
- package/dist/components/TextField/TextField.style.js.map +1 -0
- package/dist/components/TextField/TextField.types.js +2 -0
- package/dist/components/TextField/TextField.types.js.map +1 -0
- package/dist/components/TextField/TextFieldIcon.js +7 -0
- package/dist/components/TextField/TextFieldIcon.js.map +1 -0
- package/dist/components/Toast/Toast.js +26 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/Toast.styled.js +49 -0
- package/dist/components/Toast/Toast.styled.js.map +1 -0
- package/dist/components/Toast/Toast.types.js +2 -0
- package/dist/components/Toast/Toast.types.js.map +1 -0
- package/dist/components/Toast/Toast.utils.js +14 -0
- package/dist/components/Toast/Toast.utils.js.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/foundation/colors/base/grey.js +16 -0
- package/dist/foundation/colors/base/grey.js.map +1 -1
- package/dist/foundation/colors/base/lunitGreen.js +2 -2
- package/dist/foundation/colors/base/lunitGreen.js.map +1 -1
- package/dist/foundation/colors/base/lunitTeal.js +5 -5
- package/dist/foundation/colors/base/lunitTeal.js.map +1 -1
- package/dist/foundation/colors/base/red.js +2 -2
- package/dist/foundation/colors/index.js +24 -4
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/foundation/colors/token/component.js +265 -291
- package/dist/foundation/colors/token/component.js.map +1 -1
- package/dist/foundation/colors/token/core.js +132 -125
- package/dist/foundation/colors/token/core.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/theme.js +5 -0
- package/dist/theme.js.map +1 -1
- package/dist/types/components/Alert/Alert.d.ts +3 -1
- package/dist/types/components/Alert/Alert.styled.d.ts +6 -0
- package/dist/types/components/Alert/Alert.types.d.ts +9 -0
- package/dist/types/components/Alert/Alert.utils..d.ts +4 -0
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +26 -2
- package/dist/types/components/Button/Button.types.d.ts +4 -4
- package/dist/types/components/Button/utils/getHoverStyle.d.ts +6 -0
- package/dist/types/components/Chip/Chip.styled.d.ts +9 -9
- package/dist/types/components/Chip/Chip.types.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +2 -1
- package/dist/types/components/TextField/TextField.style.d.ts +9 -0
- package/dist/types/components/TextField/TextField.types.d.ts +29 -0
- package/dist/types/components/TextField/TextFieldIcon.d.ts +8 -0
- package/dist/types/components/TextField/index.d.ts +1 -0
- package/dist/types/components/Toast/Toast.d.ts +4 -0
- package/dist/types/components/Toast/Toast.styled.d.ts +1 -0
- package/dist/types/components/Toast/Toast.types.d.ts +4 -0
- package/dist/types/components/Toast/Toast.utils.d.ts +2 -0
- package/dist/types/components/Toast/index.d.ts +1 -0
- package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.types.d.ts +4 -4
- package/dist/types/foundation/colors/base/grey.d.ts +16 -0
- package/dist/types/foundation/colors/base/lunitGreen.d.ts +2 -2
- package/dist/types/foundation/colors/base/lunitTeal.d.ts +2 -2
- package/dist/types/foundation/colors/index.d.ts +42 -9
- package/dist/types/foundation/colors/types.d.ts +1 -3
- package/dist/types/foundation/index.d.ts +37 -5
- package/dist/types/index.d.ts +1 -0
- package/package.json +21 -16
- package/src/components/Alert/Alert.styled.ts +60 -0
- package/src/components/Alert/Alert.tsx +49 -5
- package/src/components/Alert/Alert.types.ts +10 -0
- package/src/components/Alert/Alert.utils..ts +41 -0
- package/src/components/Button/Button.styled.ts +33 -21
- package/src/components/Button/Button.tsx +1 -5
- package/src/components/Button/Button.types.ts +4 -4
- package/src/components/Button/utils/getHoverStyle.ts +7 -0
- package/src/components/Chip/Chip.styled.ts +6 -4
- package/src/components/Chip/Chip.tsx +1 -1
- package/src/components/Chip/Chip.types.ts +2 -2
- package/src/components/TextField/TextField.style.ts +316 -0
- package/src/components/TextField/TextField.tsx +75 -3
- package/src/components/TextField/TextField.types.ts +38 -0
- package/src/components/TextField/TextFieldIcon.tsx +24 -0
- package/src/components/TextField/index.ts +6 -0
- package/src/components/Toast/Toast.styled.ts +49 -0
- package/src/components/Toast/Toast.tsx +66 -0
- package/src/components/Toast/Toast.types.ts +14 -0
- package/src/components/Toast/Toast.utils.ts +15 -0
- package/src/components/Toast/index.tsx +1 -0
- package/src/components/ToggleButton/ToggleButton.types.ts +4 -7
- package/src/foundation/colors/base/grey.ts +17 -0
- package/src/foundation/colors/base/lunitGreen.ts +2 -2
- package/src/foundation/colors/base/lunitTeal.ts +5 -5
- package/src/foundation/colors/base/red.ts +2 -2
- package/src/foundation/colors/index.ts +29 -8
- package/src/foundation/colors/token/component.ts +300 -326
- package/src/foundation/colors/token/core.ts +152 -145
- package/src/foundation/colors/types.ts +1 -3
- package/src/index.ts +1 -0
- package/src/stories/components/Alert/Alert.stories.tsx +148 -4
- package/src/stories/components/Button/BasicButton.stories.tsx +19 -28
- package/src/stories/components/Button/IconButton.stories.tsx +39 -28
- package/src/stories/components/Button/Kind.stories.tsx +83 -57
- package/src/stories/components/Chip/Chip.stories.tsx +94 -82
- package/src/stories/components/DataTable/DataTable.stories.tsx +6 -4
- package/src/stories/components/DatePicker/DatePicker.stories.tsx +6 -4
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +12 -6
- package/src/stories/components/Modal/Modal.stories.tsx +6 -4
- package/src/stories/components/SelectControl/Checkbox.stories.tsx +31 -23
- package/src/stories/components/SelectControl/RadioGroup.stories.tsx +6 -5
- package/src/stories/components/SelectControl/RadioStatus.stories.tsx +6 -4
- package/src/stories/components/SelectControl/Toggle.stories.tsx +33 -19
- package/src/stories/components/TextField/TextFieldMulti.stories.tsx +137 -0
- package/src/stories/components/TextField/TextFieldSingle.stories.tsx +283 -0
- package/src/stories/components/TextField/TextFieldSize.stories.tsx +134 -0
- package/src/stories/components/Toast/Toast.stories.tsx +152 -0
- package/src/stories/components/ToggleButton/Basic.stories.tsx +35 -31
- package/src/stories/components/ToggleButton/Group.stories.tsx +21 -21
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +53 -43
- package/src/stories/components/ToggleButton/WithIcon.stories.tsx +35 -36
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +6 -4
- package/src/stories/foundation/Elevation/Elevation.stories.tsx +10 -6
- package/src/stories/foundation/Typography/{Typography.stories.mdx → Typography.mdx} +10 -5
- package/src/stories/foundation/Typography/Typography.stories.tsx +46 -36
- package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +44 -0
- package/src/stories/foundation/colors/Colors.stories.tsx +7 -5
- package/src/stories/foundation/colors/Mui.stories.tsx +18 -0
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +2 -2
- package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +28 -0
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +127 -0
- package/src/theme.ts +5 -0
- package/src/stories/components/TextField/TextField.stories.tsx +0 -13
- package/src/stories/foundation/colors/Token.stories.tsx +0 -190
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { SxProps } from "@mui/material";
|
|
2
|
+
import type { OutlinedTextFieldProps } from "@mui/material/TextField";
|
|
3
|
+
|
|
4
|
+
export type TextFieldSize = "small" | "medium" | "large";
|
|
5
|
+
export interface BaseTextFieldProps
|
|
6
|
+
extends Omit<
|
|
7
|
+
OutlinedTextFieldProps,
|
|
8
|
+
"size" | "value" | "helperText" | "variant"
|
|
9
|
+
> {
|
|
10
|
+
/**
|
|
11
|
+
* The design system TextField variable is outlined fixed.
|
|
12
|
+
*/
|
|
13
|
+
variant: "outlined";
|
|
14
|
+
value?: string;
|
|
15
|
+
helperText?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @default "small"
|
|
19
|
+
*/
|
|
20
|
+
size?: TextFieldSize;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SingleTextFieldProps extends BaseTextFieldProps {
|
|
24
|
+
size: TextFieldSize;
|
|
25
|
+
leftIcon?: JSX.Element;
|
|
26
|
+
rightIcon?: JSX.Element;
|
|
27
|
+
leftIconSx?: SxProps;
|
|
28
|
+
rightIconSx?: SxProps;
|
|
29
|
+
onLeftIconClick?: () => void;
|
|
30
|
+
onRightIconClick?: () => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface MultiTextFieldProps extends BaseTextFieldProps {
|
|
34
|
+
rows?: number | string;
|
|
35
|
+
size: TextFieldSize;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type TextFieldProps = SingleTextFieldProps | MultiTextFieldProps;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { IconWrapper } from "./TextField.style";
|
|
4
|
+
|
|
5
|
+
import type { SxProps } from "@mui/material";
|
|
6
|
+
|
|
7
|
+
interface TextFieldProps {
|
|
8
|
+
sx?: SxProps;
|
|
9
|
+
icon: JSX.Element;
|
|
10
|
+
onIconClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const TextFieldIcon = ({ sx, icon, onIconClick }: TextFieldProps) => {
|
|
14
|
+
return (
|
|
15
|
+
<IconWrapper
|
|
16
|
+
sx={{ cursor: onIconClick ? "pointer" : "auto", ...sx }}
|
|
17
|
+
onClick={onIconClick}
|
|
18
|
+
>
|
|
19
|
+
{icon}
|
|
20
|
+
</IconWrapper>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default TextFieldIcon;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Alert, styled } from "@mui/material";
|
|
2
|
+
import { getIconColor } from "./Toast.utils";
|
|
3
|
+
|
|
4
|
+
export const StyledToast = styled(Alert)(({ theme, severity }) => {
|
|
5
|
+
return {
|
|
6
|
+
'div[class*="MuiAlert"]': {
|
|
7
|
+
display: "flex",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
},
|
|
10
|
+
"&.MuiAlert-root": {
|
|
11
|
+
padding: "8px 16px 8px 16px",
|
|
12
|
+
margin: 0,
|
|
13
|
+
color: theme.palette.token.core.text_normal,
|
|
14
|
+
backgroundColor: theme.palette.token.core.bg_03,
|
|
15
|
+
borderRadius: "8px",
|
|
16
|
+
},
|
|
17
|
+
"& .MuiAlert-icon": {
|
|
18
|
+
height: "36px",
|
|
19
|
+
marginRight: "16px",
|
|
20
|
+
fontSize: 20,
|
|
21
|
+
color: `${getIconColor(severity)}`,
|
|
22
|
+
"& .MuiSvgIcon-root": {
|
|
23
|
+
height: "16px",
|
|
24
|
+
width: "16px",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
"& .MuiAlert-message": {
|
|
28
|
+
// max length of toast message is 400px
|
|
29
|
+
maxWidth: "400px",
|
|
30
|
+
minHeight: "28px",
|
|
31
|
+
padding: "8px 0 8px 0",
|
|
32
|
+
fontWeight: 400,
|
|
33
|
+
fontSize: "14px",
|
|
34
|
+
lineHeight: "20px",
|
|
35
|
+
"& .Toast-message": {
|
|
36
|
+
display: "block",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
"& .MuiAlert-action": {
|
|
40
|
+
alignSelf: "flex-start",
|
|
41
|
+
minHeight: "36px",
|
|
42
|
+
marginRight: "0px",
|
|
43
|
+
padding: 0,
|
|
44
|
+
"& .MuiSvgIcon-root": {
|
|
45
|
+
color: theme.palette.token.core.text_normal,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Success from "@lunit/design-system-icons/Success16";
|
|
2
|
+
import Error from "@lunit/design-system-icons/Error16";
|
|
3
|
+
import Warning from "@lunit/design-system-icons/Warning16";
|
|
4
|
+
import Information from "@lunit/design-system-icons/Information16";
|
|
5
|
+
import Close from "@lunit/design-system-icons/Close";
|
|
6
|
+
|
|
7
|
+
import { Typography } from "@mui/material";
|
|
8
|
+
import React, { forwardRef } from "react";
|
|
9
|
+
|
|
10
|
+
import Button from "../Button";
|
|
11
|
+
import { StyledToast } from "./Toast.styled";
|
|
12
|
+
import type { ToastProps } from "./Toast.types";
|
|
13
|
+
|
|
14
|
+
const MAPPED_ICON = {
|
|
15
|
+
success: <Success variant="filled" />,
|
|
16
|
+
info: <Information variant="filled" />,
|
|
17
|
+
warning: <Warning variant="filled" />,
|
|
18
|
+
error: <Error variant="filled" />,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Toast = forwardRef<HTMLDivElement, ToastProps>((props, ref) => {
|
|
22
|
+
const {
|
|
23
|
+
severity = "normal",
|
|
24
|
+
icon,
|
|
25
|
+
children,
|
|
26
|
+
action,
|
|
27
|
+
onClose,
|
|
28
|
+
...rest
|
|
29
|
+
} = props;
|
|
30
|
+
const iconConfig = severity === "normal" ? { icon: false } : { severity };
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<StyledToast
|
|
34
|
+
ref={ref}
|
|
35
|
+
iconMapping={MAPPED_ICON}
|
|
36
|
+
action={
|
|
37
|
+
<>
|
|
38
|
+
{action}
|
|
39
|
+
{onClose && (
|
|
40
|
+
<Button
|
|
41
|
+
icon={<Close />}
|
|
42
|
+
kind="ghost"
|
|
43
|
+
size="medium"
|
|
44
|
+
onClick={onClose}
|
|
45
|
+
/>
|
|
46
|
+
)}
|
|
47
|
+
</>
|
|
48
|
+
}
|
|
49
|
+
{...iconConfig}
|
|
50
|
+
{...rest}
|
|
51
|
+
>
|
|
52
|
+
<Typography
|
|
53
|
+
className="Toast-message"
|
|
54
|
+
variant="body2_14_regular"
|
|
55
|
+
sx={{
|
|
56
|
+
whiteSpace: "pre-line",
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
{children}
|
|
60
|
+
</Typography>
|
|
61
|
+
</StyledToast>
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// this forwardRef is required for using with Snackbar component
|
|
66
|
+
export default Toast;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlertProps as BaseAlertProps } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export interface ToastProps
|
|
4
|
+
extends Omit<
|
|
5
|
+
BaseAlertProps,
|
|
6
|
+
| "variant"
|
|
7
|
+
| "slots"
|
|
8
|
+
| "slotProps"
|
|
9
|
+
| "components"
|
|
10
|
+
| "componentsProps"
|
|
11
|
+
| "severity"
|
|
12
|
+
> {
|
|
13
|
+
severity?: "success" | "info" | "warning" | "error" | "normal";
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import theme from "@/theme";
|
|
2
|
+
import type { AlertColor } from "@mui/material";
|
|
3
|
+
|
|
4
|
+
export const getIconColor = (severity: AlertColor | undefined) => {
|
|
5
|
+
switch (severity) {
|
|
6
|
+
case "info":
|
|
7
|
+
return theme.palette.token.core.icon_info_02;
|
|
8
|
+
case "warning":
|
|
9
|
+
return theme.palette.token.core.icon_warning_02;
|
|
10
|
+
case "error":
|
|
11
|
+
return theme.palette.token.core.icon_error_02;
|
|
12
|
+
default:
|
|
13
|
+
return theme.palette.token.core.icon_success_02;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Toast } from './Toast'
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import type { ToggleButtonProps as MuiToggleButtonProps } from "@mui/material";
|
|
2
2
|
|
|
3
|
-
interface ToggleButtonBaseProps extends MuiToggleButtonProps {
|
|
3
|
+
interface ToggleButtonBaseProps extends Omit<MuiToggleButtonProps, "variant"> {
|
|
4
4
|
selectedColor?: "primary" | "secondary";
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
interface ContainedToggleButtonProps
|
|
8
|
-
extends Omit<ToggleButtonBaseProps, "variant"> {
|
|
7
|
+
interface ContainedToggleButtonProps extends ToggleButtonBaseProps {
|
|
9
8
|
kind?: "contained";
|
|
10
9
|
color?: "primary" | "secondary";
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
interface GhostToggleButtonProps
|
|
14
|
-
extends Omit<ToggleButtonBaseProps, "variant"> {
|
|
12
|
+
interface GhostToggleButtonProps extends ToggleButtonBaseProps {
|
|
15
13
|
kind?: "ghost";
|
|
16
14
|
color?: "primary" | "secondary";
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
interface OutlinedToggleButtonProps
|
|
20
|
-
extends Omit<ToggleButtonBaseProps, "variant"> {
|
|
17
|
+
interface OutlinedToggleButtonProps extends ToggleButtonBaseProps {
|
|
21
18
|
kind?: "outlined";
|
|
22
19
|
color?: "primary";
|
|
23
20
|
}
|
|
@@ -34,3 +34,20 @@ export const greyText = {
|
|
|
34
34
|
95: grey[5],
|
|
35
35
|
100: grey[5],
|
|
36
36
|
};
|
|
37
|
+
|
|
38
|
+
export const greyForMUI = {
|
|
39
|
+
50: grey[5],
|
|
40
|
+
100: grey[10],
|
|
41
|
+
200: grey[20],
|
|
42
|
+
300: grey[30],
|
|
43
|
+
400: grey[40],
|
|
44
|
+
500: grey[50],
|
|
45
|
+
600: grey[60],
|
|
46
|
+
700: grey[70],
|
|
47
|
+
800: grey[80],
|
|
48
|
+
900: grey[90],
|
|
49
|
+
A100: "#F3F3F3",
|
|
50
|
+
A200: "#C7C7C7",
|
|
51
|
+
A400: "#9A9A9A",
|
|
52
|
+
A700: "#4F4F4F",
|
|
53
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { grey } from "./grey";
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const lunit_green = {
|
|
4
4
|
5: "#F5FBE7",
|
|
5
5
|
10: "#EFF8BC",
|
|
6
6
|
20: "#E5F39E",
|
|
@@ -13,7 +13,7 @@ export const lunitGreen = {
|
|
|
13
13
|
90: "#B1C953",
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const lunit_greenText = {
|
|
17
17
|
5: grey[95],
|
|
18
18
|
10: grey[95],
|
|
19
19
|
20: grey[95],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { grey } from "./grey";
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const lunit_teal = {
|
|
4
4
|
5: "#EAFAFF",
|
|
5
5
|
10: "#D1F7FF",
|
|
6
6
|
20: "#96EDFF",
|
|
@@ -13,9 +13,9 @@ export const lunitTeal = {
|
|
|
13
13
|
90: "#002930",
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const
|
|
17
|
-
5:
|
|
18
|
-
10:
|
|
16
|
+
export const lunit_tealText = {
|
|
17
|
+
5: lunit_teal[90],
|
|
18
|
+
10: lunit_teal[90],
|
|
19
19
|
20: grey[95],
|
|
20
20
|
30: grey[95],
|
|
21
21
|
40: grey[95],
|
|
@@ -23,5 +23,5 @@ export const lunitTealText = {
|
|
|
23
23
|
60: grey[5],
|
|
24
24
|
70: grey[5],
|
|
25
25
|
80: grey[5],
|
|
26
|
-
90:
|
|
26
|
+
90: lunit_teal[5],
|
|
27
27
|
};
|
|
@@ -15,8 +15,8 @@ declare module "@mui/material/styles/createPalette" {
|
|
|
15
15
|
grey: GreyColor;
|
|
16
16
|
blue: BaseColor;
|
|
17
17
|
green: BaseColor;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
lunit_green: BaseColor;
|
|
19
|
+
lunit_teal: BaseColor;
|
|
20
20
|
magenta: BaseColor;
|
|
21
21
|
orange: BaseColor;
|
|
22
22
|
red: BaseColor;
|
|
@@ -30,8 +30,8 @@ declare module "@mui/material/styles/createPalette" {
|
|
|
30
30
|
grey: GreyColor;
|
|
31
31
|
blue: BaseColor;
|
|
32
32
|
green: BaseColor;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
lunit_green: BaseColor;
|
|
34
|
+
lunit_teal: BaseColor;
|
|
35
35
|
magenta: BaseColor;
|
|
36
36
|
orange: BaseColor;
|
|
37
37
|
red: BaseColor;
|
|
@@ -49,7 +49,7 @@ const createCSSVariables = () => {
|
|
|
49
49
|
const baseColors = base[color as ColorKey];
|
|
50
50
|
for (let key in baseColors) {
|
|
51
51
|
if (baseColors.hasOwnProperty(key)) {
|
|
52
|
-
const varName = `--${color}
|
|
52
|
+
const varName = `--${color}_${key}`;
|
|
53
53
|
cssVars[varName] = baseColors[Number(key) as keyof typeof baseColors];
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -99,6 +99,7 @@ export const createColorCssBaseline = () => {
|
|
|
99
99
|
return {
|
|
100
100
|
":root": {
|
|
101
101
|
...createCSSVariables(),
|
|
102
|
+
...createTokenColorVariables("dark1"),
|
|
102
103
|
},
|
|
103
104
|
".light1": {
|
|
104
105
|
...createTokenColorVariables("light1"),
|
|
@@ -121,6 +122,7 @@ export const createColorCssBaseline = () => {
|
|
|
121
122
|
};
|
|
122
123
|
};
|
|
123
124
|
|
|
125
|
+
// TODO: TextColors 삭제하고 관련된 설정 수정하기
|
|
124
126
|
const lunitColors: PaletteOptions["lunit"] = ((): PaletteOptions["lunit"] => {
|
|
125
127
|
const ret: any = {};
|
|
126
128
|
for (const colorKey in base) {
|
|
@@ -146,6 +148,25 @@ const lunitColors: PaletteOptions["lunit"] = ((): PaletteOptions["lunit"] => {
|
|
|
146
148
|
})();
|
|
147
149
|
|
|
148
150
|
const paletteOptions = {
|
|
151
|
+
primary: {
|
|
152
|
+
main: base.lunit_teal[40], // core.text_primary.dark1
|
|
153
|
+
},
|
|
154
|
+
secondary: {
|
|
155
|
+
main: base.grey[50], // core.text_light.dark1
|
|
156
|
+
},
|
|
157
|
+
error: {
|
|
158
|
+
main: base.red[40], // core.text_error.dark1
|
|
159
|
+
},
|
|
160
|
+
warning: {
|
|
161
|
+
main: base.orange[40], // core.text_warning.dark1
|
|
162
|
+
},
|
|
163
|
+
info: {
|
|
164
|
+
main: base.blue[40], // core.text_info.dark1
|
|
165
|
+
},
|
|
166
|
+
success: {
|
|
167
|
+
main: base.green[40], // core.text_success.dark1
|
|
168
|
+
},
|
|
169
|
+
grey: base.greyForMUI,
|
|
149
170
|
lunit: lunitColors,
|
|
150
171
|
token: {
|
|
151
172
|
core: {
|
|
@@ -169,6 +190,7 @@ const paletteOptions = {
|
|
|
169
190
|
icon_info_02: "var(--icon_info_02)",
|
|
170
191
|
hover: "var(--hover)",
|
|
171
192
|
focused: "var(--focused)",
|
|
193
|
+
selected: "var(--selected)",
|
|
172
194
|
shadow_01: "var(--shadow_01)",
|
|
173
195
|
shadow_02: "var(--shadow_02)",
|
|
174
196
|
shadow_03: "var(--shadow_03)",
|
|
@@ -196,10 +218,7 @@ const paletteOptions = {
|
|
|
196
218
|
selectcontrol_handler_shadow: "var(--selectcontrol_handler_shadow)",
|
|
197
219
|
textfield_bg: "var(--textfield_bg)",
|
|
198
220
|
textfield_border_error: "var(--textfield_border_error)",
|
|
199
|
-
dropdown_option_selected: "var(--dropdown_option_selected)",
|
|
200
221
|
dropdown_divider_border: "var(--dropdown_divider_border)",
|
|
201
|
-
dropdown_option_activatied: "var(--dropdown_option_activatied)",
|
|
202
|
-
datatable_cell_selected: "var(--datatable_cell_selected)",
|
|
203
222
|
datatable_border_01: "var(--datatable_border_01)",
|
|
204
223
|
datatable_border_02: "var(--datatable_border_02)",
|
|
205
224
|
datatable_zebra: "var(--datatable_zebra)",
|
|
@@ -232,4 +251,6 @@ const paletteOptions = {
|
|
|
232
251
|
},
|
|
233
252
|
};
|
|
234
253
|
|
|
254
|
+
export { base };
|
|
255
|
+
|
|
235
256
|
export default paletteOptions;
|