From e7f7c36ac4d1cea45808c1f715a3e28fb99f28b6 Mon Sep 17 00:00:00 2001 From: Michael Marcialis Date: Tue, 4 May 2021 16:23:34 -0400 Subject: [PATCH 1/6] added icons for upcoming lens features --- CHANGELOG.md | 1 + src-docs/src/views/icon/icons.js | 12 ++++++++++ src/components/icon/assets/color.js | 16 +++++++++++++ src/components/icon/assets/color.svg | 3 +++ src/components/icon/assets/continuityAbove.js | 16 +++++++++++++ .../icon/assets/continuityAbove.svg | 3 +++ .../icon/assets/continuityAboveBelow.js | 16 +++++++++++++ .../icon/assets/continuityAboveBelow.svg | 3 +++ src/components/icon/assets/continuityBelow.js | 16 +++++++++++++ .../icon/assets/continuityBelow.svg | 3 +++ .../icon/assets/continuityWithin.js | 16 +++++++++++++ .../icon/assets/continuityWithin.svg | 3 +++ src/components/icon/assets/eraser.js | 20 ++++++++++++++++ src/components/icon/assets/eraser.svg | 4 ++++ src/components/icon/assets/fullScreenExit.js | 16 +++++++++++++ src/components/icon/assets/fullScreenExit.svg | 3 +++ src/components/icon/assets/function.js | 16 +++++++++++++ src/components/icon/assets/function.svg | 3 +++ src/components/icon/assets/percent.js | 24 +++++++++++++++++++ src/components/icon/assets/percent.svg | 5 ++++ src/components/icon/assets/wordWrap.js | 17 +++++++++++++ src/components/icon/assets/wordWrap.svg | 4 ++++ .../icon/assets/wordWrapDisabled.js | 16 +++++++++++++ .../icon/assets/wordWrapDisabled.svg | 3 +++ src/components/icon/icon.tsx | 11 +++++++++ 25 files changed, 250 insertions(+) create mode 100644 src/components/icon/assets/color.js create mode 100755 src/components/icon/assets/color.svg create mode 100644 src/components/icon/assets/continuityAbove.js create mode 100755 src/components/icon/assets/continuityAbove.svg create mode 100644 src/components/icon/assets/continuityAboveBelow.js create mode 100755 src/components/icon/assets/continuityAboveBelow.svg create mode 100644 src/components/icon/assets/continuityBelow.js create mode 100755 src/components/icon/assets/continuityBelow.svg create mode 100644 src/components/icon/assets/continuityWithin.js create mode 100755 src/components/icon/assets/continuityWithin.svg create mode 100644 src/components/icon/assets/eraser.js create mode 100755 src/components/icon/assets/eraser.svg create mode 100644 src/components/icon/assets/fullScreenExit.js create mode 100755 src/components/icon/assets/fullScreenExit.svg create mode 100644 src/components/icon/assets/function.js create mode 100755 src/components/icon/assets/function.svg create mode 100644 src/components/icon/assets/percent.js create mode 100755 src/components/icon/assets/percent.svg create mode 100644 src/components/icon/assets/wordWrap.js create mode 100755 src/components/icon/assets/wordWrap.svg create mode 100644 src/components/icon/assets/wordWrapDisabled.js create mode 100755 src/components/icon/assets/wordWrapDisabled.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 599a94395ee..95935a75fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added `iconProps` prop to `EuiListGroupItem` ([#4760](https://github.com/elastic/eui/pull/4760)) - Added `i18ntokens.json` to published package ([#4771](https://github.com/elastic/eui/pull/4771)) - Replaced `highlight.js` with `prism.js`/`refractor` for code syntax highlighting in `EuiCodeBlock` ([#4638](https://github.com/elastic/eui/pull/4638)) +- Added `color`, `continuityAbove`, `continuityAboveBelow`, `continuityBelow`, `continuityWithin`, `eraser`, `fullScreenExit`, `function`, `percent`, `wordWrap`, and `wordWrapDisabled` glyphs to `EuiIcon` **Bug fixes** diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index bd4138b2564..a0e4d32a268 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -42,8 +42,13 @@ export const iconTypes = [ 'cloudDrizzle', 'cloudStormy', 'cloudSunny', + 'color', 'compute', 'console', + 'continuityAbove', + 'continuityAboveBelow', + 'continuityBelow', + 'continuityWithin', 'controlsHorizontal', 'controlsVertical', 'copy', @@ -62,6 +67,7 @@ export const iconTypes = [ 'email', 'empty', 'eql', + 'eraser', 'exit', 'expand', 'expandMini', @@ -79,6 +85,8 @@ export const iconTypes = [ 'folderExclamation', 'folderOpen', 'fullScreen', + 'fullScreenExit', + 'function', 'gear', 'glasses', 'globe', @@ -147,6 +155,7 @@ export const iconTypes = [ 'partial', 'pause', 'pencil', + 'percent', 'pin', 'pinFilled', 'play', @@ -185,6 +194,7 @@ export const iconTypes = [ 'stats', 'stop', 'stopFilled', + 'stopSlash', 'storage', 'string', 'submodule', @@ -224,6 +234,8 @@ export const iconTypes = [ 'visTimelion', 'visVega', 'visVisualBuilder', + 'wordWrap', + 'wordWrapDisabled', 'wrench', ]; diff --git a/src/components/icon/assets/color.js b/src/components/icon/assets/color.js new file mode 100644 index 00000000000..16be87aef8a --- /dev/null +++ b/src/components/icon/assets/color.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconColor = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconColor; diff --git a/src/components/icon/assets/color.svg b/src/components/icon/assets/color.svg new file mode 100755 index 00000000000..3311b35f197 --- /dev/null +++ b/src/components/icon/assets/color.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/continuityAbove.js b/src/components/icon/assets/continuityAbove.js new file mode 100644 index 00000000000..a1a9747318a --- /dev/null +++ b/src/components/icon/assets/continuityAbove.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconContinuityAbove = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconContinuityAbove; diff --git a/src/components/icon/assets/continuityAbove.svg b/src/components/icon/assets/continuityAbove.svg new file mode 100755 index 00000000000..5083db54756 --- /dev/null +++ b/src/components/icon/assets/continuityAbove.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/continuityAboveBelow.js b/src/components/icon/assets/continuityAboveBelow.js new file mode 100644 index 00000000000..cbfeff3b537 --- /dev/null +++ b/src/components/icon/assets/continuityAboveBelow.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconContinuityAboveBelow = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconContinuityAboveBelow; diff --git a/src/components/icon/assets/continuityAboveBelow.svg b/src/components/icon/assets/continuityAboveBelow.svg new file mode 100755 index 00000000000..d87024087e4 --- /dev/null +++ b/src/components/icon/assets/continuityAboveBelow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/continuityBelow.js b/src/components/icon/assets/continuityBelow.js new file mode 100644 index 00000000000..9d53f246277 --- /dev/null +++ b/src/components/icon/assets/continuityBelow.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconContinuityBelow = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconContinuityBelow; diff --git a/src/components/icon/assets/continuityBelow.svg b/src/components/icon/assets/continuityBelow.svg new file mode 100755 index 00000000000..f925a01cf07 --- /dev/null +++ b/src/components/icon/assets/continuityBelow.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/continuityWithin.js b/src/components/icon/assets/continuityWithin.js new file mode 100644 index 00000000000..0b6e9e08443 --- /dev/null +++ b/src/components/icon/assets/continuityWithin.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconContinuityWithin = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconContinuityWithin; diff --git a/src/components/icon/assets/continuityWithin.svg b/src/components/icon/assets/continuityWithin.svg new file mode 100755 index 00000000000..f6560102a63 --- /dev/null +++ b/src/components/icon/assets/continuityWithin.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/eraser.js b/src/components/icon/assets/eraser.js new file mode 100644 index 00000000000..9114ec7581c --- /dev/null +++ b/src/components/icon/assets/eraser.js @@ -0,0 +1,20 @@ +import * as React from 'react'; + +const EuiIconEraser = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + + +); + +export const icon = EuiIconEraser; diff --git a/src/components/icon/assets/eraser.svg b/src/components/icon/assets/eraser.svg new file mode 100755 index 00000000000..634a1cd2062 --- /dev/null +++ b/src/components/icon/assets/eraser.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/icon/assets/fullScreenExit.js b/src/components/icon/assets/fullScreenExit.js new file mode 100644 index 00000000000..7df4e75b7af --- /dev/null +++ b/src/components/icon/assets/fullScreenExit.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconFullScreenExit = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconFullScreenExit; diff --git a/src/components/icon/assets/fullScreenExit.svg b/src/components/icon/assets/fullScreenExit.svg new file mode 100755 index 00000000000..2b259090d3c --- /dev/null +++ b/src/components/icon/assets/fullScreenExit.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/function.js b/src/components/icon/assets/function.js new file mode 100644 index 00000000000..d46ba48692b --- /dev/null +++ b/src/components/icon/assets/function.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconFunction = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconFunction; diff --git a/src/components/icon/assets/function.svg b/src/components/icon/assets/function.svg new file mode 100755 index 00000000000..fd485ba934f --- /dev/null +++ b/src/components/icon/assets/function.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/assets/percent.js b/src/components/icon/assets/percent.js new file mode 100644 index 00000000000..edf2060291d --- /dev/null +++ b/src/components/icon/assets/percent.js @@ -0,0 +1,24 @@ +import * as React from 'react'; + +const EuiIconPercent = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + + + +); + +export const icon = EuiIconPercent; diff --git a/src/components/icon/assets/percent.svg b/src/components/icon/assets/percent.svg new file mode 100755 index 00000000000..36b3ad0299a --- /dev/null +++ b/src/components/icon/assets/percent.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/icon/assets/wordWrap.js b/src/components/icon/assets/wordWrap.js new file mode 100644 index 00000000000..b3ab3de4030 --- /dev/null +++ b/src/components/icon/assets/wordWrap.js @@ -0,0 +1,17 @@ +import * as React from 'react'; + +const EuiIconWordWrap = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + + +); + +export const icon = EuiIconWordWrap; diff --git a/src/components/icon/assets/wordWrap.svg b/src/components/icon/assets/wordWrap.svg new file mode 100755 index 00000000000..18ac81b2640 --- /dev/null +++ b/src/components/icon/assets/wordWrap.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/icon/assets/wordWrapDisabled.js b/src/components/icon/assets/wordWrapDisabled.js new file mode 100644 index 00000000000..b0d238c780e --- /dev/null +++ b/src/components/icon/assets/wordWrapDisabled.js @@ -0,0 +1,16 @@ +import * as React from 'react'; + +const EuiIconWordWrapDisabled = ({ title, titleId, ...props }) => ( + + {title ? {title} : null} + + +); + +export const icon = EuiIconWordWrapDisabled; diff --git a/src/components/icon/assets/wordWrapDisabled.svg b/src/components/icon/assets/wordWrapDisabled.svg new file mode 100755 index 00000000000..3d2129e22f7 --- /dev/null +++ b/src/components/icon/assets/wordWrapDisabled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index 5253ec9a1ab..11df7bfa330 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -76,9 +76,14 @@ const typeToPathMap = { cloudDrizzle: 'cloudDrizzle', cloudStormy: 'cloudStormy', cloudSunny: 'cloudSunny', + color: 'color', compute: 'compute', console: 'console', consoleApp: 'app_console', + continuityAbove: 'continuityAbove', + continuityAboveBelow: 'continuityAboveBelow', + continuityBelow: 'continuityBelow', + continuityWithin: 'continuityWithin', controlsHorizontal: 'controls_horizontal', controlsVertical: 'controls_vertical', copy: 'copy', @@ -135,6 +140,7 @@ const typeToPathMap = { empty: 'empty', emsApp: 'app_ems', eql: 'eql', + eraser: 'eraser', exit: 'exit', expand: 'expand', expandMini: 'expandMini', @@ -153,6 +159,8 @@ const typeToPathMap = { folderExclamation: 'folder_exclamation', folderOpen: 'folder_open', fullScreen: 'full_screen', + fullScreenExit: 'fullScreenExit', + function: 'function', gear: 'gear', gisApp: 'app_gis', glasses: 'glasses', @@ -295,6 +303,7 @@ const typeToPathMap = { paperClip: 'paper_clip', pause: 'pause', pencil: 'pencil', + percent: 'percent', pin: 'pin', pinFilled: 'pin_filled', pipelineApp: 'app_pipeline', @@ -390,6 +399,8 @@ const typeToPathMap = { visVega: 'vis_vega', visVisualBuilder: 'vis_visual_builder', watchesApp: 'app_watches', + wordWrap: 'wordWrap', + wordWrapDisabled: 'wordWrapDisabled', workplaceSearchApp: 'app_workplace_search', wrench: 'wrench', // Token Icon Imports From 9f7e63d727bf72efa9fb5bc3924a4fcf3f29a7d2 Mon Sep 17 00:00:00 2001 From: Michael Marcialis Date: Tue, 4 May 2021 16:41:59 -0400 Subject: [PATCH 2/6] update snapshots --- .../icon/__snapshots__/icon.test.tsx.snap | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 002e3bbbe54..ae20e955e99 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -1197,6 +1197,23 @@ exports[`EuiIcon props type codeApp is rendered 1`] = ` `; +exports[`EuiIcon props type color is rendered 1`] = ` + +`; + exports[`EuiIcon props type compute is rendered 1`] = `