Skip to content

Commit

Permalink
Merge remote-tracking branch '2_upstream/master' into update-global-d…
Browse files Browse the repository at this point in the history
…ate-picker
  • Loading branch information
cchaos committed Nov 7, 2018
2 parents 54131ae + 99464ed commit 23d5188
Show file tree
Hide file tree
Showing 76 changed files with 38,998 additions and 31,079 deletions.
11 changes: 6 additions & 5 deletions .babelrc → .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
"presets": [
["@babel/env", {
"targets": {
Expand All @@ -8,13 +8,14 @@
"Safari 7" // for PhantomJS support
]
},
"useBuiltIns": "usage"
"useBuiltIns": "usage",
"modules": process.env.BABEL_MODULES ? process.env.BABEL_MODULES : "commonjs" // babel's default is commonjs
}],
"@babel/react"
],
"plugins": [
"pegjs-inline-precompile",
"add-module-exports",
"pegjs-inline-precompile",
"add-module-exports",
[
"react-docgen",
{
Expand All @@ -38,4 +39,4 @@
}
]
]
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ reports/
tmp/
dist/
lib/
es/
.idea
.vscode/
.DS_Store
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `4.8.0`.
**Bug fixes**

- Fixed size of `EuiSuperSelect`'s dropdown menu when there is no initial selection ([#1295](https://github.com/elastic/eui/pull/1295))

## [`5.0.0`](https://github.com/elastic/eui/tree/v5.0.0)

