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
feat: Change Block/Template icon (#4486)
Ivan Starkov285ab4a7e0e8
diff --git a/packages/icons/icons/add-template-instance.svg b/packages/icons/icons/add-template-instance.svgnew file mode 100644index 0000000000..7325c43218--- /dev/null+++ b/packages/icons/icons/add-template-instance.svg@@ -0,0 +1,10 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M4.33005 1.35591C4.14935 1.36011 3.98395 1.36734 3.83291 1.37979C3.45835 1.41065 3.11577 1.47679 2.79398 1.64143C2.30975 1.89009 1.89577 2.28665 1.63997 2.79678C1.47636 3.11778 1.41051 3.45947 1.37973 3.83297C1.36729 3.98402 1.36005 4.14945 1.35585 4.33017H2.65618C2.65989 4.18354 2.66583 4.05516 2.67534 3.93972C2.69948 3.64678 2.74334 3.49436 2.7987 3.38615L2.80141 3.38078C2.92564 3.13233 3.13177 2.92947 3.3865 2.79855C3.49468 2.74328 3.64709 2.6995 3.93966 2.6754C4.05509 2.66589 4.18345 2.65995 4.33005 2.65624V1.35591Z" fill="currentColor"/>+<path d="M11.67 13.3439C11.8166 13.3402 11.945 13.3343 12.0604 13.3248C12.353 13.3007 12.5054 13.2569 12.6136 13.2016C12.8683 13.0707 13.0744 12.8678 13.1987 12.6194L13.2014 12.614C13.2567 12.5058 13.3006 12.3534 13.3247 12.0605C13.3342 11.945 13.3402 11.8166 13.3439 11.67H14.6442C14.64 11.8507 14.6328 12.0162 14.6203 12.1672C14.5896 12.5407 14.5237 12.8824 14.3601 13.2034C14.1043 13.7135 13.6912 14.1096 13.207 14.3583C12.8852 14.523 12.5417 14.5895 12.1672 14.6204C12.0161 14.6328 11.8507 14.6401 11.67 14.6443V13.3439Z" fill="currentColor"/>+<path d="M6.33005 13.3501H9.67002V14.6501H6.33005V13.3501Z" fill="currentColor"/>+<path d="M2.65618 11.67C2.65989 11.8166 2.66583 11.945 2.67534 12.0605C2.69946 12.3531 2.74326 12.5056 2.79855 12.6137C2.92948 12.8684 3.13231 13.0745 3.38073 13.1987L3.38611 13.2014C3.49431 13.2568 3.64672 13.3007 3.93966 13.3248C4.05509 13.3343 4.18345 13.3402 4.33005 13.3439V14.6443C4.14935 14.6401 3.98395 14.6328 3.83291 14.6204C3.45944 14.5896 3.11777 14.5238 2.7968 14.3602C2.28663 14.1044 1.89049 13.6913 1.64182 13.207C1.47718 12.8852 1.41059 12.5418 1.37973 12.1672C1.36729 12.0162 1.36005 11.8507 1.35585 11.67H2.65618Z" fill="currentColor"/>+<path d="M2.65004 6.33017V9.67001H1.35004V6.33017H2.65004Z" fill="currentColor"/>+<path d="M2.65004 6.33017V9.67001H1.35004V6.33017H2.65004Z" fill="currentColor"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99998 1.35001C10.359 1.35001 10.65 1.64102 10.65 2.00001V10C10.65 10.359 10.359 10.65 9.99998 10.65C9.64099 10.65 9.34998 10.359 9.34998 10V2.00001C9.34998 1.64102 9.64099 1.35001 9.99998 1.35001Z" fill="currentColor"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M14.65 6.00001C14.65 6.35899 14.359 6.65001 14 6.65001H5.99998C5.64099 6.65001 5.34998 6.35899 5.34998 6.00001C5.34998 5.64102 5.64099 5.35001 5.99998 5.35001H14C14.359 5.35001 14.65 5.64102 14.65 6.00001Z" fill="currentColor"/>+</svg>diff --git a/packages/icons/src/__generated__/components.tsx b/packages/icons/src/__generated__/components.tsxindex 82a0921f9c..adc29bb9ca 100644--- a/packages/icons/src/__generated__/components.tsx+++ b/packages/icons/src/__generated__/components.tsx@@ -500,6 +500,41 @@ export const AccordionIcon: IconComponent = forwardRef();AccordionIcon.displayName = "AccordionIcon";+export const AddTemplateInstanceIcon: IconComponent = forwardRef(+ ({ 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+ fill="currentColor"+ d="M4.33 1.356a8.53 8.53 0 0 0-.497.024c-.375.03-.717.097-1.039.261A2.63 2.63 0 0 0 1.64 2.797c-.164.32-.23.662-.26 1.036a8.54 8.54 0 0 0-.024.497h1.3c.004-.146.01-.275.02-.39.023-.293.067-.446.123-.554l.002-.005c.125-.249.33-.452.585-.582.109-.056.261-.1.554-.124.115-.01.243-.015.39-.019v-1.3ZM11.67 13.344c.147-.004.275-.01.39-.02.293-.023.445-.067.554-.122.254-.131.46-.334.585-.583l.002-.005c.056-.108.1-.26.124-.554.01-.115.015-.243.019-.39h1.3c-.004.18-.011.346-.024.497-.03.374-.096.715-.26 1.036-.256.51-.669.907-1.153 1.155-.322.165-.665.231-1.04.262-.15.013-.316.02-.497.024v-1.3ZM6.33 13.35h3.34v1.3H6.33v-1.3ZM2.656 11.67c.004.147.01.275.02.39.023.293.067.446.123.554.13.254.333.46.582.585l.005.002c.108.056.26.1.554.124.115.01.243.015.39.019v1.3a8.573 8.573 0 0 1-.497-.024c-.374-.03-.715-.096-1.036-.26a2.628 2.628 0 0 1-1.155-1.153c-.165-.322-.231-.665-.262-1.04a8.54 8.54 0 0 1-.024-.497h1.3ZM2.65 6.33v3.34h-1.3V6.33h1.3Z"+ />+ <path fill="currentColor" d="M2.65 6.33v3.34h-1.3V6.33h1.3Z" />+ <path+ fill="currentColor"+ fillRule="evenodd"+ d="M10 1.35a.65.65 0 0 1 .65.65v8a.65.65 0 1 1-1.3 0V2a.65.65 0 0 1 .65-.65Z"+ clipRule="evenodd"+ />+ <path+ fill="currentColor"+ fillRule="evenodd"+ d="M14.65 6a.65.65 0 0 1-.65.65H6a.65.65 0 0 1 0-1.3h8a.65.65 0 0 1 .65.65Z"+ clipRule="evenodd"+ />+ </svg>+ );+ }+);+AddTemplateInstanceIcon.displayName = "AddTemplateInstanceIcon";+export const AiLoadingIcon: IconComponent = forwardRef(({ color = "currentColor", size = 16, ...props }, forwardedRef) => {return (diff --git a/packages/icons/src/__generated__/svg.ts b/packages/icons/src/__generated__/svg.tsindex 14c7c1654e..6b179e9229 100644--- a/packages/icons/src/__generated__/svg.ts+++ b/packages/icons/src/__generated__/svg.ts@@ -36,6 +36,8 @@ export const AccordionTriggerIcon = `<svg xmlns="http://www.w3.org/2000/svg" vieexport const AccordionIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M10.665 6.5a.5.5 0 0 1-.433-.25L9.077 4.248a.5.5 0 0 1 .433-.75h2.311a.5.5 0 0 1 .433.75L11.098 6.25a.5.5 0 0 1-.433.25ZM10.665 12.5a.5.5 0 0 1-.433-.25l-1.155-2.002a.5.5 0 0 1 .433-.75h2.311a.5.5 0 0 1 .433.75l-1.156 2.002a.5.5 0 0 1-.433.25Z"/><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-.029ZM13.35 5.2v2.15H2.65V5.2c0-.57 0-.96.025-1.26.024-.294.068-.446.122-.553.13-.254.336-.46.59-.59.107-.054.259-.098.552-.122.301-.024.69-.025 1.261-.025h5.6c.57 0 .96 0 1.26.025.294.024.446.068.553.122.254.13.46.336.59.59.054.107.098.26.122.552.025.301.025.69.025 1.261Zm0 3.45H2.65v2.15c0 .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.26V8.65Z" clip-rule="evenodd"/></svg>`;+export const AddTemplateInstanceIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" d="M4.33 1.356a8.53 8.53 0 0 0-.497.024c-.375.03-.717.097-1.039.261A2.63 2.63 0 0 0 1.64 2.797c-.164.32-.23.662-.26 1.036a8.54 8.54 0 0 0-.024.497h1.3c.004-.146.01-.275.02-.39.023-.293.067-.446.123-.554l.002-.005c.125-.249.33-.452.585-.582.109-.056.261-.1.554-.124.115-.01.243-.015.39-.019v-1.3ZM11.67 13.344c.147-.004.275-.01.39-.02.293-.023.445-.067.554-.122.254-.131.46-.334.585-.583l.002-.005c.056-.108.1-.26.124-.554.01-.115.015-.243.019-.39h1.3c-.004.18-.011.346-.024.497-.03.374-.096.715-.26 1.036-.256.51-.669.907-1.153 1.155-.322.165-.665.231-1.04.262-.15.013-.316.02-.497.024v-1.3ZM6.33 13.35h3.34v1.3H6.33v-1.3ZM2.656 11.67c.004.147.01.275.02.39.023.293.067.446.123.554.13.254.333.46.582.585l.005.002c.108.056.26.1.554.124.115.01.243.015.39.019v1.3a8.573 8.573 0 0 1-.497-.024c-.374-.03-.715-.096-1.036-.26a2.628 2.628 0 0 1-1.155-1.153c-.165-.322-.231-.665-.262-1.04a8.54 8.54 0 0 1-.024-.497h1.3ZM2.65 6.33v3.34h-1.3V6.33h1.3Z"/><path fill="currentColor" d="M2.65 6.33v3.34h-1.3V6.33h1.3Z"/><path fill="currentColor" fill-rule="evenodd" d="M10 1.35a.65.65 0 0 1 .65.65v8a.65.65 0 1 1-1.3 0V2a.65.65 0 0 1 .65-.65Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M14.65 6a.65.65 0 0 1-.65.65H6a.65.65 0 0 1 0-1.3h8a.65.65 0 0 1 .65.65Z" clip-rule="evenodd"/></svg>`;+export const AiLoadingIcon = `<svg xmlns="http://www.w3.org/2000/svg" id="evA4hI5dD261" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" viewBox="0 0 17 17" fill="currentColor" width="100%" height="100%" style="display: block;"><style>@keyframes evA4hI5dD263_s_do{0%,to{stroke-dashoffset:6.2}17.5%,82.5%{stroke-dashoffset:-6.24}}@keyframes evA4hI5dD264_s_do{0%,10%,90%,to{stroke-dashoffset:6.8}22.5%,77.5%{stroke-dashoffset:-6.8}}@keyframes evA4hI5dD265_s_do{0%,17.5%,82.5%,to{stroke-dashoffset:2.32}27.5%,72.5%{stroke-dashoffset:-2.32}}@keyframes evA4hI5dD266_s_do{0%,22.5%,77.5%,to{stroke-dashoffset:2.47}32.5%,67.5%{stroke-dashoffset:-2.47}}@keyframes evA4hI5dD267_s_do{0%,27.5%,72.5%,to{stroke-dashoffset:5.42}40%,60%{stroke-dashoffset:-5.42}}@keyframes evA4hI5dD268_s_do{0%,32.5%,67.5%,to{stroke-dashoffset:6.13}50%{stroke-dashoffset:-6.1}}#evA4hI5dD263{animation:evA4hI5dD263_s_do 4000ms linear infinite normal forwards}#evA4hI5dD264{animation:evA4hI5dD264_s_do 4000ms linear infinite normal forwards}#evA4hI5dD265{animation:evA4hI5dD265_s_do 4000ms linear infinite normal forwards}#evA4hI5dD266{animation:evA4hI5dD266_s_do 4000ms linear infinite normal forwards}#evA4hI5dD267{animation:evA4hI5dD267_s_do 4000ms linear infinite normal forwards}#evA4hI5dD268{animation:evA4hI5dD268_s_do 4000ms linear infinite normal forwards}</style><path fill="none" stroke="rgba(255,255,255,0.4)" stroke-dasharray="0" stroke-linecap="round" stroke-width="2.2" d="m2.816 12.956 1.513-6.051a2.563 2.563 0 0 1 4.974 0l1.159 4.634a1.888 1.888 0 0 0 1.816 1.417 1.892 1.892 0 0 0 1.872-1.872V4.956"/><path id="evA4hI5dD263" fill="none" stroke="#fff" stroke-dasharray="6.24" stroke-dashoffset="6.2" stroke-linecap="round" stroke-width="3.3" d="m2.816 12.956 1.513-6.051"/><path id="evA4hI5dD264" fill="none" stroke="#fff" stroke-dasharray="6.8" stroke-dashoffset="6.8" stroke-linecap="round" stroke-width="3.3" d="M4.329 6.905a2.563 2.563 0 0 1 4.974 0"/><path id="evA4hI5dD265" fill="none" stroke="#fff" stroke-dasharray="2.32" stroke-dashoffset="2.32" stroke-linecap="round" stroke-width="3.3" d="m9.303 6.905.561 2.243"/><path id="evA4hI5dD266" fill="none" stroke="#fff" stroke-dasharray="2.47" stroke-dashoffset="2.47" stroke-linecap="round" stroke-width="3.3" d="m9.864 9.148.598 2.391"/><path id="evA4hI5dD267" fill="none" stroke="#fff" stroke-dasharray="5.42" stroke-dashoffset="5.42" stroke-linecap="round" stroke-width="3.3" d="M10.462 11.54a1.888 1.888 0 0 0 1.816 1.416 1.892 1.892 0 0 0 1.872-1.872"/><path id="evA4hI5dD268" fill="none" stroke="#fff" stroke-dasharray="6.13" stroke-dashoffset="6.13" stroke-linecap="round" stroke-width="3.3" d="M14.15 11.084V4.956"/></svg>`;export const AiIcon = `<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="M3.04 12.326a1.1 1.1 0 0 1-2.134-.534l1.513-6.05a3.663 3.663 0 0 1 7.108 0l1.159 4.634c.085.34.399.584.749.584a.78.78 0 0 0 .772-.773V4.06a1.1 1.1 0 0 1 2.2 0v6.128c0 1.618-1.355 2.973-2.972 2.973a2.996 2.996 0 0 1-2.883-2.25l-1.16-4.636a1.464 1.464 0 0 0-2.84 0L3.04 12.326Z" clip-rule="evenodd"/></svg>`;diff --git a/packages/react-sdk/src/core-components.ts b/packages/react-sdk/src/core-components.tsindex b90752b0fe..1446b713f5 100644--- a/packages/react-sdk/src/core-components.ts+++ b/packages/react-sdk/src/core-components.ts@@ -3,7 +3,7 @@ import {ListViewIcon,PaintBrushIcon,SettingsIcon,- TriggerIcon,+ AddTemplateInstanceIcon,} from "@webstudio-is/icons/svg";import { html } from "@webstudio-is/sdk/normalize.css";import type {@@ -132,7 +132,7 @@ export const editableBlockTemplateMeta: WsComponentMeta = {category: "hidden",detachable: false,type: "container",- icon: TriggerIcon,+ icon: AddTemplateInstanceIcon,stylable: false,};