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

feat(icons): add alarms, text format, event streams and unsorted icons #1957

Merged
merged 2 commits into from Oct 21, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tender-teachers-visit.md
@@ -0,0 +1,5 @@
---
'@twilio-paste/icons': minor
---

[Icons] Added ProductAlarmsIcon and TextFormatIcon, Updated svgs for ProductEventStreamsIcon and UnsortedIcon
2 changes: 1 addition & 1 deletion packages/paste-icons/build.icon-list.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/paste-icons/json/icons.json

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions packages/paste-icons/src/ProductAlarmsIcon.tsx
@@ -0,0 +1,53 @@
/**
* This file was automatically generated with @twilio-labs/svg-to-react
*/
import * as React from 'react';
import {useUID} from '@twilio-paste/uid-library';
import {IconWrapper} from './helpers/IconWrapper';
import type {IconWrapperProps} from './helpers/IconWrapper';

export interface ProductAlarmsIconProps extends IconWrapperProps {
title?: string;
decorative: boolean;
}

const ProductAlarmsIcon: React.FC<ProductAlarmsIconProps> = ({
as,
display,
element = 'ICON',
size,
color,
title,
decorative,
}) => {
const titleId = `ProductAlarmsIcon-${useUID()}`;

if (!decorative && title == null) {
throw new Error('[ProductAlarmsIcon]: Missing a title for non-decorative icon.');
}

return (
<IconWrapper as={as} display={display} element={element} size={size} color={color}>
<svg
role="img"
aria-hidden={decorative}
width="100%"
height="100%"
fill="none"
viewBox="0 0 20 20"
aria-labelledby={titleId}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fill="currentColor"
fillRule="evenodd"
d="M10 3.08a4.376 4.376 0 00-3.111 1.303 4.48 4.48 0 00-1.291 3.151c0 2.794-.406 4.512-.837 5.55a5.742 5.742 0 01-.259.544h10.994a5.675 5.675 0 01-.256-.54c-.432-1.036-.838-2.754-.838-5.554a4.48 4.48 0 00-1.29-3.151A4.377 4.377 0 0010 3.08zm6.792 10.642a1.311 1.311 0 01-.15-.162c-.12-.148-.296-.415-.48-.856-.366-.882-.76-2.462-.76-5.17a5.48 5.48 0 00-1.58-3.855A5.377 5.377 0 0010 2.08c-1.434 0-2.81.576-3.822 1.6a5.48 5.48 0 00-1.58 3.854c0 2.702-.393 4.282-.76 5.166-.184.442-.361.71-.48.86a1.33 1.33 0 01-.152.163.5.5 0 00.294.905h13a.5.5 0 00.292-.906zm-8.42 1.874a.5.5 0 01.612.357c.072.275.235.52.464.695a1.32 1.32 0 001.604 0c.23-.175.392-.42.465-.695a.5.5 0 01.967.254c-.13.492-.42.926-.824 1.235a2.32 2.32 0 01-2.82 0 2.288 2.288 0 01-.824-1.235.5.5 0 01.357-.61z"
clipRule="evenodd"
/>
</svg>
</IconWrapper>
);
};

