Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Improved `htmlIdGenerator` when supplying both `prefix` and `suffix` ([#3076](https://github.com/elastic/eui/pull/3076))
- Updated pagination prop descriptions for `EuiInMemoryTable` ([#3142](https://github.com/elastic/eui/pull/3142))
- Added `title` and `aria` attributes to `EuiToken`'s icon element ([#3195](https://github.com/elastic/eui/pull/3195))
- Added new Elasticsearch token types ([58036](https://github.com/elastic/kibana/issues/58036))

## [`22.2.0`](https://github.com/elastic/eui/tree/v22.2.0)

Expand Down
13 changes: 13 additions & 0 deletions src-docs/src/views/icon/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ const tokens = [
'tokenFile',
'tokenSymbol',
'tokenRepo',
'tokenBinary',
'tokenJoin',
'tokenPercolator',
'tokenFlattened',
'tokenRankFeature',
'tokenRankFeatures',
'tokenKeyword',
'tokenCompletionSuggester',
'tokenDenseVector',
'tokenText',
'tokenTokenCount',
'tokenSearchType',
'tokenHistogram',
];

export default () => (
Expand Down
263 changes: 263 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7607,6 +7607,24 @@ exports[`EuiIcon props type tokenArray is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenBinary is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 4H4V12H12V4ZM8.5 5.5H5.5V10.5H8.5V5.5Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type tokenBoolean is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7643,6 +7661,30 @@ exports[`EuiIcon props type tokenClass is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenCompletionSuggester is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
clip-rule="evenodd"
d="M3 4c0-.55228.44772-1 1-1h8c.5523 0 1 .44772 1 1v5.99578c0 .55232-.4477 1.00002-1 1.00002h-1.661L7.4 13.2c-.16481.1236-.4.006-.4-.2v-2.0042H4c-.55228 0-1-.4477-1-1.00002V4zm1.5 1c0-.27614.22386-.5.5-.5h6c.2761 0 .5.22386.5.5v4c0 .27614-.2239.5-.5.5h-.9L8 11V9.5H5c-.27614 0-.5-.22386-.5-.5V5z"
fill-rule="evenodd"
/>
<path
d="M6.75 6c-.55228 0-1 .44772-1 1s.44772 1 1 1 1-.44772 1-1-.44772-1-1-1zM9.25 6c-.55228 0-1 .44772-1 1s.44772 1 1 1 1-.44772 1-1-.44772-1-1-1z"
/>
</g>
</svg>
`;

exports[`EuiIcon props type tokenConstant is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7679,6 +7721,24 @@ exports[`EuiIcon props type tokenDate is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenDenseVector is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M4.1539 12V4H6.86711V5.13923H5.65807V10.8608H6.86711V12H4.1539ZM11.8461 4V12H9.13288V10.8608H10.3419V5.13923H9.13288V4H11.8461Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type tokenElement is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7803,6 +7863,24 @@ exports[`EuiIcon props type tokenFile is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenFlattened is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.25 3c-.13807 0-.25.11193-.25.25v2c0 .13807.11193.25.25.25h9.5c.1381 0 .25-.11193.25-.25v-2c0-.13807-.1119-.25-.25-.25h-9.5zM3.25 6.75c-.13807 0-.25.11193-.25.25v2c0 .13807.11193.25.25.25H5.5c.13807 0 .25-.11193.25-.25V7c0-.13807-.11193-.25-.25-.25H3.25zM3 10.75c0-.1381.11193-.25.25-.25H5.5c.13807 0 .25.1119.25.25v2c0 .1381-.11193.25-.25.25H3.25c-.13807 0-.25-.1119-.25-.25v-2zM6.31059 10.023c-.08262-.07288-.08262-.22353 0-.29598l3.05348-2.68329c.05353-.04715.12788-.05711.19075-.0253.06322.03182.1031.09928.1031.17327v1.34164L12.819 8.5169c.0992 0 .1796.08587.1796.19167v2.29993c0 .1058-.0804.1917-.1796.1917l-3.16108.0164v1.3417c0 .074-.03988.1414-.1031.1732-.06287.0319-.13722.0219-.19075-.0249L6.31059 10.023z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type tokenFunction is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7839,6 +7917,23 @@ exports[`EuiIcon props type tokenGeo is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenHistogram is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3 3h4v5h2V5.5h4V13H3.00148v-1H3V3zm1 9h2V4H4v8zm3 0h2V9H7v3zm3 0h2V6.5h-2V12z"
/>
</svg>
`;

exports[`EuiIcon props type tokenIP is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7875,6 +7970,25 @@ exports[`EuiIcon props type tokenInterface is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenJoin is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M7.5 4.50061V5.52451C7.5 6.79357 6.31515 7.43256 5.38799 7.2624C5.34434 7.25439 5.29834 7.25 5.25 7.25C4.83579 7.25 4.5 7.58579 4.5 8C4.5 8.41421 4.83579 8.75 5.25 8.75C5.29834 8.75 5.34434 8.74561 5.38799 8.7376C6.31515 8.56743 7.5 9.20643 7.5 10.4755V11.4994H11.5V10.4942C10.1995 10.4059 9.17188 9.32294 9.17188 8C9.17188 6.67706 10.1995 5.59412 11.5 5.50582V4.50061H7.5ZM13 4.00061C13 3.44833 12.5523 3.00061 12 3.00061H7C6.44772 3.00061 6 3.44833 6 4.00061V5.52451C6 5.69705 5.82847 5.81819 5.65877 5.78704C5.52621 5.76271 5.38959 5.75 5.25 5.75C4.00736 5.75 3 6.75736 3 8C3 9.24264 4.00736 10.25 5.25 10.25C5.38959 10.25 5.52621 10.2373 5.65877 10.213C5.82847 10.1818 6 10.303 6 10.4755V11.9994C6 12.5517 6.44772 12.9994 7 12.9994H12C12.5523 12.9994 13 12.5517 13 11.9994V9.00429C13 8.9654 12.9854 8.92883 12.9599 8.89943C12.8514 8.77404 12.3661 8.73855 12.2284 8.83096C12.0693 8.93772 11.8779 9 11.6719 9C11.1196 9 10.6719 8.55228 10.6719 8C10.6719 7.44772 11.1196 7 11.6719 7C11.8779 7 12.0693 7.06228 12.2284 7.16904C12.3661 7.26145 12.8514 7.22596 12.9599 7.10057C12.9854 7.07117 13 7.0346 13 6.99571V4.00061Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type tokenKey is rendered 1`] = `
<svg
aria-hidden="true"
Expand All @@ -7893,6 +8007,30 @@ exports[`EuiIcon props type tokenKey is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenKeyword is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M5.75 7.375C5.61193 7.375 5.5 7.48693 5.5 7.625V8.375C5.5 8.51307 5.61193 8.625 5.75 8.625H9.25C9.38807 8.625 9.5 8.51307 9.5 8.375V7.625C9.5 7.48693 9.38807 7.375 9.25 7.375H5.75Z"
/>
<path
clip-rule="evenodd"
d="M3 5C3 4.44772 3.44772 4 4 4H9.98882C10.3191 4 10.6281 4.1631 10.8145 4.43581L12.8645 7.43581C13.0969 7.77601 13.0969 8.22398 12.8645 8.56419L10.8145 11.5642C10.6281 11.8369 10.3191 12 9.98883 12H4C3.44772 12 3 11.5523 3 11V5ZM4.25 5.75C4.25 5.47386 4.47386 5.25 4.75 5.25H9.49539C9.65536 5.25 9.80567 5.32654 9.89976 5.45591L11.5361 7.70591C11.6636 7.88124 11.6636 8.11876 11.5361 8.29409L9.89976 10.5441C9.80567 10.6735 9.65536 10.75 9.49539 10.75H4.75C4.47386 10.75 4.25 10.5261 4.25 10.25V5.75Z"
fill-rule="evenodd"
/>
</g>
</svg>
`;

exports[`EuiIcon props type tokenMethod is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -8078,6 +8216,25 @@ exports[`EuiIcon props type tokenParameter is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenPercolator is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="M5.5 7C6.32843 7 7 6.32843 7 5.5C7 4.67157 6.32843 4 5.5 4C4.67157 4 4 4.67157 4 5.5C4 6.32843 4.67157 7 5.5 7ZM5.5 8C6.88071 8 8 6.88071 8 5.5C8 4.11929 6.88071 3 5.5 3C4.11929 3 3 4.11929 3 5.5C3 6.88071 4.11929 8 5.5 8ZM11 9C11.5523 9 12 8.55228 12 8C12 7.44772 11.5523 7 11 7C10.4477 7 10 7.44772 10 8C10 8.55228 10.4477 9 11 9ZM11 10C12.1046 10 13 9.10457 13 8C13 6.89543 12.1046 6 11 6C9.89543 6 9 6.89543 9 8C9 9.10457 9.89543 10 11 10ZM8.5 11.5C8.5 11.7761 8.27614 12 8 12C7.72386 12 7.5 11.7761 7.5 11.5C7.5 11.2239 7.72386 11 8 11C8.27614 11 8.5 11.2239 8.5 11.5ZM9.5 11.5C9.5 12.3284 8.82843 13 8 13C7.17157 13 6.5 12.3284 6.5 11.5C6.5 10.6716 7.17157 10 8 10C8.82843 10 9.5 10.6716 9.5 11.5Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type tokenProperty is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -8117,6 +8274,40 @@ exports[`EuiIcon props type tokenRange is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenRankFeature is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13 4V12H11V6H9V10H5V12H3V8H7V4H13Z"
/>
</svg>
`;

exports[`EuiIcon props type tokenRankFeatures is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13 4V12H11V6H9V10H5V12H3V8H7V4H13Z"
/>
</svg>
`;

exports[`EuiIcon props type tokenRepo is rendered 1`] = `
<svg
aria-hidden="true"
Expand All @@ -8135,6 +8326,33 @@ exports[`EuiIcon props type tokenRepo is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenSearchType is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M6.26974 7.50002C6.26974 6.94774 6.71746 6.50002 7.26974 6.50002C7.82203 6.50002 8.26974 6.94774 8.26974 7.50002C8.26974 8.05231 7.82203 8.50002 7.26974 8.50002C6.71746 8.50002 6.26974 8.05231 6.26974 7.50002Z"
/>
<path
d="M8.76974 7.50002C8.76974 6.94774 9.21746 6.50002 9.76974 6.50002C10.322 6.50002 10.7697 6.94774 10.7697 7.50002C10.7697 8.05231 10.322 8.50002 9.76974 8.50002C9.21746 8.50002 8.76974 8.05231 8.76974 7.50002Z"
/>
<path
clip-rule="evenodd"
d="M11.7017 10.682C10.1231 12.2606 7.66343 12.4212 5.90559 11.1637L4.28033 12.7889C3.98744 13.0818 3.51256 13.0818 3.21967 12.7889C2.92678 12.496 2.92678 12.0212 3.21967 11.7283L4.8468 10.1011C3.5994 8.34418 3.76306 5.89274 5.33778 4.31802C7.09513 2.56066 9.94438 2.56066 11.7017 4.31802C13.4591 6.07538 13.4591 8.92462 11.7017 10.682ZM6.39843 9.62132C7.57 10.7929 9.4695 10.7929 10.6411 9.62132C11.8126 8.44975 11.8126 6.55025 10.6411 5.37868C9.4695 4.20711 7.57 4.20711 6.39843 5.37868C5.22686 6.55025 5.22686 8.44975 6.39843 9.62132Z"
fill-rule="evenodd"
/>
</g>
</svg>
`;

exports[`EuiIcon props type tokenShape is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -8205,6 +8423,51 @@ exports[`EuiIcon props type tokenSymbol is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type tokenText is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9.14664 4.29739L8.89243 5.75232H9.82812L9.60637 7.01795H8.67067L8.21635 9.70605C8.19111 9.88994 8.20282 10.0288 8.2515 10.1225C8.30018 10.2163 8.42187 10.2667 8.61659 10.274C8.69231 10.2776 8.84735 10.2685 9.08173 10.2469L8.95192 11.5666C8.65264 11.664 8.33354 11.7091 7.99459 11.7018C7.44291 11.6946 7.03005 11.5324 6.75601 11.2151C6.48197 10.8978 6.37019 10.4669 6.42067 9.92239L6.89663 7.01795H6.17188L6.38822 5.75232H7.11298L7.36719 4.29739H9.14664Z"
/>
</svg>
`;

exports[`EuiIcon props type tokenTokenCount is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon-isLoaded"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<g>
<path
d="M8 4H3V7H8V4Z"
/>
<path
d="M13 9H8V12H13V9Z"
/>
<path
d="M10 4H13V7H10V4Z"
/>
<path
d="M6 9H3V12H6V9Z"
/>
</g>
</svg>
`;

exports[`EuiIcon props type tokenVariable is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
16 changes: 16 additions & 0 deletions src/components/icon/assets/tokens/tokenBinary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';

const EuiIconTokenBinary = ({ title, titleId, ...props }) => (
<svg
width={16}
height={16}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<path fillRule="evenodd" d="M12 4H4V12H12V4ZM8.5 5.5H5.5V10.5H8.5V5.5Z" />
</svg>
);

export const icon = EuiIconTokenBinary;
3 changes: 3 additions & 0 deletions src/components/icon/assets/tokens/tokenBinary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading