Skip to content

Commit

Permalink
at & key Icon Glyphs (#6934)
Browse files Browse the repository at this point in the history
* add `at` and `key` icon glyphs

* update snapshots

* add changelog

---------

Co-authored-by: Michael Marcialis <michael@marcial.is>
  • Loading branch information
MichaelMarcialis and Michael Marcialis authored Jul 14, 2023
1 parent f61e640 commit abde51b
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const iconTypes = [
'arrowEnd',
'article',
'asterisk',
'at',
'beaker',
'bell',
'bellSlash',
Expand Down Expand Up @@ -131,6 +132,7 @@ export const iconTypes = [
'inspect',
'invert',
'ip',
'key',
'keyboard',
'kqlField',
'kqlFunction',
Expand Down
41 changes: 41 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,25 @@ exports[`EuiIcon props type asterisk is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type at is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="at"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3 8a5 5 0 1 1 9.812 1.364.78.78 0 0 1-.341.476c-.16.1-.382.16-.659.16-.507 0-.668-.18-.73-.274a.53.53 0 0 1-.082-.23V5h-1v.764a3 3 0 1 0 .146 4.333c.028.057.06.117.1.177.267.407.761.726 1.566.726.412 0 .83-.088 1.189-.311.367-.23.64-.583.773-1.053a6 6 0 1 0-2.501 3.393l-.546-.837A5 5 0 0 1 3 8Zm7 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type auditbeatApp is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -4050,6 +4069,28 @@ exports[`EuiIcon props type ip is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type key is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="key"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M14 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-1 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"
fill-rule="evenodd"
/>
<path
d="M6 6a5 5 0 1 1 3.086 4.62l-1.232 1.234A.5.5 0 0 1 7.5 12H6v1.5a.5.5 0 0 1-.5.5H4v1.5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .175-.38l5.932-5.085A5.019 5.019 0 0 1 6 6Zm5-4a4 4 0 0 0-3.853 5.08.5.5 0 0 1-.156.515L1 12.73V15h2v-1.5a.5.5 0 0 1 .5-.5H5v-1.5a.5.5 0 0 1 .5-.5h1.793l.877-.877a5.033 5.033 0 0 1-.503-.396.5.5 0 1 1 .666-.745A3.983 3.983 0 0 0 11 10h.005A4 4 0 0 0 11 2Z"
/>
</svg>
`;

exports[`EuiIcon props type keyboard is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
37 changes: 37 additions & 0 deletions src/components/icon/assets/at.tsx
Original file line number Diff line number Diff line change
@@ -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 EuiIconAt = ({
title,
titleId,
...props
}: SVGProps<SVGSVGElement> & SVGRProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={16}
height={16}
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fillRule="evenodd"
d="M3 8a5 5 0 1 1 9.812 1.364.78.78 0 0 1-.341.476c-.16.1-.382.16-.659.16-.507 0-.668-.18-.73-.274a.53.53 0 0 1-.082-.23V5h-1v.764a3 3 0 1 0 .146 4.333c.028.057.06.117.1.177.267.407.761.726 1.566.726.412 0 .83-.088 1.189-.311.367-.23.64-.583.773-1.053a6 6 0 1 0-2.501 3.393l-.546-.837A5 5 0 0 1 3 8Zm7 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Z"
/>
</svg>
);
export const icon = EuiIconAt;
38 changes: 38 additions & 0 deletions src/components/icon/assets/key.tsx
Original file line number Diff line number Diff line change
@@ -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 EuiIconKey = ({
title,
titleId,
...props
}: SVGProps<SVGSVGElement> & SVGRProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={16}
height={16}
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fillRule="evenodd"
d="M14 5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-1 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"
/>
<path d="M6 6a5 5 0 1 1 3.086 4.62l-1.232 1.234A.5.5 0 0 1 7.5 12H6v1.5a.5.5 0 0 1-.5.5H4v1.5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 .175-.38l5.932-5.085A5.019 5.019 0 0 1 6 6Zm5-4a4 4 0 0 0-3.853 5.08.5.5 0 0 1-.156.515L1 12.73V15h2v-1.5a.5.5 0 0 1 .5-.5H5v-1.5a.5.5 0 0 1 .5-.5h1.793l.877-.877a5.033 5.033 0 0 1-.503-.396.5.5 0 1 1 .666-.745A3.983 3.983 0 0 0 11 10h.005A4 4 0 0 0 11 2Z" />
</svg>
);
export const icon = EuiIconKey;
2 changes: 2 additions & 0 deletions src/components/icon/icon_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const typeToPathMap = {
arrowEnd: 'arrowEnd',
article: 'article',
asterisk: 'asterisk',
at: 'at',
auditbeatApp: 'app_auditbeat',
beaker: 'beaker',
bell: 'bell',
Expand Down Expand Up @@ -186,6 +187,7 @@ export const typeToPathMap = {
inspect: 'inspect',
invert: 'invert',
ip: 'ip',
key: 'key',
keyboard: 'keyboard',
kqlField: 'kql_field',
kqlFunction: 'kql_function',
Expand Down
3 changes: 3 additions & 0 deletions src/components/icon/svgs/at.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/icon/svgs/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions upcoming_changelogs/6934.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added `at` and `key` icon glyphs.

0 comments on commit abde51b

Please sign in to comment.