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

[Backport 1.x] Add icons for getting started cards #1444

Merged
merged 1 commit into from
Oct 17, 2024
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
8 changes: 8 additions & 0 deletions src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const iconTypes = [
'bell',
'bellSlash',
'bolt',
'bookOpen',
'boxesHorizontal',
'boxesVertical',
'branch',
Expand All @@ -58,6 +59,7 @@ export const iconTypes = [
'cloudStormy',
'cloudSunny',
'color',
'compass',
'compute',
'console',
'continuityAbove',
Expand All @@ -74,6 +76,7 @@ export const iconTypes = [
'crossInCircleFilled',
'currency',
'cut',
'dashboard',
'database',
'document',
'documentation',
Expand Down Expand Up @@ -112,6 +115,7 @@ export const iconTypes = [
'fullScreen',
'fullScreenExit',
'function',
'functionAdd',
'gear',
'glasses',
'globe',
Expand Down Expand Up @@ -148,6 +152,7 @@ export const iconTypes = [
'kqlSelector',
'kqlValue',
'layers',
'lineChart',
'link',
'list',
'listAdd',
Expand Down Expand Up @@ -198,15 +203,18 @@ export const iconTypes = [
'polygon',
'popout',
'power',
'pulse',
'push',
'questionInCircle',
'quote',
'radar',
'radius',
'recent',
'redeploy',
'refresh',
'reporter',
'returnKey',
'rocket',
'save',
'scale',
'search',
Expand Down
120 changes: 120 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,21 @@ exports[`OuiIcon props type bolt is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type bookOpen is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.667 14v1.333H7.333V14H2a.667.667 0 0 1-.667-.667V2.666C1.333 2.298 1.632 2 2 2h4a2.66 2.66 0 0 1 2 .902A2.66 2.66 0 0 1 10 2h4c.368 0 .667.298.667.666v10.667A.667.667 0 0 1 14 14H8.667zm4.666-1.333V3.333H10c-.736 0-1.333.597-1.333 1.334v8h4.666zm-6 0v-8c0-.737-.597-1.334-1.333-1.334H2.667v9.334h4.667z"
/>
</svg>
`;

exports[`OuiIcon props type boxesHorizontal is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -1288,6 +1303,21 @@ exports[`OuiIcon props type color is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type compass is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 14.667A6.667 6.667 0 1 1 8 1.334a6.667 6.667 0 0 1 0 13.333zm0-1.333A5.333 5.333 0 1 0 8 2.667a5.333 5.333 0 0 0 0 10.667zM11 5 9.333 9.334 5 11l1.667-4.333L11 5zM8 8.667a.667.667 0 1 0 0-1.333.667.667 0 0 0 0 1.333z"
/>
</svg>
`;

exports[`OuiIcon props type compute is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -1725,6 +1755,21 @@ exports[`OuiIcon props type cut is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type dashboard is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9.333 14a.667.667 0 0 1-.666-.667V8c0-.368.298-.667.666-.667h4c.368 0 .667.299.667.667v5.333a.667.667 0 0 1-.667.667h-4ZM2.667 8.667A.667.667 0 0 1 2 8V2.667C2 2.298 2.298 2 2.667 2h4c.368 0 .666.298.666.667V8a.667.667 0 0 1-.666.667h-4ZM6 7.333v-4H3.333v4H6ZM2.667 14A.667.667 0 0 1 2 13.333v-2.666c0-.368.298-.667.667-.667h4c.368 0 .666.299.666.667v2.666a.667.667 0 0 1-.666.667h-4Zm.666-1.333H6v-1.334H3.333v1.334Zm6.667 0h2.667v-4H10v4Zm-1.333-10c0-.369.298-.667.666-.667h4c.368 0 .667.298.667.667v2.666a.667.667 0 0 1-.667.667h-4a.667.667 0 0 1-.666-.667V2.667ZM10 3.333v1.334h2.667V3.333H10Z"
/>
</svg>
`;

exports[`OuiIcon props type dashboardApp is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -3025,6 +3070,21 @@ exports[`OuiIcon props type function is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type functionAdd is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2.667 2A.667.667 0 0 0 2 2.667v4c0 .368.299.666.667.666h4a.667.667 0 0 0 .666-.666v-4A.667.667 0 0 0 6.667 2h-4zm0 6.667A.667.667 0 0 0 2 9.333v4c0 .369.299.667.667.667h4a.667.667 0 0 0 .666-.667v-4a.667.667 0 0 0-.666-.666h-4zm6.666 0a.667.667 0 0 0-.666.666v4c0 .369.298.667.666.667h4a.667.667 0 0 0 .667-.667v-4a.667.667 0 0 0-.667-.666h-4zm.667 4V10h2.667v2.667H10zM3.333 6V3.333H6V6H3.333zm0 6.667V10H6v2.667H3.333zm7.334-5.334v-2h-2V4h2V2H12v2h2v1.333h-2v2h-1.333z"
/>
</svg>
`;

exports[`OuiIcon props type gear is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -3863,6 +3923,21 @@ exports[`OuiIcon props type lensApp is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type lineChart is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.333 2v10.667H14V14H2V2h1.334zm10.195 2.195.943.943-3.805 3.805-2-2-2.862 2.862-.942-.943 3.804-3.805 2 2 2.862-2.862z"
/>
</svg>
`;

exports[`OuiIcon props type link is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7446,6 +7521,21 @@ exports[`OuiIcon props type power is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type pulse is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m6 5.026 4 9.333 2.44-5.692h2.893V7.333H11.56L10 10.974 6 1.641 3.56 7.333H.667v1.334H4.44L6 5.026z"
/>
</svg>
`;

exports[`OuiIcon props type push is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7500,6 +7590,21 @@ exports[`OuiIcon props type quote is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type radar is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m8.338 2.416-.682 1.18c-1.94-.585-3.676-.3-4.275.737-.784 1.36.527 3.769 3.12 5.265 2.591 1.496 5.333 1.428 6.118.069.598-1.037-.022-2.683-1.5-4.07l.683-1.182c2.055 1.806 2.975 4.18 1.972 5.918-1.24 2.148-4.793 2.237-7.94.42C2.685 8.935.986 5.815 2.226 3.667c1.003-1.738 3.52-2.128 6.11-1.252zm2.252-1.234 1.154.666-3.333 5.774-1.155-.667 3.334-5.773zm-6.102 12.15h6.846v1.334H3.345a.669.669 0 0 1-.676-.615.663.663 0 0 1 .087-.385l1.5-2.598 1.155.667-.923 1.598z"
/>
</svg>
`;

exports[`OuiIcon props type radius is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down Expand Up @@ -7672,6 +7777,21 @@ exports[`OuiIcon props type returnKey is rendered 1`] = `
</svg>
`;

exports[`OuiIcon props type rocket is rendered 1`] = `
<svg
aria-hidden="true"
class="ouiIcon ouiIcon--medium ouiIcon-isLoaded"
focusable="false"
role="img"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.333 8.667c0-3.392 1.935-6.291 4.667-7.455 2.731 1.164 4.666 4.063 4.666 7.455 0 .548-.05 1.084-.147 1.602l1.294 1.221c.11.104.136.27.064.402l-1.664 3.05a.333.333 0 0 1-.528.076l-1.49-1.49a.667.667 0 0 0-.471-.195H6.276a.667.667 0 0 0-.472.195l-1.49 1.49a.333.333 0 0 1-.528-.076l-1.663-3.05a.333.333 0 0 1 .064-.402l1.293-1.222a8.743 8.743 0 0 1-.147-1.601zm.984 4.464.545-.545A2 2 0 0 1 6.276 12h3.448a2 2 0 0 1 1.414.586l.544.545.655-1.2-.733-.693a1.334 1.334 0 0 1-.396-1.214c.083-.443.125-.897.125-1.357 0-2.58-1.33-4.867-3.333-5.973C5.996 3.8 4.666 6.087 4.666 8.667c0 .46.042.914.125 1.357.083.446-.066.903-.396 1.214l-.733.692.655 1.2zM8 8.667A1.333 1.333 0 1 1 8 6a1.333 1.333 0 0 1 0 2.667z"
/>
</svg>
`;

exports[`OuiIcon props type save is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
23 changes: 23 additions & 0 deletions src/components/icon/assets/bookOpen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

import * as React from 'react';
const OuiIconBookOpen = ({ title, titleId, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M8.667 14v1.333H7.333V14H2a.667.667 0 0 1-.667-.667V2.666C1.333 2.298 1.632 2 2 2h4a2.66 2.66 0 0 1 2 .902A2.66 2.66 0 0 1 10 2h4c.368 0 .667.298.667.666v10.667A.667.667 0 0 1 14 14H8.667zm4.666-1.333V3.333H10c-.736 0-1.333.597-1.333 1.334v8h4.666zm-6 0v-8c0-.737-.597-1.334-1.333-1.334H2.667v9.334h4.667z" />
</svg>
);
export const icon = OuiIconBookOpen;
29 changes: 29 additions & 0 deletions src/components/icon/assets/bookOpen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/components/icon/assets/compass.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

import * as React from 'react';
const OuiIconCompass = ({ title, titleId, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M8 14.667A6.667 6.667 0 1 1 8 1.334a6.667 6.667 0 0 1 0 13.333zm0-1.333A5.333 5.333 0 1 0 8 2.667a5.333 5.333 0 0 0 0 10.667zM11 5 9.333 9.334 5 11l1.667-4.333L11 5zM8 8.667a.667.667 0 1 0 0-1.333.667.667 0 0 0 0 1.333z" />
</svg>
);
export const icon = OuiIconCompass;
29 changes: 29 additions & 0 deletions src/components/icon/assets/compass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/components/icon/assets/dashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

import * as React from 'react';
const OuiIconDashboard = ({ title, titleId, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M9.333 14a.667.667 0 0 1-.666-.667V8c0-.368.298-.667.666-.667h4c.368 0 .667.299.667.667v5.333a.667.667 0 0 1-.667.667h-4ZM2.667 8.667A.667.667 0 0 1 2 8V2.667C2 2.298 2.298 2 2.667 2h4c.368 0 .666.298.666.667V8a.667.667 0 0 1-.666.667h-4ZM6 7.333v-4H3.333v4H6ZM2.667 14A.667.667 0 0 1 2 13.333v-2.666c0-.368.298-.667.667-.667h4c.368 0 .666.299.666.667v2.666a.667.667 0 0 1-.666.667h-4Zm.666-1.333H6v-1.334H3.333v1.334Zm6.667 0h2.667v-4H10v4Zm-1.333-10c0-.369.298-.667.666-.667h4c.368 0 .667.298.667.667v2.666a.667.667 0 0 1-.667.667h-4a.667.667 0 0 1-.666-.667V2.667ZM10 3.333v1.334h2.667V3.333H10Z" />
</svg>
);
export const icon = OuiIconDashboard;
29 changes: 29 additions & 0 deletions src/components/icon/assets/dashboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading