Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Use label icon for Label component instead of TextIcon (#1983)
Oleg Isonen574156c82fd5
diff --git a/packages/icons/icons/label.svg b/packages/icons/icons/label.svgnew file mode 100644index 0000000000..cd6b35fca5--- /dev/null+++ b/packages/icons/icons/label.svg@@ -0,0 +1,4 @@+<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.17304 1.3501H10.8269C11.3641 1.35009 11.8064 1.35008 12.1665 1.37951C12.5402 1.41004 12.8822 1.47547 13.2031 1.63893C13.7017 1.893 14.1071 2.29839 14.3611 2.79702C14.5246 3.11784 14.59 3.45987 14.6206 3.83357C14.65 4.19368 14.65 4.636 14.65 5.17316V10.827C14.65 11.3642 14.65 11.8065 14.6206 12.1666C14.59 12.5403 14.5246 12.8824 14.3611 13.2032C14.1071 13.7018 13.7017 14.1072 13.2031 14.3613C12.8822 14.5247 12.5402 14.5902 12.1665 14.6207C11.8064 14.6501 11.3641 14.6501 10.8269 14.6501H5.17304C4.63588 14.6501 4.19356 14.6501 3.83345 14.6207C3.45975 14.5902 3.11772 14.5247 2.7969 14.3613C2.29827 14.1072 1.89287 13.7018 1.63881 13.2032C1.47534 12.8824 1.40992 12.5403 1.37938 12.1666C1.34996 11.8065 1.34997 11.3642 1.34998 10.827V5.17316C1.34997 4.636 1.34996 4.19368 1.37938 3.83357C1.40992 3.45987 1.47534 3.11784 1.63881 2.79702C1.89287 2.29839 2.29827 1.893 2.7969 1.63893C3.11772 1.47547 3.45975 1.41004 3.83345 1.37951C4.19356 1.35008 4.63588 1.35009 5.17304 1.3501ZM3.93931 2.67519C3.646 2.69915 3.4941 2.74272 3.38709 2.79724C3.13307 2.92667 2.92655 3.13319 2.79712 3.38721C2.74259 3.49422 2.69903 3.64613 2.67507 3.93943C2.65048 4.24033 2.64998 4.62932 2.64998 5.2001V10.8001C2.64998 11.3709 2.65048 11.7599 2.67507 12.0608C2.69903 12.3541 2.74259 12.506 2.79712 12.613C2.92655 12.867 3.13307 13.0735 3.38709 13.203C3.4941 13.2575 3.646 13.301 3.93931 13.325C4.24021 13.3496 4.6292 13.3501 5.19998 13.3501H10.8C11.3708 13.3501 11.7597 13.3496 12.0606 13.325C12.3539 13.301 12.5059 13.2575 12.6129 13.203C12.8669 13.0735 13.0734 12.867 13.2028 12.613C13.2574 12.506 13.3009 12.3541 13.3249 12.0608C13.3495 11.7599 13.35 11.3709 13.35 10.8001V5.2001C13.35 4.62932 13.3495 4.24033 13.3249 3.93943C13.3009 3.64613 13.2574 3.49422 13.2028 3.38721C13.0734 3.13319 12.8669 2.92667 12.6129 2.79724C12.5059 2.74272 12.3539 2.69915 12.0606 2.67519C11.7597 2.6506 11.3708 2.6501 10.8 2.6501H5.19998C4.6292 2.6501 4.24021 2.6506 3.93931 2.67519ZM4.34998 4.67002C4.34998 4.31103 4.64099 4.02002 4.99998 4.02002H7.65655C8.01553 4.02002 8.30655 4.31103 8.30655 4.67002C8.30655 5.02901 8.01553 5.32002 7.65655 5.32002H6.98023V10.6801H10.3502V9.3301C10.3502 8.97111 10.6412 8.6801 11.0002 8.6801C11.3592 8.6801 11.6502 8.97111 11.6502 9.3301V11.3301C11.6502 11.6891 11.3592 11.9801 11.0002 11.9801H4.99998C4.64099 11.9801 4.34998 11.6891 4.34998 11.3301C4.34998 10.9711 4.64099 10.6801 4.99998 10.6801H5.68023V5.32002H4.99998C4.64099 5.32002 4.34998 5.02901 4.34998 4.67002Z" />+</svg>+\ No newline at end of filediff --git a/packages/icons/src/__generated__/index.ts b/packages/icons/src/__generated__/index.tsindex 1c7f37f8cd..54e5742eb9 100644--- a/packages/icons/src/__generated__/index.ts+++ b/packages/icons/src/__generated__/index.ts@@ -84,6 +84,7 @@ export * from "./j-c-end";export * from "./j-c-space-around";export * from "./j-c-space-between";export * from "./j-c-start";+export * from "./label";export * from "./link-2-unlinked";export * from "./link-2";export * from "./link";diff --git a/packages/icons/src/__generated__/label.tsx b/packages/icons/src/__generated__/label.tsxnew file mode 100644index 0000000000..2c8ca3b6a4--- /dev/null+++ b/packages/icons/src/__generated__/label.tsx@@ -0,0 +1,15 @@+// Generated from icons/label.svg++import { forwardRef } from "react";+import type { IconProps } from "../types";++// prettier-ignore+export const LabelIcon = forwardRef<SVGSVGElement, IconProps>(+ ({ color = "currentColor", size = 16, ...props }, forwardedRef) => {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width={size} height={size} fill={color} {...props} ref={forwardedRef}><path fillRule="evenodd" d="M5.173 1.35h5.654c.537 0 .98 0 1.34.03.373.03.715.095 1.036.259.499.254.904.66 1.158 1.158.164.32.229.663.26 1.037.029.36.029.802.029 1.34v5.653c0 .537 0 .98-.03 1.34-.03.373-.095.715-.259 1.036a2.65 2.65 0 0 1-1.158 1.158c-.32.164-.663.23-1.037.26-.36.03-.802.03-1.34.03H5.174c-.537 0-.98 0-1.34-.03-.373-.03-.715-.096-1.036-.26a2.65 2.65 0 0 1-1.158-1.158c-.164-.32-.23-.663-.26-1.036-.029-.36-.029-.803-.029-1.34V5.173c0-.537 0-.98.03-1.34.03-.373.095-.715.259-1.036a2.65 2.65 0 0 1 1.158-1.158c.32-.164.663-.229 1.036-.26.36-.029.803-.029 1.34-.029ZM3.939 2.675c-.293.024-.445.068-.552.122a1.35 1.35 0 0 0-.59.59c-.054.107-.098.26-.122.552-.025.301-.025.69-.025 1.261v5.6c0 .57 0 .96.025 1.26.024.294.068.446.122.553.13.254.336.46.59.59.107.055.259.098.552.122.301.025.69.025 1.261.025h5.6c.57 0 .96 0 1.26-.025.294-.024.446-.067.553-.122.254-.13.46-.336.59-.59.054-.107.098-.259.122-.552.025-.301.025-.69.025-1.26V5.2c0-.572 0-.96-.025-1.262-.024-.293-.068-.445-.122-.552a1.35 1.35 0 0 0-.59-.59c-.107-.054-.26-.098-.552-.122-.301-.024-.69-.025-1.261-.025H5.2c-.57 0-.96 0-1.26.025ZM4.35 4.67A.65.65 0 0 1 5 4.02h2.657a.65.65 0 0 1 0 1.3H6.98v5.36h3.37V9.33a.65.65 0 1 1 1.3 0v2a.65.65 0 0 1-.65.65H5a.65.65 0 1 1 0-1.3h.68V5.32H5a.65.65 0 0 1-.65-.65Z" clipRule="evenodd" /></svg>+ );+ }+);++LabelIcon.displayName = "LabelIcon";diff --git a/packages/icons/src/__generated__/svg/index.ts b/packages/icons/src/__generated__/svg/index.tsindex 32ed62ba74..d47118d073 100644--- a/packages/icons/src/__generated__/svg/index.ts+++ b/packages/icons/src/__generated__/svg/index.ts@@ -84,6 +84,7 @@ export { JCEndIcon } from "./j-c-end";export { JCSpaceAroundIcon } from "./j-c-space-around";export { JCSpaceBetweenIcon } from "./j-c-space-between";export { JCStartIcon } from "./j-c-start";+export { LabelIcon } from "./label";export { Link2UnlinkedIcon } from "./link-2-unlinked";export { Link2Icon } from "./link-2";export { LinkIcon } from "./link";diff --git a/packages/icons/src/__generated__/svg/label.ts b/packages/icons/src/__generated__/svg/label.tsnew file mode 100644index 0000000000..9b88ba4880--- /dev/null+++ b/packages/icons/src/__generated__/svg/label.ts@@ -0,0 +1 @@+export const LabelIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M5.173 1.35h5.654c.537 0 .98 0 1.34.03.373.03.715.095 1.036.259.499.254.904.66 1.158 1.158.164.32.229.663.26 1.037.029.36.029.802.029 1.34v5.653c0 .537 0 .98-.03 1.34-.03.373-.095.715-.259 1.036a2.65 2.65 0 0 1-1.158 1.158c-.32.164-.663.23-1.037.26-.36.03-.802.03-1.34.03H5.174c-.537 0-.98 0-1.34-.03-.373-.03-.715-.096-1.036-.26a2.65 2.65 0 0 1-1.158-1.158c-.164-.32-.23-.663-.26-1.036-.029-.36-.029-.803-.029-1.34V5.173c0-.537 0-.98.03-1.34.03-.373.095-.715.259-1.036a2.65 2.65 0 0 1 1.158-1.158c.32-.164.663-.229 1.036-.26.36-.029.803-.029 1.34-.029ZM3.939 2.675c-.293.024-.445.068-.552.122a1.35 1.35 0 0 0-.59.59c-.054.107-.098.26-.122.552-.025.301-.025.69-.025 1.261v5.6c0 .57 0 .96.025 1.26.024.294.068.446.122.553.13.254.336.46.59.59.107.055.259.098.552.122.301.025.69.025 1.261.025h5.6c.57 0 .96 0 1.26-.025.294-.024.446-.067.553-.122.254-.13.46-.336.59-.59.054-.107.098-.259.122-.552.025-.301.025-.69.025-1.26V5.2c0-.572 0-.96-.025-1.262-.024-.293-.068-.445-.122-.552a1.35 1.35 0 0 0-.59-.59c-.107-.054-.26-.098-.552-.122-.301-.024-.69-.025-1.261-.025H5.2c-.57 0-.96 0-1.26.025ZM4.35 4.67A.65.65 0 0 1 5 4.02h2.657a.65.65 0 0 1 0 1.3H6.98v5.36h3.37V9.33a.65.65 0 1 1 1.3 0v2a.65.65 0 0 1-.65.65H5a.65.65 0 1 1 0-1.3h.68V5.32H5a.65.65 0 0 1-.65-.65Z" clip-rule="evenodd"/></svg>`;diff --git a/packages/sdk-components-react/src/label.ws.tsx b/packages/sdk-components-react/src/label.ws.tsxindex dfb9feb9bb..27d733b808 100644--- a/packages/sdk-components-react/src/label.ws.tsx+++ b/packages/sdk-components-react/src/label.ws.tsx@@ -1,4 +1,4 @@-import { TextIcon } from "@webstudio-is/icons/svg";+import { LabelIcon } from "@webstudio-is/icons/svg";import {type WsComponentMeta,type WsComponentPropsMeta,@@ -21,7 +21,7 @@ export const meta: WsComponentMeta = {invalidAncestors: ["Button"],type: "container",label: "Input Label",- icon: TextIcon,+ icon: LabelIcon,states: defaultStates,presetStyle,order: 2,