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.

visual fixes

Oleg Isonen8431faf113f1
diff --git a/apps/designer/app/designer/features/style-panel/search.tsx b/apps/designer/app/designer/features/style-panel/search.tsx
index 4ba80ce1c5..6feccbdf95 100644
--- a/apps/designer/app/designer/features/style-panel/search.tsx
+++ b/apps/designer/app/designer/features/style-panel/search.tsx
@@ -1,8 +1,6 @@
import { useRef, useState } from "react";
import { IconButton, TextField } from "@webstudio-is/design-system";
import { Cross2Icon, MagnifyingGlassIcon } from "@webstudio-is/icons";
-import { components } from "@webstudio-is/react-sdk";
-import type { SelectedInstanceData } from "~/shared/canvas-components";
type OnSearch = (search: string) => void;
@@ -19,10 +17,9 @@ const useSearch = (onSearch: OnSearch): [string, OnSearch] => {
type SearchProps = {
onSearch: OnSearch;
- selectedInstanceData: SelectedInstanceData;
};
-export const Search = ({ onSearch, selectedInstanceData }: SearchProps) => {
+export const Search = ({ onSearch }: SearchProps) => {
const [search, setSearch] = useSearch(onSearch);
const inputRef = useRef<HTMLInputElement>(null);
return (
diff --git a/apps/designer/app/designer/features/style-panel/style-panel.tsx b/apps/designer/app/designer/features/style-panel/style-panel.tsx
index b326756ce3..3535a96e20 100644
--- a/apps/designer/app/designer/features/style-panel/style-panel.tsx
+++ b/apps/designer/app/designer/features/style-panel/style-panel.tsx
@@ -56,10 +56,7 @@ export const StylePanel = ({
return (
<>
<Box css={{ px: "$3", py: "$1" }}>
- <Search
- onSearch={setSearch}
- selectedInstanceData={selectedInstanceData}
- />
+ <Search onSearch={setSearch} />
</Box>
<Box css={{ overflow: "auto" }}>
<StyleSettings
diff --git a/apps/designer/app/designer/shared/fonts-manager/fonts-manager.tsx b/apps/designer/app/designer/shared/fonts-manager/fonts-manager.tsx
index 77cb483be0..8f8f8f030c 100644
--- a/apps/designer/app/designer/shared/fonts-manager/fonts-manager.tsx
+++ b/apps/designer/app/designer/shared/fonts-manager/fonts-manager.tsx
@@ -2,8 +2,6 @@
import type { Asset } from "@webstudio-is/asset-uploader";
import {
Flex,
- Box,
- ComboboxListboxItem,
TextField,
DropdownMenu,
DropdownMenuTrigger,
@@ -84,28 +82,30 @@ const ItemMenu = ({ onDelete }: { onDelete: () => void }) => {
);
};
-const ListboxCategoryItem = styled(Text, {
- mx: "$4",
- my: "$2",
- listStyle: "none",
+const Listbox = styled("ul", {
+ display: "flex",
+ flexDirection: "column",
+ margin: 0,
+ padding: 0,
});
-const ListboxItem = styled(ComboboxListboxItem, {
- backgroundColor: "transparent",
+const ListboxItem = styled("li", {
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "space-between",
+ height: "$5",
+ paddingLeft: "$4",
+ listStyle: "none",
borderRadius: "$1",
- //borderWidth: 2,
- //borderStyle: "solid",
- //borderColor: "transparent",
"&:hover, &[aria-selected=true]": {
- color: "$hiContrast",
- backgroundColor: "transparent",
- //borderStyle: "solid",
- //borderColor: "$blue10",
-
boxShadow:
"inset 0px 0px 0px 1px $colors$blue10, 0px 0px 0px 1px $colors$blue10",
[vars.menuButtonVisibility]: "visible",
},
+ "&[disabled]": {
+ pointerEvents: "none",
+ color: "$hint",
+ },
});
type FontsManagerProps = {
@@ -146,22 +146,10 @@ export const FontsManager = ({ value, onChange }: FontsManagerProps) => {
},
});
- const { isEmpty, ...menuProps } = getMenuProps();
-
return (
- <Flex
- gap="3"
- direction="column"
- css={{ padding: "$2", overflow: "hidden" }}
- >
- <Box css={{ padding: "$2" }}>
+ <Flex direction="column" css={{ overflow: "hidden", py: "$1" }}>
+ <Flex css={{ py: "$2", px: "$3" }} gap="2" direction="column">
<AssetUpload type="font" />
- </Box>
-
- <Flex
- {...getComboboxProps()}
- css={{ flexDirection: "column", gap: "$3" }}
- >
<TextField
type="search"
autoFocus
@@ -177,49 +165,49 @@ export const FontsManager = ({ value, onChange }: FontsManagerProps) => {
}
{...getInputProps()}
/>
- <Flex
- {...menuProps}
- css={{
- flexDirection: "column",
- }}
- >
+ </Flex>
+
+ <Separator css={{ my: "$1" }} />
+
+ <Flex
+ {...getComboboxProps()}
+ css={{ flexDirection: "column", gap: "$3", px: "$3" }}
+ >
+ <Listbox {...getMenuProps()}>
{items.map((item, index) => {
if (item.type === "separator") {
return (
<>
- {index !== 0 && <Separator />}
- <ListboxCategoryItem
+ {index !== 0 && <Separator css={{ my: "$1" }} />}
+ <ListboxItem
{...getItemProps({ item, index })}
- as="li"
- variant="label"
- color="hint"
key={index}
+ aria-disabled
disabled
>
- {item.label}
- </ListboxCategoryItem>
+ <Text variant="label" truncate>
+ {item.label}
+ </Text>
+ </ListboxItem>
</>
);
}
return (
- <ListboxItem
- {...getItemProps({ item, index })}
- key={index}
- suffix={
- item.type === "uploaded" && (
- <ItemMenu
- onDelete={() => {
- handleDeleteByLabel(item.label);
- }}
- />
- )
- }
- >
- {item.label}
+ <ListboxItem {...getItemProps({ item, index })} key={index}>
+ <Text variant="label" color="contrast" truncate>
+ {item.label}
+ </Text>
+ {item.type === "uploaded" && (
+ <ItemMenu
+ onDelete={() => {
+ handleDeleteByLabel(item.label);
+ }}
+ />
+ )}
</ListboxItem>
);
})}
- </Flex>
+ </Listbox>
</Flex>
</Flex>
);
diff --git a/packages/design-system/src/components/popover.tsx b/packages/design-system/src/components/popover.tsx
index 1e7bf750f0..4b328154ce 100644
--- a/packages/design-system/src/components/popover.tsx
+++ b/packages/design-system/src/components/popover.tsx
@@ -79,7 +79,7 @@ export const PopoverHeader = ({ title }: PopoverHeaderProps) => {
</IconButton>
</PopoverClose>
</Flex>
- <Separator css={{ height: 2 }} />
+ <Separator />
</>
);
};