From 575107c284bc3abcac0f1018ab17a05c449f0498 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Fri, 24 Oct 2025 22:52:09 +0200 Subject: [PATCH 1/7] [Icons] attachment --- .../src/components/icon/assets/attachment.tsx | 34 +++++++++++++++++++ packages/eui/src/components/icon/icon_map.ts | 1 + .../src/components/icon/svgs/attachment.svg | 3 ++ .../components/display/icons/icon_types.ts | 1 + 4 files changed, 39 insertions(+) create mode 100644 packages/eui/src/components/icon/assets/attachment.tsx create mode 100644 packages/eui/src/components/icon/svgs/attachment.svg diff --git a/packages/eui/src/components/icon/assets/attachment.tsx b/packages/eui/src/components/icon/assets/attachment.tsx new file mode 100644 index 00000000000..8f621de5052 --- /dev/null +++ b/packages/eui/src/components/icon/assets/attachment.tsx @@ -0,0 +1,34 @@ +/* + * 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 EuiIconAttachment = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + + {title ? {title} : null} + + +); +export const icon = EuiIconAttachment; diff --git a/packages/eui/src/components/icon/icon_map.ts b/packages/eui/src/components/icon/icon_map.ts index 94da96d4c1d..8b7e8908b8c 100644 --- a/packages/eui/src/components/icon/icon_map.ts +++ b/packages/eui/src/components/icon/icon_map.ts @@ -30,6 +30,7 @@ export const typeToPathMap = { article: 'article', asterisk: 'asterisk', at: 'at', + attachment: 'attachment', auditbeatApp: 'app_auditbeat', backgroundTask: 'background_task', beaker: 'flask', // NOTE: To be deprecated in favor of `flask` diff --git a/packages/eui/src/components/icon/svgs/attachment.svg b/packages/eui/src/components/icon/svgs/attachment.svg new file mode 100644 index 00000000000..a2ef2573c18 --- /dev/null +++ b/packages/eui/src/components/icon/svgs/attachment.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/website/docs/components/display/icons/icon_types.ts b/packages/website/docs/components/display/icons/icon_types.ts index f71b2307cf3..4db63e85c64 100644 --- a/packages/website/docs/components/display/icons/icon_types.ts +++ b/packages/website/docs/components/display/icons/icon_types.ts @@ -18,6 +18,7 @@ export const iconTypes: Array = [ 'article', 'asterisk', 'at', + 'attachment', 'backgroundTask', 'bell', 'bellSlash', From d7a07651e89e4f2a45a5909d8949055fbda146f9 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Mon, 27 Oct 2025 10:52:02 +0100 Subject: [PATCH 2/7] Update snapshot --- .../icon/__snapshots__/icon.test.tsx.snap | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap b/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap index 505c402e14c..07ec79474e7 100644 --- a/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -985,6 +985,23 @@ exports[`EuiIcon props type at is rendered 1`] = ` `; +exports[`EuiIcon props type attachment is rendered 1`] = ` + + + +`; + exports[`EuiIcon props type auditbeatApp is rendered 1`] = ` Date: Wed, 29 Oct 2025 15:55:14 +0100 Subject: [PATCH 3/7] [Feedback] Rename to paperClip, adjust stroke --- .../src/components/icon/__snapshots__/icon.test.tsx.snap | 7 ++++--- packages/eui/src/components/icon/assets/paper_clip.tsx | 2 +- packages/eui/src/components/icon/svgs/attachment.svg | 3 --- packages/eui/src/components/icon/svgs/paper_clip.svg | 6 +++--- .../website/docs/components/display/icons/icon_types.ts | 1 - 5 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 packages/eui/src/components/icon/svgs/attachment.svg diff --git a/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap b/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap index 07ec79474e7..f777623648a 100644 --- a/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -8396,7 +8396,7 @@ exports[`EuiIcon props type paperClip is rendered 1`] = ` xmlns="http://www.w3.org/2000/svg" > `; @@ -9762,6 +9762,7 @@ exports[`EuiIcon props type streamsWired is rendered 1`] = ` class="euiIcon emotion-euiIcon-m-isLoaded" data-icon-type="streamsWired" data-is-loaded="true" + fill="none" height="16" role="presentation" viewBox="0 0 16 16" @@ -9770,12 +9771,12 @@ exports[`EuiIcon props type streamsWired is rendered 1`] = ` > diff --git a/packages/eui/src/components/icon/assets/paper_clip.tsx b/packages/eui/src/components/icon/assets/paper_clip.tsx index 256a682208a..2f2ddab648c 100644 --- a/packages/eui/src/components/icon/assets/paper_clip.tsx +++ b/packages/eui/src/components/icon/assets/paper_clip.tsx @@ -28,7 +28,7 @@ const EuiIconPaperClip = ({ {...props} > {title ? {title} : null} - + ); export const icon = EuiIconPaperClip; diff --git a/packages/eui/src/components/icon/svgs/attachment.svg b/packages/eui/src/components/icon/svgs/attachment.svg deleted file mode 100644 index a2ef2573c18..00000000000 --- a/packages/eui/src/components/icon/svgs/attachment.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/eui/src/components/icon/svgs/paper_clip.svg b/packages/eui/src/components/icon/svgs/paper_clip.svg index 8cc0d868001..6f446fbc254 100644 --- a/packages/eui/src/components/icon/svgs/paper_clip.svg +++ b/packages/eui/src/components/icon/svgs/paper_clip.svg @@ -1,3 +1,3 @@ - - - \ No newline at end of file + + + diff --git a/packages/website/docs/components/display/icons/icon_types.ts b/packages/website/docs/components/display/icons/icon_types.ts index 4db63e85c64..f71b2307cf3 100644 --- a/packages/website/docs/components/display/icons/icon_types.ts +++ b/packages/website/docs/components/display/icons/icon_types.ts @@ -18,7 +18,6 @@ export const iconTypes: Array = [ 'article', 'asterisk', 'at', - 'attachment', 'backgroundTask', 'bell', 'bellSlash', From c4ff851464a58bfa249a5d2e9a4b10e118b29193 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Wed, 29 Oct 2025 15:55:43 +0100 Subject: [PATCH 4/7] [Unrelated] Update stream_wired compiled file --- packages/eui/src/components/icon/assets/streams_wired.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/eui/src/components/icon/assets/streams_wired.tsx b/packages/eui/src/components/icon/assets/streams_wired.tsx index a9448da5520..2a8f411e515 100644 --- a/packages/eui/src/components/icon/assets/streams_wired.tsx +++ b/packages/eui/src/components/icon/assets/streams_wired.tsx @@ -23,6 +23,7 @@ const EuiIconStreamsWired = ({ xmlns="http://www.w3.org/2000/svg" width={16} height={16} + fill="none" viewBox="0 0 16 16" aria-labelledby={titleId} {...props} @@ -30,12 +31,12 @@ const EuiIconStreamsWired = ({ {title ? {title} : null} From 51370efcfe5a7ab9625aa77c018a4364e6c7cb84 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Wed, 29 Oct 2025 16:02:29 +0100 Subject: [PATCH 5/7] Actually remove attachment --- .../icon/__snapshots__/icon.test.tsx.snap | 17 ---------- .../src/components/icon/assets/attachment.tsx | 34 ------------------- packages/eui/src/components/icon/icon_map.ts | 1 - 3 files changed, 52 deletions(-) delete mode 100644 packages/eui/src/components/icon/assets/attachment.tsx diff --git a/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap b/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap index f777623648a..b529bdc0f5f 100644 --- a/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -985,23 +985,6 @@ exports[`EuiIcon props type at is rendered 1`] = ` `; -exports[`EuiIcon props type attachment is rendered 1`] = ` - - - -`; - exports[`EuiIcon props type auditbeatApp is rendered 1`] = ` & SVGRProps) => ( - - {title ? {title} : null} - - -); -export const icon = EuiIconAttachment; diff --git a/packages/eui/src/components/icon/icon_map.ts b/packages/eui/src/components/icon/icon_map.ts index 8b7e8908b8c..94da96d4c1d 100644 --- a/packages/eui/src/components/icon/icon_map.ts +++ b/packages/eui/src/components/icon/icon_map.ts @@ -30,7 +30,6 @@ export const typeToPathMap = { article: 'article', asterisk: 'asterisk', at: 'at', - attachment: 'attachment', auditbeatApp: 'app_auditbeat', backgroundTask: 'background_task', beaker: 'flask', // NOTE: To be deprecated in favor of `flask` From a2e15aefb2adda71115d4da586e1c60496dc9602 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Thu, 30 Oct 2025 08:05:38 +0100 Subject: [PATCH 6/7] Changelog --- packages/eui/changelogs/upcoming/9149.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/eui/changelogs/upcoming/9149.md diff --git a/packages/eui/changelogs/upcoming/9149.md b/packages/eui/changelogs/upcoming/9149.md new file mode 100644 index 00000000000..fc074fa6849 --- /dev/null +++ b/packages/eui/changelogs/upcoming/9149.md @@ -0,0 +1 @@ +- Updated design of `paperClip` icon according to current guidelines, also in order to align it with modern context/attachment buttons e.g. "Upload files" From f0b70b6e27aace0c2286237cc5654d00f816a478 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Fri, 31 Oct 2025 12:11:13 +0100 Subject: [PATCH 7/7] [Feedback] Update changelog --- packages/eui/changelogs/upcoming/9149.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eui/changelogs/upcoming/9149.md b/packages/eui/changelogs/upcoming/9149.md index fc074fa6849..805a0adc0bf 100644 --- a/packages/eui/changelogs/upcoming/9149.md +++ b/packages/eui/changelogs/upcoming/9149.md @@ -1 +1 @@ -- Updated design of `paperClip` icon according to current guidelines, also in order to align it with modern context/attachment buttons e.g. "Upload files" +- Updated 'paperClip' icon glyph