Skip to content

Commit

Permalink
[EuiIcon] Add new expand glyphs (#7875)
Browse files Browse the repository at this point in the history
Co-authored-by: Cee Chen <[email protected]>
Co-authored-by: Michael Marcialis <[email protected]>
Co-authored-by: Cee Chen <[email protected]>
  • Loading branch information
4 people authored Jul 24, 2024
1 parent 4ef461c commit 002ab58
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/eui/changelogs/upcoming/7875.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added `minusInSquare` and `plusInSquare` glyphs to `EuiIcon`.
2 changes: 2 additions & 0 deletions packages/eui/src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export const iconTypes = [
'minus',
'minusInCircle',
'minusInCircleFilled',
'minusInSquare',
'mobile',
'moon',
'move',
Expand Down Expand Up @@ -219,6 +220,7 @@ export const iconTypes = [
'plus',
'plusInCircle',
'plusInCircleFilled',
'plusInSquare',
'popout',
'push',
'questionInCircle',
Expand Down
44 changes: 44 additions & 0 deletions packages/eui/src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7907,6 +7907,28 @@ exports[`EuiIcon props type minusInCircleFilled is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type minusInSquare is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="minusInSquare"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.611 7H4.39c-.216 0-.39.224-.39.5s.174.5.389.5h6.222c.215 0 .389-.224.389-.5s-.174-.5-.389-.5Z"
/>
<path
d="M1 3a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3Zm2-1h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type mobile is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -8594,6 +8616,28 @@ exports[`EuiIcon props type plusInCircleFilled is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type plusInSquare is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="plusInSquare"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 4.389V7h2.611c.215 0 .389.224.389.5s-.174.5-.389.5H8v2.611c0 .215-.224.389-.5.389s-.5-.174-.5-.389V8H4.389C4.174 8 4 7.776 4 7.5s.174-.5.389-.5H7V4.389C7 4.174 7.224 4 7.5 4s.5.174.5.389Z"
/>
<path
d="M1 3a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3Zm2-1h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type popout is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
38 changes: 38 additions & 0 deletions packages/eui/src/components/icon/assets/minus_in_square.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 EuiIconMinusInSquare = ({
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 d="M10.611 7H4.39c-.216 0-.39.224-.39.5s.174.5.389.5h6.222c.215 0 .389-.224.389-.5s-.174-.5-.389-.5Z" />
<path
fillRule="evenodd"
d="M1 3a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3Zm2-1h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"
/>
</svg>
);
export const icon = EuiIconMinusInSquare;
38 changes: 38 additions & 0 deletions packages/eui/src/components/icon/assets/plus_in_square.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 EuiIconPlusInSquare = ({
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 d="M8 4.389V7h2.611c.215 0 .389.224.389.5s-.174.5-.389.5H8v2.611c0 .215-.224.389-.5.389s-.5-.174-.5-.389V8H4.389C4.174 8 4 7.776 4 7.5s.174-.5.389-.5H7V4.389C7 4.174 7.224 4 7.5 4s.5.174.5.389Z" />
<path
fillRule="evenodd"
d="M1 3a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3Zm2-1h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"
/>
</svg>
);
export const icon = EuiIconPlusInSquare;
2 changes: 2 additions & 0 deletions packages/eui/src/components/icon/icon_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ export const typeToPathMap = {
minus: 'minus',
minusInCircle: 'minus_in_circle',
minusInCircleFilled: 'minus_in_circle_filled',
minusInSquare: 'minus_in_square',
mobile: 'mobile',
monitoringApp: 'app_monitoring',
moon: 'moon',
Expand Down Expand Up @@ -343,6 +344,7 @@ export const typeToPathMap = {
plus: 'plus',
plusInCircle: 'plus_in_circle',
plusInCircleFilled: 'plus_in_circle_filled',
plusInSquare: 'plus_in_square',
popout: 'popout',
push: 'push',
questionInCircle: 'question_in_circle',
Expand Down
1 change: 1 addition & 0 deletions packages/eui/src/components/icon/svgs/minus_in_square.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 packages/eui/src/components/icon/svgs/plus_in_square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 002ab58

Please sign in to comment.