Skip to content

Commit

Permalink
feat(styles): eui Amsterdam theme (#1463)
Browse files Browse the repository at this point in the history
migrate to eui amsterdam theme. Changes include:

- slight color differences (copied from eui, since in javascript).
- `:focus` & `:focus-within` states are slightly different, particularly with the legend.
- slight dimensional changes.

BREAKING CHANGE: chart color and style changes
  • Loading branch information
nickofthyme authored Mar 3, 2022
1 parent 6ebdc53 commit fea1445
Show file tree
Hide file tree
Showing 1,125 changed files with 370 additions and 259 deletions.
7 changes: 2 additions & 5 deletions docs/0-Intro/0-Intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ import '@elastic/charts/dist/theme_only_dark.css';
If using Elastic Charts in the same project that is already compiling EUI's Sass (like Kibana), you can import the SASS files directly instead of using the CSS. Just be sure to import Elastic Charts Sass files **after** EUI.

```scss
@import '~@elastic/eui/src/themes/eui/eui_colors_light';
@import '~@elastic/eui/src/global_styling/functions/index';
@import '~@elastic/eui/src/global_styling/variables/index';
@import '~@elastic/eui/src/global_styling/mixins/index';
@import '~@elastic/eui/src/global_styling/reset/index';
@import '~@elastic/eui/src/themes/amsterdam/colors_light';
@import '~@elastic/eui/src/themes/amsterdam/globals';
@import '~@elastic/charts/dist/theme';
```

Expand Down
18 changes: 11 additions & 7 deletions e2e-server/server/generate/vrt_page_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ReactDOM.render(<VRTPage />, document.getElementById('story-root') as HTMLElemen
function pageTemplate(imports, routes, urls) {
return `
import React, { Suspense } from 'react';
import { EuiProvider } from '@elastic/eui';
import { ThemeIdProvider, BackgroundIdProvider } from '../../storybook/use_base_theme';
import { useGlobalsParameters } from '../server/mocks/use_global_parameters';
Expand All @@ -54,6 +55,7 @@ export function VRTPage() {
setParams,
} = useGlobalsParameters();
const urlParams = new URL(window.location.toString()).searchParams;
const colorMode = themeId.includes('light') ? 'light' : 'dark';
${imports.join('\n ')}
const path = urlParams.get('path');
Expand All @@ -70,13 +72,15 @@ export function VRTPage() {
</>);
}
return (
<ThemeIdProvider value={themeId as any}>
<BackgroundIdProvider value={backgroundId}>
<Suspense fallback={<div>Loading...</div>}>
${routes.join('\n ')}
</Suspense>
</BackgroundIdProvider>
</ThemeIdProvider>
<EuiProvider colorMode={colorMode}>
<ThemeIdProvider value={themeId as any}>
<BackgroundIdProvider value={backgroundId}>
<Suspense fallback={<div>Loading...</div>}>
${routes.join('\n ')}
</Suspense>
</BackgroundIdProvider>
</ThemeIdProvider>
</EuiProvider>
);
}
Expand Down
18 changes: 11 additions & 7 deletions integration/server/generate/vrt_page_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ReactDOM.render(<VRTPage />, document.getElementById('story-root') as HTMLElemen
function pageTemplate(imports, routes, urls) {
return `
import React, { Suspense } from 'react';
import { EuiProvider } from '@elastic/eui';
import { ThemeIdProvider, BackgroundIdProvider } from '../../storybook/use_base_theme';
import { useGlobalsParameters } from '../server/mocks/use_global_parameters';
Expand All @@ -54,6 +55,7 @@ export function VRTPage() {
setParams,
} = useGlobalsParameters();
const urlParams = new URL(window.location.toString()).searchParams;
const colorMode = themeId.includes('light') ? 'light' : 'dark';
${imports.join('\n ')}
const path = urlParams.get('path');
Expand All @@ -70,13 +72,15 @@ export function VRTPage() {
</>);
}
return (
<ThemeIdProvider value={themeId as any}>
<BackgroundIdProvider value={backgroundId}>
<Suspense fallback={<div>Loading...</div>}>
${routes.join('\n ')}
</Suspense>
</BackgroundIdProvider>
</ThemeIdProvider>
<EuiProvider colorMode={colorMode}>
<ThemeIdProvider value={themeId as any}>
<BackgroundIdProvider value={backgroundId}>
<Suspense fallback={<div>Loading...</div>}>
${routes.join('\n ')}
</Suspense>
</BackgroundIdProvider>
</ThemeIdProvider>
</EuiProvider>
);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fea1445

Please sign in to comment.