Skip to content

Commit 70aa39a

Browse files
committed
fix: map accentSecondary to success in current theme
1 parent b903199 commit 70aa39a

8 files changed

Lines changed: 53 additions & 49 deletions

File tree

packages/eui/src/components/markdown_editor/__snapshots__/markdown_format.styles.test.ts.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ exports[`euiMarkdownFormat text colors accent 1`] = `
4040
exports[`euiMarkdownFormat text colors accentSecondary 1`] = `
4141
"
4242
.euiMarkdownFormat__blockquote {
43-
border-inline-start-color: #F04E98;
43+
border-inline-start-color: #00BFB3;
4444
}
4545
4646
.euiHorizontalRule {
47-
background-color: #F04E98;
48-
color: #F04E98; /* ensure that firefox gets the currentColor */
47+
background-color: #00BFB3;
48+
color: #00BFB3; /* ensure that firefox gets the currentColor */
4949
}
5050
5151
/* Tables */
@@ -56,20 +56,20 @@ exports[`euiMarkdownFormat text colors accentSecondary 1`] = `
5656
overflow: auto;
5757
border-spacing: 0;
5858
border-collapse: collapse;
59-
border-inline-start: 1px solid #F04E98;
59+
border-inline-start: 1px solid #00BFB3;
6060
}
6161
6262
.euiMarkdownFormat__table th,
6363
.euiMarkdownFormat__table td {
64-
border-block: 1px solid #F04E98;
64+
border-block: 1px solid #00BFB3;
6565
6666
&:last-child {
67-
border-inline-end: 1px solid #F04E98;
67+
border-inline-end: 1px solid #00BFB3;
6868
}
6969
}
7070
7171
.euiMarkdownFormat__table tr {
72-
border-block-start: 1px solid #F04E98;
72+
border-block-start: 1px solid #00BFB3;
7373
}
7474
;label:accentSecondary;"
7575
`;

packages/eui/src/components/progress/__snapshots__/progress.styles.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exports[`euiProgressStyles indeterminate div CSS colors accent 1`] = `
1111
exports[`euiProgressStyles indeterminate div CSS colors accentSecondary 1`] = `
1212
"
1313
&::before {
14-
background-color: #F04E98;
14+
background-color: #00BFB3;
1515
}
1616
;;label:accentSecondary;"
1717
`;
@@ -172,10 +172,10 @@ exports[`euiProgressStyles native progress CSS colors accent 1`] = `
172172
exports[`euiProgressStyles native progress CSS colors accentSecondary 1`] = `
173173
"
174174
&::-webkit-progress-value {
175-
background-color: #F04E98;
175+
background-color: #00BFB3;
176176
}
177177
&::-moz-progress-bar {
178-
background-color: #F04E98;
178+
background-color: #00BFB3;
179179
}
180180
;;label:accentSecondary;"
181181
`;

packages/eui/src/global_styling/mixins/__snapshots__/_button.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ exports[`useEuiButtonColorCSS base 1`] = `
1111
},
1212
"accentSecondary": {
1313
"map": undefined,
14-
"name": "1uoldaz-displaysColorsMap-display-color",
14+
"name": "1j0clgi-displaysColorsMap-display-color",
1515
"next": undefined,
16-
"styles": "color:#a03465;background-color:#fcdcea;;;label:base-accentSecondary;",
16+
"styles": "color:#006c66;background-color:#ccf2f0;;;label:base-accentSecondary;",
1717
"toString": [Function],
1818
},
1919
"danger": {
@@ -72,9 +72,9 @@ exports[`useEuiButtonColorCSS empty 1`] = `
7272
},
7373
"accentSecondary": {
7474
"map": undefined,
75-
"name": "cy4kjs-displaysColorsMap-display-color",
75+
"name": "h2w3e9-displaysColorsMap-display-color",
7676
"next": undefined,
77-
"styles": "color:#a03465;&:focus,&:active{background-color:rgba(240,78,152,0.1);};label:empty-accentSecondary;",
77+
"styles": "color:#006c66;&:focus,&:active{background-color:rgba(0,191,179,0.1);};label:empty-accentSecondary;",
7878
"toString": [Function],
7979
},
8080
"danger": {

packages/eui/src/global_styling/mixins/__snapshots__/_color.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: accent 1`] = `"#feedf5"`;
44

5-
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: accentSecondary 1`] = `"#feedf5"`;
5+
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: accentSecondary 1`] = `"#e6f9f7"`;
66

77
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: as transparent accent 1`] = `"rgba(240,78,152,0.1)"`;
88

