From bfe59abeefde76ab10f1384d395bb3ffd97c73bc Mon Sep 17 00:00:00 2001 From: Michael Marcialis Date: Thu, 2 May 2024 16:05:14 -0400 Subject: [PATCH 1/3] added new icons and tokens; updated snapshots --- src-docs/src/views/icon/icons.js | 5 + src-docs/src/views/icon/tokens.tsx | 1 + .../icon/__snapshots__/icon.test.tsx.snap | 146 +++++++++++++++++- src/components/icon/assets/clickLeft.tsx | 39 +++++ src/components/icon/assets/clickRight.tsx | 39 +++++ src/components/icon/assets/clockCounter.tsx | 35 +++++ src/components/icon/assets/error.tsx | 3 +- src/components/icon/assets/errorFilled.tsx | 37 +++++ src/components/icon/assets/tokenDimension.tsx | 38 +++++ .../icon/assets/tokenMetricCounter.tsx | 6 +- .../icon/assets/tokenMetricGauge.tsx | 6 +- src/components/icon/assets/warningFilled.tsx | 37 +++++ src/components/icon/icon_map.ts | 6 + src/components/icon/svgs/clickLeft.svg | 5 + src/components/icon/svgs/clickRight.svg | 5 + src/components/icon/svgs/clockCounter.svg | 4 + src/components/icon/svgs/error.svg | 3 +- src/components/icon/svgs/errorFilled.svg | 3 + .../icon/svgs/tokens/tokenDimension.svg | 4 + .../icon/svgs/tokens/tokenMetricCounter.svg | 3 +- .../icon/svgs/tokens/tokenMetricGauge.svg | 3 +- src/components/icon/svgs/warningFilled.svg | 3 + src/components/token/token_map.ts | 5 + 23 files changed, 428 insertions(+), 8 deletions(-) create mode 100644 src/components/icon/assets/clickLeft.tsx create mode 100644 src/components/icon/assets/clickRight.tsx create mode 100644 src/components/icon/assets/clockCounter.tsx create mode 100644 src/components/icon/assets/errorFilled.tsx create mode 100644 src/components/icon/assets/tokenDimension.tsx create mode 100644 src/components/icon/assets/warningFilled.tsx create mode 100644 src/components/icon/svgs/clickLeft.svg create mode 100644 src/components/icon/svgs/clickRight.svg create mode 100644 src/components/icon/svgs/clockCounter.svg create mode 100644 src/components/icon/svgs/errorFilled.svg create mode 100644 src/components/icon/svgs/tokens/tokenDimension.svg create mode 100644 src/components/icon/svgs/warningFilled.svg diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index 466c2d78186..5bce6d0a093 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -43,7 +43,10 @@ export const iconTypes = [ 'check', 'checkInCircleFilled', 'cheer', + 'clickLeft', + 'clickRight', 'clock', + 'clockCounter', 'cloudDrizzle', 'cloudStormy', 'cloudSunny', @@ -83,6 +86,7 @@ export const iconTypes = [ 'eql', 'eraser', 'error', + 'errorFilled', 'esqlVis', 'exit', 'expand', @@ -295,6 +299,7 @@ export const iconTypes = [ 'visVega', 'visVisualBuilder', 'warning', + 'warningFilled', 'wordWrap', 'wordWrapDisabled', 'wrench', diff --git a/src-docs/src/views/icon/tokens.tsx b/src-docs/src/views/icon/tokens.tsx index b11f2a44b61..a3f4e80cd05 100644 --- a/src-docs/src/views/icon/tokens.tsx +++ b/src-docs/src/views/icon/tokens.tsx @@ -22,6 +22,7 @@ const tokens: EuiTokenMapType[] = [ 'tokenCompletionSuggester', 'tokenConstant', 'tokenDate', + 'tokenDimension', 'tokenElement', 'tokenEnum', 'tokenEnumMember', diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 28a95b09c53..df9be56aea5 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -1353,6 +1353,56 @@ exports[`EuiIcon props type classificationJob is rendered 1`] = ` `; +exports[`EuiIcon props type clickLeft is rendered 1`] = ` + +`; + +exports[`EuiIcon props type clickRight is rendered 1`] = ` + +`; + exports[`EuiIcon props type clock is rendered 1`] = ` `; +exports[`EuiIcon props type warningFilled is rendered 1`] = ` + +`; + exports[`EuiIcon props type watchesApp is rendered 1`] = ` ); diff --git a/src/components/icon/assets/errorFilled.tsx b/src/components/icon/assets/errorFilled.tsx new file mode 100644 index 00000000000..c31a1cd3b68 --- /dev/null +++ b/src/components/icon/assets/errorFilled.tsx @@ -0,0 +1,37 @@ +/* + * 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. + */ + +// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js + +import * as React from 'react'; +import type { SVGProps } from 'react'; +interface SVGRProps { + title?: string; + titleId?: string; +} +const EuiIconErrorFilled = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + + {title ? {title} : null} + + +); +export const icon = EuiIconErrorFilled; diff --git a/src/components/icon/assets/tokenDimension.tsx b/src/components/icon/assets/tokenDimension.tsx new file mode 100644 index 00000000000..23c4707b6dc --- /dev/null +++ b/src/components/icon/assets/tokenDimension.tsx @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js + +import * as React from 'react'; +import type { SVGProps } from 'react'; +interface SVGRProps { + title?: string; + titleId?: string; +} +const EuiIconTokenDimension = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + + {title ? {title} : null} + + + +); +export const icon = EuiIconTokenDimension; diff --git a/src/components/icon/assets/tokenMetricCounter.tsx b/src/components/icon/assets/tokenMetricCounter.tsx index bbc8e769755..ff8bcd3204d 100644 --- a/src/components/icon/assets/tokenMetricCounter.tsx +++ b/src/components/icon/assets/tokenMetricCounter.tsx @@ -28,7 +28,11 @@ const EuiIconTokenMetricCounter = ({ {...props} > {title ? {title} : null} - + + ); export const icon = EuiIconTokenMetricCounter; diff --git a/src/components/icon/assets/tokenMetricGauge.tsx b/src/components/icon/assets/tokenMetricGauge.tsx index 793ae7be0a5..d63036fb20d 100644 --- a/src/components/icon/assets/tokenMetricGauge.tsx +++ b/src/components/icon/assets/tokenMetricGauge.tsx @@ -28,7 +28,11 @@ const EuiIconTokenMetricGauge = ({ {...props} > {title ? {title} : null} - + + ); export const icon = EuiIconTokenMetricGauge; diff --git a/src/components/icon/assets/warningFilled.tsx b/src/components/icon/assets/warningFilled.tsx new file mode 100644 index 00000000000..dfb6b99a229 --- /dev/null +++ b/src/components/icon/assets/warningFilled.tsx @@ -0,0 +1,37 @@ +/* + * 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. + */ + +// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js + +import * as React from 'react'; +import type { SVGProps } from 'react'; +interface SVGRProps { + title?: string; + titleId?: string; +} +const EuiIconWarningFilled = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + + {title ? {title} : null} + + +); +export const icon = EuiIconWarningFilled; diff --git a/src/components/icon/icon_map.ts b/src/components/icon/icon_map.ts index ad55b6ab742..1b99c9d2201 100644 --- a/src/components/icon/icon_map.ts +++ b/src/components/icon/icon_map.ts @@ -48,7 +48,10 @@ export const typeToPathMap = { checkInCircleFilled: 'checkInCircleFilled', cheer: 'cheer', classificationJob: 'ml_classification_job', + clickLeft: 'clickLeft', + clickRight: 'clickRight', clock: 'clock', + clockCounter: 'clockCounter', cloudDrizzle: 'cloudDrizzle', cloudStormy: 'cloudStormy', cloudSunny: 'cloudSunny', @@ -129,6 +132,7 @@ export const typeToPathMap = { eql: 'eql', eraser: 'eraser', error: 'error', + errorFilled: 'errorFilled', esqlVis: 'esqlVis', exit: 'exit', expand: 'expand', @@ -435,6 +439,7 @@ export const typeToPathMap = { visualizeApp: 'app_visualize', vulnerabilityManagementApp: 'app_vulnerability_management', warning: 'warning', + warningFilled: 'warningFilled', alert: 'warning', // NOTE: This is an undocumented alias for `warning`, added for legacy compatability with Elastic Charts watchesApp: 'app_watches', wordWrap: 'wordWrap', @@ -451,6 +456,7 @@ export const typeToPathMap = { tokenCompletionSuggester: 'tokenCompletionSuggester', tokenConstant: 'tokenConstant', tokenDate: 'tokenDate', + tokenDimension: 'tokenDimension', tokenElement: 'tokenElement', tokenEnum: 'tokenEnum', tokenEnumMember: 'tokenEnumMember', diff --git a/src/components/icon/svgs/clickLeft.svg b/src/components/icon/svgs/clickLeft.svg new file mode 100644 index 00000000000..6c7f3de7afc --- /dev/null +++ b/src/components/icon/svgs/clickLeft.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/icon/svgs/clickRight.svg b/src/components/icon/svgs/clickRight.svg new file mode 100644 index 00000000000..fad5c49b185 --- /dev/null +++ b/src/components/icon/svgs/clickRight.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/icon/svgs/clockCounter.svg b/src/components/icon/svgs/clockCounter.svg new file mode 100644 index 00000000000..db7f79916a8 --- /dev/null +++ b/src/components/icon/svgs/clockCounter.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/icon/svgs/error.svg b/src/components/icon/svgs/error.svg index 37db74dcf5a..414a51da29f 100644 --- a/src/components/icon/svgs/error.svg +++ b/src/components/icon/svgs/error.svg @@ -1,3 +1,4 @@ - + + diff --git a/src/components/icon/svgs/errorFilled.svg b/src/components/icon/svgs/errorFilled.svg new file mode 100644 index 00000000000..37db74dcf5a --- /dev/null +++ b/src/components/icon/svgs/errorFilled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/svgs/tokens/tokenDimension.svg b/src/components/icon/svgs/tokens/tokenDimension.svg new file mode 100644 index 00000000000..269cd6aa5e3 --- /dev/null +++ b/src/components/icon/svgs/tokens/tokenDimension.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/icon/svgs/tokens/tokenMetricCounter.svg b/src/components/icon/svgs/tokens/tokenMetricCounter.svg index cebd7f0fb76..a95f2389ca1 100644 --- a/src/components/icon/svgs/tokens/tokenMetricCounter.svg +++ b/src/components/icon/svgs/tokens/tokenMetricCounter.svg @@ -1,3 +1,4 @@ - + + diff --git a/src/components/icon/svgs/tokens/tokenMetricGauge.svg b/src/components/icon/svgs/tokens/tokenMetricGauge.svg index af4cd61f8d8..1db4766d937 100644 --- a/src/components/icon/svgs/tokens/tokenMetricGauge.svg +++ b/src/components/icon/svgs/tokens/tokenMetricGauge.svg @@ -1,3 +1,4 @@ - + + diff --git a/src/components/icon/svgs/warningFilled.svg b/src/components/icon/svgs/warningFilled.svg new file mode 100644 index 00000000000..d9952fd2a64 --- /dev/null +++ b/src/components/icon/svgs/warningFilled.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/token/token_map.ts b/src/components/token/token_map.ts index cc369296548..61c4fc7a25b 100644 --- a/src/components/token/token_map.ts +++ b/src/components/token/token_map.ts @@ -18,6 +18,7 @@ export type EuiTokenMapType = | 'tokenCompletionSuggester' | 'tokenConstant' | 'tokenDate' + | 'tokenDimension' | 'tokenElement' | 'tokenEnum' | 'tokenEnumMember' @@ -110,6 +111,10 @@ export const TOKEN_MAP: { shape: 'square', color: 'euiColorVis6', }, + tokenDimension: { + shape: 'square', + color: 'euiColorVis1', + }, tokenElement: { shape: 'square', color: 'euiColorVis3', From 406c10c32504b93108277e048ed9f614af1f6b20 Mon Sep 17 00:00:00 2001 From: Michael Marcialis Date: Thu, 2 May 2024 16:31:13 -0400 Subject: [PATCH 2/3] added changelog --- changelogs/upcoming/7727.md | 1 + src/components/token/__snapshots__/token.test.tsx.snap | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 changelogs/upcoming/7727.md diff --git a/changelogs/upcoming/7727.md b/changelogs/upcoming/7727.md new file mode 100644 index 00000000000..e7d4087e396 --- /dev/null +++ b/changelogs/upcoming/7727.md @@ -0,0 +1 @@ +- Added/updated `clickLeft`, `clickRight`, `clockCounter`, `error`, `errorFilled`, `warningFilled`, `tokenDimension`, `tokenMetricCounter`, and `tokenMetricGauge` icon glyphs and tokens. \ No newline at end of file diff --git a/src/components/token/__snapshots__/token.test.tsx.snap b/src/components/token/__snapshots__/token.test.tsx.snap index 83caf2c1e79..3ef99944668 100644 --- a/src/components/token/__snapshots__/token.test.tsx.snap +++ b/src/components/token/__snapshots__/token.test.tsx.snap @@ -264,6 +264,16 @@ exports[`EuiToken props iconType as EuiTokenMapType tokenDenseVector is rendered `; +exports[`EuiToken props iconType as EuiTokenMapType tokenDimension is rendered 1`] = ` + + + +`; + exports[`EuiToken props iconType as EuiTokenMapType tokenElement is rendered 1`] = ` Date: Sun, 5 May 2024 19:22:55 -0700 Subject: [PATCH 3/3] Changelog copy --- changelogs/upcoming/7727.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/changelogs/upcoming/7727.md b/changelogs/upcoming/7727.md index e7d4087e396..396029e4708 100644 --- a/changelogs/upcoming/7727.md +++ b/changelogs/upcoming/7727.md @@ -1 +1,11 @@ -- Added/updated `clickLeft`, `clickRight`, `clockCounter`, `error`, `errorFilled`, `warningFilled`, `tokenDimension`, `tokenMetricCounter`, and `tokenMetricGauge` icon glyphs and tokens. \ No newline at end of file +- Updated the following existing glyphs in `EuiIcon`: + - `error` (now an outlined version instead of filled) + - `tokenMetricCounter` + - `tokenMetricGauge` +- Added the following new glyphs to `EuiIcon`: + - `tokenDimension` + - `clickLeft` + - `clickRight` + - `clockCounter` + - `errorFilled` (the previous `error` glyph design) + - `warningFilled` \ No newline at end of file