Skip to content

Commit f9b6d27

Browse files
feat: env keyword highlights (#1015)
* refactor: creatable multi select * refactor: update colors
1 parent 5c89bc1 commit f9b6d27

File tree

3 files changed

+76
-71
lines changed

3 files changed

+76
-71
lines changed

packages/web/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.styled.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,21 @@ export const StyledMultiLabel = styled.div`
3434
padding: 3px 5px;
3535
`;
3636

37-
export const customStyles: (
38-
validation?: boolean,
39-
stylePlaceholderAsValue?: boolean
40-
) => StylesConfig<Option, true, GroupBase<Option>> = (validation = true, stylePlaceholderAsValue = false) => ({
37+
export const customStyles: (stylePlaceholderAsValue?: boolean) => StylesConfig<Option, true, GroupBase<Option>> = (
38+
stylePlaceholderAsValue = false
39+
) => ({
4140
container: styles => ({...styles, width: '100%'}),
4241
input: styles => ({...styles, color: Colors.slate200, fontWeight: 400}),
4342
valueContainer: (styles, props) => ({
4443
...styles,
4544
backgroundColor: props.isDisabled ? 'transparent' : Colors.slate800,
45+
gap: '4px',
4646
}),
4747
placeholder: styles => ({
4848
...styles,
4949
color: stylePlaceholderAsValue ? Colors.slate200 : Colors.slate500,
5050
fontWeight: 400,
5151
}),
52-
control: (styles, props) => ({
53-
...styles,
54-
borderColor: validation ? 'transparent' : Colors.pink500,
55-
backgroundColor: props.isDisabled ? '#1e293b80' : Colors.slate800,
56-
minHeight: '44px',
57-
}),
5852
indicatorSeparator: styles => ({...styles, width: 0}),
5953
dropdownIndicator: styles => ({
6054
...styles,

packages/web/src/components/atoms/CreatableMultiSelect/CreatableMultiSelect.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import usePressEnter from '@hooks/usePressEnter';
66

77
import {Option} from '@models/form';
88

9+
import Colors from '@src/styles/Colors';
10+
911
import {customStyles, customTheme} from './CreatableMultiSelect.styled';
1012
import {
1113
DefaultDropdownIndicator,
@@ -91,7 +93,15 @@ const CreatableMultiSelect: React.FC<MultiSelectProps> = props => {
9193
}}
9294
formatCreateLabel={formatCreateLabel}
9395
theme={customTheme}
94-
styles={customStyles(validation, stylePlaceholderAsValue)}
96+
styles={{
97+
...customStyles(stylePlaceholderAsValue),
98+
control: (styles, p) => ({
99+
...styles,
100+
borderColor: validation ? Colors.pink500 : 'transparent',
101+
backgroundColor: p.isDisabled ? '#1e293b80' : Colors.slate800,
102+
minHeight: '44px',
103+
}),
104+
}}
95105
components={{
96106
Option: CustomOptionComponent,
97107
MultiValueLabel: CustomMultiValueLabelComponent,

packages/web/src/styles/Colors.ts

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,74 @@ enum Colors {
1010
slate600quarteralpha = 'rgba(71,85,105, 0.25)',
1111
slate700 = '#334155',
1212
slate800 = '#1E293B',
13-
slate200halfalpha = 'rgba(226,232,240, 0.5)',
1413
slate800halfalpha = 'rgba(30,41,59, 0.5)',
1514
slate801 = 'rgba(30, 41, 59, 0.5)',
1615
slate800disabled = 'rgba(30, 41, 59, 0.5)',
1716
slate850 = '#0f172a',
1817
slate900 = '#0F172A',
1918
slate950 = '#0b101d',
2019

21-
sky900 = '#0C4A6E',
22-
sky700 = '#0369A1',
23-
sky600 = '#0284C7',
24-
sky500 = '#0EA5E9',
25-
sky400 = '#38BDF8',
20+
sky50 = '#F0F9FF',
21+
sky100 = '#E0F2FE',
22+
sky200 = '#BAE6FD',
2623
sky300 = '#7DD3FC',
24+
sky400 = '#38BDF8',
25+
sky500 = '#0EA5E9',
26+
sky600 = '#0284C7',
27+
sky700 = '#0369A1',
28+
sky800 = '#075985',
29+
sky900 = '#0C4A6E',
2730

28-
pink900 = '#831843',
29-
pink800 = '#9D174D',
30-
pink700 = '#BE185D',
31-
pink600 = '#DB2777',
32-
pink500 = '#EC4899',
33-
pink400 = '#F472B6',
31+
pink50 = '#FDF2F8',
32+
pink100 = '#FCE7F3',
33+
pink200 = '#FBCFE8',
3434
pink300 = '#F9A8D4',
35+
pink400 = '#F472B6',
36+
pink500 = '#EC4899',
37+
pink600 = '#DB2777',
38+
pink700 = '#BE185D',
39+
pink800 = '#9D174D',
40+
pink900 = '#831843',
3541

36-
lime900 = '#365314',
37-
lime700 = '#4D7C0F',
38-
lime600 = '#65A30D',
39-
lime500 = '#84CC16',
40-
lime400 = '#A3E635',
42+
lime50 = '#F7FEE7',
43+
lime100 = '#ECFCCB',
44+
lime200 = '#D9F99D',
4145
lime300 = '#BEF264',
46+
lime400 = '#A3E635',
47+
lime500 = '#84CC16',
48+
lime600 = '#65A30D',
49+
lime700 = '#4D7C0F',
50+
lime800 = '#3F6212',
51+
lime900 = '#365314',
4252

43-
yellow900 = '#713F12',
44-
yellow600 = '#CA8A04',
45-
yellow500 = '#EAB308',
46-
yellow400 = '#FACC15',
53+
yellow50 = '#FEFCE8',
54+
yellow100 = '#FEF9C3',
55+
yellow200 = '#FEF08A',
4756
yellow300 = '#FDE047',
57+
yellow400 = '#FACC15',
58+
yellow500 = '#EAB308',
59+
yellow600 = '#CA8A04',
60+
yellow700 = '#A16207',
61+
yellow800 = '#854D0E',
62+
yellow900 = '#713F12',
4863

49-
cyan900 = '#164E63',
50-
cyan500 = '#06B6D4',
51-
cyan300 = '#67E8F9',
5264
cyan50 = '#ECFEFF',
65+
cyan100 = '#CFFAFE',
66+
cyan200 = '#A5F3FC',
67+
cyan300 = '#67E8F9',
68+
cyan400 = '#22D3EE',
69+
cyan500 = '#06B6D4',
70+
cyan600 = '#0891B2',
71+
cyan700 = '#0E7490',
72+
cyan800 = '#155E75',
73+
cyan900 = '#164E63',
5374

5475
blue500 = '#3b82f6',
76+
blue6 = '#1890FC', // Daybreak Blue
5577

56-
emerald900 = '#064E3B',
57-
emerald700 = '#0F766E',
5878
emerald500 = '#10B981',
79+
emerald700 = '#0F766E',
80+
emerald900 = '#064E3B',
5981

6082
teal300 = '#5eead4',
6183
teal900 = '#164e63',
@@ -71,16 +93,28 @@ enum Colors {
7193
indigo800 = '#3730A3',
7294
indigo900 = '#312e81',
7395

96+
amber50 = '#FFFBEB',
7497
amber100 = '#FEF3C7',
7598
amber200 = '#FDE68A',
7699
amber300 = '#FCD34D',
77100
amber400 = '#fbbf24',
78101
amber500 = '#F59E0B',
79102
amber600 = '#D97706',
103+
amber700 = '#B45309',
80104
amber800 = '#92400E',
81105
amber900 = '#78350F',
82106
amber90099 = '#78350F99',
83107

108+
rose100 = '#FFE4E6',
109+
rose200 = '#FECDD3',
110+
rose300 = '#FDA4AF',
111+
rose400 = '#fb7185',
112+
rose500 = '#F43F5E',
113+
rose600 = '#e11d48',
114+
rose700 = '#be123c',
115+
rose800 = '#9f1239',
116+
rose900 = '#881337',
117+
84118
violet400 = '#a78bfa',
85119
violet800 = '#5B21B6',
86120

@@ -92,60 +126,31 @@ enum Colors {
92126
grey500 = '#C5C8CB',
93127
grey450 = '#DBDBDB',
94128
grey400 = '#DBE0DE',
129+
grey300 = '#E1E6E4',
95130
grey200 = '#F3F5F4',
96131
grey100 = '#F9FAFA',
97132
grey7 = '#7D7D7D', // gray, gray 7 https://www.figma.com/file/3UVW3KVNob7QjgvH62blGU/add-left-and-right-toolbars?node-id=3%3A5926
98-
grey3 = '#262626', // gray, gray 3
99-
greySecondary = '#ADADAD',
100133
greyCode = '#DADADA',
101134
greyBG = '#434343',
102-
greyBGSecondary = '#1d1d1d',
103135

104136
// Notifications
105137
greenOkay = '#09B89D',
106-
greenOkayCompliment = '#B2DFD3',
107138

108-
successGreen = '#94D89C',
109139
errorRed = '#DB539C',
110140
lightGrey = '#DEDEDE',
111141
darkGrey = '#393939',
112142

113143
redError = '#E65A6D',
114-
redErrorCompliment = '#F4BAB8',
115144

116145
whitePure = '#FFFFFF',
117146
blackPure = '#000000',
118-
blackPearl = '#111D2C',
119-
120-
blue6 = '#1890FC', // Daybreak Blue
121-
blue10 = '#B7E3FA',
122147

123148
highlightGreen = '#33BCB7',
124149

125150
purple = '#7984F4',
126-
purpleSecondary = '#4628AF',
127-
128-
selectionGradient = 'linear-gradient(90deg, #3C9AE8 0%, #84E2D8 100%)',
129-
selectionGradientHover = 'linear-gradient(90deg, #3C9AE8 50%, #84E2D8 100%)',
130-
highlightGradient = 'linear-gradient(90deg, #113536 0%, #000000 100%)',
131-
highlightGradientHover = 'linear-gradient(90deg, #113536 50%, #000000 100%)',
132-
diffBackground = '#2B2611',
133-
diffBackgroundHover = '#27220F',
134151

135-
dashboardTableBackground = '#1D1D1D',
136152
greyBorder = '#434343',
137153
greyHover = '#303030',
138-
greyDisabled = '#5A5A5A',
139-
140-
rose100 = '#FFE4E6',
141-
rose200 = '#FECDD3',
142-
rose300 = '#FDA4AF',
143-
rose400 = '#fb7185',
144-
rose500 = '#F43F5E',
145-
rose600 = '#e11d48',
146-
rose700 = '#be123c',
147-
rose800 = '#9f1239',
148-
rose900 = '#881337',
149154
}
150155

151156
export enum BackgroundColors {
@@ -209,8 +214,4 @@ export enum BorderColors {
209214
greyBorder = Colors.darkGrey,
210215
}
211216

212-
const borders = {
213-
greyBorder: `1px solid ${BorderColors.greyBorder}`,
214-
};
215-
216217
export default Colors;

0 commit comments

Comments
 (0)