9-
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: as transparent accentSecondary 1`] = `"rgba(240,78,152,0.1)"`;
9+
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: as transparent accentSecondary 1`] = `"rgba(0,191,179,0.1)"`;
1010

1111
exports[`useEuiBackgroundColor mixin returns a calculated background version for each color: as transparent danger 1`] = `"rgba(189,39,30,0.1)"`;
1212

@@ -38,7 +38,7 @@ exports[`useEuiBackgroundColor mixin returns a calculated background version for
3838

3939
exports[`useEuiBackgroundColorCSS hook returns an object of Emotion background-color properties for each color: accent 1`] = `"background-color:#feedf5;label:accent;"`;
4040

41-
exports[`useEuiBackgroundColorCSS hook returns an object of Emotion background-color properties for each color: accentSecondary 1`] = `"background-color:#feedf5;label:accentSecondary;"`;
41+
exports[`useEuiBackgroundColorCSS hook returns an object of Emotion background-color properties for each color: accentSecondary 1`] = `"background-color:#e6f9f7;label:accentSecondary;"`;
4242

4343
exports[`useEuiBackgroundColorCSS hook returns an object of Emotion background-color properties for each color: danger 1`] = `"background-color:#f8e9e9;label:danger;"`;
4444

@@ -56,7 +56,7 @@ exports[`useEuiBackgroundColorCSS hook returns an object of Emotion background-c
5656

5757
exports[`useEuiBorderColorCSS hook returns an object of Emotion border-color properties for each color: accent 1`] = `"border-color:#f9b8d6;label:accent;"`;
5858

59-
exports[`useEuiBorderColorCSS hook returns an object of Emotion border-color properties for each color: accentSecondary 1`] = `"border-color:#f9b8d6;label:accentSecondary;"`;
59+
exports[`useEuiBorderColorCSS hook returns an object of Emotion border-color properties for each color: accentSecondary 1`] = `"border-color:#99e5e1;label:accentSecondary;"`;
6060

6161
exports[`useEuiBorderColorCSS hook returns an object of Emotion border-color properties for each color: danger 1`] = `"border-color:#e5a9a5;label:danger;"`;
6262

packages/eui/src/themes/amsterdam/_colors_dark.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $euiColorPlainDark: $euiColorInk;
1313
// Brand
1414
$euiColorPrimary: #36A2EF !default;
1515
$euiColorAccent: #F68FBE !default;
16-
$euiColorAccentSecondary: #F68FBE !default;
16+
$euiColorAccentSecondary: #7DDED8 !default;
1717
$euiColorSuccess: #7DDED8 !default;
1818
$euiColorWarning: #F3D371 !default;
1919
$euiColorDanger: #F86B63 !default;
@@ -87,7 +87,7 @@ $euiColorDisabledText: makeDisabledContrastColor($euiColorDisabled) !default;
8787

8888
$euiColorTextPrimary: $euiColorPrimaryText !default;
8989
$euiColorTextAccent: $euiColorAccentText !default;
90-
$euiColorTextAccentSecondary: $euiColorAccentText !default;
90+
$euiColorTextAccentSecondary: $euiColorSuccessText !default;
9191
$euiColorTextSuccess: $euiColorSuccessText !default;
9292
$euiColorTextWarning: $euiColorWarningText !default;
9393
$euiColorTextDanger: $euiColorDangerText !default;

packages/eui/src/themes/amsterdam/_colors_light.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $euiColorPlainDark: $euiColorInk;
1313
// Brand
1414
$euiColorPrimary: #07C !default;
1515
$euiColorAccent: #F04E98 !default;
16-
$euiColorAccentSecondary: #F04E98 !default;
16+
$euiColorAccentSecondary: #00BFB3 !default;
1717
$euiColorSuccess: #00BFB3 !default;
1818
$euiColorWarning: #FEC514 !default;
1919
$euiColorDanger: #BD271E !default;
@@ -87,7 +87,7 @@ $euiColorDisabledText: makeDisabledContrastColor($euiColorDisabled) !default;
8787

8888
$euiColorTextPrimary: $euiColorPrimaryText !default;
8989
$euiColorTextAccent: $euiColorAccentText !default;
90-
$euiColorTextAccentSecondary: $euiColorAccentText !default;
90+
$euiColorTextAccentSecondary: $euiColorSuccessText !default;
9191
$euiColorTextSuccess: $euiColorSuccessText !default;
9292
$euiColorTextWarning: $euiColorWarningText !default;
9393
$euiColorTextDanger: $euiColorDangerText !default;

packages/eui/src/themes/amsterdam/global_styling/variables/_buttons.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ const _buttons = {
9191
['colors.accent']
9292
),
9393
backgroundEmptyAccentSecondaryHover: computed(
94-
([accent]) => transparentize(accent, 0.1),
95-
['colors.accent']
94+
([success]) => transparentize(success, 0.1),
95+
['colors.success']
9696
),
9797
backgroundEmptySuccessHover: computed(
9898
([success]) => transparentize(success, 0.1),
@@ -120,8 +120,8 @@ const _buttons = {
120120
['colors.accentText']
121121
),
122122
textColorAccentSecondary: computed(
123-
([accentText]) => accentText,
124-
['colors.accentText']
123+
([successText]) => successText,
124+
['colors.successText']
125125
),
126126
textColorSuccess: computed(
127127
([successText]) => successText,
@@ -150,8 +150,12 @@ const _buttons = {
150150
['colors.accent', 'colors.ghost', 'colors.ink']
151151
),
152152
textColorFilledAccentSecondary: computed(
153-
([accent, ghost, ink]) => (isDark(accent) ? ghost : ink),
154-
['colors.accent', 'colors.ghost', 'colors.ink']
153+
([success, ghost, ink]) => {
154+
const background = tint(success, 0.3);
155+
156+
return isDark(background) ? ghost : ink;
157+
},
158+
['colors.success', 'colors.ghost', 'colors.ink']
155159
),
156160
textColorFilledSuccess: computed(
157161
([success, ghost, ink]) => {

packages/eui/src/themes/amsterdam/global_styling/variables/_colors.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
export const brand_colors: _EuiThemeBrandColors = {
4040
primary: '#07C',
4141
accent: '#F04E98',
42-
accentSecondary: '#F04E98',
42+
accentSecondary: '#00BFB3',
4343
success: '#00BFB3',
4444
warning: '#FEC514',
4545
danger: '#BD271E',
@@ -54,7 +54,7 @@ export const brand_text_colors: _EuiThemeBrandTextColors = {
5454

5555
textPrimary: computed(makeHighContrastColor('colors.primary')),
5656
textAccent: computed(makeHighContrastColor('colors.accent')),
57-
textAccentSecondary: computed(makeHighContrastColor('colors.accent')),
57+
textAccentSecondary: computed(makeHighContrastColor('colors.success')),
5858
textSuccess: computed(makeHighContrastColor('colors.success')),
5959
textWarning: computed(makeHighContrastColor('colors.warning')),
6060
textDanger: computed(makeHighContrastColor('colors.danger')),
@@ -107,8 +107,8 @@ export const background_colors: _EuiThemeBackgroundColors = {
107107
['colors.accent']
108108
),
109109
backgroundBaseAccentSecondary: computed(
110-
([accent]) => tint(accent, 0.9),
111-
['colors.accent']
110+
([success]) => tint(success, 0.9),
111+
['colors.success']
112112
),
113113
backgroundBaseSuccess: computed(
114114
([success]) => tint(success, 0.9),
@@ -171,8 +171,8 @@ export const background_colors: _EuiThemeBackgroundColors = {
171171
['colors.accent']
172172
),
173173
backgroundLightAccentSecondary: computed(
174-
([accent]) => tint(accent, 0.8),
175-
['colors.accent']
174+
([success]) => tint(success, 0.8),
175+
['colors.success']
176176
),
177177
backgroundLightSuccess: computed(
178178
([success]) => tint(success, 0.8),
@@ -197,8 +197,8 @@ export const background_colors: _EuiThemeBackgroundColors = {
197197
['colors.accent']
198198
),
199199
backgroundFilledAccentSecondary: computed(
200-
([accent]) => tint(accent, 0.3),
201-
['colors.accent']
200+
([success]) => tint(success, 0.3),
201+
['colors.success']
202202
),
203203
backgroundFilledSuccess: computed(
204204
([success]) => tint(success, 0.3),
@@ -224,8 +224,8 @@ export const transparent_background_colors: _EuiThemeTransparentBackgroundColors
224224
['colors.accent']
225225
),
226226
backgroundTransparentAccentSecondary: computed(
227-
([accent]) => transparentize(accent, 0.1),
228-
['colors.accent']
227+
([success]) => transparentize(success, 0.1),
228+
['colors.success']
229229
),
230230
backgroundTransparentSuccess: computed(
231231
([success]) => transparentize(success, 0.1),
@@ -259,8 +259,8 @@ export const border_colors: _EuiThemeBorderColors = {
259259
['colors.accent']
260260
),
261261
borderBaseAccentSecondary: computed(
262-
([accent]) => tint(accent, 0.6),
263-
['colors.accent']
262+
([success]) => tint(success, 0.6),
263+
['colors.success']
264264
),
265265
borderBaseSuccess: computed(
266266
([success]) => tint(success, 0.6),
@@ -354,8 +354,8 @@ export const dark_background_colors: _EuiThemeBackgroundColors = {
354354
['colors.accent']
355355
),
356356
backgroundBaseAccentSecondary: computed(
357-
([accent]) => shade(accent, 0.8),
358-
['colors.accent']
357+
([success]) => shade(success, 0.8),
358+
['colors.success']
359359
),
360360
backgroundBaseSuccess: computed(
361361
([success]) => shade(success, 0.8),
@@ -418,8 +418,8 @@ export const dark_background_colors: _EuiThemeBackgroundColors = {
418418
['colors.accent']
419419
),
420420
backgroundLightAccentSecondary: computed(
421-
([accent]) => shade(accent, 0.7),
422-
['colors.accent']
421+
([success]) => shade(success, 0.7),
422+
['colors.success']
423423
),
424424
backgroundLightSuccess: computed(
425425
([success]) => shade(success, 0.7),
@@ -441,8 +441,8 @@ export const dark_background_colors: _EuiThemeBackgroundColors = {
441441
backgroundFilledPrimary: computed(([primary]) => primary, ['colors.primary']),
442442
backgroundFilledAccent: computed(([accent]) => accent, ['colors.accent']),
443443
backgroundFilledAccentSecondary: computed(
444-
([accent]) => accent,
445-
['colors.accent']
444+
([success]) => success,
445+
['colors.success']
446446
),
447447
backgroundFilledSuccess: computed(([success]) => success, ['colors.success']),
448448
backgroundFilledWarning: computed(([warning]) => warning, ['colors.warning']),
@@ -469,8 +469,8 @@ export const dark_border_colors: _EuiThemeBorderColors = {
469469
['colors.accent']
470470
),
471471
borderBaseAccentSecondary: computed(
472-
([accent]) => shade(accent, 0.6),
473-
['colors.accent']
472+
([success]) => shade(success, 0.6),
473+
['colors.success']
474474
),
475475
borderBaseSuccess: computed(
476476
([success]) => shade(success, 0.6),
@@ -532,7 +532,7 @@ export const dark_colors_ams: _EuiThemeColorsMode = {
532532
// Brand
533533
primary: '#36A2EF',
534534
accent: '#F68FBE',
535-
accentSecondary: '#F68FBE',
535+
accentSecondary: '#7DDED8',
536536
success: '#7DDED8',
537537
warning: '#F3D371',
538538
danger: '#F86B63',

0 commit comments

Comments
 (0)