diff --git a/packages/docusaurus-theme/src/components/theme_context/index.tsx b/packages/docusaurus-theme/src/components/theme_context/index.tsx index d1fe2208f15..a9a29193320 100644 --- a/packages/docusaurus-theme/src/components/theme_context/index.tsx +++ b/packages/docusaurus-theme/src/components/theme_context/index.tsx @@ -14,21 +14,17 @@ import { EuiThemeBorealis } from '@elastic/eui-theme-borealis'; import { EuiThemeOverrides } from './theme_overrides'; -const EXPERIMENTAL_THEMES = [ +export const AVAILABLE_THEMES = [ { text: 'Borealis', value: EuiThemeBorealis.key, provider: EuiThemeBorealis, }, -]; - -export const AVAILABLE_THEMES = [ { text: 'Amsterdam', value: EuiThemeAmsterdam.key, provider: EuiThemeAmsterdam, }, - ...EXPERIMENTAL_THEMES, ]; const EUI_COLOR_MODES = ['light', 'dark'] as EuiThemeColorMode[]; diff --git a/packages/docusaurus-theme/src/theme/Navbar/Content/index.tsx b/packages/docusaurus-theme/src/theme/Navbar/Content/index.tsx index 5fcac599372..97b54f518ae 100644 --- a/packages/docusaurus-theme/src/theme/Navbar/Content/index.tsx +++ b/packages/docusaurus-theme/src/theme/Navbar/Content/index.tsx @@ -20,7 +20,6 @@ import { euiTextTruncate, useEuiMemoizedStyles, UseEuiTheme, - isExperimentalThemeEnabled, } from '@elastic/eui'; import { euiFormControlText, @@ -235,7 +234,7 @@ export default function NavbarContent(): JSX.Element { - {isBrowser && isExperimentalThemeEnabled() && ( + {isBrowser && (
diff --git a/packages/docusaurus-theme/src/theme/Navbar/MobileSidebar/Header/index.tsx b/packages/docusaurus-theme/src/theme/Navbar/MobileSidebar/Header/index.tsx index 0e0daa13ed1..b8530f0fcc5 100644 --- a/packages/docusaurus-theme/src/theme/Navbar/MobileSidebar/Header/index.tsx +++ b/packages/docusaurus-theme/src/theme/Navbar/MobileSidebar/Header/index.tsx @@ -10,7 +10,6 @@ import euiVersions from '@site/static/versions.json'; import { VersionSwitcher } from '../../../../components/version_switcher'; import { ThemeSwitcher } from '../../../../components/theme_switcher'; -import { isExperimentalThemeEnabled } from '@elastic/eui/lib/themes/themes'; const getStyles = ({ euiTheme }: UseEuiTheme) => ({ sidebar: css` @@ -66,7 +65,7 @@ export default function NavbarMobileSidebarHeader(): JSX.Element {
{isBrowser && versions && } - {isBrowser && isExperimentalThemeEnabled() && } + {isBrowser && }
diff --git a/packages/eui-theme-borealis/src/index.ts b/packages/eui-theme-borealis/src/index.ts index 23da9cba464..ec94c9b4a42 100644 --- a/packages/eui-theme-borealis/src/index.ts +++ b/packages/eui-theme-borealis/src/index.ts @@ -18,6 +18,8 @@ import { font } from './variables/_typography'; import { focus } from './variables/_states'; import { components } from './variables/_components'; +export { colorVis } from './variables/colors/_colors_vis'; + export const EUI_THEME_BOREALIS_KEY = 'EUI_THEME_BOREALIS'; export const euiThemeBorealis: EuiThemeShape = { diff --git a/packages/eui/.storybook/decorator.tsx b/packages/eui/.storybook/decorator.tsx index d30f8df311d..e11f1ac82ad 100644 --- a/packages/eui/.storybook/decorator.tsx +++ b/packages/eui/.storybook/decorator.tsx @@ -21,21 +21,17 @@ import { EuiThemeColorMode } from '../src/services'; import { EuiProvider, EuiProviderProps } from '../src/components/provider'; import { EuiThemeAmsterdam } from '../src/themes'; -const EXPERIMENTAL_THEMES = [ +export const AVAILABLE_THEMES = [ { text: 'Borealis', value: EuiThemeBorealis.key, provider: EuiThemeBorealis, }, -]; - -export const AVAILABLE_THEMES = [ { text: 'Amsterdam', value: EuiThemeAmsterdam.key, provider: EuiThemeAmsterdam, }, - ...EXPERIMENTAL_THEMES, ]; /** @@ -167,17 +163,14 @@ export const euiProviderDecoratorGlobals: Preview['globalTypes'] = { dynamicTitle: true, }, }, -}; - -export const euiProviderDecoratorGlobalsExperimental = { theme: { description: 'Theme for EuiProvider', - defaultValue: EuiThemeAmsterdam.key, + defaultValue: EuiThemeBorealis.key, toolbar: { title: 'Theme', items: [ - { value: EuiThemeAmsterdam.key, title: 'Amsterdam', icon: 'box' }, { value: EuiThemeBorealis.key, title: 'Borealis', icon: 'box' }, + { value: EuiThemeAmsterdam.key, title: 'Amsterdam', icon: 'box' }, ], dynamicTitle: true, }, diff --git a/packages/eui/.storybook/preview.tsx b/packages/eui/.storybook/preview.tsx index adf24f7f409..475cba632d5 100644 --- a/packages/eui/.storybook/preview.tsx +++ b/packages/eui/.storybook/preview.tsx @@ -37,13 +37,8 @@ setEuiDevProviderWarning('error'); /** * Custom global decorators */ -import { isExperimentalThemeEnabled } from '../src/themes'; import { customJsxDecorator } from './addons/code-snippet/decorators/jsx_decorator'; -import { - EuiProviderDecorator, - euiProviderDecoratorGlobals, - euiProviderDecoratorGlobalsExperimental, -} from './decorator'; +import { EuiProviderDecorator, euiProviderDecoratorGlobals } from './decorator'; const preview: Preview = { decorators: [ @@ -59,12 +54,7 @@ const preview: Preview = { ), ], - globalTypes: isExperimentalThemeEnabled() - ? { - ...euiProviderDecoratorGlobals, - ...euiProviderDecoratorGlobalsExperimental, - } - : { ...euiProviderDecoratorGlobals }, + globalTypes: euiProviderDecoratorGlobals, parameters: { backgrounds: { disable: true }, // Use colorMode instead options: { diff --git a/packages/eui/src-docs/src/components/with_theme/theme_context.tsx b/packages/eui/src-docs/src/components/with_theme/theme_context.tsx index 759c6797385..70a6a96ea8e 100644 --- a/packages/eui/src-docs/src/components/with_theme/theme_context.tsx +++ b/packages/eui/src-docs/src/components/with_theme/theme_context.tsx @@ -3,11 +3,11 @@ import { EUI_THEME_BOREALIS_KEY, EuiThemeBorealis, } from '@elastic/eui-theme-borealis'; + import { - EUI_THEMES, EUI_THEME, AMSTERDAM_NAME_KEY, - isExperimentalThemeEnabled, + EuiThemeAmsterdam, } from '../../../../src/themes'; import { EuiThemeColorModeStandard } from '../../../../src/services'; // @ts-ignore importing from a JS file @@ -34,17 +34,18 @@ const THEME_CSS_MAP = { }, }; -const EXPERIMENTAL_THEMES: EUI_THEME[] = isExperimentalThemeEnabled() - ? [ - { - text: 'Borealis', - value: EuiThemeBorealis.key, - provider: EuiThemeBorealis, - }, - ] - : []; - -export const AVAILABLE_THEMES = [...EUI_THEMES, ...EXPERIMENTAL_THEMES]; +export const AVAILABLE_THEMES = [ + { + text: 'Borealis', + value: EuiThemeBorealis.key, + provider: EuiThemeBorealis, + }, + { + text: 'Amsterdam', + value: AMSTERDAM_NAME_KEY, + provider: EuiThemeAmsterdam, + }, +]; const THEME_NAMES = AVAILABLE_THEMES.map(({ value }) => value); AVAILABLE_THEMES.forEach((theme) => { diff --git a/packages/eui/src/components/avatar/__snapshots__/avatar.test.tsx.snap b/packages/eui/src/components/avatar/__snapshots__/avatar.test.tsx.snap index 0bfea749762..c7439968dc0 100644 --- a/packages/eui/src/components/avatar/__snapshots__/avatar.test.tsx.snap +++ b/packages/eui/src/components/avatar/__snapshots__/avatar.test.tsx.snap @@ -6,7 +6,7 @@ exports[`EuiAvatar allows a name composed entirely of whitespace 1`] = ` class="euiAvatar euiAvatar--m euiAvatar--user testClass1 testClass2 emotion-euiAvatar-user-m-uppercase-euiTestCss" data-test-subj="test subject string" role="img" - style="background-color: rgb(238, 120, 157); color: rgb(0, 0, 0);" + style="background-color: rgb(125, 186, 255); color: rgb(0, 0, 0);" title=" " > diff --git a/packages/eui/src/components/button/button_display/__snapshots__/_button_display_content.test.tsx.snap b/packages/eui/src/components/button/button_display/__snapshots__/_button_display_content.test.tsx.snap index b0e32a19990..2edfef7605c 100644 --- a/packages/eui/src/components/button/button_display/__snapshots__/_button_display_content.test.tsx.snap +++ b/packages/eui/src/components/button/button_display/__snapshots__/_button_display_content.test.tsx.snap @@ -8,7 +8,7 @@ exports[`EuiButtonDisplayContent button icon loading icon renders disabled & loa aria-label="Loading" class="euiLoadingSpinner emotion-euiLoadingSpinner-m" role="progressbar" - style="border-color: #0077cc currentcolor currentcolor currentcolor;" + style="border-color: #1750ba currentcolor currentcolor currentcolor;" /> `; diff --git a/packages/eui/src/components/code/__snapshots__/utils.test.tsx.snap b/packages/eui/src/components/code/__snapshots__/utils.test.tsx.snap index 2b1117b31d9..e2a8e04f353 100644 --- a/packages/eui/src/components/code/__snapshots__/utils.test.tsx.snap +++ b/packages/eui/src/components/code/__snapshots__/utils.test.tsx.snap @@ -12,7 +12,7 @@ exports[`line utils highlightByLine with line numbers renders two elements per l "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 1, }, @@ -65,7 +65,7 @@ exports[`line utils highlightByLine with line numbers renders two elements per l "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -91,7 +91,7 @@ exports[`line utils highlightByLine with line numbers renders two elements per l "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 2, }, @@ -216,7 +216,7 @@ exports[`line utils highlightByLine with line numbers renders two elements per l "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -242,7 +242,7 @@ exports[`line utils highlightByLine with line numbers renders two elements per l "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 3, }, @@ -294,7 +294,7 @@ exports[`line utils highlightByLine with line numbers renders two elements per l "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -325,7 +325,7 @@ exports[`line utils highlightByLine with line numbers with a custom starting num "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 10, }, @@ -378,7 +378,7 @@ exports[`line utils highlightByLine with line numbers with a custom starting num "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -404,7 +404,7 @@ exports[`line utils highlightByLine with line numbers with a custom starting num "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 11, }, @@ -529,7 +529,7 @@ exports[`line utils highlightByLine with line numbers with a custom starting num "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -555,7 +555,7 @@ exports[`line utils highlightByLine with line numbers with a custom starting num "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 12, }, @@ -607,7 +607,7 @@ exports[`line utils highlightByLine with line numbers with a custom starting num "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -638,7 +638,7 @@ exports[`line utils highlightByLine with line numbers with annotations adds a cu "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 1, }, @@ -696,7 +696,7 @@ exports[`line utils highlightByLine with line numbers with annotations adds a cu "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -722,7 +722,7 @@ exports[`line utils highlightByLine with line numbers with annotations adds a cu "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 2, }, @@ -847,7 +847,7 @@ exports[`line utils highlightByLine with line numbers with annotations adds a cu "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -873,7 +873,7 @@ exports[`line utils highlightByLine with line numbers with annotations adds a cu "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 3, }, @@ -925,7 +925,7 @@ exports[`line utils highlightByLine with line numbers with annotations adds a cu "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", @@ -956,7 +956,7 @@ exports[`line utils highlightByLine with line numbers with highlighted lines add "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 1, }, @@ -1009,7 +1009,7 @@ exports[`line utils highlightByLine with line numbers with highlighted lines add "properties": { "className": [ "euiCodeBlock__lineText", - "css-1l6uyoo-euiCodeBlock__lineText-isHighlighted", + "css-yk5w7l-euiCodeBlock__lineText-isHighlighted", ], }, "tagName": "span", @@ -1035,7 +1035,7 @@ exports[`line utils highlightByLine with line numbers with highlighted lines add "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 2, }, @@ -1160,7 +1160,7 @@ exports[`line utils highlightByLine with line numbers with highlighted lines add "properties": { "className": [ "euiCodeBlock__lineText", - "css-1l6uyoo-euiCodeBlock__lineText-isHighlighted", + "css-yk5w7l-euiCodeBlock__lineText-isHighlighted", ], }, "tagName": "span", @@ -1186,7 +1186,7 @@ exports[`line utils highlightByLine with line numbers with highlighted lines add "aria-hidden": true, "className": [ "euiCodeBlock__lineNumber", - "css-19pu25o-euiCodeBlock__lineNumber", + "css-tbmk9f-euiCodeBlock__lineNumber", ], "data-line-number": 3, }, @@ -1238,7 +1238,7 @@ exports[`line utils highlightByLine with line numbers with highlighted lines add "properties": { "className": [ "euiCodeBlock__lineText", - "css-rnrc4n-euiCodeBlock__lineText", + "css-alqp5p-euiCodeBlock__lineText", ], }, "tagName": "span", diff --git a/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap b/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap index 7f6277f2a14..75671e42d32 100644 --- a/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap +++ b/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap @@ -11,7 +11,7 @@ exports[`EuiCollapsibleNavGroup is rendered 1`] = ` exports[`EuiCollapsibleNavGroup props background dark is rendered 1`] = `
`; diff --git a/packages/eui/src/components/color_picker/__snapshots__/color_picker.test.tsx.snap b/packages/eui/src/components/color_picker/__snapshots__/color_picker.test.tsx.snap index c94923514f1..2f06debdd20 100644 --- a/packages/eui/src/components/color_picker/__snapshots__/color_picker.test.tsx.snap +++ b/packages/eui/src/components/color_picker/__snapshots__/color_picker.test.tsx.snap @@ -364,81 +364,81 @@ exports[`EuiColorPicker inline 1`] = ` >
  • diff --git a/packages/eui/src/components/color_picker/color_picker.test.tsx b/packages/eui/src/components/color_picker/color_picker.test.tsx index e4b8726ad71..3d649823c75 100644 --- a/packages/eui/src/components/color_picker/color_picker.test.tsx +++ b/packages/eui/src/components/color_picker/color_picker.test.tsx @@ -254,9 +254,9 @@ describe('EuiColorPicker', () => { fireEvent.click(swatches[0]); expect(onChange).toBeCalled(); expect(onChange).toBeCalledWith(VISUALIZATION_COLORS[0], { - hex: '#54b399', + hex: '#16c5c0', isValid: true, - rgba: [84, 179, 153, 1], + rgba: [22, 197, 192, 1], }); }); diff --git a/packages/eui/src/components/datagrid/body/cell/data_grid_cell.styles.spec.tsx b/packages/eui/src/components/datagrid/body/cell/data_grid_cell.styles.spec.tsx index 4301ed9ae4f..7220aec3e2a 100644 --- a/packages/eui/src/components/datagrid/body/cell/data_grid_cell.styles.spec.tsx +++ b/packages/eui/src/components/datagrid/body/cell/data_grid_cell.styles.spec.tsx @@ -13,8 +13,8 @@ import React from 'react'; import { EuiDataGrid } from '../../data_grid'; -const EXPECTED_HOVER_COLOR = 'rgb(105, 112, 125)'; -const EXPECTED_FOCUS_COLOR = 'rgb(0, 119, 204)'; +const EXPECTED_HOVER_COLOR = 'rgb(90, 109, 140)'; +const EXPECTED_FOCUS_COLOR = 'rgb(11, 100, 221)'; const ANIMATION = { DELAY: 350, DURATION: 150, diff --git a/packages/eui/src/components/form/form.styles.test.tsx b/packages/eui/src/components/form/form.styles.test.tsx index 3c58f55dd4d..755100a6271 100644 --- a/packages/eui/src/components/form/form.styles.test.tsx +++ b/packages/eui/src/components/form/form.styles.test.tsx @@ -27,17 +27,17 @@ describe('euiFormVariables', () => { expect(result.current).toMatchInlineSnapshot(` { "animationTiming": "150ms ease-in", - "appendPrependBackground": "#e9edf3", - "backgroundColor": "#f9fbfd", - "backgroundDisabledColor": "#eef1f7", + "appendPrependBackground": "#ECF1F9", + "backgroundColor": "#FFFFFF", + "backgroundDisabledColor": "#ECF1F9", "backgroundReadOnlyColor": "#FFFFFF", - "borderColor": "rgba(32,38,47,0.1)", + "borderColor": "#CAD3E2", "controlBorderRadius": "6px", "controlBoxShadow": "0 0 transparent", "controlCompressedBorderRadius": "4px", "controlCompressedHeight": "32px", "controlCompressedPadding": "8px", - "controlDisabledColor": "#D3DAE6", + "controlDisabledColor": "#CAD3E2", "controlHeight": "40px", "controlIconSize": { "l": "24px", @@ -50,12 +50,12 @@ describe('euiFormVariables', () => { "controlLayoutGroupInputCompressedHeight": "30px", "controlLayoutGroupInputHeight": "38px", "controlPadding": "12px", - "controlPlaceholderText": "#646a77", + "controlPlaceholderText": "#516381", "iconAffordance": "24px", "iconCompressedAffordance": "18px", "maxWidth": "400px", - "textColor": "#343741", - "textColorDisabled": "#98A2B3", + "textColor": "#1D2A3E", + "textColorDisabled": "#798EAF", } `); }); @@ -65,8 +65,8 @@ describe('euiFormVariables', () => { wrapper: darkModeWrapper, }); // Check custom dark-mode logic - expect(result.current.backgroundColor).toEqual('#16171c'); - expect(result.current.controlPlaceholderText).toEqual('#878b95'); + expect(result.current.backgroundColor).toEqual('#0B1628'); + expect(result.current.controlPlaceholderText).toEqual('#8e9fbc'); }); }); @@ -77,11 +77,11 @@ describe('euiFormControlStyles', () => { { "autoFill": " &:-webkit-autofill { - -webkit-text-fill-color: #343741; - -webkit-box-shadow: inset 0 0 0 1px rgba(0,107,184,0.2), inset 0 0 0 100vw #f0f7fc; + -webkit-text-fill-color: #2B394F; + -webkit-box-shadow: inset 0 0 0 1px #BFDBFF, inset 0 0 0 100vw #E8F1FF; &:invalid { - -webkit-box-shadow: inset 0 0 0 1px #BD271E, inset 0 0 0 100vw #f0f7fc; + -webkit-box-shadow: inset 0 0 0 1px #C61E25, inset 0 0 0 100vw #E8F1FF; } } ", @@ -93,39 +93,39 @@ describe('euiFormControlStyles', () => { border-radius: 4px; ", "disabled": " - color: #98A2B3; + color: #798EAF; /* Required for Safari */ - -webkit-text-fill-color: #98A2B3; - background-color: #eef1f7; - false + -webkit-text-fill-color: #798EAF; + background-color: #ECF1F9; + box-shadow: inset 0 0 0 1px #CAD3E2; cursor: not-allowed; --euiFormControlStateColor: transparent; &::-webkit-input-placeholder { - color: #98A2B3; + color: #798EAF; opacity: 1; } &::-moz-placeholder { - color: #98A2B3; + color: #798EAF; opacity: 1; } &:-ms-input-placeholder { - color: #98A2B3; + color: #798EAF; opacity: 1; } &:-moz-placeholder { - color: #98A2B3; + color: #798EAF; opacity: 1; } &::placeholder { - color: #98A2B3; + color: #798EAF; opacity: 1; } ", "focus": " - --euiFormControlStateColor: #0077CC; + --euiFormControlStateColor: #0B64DD; background-color: #FFFFFF; background-size: 100% 100%; outline: none; /* Remove all outlines and rely on our own bottom border gradient */ @@ -144,13 +144,13 @@ describe('euiFormControlStyles', () => { border-radius: 0; ", "invalid": " - --euiFormControlStateColor: #BD271E; + --euiFormControlStateColor: #C61E25; background-size: 100% 100%; ", "readOnly": " cursor: default; - color: #343741; - -webkit-text-fill-color: #343741; /* Required for Safari */ + color: #1D2A3E; + -webkit-text-fill-color: #1D2A3E; /* Required for Safari */ background-color: #FFFFFF; --euiFormControlStateColor: transparent; @@ -159,35 +159,35 @@ describe('euiFormControlStyles', () => { font-family: 'Inter', BlinkMacSystemFont, Helvetica, Arial, sans-serif; font-size: 1.0000rem; - color: #343741; + color: #1D2A3E; &::-webkit-input-placeholder { - color: #646a77; + color: #516381; opacity: 1; } &::-moz-placeholder { - color: #646a77; + color: #516381; opacity: 1; } &:-ms-input-placeholder { - color: #646a77; + color: #516381; opacity: 1; } &:-moz-placeholder { - color: #646a77; + color: #516381; opacity: 1; } &::placeholder { - color: #646a77; + color: #516381; opacity: 1; } border: none; - box-shadow: inset 0 0 0 1px rgba(32,38,47,0.1); - background-color: #f9fbfd; + box-shadow: inset 0 0 0 1px #CAD3E2; + background-color: #FFFFFF; background-repeat: no-repeat; background-size: 0% 100%; background-image: linear-gradient(to top, @@ -227,28 +227,28 @@ describe('euiFormCustomControlStyles', () => { "disabled": { "selected": " label: disabled; - color: #69707D; - background-color: #D3DAE6; + color: #798EAF; + background-color: #CAD3E2; ", "unselected": " label: disabled; - color: #D3DAE6; - background-color: #D3DAE6; + color: #CAD3E2; + background-color: #CAD3E2; cursor: not-allowed; ", }, "enabled": { "selected": " color: #FFFFFF; - background-color: #0077CC; + background-color: #0B64DD; ", "unselected": " color: transparent; - background-color: #FFFFFF; - border: 1px solid #919296; + background-color: transparent; + border: 1px solid #8E9FBC; &:has(input:focus) { - border-color: #0077CC; + border-color: #0B64DD; } ", }, @@ -261,7 +261,7 @@ describe('euiFormCustomControlStyles', () => { align-items: center; &:has(input:focus-visible) { - outline: 2px solid #0077CC; + outline: 2px solid #0B64DD; outline-offset: 2px; } @@ -291,7 +291,7 @@ describe('euiFormCustomControlStyles', () => { "label": { "disabled": " cursor: not-allowed; - color: #a2abba; + color: #6A7FA0; ", "enabled": " cursor: pointer; diff --git a/packages/eui/src/components/form/range/__snapshots__/dual_range.test.tsx.snap b/packages/eui/src/components/form/range/__snapshots__/dual_range.test.tsx.snap index 9813c324b0d..56b3fd0f847 100644 --- a/packages/eui/src/components/form/range/__snapshots__/dual_range.test.tsx.snap +++ b/packages/eui/src/components/form/range/__snapshots__/dual_range.test.tsx.snap @@ -105,7 +105,7 @@ exports[`EuiDualRange props levels renders levels when levels prop is set 1`] = aria-valuenow="1" class="euiRangeThumb emotion-euiRangeThumb" role="slider" - style="inset-inline-start: 0; background-color: rgb(189, 39, 30);" + style="inset-inline-start: 0; background-color: rgb(198, 30, 37);" tabindex="0" />
    diff --git a/packages/eui/src/components/loading/__snapshots__/loading_spinner.test.tsx.snap b/packages/eui/src/components/loading/__snapshots__/loading_spinner.test.tsx.snap index f5f127e03ee..14f982b53d3 100644 --- a/packages/eui/src/components/loading/__snapshots__/loading_spinner.test.tsx.snap +++ b/packages/eui/src/components/loading/__snapshots__/loading_spinner.test.tsx.snap @@ -6,13 +6,13 @@ exports[`EuiLoadingSpinner custom colors 1`] = ` aria-label="Loading" class="euiLoadingSpinner emotion-euiLoadingSpinner-m" role="progressbar" - style="border-color: #0077cc white white white;" + style="border-color: #1750ba white white white;" /> { ); expect(getByTestSubject('first')).toHaveStyle({ - color: 'rgb(189, 39, 30)', + color: 'rgb(167, 22, 39)', }); expect(getByTestSubject('second')).toHaveStyle({ color: '#ffffff', diff --git a/packages/eui/src/components/overlay_mask/overlay_mask.test.tsx b/packages/eui/src/components/overlay_mask/overlay_mask.test.tsx index 53f3ce617d4..5f9927ff8e1 100644 --- a/packages/eui/src/components/overlay_mask/overlay_mask.test.tsx +++ b/packages/eui/src/components/overlay_mask/overlay_mask.test.tsx @@ -45,7 +45,7 @@ describe('EuiOverlayMask', () => { baseElement.querySelector('.euiOverlayMask')!.className; expect(getClassName()).toMatchInlineSnapshot( - `"euiOverlayMask css-1hzbeld-euiOverlayMask-aboveHeader hello"` + `"euiOverlayMask css-9s0dmo-euiOverlayMask-aboveHeader hello"` ); rerender( @@ -54,7 +54,7 @@ describe('EuiOverlayMask', () => { ); expect(getClassName()).toMatchInlineSnapshot( - `"euiOverlayMask css-1j0pa91-euiOverlayMask-belowHeader world"` + `"euiOverlayMask css-1wv6ei5-euiOverlayMask-belowHeader world"` ); }); diff --git a/packages/eui/src/components/progress/__snapshots__/progress.styles.test.ts.snap b/packages/eui/src/components/progress/__snapshots__/progress.styles.test.ts.snap index 1c09eb950b5..a9791260be2 100644 --- a/packages/eui/src/components/progress/__snapshots__/progress.styles.test.ts.snap +++ b/packages/eui/src/components/progress/__snapshots__/progress.styles.test.ts.snap @@ -3,7 +3,7 @@ exports[`euiProgressStyles indeterminate div CSS colors accent 1`] = ` " &::before { - background-color: #F04E98; + background-color: #BC1E70; } ;;label:accent;" `; @@ -11,7 +11,7 @@ exports[`euiProgressStyles indeterminate div CSS colors accent 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors accentSecondary 1`] = ` " &::before { - background-color: #00BFB3; + background-color: #008B87; } ;;label:accentSecondary;" `; @@ -19,7 +19,7 @@ exports[`euiProgressStyles indeterminate div CSS colors accentSecondary 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors danger 1`] = ` " &::before { - background-color: #BD271E; + background-color: #C61E25; } ;;label:danger;" `; @@ -27,7 +27,7 @@ exports[`euiProgressStyles indeterminate div CSS colors danger 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors primary 1`] = ` " &::before { - background-color: #0077CC; + background-color: #0B64DD; } ;;label:primary;" `; @@ -35,7 +35,7 @@ exports[`euiProgressStyles indeterminate div CSS colors primary 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors subdued 1`] = ` " &::before { - background-color: #646a77; + background-color: #516381; } ;;label:subdued;" `; @@ -43,7 +43,7 @@ exports[`euiProgressStyles indeterminate div CSS colors subdued 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors success 1`] = ` " &::before { - background-color: #00BFB3; + background-color: #008A5E; } ;;label:success;" `; @@ -51,7 +51,7 @@ exports[`euiProgressStyles indeterminate div CSS colors success 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis0 1`] = ` " &::before { - background-color: #54B399; + background-color: #16C5C0; } ;;label:vis0;" `; @@ -59,7 +59,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis0 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis1 1`] = ` " &::before { - background-color: #6092C0; + background-color: #A6EDEA; } ;;label:vis1;" `; @@ -67,7 +67,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis1 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis2 1`] = ` " &::before { - background-color: #D36086; + background-color: #61A2FF; } ;;label:vis2;" `; @@ -75,7 +75,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis2 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis3 1`] = ` " &::before { - background-color: #9170B8; + background-color: #BFDBFF; } ;;label:vis3;" `; @@ -83,7 +83,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis3 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis4 1`] = ` " &::before { - background-color: #CA8EAE; + background-color: #EE72A6; } ;;label:vis4;" `; @@ -91,7 +91,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis4 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis5 1`] = ` " &::before { - background-color: #D6BF57; + background-color: #FFC7DB; } ;;label:vis5;" `; @@ -99,7 +99,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis5 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis6 1`] = ` " &::before { - background-color: #B9A888; + background-color: #F6726A; } ;;label:vis6;" `; @@ -107,7 +107,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis6 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis7 1`] = ` " &::before { - background-color: #DA8B45; + background-color: #FFC9C2; } ;;label:vis7;" `; @@ -115,7 +115,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis7 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis8 1`] = ` " &::before { - background-color: #AA6556; + background-color: #EAAE01; } ;;label:vis8;" `; @@ -123,7 +123,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis8 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors vis9 1`] = ` " &::before { - background-color: #E7664C; + background-color: #FCD883; } ;;label:vis9;" `; @@ -131,7 +131,7 @@ exports[`euiProgressStyles indeterminate div CSS colors vis9 1`] = ` exports[`euiProgressStyles indeterminate div CSS colors warning 1`] = ` " &::before { - background-color: #FEC514; + background-color: #FACB3D; } ;;label:warning;" `; @@ -161,10 +161,10 @@ exports[`euiProgressStyles indeterminate div CSS positions static 1`] = `"positi exports[`euiProgressStyles native progress CSS colors accent 1`] = ` " &::-webkit-progress-value { - background-color: #F04E98; + background-color: #BC1E70; } &::-moz-progress-bar { - background-color: #F04E98; + background-color: #BC1E70; } ;;label:accent;" `; @@ -172,10 +172,10 @@ exports[`euiProgressStyles native progress CSS colors accent 1`] = ` exports[`euiProgressStyles native progress CSS colors accentSecondary 1`] = ` " &::-webkit-progress-value { - background-color: #00BFB3; + background-color: #008B87; } &::-moz-progress-bar { - background-color: #00BFB3; + background-color: #008B87; } ;;label:accentSecondary;" `; @@ -183,10 +183,10 @@ exports[`euiProgressStyles native progress CSS colors accentSecondary 1`] = ` exports[`euiProgressStyles native progress CSS colors danger 1`] = ` " &::-webkit-progress-value { - background-color: #BD271E; + background-color: #C61E25; } &::-moz-progress-bar { - background-color: #BD271E; + background-color: #C61E25; } ;;label:danger;" `; @@ -194,10 +194,10 @@ exports[`euiProgressStyles native progress CSS colors danger 1`] = ` exports[`euiProgressStyles native progress CSS colors primary 1`] = ` " &::-webkit-progress-value { - background-color: #0077CC; + background-color: #0B64DD; } &::-moz-progress-bar { - background-color: #0077CC; + background-color: #0B64DD; } ;;label:primary;" `; @@ -205,10 +205,10 @@ exports[`euiProgressStyles native progress CSS colors primary 1`] = ` exports[`euiProgressStyles native progress CSS colors subdued 1`] = ` " &::-webkit-progress-value { - background-color: #646a77; + background-color: #516381; } &::-moz-progress-bar { - background-color: #646a77; + background-color: #516381; } ;;label:subdued;" `; @@ -216,10 +216,10 @@ exports[`euiProgressStyles native progress CSS colors subdued 1`] = ` exports[`euiProgressStyles native progress CSS colors success 1`] = ` " &::-webkit-progress-value { - background-color: #00BFB3; + background-color: #008A5E; } &::-moz-progress-bar { - background-color: #00BFB3; + background-color: #008A5E; } ;;label:success;" `; @@ -227,10 +227,10 @@ exports[`euiProgressStyles native progress CSS colors success 1`] = ` exports[`euiProgressStyles native progress CSS colors vis0 1`] = ` " &::-webkit-progress-value { - background-color: #54B399; + background-color: #16C5C0; } &::-moz-progress-bar { - background-color: #54B399; + background-color: #16C5C0; } ;;label:vis0;" `; @@ -238,10 +238,10 @@ exports[`euiProgressStyles native progress CSS colors vis0 1`] = ` exports[`euiProgressStyles native progress CSS colors vis1 1`] = ` " &::-webkit-progress-value { - background-color: #6092C0; + background-color: #A6EDEA; } &::-moz-progress-bar { - background-color: #6092C0; + background-color: #A6EDEA; } ;;label:vis1;" `; @@ -249,10 +249,10 @@ exports[`euiProgressStyles native progress CSS colors vis1 1`] = ` exports[`euiProgressStyles native progress CSS colors vis2 1`] = ` " &::-webkit-progress-value { - background-color: #D36086; + background-color: #61A2FF; } &::-moz-progress-bar { - background-color: #D36086; + background-color: #61A2FF; } ;;label:vis2;" `; @@ -260,10 +260,10 @@ exports[`euiProgressStyles native progress CSS colors vis2 1`] = ` exports[`euiProgressStyles native progress CSS colors vis3 1`] = ` " &::-webkit-progress-value { - background-color: #9170B8; + background-color: #BFDBFF; } &::-moz-progress-bar { - background-color: #9170B8; + background-color: #BFDBFF; } ;;label:vis3;" `; @@ -271,10 +271,10 @@ exports[`euiProgressStyles native progress CSS colors vis3 1`] = ` exports[`euiProgressStyles native progress CSS colors vis4 1`] = ` " &::-webkit-progress-value { - background-color: #CA8EAE; + background-color: #EE72A6; } &::-moz-progress-bar { - background-color: #CA8EAE; + background-color: #EE72A6; } ;;label:vis4;" `; @@ -282,10 +282,10 @@ exports[`euiProgressStyles native progress CSS colors vis4 1`] = ` exports[`euiProgressStyles native progress CSS colors vis5 1`] = ` " &::-webkit-progress-value { - background-color: #D6BF57; + background-color: #FFC7DB; } &::-moz-progress-bar { - background-color: #D6BF57; + background-color: #FFC7DB; } ;;label:vis5;" `; @@ -293,10 +293,10 @@ exports[`euiProgressStyles native progress CSS colors vis5 1`] = ` exports[`euiProgressStyles native progress CSS colors vis6 1`] = ` " &::-webkit-progress-value { - background-color: #B9A888; + background-color: #F6726A; } &::-moz-progress-bar { - background-color: #B9A888; + background-color: #F6726A; } ;;label:vis6;" `; @@ -304,10 +304,10 @@ exports[`euiProgressStyles native progress CSS colors vis6 1`] = ` exports[`euiProgressStyles native progress CSS colors vis7 1`] = ` " &::-webkit-progress-value { - background-color: #DA8B45; + background-color: #FFC9C2; } &::-moz-progress-bar { - background-color: #DA8B45; + background-color: #FFC9C2; } ;;label:vis7;" `; @@ -315,10 +315,10 @@ exports[`euiProgressStyles native progress CSS colors vis7 1`] = ` exports[`euiProgressStyles native progress CSS colors vis8 1`] = ` " &::-webkit-progress-value { - background-color: #AA6556; + background-color: #EAAE01; } &::-moz-progress-bar { - background-color: #AA6556; + background-color: #EAAE01; } ;;label:vis8;" `; @@ -326,10 +326,10 @@ exports[`euiProgressStyles native progress CSS colors vis8 1`] = ` exports[`euiProgressStyles native progress CSS colors vis9 1`] = ` " &::-webkit-progress-value { - background-color: #E7664C; + background-color: #FCD883; } &::-moz-progress-bar { - background-color: #E7664C; + background-color: #FCD883; } ;;label:vis9;" `; @@ -337,10 +337,10 @@ exports[`euiProgressStyles native progress CSS colors vis9 1`] = ` exports[`euiProgressStyles native progress CSS colors warning 1`] = ` " &::-webkit-progress-value { - background-color: #FEC514; + background-color: #FACB3D; } &::-moz-progress-bar { - background-color: #FEC514; + background-color: #FACB3D; } ;;label:warning;" `; diff --git a/packages/eui/src/components/provider/provider.tsx b/packages/eui/src/components/provider/provider.tsx index dba42b595ab..003daeb6262 100644 --- a/packages/eui/src/components/provider/provider.tsx +++ b/packages/eui/src/components/provider/provider.tsx @@ -8,6 +8,7 @@ import React, { PropsWithChildren } from 'react'; import type { EmotionCache } from '@emotion/css'; +import { EuiThemeBorealis } from '@elastic/eui-theme-borealis'; import { EuiThemeProvider, @@ -23,7 +24,6 @@ import { EuiGlobalStylesProps, } from '../../global_styling/reset/global_styles'; import { EuiUtilityClasses } from '../../global_styling/utility/utility'; -import { EuiThemeAmsterdam } from '../../themes'; import { EuiCacheProvider } from './cache'; import { EuiSystemColorModeProvider } from './system_color_mode'; @@ -42,7 +42,7 @@ export interface EuiProviderProps EuiGlobalStylesProps, Pick, 'modify'> { /** - * Provide a specific EuiTheme; Defaults to EuiThemeAmsterdam; + * Provide a specific EuiTheme; Defaults to EuiThemeBorealis; * Pass `null` to remove all theming including global reset */ theme?: EuiThemeSystem | null; @@ -91,7 +91,7 @@ export interface EuiProviderProps export const EuiProvider = ({ cache = fallbackCache, - theme = EuiThemeAmsterdam, + theme = EuiThemeBorealis, globalStyles: Globals = EuiGlobalStyles, utilityClasses: Utilities = EuiUtilityClasses, colorMode, diff --git a/packages/eui/src/components/text/__snapshots__/text.styles.test.ts.snap b/packages/eui/src/components/text/__snapshots__/text.styles.test.ts.snap index f4937379d57..861bbbfe080 100644 --- a/packages/eui/src/components/text/__snapshots__/text.styles.test.ts.snap +++ b/packages/eui/src/components/text/__snapshots__/text.styles.test.ts.snap @@ -6,16 +6,16 @@ exports[`euiTextStyles sizes m 1`] = ` line-height: 1.7143rem; h1 { - font-size: 2.4286rem; - line-height: 2.8571rem; + font-size: 2.1429rem; + line-height: 2.5714rem; } h1:not(:last-child) { margin-block-end: 12px; } h2 { - font-size: 1.9286rem; - line-height: 2.2857rem; + font-size: 1.7143rem; + line-height: 2.0000rem; &:not(:first-child) { margin-block-start: 24px; @@ -27,7 +27,7 @@ exports[`euiTextStyles sizes m 1`] = ` } h3 { - font-size: 1.5714rem; + font-size: 1.4286rem; line-height: 1.7143rem; &:not(:first-child) { @@ -128,7 +128,7 @@ exports[`euiTextStyles sizes m 1`] = ` .eui-definitionListReverse dt { font-size: 0.8571rem; - color: #343741; + color: #1D2A3E; } small { @@ -152,7 +152,7 @@ exports[`euiTextStyles sizes m 1`] = ` kbd::after { content: ''; - border-block-end: 1px solid #343741; + border-block-end: 1px solid #1D2A3E; position: absolute; inset-block-end: 2px; inset-inline-start: 0; @@ -167,7 +167,7 @@ exports[`euiTextStyles sizes relative 1`] = ` line-height: 1.5000; h1 { - font-size: 2.125em; + font-size: 1.875em; line-height: 1.2495; } h1:not(:last-child) { @@ -175,7 +175,7 @@ exports[`euiTextStyles sizes relative 1`] = ` } h2 { - font-size: 1.6875em; + font-size: 1.5em; line-height: 1.2495; &:not(:first-child) { @@ -188,7 +188,7 @@ exports[`euiTextStyles sizes relative 1`] = ` } h3 { - font-size: 1.375em; + font-size: 1.25em; line-height: 1.2495; &:not(:first-child) { @@ -289,7 +289,7 @@ exports[`euiTextStyles sizes relative 1`] = ` .eui-definitionListReverse dt { font-size: 0.75em; - color: #343741; + color: #1D2A3E; } small { @@ -313,16 +313,16 @@ exports[`euiTextStyles sizes s 1`] = ` line-height: 1.4286rem; h1 { - font-size: 2.1250rem; - line-height: 2.5714rem; + font-size: 1.8750rem; + line-height: 2.2857rem; } h1:not(:last-child) { margin-block-end: 8px; } h2 { - font-size: 1.6875rem; - line-height: 2.0000rem; + font-size: 1.5000rem; + line-height: 1.7143rem; &:not(:first-child) { margin-block-start: 16px; @@ -334,8 +334,8 @@ exports[`euiTextStyles sizes s 1`] = ` } h3 { - font-size: 1.3750rem; - line-height: 1.7143rem; + font-size: 1.2500rem; + line-height: 1.4286rem; &:not(:first-child) { margin-block-start: 16px; @@ -435,7 +435,7 @@ exports[`euiTextStyles sizes s 1`] = ` .eui-definitionListReverse dt { font-size: 0.7500rem; - color: #343741; + color: #1D2A3E; } small { @@ -459,16 +459,16 @@ exports[`euiTextStyles sizes xs 1`] = ` line-height: 1.1429rem; h1 { - font-size: 1.8214rem; - line-height: 2.2857rem; + font-size: 1.6071rem; + line-height: 2.0000rem; } h1:not(:last-child) { margin-block-end: 4px; } h2 { - font-size: 1.4464rem; - line-height: 1.7143rem; + font-size: 1.2857rem; + line-height: 1.4286rem; &:not(:first-child) { margin-block-start: 8px; @@ -480,7 +480,7 @@ exports[`euiTextStyles sizes xs 1`] = ` } h3 { - font-size: 1.1786rem; + font-size: 1.0714rem; line-height: 1.4286rem; &:not(:first-child) { @@ -581,7 +581,7 @@ exports[`euiTextStyles sizes xs 1`] = ` .eui-definitionListReverse dt { font-size: 0.6429rem; - color: #343741; + color: #1D2A3E; } small { diff --git a/packages/eui/src/components/title/__snapshots__/title.styles.test.ts.snap b/packages/eui/src/components/title/__snapshots__/title.styles.test.ts.snap index 40ab6e813ff..ac0381e41c7 100644 --- a/packages/eui/src/components/title/__snapshots__/title.styles.test.ts.snap +++ b/packages/eui/src/components/title/__snapshots__/title.styles.test.ts.snap @@ -2,54 +2,54 @@ exports[`euiTitle mixin returns a static object of title font properties for each title size l 1`] = ` { - "color": "#1a1c21", - "fontSize": "2.4286rem", - "fontWeight": 700, - "lineHeight": "2.8571rem", + "color": "#111C2C", + "fontSize": "2.1429rem", + "fontWeight": 600, + "lineHeight": "2.5714rem", } `; exports[`euiTitle mixin returns a static object of title font properties for each title size m 1`] = ` { - "color": "#1a1c21", - "fontSize": "1.9286rem", - "fontWeight": 700, - "lineHeight": "2.2857rem", + "color": "#111C2C", + "fontSize": "1.7143rem", + "fontWeight": 600, + "lineHeight": "2.0000rem", } `; exports[`euiTitle mixin returns a static object of title font properties for each title size s 1`] = ` { - "color": "#1a1c21", - "fontSize": "1.5714rem", - "fontWeight": 700, + "color": "#111C2C", + "fontSize": "1.4286rem", + "fontWeight": 600, "lineHeight": "1.7143rem", } `; exports[`euiTitle mixin returns a static object of title font properties for each title size xs 1`] = ` { - "color": "#1a1c21", + "color": "#111C2C", "fontSize": "1.1429rem", - "fontWeight": 700, + "fontWeight": 600, "lineHeight": "1.7143rem", } `; exports[`euiTitle mixin returns a static object of title font properties for each title size xxs 1`] = ` { - "color": "#1a1c21", + "color": "#111C2C", "fontSize": "1.0000rem", - "fontWeight": 700, + "fontWeight": 600, "lineHeight": "1.4286rem", } `; exports[`euiTitle mixin returns a static object of title font properties for each title size xxxs 1`] = ` { - "color": "#1a1c21", + "color": "#111C2C", "fontSize": "0.8571rem", - "fontWeight": 700, + "fontWeight": 600, "lineHeight": "1.1429rem", } `; diff --git a/packages/eui/src/components/token/__snapshots__/token.test.tsx.snap b/packages/eui/src/components/token/__snapshots__/token.test.tsx.snap index a4d0b3b5647..58f8431545c 100644 --- a/packages/eui/src/components/token/__snapshots__/token.test.tsx.snap +++ b/packages/eui/src/components/token/__snapshots__/token.test.tsx.snap @@ -166,7 +166,7 @@ exports[`EuiToken props fill none is rendered 1`] = ` exports[`EuiToken props iconType as EuiTokenMapType tokenAlias is rendered 1`] = ` Nested diff --git a/packages/eui/src/services/theme/context.ts b/packages/eui/src/services/theme/context.ts index d366a2ffba8..a9da267d3ec 100644 --- a/packages/eui/src/services/theme/context.ts +++ b/packages/eui/src/services/theme/context.ts @@ -7,6 +7,8 @@ */ import { createContext } from 'react'; +import { EuiThemeBorealis } from '@elastic/eui-theme-borealis'; + import { EuiThemeColorModeStandard, EuiThemeSystem, @@ -14,16 +16,15 @@ import { EuiThemeComputed, EuiThemeNested, } from './types'; -import { EuiThemeAmsterdam } from '../../themes/amsterdam/theme'; + import { DEFAULT_COLOR_MODE, getComputed } from './utils'; -export const EuiSystemContext = - createContext(EuiThemeAmsterdam); +export const EuiSystemContext = createContext(EuiThemeBorealis); export const EuiModificationsContext = createContext({}); export const EuiColorModeContext = createContext(DEFAULT_COLOR_MODE); export const defaultComputedTheme = getComputed( - EuiThemeAmsterdam, + EuiThemeBorealis, {}, DEFAULT_COLOR_MODE ); diff --git a/packages/eui/src/services/theme/emotion.test.tsx b/packages/eui/src/services/theme/emotion.test.tsx index d2abddc2577..cc8ca8590ba 100644 --- a/packages/eui/src/services/theme/emotion.test.tsx +++ b/packages/eui/src/services/theme/emotion.test.tsx @@ -26,11 +26,11 @@ describe('EuiEmotionThemeProvider', () => { ); - expect(getByTestSubject('consumer')).toHaveStyleRule('color', '#0077CC'); + expect(getByTestSubject('consumer')).toHaveStyleRule('color', '#0B64DD'); expect(container.firstChild).toMatchInlineSnapshot(`
    hello world @@ -62,7 +62,7 @@ describe('EuiEmotionThemeProvider', () => { ); expect(getByTestSubject('consumer')).toHaveStyleRule('color', 'pink'); - expect(getByTestSubject('eui')).toHaveStyleRule('color', '#ba3d76'); + expect(getByTestSubject('eui')).toHaveStyleRule('color', '#A11262'); expect(container).toMatchInlineSnapshot(`
    diff --git a/packages/eui/src/services/theme/provider.test.tsx b/packages/eui/src/services/theme/provider.test.tsx index 43c58ff440e..11c43e37891 100644 --- a/packages/eui/src/services/theme/provider.test.tsx +++ b/packages/eui/src/services/theme/provider.test.tsx @@ -47,7 +47,7 @@ describe('EuiThemeProvider', () => { ); - expect(getByText('Light mode')).toHaveStyleRule('color', '#000000'); + expect(getByText('Light mode')).toHaveStyleRule('color', '#07101F'); expect(getByText('Dark mode')).toHaveStyleRule('color', '#FFFFFF'); expect(getByText('Inverse of light mode')).toHaveStyleRule( 'color', @@ -55,7 +55,7 @@ describe('EuiThemeProvider', () => { ); expect(getByText('Inverse of dark mode')).toHaveStyleRule( 'color', - '#000000' + '#07101F' ); }); }); diff --git a/packages/eui/src/services/theme/provider.tsx b/packages/eui/src/services/theme/provider.tsx index 8ae4e5040d5..b2789f7d6d8 100644 --- a/packages/eui/src/services/theme/provider.tsx +++ b/packages/eui/src/services/theme/provider.tsx @@ -20,7 +20,6 @@ import React, { import { Global, type CSSObject } from '@emotion/react'; import isEqual from 'lodash/isEqual'; -import { EUI_EXPERIMENTAL_THEME_ENABLED_KEY } from '../../themes/themes'; import type { CommonProps } from '../../components/common'; import { cloneElementWithCss } from '../emotion'; import { css, cx } from '../emotion/css'; @@ -137,18 +136,6 @@ export const EuiThemeProvider = ({ : getInitialTheme() ); - // TODO: temp. testing code only, remove once obsolete - useEffect(() => { - if (process.env.NODE_ENV === 'development') { - const isEnabled = - localStorage.getItem(EUI_EXPERIMENTAL_THEME_ENABLED_KEY) != null; - - if (!isEnabled) { - localStorage.setItem(EUI_EXPERIMENTAL_THEME_ENABLED_KEY, 'true'); - } - } - }, []); - useEffect(() => { const newSystem = _system || parentSystem; if (prevSystemKey.current !== newSystem.key) { diff --git a/packages/eui/src/services/theme/style_memoization.test.tsx b/packages/eui/src/services/theme/style_memoization.test.tsx index e393c9c8c87..5b36f8e65bf 100644 --- a/packages/eui/src/services/theme/style_memoization.test.tsx +++ b/packages/eui/src/services/theme/style_memoization.test.tsx @@ -46,7 +46,7 @@ describe('useEuiMemoizedStyles', () => { const { getByRole } = render(); expect(componentStyles).toHaveBeenCalledTimes(1); - expect(getByRole('button')).toHaveStyleRule('color', '#006bb8'); + expect(getByRole('button')).toHaveStyleRule('color', '#1750BA'); fireEvent.click(getByRole('button')); expect(componentStyles).toHaveBeenCalledTimes(1); @@ -59,7 +59,7 @@ describe('useEuiMemoizedStyles', () => { ); expect(componentStyles).toHaveBeenCalledTimes(1); - expect(getByRole('button')).toHaveStyleRule('color', '#006bb8'); + expect(getByRole('button')).toHaveStyleRule('color', '#1750BA'); rerender( @@ -67,7 +67,7 @@ describe('useEuiMemoizedStyles', () => { ); expect(componentStyles).toHaveBeenCalledTimes(2); - expect(getByRole('button')).toHaveStyleRule('color', '#36a2ef'); + expect(getByRole('button')).toHaveStyleRule('color', '#61A2FF'); // Should not recompute styles if no theme changes rerender( @@ -123,7 +123,7 @@ describe('withEuiStylesMemoizer', () => { const { getByRole } = render(); expect(componentStyles).toHaveBeenCalledTimes(1); - expect(getByRole('button')).toHaveStyleRule('color', '#bd271e'); + expect(getByRole('button')).toHaveStyleRule('color', '#A71627'); fireEvent.click(getByRole('button')); expect(componentStyles).toHaveBeenCalledTimes(1); @@ -136,7 +136,7 @@ describe('withEuiStylesMemoizer', () => { ); expect(componentStyles).toHaveBeenCalledTimes(1); - expect(getByRole('button')).toHaveStyleRule('color', '#bd271e'); + expect(getByRole('button')).toHaveStyleRule('color', '#A71627'); rerender( @@ -144,7 +144,7 @@ describe('withEuiStylesMemoizer', () => { ); expect(componentStyles).toHaveBeenCalledTimes(2); - expect(getByRole('button')).toHaveStyleRule('color', '#f86b63'); + expect(getByRole('button')).toHaveStyleRule('color', '#F6726A'); // Should not recompute styles if no theme changes rerender( @@ -192,7 +192,7 @@ describe('RenderWithEuiStylesMemoizer', () => { const { getByRole } = render( />); expect(componentStyles).toHaveBeenCalledTimes(1); - expect(getByRole('button')).toHaveStyleRule('color', '#007871'); + expect(getByRole('button')).toHaveStyleRule('color', '#09724D'); fireEvent.click(getByRole('button')); expect(componentStyles).toHaveBeenCalledTimes(1); @@ -205,7 +205,7 @@ describe('RenderWithEuiStylesMemoizer', () => { ); expect(componentStyles).toHaveBeenCalledTimes(1); - expect(getByRole('button')).toHaveStyleRule('color', '#007871'); + expect(getByRole('button')).toHaveStyleRule('color', '#09724D'); rerender( @@ -213,7 +213,7 @@ describe('RenderWithEuiStylesMemoizer', () => { ); expect(componentStyles).toHaveBeenCalledTimes(2); - expect(getByRole('button')).toHaveStyleRule('color', '#7dded8'); + expect(getByRole('button')).toHaveStyleRule('color', '#24C292'); // Should not recompute styles if no theme changes rerender( diff --git a/packages/eui/src/themes/index.ts b/packages/eui/src/themes/index.ts index a77ffa51ee1..ede8a21fd47 100644 --- a/packages/eui/src/themes/index.ts +++ b/packages/eui/src/themes/index.ts @@ -7,11 +7,6 @@ */ export type { EUI_THEME } from './themes'; -export { - EUI_THEMES, - isDefaultTheme, - isExperimentalThemeEnabled, -} from './themes'; export { AMSTERDAM_NAME_KEY, EuiThemeAmsterdam } from './amsterdam/theme'; diff --git a/packages/eui/src/themes/themes.test.ts b/packages/eui/src/themes/themes.test.ts deleted file mode 100644 index cb8f4533d4a..00000000000 --- a/packages/eui/src/themes/themes.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { isDefaultTheme } from './themes'; - -describe('isDefaultTheme', () => { - it('returns true for the default name', () => { - expect(isDefaultTheme('EUI_THEME_LEGACY')).toBe(false); - expect(isDefaultTheme('EUI_THEME_AMSTERDAM')).toBe(true); - expect(isDefaultTheme('CUSTOM_DEFAULT')).toBe(false); - }); -}); diff --git a/packages/eui/src/themes/themes.ts b/packages/eui/src/themes/themes.ts index 155499a790b..64eb725b410 100644 --- a/packages/eui/src/themes/themes.ts +++ b/packages/eui/src/themes/themes.ts @@ -7,33 +7,9 @@ */ import { EuiThemeSystem } from '../services'; -import { EuiThemeAmsterdam, AMSTERDAM_NAME_KEY } from './amsterdam/theme'; export interface EUI_THEME { text: string; value: string; provider?: EuiThemeSystem; } - -export const EUI_THEMES: EUI_THEME[] = [ - { - text: 'Amsterdam', - value: AMSTERDAM_NAME_KEY, - provider: EuiThemeAmsterdam, - }, -]; - -export const isDefaultTheme = (name: string) => { - return name === AMSTERDAM_NAME_KEY; -}; - -export const EUI_EXPERIMENTAL_THEME_ENABLED_KEY = - 'eui-experimental-theme-enabled'; - -export const isExperimentalThemeEnabled = () => { - if (typeof localStorage !== 'undefined') { - return localStorage.getItem(EUI_EXPERIMENTAL_THEME_ENABLED_KEY) === 'true'; - } - - return false; -};