-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(css): remove dependency on EUI components and use only EUI styles (…
…#208) Remove the dependency on EUI components. The code now use only some sass styles/mixins from EUI library. The compiled code (js and css) is completely free from EUI dependency. All classes are now under .ech prefix. Four css stylesheets are now compiled, two with a reset css and two without, each of them with dark or light theme. lodash is no more a dependency. BREAKING CHANGE: EUI components are removed from this library. The single chart `style.css` stylesheet is now replaced by a `theme_only_light.css` or `theme_only_dark.css` file that brings in all the required styling for chart, tooltip and legends. `theme_light.css` and `theme_dark.css` styles include also a reset CSS style
- Loading branch information
Showing
76 changed files
with
1,702 additions
and
1,454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import '@babel/polyfill'; | ||
import '@elastic/eui/dist/eui_theme_light.css'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import '../src/index.scss'; | ||
import '../src/theme_light.scss'; | ||
import { Playground } from './playgroud'; | ||
|
||
ReactDOM.render(<Playground />, document.getElementById('root') as HTMLElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,31 @@ | ||
.elasticChartsAnnotation { | ||
@include euiFontSizeXS; | ||
.echAnnotation { | ||
pointer-events: none; | ||
position: absolute; | ||
z-index: $euiZLevel9; | ||
max-width: $euiSizeXL * 10; | ||
overflow: hidden; | ||
overflow-wrap: break-word; | ||
transition: opacity $euiAnimSpeedNormal; | ||
user-select: none; | ||
} | ||
|
||
.elasticChartsAnnotation--hidden, .elasticChartsAnnotation__tooltip--hidden { | ||
.echAnnotation--hidden, | ||
.echAnnotation__tooltip--hidden { | ||
opacity: 0; | ||
} | ||
|
||
.elasticChartsAnnotation__tooltip { | ||
@include euiBottomShadow($color: $euiColorFullShade); | ||
.echAnnotation__tooltip { | ||
@include euiToolTipStyle; | ||
@include euiFontSizeXS; | ||
pointer-events: none; | ||
position: absolute; | ||
z-index: $euiZLevel9; | ||
background-color: rgba(tintOrShade($euiColorFullShade, 25%, 80%), 0.9); | ||
color: $euiColorGhost; | ||
border-radius: $euiBorderRadius; | ||
max-width: $euiSizeXL * 10; | ||
overflow: hidden; | ||
overflow-wrap: break-word; | ||
padding: 0; | ||
|
||
// overflow: hidden; | ||
transition: opacity $euiAnimSpeedNormal; | ||
pointer-events: none; | ||
user-select: none; | ||
} | ||
|
||
.elasticChartsAnnotation__header { | ||
margin: 0; | ||
background: rgba(shade($euiColorGhost, 20%), 0.9); | ||
color: $euiColorFullShade; | ||
padding: 0 8px; | ||
.echAnnotation__header { | ||
@include euiToolTipTitle; | ||
padding: $euiSizeXS ($euiSizeXS * 2); | ||
} | ||
|
||
.elasticChartsAnnotation__details { | ||
margin: 0; | ||
padding: 0 8px; | ||
display: flex; | ||
.echAnnotation__details { | ||
padding: $euiSizeXS ($euiSizeXS * 2); | ||
} | ||
|
||
.elasticChartsAnnotation__detailsMarker { | ||
margin-right: 4px; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* The Base Elastic-Charts container | ||
*/ | ||
|
||
.echContainer { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
|
||
&:hover { | ||
.echLegend__toggle { | ||
opacity: 1; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
.elasticChartsCrosshair { | ||
.echCrosshair, | ||
.echCrosshair__band, | ||
.echCrosshair__line { | ||
position: absolute; | ||
pointer-events: none; | ||
} | ||
|
||
.elasticChartsCrosshair__band { | ||
position: absolute; | ||
pointer-events: none; | ||
} | ||
|
||
.elasticChartsCrosshair__line { | ||
position: absolute; | ||
pointer-events: none; | ||
.echCrosshair__line { | ||
z-index: $euiZLevel8; | ||
background: 'transparent'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.elasticChartsHighlighter { | ||
.echHighlighter { | ||
position: absolute; | ||
z-index: 1000; | ||
pointer-events: none; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@import '../../node_modules/@elastic/eui/src/components/tool_tip/variables'; | ||
@import '../../node_modules/@elastic/eui/src/components/tool_tip/mixins'; | ||
|
||
@import 'container'; | ||
@import 'annotation'; | ||
@import 'crosshair'; | ||
@import 'highlighter'; | ||
@import 'tooltip'; | ||
|
||
@import 'icons/index'; | ||
@import 'legend/index'; |
Oops, something went wrong.