Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor icon set #671

Merged
merged 3 commits into from
Apr 13, 2018
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Added `euiDatePicker` component for date/time input ([#644](https://github.com/elastic/eui/pull/644))
- Added `EuiDatePicker` component for date/time input ([#644](https://github.com/elastic/eui/pull/644))
- Added editor icon set to `EuiIcon` ([#671](https://github.com/elastic/eui/pull/671))

## [`0.0.41`](https://github.com/elastic/eui/tree/v0.0.41)

Expand Down
14 changes: 14 additions & 0 deletions src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ const iconTypes = [
'cross',
'document',
'dot',
'editorAlignCenter',
'editorAlignLeft',
'editorAlignRight',
'editorBold',
'editorCodeBlock',
'editorComment',
'editorHeading',
'editorItalic',
'editorLink',
'editorStrike',
'editorTable',
'editorUnderline',
'editorOrderedList',
'editorUnorderedList',
'empty',
'exit',
'expand',
Expand Down
294 changes: 294 additions & 0 deletions src/components/icon/__snapshots__/icon.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,300 @@ exports[`EuiIcon renders type dot 1`] = `
</svg>
`;

exports[`EuiIcon renders type editorAlignCenter 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M5 4V3h6v1H5zM3 7V6h10v1H3zm2 3V9h6v1H5zm-2 3v-1h10v1H3z"
id="editor_align_center-a"
/>
</defs>
<use
href="#editor_align_center-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorAlignLeft 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M2 4V3h6v1H2zm0 3V6h10v1H2zm0 3V9h6v1H2zm0 3v-1h10v1H2z"
id="editor_align_left-a"
/>
</defs>
<use
href="#editor_align_left-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorAlignRight 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M8 4V3h6v1H8zM4 7V6h10v1H4zm4 3V9h6v1H8zm-4 3v-1h10v1H4z"
id="editor_align_right-a"
/>
</defs>
<use
href="#editor_align_right-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorBold 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M8.193 13H4V3h4.151c1.816 0 2.987.977 2.987 2.495 0 1.074-.797 2.01-1.823 2.176v.055c1.359.132 2.308 1.11 2.308 2.433 0 1.76-1.296 2.841-3.43 2.841zM5.788 4.393v2.82h1.635c1.248 0 1.948-.526 1.948-1.455 0-.873-.603-1.365-1.67-1.365H5.788zm0 7.214h1.996c1.316 0 2.016-.547 2.016-1.573 0-1.019-.72-1.552-2.092-1.552h-1.92v3.125z"
id="editor_bold-a"
/>
</defs>
<use
href="#editor_bold-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorCodeBlock 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M11.12 9.909l2.43-2.058a.213.213 0 0 0 0-.338l-2.43-2.058a.215.215 0 0 1 0-.338.32.32 0 0 1 .4 0l2.43 2.057c.333.282.333.735 0 1.016l-2.43 2.058a.32.32 0 0 1-.4 0 .215.215 0 0 1 0-.34zM9.257 2.546c.203.046.308.34.235.655l-2.108 9.132c-.073.315-.296.532-.499.486-.202-.047-.307-.34-.235-.656l2.108-9.131c.073-.316.296-.533.5-.486zM5.08 9.909c.11.093.11.245 0 .339a.32.32 0 0 1-.4 0L2.25 8.19c-.333-.281-.333-.734 0-1.016l2.43-2.057a.32.32 0 0 1 .4 0c.11.093.11.245 0 .338L2.65 7.513a.213.213 0 0 0 0 .338l2.43 2.058z"
id="editor_code_block-a"
/>
</defs>
<use
href="#editor_code_block-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorComment 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M6.111 10H12a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1v1.297L6.111 10zm.46 1L4 14v-3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H6.571z"
id="editor_comment-a"
/>
</defs>
<use
href="#editor_comment-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorHeading 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M6 11a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2V5a1 1 0 1 1 0-2h2a1 1 0 1 1 0 2v2h4V5a1 1 0 1 1 0-2h2a1 1 0 0 1 0 2v6a1 1 0 0 1 0 2h-2a1 1 0 0 1 0-2V9H6v2z"
id="editor_heading-a"
/>
</defs>
<use
href="#editor_heading-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorItalic 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M8.16 12H9.5a.5.5 0 1 1 0 1h-4a.5.5 0 1 1 0-1h1.639l1.7-8H7.5a.5.5 0 0 1 0-1h4a.5.5 0 1 1 0 1H9.861l-1.7 8z"
id="editor_italic-a"
/>
</defs>
<use
href="#editor_italic-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorLink 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M5.393 13.42a1.98 1.98 0 0 1-1.408-.583l-.403-.402a1.994 1.994 0 0 1 0-2.817l2.616-2.615a1.98 1.98 0 0 1 1.408-.584c.532 0 1.033.208 1.409.584l.402.402a.284.284 0 1 1-.402.403l-.403-.403a1.414 1.414 0 0 0-1.006-.417c-.38 0-.737.149-1.006.417L3.985 10.02a1.424 1.424 0 0 0 0 2.012l.402.402c.269.27.626.417 1.006.417s.737-.148 1.006-.417l1.811-1.81a.284.284 0 1 1 .402.402l-1.81 1.81a1.977 1.977 0 0 1-1.409.584zM8.813 10a1.978 1.978 0 0 1-1.408-.583.284.284 0 1 1 .403-.403c.268.269.626.417 1.006.417s.737-.148 1.006-.417L12.435 6.4a1.424 1.424 0 0 0 0-2.012l-.402-.403a1.425 1.425 0 0 0-2.012 0l-1.81 1.811a.284.284 0 1 1-.403-.402l1.81-1.81a1.994 1.994 0 0 1 2.817 0l.403.402c.776.776.776 2.04 0 2.816l-2.616 2.616A1.979 1.979 0 0 1 8.814 10z"
id="editor_link-a"
/>
</defs>
<use
href="#editor_link-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorOrderedList 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M3 8v1h1v1H1V9h1V8H1V7h3v1H3zm1 4v2H1v-1h1v-1H1v-1h3v1zM3 5h1v1H1V5h1V4H1V3h2v2zm2.5-1h8a.5.5 0 1 1 0 1h-8a.5.5 0 0 1 0-1zm0 4h8a.5.5 0 1 1 0 1h-8a.5.5 0 0 1 0-1zm0 4h8a.5.5 0 1 1 0 1h-8a.5.5 0 1 1 0-1z"
id="editor_ordered_list-a"
/>
</defs>
<use
href="#editor_ordered_list-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorStrike 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M10.023 10h1.274c.006.08.01.164.01.25a2.557 2.557 0 0 1-.883 1.949c-.284.25-.627.446-1.03.588A4.087 4.087 0 0 1 8.028 13a4.616 4.616 0 0 1-3.382-1.426c-.193-.259-.193-.5 0-.724.193-.223.438-.266.735-.13.343.363.748.655 1.213.876.466.22.949.33 1.449.33.637 0 1.132-.144 1.485-.433.353-.29.53-.67.53-1.14a1.72 1.72 0 0 0-.034-.353zM5.586 7a2.49 2.49 0 0 1-.294-.507 2.316 2.316 0 0 1-.177-.934c0-.363.076-.701.228-1.015.152-.314.363-.586.633-.816.27-.23.588-.41.955-.537A3.683 3.683 0 0 1 8.145 3c.578 0 1.112.11 1.603.33.49.221.907.508 1.25.861.16.282.16.512 0 .692-.16.18-.38.214-.662.102a3.438 3.438 0 0 0-.978-.669 2.914 2.914 0 0 0-1.213-.242c-.54 0-.973.125-1.302.375-.328.25-.492.595-.492 1.036 0 .236.046.434.14.596.092.162.217.304.374.426.157.123.329.23.515.324.119.06.24.116.362.169H5.586zM2.5 8h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1z"
id="editor_strike-a"
/>
</defs>
<use
href="#editor_strike-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorTable 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M14 3v2H2V3v10h12V3zM2 2h12c.552 0 1 .413 1 .923v10.154c0 .51-.448.923-1 .923H2c-.552 0-1-.413-1-.923V2.923C1 2.413 1.448 2 2 2zm0 5h12v1H2V7zm0 3h12v1H2v-1z"
id="editor_table-a"
/>
</defs>
<use
href="#editor_table-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorUnderline 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M5 3.136V7.4C5 9.028 6.224 10 8 10c1.783 0 3-.972 3-2.6V3.136c0-.357.167-.536.5-.536.333 0 .5.179.5.536v4.318C12 9.547 10.335 11 8 11S4 9.493 4 7.4V3.136c0-.357.167-.536.5-.536.333 0 .5.179.5.536zM2.5 12h11a.5.5 0 1 1 0 1h-11a.5.5 0 1 1 0-1z"
id="editor_underline-a"
/>
</defs>
<use
href="#editor_underline-a"
/>
</svg>
`;

exports[`EuiIcon renders type editorUnorderedList 1`] = `
<svg
class="euiIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<path
d="M5.5 4h8a.5.5 0 1 1 0 1h-8a.5.5 0 0 1 0-1zm0 4h8a.5.5 0 1 1 0 1h-8a.5.5 0 0 1 0-1zm0 4h8a.5.5 0 1 1 0 1h-8a.5.5 0 1 1 0-1zm-3-7a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1zm0 4a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1zm0 4a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1z"
id="editor_unordered_list-a"
/>
</defs>
<use
href="#editor_unordered_list-a"
/>
</svg>
`;

exports[`EuiIcon renders type empty 1`] = `
<svg
class="euiIcon euiIcon--medium"
Expand Down
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_align_center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_align_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_align_right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_code_block.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/components/icon/assets/editor_heading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading