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;
-};