ProductAlarmsIcon.displayName = 'ProductAlarmsIcon';
export {ProductAlarmsIcon};
4 changes: 2 additions & 2 deletions packages/paste-icons/src/ProductEventStreamsIcon.tsx
Expand Up @@ -33,16 +33,16 @@ const ProductEventStreamsIcon: React.FC<ProductEventStreamsIconProps> = ({
aria-hidden={decorative}
width="100%"
height="100%"
viewBox="0 0 20 20"
fill="none"
viewBox="0 0 20 20"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the only changes in this file is moving viewBox and clipRule attributes to different lines. Is this intentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does seem weird that the SVG was out of sync with the React icon svg source. Wonder how that happened? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We reformatted this icon a while back and this is the reexport.

aria-labelledby={titleId}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fill="currentColor"
fillRule="evenodd"
clipRule="evenodd"
d="M5.496 10.562h2.791a.562.562 0 100-1.124H5.496A1.688 1.688 0 013.81 7.752V5.424a2.248 2.248 0 10-1.124 0v2.328A2.8 2.8 0 003.827 10a2.8 2.8 0 00-1.141 2.248v2.328a2.248 2.248 0 101.124 0v-2.328a1.688 1.688 0 011.686-1.686zM2.124 3.256a1.124 1.124 0 112.248 0 1.124 1.124 0 01-2.248 0zm2.248 13.488a1.124 1.124 0 11-2.248 0 1.124 1.124 0 012.248 0zm12.925-1.876v-2.62A2.798 2.798 0 0016.156 10a2.799 2.799 0 001.141-2.248v-2.62a1.967 1.967 0 10-1.124 0v2.62a1.688 1.688 0 01-1.686 1.686h-1.124V7.106a1.688 1.688 0 00-1.685-1.686H8.306A1.688 1.688 0 006.62 7.106v.646a.562.562 0 101.124 0v-.646a.563.563 0 01.562-.562h3.372a.563.563 0 01.561.562v5.704a.563.563 0 01-.562.562H8.306a.563.563 0 01-.562-.562v-.604a.562.562 0 00-1.124 0v.604a1.688 1.688 0 001.686 1.686h3.372a1.688 1.688 0 001.685-1.686v-2.248h1.124a1.687 1.687 0 011.686 1.686v2.62a1.967 1.967 0 101.124 0zm-8.533-3.476a.562.562 0 01.122-.182l1.053-1.054a.281.281 0 000-.397L8.886 8.706a.562.562 0 11.795-.795l1.053 1.053a1.404 1.404 0 010 1.987L9.68 12.004a.56.56 0 01-.796 0 .561.561 0 01-.121-.612z"
clipRule="evenodd"
/>
</svg>
</IconWrapper>
Expand Down
57 changes: 57 additions & 0 deletions packages/paste-icons/src/TextFormatIcon.tsx
@@ -0,0 +1,57 @@
/**
* This file was automatically generated with @twilio-labs/svg-to-react
*/
import * as React from 'react';
import {useUID} from '@twilio-paste/uid-library';
import {IconWrapper} from './helpers/IconWrapper';
import type {IconWrapperProps} from './helpers/IconWrapper';

export interface TextFormatIconProps extends IconWrapperProps {
title?: string;
decorative: boolean;
}

const TextFormatIcon: React.FC<TextFormatIconProps> = ({
as,
display,
element = 'ICON',
size,
color,
title,
decorative,
}) => {
const titleId = `TextFormatIcon-${useUID()}`;

if (!decorative && title == null) {
throw new Error('[TextFormatIcon]: Missing a title for non-decorative icon.');
}

return (
<IconWrapper as={as} display={display} element={element} size={size} color={color}>
<svg
role="img"
aria-hidden={decorative}
width="100%"
height="100%"
fill="none"
viewBox="0 0 20 20"
aria-labelledby={titleId}
>
{title ? <title id={titleId}>{title}</title> : null}
<path
fill="currentColor"
fillRule="evenodd"
d="M7.522 11.625h4.956l1.193 2.938a.625.625 0 001.158-.47l-3.811-9.384a1.118 1.118 0 00-.393-.504 1.08 1.08 0 00-1.25 0c-.18.127-.314.304-.393.504l-3.811 9.384a.625.625 0 101.158.47l1.193-2.938zm.508-1.25L10 5.525l1.97 4.85H8.03z"
clipRule="evenodd"
/>
<path
fill="currentColor"
d="M4 17c0-.345.28-.625.625-.625h10.75a.625.625 0 110 1.25H4.625A.625.625 0 014 17z"
/>
</svg>
</IconWrapper>
);
};

TextFormatIcon.displayName = 'TextFormatIcon';
export {TextFormatIcon};
4 changes: 1 addition & 3 deletions packages/paste-icons/src/UnsortedIcon.tsx
Expand Up @@ -32,9 +32,7 @@ const UnsortedIcon: React.FC<UnsortedIconProps> = ({as, display, element = 'ICON
{title ? <title id={titleId}>{title}</title> : null}
<path
fill="currentColor"
fillRule="evenodd"
d="M4.145 8.839a.598.598 0 01-.057-.704l.057-.076L6.65 5.161a.459.459 0 01.632-.063l.068.063L9.855 8.06a.596.596 0 010 .78.459.459 0 01-.632.063l-.069-.063L7.5 6.913V12.5a.5.5 0 01-1 0V6.914L4.846 8.84a.459.459 0 01-.632.063l-.069-.063zm11.71 2.322a.598.598 0 01.057.704l-.057.076-2.505 2.898a.459.459 0 01-.632.063l-.068-.063-2.505-2.898a.596.596 0 010-.78.459.459 0 01.632-.063l.069.063 1.654 1.926V7.5a.5.5 0 011 0v5.586l1.654-1.925a.459.459 0 01.632-.063l.069.063z"
clipRule="evenodd"
d="M4.088 7.135a.598.598 0 00.057.704l.069.063c.193.15.46.128.632-.063L6.5 5.914V11.5a.5.5 0 001 0V5.913l1.654 1.926.069.063c.193.15.46.128.632-.063a.596.596 0 000-.78L7.35 4.161l-.068-.063a.459.459 0 00-.632.063L4.145 7.06l-.057.076zm11.824 5.73a.598.598 0 00-.057-.704l-.069-.063a.459.459 0 00-.632.063L13.5 14.086V8.5a.5.5 0 00-1 0v5.587l-1.654-1.926-.069-.063a.459.459 0 00-.632.063.596.596 0 000 .78l2.505 2.898.068.063c.193.15.46.128.632-.063l2.505-2.898.057-.076z"
/>
</svg>
</IconWrapper>
Expand Down
3 changes: 3 additions & 0 deletions packages/paste-icons/svg/ProductAlarms.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.