Skip to content

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.

feat: Custom font family (#3845)

Oleg Isonen918ca2fa6fa1
diff --git a/apps/builder/app/builder/features/settings-panel/settings-panel.tsx b/apps/builder/app/builder/features/settings-panel/settings-panel.tsx
index ab75ecb8cc..27967bf382 100644
--- a/apps/builder/app/builder/features/settings-panel/settings-panel.tsx
+++ b/apps/builder/app/builder/features/settings-panel/settings-panel.tsx
@@ -9,7 +9,7 @@ import {
Text,
rawTheme,
} from "@webstudio-is/design-system";
-import { UploadIcon } from "@webstudio-is/icons";
+import { UpgradeIcon } from "@webstudio-is/icons";
import { useStore } from "@nanostores/react";
import { $userPlanFeatures } from "~/builder/shared/nano-states";
import cmsUpgradeBanner from "./cms-upgrade-banner.svg?url";
@@ -39,7 +39,7 @@ export const SettingsPanelContainer = ({
any other structured content.
</Text>
<Flex align="center" gap={1}>
- <UploadIcon />
+ <UpgradeIcon />
<Link
color="inherit"
target="_blank"
diff --git a/apps/builder/app/builder/features/settings-panel/variable-popover.tsx b/apps/builder/app/builder/features/settings-panel/variable-popover.tsx
index 614665dabf..cdfbcee19f 100644
--- a/apps/builder/app/builder/features/settings-panel/variable-popover.tsx
+++ b/apps/builder/app/builder/features/settings-panel/variable-popover.tsx
@@ -15,7 +15,7 @@ import {
useEffect,
} from "react";
import { mergeRefs } from "@react-aria/utils";
-import { CopyIcon, RefreshIcon, UploadIcon } from "@webstudio-is/icons";
+import { CopyIcon, RefreshIcon, UpgradeIcon } from "@webstudio-is/icons";
import {
Box,
Button,
@@ -687,7 +687,7 @@ export const VariablePopoverTrigger = forwardRef<
<PanelBanner>
<Text>Resource fetching is part of the CMS functionality.</Text>
<Flex align="center" gap={1}>
- <UploadIcon />
+ <UpgradeIcon />
<Link
color="inherit"
target="_blank"
diff --git a/apps/builder/app/builder/features/style-panel/controls/font-family/font-family-control.tsx b/apps/builder/app/builder/features/style-panel/controls/font-family/font-family-control.tsx
index 70af5effbf..01d806463e 100644
--- a/apps/builder/app/builder/features/style-panel/controls/font-family/font-family-control.tsx
+++ b/apps/builder/app/builder/features/style-panel/controls/font-family/font-family-control.tsx
@@ -1,9 +1,44 @@
-import { DeprecatedTextField } from "@webstudio-is/design-system";
+import {
+ Combobox,
+ EnhancedTooltip,
+ Flex,
+ NestedInputButton,
+} from "@webstudio-is/design-system";
import { FontsManager } from "~/builder/shared/fonts-manager";
import type { ControlProps } from "../types";
import { FloatingPanel } from "~/builder/shared/floating-panel";
-import { useState } from "react";
+import { forwardRef, useMemo, useState, type ComponentProps } from "react";
import { toValue } from "@webstudio-is/css-engine";
+import { matchSorter } from "match-sorter";
+import { useAssets } from "~/builder/shared/assets";
+import { toItems } from "~/builder/shared/fonts-manager";
+import { UploadIcon } from "@webstudio-is/icons";
+import { styleConfigByName } from "../../shared/configs";
+import { parseCssValue } from "@webstudio-is/css-data";
+
+type Item = { value: string; label?: string };
+
+const matchOrSuggestToCreate = (
+ search: string,
+ items: Array<Item>,
+ itemToString: (item: Item) => string
+): Array<Item> => {
+ const matched = matchSorter(items, search, {
+ keys: [itemToString],
+ });
+
+ if (
+ search.trim() !== "" &&
+ itemToString(matched[0]).toLocaleLowerCase() !==
+ search.toLocaleLowerCase().trim()
+ ) {
+ matched.unshift({
+ value: search.trim(),
+ label: `Custom Font: "${search.trim()}"`,
+ });
+ }
+ return matched;
+};
export const FontFamilyControl = ({
property,
@@ -11,28 +46,77 @@ export const FontFamilyControl = ({
setProperty,
}: ControlProps) => {
const value = currentStyle[property]?.value;
- const [isOpen, setIsOpen] = useState(false);
-
const setValue = setProperty(property);
+ const [intermediateValue, setIntermediateValue] = useState<
+ string | undefined
+ >();
+ const { assetContainers } = useAssets("font");
+ const items = useMemo(() => {
+ const fallbacks = styleConfigByName("fontFamily").items;
+ return [...toItems(assetContainers), ...fallbacks].map(({ label }) => ({
+ value: label,
+ }));
+ }, [assetContainers]);
+
+ const itemValue = useMemo(() => {
+ // Replacing the quotes just to make it look cleaner in the UI
+ return toValue(value, (value) => value).replace(/"/g, "");
+ }, [value]);
return (
- <FloatingPanel
- title="Fonts"
- content={
- <FontsManager
- value={toValue(value)}
- onChange={(newValue) => {
- setValue({ type: "fontFamily", value: [newValue] });
- }}
- />
- }
- onOpenChange={setIsOpen}
- >
- <DeprecatedTextField
- // Replacing the quotes just to make it look cleaner in the UI
- defaultValue={toValue(value).replace(/"/, "")}
- state={isOpen ? "active" : undefined}
+ <Flex>
+ <Combobox<Item>
+ suffix={
+ <FloatingPanel
+ title="Fonts"
+ content={
+ <FontsManager
+ value={toValue(value)}
+ onChange={(newValue) => {
+ setValue({ type: "fontFamily", value: [newValue] });
+ }}
+ />
+ }
+ >
+ <FontsManagerButton />
+ </FloatingPanel>
+ }
+ defaultHighlightedIndex={0}
+ items={items}
+ itemToString={(item) => item?.label ?? item?.value ?? ""}
+ onItemHighlight={(item) => {
+ const value = item === null ? itemValue : item.value;
+ setValue(
+ { type: "fontFamily", value: [value] },
+ { isEphemeral: true }
+ );
+ }}
+ onItemSelect={(item) => {
+ setValue(parseCssValue("fontFamily", item.value));
+ setIntermediateValue(undefined);
+ }}
+ value={{ value: intermediateValue ?? itemValue }}
+ onInputChange={(value) => {
+ setIntermediateValue(value);
+ }}
+ match={matchOrSuggestToCreate}
/>
- </FloatingPanel>
+ </Flex>
);
};
+
+const FontsManagerButton = forwardRef<
+ HTMLButtonElement,
+ ComponentProps<typeof NestedInputButton>
+>((props, ref) => {
+ return (
+ <Flex>
+ <EnhancedTooltip content="Open Font Manager">
+ <NestedInputButton {...props} ref={ref} tabIndex={-1}>
+ <UploadIcon />
+ </NestedInputButton>
+ </EnhancedTooltip>
+ </Flex>
+ );
+});
+FontsManagerButton.displayName = "FontsManagerButton";
diff --git a/apps/builder/app/builder/features/style-panel/controls/font-weight/font-weight-control.tsx b/apps/builder/app/builder/features/style-panel/controls/font-weight/font-weight-control.tsx
index 94d7d36281..30298c42a2 100644
--- a/apps/builder/app/builder/features/style-panel/controls/font-weight/font-weight-control.tsx
+++ b/apps/builder/app/builder/features/style-panel/controls/font-weight/font-weight-control.tsx
@@ -14,7 +14,7 @@ type FontWeightItem = {
const allFontWeights: Array<FontWeightItem> = (
Object.keys(fontWeights) as Array<FontWeight>
).map((weight) => ({
- label: `${fontWeights[weight].label} (${weight})`,
+ label: `${weight} - ${fontWeights[weight].label}`,
weight,
}));
diff --git a/apps/builder/app/builder/features/topbar/menu/menu.tsx b/apps/builder/app/builder/features/topbar/menu/menu.tsx
index 7137a3cce0..1645bd0be5 100644
--- a/apps/builder/app/builder/features/topbar/menu/menu.tsx
+++ b/apps/builder/app/builder/features/topbar/menu/menu.tsx
@@ -27,7 +27,7 @@ import { $authPermit, $authTokenPermissions } from "~/shared/nano-states";
import { emitCommand } from "~/builder/shared/commands";
import { MenuButton } from "./menu-button";
import { $isProjectSettingsOpen } from "~/shared/nano-states/seo";
-import { UploadIcon } from "@webstudio-is/icons";
+import { UpgradeIcon } from "@webstudio-is/icons";
const ViewMenuItem = () => {
const [clientSettings, setClientSetting] = useClientSettings();
@@ -213,7 +213,7 @@ export const Menu = () => {
}}
css={{ gap: theme.spacing[3] }}
>
- <UploadIcon />
+ <UpgradeIcon />
<div>Upgrade to Pro</div>
</DropdownMenuItem>
</>
diff --git a/apps/builder/app/builder/shared/fonts-manager/index.ts b/apps/builder/app/builder/shared/fonts-manager/index.ts
index 8aa42a101c..9e0ea30fc2 100644
--- a/apps/builder/app/builder/shared/fonts-manager/index.ts
+++ b/apps/builder/app/builder/shared/fonts-manager/index.ts
@@ -1 +1,2 @@
export * from "./fonts-manager";
+export { toItems } from "./item-utils";
diff --git a/apps/builder/app/dashboard/header.tsx b/apps/builder/app/dashboard/header.tsx
index 33b944459d..d3edd80be0 100644
--- a/apps/builder/app/dashboard/header.tsx
+++ b/apps/builder/app/dashboard/header.tsx
@@ -1,6 +1,6 @@
import {
ChevronDownIcon,
- UploadIcon,
+ UpgradeIcon,
WebstudioIcon,
} from "@webstudio-is/icons";
import {
@@ -95,7 +95,7 @@ const Menu = ({
gap: theme.spacing[3],
}}
>
- <UploadIcon />
+ <UpgradeIcon />
<div>Upgrade to Pro</div>
</DropdownMenuItem>
)}
diff --git a/packages/css-engine/src/core/to-value.ts b/packages/css-engine/src/core/to-value.ts
index 684f581573..bbc60c71a0 100644
--- a/packages/css-engine/src/core/to-value.ts
+++ b/packages/css-engine/src/core/to-value.ts
@@ -8,16 +8,15 @@ const fallbackTransform: TransformValue = (styleValue) => {
if (styleValue.type === "fontFamily") {
const firstFontFamily = styleValue.value[0];
- const fallbacks = SYSTEM_FONTS.get(firstFontFamily ?? "Arial");
- const fontFamily: string[] = [...styleValue.value];
- if (Array.isArray(fallbacks)) {
- fontFamily.push(...fallbacks);
- } else {
- fontFamily.push(DEFAULT_FONT_FALLBACK);
- }
+ const fontFamily = styleValue.value;
+ const fallbacks = SYSTEM_FONTS.get(firstFontFamily) ?? [
+ DEFAULT_FONT_FALLBACK,
+ ];
+ const value = Array.from(new Set([...fontFamily, ...fallbacks]));
+
return {
type: "fontFamily",
- value: fontFamily,
+ value,
};
}
};
diff --git a/packages/design-system/src/components/combobox.tsx b/packages/design-system/src/components/combobox.tsx
index c3f69c00c5..2d29e26574 100644
--- a/packages/design-system/src/components/combobox.tsx
+++ b/packages/design-system/src/components/combobox.tsx
@@ -450,6 +450,7 @@ export const useCombobox = <Item,>({
type ComboboxProps<Item> = UseComboboxProps<Item> &
Omit<ComponentProps<"input">, "value"> & {
color?: ComponentProps<typeof InputField>["color"];
+ suffix?: ComponentProps<typeof InputField>["suffix"];
};
export const Combobox = <Item,>({
@@ -457,6 +458,7 @@ export const Combobox = <Item,>({
getDescription,
placeholder,
color,
+ suffix,
...props
}: ComboboxProps<Item>) => {
const combobox = useCombobox<Item>(props);
@@ -471,14 +473,18 @@ export const Combobox = <Item,>({
return (
<ComboboxRoot open={combobox.isOpen}>
- <div {...combobox.getComboboxProps()}>
+ <Box {...combobox.getComboboxProps()}>
<ComboboxAnchor>
<InputField
{...combobox.getInputProps()}
placeholder={placeholder}
autoFocus={autoFocus}
color={color}
- suffix={<NestedInputButton {...combobox.getToggleButtonProps()} />}
+ suffix={
+ suffix ?? (
+ <NestedInputButton {...combobox.getToggleButtonProps()} />
+ )
+ }
/>
</ComboboxAnchor>
<ComboboxContent>
@@ -504,7 +510,7 @@ export const Combobox = <Item,>({
)}
</ComboboxListbox>
</ComboboxContent>
- </div>
+ </Box>
</ComboboxRoot>
);
};
diff --git a/packages/fonts/src/constants.ts b/packages/fonts/src/constants.ts
index 9c3294931b..1696a5c240 100644
--- a/packages/fonts/src/constants.ts
+++ b/packages/fonts/src/constants.ts
@@ -5,6 +5,8 @@ export const SYSTEM_FONTS = new Map([
["Times New Roman", ["sans"]],
["Courier New", ["monospace"]],
["system-ui", []],
+ ["SimSun", ["Songti SC, sans-serif"]],
+ ["PingFang SC", ["Microsoft Ya Hei", "sans-serif"]],
]);
export const DEFAULT_FONT_FALLBACK = "sans-serif";
diff --git a/packages/icons/icons/upgrade.svg b/packages/icons/icons/upgrade.svg
new file mode 100644
index 0000000000..f6e515c03d
--- /dev/null
+++ b/packages/icons/icons/upgrade.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.0001 2.6501C5.04537 2.6501 2.6501 5.04537 2.6501 8.0001C2.6501 10.9548 5.04537 13.3501 8.0001 13.3501C10.9548 13.3501 13.3501 10.9548 13.3501 8.0001C13.3501 5.04537 10.9548 2.6501 8.0001 2.6501ZM1.3501 8.0001C1.3501 4.3274 4.3274 1.3501 8.0001 1.3501C11.6728 1.3501 14.6501 4.3274 14.6501 8.0001C14.6501 11.6728 11.6728 14.6501 8.0001 14.6501C4.3274 14.6501 1.3501 11.6728 1.3501 8.0001Z" />
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5405 4.87365C7.79434 4.61981 8.2059 4.61981 8.45974 4.87365L11.1264 7.54032C11.3802 7.79416 11.3802 8.20571 11.1264 8.45955C10.8726 8.7134 10.461 8.7134 10.2072 8.45955L8.65012 6.90251V10.6666C8.65012 11.0256 8.3591 11.3166 8.00012 11.3166C7.64113 11.3166 7.35012 11.0256 7.35012 10.6666V6.90251L5.79307 8.45955C5.53923 8.7134 5.12767 8.7134 4.87383 8.45955C4.61999 8.20571 4.61999 7.79416 4.87383 7.54032L7.5405 4.87365Z"/>
+</svg>
\ No newline at end of file
diff --git a/packages/icons/icons/upload.svg b/packages/icons/icons/upload.svg
index f6e515c03d..4a62f08041 100644
--- a/packages/icons/icons/upload.svg
+++ b/packages/icons/icons/upload.svg
@@ -1,4 +1,14 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.0001 2.6501C5.04537 2.6501 2.6501 5.04537 2.6501 8.0001C2.6501 10.9548 5.04537 13.3501 8.0001 13.3501C10.9548 13.3501 13.3501 10.9548 13.3501 8.0001C13.3501 5.04537 10.9548 2.6501 8.0001 2.6501ZM1.3501 8.0001C1.3501 4.3274 4.3274 1.3501 8.0001 1.3501C11.6728 1.3501 14.6501 4.3274 14.6501 8.0001C14.6501 11.6728 11.6728 14.6501 8.0001 14.6501C4.3274 14.6501 1.3501 11.6728 1.3501 8.0001Z" />
- <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5405 4.87365C7.79434 4.61981 8.2059 4.61981 8.45974 4.87365L11.1264 7.54032C11.3802 7.79416 11.3802 8.20571 11.1264 8.45955C10.8726 8.7134 10.461 8.7134 10.2072 8.45955L8.65012 6.90251V10.6666C8.65012 11.0256 8.3591 11.3166 8.00012 11.3166C7.64113 11.3166 7.35012 11.0256 7.35012 10.6666V6.90251L5.79307 8.45955C5.53923 8.7134 5.12767 8.7134 4.87383 8.45955C4.61999 8.20571 4.61999 7.79416 4.87383 7.54032L7.5405 4.87365Z"/>
-</svg>
\ No newline at end of file
+<svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+>
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M3.31487 4.64217C3.86909 2.57327 5.75611 1.04999 8.00001 1.04999C10.2439 1.04999 12.1309 2.57327 12.6851 4.64217C14.3823 5.02294 15.65 6.5381 15.65 8.34999C15.65 9.66812 14.9783 10.8291 13.9616 11.5097C13.6633 11.7094 13.2595 11.6294 13.0598 11.3311C12.8602 11.0328 12.9401 10.6291 13.2384 10.4294C13.9101 9.97982 14.35 9.21615 14.35 8.34999C14.35 7.04837 13.3548 5.97845 12.0842 5.86078C11.7897 5.8335 11.5508 5.61084 11.5028 5.31899C11.2259 3.63488 9.76239 2.34999 8.00001 2.34999C6.23762 2.34999 4.77408 3.63488 4.49722 5.31899C4.44924 5.61084 4.21028 5.8335 3.91577 5.86078C2.64522 5.97845 1.65001 7.04837 1.65001 8.34999C1.65001 9.21615 2.08995 9.97982 2.76157 10.4294C3.05989 10.6291 3.13985 11.0328 2.94016 11.3311C2.74047 11.6294 2.33676 11.7094 2.03844 11.5097C1.02169 10.8291 0.350006 9.66812 0.350006 8.34999C0.350006 6.5381 1.6177 5.02293 3.31487 4.64217ZM7.35001 9.56923L5.65963 11.2596C5.40578 11.5134 4.99423 11.5134 4.74039 11.2596C4.48655 11.0058 4.48655 10.5942 4.74039 10.3404L7.54039 7.54037C7.79423 7.28653 8.20578 7.28653 8.45963 7.54037L11.2596 10.3404C11.5135 10.5942 11.5135 11.0058 11.2596 11.2596C11.0058 11.5134 10.5942 11.5134 10.3404 11.2596L8.65001 9.56923V14.3C8.65001 14.659 8.35899 14.95 8.00001 14.95C7.64102 14.95 7.35001 14.659 7.35001 14.3V9.56923Z"
+ fill="currentColor"
+ />
+</svg>
diff --git a/packages/icons/src/__generated__/components.tsx b/packages/icons/src/__generated__/components.tsx
index 718dc6ee4c..8180915d0b 100644
--- a/packages/icons/src/__generated__/components.tsx
+++ b/packages/icons/src/__generated__/components.tsx
@@ -4360,7 +4360,7 @@ export const TriggerIcon = forwardRef<SVGSVGElement, IconProps>(
);
TriggerIcon.displayName = "TriggerIcon";
-export const UploadIcon = forwardRef<SVGSVGElement, IconProps>(
+export const UpgradeIcon = forwardRef<SVGSVGElement, IconProps>(
({ color = "currentColor", size = 16, ...props }, forwardedRef) => {
return (
<svg
@@ -4386,6 +4386,30 @@ export const UploadIcon = forwardRef<SVGSVGElement, IconProps>(
);
}
);
+UpgradeIcon.displayName = "UpgradeIcon";
+
+export const UploadIcon = 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
+ fill="currentColor"
+ fillRule="evenodd"
+ d="M3.315 4.642a4.852 4.852 0 0 1 9.37 0 3.801 3.801 0 0 1 1.277 6.868.65.65 0 0 1-.724-1.08 2.5 2.5 0 0 0-1.154-4.569.65.65 0 0 1-.581-.542 3.551 3.551 0 0 0-7.006 0 .65.65 0 0 1-.581.542 2.5 2.5 0 0 0-1.154 4.568.65.65 0 1 1-.724 1.08 3.801 3.801 0 0 1 1.276-6.868ZM7.35 9.57l-1.69 1.69a.65.65 0 0 1-.92-.919l2.8-2.8a.65.65 0 0 1 .92 0l2.8 2.8a.65.65 0 1 1-.92.92L8.65 9.57v4.73a.65.65 0 1 1-1.3 0V9.57Z"
+ clipRule="evenodd"
+ />
+ </svg>
+ );
+ }
+);
UploadIcon.displayName = "UploadIcon";
export const VideoIcon = forwardRef<SVGSVGElement, IconProps>(
diff --git a/packages/icons/src/__generated__/svg.ts b/packages/icons/src/__generated__/svg.ts
index 8be103b378..048387fd1a 100644
--- a/packages/icons/src/__generated__/svg.ts
+++ b/packages/icons/src/__generated__/svg.ts
@@ -356,7 +356,9 @@ export const TooltipIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
export const TriggerIcon = `<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.733 1.98a.473.473 0 0 0-.483.462v7.04a.65.65 0 0 1-1.3 0V7.63a.473.473 0 0 0-.483-.461.473.473 0 0 0-.484.46v1.482c0 2.697 2.234 4.906 5.017 4.906 2.783 0 5.017-2.209 5.017-4.906V7.035a.473.473 0 0 0-.484-.462.473.473 0 0 0-.483.462v.218a.65.65 0 1 1-1.3 0v-.85a.503.503 0 0 0-.483-.497.503.503 0 0 0-.484.496v.851a.65.65 0 0 1-1.3 0V5.7A.473.473 0 0 0 8 5.239a.473.473 0 0 0-.483.461v1.553a.65.65 0 0 1-1.3 0V2.442a.473.473 0 0 0-.484-.461Zm1.784.462v1.563a1.801 1.801 0 0 1 2 .77c.228-.108.48-.169.75-.169a1.78 1.78 0 0 1 1.502.837c.233-.109.492-.17.764-.17.973 0 1.784.777 1.784 1.762V9.11c0 3.44-2.84 6.206-6.317 6.206-3.476 0-6.317-2.767-6.317-6.206V7.63c0-.985.811-1.761 1.784-1.761.167 0 .329.022.483.065V2.442c0-.985.81-1.761 1.783-1.761.973 0 1.784.776 1.784 1.761Z" clip-rule="evenodd"/></svg>`;
-export const UploadIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M8 2.65a5.35 5.35 0 1 0 0 10.7 5.35 5.35 0 0 0 0-10.7ZM1.35 8a6.65 6.65 0 1 1 13.3 0 6.65 6.65 0 0 1-13.3 0Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M7.54 4.874a.65.65 0 0 1 .92 0l2.666 2.666a.65.65 0 0 1-.919.92L8.65 6.903v3.764a.65.65 0 1 1-1.3 0V6.903L5.793 8.46a.65.65 0 1 1-.92-.92L7.54 4.874Z" clip-rule="evenodd"/></svg>`;
+export const UpgradeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M8 2.65a5.35 5.35 0 1 0 0 10.7 5.35 5.35 0 0 0 0-10.7ZM1.35 8a6.65 6.65 0 1 1 13.3 0 6.65 6.65 0 0 1-13.3 0Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M7.54 4.874a.65.65 0 0 1 .92 0l2.666 2.666a.65.65 0 0 1-.919.92L8.65 6.903v3.764a.65.65 0 1 1-1.3 0V6.903L5.793 8.46a.65.65 0 1 1-.92-.92L7.54 4.874Z" clip-rule="evenodd"/></svg>`;
+
+export const UploadIcon = `<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" fill-rule="evenodd" d="M3.315 4.642a4.852 4.852 0 0 1 9.37 0 3.801 3.801 0 0 1 1.277 6.868.65.65 0 0 1-.724-1.08 2.5 2.5 0 0 0-1.154-4.569.65.65 0 0 1-.581-.542 3.551 3.551 0 0 0-7.006 0 .65.65 0 0 1-.581.542 2.5 2.5 0 0 0-1.154 4.568.65.65 0 1 1-.724 1.08 3.801 3.801 0 0 1 1.276-6.868ZM7.35 9.57l-1.69 1.69a.65.65 0 0 1-.92-.919l2.8-2.8a.65.65 0 0 1 .92 0l2.8 2.8a.65.65 0 1 1-.92.92L8.65 9.57v4.73a.65.65 0 1 1-1.3 0V9.57Z" clip-rule="evenodd"/></svg>`;
export const VideoIcon = `<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.251 7.5 6.933 5.29A.6.6 0 0 0 6 5.788v4.424a.6.6 0 0 0 .933.5l3.318-2.213a.6.6 0 0 0 0-.998Z"/><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.025Z" clip-rule="evenodd"/></svg>`;