- Added `EuiToken` component ([#1270](https://github.com/elastic/eui/pull/1270))
- Added `beaker` icon to `EuiIcon` and updated the `EuiBetaBadge` styling ([#1291](https://github.com/elastic/eui/pull/1291/))
- Removed calls to deprecated `findDOMNode` ([#1285](https://github.com/elastic/eui/pull/1285))

**Breaking changes**

- Changed `EuiMutationObserver` to a render prop component ([#1285](https://github.com/elastic/eui/pull/1285))
- `EuiPortal` no longer accepts a React node for `insert.sibling` value ([#1285](https://github.com/elastic/eui/pull/1285))
- `popover_positioning` service's methods no longer accept React node values ([#1285](https://github.com/elastic/eui/pull/1285))

**Bug fixes**

- Added TypeScript definitions for tab components ([#1288](https://github.com/elastic/eui/pull/1288))

## [`4.8.0`](https://github.com/elastic/eui/tree/v4.8.0)

Expand All @@ -9,6 +27,10 @@ No public interface changes since `4.8.0`.

**Bug fixes**

- Added TypeScript definitions for `EuiToolTip`'s `delay` prop. ([#1284](https://github.com/elastic/eui/pull/1284))

**Bug fixes**

- Added TypeScript definitions for `EuiToolTip`'s `delay` prop. ([#1284](https://github.com/elastic/eui/pull/1284))
- Added TypeScript definitions for step components, and some checkbox definition fixes ([#1263](https://github.com/elastic/eui/pull/1263))

Expand All @@ -22,6 +44,7 @@ No public interface changes since `4.8.0`.
- Added [Framer X](http://www.framer.com) component source files under the `src-framer` directory ([#1263](https://github.com/elastic/eui/pull/1263))
- Added `compressed` prop to `EuiComboBox` ([#1258](https://github.com/elastic/eui/pull/1258))
- Added guidelines for Sass usage. ([#1257](https://github.com/elastic/eui/pull/1257))
- Adding a `branch` icon to `EuiIcon` ([#1249](https://github.com/elastic/eui/pull/1249/))

**Bug fixes**

Expand Down
67,557 changes: 36,894 additions & 30,663 deletions docs/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/bundle.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "@elastic/eui",
"description": "Elastic UI Component Library",
"version": "4.8.0",
"version": "5.0.0",
"main": "lib",
"module": "src",
"module": "es",
"types": "src/index.d.ts",
"jsnext:main": "src",
"postcss": {},
"docker_image": "node:8",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions scripts/compile-clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ const rimraf = require('rimraf');

rimraf.sync('dist');
rimraf.sync('lib');
rimraf.sync('es');
8 changes: 6 additions & 2 deletions scripts/compile-eui.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ const glob = require('glob');
function compileLib() {
shell.mkdir('-p', 'lib/components', 'lib/services', 'lib/test');

console.log('Compiling src/ to lib/');
console.log('Compiling src/ to es/ and lib/');

execSync(
'babel --quiet --out-dir=es --ignore "**/webpack.config.js,**/*.test.js" src',
{ env: { ...this.process.env, BABEL_MODULES: false } }
);
execSync('babel --quiet --out-dir=lib --ignore "**/webpack.config.js,**/*.test.js" src');

console.log(chalk.green('✔ Finished compiling src/ to lib/'));
console.log(chalk.green('✔ Finished compiling src/'));

// Also copy over SVGs. Babel has a --copy-files option but that brings over
// all kinds of things we don't want into the lib folder.
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/badge/beta_badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default () => (
 
<EuiBetaBadge label="Lab" title="Laboratory" tooltipContent="This module is not GA. Please help us by reporting any bugs." />
&emsp;
<EuiBetaBadge label="Lightening" iconType="bolt" />
<EuiBetaBadge label="Lab" iconType="beaker" />

<EuiSpacer />
<EuiTitle>
Expand Down
35 changes: 35 additions & 0 deletions src-docs/src/views/icon/icon_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import {
EuiCode,
EuiIcon,
EuiToken,
} from '../../../../src/components';

const iconHtmlWarning = () => (
Expand All @@ -24,6 +25,9 @@ const iconsHtml = renderToHtml(iconHtmlWarning);
import Icons from './icons';
const iconsSource = require('!!raw-loader!./icons');

import Tokens from './tokens';
const tokensSource = require('!!raw-loader!./tokens');

import Apps from './apps';
const appsSource = require('!!raw-loader!./apps');

Expand Down Expand Up @@ -95,6 +99,37 @@ export const IconExample = {
</p>
),
demo: <Apps />,
}, {
title: 'Tokens',
source: [{
type: GuideSectionTypes.JS,
code: tokensSource,
}, {
type: GuideSectionTypes.HTML,
code: iconsHtml,
}],
text: (
<div>
<p>
Tokens are most commonly used in search to help visually classify results.
The tokens included in EUI can be used to identify a number of code-based
search results.
</p>

<p>
An <EuiCode>EuiToken</EuiCode> accepts any valid <EuiCode>EuiIcon</EuiCode> as its
<EuiCode>iconType</EuiCode> property. However, icons designed specifically for
use in the <EuiCode>EuiToken</EuiCode> are prefixed with &quot;token&quot; in their name.
</p>

<p>
Multiple variants are available including: <EuiCode>shape</EuiCode>, <EuiCode>size</EuiCode>,
<EuiCode>color</EuiCode>, <EuiCode>hideBorder</EuiCode>, and <EuiCode>fill</EuiCode>.
</p>
</div>
),
props: { EuiToken },
demo: <Tokens />,
}, {
title: 'Machine learning icons',
source: [{
Expand Down
3 changes: 2 additions & 1 deletion src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const iconTypes = [
'arrowRight',
'arrowUp',
'asterisk',
'beaker',
'bolt',
'boxesHorizontal',
'boxesVertical',
Expand Down Expand Up @@ -152,7 +153,7 @@ const iconTypes = [
'visText',
'visTimelion',
'visVega',
'visVisualBuilder',
'visVisualBuilder'
];

export default () => (
Expand Down
128 changes: 128 additions & 0 deletions src-docs/src/views/icon/tokens.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import React, { Fragment } from 'react';

import {
EuiFlexGrid,
EuiFlexItem,
EuiPanel,
EuiText,
EuiToken,
EuiSpacer,
} from '../../../../src/components';

const tokens = [
'tokenAnnotation',
'tokenArray',
'tokenBoolean',
'tokenClass',
'tokenConstant',
'tokenElement',
'tokenEnum',
'tokenEnumMember',
'tokenEvent',
'tokenException',
'tokenField',
'tokenFunction',
'tokenInterface',
'tokenKey',
'tokenMethod',
'tokenNull',
'tokenNumber',
'tokenObject',
'tokenOperator',
'tokenPackage',
'tokenParameter',
'tokenProperty',
'tokenString',
'tokenStruct',
'tokenVariable',
'tokenFile',
'tokenSymbol',
'tokenRepo'
];

export default () => (
<Fragment>
<EuiFlexGrid columns={4}>
{
tokens.map(token => (
<EuiFlexItem
className="guideDemo__icon"
key={token}
>
<EuiPanel>
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '8px' }}>
<EuiToken iconType={token}/>
</div>
<EuiText size="s">
<p>{token}</p>
</EuiText>
</EuiPanel>
</EuiFlexItem>
))
}
</EuiFlexGrid>

<EuiSpacer />

<EuiFlexGrid columns={4}>
<EuiFlexItem
className="guideDemo__icon"
>
<EuiPanel>
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '8px' }}>
<EuiToken
iconType="tokenEvent"
size="m"
displayOptions={{
color: 'tokenTint10',
shape: 'square',
fill: true,
}}
/>
</div>
<EuiText size="s">
<p>A custom token</p>
</EuiText>
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem
className="guideDemo__icon"
>
<EuiPanel>
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '8px' }}>
<EuiToken
iconType="visMapCoordinate"
displayOptions={{
color: 'tokenTint05',
shape: 'circle',
}}
/>
</div>
<EuiText size="s">
<p>A custom token</p>
</EuiText>
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem
className="guideDemo__icon"
>
<EuiPanel>
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '8px' }}>
<EuiToken
iconType="tokenElement"
size="l"
displayOptions={{
color: 'tokenTint07',
shape: 'rectangle',
hideBorder: true
}}
/>
</div>
<EuiText size="s">
<p>A custom token</p>
</EuiText>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGrid>
</Fragment>
);
34 changes: 19 additions & 15 deletions src-docs/src/views/mutation_observer/mutation_observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,29 @@ export class MutationObserver extends Component {
observerOptions={{ subtree: true, attributes: true, childList: true }}
onMutation={this.onMutation}
>
{mutationRef => (
<div ref={mutationRef}>

<EuiButton color={this.state.buttonColor} fill={true} onClick={this.toggleButtonColor}>
Toggle button color
</EuiButton>
<EuiButton color={this.state.buttonColor} fill={true} onClick={this.toggleButtonColor}>
Toggle button color
</EuiButton>

<EuiSpacer/>
<EuiSpacer/>

<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiPanel grow={false}>
<ul>
{this.state.items.map(item => <li key={item}>{item}</li>)}
</ul>
<EuiSpacer size="s"/>
<EuiButtonEmpty onClick={this.addItem}>add item</EuiButtonEmpty>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiPanel grow={false}>
<ul>
{this.state.items.map(item => <li key={item}>{item}</li>)}
</ul>
<EuiSpacer size="s"/>
<EuiButtonEmpty onClick={this.addItem}>add item</EuiButtonEmpty>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>

</div>
)}
</EuiMutationObserver>
</div>
);
Expand Down
Loading

0 comments on commit 23d5188

Please sign in to comment.