Skip to content

Commit

Permalink
feat(icons): Add deployed-code icon (#880)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Bahls <[email protected]>
  • Loading branch information
tobias-bahls and Tobias Bahls authored Dec 6, 2024
1 parent 5f0956b commit 96ee175
Show file tree
Hide file tree
Showing 11 changed files with 310 additions and 150 deletions.
10 changes: 10 additions & 0 deletions .changeset/gold-cars-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"swirl-docs": minor
"@getflip/bridge": minor
"@getflip/swirl-components": minor
"@getflip/swirl-components-angular": minor
"@getflip/swirl-components-react": minor
"@getflip/swirl-icons": minor
---

Add new deployed-code icon
2 changes: 1 addition & 1 deletion packages/swirl-components/icons.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions packages/swirl-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ export namespace Components {
"color"?: SwirlIconColor1;
"size": SwirlIconSize;
}
interface SwirlIconDeployedCode {
"color"?: SwirlIconColor1;
"size": SwirlIconSize;
}
interface SwirlIconDescription {
"color"?: SwirlIconColor1;
"size": SwirlIconSize;
Expand Down Expand Up @@ -3426,6 +3430,12 @@ declare global {
prototype: HTMLSwirlIconDeleteElement;
new (): HTMLSwirlIconDeleteElement;
};
interface HTMLSwirlIconDeployedCodeElement extends Components.SwirlIconDeployedCode, HTMLStencilElement {
}
var HTMLSwirlIconDeployedCodeElement: {
prototype: HTMLSwirlIconDeployedCodeElement;
new (): HTMLSwirlIconDeployedCodeElement;
};
interface HTMLSwirlIconDescriptionElement extends Components.SwirlIconDescription, HTMLStencilElement {
}
var HTMLSwirlIconDescriptionElement: {
Expand Down Expand Up @@ -5507,6 +5517,7 @@ declare global {
"swirl-icon-dark-mode": HTMLSwirlIconDarkModeElement;
"swirl-icon-date-range": HTMLSwirlIconDateRangeElement;
"swirl-icon-delete": HTMLSwirlIconDeleteElement;
"swirl-icon-deployed-code": HTMLSwirlIconDeployedCodeElement;
"swirl-icon-description": HTMLSwirlIconDescriptionElement;
"swirl-icon-desktop": HTMLSwirlIconDesktopElement;
"swirl-icon-directory": HTMLSwirlIconDirectoryElement;
Expand Down Expand Up @@ -6445,6 +6456,10 @@ declare namespace LocalJSX {
"color"?: SwirlIconColor1;
"size"?: SwirlIconSize;
}
interface SwirlIconDeployedCode {
"color"?: SwirlIconColor1;
"size"?: SwirlIconSize;
}
interface SwirlIconDescription {
"color"?: SwirlIconColor1;
"size"?: SwirlIconSize;
Expand Down Expand Up @@ -7949,6 +7964,7 @@ declare namespace LocalJSX {
"swirl-icon-dark-mode": SwirlIconDarkMode;
"swirl-icon-date-range": SwirlIconDateRange;
"swirl-icon-delete": SwirlIconDelete;
"swirl-icon-deployed-code": SwirlIconDeployedCode;
"swirl-icon-description": SwirlIconDescription;
"swirl-icon-desktop": SwirlIconDesktop;
"swirl-icon-directory": SwirlIconDirectory;
Expand Down Expand Up @@ -8322,6 +8338,7 @@ declare module "@stencil/core" {
"swirl-icon-dark-mode": LocalJSX.SwirlIconDarkMode & JSXBase.HTMLAttributes<HTMLSwirlIconDarkModeElement>;
"swirl-icon-date-range": LocalJSX.SwirlIconDateRange & JSXBase.HTMLAttributes<HTMLSwirlIconDateRangeElement>;
"swirl-icon-delete": LocalJSX.SwirlIconDelete & JSXBase.HTMLAttributes<HTMLSwirlIconDeleteElement>;
"swirl-icon-deployed-code": LocalJSX.SwirlIconDeployedCode & JSXBase.HTMLAttributes<HTMLSwirlIconDeployedCodeElement>;
"swirl-icon-description": LocalJSX.SwirlIconDescription & JSXBase.HTMLAttributes<HTMLSwirlIconDescriptionElement>;
"swirl-icon-desktop": LocalJSX.SwirlIconDesktop & JSXBase.HTMLAttributes<HTMLSwirlIconDesktopElement>;
"swirl-icon-directory": LocalJSX.SwirlIconDirectory & JSXBase.HTMLAttributes<HTMLSwirlIconDirectoryElement>;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// DO NOT EDIT. THIS FILE GETS GENERATED VIA "yarn generate".

import { Component, Fragment, h, Prop } from "@stencil/core";
import { SwirlIconSize } from "../swirl-icon.types";
import { SwirlIconColor } from "../swirl-icon";
import classnames from "classnames";

@Component({
shadow: true,
styleUrl: "../swirl-icon.css",
tag: "swirl-icon-deployed-code",
})
export class SwirlIconDeployedCode {
@Prop() color?: SwirlIconColor;
@Prop() size: SwirlIconSize = 24;

render() {
const viewBoxSize = this.size === 20 ? 24 : this.size;

const styles = {
color: Boolean(this.color) ? `var(--s-icon-${this.color})` : undefined,
};

const className = classnames("swirl-icon", `swirl-icon--size-${this.size}`);

return (
<svg
aria-hidden="true"
class={className}
fill="none"
height={this.size}
part="icon"
style={styles}
viewBox={`0 0 ${viewBoxSize} ${viewBoxSize}`}
width={this.size}
xmlns="http://www.w3.org/2000/svg"
>
{this.size === 16 && (
<Fragment>
<path
d="M7.33333 12.9499V8.38325L3.33333 6.06659V10.6333L7.33333 12.9499ZM8.66667 12.9499L12.6667 10.6333V6.06659L8.66667 8.38325V12.9499ZM8 7.23325L11.95 4.94992L8 2.66659L4.05 4.94992L8 7.23325ZM2.66667 11.7999C2.45556 11.6777 2.29167 11.5166 2.175 11.3166C2.05833 11.1166 2 10.8944 2 10.6499V5.34992C2 5.10547 2.05833 4.88325 2.175 4.68325C2.29167 4.48325 2.45556 4.32214 2.66667 4.19992L7.33333 1.51659C7.54444 1.39436 7.76667 1.33325 8 1.33325C8.23333 1.33325 8.45556 1.39436 8.66667 1.51659L13.3333 4.19992C13.5444 4.32214 13.7083 4.48325 13.825 4.68325C13.9417 4.88325 14 5.10547 14 5.34992V10.6499C14 10.8944 13.9417 11.1166 13.825 11.3166C13.7083 11.5166 13.5444 11.6777 13.3333 11.7999L8.66667 14.4833C8.45556 14.6055 8.23333 14.6666 8 14.6666C7.76667 14.6666 7.54444 14.6055 7.33333 14.4833L2.66667 11.7999Z"
fill="currentColor"
/>
</Fragment>
)}
{(this.size === 20 || this.size === 24) && (
<Fragment>
<path
d="M11 19.425V12.575L5 9.1V15.95L11 19.425ZM13 19.425L19 15.95V9.1L13 12.575V19.425ZM12 10.85L17.925 7.425L12 4L6.075 7.425L12 10.85ZM4 17.7C3.68333 17.5167 3.4375 17.275 3.2625 16.975C3.0875 16.675 3 16.3417 3 15.975V8.025C3 7.65833 3.0875 7.325 3.2625 7.025C3.4375 6.725 3.68333 6.48333 4 6.3L11 2.275C11.3167 2.09167 11.65 2 12 2C12.35 2 12.6833 2.09167 13 2.275L20 6.3C20.3167 6.48333 20.5625 6.725 20.7375 7.025C20.9125 7.325 21 7.65833 21 8.025V15.975C21 16.3417 20.9125 16.675 20.7375 16.975C20.5625 17.275 20.3167 17.5167 20 17.7L13 21.725C12.6833 21.9083 12.35 22 12 22C11.65 22 11.3167 21.9083 11 21.725L4 17.7Z"
fill="currentColor"
/>
</Fragment>
)}
{this.size === 28 && (
<Fragment>
<path
d="M12.8333 22.6624V14.6708L5.83333 10.6166V18.6083L12.8333 22.6624ZM15.1667 22.6624L22.1667 18.6083V10.6166L15.1667 14.6708V22.6624ZM14 12.6583L20.9125 8.66242L14 4.66659L7.0875 8.66242L14 12.6583ZM4.66667 20.6499C4.29722 20.436 4.01042 20.1541 3.80625 19.8041C3.60208 19.4541 3.5 19.0652 3.5 18.6374V9.36242C3.5 8.93464 3.60208 8.54575 3.80625 8.19575C4.01042 7.84575 4.29722 7.56381 4.66667 7.34992L12.8333 2.65409C13.2028 2.4402 13.5917 2.33325 14 2.33325C14.4083 2.33325 14.7972 2.4402 15.1667 2.65409L23.3333 7.34992C23.7028 7.56381 23.9896 7.84575 24.1938 8.19575C24.3979 8.54575 24.5 8.93464 24.5 9.36242V18.6374C24.5 19.0652 24.3979 19.4541 24.1938 19.8041C23.9896 20.1541 23.7028 20.436 23.3333 20.6499L15.1667 25.3458C14.7972 25.5596 14.4083 25.6666 14 25.6666C13.5917 25.6666 13.2028 25.5596 12.8333 25.3458L4.66667 20.6499Z"
fill="currentColor"
/>
</Fragment>
)}
</svg>
);
}
}
58 changes: 58 additions & 0 deletions packages/swirl-components/vscode-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -5143,6 +5143,64 @@
}
]
},
{
"name": "swirl-icon-deployed-code",
"description": {
"kind": "markdown",
"value": ""
},
"attributes": [
{
"name": "color",
"description": "",
"values": [
{
"name": "critical"
},
{
"name": "default"
},
{
"name": "disabled"
},
{
"name": "highlight"
},
{
"name": "info"
},
{
"name": "on-action-primary"
},
{
"name": "on-image"
},
{
"name": "on-status"
},
{
"name": "on-surface-highlight"
},
{
"name": "on-surface-highlight-subdued"
},
{
"name": "strong"
},
{
"name": "success"
},
{
"name": "warning"
}
]
},
{
"name": "size",
"description": ""
}
]
},
{
"name": "swirl-icon-description",
"description": {
Expand Down
Binary file modified packages/swirl-icons/dart/lib/fonts/flip-legacy-icons.ttf
Binary file not shown.
Binary file modified packages/swirl-icons/dart/lib/fonts/swirl-icons.ttf
Binary file not shown.
Loading

0 comments on commit 96ee175

Please sign in to comment.