@lunit/design-system 2.1.0 → 2.2.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 +1 -1
- package/README.md +22 -21
- 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/Checkbox/index.js +1 -1
- package/dist/cjs/components/Checkbox/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/DataTable/index.js.map +1 -1
- package/dist/cjs/components/DatePicker/index.js.map +1 -1
- package/dist/cjs/components/Dialog/index.js +1 -1
- package/dist/cjs/components/Dialog/index.js.map +1 -1
- package/dist/cjs/components/Dropdown/index.js +1 -1
- package/dist/cjs/components/Dropdown/index.js.map +1 -1
- package/dist/cjs/components/FormLabel/index.js +1 -1
- package/dist/cjs/components/FormLabel/index.js.map +1 -1
- package/dist/cjs/components/Radio/index.js +1 -1
- package/dist/cjs/components/Radio/index.js.map +1 -1
- package/dist/cjs/components/RadioGroup/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/Toggle/index.js +1 -1
- package/dist/cjs/components/Toggle/index.js.map +1 -1
- package/dist/cjs/components/ToggleButton/index.js +1 -1
- package/dist/cjs/components/ToggleButton/index.js.map +1 -1
- package/dist/cjs/components/Tooltip/index.js.map +1 -1
- package/dist/cjs/components/Typography/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 +8 -8
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Alert/Alert.styled.js +26 -26
- package/dist/components/Alert/Alert.styled.js.map +1 -1
- package/dist/components/Alert/Alert.utils.js +9 -9
- package/dist/components/Alert/Alert.utils.js.map +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Button/Button.js +23 -17
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.styled.js +88 -88
- package/dist/components/Button/Button.styled.js.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js +9 -9
- package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js.map +1 -1
- package/dist/components/Button/utils/getHoverStyle.js +1 -1
- package/dist/components/Button/utils/getHoverStyle.js.map +1 -1
- package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js +6 -12
- package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +9 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Chip/Chip.js +29 -26
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/Chip.styled.js +52 -52
- package/dist/components/Chip/Chip.styled.js.map +1 -1
- package/dist/components/Chip/consts.js +5 -5
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DataTable/index.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Dialog/Dialog.js +18 -18
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.styled.js +90 -90
- package/dist/components/Dialog/Dialog.styled.js.map +1 -1
- package/dist/components/Dialog/components/DialogAction.js +6 -6
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +23 -21
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.styled.js +85 -86
- package/dist/components/Dropdown/Dropdown.styled.js.map +1 -1
- package/dist/components/Dropdown/DropdownItem.js +14 -14
- package/dist/components/Dropdown/DropdownItem.js.map +1 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/FormLabel/FormLabel.js +1 -1
- package/dist/components/FormLabel/FormLabel.styled.js +2 -2
- package/dist/components/FormLabel/FormLabel.styled.js.map +1 -1
- package/dist/components/FormLabel/index.js +1 -1
- package/dist/components/Radio/Radio.js +8 -8
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/TextField/TextField.js +8 -8
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.style.js +112 -112
- package/dist/components/TextField/TextField.style.js.map +1 -1
- package/dist/components/TextField/TextFieldIcon.js +2 -2
- package/dist/components/TextField/TextFieldIcon.js.map +1 -1
- package/dist/components/TextField/index.js +1 -1
- package/dist/components/Toast/Toast.js +13 -13
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.styled.js +26 -26
- package/dist/components/Toast/Toast.utils.js +3 -3
- package/dist/components/Toast/Toast.utils.js.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toggle/Toggle.js +3 -4
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Toggle/Toggle.styled.js +30 -30
- package/dist/components/Toggle/Toggle.styled.js.map +1 -1
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +6 -6
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.styled.js +20 -20
- package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
- package/dist/components/ToggleButton/index.js +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -2
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
- package/dist/components/ToggleButtonGroup/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/Typography.js.map +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/foundation/Elevation/index.js +27 -27
- package/dist/foundation/Elevation/utils.js +1 -1
- package/dist/foundation/Elevation/utils.js.map +1 -1
- package/dist/foundation/Typography/index.js +35 -35
- package/dist/foundation/Typography/index.js.map +1 -1
- package/dist/foundation/Typography/tokens.js +136 -136
- package/dist/foundation/Typography/tokens.js.map +1 -1
- package/dist/foundation/colors/base/blue.js +12 -12
- package/dist/foundation/colors/base/green.js +12 -12
- package/dist/foundation/colors/base/grey.js +28 -28
- package/dist/foundation/colors/base/index.js +11 -11
- package/dist/foundation/colors/base/lunitGreen.js +11 -11
- package/dist/foundation/colors/base/lunitTeal.js +12 -12
- package/dist/foundation/colors/base/magenta.js +12 -12
- package/dist/foundation/colors/base/opacity.js +4 -4
- package/dist/foundation/colors/base/orange.js +12 -12
- package/dist/foundation/colors/base/purple.js +12 -12
- package/dist/foundation/colors/base/red.js +12 -12
- package/dist/foundation/colors/base/yellow.js +12 -12
- package/dist/foundation/colors/index.js +119 -121
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/foundation/colors/token/component.js +184 -212
- package/dist/foundation/colors/token/component.js.map +1 -1
- package/dist/foundation/colors/token/core.js +112 -133
- package/dist/foundation/colors/token/core.js.map +1 -1
- package/dist/foundation/colors/token/index.js +2 -2
- package/dist/foundation/index.js +5 -5
- package/dist/index.js +20 -20
- package/dist/theme.js +6 -6
- package/dist/types/components/Alert/Alert.d.ts +2 -2
- package/dist/types/components/Alert/Alert.styled.d.ts +1 -2
- package/dist/types/components/Alert/Alert.types.d.ts +2 -2
- package/dist/types/components/Alert/Alert.utils.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +249 -265
- package/dist/types/components/Button/Button.types.d.ts +16 -16
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/utils/getButtonPaddingBySizeAndKind.d.ts +4 -4
- package/dist/types/components/Button/utils/getHoverStyle.d.ts +2 -1
- package/dist/types/components/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +4 -4
- package/dist/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Chip/Chip.styled.d.ts +6 -79
- package/dist/types/components/Chip/Chip.types.d.ts +15 -14
- package/dist/types/components/Chip/index.d.ts +1 -1
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +11 -11
- package/dist/types/components/Dialog/Dialog.styled.d.ts +3 -4
- package/dist/types/components/Dialog/components/DialogAction.d.ts +2 -2
- package/dist/types/components/Dialog/index.d.ts +2 -2
- package/dist/types/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/types/components/Dropdown/Dropdown.styled.d.ts +4 -39
- package/dist/types/components/Dropdown/Dropdown.types.d.ts +5 -5
- package/dist/types/components/Dropdown/DropdownItem.d.ts +3 -3
- package/dist/types/components/Dropdown/index.d.ts +3 -3
- package/dist/types/components/FormLabel/FormLabel.d.ts +1 -1
- package/dist/types/components/FormLabel/index.d.ts +1 -1
- package/dist/types/components/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +2 -2
- package/dist/types/components/TextField/TextField.style.d.ts +3 -4
- package/dist/types/components/TextField/TextField.types.d.ts +6 -6
- package/dist/types/components/TextField/TextFieldIcon.d.ts +2 -2
- package/dist/types/components/TextField/index.d.ts +2 -2
- package/dist/types/components/Toast/Toast.d.ts +2 -2
- package/dist/types/components/Toast/Toast.types.d.ts +3 -3
- package/dist/types/components/Toast/Toast.utils.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +2 -2
- package/dist/types/components/Toggle/Toggle.d.ts +1 -1
- package/dist/types/components/Toggle/Toggle.styled.d.ts +2 -2
- package/dist/types/components/Toggle/Toggle.types.d.ts +3 -3
- package/dist/types/components/Toggle/index.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -34
- package/dist/types/components/ToggleButton/ToggleButton.types.d.ts +10 -10
- package/dist/types/components/ToggleButton/index.d.ts +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/dist/types/components/ToggleButtonGroup/index.d.ts +1 -1
- package/dist/types/components/Tooltip/index.d.ts +1 -1
- package/dist/types/components/Typography/Typography.d.ts +6 -6
- package/dist/types/components/Typography/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/foundation/Elevation/index.d.ts +22 -22
- package/dist/types/foundation/Typography/index.d.ts +78 -78
- package/dist/types/foundation/Typography/tokens.d.ts +69 -69
- package/dist/types/foundation/colors/base/index.d.ts +11 -11
- package/dist/types/foundation/colors/index.d.ts +13 -20
- package/dist/types/foundation/colors/token/component.d.ts +1 -1
- package/dist/types/foundation/colors/token/core.d.ts +1 -1
- package/dist/types/foundation/colors/token/index.d.ts +2 -2
- package/dist/types/foundation/colors/types.d.ts +0 -7
- package/dist/types/foundation/index.d.ts +4 -11
- package/dist/types/foundation/spacing.d.ts +1 -1
- package/dist/types/index.d.ts +20 -20
- package/dist/types/theme.d.ts +1 -1
- package/package.json +22 -26
- package/src/components/Alert/Alert.styled.ts +39 -49
- package/src/components/Alert/Alert.tsx +10 -16
- package/src/components/Alert/Alert.types.ts +2 -2
- package/src/components/Alert/Alert.utils.ts +13 -22
- package/src/components/Alert/index.ts +1 -1
- package/src/components/Button/Button.styled.ts +98 -101
- package/src/components/Button/Button.tsx +71 -69
- package/src/components/Button/Button.types.ts +19 -21
- package/src/components/Button/index.ts +1 -1
- package/src/components/Button/utils/getButtonPaddingBySizeAndKind.ts +13 -13
- package/src/components/Button/utils/getHoverStyle.ts +4 -2
- package/src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts +10 -19
- package/src/components/Checkbox/Checkbox.tsx +13 -25
- package/src/components/Checkbox/index.ts +1 -1
- package/src/components/Chip/Chip.styled.ts +69 -72
- package/src/components/Chip/Chip.tsx +33 -55
- package/src/components/Chip/Chip.types.ts +18 -24
- package/src/components/Chip/consts.ts +5 -5
- package/src/components/Chip/index.ts +1 -1
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/DataTable/index.ts +1 -1
- package/src/components/DatePicker/DatePicker.tsx +2 -2
- package/src/components/DatePicker/index.ts +1 -1
- package/src/components/Dialog/Dialog.styled.ts +112 -114
- package/src/components/Dialog/Dialog.tsx +41 -46
- package/src/components/Dialog/components/DialogAction.tsx +8 -8
- package/src/components/Dialog/index.ts +3 -3
- package/src/components/Dropdown/Dropdown.styled.tsx +88 -89
- package/src/components/Dropdown/Dropdown.tsx +29 -30
- package/src/components/Dropdown/Dropdown.types.ts +6 -5
- package/src/components/Dropdown/DropdownItem.tsx +18 -29
- package/src/components/Dropdown/index.ts +3 -7
- package/src/components/FormLabel/FormLabel.styled.ts +3 -3
- package/src/components/FormLabel/FormLabel.tsx +3 -3
- package/src/components/FormLabel/index.ts +1 -1
- package/src/components/Radio/Radio.tsx +12 -29
- package/src/components/Radio/index.ts +1 -1
- package/src/components/RadioGroup/index.ts +1 -1
- package/src/components/TextField/TextField.style.ts +123 -132
- package/src/components/TextField/TextField.tsx +50 -62
- package/src/components/TextField/TextField.types.ts +7 -8
- package/src/components/TextField/TextFieldIcon.tsx +4 -7
- package/src/components/TextField/index.ts +2 -2
- package/src/components/Toast/Toast.styled.ts +26 -26
- package/src/components/Toast/Toast.tsx +14 -28
- package/src/components/Toast/Toast.types.ts +3 -8
- package/src/components/Toast/Toast.utils.ts +5 -8
- package/src/components/Toast/index.tsx +2 -2
- package/src/components/Toggle/Toggle.styled.ts +31 -32
- package/src/components/Toggle/Toggle.tsx +5 -11
- package/src/components/Toggle/Toggle.types.ts +3 -3
- package/src/components/Toggle/index.ts +1 -1
- package/src/components/ToggleButton/ToggleButton.styled.ts +47 -49
- package/src/components/ToggleButton/ToggleButton.tsx +91 -97
- package/src/components/ToggleButton/ToggleButton.types.ts +10 -10
- package/src/components/ToggleButton/index.ts +1 -1
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +3 -8
- package/src/components/ToggleButtonGroup/index.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/index.ts +1 -1
- package/src/components/Typography/Typography.tsx +7 -10
- package/src/components/Typography/index.ts +1 -1
- package/src/components/index.ts +2 -2
- package/src/foundation/Elevation/index.ts +27 -27
- package/src/foundation/Elevation/utils.ts +14 -8
- package/src/foundation/Typography/index.ts +58 -57
- package/src/foundation/Typography/tokens.ts +138 -138
- package/src/foundation/colors/base/blue.ts +12 -12
- package/src/foundation/colors/base/green.ts +12 -12
- package/src/foundation/colors/base/grey.ts +28 -28
- package/src/foundation/colors/base/index.ts +11 -11
- package/src/foundation/colors/base/lunitGreen.ts +11 -11
- package/src/foundation/colors/base/lunitTeal.ts +12 -12
- package/src/foundation/colors/base/magenta.ts +12 -12
- package/src/foundation/colors/base/opacity.ts +4 -4
- package/src/foundation/colors/base/orange.ts +12 -12
- package/src/foundation/colors/base/purple.ts +12 -12
- package/src/foundation/colors/base/red.ts +12 -12
- package/src/foundation/colors/base/yellow.ts +12 -12
- package/src/foundation/colors/index.ts +119 -120
- package/src/foundation/colors/token/component.ts +185 -213
- package/src/foundation/colors/token/core.ts +113 -134
- package/src/foundation/colors/token/index.ts +2 -2
- package/src/foundation/colors/types.ts +0 -7
- package/src/foundation/index.ts +8 -8
- package/src/foundation/spacing.ts +1 -1
- package/src/index.ts +20 -20
- package/src/stories/GettingStarted.mdx +9 -15
- package/src/stories/components/Alert/Alert.stories.tsx +39 -46
- package/src/stories/components/Button/BasicButton.stories.tsx +68 -59
- package/src/stories/components/Button/ButtonDocs.mdx +17 -41
- package/src/stories/components/Button/Color.stories.tsx +28 -51
- package/src/stories/components/Button/IconButton.stories.tsx +40 -47
- package/src/stories/components/Button/Kind.stories.tsx +100 -213
- package/src/stories/components/CheckBox/BasicCheckbox.stories.tsx +52 -71
- package/src/stories/components/CheckBox/CheckboxDocs.mdx +6 -6
- package/src/stories/components/Chip/Chip.stories.tsx +75 -75
- package/src/stories/components/Chip/ChipDocs.mdx +12 -13
- package/src/stories/components/DataTable/DataTable.stories.tsx +4 -4
- package/src/stories/components/DatePicker/DatePicker.stories.tsx +4 -4
- package/src/stories/components/Dialog/Dialog.stories.tsx +103 -124
- package/src/stories/components/Dialog/DialogDocs.mdx +7 -13
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +96 -82
- package/src/stories/components/Dropdown/DropdownDocs.mdx +275 -0
- package/src/stories/components/Dropdown/DropdownExamples.stories.tsx +40 -47
- package/src/stories/components/Dropdown/DropdownItem.stories.tsx +113 -98
- package/src/stories/components/SelectControl/RadioGroup.stories.tsx +17 -30
- package/src/stories/components/SelectControl/RadioStatus.stories.tsx +16 -23
- package/src/stories/components/SelectControl/Toggle.stories.tsx +33 -78
- package/src/stories/components/TextField/BasicTextField.stories.tsx +44 -60
- package/src/stories/components/TextField/TextFieldDocs.mdx +8 -12
- package/src/stories/components/TextField/TextFieldMulti.stories.tsx +39 -58
- package/src/stories/components/TextField/TextFieldSingle.stories.tsx +74 -121
- package/src/stories/components/TextField/TextFieldSize.stories.tsx +35 -56
- package/src/stories/components/Toast/Toast.stories.tsx +39 -49
- package/src/stories/components/ToggleButton/Basic.stories.tsx +237 -235
- package/src/stories/components/ToggleButton/ToggleButtonDocs.mdx +10 -14
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +144 -203
- package/src/stories/components/ToggleButton/WithIcon.stories.tsx +87 -107
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +4 -4
- package/src/stories/foundation/Elevation/Elevation.stories.tsx +48 -73
- package/src/stories/foundation/Elevation/styled.ts +3 -3
- package/src/stories/foundation/Typography/Typography.mdx +9 -13
- package/src/stories/foundation/Typography/Typography.stories.tsx +25 -41
- package/src/stories/foundation/Typography/TypographyGroup.tsx +14 -25
- package/src/stories/foundation/Typography/const.ts +13 -19
- package/src/stories/foundation/colors/ColorSystem.tsx +42 -40
- package/src/stories/foundation/colors/Colors.stories.tsx +40 -41
- package/src/stories/foundation/colors/Docs.mdx +73 -77
- package/src/stories/foundation/colors/Mui.stories.tsx +6 -8
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +81 -71
- package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +7 -7
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +23 -49
- package/src/stories/foundation/colors/styled.ts +26 -26
- package/src/theme.ts +6 -6
- package/src/types.d.ts +1 -1
- package/tsconfig.build.json +1 -5
- package/tsconfig.json +0 -1
- package/src/stories/components/ToggleButton/Group.stories.tsx +0 -221
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { grey } from
|
|
1
|
+
import { grey } from './grey';
|
|
2
2
|
|
|
3
3
|
export const purple = {
|
|
4
|
-
5:
|
|
5
|
-
10:
|
|
6
|
-
15:
|
|
7
|
-
20:
|
|
8
|
-
30:
|
|
9
|
-
40:
|
|
10
|
-
50:
|
|
11
|
-
60:
|
|
12
|
-
70:
|
|
13
|
-
80:
|
|
14
|
-
90:
|
|
4
|
+
5: '#F6F2FF',
|
|
5
|
+
10: '#ECE1FF',
|
|
6
|
+
15: '#E1CEFF',
|
|
7
|
+
20: '#D4BBFF',
|
|
8
|
+
30: '#BE95FF',
|
|
9
|
+
40: '#9E6BF0',
|
|
10
|
+
50: '#7E41DA',
|
|
11
|
+
60: '#6B2FC1',
|
|
12
|
+
70: '#5D22B1',
|
|
13
|
+
80: '#441C7E',
|
|
14
|
+
90: '#1D0345',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const purpleText = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { grey } from
|
|
1
|
+
import { grey } from './grey';
|
|
2
2
|
|
|
3
3
|
export const red = {
|
|
4
|
-
5:
|
|
5
|
-
10:
|
|
6
|
-
15:
|
|
7
|
-
20:
|
|
8
|
-
30:
|
|
9
|
-
40:
|
|
10
|
-
50:
|
|
11
|
-
60:
|
|
12
|
-
70:
|
|
13
|
-
80:
|
|
14
|
-
90:
|
|
4
|
+
5: '#FFF1F1',
|
|
5
|
+
10: '#FFE3E4',
|
|
6
|
+
15: '#FFC9CC',
|
|
7
|
+
20: '#FFA1A7',
|
|
8
|
+
30: '#FF7077',
|
|
9
|
+
40: '#FA464F',
|
|
10
|
+
50: '#DA1E28',
|
|
11
|
+
60: '#A2191F',
|
|
12
|
+
70: '#750E13',
|
|
13
|
+
80: '#520408',
|
|
14
|
+
90: '#2E0905',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const redText = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { grey } from
|
|
1
|
+
import { grey } from './grey';
|
|
2
2
|
|
|
3
3
|
export const yellow = {
|
|
4
|
-
5:
|
|
5
|
-
10:
|
|
6
|
-
15:
|
|
7
|
-
20:
|
|
8
|
-
30:
|
|
9
|
-
40:
|
|
10
|
-
50:
|
|
11
|
-
60:
|
|
12
|
-
70:
|
|
13
|
-
80:
|
|
14
|
-
90:
|
|
4
|
+
5: '#FFFEE9',
|
|
5
|
+
10: '#FFFDC6',
|
|
6
|
+
15: '#FFFC9C',
|
|
7
|
+
20: '#FFF870',
|
|
8
|
+
30: '#FEF71C',
|
|
9
|
+
40: '#FFE81B',
|
|
10
|
+
50: '#EACC37',
|
|
11
|
+
60: '#BBA11F',
|
|
12
|
+
70: '#736A03',
|
|
13
|
+
80: '#4C4800',
|
|
14
|
+
90: '#3C3900',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const yellowText = {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// Main module for Foundation > Colors
|
|
2
2
|
|
|
3
|
-
import { PaletteOptions, PaletteColor } from
|
|
4
|
-
import * as base from
|
|
5
|
-
import * as token from
|
|
6
|
-
import { ColorToken } from
|
|
7
|
-
import { ColorTokenValueBySurface } from
|
|
8
|
-
|
|
3
|
+
import { PaletteOptions, PaletteColor } from '@mui/material/styles';
|
|
4
|
+
import * as base from './base';
|
|
5
|
+
import * as token from './token';
|
|
6
|
+
import { ColorToken } from './types';
|
|
7
|
+
import { ColorTokenValueBySurface } from './token/types';
|
|
9
8
|
export type BaseColor = Record<keyof typeof base.blue, PaletteColor>;
|
|
10
9
|
export type GreyColor = Record<keyof typeof base.grey, PaletteColor>;
|
|
11
10
|
|
|
12
|
-
declare module
|
|
11
|
+
declare module '@mui/material/styles' {
|
|
13
12
|
interface PaletteOptions {
|
|
14
13
|
lunit_global?: {
|
|
15
14
|
grey: GreyColor;
|
|
@@ -47,28 +46,32 @@ type ColorKey = keyof typeof base;
|
|
|
47
46
|
|
|
48
47
|
const createCSSVariables = () => {
|
|
49
48
|
const cssVars: { [name: string]: string } = {};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
|
|
50
|
+
for (const color in base) {
|
|
51
|
+
if (Object.prototype.hasOwnProperty.call(base, color)) {
|
|
52
|
+
const baseColors = base[color as ColorKey];
|
|
53
|
+
for (const key in baseColors) {
|
|
54
|
+
if (Object.prototype.hasOwnProperty.call(baseColors, key)) {
|
|
55
|
+
const varName = `--${color}_${key}`;
|
|
56
|
+
cssVars[varName] = baseColors[Number(key) as keyof typeof baseColors];
|
|
57
|
+
}
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
61
|
+
|
|
59
62
|
return cssVars;
|
|
60
63
|
};
|
|
61
64
|
|
|
62
65
|
const createTokenColorVariables = (surface: keyof ColorTokenValueBySurface) => {
|
|
63
66
|
const cssVars: { [name: string]: string } = {};
|
|
64
67
|
|
|
65
|
-
for (
|
|
66
|
-
if (
|
|
68
|
+
for (const coreToken in token.tokenCoreColor) {
|
|
69
|
+
if (Object.prototype.hasOwnProperty.call(token.tokenCoreColor, coreToken)) {
|
|
67
70
|
const varName = `--${coreToken}`;
|
|
68
71
|
const tokenValue = token.tokenCoreColor[coreToken][surface];
|
|
69
72
|
// 현재 tokenValue는 cssVariable과 rgba 값 2종류가 존재함. 이 종류에 따라서 var 사용 여부를 결정해주기 위해 if문을 추가하였으나,
|
|
70
73
|
// 차후 피그마에서 json 파일을 넘겨준 것을 스크립트화하는 작업이 끝나면 if문 자체가 사라질 예정.
|
|
71
|
-
if (tokenValue.charAt(0) ===
|
|
74
|
+
if (tokenValue.charAt(0) === '-') {
|
|
72
75
|
cssVars[varName] = `var(${tokenValue})`;
|
|
73
76
|
} else {
|
|
74
77
|
cssVars[varName] = `${tokenValue}`;
|
|
@@ -76,16 +79,16 @@ const createTokenColorVariables = (surface: keyof ColorTokenValueBySurface) => {
|
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
for (
|
|
80
|
-
if (
|
|
82
|
+
for (const componentGroup in token.tokenComponentColor) {
|
|
83
|
+
if (Object.prototype.hasOwnProperty.call(token.tokenComponentColor, componentGroup)) {
|
|
81
84
|
const componentTokens = token.tokenComponentColor[componentGroup];
|
|
82
85
|
|
|
83
86
|
let tokenName: keyof typeof componentTokens;
|
|
84
87
|
for (tokenName in componentTokens) {
|
|
85
|
-
if (
|
|
88
|
+
if (Object.prototype.hasOwnProperty.call(componentTokens, tokenName)) {
|
|
86
89
|
const varName = `--${tokenName}`;
|
|
87
90
|
const tokenValue = componentTokens[tokenName][surface];
|
|
88
|
-
if (tokenValue.charAt(0) ===
|
|
91
|
+
if (tokenValue.charAt(0) === '-') {
|
|
89
92
|
cssVars[varName] = `var(${tokenValue})`;
|
|
90
93
|
} else {
|
|
91
94
|
cssVars[varName] = `${tokenValue}`;
|
|
@@ -94,45 +97,46 @@ const createTokenColorVariables = (surface: keyof ColorTokenValueBySurface) => {
|
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
}
|
|
100
|
+
|
|
97
101
|
return cssVars;
|
|
98
102
|
};
|
|
99
103
|
|
|
100
104
|
export const createColorCssBaseline = () => {
|
|
101
105
|
return {
|
|
102
|
-
|
|
106
|
+
':root': {
|
|
103
107
|
...createCSSVariables(),
|
|
104
|
-
...createTokenColorVariables(
|
|
108
|
+
...createTokenColorVariables('dark1'),
|
|
105
109
|
},
|
|
106
|
-
|
|
107
|
-
...createTokenColorVariables(
|
|
110
|
+
'.light1': {
|
|
111
|
+
...createTokenColorVariables('light1'),
|
|
108
112
|
},
|
|
109
|
-
|
|
110
|
-
...createTokenColorVariables(
|
|
113
|
+
'.light2': {
|
|
114
|
+
...createTokenColorVariables('light2'),
|
|
111
115
|
},
|
|
112
|
-
|
|
113
|
-
...createTokenColorVariables(
|
|
116
|
+
'.dark1': {
|
|
117
|
+
...createTokenColorVariables('dark1'),
|
|
114
118
|
},
|
|
115
|
-
|
|
116
|
-
...createTokenColorVariables(
|
|
119
|
+
'.dark2': {
|
|
120
|
+
...createTokenColorVariables('dark2'),
|
|
117
121
|
},
|
|
118
122
|
};
|
|
119
123
|
};
|
|
120
124
|
|
|
121
125
|
// TODO: TextColors 삭제하고 관련된 설정 수정하기
|
|
122
126
|
// TODO: opacity 글로벌 팔레트에 추가 여부 확인해서 작업하기
|
|
123
|
-
const lunitColors: PaletteOptions[
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
const lunitColors: PaletteOptions['lunit_global'] = ((): PaletteOptions['lunit_global'] => {
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
|
+
const ret: any = {};
|
|
130
|
+
for (const colorKey in base) {
|
|
131
|
+
if (Object.prototype.hasOwnProperty.call(base, colorKey)) {
|
|
127
132
|
if (base[`${colorKey}Text` as ColorKey]) {
|
|
128
133
|
const baseColors = base[colorKey as ColorKey];
|
|
129
134
|
const textColors = base[`${colorKey}Text` as ColorKey];
|
|
130
135
|
ret[colorKey] = {};
|
|
131
136
|
for (const key in baseColors) {
|
|
132
|
-
if (
|
|
137
|
+
if (Object.prototype.hasOwnProperty.call(baseColors, key)) {
|
|
133
138
|
const color = baseColors[Number(key) as keyof typeof baseColors];
|
|
134
|
-
const textColor =
|
|
135
|
-
textColors[Number(key) as keyof typeof textColors];
|
|
139
|
+
const textColor = textColors[Number(key) as keyof typeof textColors];
|
|
136
140
|
ret[colorKey][Number(key)] = {
|
|
137
141
|
light: color,
|
|
138
142
|
main: color,
|
|
@@ -143,8 +147,10 @@ const lunitColors: PaletteOptions["lunit_global"] =
|
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return ret;
|
|
153
|
+
})();
|
|
148
154
|
|
|
149
155
|
const paletteOptions = {
|
|
150
156
|
primary: {
|
|
@@ -173,89 +179,82 @@ const paletteOptions = {
|
|
|
173
179
|
lunit_global: lunitColors,
|
|
174
180
|
lunit_token: {
|
|
175
181
|
core: {
|
|
176
|
-
bg_01:
|
|
177
|
-
bg_02:
|
|
178
|
-
bg_03:
|
|
179
|
-
layer_01:
|
|
180
|
-
text_primary:
|
|
181
|
-
text_normal:
|
|
182
|
-
text_medium:
|
|
183
|
-
text_light:
|
|
184
|
-
text_error:
|
|
185
|
-
text_success:
|
|
186
|
-
text_warning:
|
|
187
|
-
text_info:
|
|
188
|
-
link_primary:
|
|
189
|
-
link_hover:
|
|
190
|
-
link_visited:
|
|
191
|
-
icon_error_02:
|
|
192
|
-
icon_success_02:
|
|
193
|
-
icon_warning_02:
|
|
194
|
-
icon_info_02:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
shadow_04: "var(--shadow_04)",
|
|
205
|
-
border_light: "var(--border_light)",
|
|
206
|
-
border_medium: "var(--border_medium)",
|
|
182
|
+
bg_01: 'var(--bg_01)',
|
|
183
|
+
bg_02: 'var(--bg_02)',
|
|
184
|
+
bg_03: 'var(--bg_03)',
|
|
185
|
+
layer_01: 'var(--layer_01)',
|
|
186
|
+
text_primary: 'var(--text_primary)',
|
|
187
|
+
text_normal: 'var(--text_normal)',
|
|
188
|
+
text_medium: 'var(--text_medium)',
|
|
189
|
+
text_light: 'var(--text_light)',
|
|
190
|
+
text_error: 'var(--text_error)',
|
|
191
|
+
text_success: 'var(--text_success)',
|
|
192
|
+
text_warning: 'var(--text_warning)',
|
|
193
|
+
text_info: 'var(--text_info)',
|
|
194
|
+
link_primary: 'var(--link_primary)',
|
|
195
|
+
link_hover: 'var(--link_hover)',
|
|
196
|
+
link_visited: 'var(--link_visited)',
|
|
197
|
+
icon_error_02: 'var(--icon_error_02)',
|
|
198
|
+
icon_success_02: 'var(--icon_success_02)',
|
|
199
|
+
icon_warning_02: 'var(--icon_warning_02)',
|
|
200
|
+
icon_info_02: 'var(--icon_info_02)',
|
|
201
|
+
status_hover: 'var(--status_hover)',
|
|
202
|
+
status_focused: 'var(--status_focused)',
|
|
203
|
+
status_selected: 'var(--status_selected)',
|
|
204
|
+
shadow_01: 'var(--shadow_01)',
|
|
205
|
+
shadow_02: 'var(--shadow_02)',
|
|
206
|
+
shadow_03: 'var(--shadow_03)',
|
|
207
|
+
shadow_04: 'var(--shadow_04)',
|
|
208
|
+
border_light: 'var(--border_light)',
|
|
209
|
+
border_medium: 'var(--border_medium)',
|
|
207
210
|
},
|
|
208
211
|
component: {
|
|
209
|
-
btn_primary_bg:
|
|
210
|
-
btn_secondary_bg:
|
|
211
|
-
btn_error_bg:
|
|
212
|
-
btn_primary_border:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
chip_warning_bg: "var(--chip_warning_bg)",
|
|
256
|
-
chip_warning_text: "var(--chip_warning_text)",
|
|
257
|
-
chip_success_bg: "var(--chip_success_bg)",
|
|
258
|
-
chip_success_text: "var(--chip_success_text)",
|
|
212
|
+
btn_primary_bg: 'var(--btn_primary_bg)',
|
|
213
|
+
btn_secondary_bg: 'var(--btn_secondary_bg)',
|
|
214
|
+
btn_error_bg: 'var(--btn_error_bg)',
|
|
215
|
+
btn_primary_border: 'var(--btn_primary_border)',
|
|
216
|
+
btn_primary_text_1: 'var(--btn_primary_text_1)',
|
|
217
|
+
btn_primary_text_2: 'var(--btn_primary_text_2)',
|
|
218
|
+
btn_secondary_text: 'var(--btn_secondary_text)',
|
|
219
|
+
btn_error_text: 'var(--btn_error_text)',
|
|
220
|
+
btn_selected_primary_bg: 'var(--btn_selected_primary_bg)',
|
|
221
|
+
btn_selected_primary_text: 'var(--btn_selected_primary_text)',
|
|
222
|
+
btn_selected_secondary_text: 'var(--btn_selected_secondary_text)',
|
|
223
|
+
btn_selected_tertiary_bg: 'var(--btn_selected_tertiary_bg)',
|
|
224
|
+
btn_selected_tertiary_text: 'var(--btn_selected_tertiary_text)',
|
|
225
|
+
selectcontrol_on: 'var(--selectcontrol_on)',
|
|
226
|
+
selectcontrol_off: 'var(--selectcontrol_off)',
|
|
227
|
+
selectcontrol_handler: 'var(--selectcontrol_handler)',
|
|
228
|
+
selectcontrol_handler_shadow: 'var(--selectcontrol_handler_shadow)',
|
|
229
|
+
textfield_bg: 'var(--textfield_bg)',
|
|
230
|
+
textfield_border_error: 'var(--textfield_border_error)',
|
|
231
|
+
dropdown_divider_border: 'var(--dropdown_divider_border)',
|
|
232
|
+
datatable_zebra: 'var(--datatable_zebra)',
|
|
233
|
+
scrollbars_bg: 'var(--scrollbars_bg)',
|
|
234
|
+
scrollbars_hover: 'var(--scrollbars_hover)',
|
|
235
|
+
scrollbars_pressed: 'var(--scrollbars_pressed)',
|
|
236
|
+
modal_overlay: 'var(--modal_overlay)',
|
|
237
|
+
tooltip_bg: 'var(--tooltip_bg)',
|
|
238
|
+
tooltip_text_normal: 'var(--tooltip_text_normal)',
|
|
239
|
+
tooltip_text_medium: 'var(--tooltip_text_medium)',
|
|
240
|
+
alert_error_bg: 'var(--alert_error_bg)',
|
|
241
|
+
alert_error_border: 'var(--alert_error_border)',
|
|
242
|
+
alert_success_bg: 'var(--alert_success_bg)',
|
|
243
|
+
alert_success_border: 'var(--alert_success_border)',
|
|
244
|
+
alert_info_bg: 'var(--alert_info_bg)',
|
|
245
|
+
alert_info_border: 'var(--alert_info_border)',
|
|
246
|
+
alert_warning_bg: 'var(--alert_warning_bg)',
|
|
247
|
+
alert_warning_border: 'var(--alert_warning_border)',
|
|
248
|
+
chip_primary_bg: 'var(--chip_primary_bg)',
|
|
249
|
+
chip_primary_text: 'var(--chip_primary_text)',
|
|
250
|
+
chip_secondary_bg: 'var(--chip_secondary_bg)',
|
|
251
|
+
chip_secondary_text: 'var(--chip_secondary_text)',
|
|
252
|
+
chip_error_bg: 'var(--chip_error_bg)',
|
|
253
|
+
chip_error_text: 'var(--chip_error_text)',
|
|
254
|
+
chip_warning_bg: 'var(--chip_warning_bg)',
|
|
255
|
+
chip_warning_text: 'var(--chip_warning_text)',
|
|
256
|
+
chip_success_bg: 'var(--chip_success_bg)',
|
|
257
|
+
chip_success_text: 'var(--chip_success_text)',
|
|
259
258
|
},
|
|
260
259
|
},
|
|
261
260
|
};
|