Skip to content

Commit b0ae302

Browse files
martimalekMartí Malek
and
Martí Malek
authored
feat: add missing colors to match Figma file (#289)
* feat: add missing colors to match Figma file * refactor: use semantic colors in Dimming * test: update snapshots to use the color in rgba format Co-authored-by: Martí Malek <[email protected]>
1 parent 1a0eb82 commit b0ae302

File tree

4 files changed

+68
-9
lines changed

4 files changed

+68
-9
lines changed

src/components/Dimming/Dimming.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import styled from 'styled-components';
22

3-
import { Colors, Elevation } from '../../essentials';
3+
import { Elevation, SemanticColors } from '../../essentials';
44

55
const Dimming = styled.div`
6-
background-color: ${Colors.AUTHENTIC_BLUE_1100};
6+
background-color: ${SemanticColors.dialog.dimming};
77
height: 100%;
88
left: 0;
99
opacity: 0.6;

src/components/Modal/__snapshots__/Modal.spec.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ exports[`Modal renders the default props 1`] = `
5555
}
5656
5757
.c0 {
58-
background-color: #000F1F;
58+
background-color: rgba(0,15,31,0.6);
5959
height: 100%;
6060
left: 0;
6161
opacity: 0.6;
@@ -184,7 +184,7 @@ exports[`Modal renders the fullscreen variation 1`] = `
184184
}
185185
186186
.c0 {
187-
background-color: #000F1F;
187+
background-color: rgba(0,15,31,0.6);
188188
height: 100%;
189189
left: 0;
190190
opacity: 0.6;

src/components/Offcanvas/__snapshots__/Offcanvas.spec.tsx.snap

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ exports[`Offcanvas renders the bottom side variation 1`] = `
5959
}
6060
6161
.c0 {
62-
background-color: #000F1F;
62+
background-color: rgba(0,15,31,0.6);
6363
height: 100%;
6464
left: 0;
6565
opacity: 0.6;
@@ -192,7 +192,7 @@ exports[`Offcanvas renders the default props 1`] = `
192192
}
193193
194194
.c0 {
195-
background-color: #000F1F;
195+
background-color: rgba(0,15,31,0.6);
196196
height: 100%;
197197
left: 0;
198198
opacity: 0.6;
@@ -325,7 +325,7 @@ exports[`Offcanvas renders the left side variation 1`] = `
325325
}
326326
327327
.c0 {
328-
background-color: #000F1F;
328+
background-color: rgba(0,15,31,0.6);
329329
height: 100%;
330330
left: 0;
331331
opacity: 0.6;
@@ -458,7 +458,7 @@ exports[`Offcanvas renders the right side variation 1`] = `
458458
}
459459
460460
.c0 {
461-
background-color: #000F1F;
461+
background-color: rgba(0,15,31,0.6);
462462
height: 100%;
463463
left: 0;
464464
opacity: 0.6;
@@ -591,7 +591,7 @@ exports[`Offcanvas renders the top side variation 1`] = `
591591
}
592592
593593
.c0 {
594-
background-color: #000F1F;
594+
background-color: rgba(0,15,31,0.6);
595595
height: 100%;
596596
left: 0;
597597
opacity: 0.6;

src/essentials/Colors/Colors.ts

+59
Original file line numberDiff line numberDiff line change
@@ -216,5 +216,64 @@ export const SemanticColors = {
216216
textDisabledInverted: Colors.AUTHENTIC_BLUE_550,
217217
iconDisabledInverted: Colors.AUTHENTIC_BLUE_550
218218
}
219+
},
220+
forms: {
221+
toggle: {
222+
default: {
223+
slideOff: Colors.WHITE,
224+
slideOn: Colors.WHITE,
225+
frameOff: Colors.AUTHENTIC_BLUE_200,
226+
frameOn: Colors.ACTION_BLUE_900
227+
},
228+
error: {
229+
slideOff: Colors.WHITE,
230+
slideOn: Colors.WHITE,
231+
frameOff: Colors.AUTHENTIC_BLUE_200,
232+
frameOn: Colors.NEGATIVE_ORANGE_900
233+
},
234+
disabled: {
235+
slideOff: Colors.AUTHENTIC_BLUE_50,
236+
slideOn: Colors.AUTHENTIC_BLUE_50,
237+
frameOff: Colors.AUTHENTIC_BLUE_50,
238+
frameOn: Colors.AUTHENTIC_BLUE_50
239+
}
240+
},
241+
datePicker: {
242+
calendar: {
243+
border: Colors.AUTHENTIC_BLUE_200,
244+
borderHover: Colors.AUTHENTIC_BLUE_200,
245+
borderRange: Colors.ACTION_BLUE_350,
246+
borderSelected: Colors.ACTION_BLUE_1000,
247+
borderRangeHover: Colors.ACTION_BLUE_350,
248+
background: Colors.WHITE,
249+
backgroundHover: Colors.AUTHENTIC_BLUE_50,
250+
backgroundRange: Colors.ACTION_BLUE_50,
251+
backgroundSelected: Colors.ACTION_BLUE_900,
252+
backgroundRangeHover: Colors.ACTION_BLUE_350
253+
}
254+
}
255+
},
256+
table: {
257+
skeleton: Colors.AUTHENTIC_BLUE_50,
258+
zebraStyles: {
259+
backgroundSecondary: 'rgba(241, 242, 244, 0.4)',
260+
backgroundHover: Colors.ACTION_BLUE_100,
261+
backgroundActive: Colors.ACTION_BLUE_150
262+
},
263+
linesStyles: {
264+
backgroundHover: Colors.ACTION_BLUE_50,
265+
backgroundActive: Colors.ACTION_BLUE_100,
266+
border: Colors.AUTHENTIC_BLUE_200
267+
},
268+
blank: {
269+
backgroundHover: Colors.ACTION_BLUE_50,
270+
backgroundActive: Colors.ACTION_BLUE_100
271+
},
272+
header: {
273+
border: Colors.AUTHENTIC_BLUE_550
274+
}
275+
},
276+
dialog: {
277+
dimming: 'rgba(0, 15, 31, 0.6)'
219278
}
220279
};

0 commit comments

Comments
 (0)