Skip to content

Commit a83dab4

Browse files
authored
chore: migrate to leafygreen palette and use color vars everywhere (#3563)
* remove compassUiColors * replace uiColors with palette * use palette vars in tsx files * replace colors in jsx * use color vars in ts and jsx * use color vars in js * use color vars in ace themes * migrate removed colors * replace transparent colors * replace rgba with vars in less * replace white * reformat * replace colors in tests
1 parent d1e5d27 commit a83dab4

File tree

106 files changed

+554
-506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+554
-506
lines changed

packages/compass-aggregations/src/components/input-preview/input-preview.module.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
flex: none;
2121
border: 1px solid @palette__gray--light-2;
2222
border-radius: 4px;
23-
box-shadow: 1px 1px 4px rgba(0, 30, 43, 0.1);
23+
box-shadow: 1px 1px 4px fade(@palette__black, 10%);
2424
width: 384px;
2525
overflow: scroll;
2626
min-height: 150px;

packages/compass-aggregations/src/components/loading-overlay/loading-overlay.module.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
right: 0;
88
bottom: 0;
99
z-index: 1000;
10-
background-color: rgba(0, 30, 43, 0.08);;
10+
background-color: fade(@palette__black, 8%);;
1111
display: flex;
1212
align-items: center;
1313
justify-content: center;

packages/compass-aggregations/src/components/pipeline-explain/explain-indexes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import {
33
css,
44
spacing,
5-
uiColors,
5+
palette,
66
Accordion,
77
IndexIcon,
88
Badge,
@@ -26,7 +26,7 @@ const accordianContainerStyles = css({
2626
});
2727

2828
const shardStyles = css({
29-
color: uiColors.gray.dark1,
29+
color: palette.gray.dark1,
3030
});
3131

3232
const indexKeyStyles = css({

packages/compass-aggregations/src/components/pipeline-results-workspace/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ErrorSummary,
1010
Subtitle,
1111
Button,
12-
uiColors
12+
palette
1313
} from '@mongodb-js/compass-components';
1414

1515
import type { RootState } from '../../modules';
@@ -71,7 +71,7 @@ const outResult = css({
7171
});
7272

7373
const outResultText = css({
74-
color: uiColors.green.dark2,
74+
color: palette.green.dark2,
7575
textAlign: 'center'
7676
});
7777

packages/compass-aggregations/src/components/pipeline-results-workspace/pipeline-empty-results.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import {
33
css,
44
spacing,
5-
uiColors,
5+
palette,
66
H3,
77
Subtitle,
88
} from '@mongodb-js/compass-components';
@@ -16,7 +16,7 @@ const containerStyles = css({
1616
});
1717

1818
const headingStyles = css({
19-
color: uiColors.green.dark2,
19+
color: palette.green.dark2,
2020
fontWeight: 'normal',
2121
});
2222

packages/compass-aggregations/src/components/pipeline-results-workspace/pipeline-pagination-count.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
spacing,
66
Body,
77
Link,
8-
uiColors,
8+
palette,
99
Tooltip,
1010
SpinLoader,
1111
} from '@mongodb-js/compass-components';
@@ -25,7 +25,7 @@ const countButtonStyles = css({
2525
display: 'inline',
2626
height: spacing[4] + spacing[1],
2727
':focus': {
28-
outline: `${spacing[1]}px auto ${uiColors.focus}`,
28+
outline: `${spacing[1]}px auto ${palette.blue.light1}`,
2929
},
3030
});
3131

packages/compass-aggregations/src/components/pipeline-toolbar/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import { css, cx, spacing, uiColors, withTheme } from '@mongodb-js/compass-components';
2+
import { css, cx, spacing, palette, withTheme } from '@mongodb-js/compass-components';
33
import { connect } from 'react-redux';
44

55
import PipelineHeader from './pipeline-header';
@@ -27,14 +27,14 @@ const headerAndOptionsRowStyles = css({
2727
gridArea: 'headerAndOptionsRow',
2828
border: '1px solid',
2929
borderRadius: '6px',
30-
borderColor: uiColors.gray.light2,
30+
borderColor: palette.gray.light2,
3131
padding: `${spacing[2]}px ${spacing[2]}px ${spacing[2]}px ${spacing[3]}px`,
32-
background: uiColors.white
32+
background: palette.white
3333
});
3434

3535
const headerAndOptionsRowDarkStyles = css({
36-
borderColor: uiColors.gray.dark2,
37-
background: uiColors.gray.dark3,
36+
borderColor: palette.gray.dark2,
37+
background: palette.gray.dark3,
3838
});
3939

4040
const settingsRowStyles = css({

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-options/pipeline-collation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback } from 'react';
22
import { connect } from 'react-redux';
33
import type { ConnectedProps } from 'react-redux';
4-
import { css, cx, Label, spacing, TextInput, uiColors } from '@mongodb-js/compass-components';
4+
import { css, cx, Label, spacing, TextInput, palette } from '@mongodb-js/compass-components';
55

66
import type { RootState } from '../../../modules';
77
import { collationStringChanged } from '../../../modules/collation-string';
@@ -33,7 +33,7 @@ const inputStyles = css({
3333

3434
const inputWithErrorStyles = css({
3535
input: {
36-
borderColor: uiColors.red.base,
36+
borderColor: palette.red.base,
3737
},
3838
});
3939

packages/compass-aggregations/src/components/pipeline/pipeline.module.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import (reference) "mongodb-compass/src/app/styles/index.less";
2+
13
.pipeline {
24
display: flex;
35
flex-grow: 1;
@@ -9,8 +11,8 @@
911

1012
&-collation-toolbar-container {
1113
padding: 6px 10px 6px 15px;
12-
border-bottom: 1px solid rgba(0, 30, 43, 0.2);
13-
box-shadow: 1px 1px 3px rgba(0, 30, 43, 0.4);
14+
border-bottom: 1px solid fade(@palette__black, 20%);
15+
box-shadow: 1px 1px 3px fade(@palette__black, 40%);
1416
}
1517

1618
&-error-banner-container {

packages/compass-aggregations/src/components/saved-pipelines/saved-pipelines.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
IconButton,
55
css,
66
spacing,
7-
uiColors,
7+
palette,
88
Body,
99
withTheme
1010
} from '@mongodb-js/compass-components';
@@ -24,11 +24,11 @@ const toolbarTitleStyles = css({
2424
});
2525

2626
const titleStylesDark = css({
27-
color: uiColors.green.light2,
27+
color: palette.green.light2,
2828
});
2929

3030
const titleStylesLight = css({
31-
color: uiColors.green.dark2,
31+
color: palette.green.dark2,
3232
});
3333

3434
const toolbarStyles = css({

0 commit comments

Comments
 (0)