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.

styling the fonts selector list and making other styles more consistent

Oleg Isonen99d3e65b3f34
diff --git a/apps/designer/app/designer/designer.tsx b/apps/designer/app/designer/designer.tsx
index e69252688c..f83e56ef82 100644
--- a/apps/designer/app/designer/designer.tsx
+++ b/apps/designer/app/designer/designer.tsx
@@ -244,7 +244,7 @@ const NavigatorPanel = ({ publish, isPreviewMode }: NavigatorPanelProps) => {
<SidePanel gridArea="navigator" isPreviewMode={isPreviewMode}>
<Box
css={{
- borderRight: "1px solid $slate7",
+ borderRight: "1px solid $muted",
width: PANEL_WIDTH,
height: "100%",
}}
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx
index 90f966767b..377b879768 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/components/component-thumb.tsx
@@ -6,7 +6,7 @@ const Thumb = styled(Flex, {
px: "$1",
width: 72,
height: 72,
- border: "1px solid $slate6",
+ border: "1px solid $muted",
userSelect: "none",
color: "$hiContrast",
cursor: "grab",
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/pages/settings-panel.tsx b/apps/designer/app/designer/features/sidebar-left/panels/pages/settings-panel.tsx
index 44b7f6aa1f..ccae3e1202 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/pages/settings-panel.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/pages/settings-panel.tsx
@@ -49,7 +49,7 @@ export const SettingsPanel = ({
flexGrow: 1,
width: 424,
background: "$loContrast",
- borderRight: "1px solid $slate7",
+ borderRight: "1px solid $muted",
position: "relative",
}}
>
diff --git a/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx b/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx
index b09942843e..8ed380e786 100644
--- a/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx
+++ b/apps/designer/app/designer/features/style-panel/controls/select/select-control.tsx
@@ -29,7 +29,7 @@ export const SelectControl = ({
gap: "calc($sizes$1 / 2)",
paddingLeft: "calc($sizes$4 / 2)",
height: "calc($sizes$5 + $sizes$1)",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
textTransform: "capitalize",
fontWeight: "inherit",
"&:hover": { background: "none" },
diff --git a/apps/designer/app/designer/features/style-panel/search.tsx b/apps/designer/app/designer/features/style-panel/search.tsx
index 299ce19933..4ba80ce1c5 100644
--- a/apps/designer/app/designer/features/style-panel/search.tsx
+++ b/apps/designer/app/designer/features/style-panel/search.tsx
@@ -31,7 +31,7 @@ export const Search = ({ onSearch, selectedInstanceData }: SearchProps) => {
value={search}
inputRef={inputRef}
prefix={
- <IconButton aria-label="Search">
+ <IconButton aria-label="Search" css={{ color: "$hint" }} tabIndex={-1}>
<MagnifyingGlassIcon />
</IconButton>
}
@@ -48,7 +48,7 @@ export const Search = ({ onSearch, selectedInstanceData }: SearchProps) => {
</IconButton>
)
}
- placeholder={components[selectedInstanceData.component].label}
+ placeholder="Search"
onChange={(event) => {
const { value } = event.target;
setSearch(value.toLowerCase());
diff --git a/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx b/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx
index dc2f8aad55..b1c9f279f1 100644
--- a/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx
+++ b/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx
@@ -84,7 +84,7 @@ const StyledTrigger = styled(SelectPrimitive.SelectTrigger, {
alignItems: "center",
color: "$hiContrast",
"&:hover": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
},
"&:focus": {
backgroundColor: "$blue10",
diff --git a/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx b/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx
index 72811d8bd9..61bdc303b4 100644
--- a/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx
+++ b/apps/designer/app/designer/features/style-panel/shared/value-picker-popover.tsx
@@ -43,12 +43,7 @@ export const ValuePickerPopover = ({
{children}
</PopoverTrigger>
<PopoverPortal>
- <PopoverContent
- sideOffset={sideOffset}
- side="right"
- hideArrow
- css={{ minHeight: 500 }}
- >
+ <PopoverContent sideOffset={sideOffset} side="right" hideArrow>
<PopoverHeader title={title} />
{content}
</PopoverContent>
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 2161be9a49..77cb483be0 100644
--- a/apps/designer/app/designer/shared/fonts-manager/fonts-manager.tsx
+++ b/apps/designer/app/designer/shared/fonts-manager/fonts-manager.tsx
@@ -13,34 +13,61 @@ import {
Text,
DropdownMenuPortal,
useCombobox,
+ Separator,
+ styled,
} from "@webstudio-is/design-system";
import { AssetUpload, PreviewAsset, useAssets } from "~/designer/shared/assets";
import { SYSTEM_FONTS } from "@webstudio-is/fonts";
import { DotsHorizontalIcon, MagnifyingGlassIcon } from "@webstudio-is/icons";
import { useMemo } from "react";
+import { cssVars } from "@webstudio-is/css-vars";
const getItems = (
assets: Array<Asset | PreviewAsset>
-): Array<{ label: string }> => {
- const system = Array.from(SYSTEM_FONTS.keys()).map((label) => ({ label }));
+): Array<{ label: string; type: "uploaded" | "system" | "separator" }> => {
+ const system = Array.from(SYSTEM_FONTS.keys()).map((label) => ({
+ label,
+ type: "system",
+ }));
// We can have 2+ assets with the same family name, so we use a map to dedupe.
const uploaded = new Map();
for (const asset of assets) {
// @todo need to teach ts the right type from useAssets
if ("meta" in asset && "family" in asset.meta) {
- uploaded.set(asset.meta.family, { label: asset.meta.family });
+ uploaded.set(asset.meta.family, {
+ label: asset.meta.family,
+ type: "uploaded",
+ });
}
}
- return [...system, ...uploaded.values()];
+ return [
+ { label: "Uploaded", type: "separator" },
+ ...uploaded.values(),
+ { label: "System", type: "separator" },
+ ...system,
+ ];
};
+const vars = {
+ menuButtonVisibility: cssVars.define("menuButton"),
+};
+
+const MenuButton = styled(IconButton, {
+ visibility: cssVars.use(vars.menuButtonVisibility, "hidden"),
+ color: "$hint",
+ "&:hover": {
+ color: "$hiContrast",
+ backgroundColor: "transparent",
+ },
+});
+
const ItemMenu = ({ onDelete }: { onDelete: () => void }) => {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <IconButton aria-label="Font menu button">
+ <MenuButton aria-label="Font menu">
<DotsHorizontalIcon />
- </IconButton>
+ </MenuButton>
</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuContent>
@@ -57,6 +84,30 @@ const ItemMenu = ({ onDelete }: { onDelete: () => void }) => {
);
};
+const ListboxCategoryItem = styled(Text, {
+ mx: "$4",
+ my: "$2",
+ listStyle: "none",
+});
+
+const ListboxItem = styled(ComboboxListboxItem, {
+ backgroundColor: "transparent",
+ 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",
+ },
+});
+
type FontsManagerProps = {
value: string;
onChange: (value: string) => void;
@@ -101,7 +152,7 @@ export const FontsManager = ({ value, onChange }: FontsManagerProps) => {
<Flex
gap="3"
direction="column"
- css={{ padding: "$1", paddingTop: "$2", height: 460, overflow: "hidden" }}
+ css={{ padding: "$2", overflow: "hidden" }}
>
<Box css={{ padding: "$2" }}>
<AssetUpload type="font" />
@@ -113,29 +164,62 @@ export const FontsManager = ({ value, onChange }: FontsManagerProps) => {
>
<TextField
type="search"
- prefix={<MagnifyingGlassIcon />}
+ autoFocus
+ placeholder="Search"
+ prefix={
+ <IconButton
+ aria-label="Search"
+ css={{ color: "$hint" }}
+ tabIndex={-1}
+ >
+ <MagnifyingGlassIcon />
+ </IconButton>
+ }
{...getInputProps()}
/>
- <fieldset>
- <legend>Choose an item</legend>
- <Flex {...menuProps} css={{ flexDirection: "column" }}>
- {items.map((item, index) => {
+ <Flex
+ {...menuProps}
+ css={{
+ flexDirection: "column",
+ }}
+ >
+ {items.map((item, index) => {
+ if (item.type === "separator") {
return (
- <ComboboxListboxItem
- {...getItemProps({ item, index })}
- key={index}
- >
- {item.label}
- <ItemMenu
- onDelete={() => {
- handleDeleteByLabel(item.label);
- }}
- />
- </ComboboxListboxItem>
+ <>
+ {index !== 0 && <Separator />}
+ <ListboxCategoryItem
+ {...getItemProps({ item, index })}
+ as="li"
+ variant="label"
+ color="hint"
+ key={index}
+ disabled
+ >
+ {item.label}
+ </ListboxCategoryItem>
+ </>
);
- })}
- </Flex>
- </fieldset>
+ }
+ return (
+ <ListboxItem
+ {...getItemProps({ item, index })}
+ key={index}
+ suffix={
+ item.type === "uploaded" && (
+ <ItemMenu
+ onDelete={() => {
+ handleDeleteByLabel(item.label);
+ }}
+ />
+ )
+ }
+ >
+ {item.label}
+ </ListboxItem>
+ );
+ })}
+ </Flex>
</Flex>
</Flex>
);
diff --git a/packages/design-system/src/components/accordion.tsx b/packages/design-system/src/components/accordion.tsx
index 7f6b0e754f..6236f398f9 100644
--- a/packages/design-system/src/components/accordion.tsx
+++ b/packages/design-system/src/components/accordion.tsx
@@ -25,10 +25,10 @@ export const Accordion = React.forwardRef<
Accordion.displayName = "Accordion";
const StyledItem = styled(AccordionPrimitive.Item, {
- borderTop: "1px solid $colors$slate6",
+ borderTop: "1px solid $colors$muted",
"&:last-of-type": {
- borderBottom: "1px solid $colors$slate6",
+ borderBottom: "1px solid $colors$muted",
},
});
diff --git a/packages/design-system/src/components/alert.tsx b/packages/design-system/src/components/alert.tsx
index b1fa34f3d8..e2acb2c869 100644
--- a/packages/design-system/src/components/alert.tsx
+++ b/packages/design-system/src/components/alert.tsx
@@ -22,11 +22,11 @@ export const Alert = styled("div", {
variant: {
loContrast: {
backgroundColor: "$loContrast",
- borderColor: "$slate6",
+ borderColor: "$muted",
},
gray: {
backgroundColor: "$slate2",
- borderColor: "$slate6",
+ borderColor: "$muted",
},
blue: {
backgroundColor: "$blue2",
diff --git a/packages/design-system/src/components/app-bar.tsx b/packages/design-system/src/components/app-bar.tsx
index 473a639f88..b0c5c6b3c8 100644
--- a/packages/design-system/src/components/app-bar.tsx
+++ b/packages/design-system/src/components/app-bar.tsx
@@ -72,7 +72,7 @@ export const AppBar = styled("div", {
border: "true",
color: "plain",
css: {
- borderColor: "$slate6",
+ borderColor: "$muted",
},
},
{
@@ -86,7 +86,7 @@ export const AppBar = styled("div", {
border: "true",
color: "loContrast",
css: {
- borderColor: "$slate6",
+ borderColor: "$muted",
},
},
],
diff --git a/packages/design-system/src/components/avatar.tsx b/packages/design-system/src/components/avatar.tsx
index 2f39c8c1ce..1c4a2587c7 100644
--- a/packages/design-system/src/components/avatar.tsx
+++ b/packages/design-system/src/components/avatar.tsx
@@ -67,7 +67,7 @@ const StyledAvatar = styled(AvatarPrimitive.Root, {
color: "$loContrast",
},
gray: {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
},
tomato: {
backgroundColor: "$tomato5",
diff --git a/packages/design-system/src/components/banner.tsx b/packages/design-system/src/components/banner.tsx
index 3a41eb7469..7228008a1e 100644
--- a/packages/design-system/src/components/banner.tsx
+++ b/packages/design-system/src/components/banner.tsx
@@ -55,7 +55,7 @@ export const Banner = styled("div", {
border: "true",
variant: "gray",
css: {
- borderColor: "$slate6",
+ borderColor: "$muted",
},
},
{
@@ -69,7 +69,7 @@ export const Banner = styled("div", {
border: "true",
variant: "loContrast",
css: {
- borderColor: "$slate6",
+ borderColor: "$muted",
},
},
],
diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsx
index eb9ad25417..80470a084f 100644
--- a/packages/design-system/src/components/button.tsx
+++ b/packages/design-system/src/components/button.tsx
@@ -7,7 +7,7 @@ export const Button = styled("button", {
boxSizing: "border-box",
border: "none",
userSelect: "none",
- transition: "all 200ms ease-out",
+ transition: "all 150ms ease-out",
"&::before": {
boxSizing: "border-box",
},
@@ -32,7 +32,7 @@ export const Button = styled("button", {
"&:disabled": {
backgroundColor: "$slate2",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
color: "$slate8",
pointerEvents: "none",
},
@@ -40,7 +40,7 @@ export const Button = styled("button", {
variants: {
size: {
"1": {
- borderRadius: 2,
+ borderRadius: "$1",
height: "$5",
px: "$3",
fontSize: "$1",
@@ -61,7 +61,7 @@ export const Button = styled("button", {
variant: {
gray: {
backgroundColor: "$loContrast",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
color: "$hiContrast",
"@hover": {
"&:hover": {
@@ -82,7 +82,7 @@ export const Button = styled("button", {
},
blue: {
backgroundColor: "$blue10",
- color: "$loContrast",
+ color: "white",
"@hover": {
"&:hover": {
backgroundColor: "$loContrast",
@@ -191,12 +191,12 @@ export const Button = styled("button", {
color: "$slate11",
"@hover": {
"&:hover": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
boxShadow: "inset 0 0 0 1px $colors$slate8",
},
},
"&:active": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
},
"&:focus": {
boxShadow: "inset 0 0 0 1px $colors$slate8, 0 0 0 1px $colors$slate8",
@@ -209,12 +209,12 @@ export const Button = styled("button", {
pointerEvents: "none",
"@hover": {
"&:hover": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
boxShadow: "inset 0 0 0 1px $colors$slate8",
},
},
"&:active": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
},
"&:focus": {
boxShadow: "inset 0 0 0 1px $colors$slate8",
diff --git a/packages/design-system/src/components/checkbox.tsx b/packages/design-system/src/components/checkbox.tsx
index d44cf6f4ee..405639c4fc 100644
--- a/packages/design-system/src/components/checkbox.tsx
+++ b/packages/design-system/src/components/checkbox.tsx
@@ -25,7 +25,7 @@ const StyledCheckbox = styled(CheckboxPrimitive.Root, {
WebkitTapHighlightColor: "rgba(0,0,0,0)",
color: "$hiContrast",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
overflow: "hidden",
"@hover": {
"&:hover": {
diff --git a/packages/design-system/src/components/combobox.tsx b/packages/design-system/src/components/combobox.tsx
index c81ee172c4..575344aa01 100644
--- a/packages/design-system/src/components/combobox.tsx
+++ b/packages/design-system/src/components/combobox.tsx
@@ -56,9 +56,10 @@ export const ListboxItemBase: ForwardRefRenderFunction<
disabled?: boolean;
selected?: boolean;
highlighted?: boolean;
+ suffix?: JSX.Element;
}
> = (props, ref) => {
- const { disabled, selected, highlighted, children, ...rest } = props;
+ const { disabled, selected, highlighted, children, suffix, ...rest } = props;
return (
<ListboxItem
ref={ref}
@@ -70,6 +71,7 @@ export const ListboxItemBase: ForwardRefRenderFunction<
{selected && <CheckIcon />}
<Box css={{ gridColumn: 2 }}>{children}</Box>
</Grid>
+ {suffix}
</ListboxItem>
);
};
diff --git a/packages/design-system/src/components/control-group.tsx b/packages/design-system/src/components/control-group.tsx
index 5d5bcef7d7..fd4cdb40a1 100644
--- a/packages/design-system/src/components/control-group.tsx
+++ b/packages/design-system/src/components/control-group.tsx
@@ -13,7 +13,7 @@ export const ControlGroup = styled("div", {
[`& ${Button}`]: {
borderRadius: 0,
boxShadow:
- "inset 0 1px $colors$slate7, inset -1px 0 $colors$slate7, inset 0 -1px $colors$slate7",
+ "inset 0 1px $colors$muted, inset -1px 0 $colors$muted, inset 0 -1px $colors$muted",
"&:hover": {
boxShadow:
"-1px 0 $colors$slate8, inset 0 1px $colors$slate8, inset -1px 0 $colors$slate8, inset 0 -1px $colors$slate8",
@@ -25,7 +25,7 @@ export const ControlGroup = styled("div", {
"&:first-child": {
borderTopLeftRadius: "$1",
borderBottomLeftRadius: "$1",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
"&:hover": {
boxShadow: "inset 0 0 0 1px $colors$slate8",
},
@@ -37,7 +37,7 @@ export const ControlGroup = styled("div", {
borderTopRightRadius: "$1",
borderBottomRightRadius: "$1",
boxShadow:
- "inset 0 1px $colors$slate7, inset -1px 0 $colors$slate7, inset 0 -1px $colors$slate7",
+ "inset 0 1px $colors$muted, inset -1px 0 $colors$muted, inset 0 -1px $colors$muted",
"&:focus": {
boxShadow: "inset 0 0 0 1px $colors$slate8, 0 0 0 1px $colors$slate8",
},
@@ -46,7 +46,7 @@ export const ControlGroup = styled("div", {
[`& ${TextField}`]: {
borderRadius: 0,
boxShadow:
- "inset 0 1px $colors$slate7, inset -1px 0 $colors$slate7, inset 0 -1px $colors$slate7",
+ "inset 0 1px $colors$muted, inset -1px 0 $colors$muted, inset 0 -1px $colors$muted",
"&:focus": {
zIndex: 1,
boxShadow:
@@ -55,7 +55,7 @@ export const ControlGroup = styled("div", {
"&:first-child": {
borderTopLeftRadius: "$1",
borderBottomLeftRadius: "$1",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
"&:focus": {
boxShadow:
"inset 0px 0px 0px 1px $colors$blue8, 0px 0px 0px 1px $colors$blue8",
@@ -65,7 +65,7 @@ export const ControlGroup = styled("div", {
borderTopRightRadius: "$1",
borderBottomRightRadius: "$1",
boxShadow:
- "inset 0 1px $colors$slate7, inset -1px 0 $colors$slate7, inset 0 -1px $colors$slate7",
+ "inset 0 1px $colors$muted, inset -1px 0 $colors$muted, inset 0 -1px $colors$muted",
"&:focus": {
boxShadow:
"inset 0px 0px 0px 1px $colors$blue8, 0px 0px 0px 1px $colors$blue8",
@@ -75,7 +75,7 @@ export const ControlGroup = styled("div", {
[`& ${Select}`]: {
borderRadius: 0,
boxShadow:
- "inset 0 1px $colors$slate7, inset -1px 0 $colors$slate7, inset 0 -1px $colors$slate7",
+ "inset 0 1px $colors$muted, inset -1px 0 $colors$muted, inset 0 -1px $colors$muted",
"&:focus-within": {
boxShadow:
"inset 0px 0px 0px 1px $colors$blue8, 0px 0px 0px 1px $colors$blue8",
@@ -83,7 +83,7 @@ export const ControlGroup = styled("div", {
"&:first-child": {
borderTopLeftRadius: "$1",
borderBottomLeftRadius: "$1",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
"&:focus-within": {
boxShadow:
"inset 0px 0px 0px 1px $colors$blue8, 0px 0px 0px 1px $colors$blue8",
@@ -93,7 +93,7 @@ export const ControlGroup = styled("div", {
borderTopRightRadius: "$1",
borderBottomRightRadius: "$1",
boxShadow:
- "inset 0 1px $colors$slate7, inset -1px 0 $colors$slate7, inset 0 -1px $colors$slate7",
+ "inset 0 1px $colors$muted, inset -1px 0 $colors$muted, inset 0 -1px $colors$muted",
"&:focus-within": {
boxShadow:
"inset 0px 0px 0px 1px $colors$blue8, 0px 0px 0px 1px $colors$blue8",
diff --git a/packages/design-system/src/components/icon-button-with-menu.tsx b/packages/design-system/src/components/icon-button-with-menu.tsx
index f6fd3afc02..a5c1c254a8 100644
--- a/packages/design-system/src/components/icon-button-with-menu.tsx
+++ b/packages/design-system/src/components/icon-button-with-menu.tsx
@@ -19,7 +19,7 @@ const itemStyles = {
all: "unset",
fontSize: "$2",
lineHeight: 1,
- color: "$colors$slate12",
+ color: "$hiContrast",
borderRadius: "$radii$1",
display: "flex",
alignItems: "center",
diff --git a/packages/design-system/src/components/icon-button.tsx b/packages/design-system/src/components/icon-button.tsx
index 77c7c429db..1bce384139 100644
--- a/packages/design-system/src/components/icon-button.tsx
+++ b/packages/design-system/src/components/icon-button.tsx
@@ -24,17 +24,17 @@ export const IconButton = styled("button", {
boxSizing: "border-box",
},
"&:hover, &:active": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
outline: "none",
},
"&:focus": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
outline: "none",
},
"&:disabled": {
pointerEvents: "none",
backgroundColor: "transparent",
- color: "$slate6",
+ color: "$muted",
},
variants: {
diff --git a/packages/design-system/src/components/link.tsx b/packages/design-system/src/components/link.tsx
index e890f710c7..f490224419 100644
--- a/packages/design-system/src/components/link.tsx
+++ b/packages/design-system/src/components/link.tsx
@@ -47,7 +47,7 @@ export const Link = styled("a", {
textDecorationColor: "$slate4",
"@hover": {
"&:hover": {
- textDecorationColor: "$slate7",
+ textDecorationColor: "$muted",
},
},
"&:focus": {
diff --git a/packages/design-system/src/components/menu.tsx b/packages/design-system/src/components/menu.tsx
index a4b7fb09c0..f0f958f75c 100644
--- a/packages/design-system/src/components/menu.tsx
+++ b/packages/design-system/src/components/menu.tsx
@@ -29,7 +29,7 @@ export const itemCss = css(baseItemCss, {
color: "white",
},
"&[data-disabled], &[aria-disabled]": {
- color: "$slate9",
+ color: "$hint",
},
});
@@ -46,7 +46,7 @@ export const menuCss = css({
export const separatorCss = css({
height: 1,
my: "$1",
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
});
export const Menu = styled(MenuPrimitive.Root, menuCss);
diff --git a/packages/design-system/src/components/panel.tsx b/packages/design-system/src/components/panel.tsx
index b4a361629b..6101f499ab 100644
--- a/packages/design-system/src/components/panel.tsx
+++ b/packages/design-system/src/components/panel.tsx
@@ -2,7 +2,7 @@ import { css, styled } from "../stitches.config";
export const panelStyles = css({
overflow: "auto",
- backgroundColor: "$colors$slate4",
+ backgroundColor: "white",
borderRadius: "$1",
boxShadow:
"0px 2px 7px rgba(0, 0, 0, 0.1), 0px 5px 17px rgba(0, 0, 0, 0.15), inset 0 0 1px 1px $colors$slate1, 0 0 0 1px $colors$slate8",
diff --git a/packages/design-system/src/components/progress-bar.tsx b/packages/design-system/src/components/progress-bar.tsx
index b44298b9c7..1a36b17fa9 100644
--- a/packages/design-system/src/components/progress-bar.tsx
+++ b/packages/design-system/src/components/progress-bar.tsx
@@ -31,7 +31,7 @@ const StyledProgressBar = styled(ProgressPrimitive.Root, {
animationDuration: "1500ms",
animationIterationCount: "infinite",
animationTimingFunction: "cubic-bezier(0.65, 0, 0.35, 1)",
- backgroundColor: "$slate7",
+ backgroundColor: "$muted",
boxSizing: "border-box",
borderRadius: "$pill",
content: '""',
diff --git a/packages/design-system/src/components/radio-card.tsx b/packages/design-system/src/components/radio-card.tsx
index eb9ac1ef13..2062af5f9d 100644
--- a/packages/design-system/src/components/radio-card.tsx
+++ b/packages/design-system/src/components/radio-card.tsx
@@ -13,7 +13,7 @@ const StyledRadioButton = styled("div", {
borderRadius: "$round",
width: 25,
height: 25,
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
flexShrink: 0,
mr: "$3",
});
@@ -39,7 +39,7 @@ const StyledRadio = styled(RadioGroupPrimitive.Item, {
display: "flex",
alignItems: "center",
borderRadius: "$2",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
p: "$3",
"@hover": {
"&:hover": {
diff --git a/packages/design-system/src/components/radio-grid.tsx b/packages/design-system/src/components/radio-grid.tsx
index 2ccee0e1da..df4c286e58 100644
--- a/packages/design-system/src/components/radio-grid.tsx
+++ b/packages/design-system/src/components/radio-grid.tsx
@@ -19,7 +19,7 @@ export const RadioGrid = styled(RadioGroupPrimitive.Item, {
boxSizing: "border-box",
},
borderRadius: "$2",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
px: "$1",
height: "$6",
lineHeight: "$sizes$6",
diff --git a/packages/design-system/src/components/radio.tsx b/packages/design-system/src/components/radio.tsx
index e5c1ec2532..e7c6a2e43f 100644
--- a/packages/design-system/src/components/radio.tsx
+++ b/packages/design-system/src/components/radio.tsx
@@ -46,7 +46,7 @@ const StyledRadio = styled(RadioGroupPrimitive.Item, {
borderRadius: "50%",
color: "$hiContrast",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
overflow: "hidden",
"@hover": {
"&:hover": {
diff --git a/packages/design-system/src/components/select.tsx b/packages/design-system/src/components/select.tsx
index 02aff00957..15122d5c4c 100644
--- a/packages/design-system/src/components/select.tsx
+++ b/packages/design-system/src/components/select.tsx
@@ -16,12 +16,12 @@ const StyledTrigger = styled(SelectPrimitive.SelectTrigger, {
borderRadius: "$1",
backgroundColor: "$loContrast",
color: "$hiContrast",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
height: 28, // @todo waiting for the sizing scale
px: "$2",
fontSize: "$1",
"&:hover": {
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
},
"&:focus": {
boxShadow:
diff --git a/packages/design-system/src/components/separator.tsx b/packages/design-system/src/components/separator.tsx
index fb4c7eceb5..897d93d3f4 100644
--- a/packages/design-system/src/components/separator.tsx
+++ b/packages/design-system/src/components/separator.tsx
@@ -5,7 +5,7 @@ export const Separator = styled(SeparatorPrimitive.Root, {
border: "none",
margin: 0,
flexShrink: 0,
- backgroundColor: "$slate7",
+ backgroundColor: "$muted",
cursor: "default",
variants: {
diff --git a/packages/design-system/src/components/sidebar-tabs.tsx b/packages/design-system/src/components/sidebar-tabs.tsx
index 99f3236bb5..1361378465 100644
--- a/packages/design-system/src/components/sidebar-tabs.tsx
+++ b/packages/design-system/src/components/sidebar-tabs.tsx
@@ -33,7 +33,7 @@ export const SidebarTabsTrigger = styled(TabsPrimitive.Trigger, {
'&[data-state="active"]': {
color: "$hiContrast",
backgroundColor: "$slateA4",
- borderColor: "$slate6",
+ borderColor: "$muted",
},
});
@@ -44,7 +44,7 @@ const StyledTabsList = styled(TabsPrimitive.List, {
alignItems: "center",
outline: "none",
'&[data-state="active"]': {
- borderRight: "1px solid $slate7",
+ borderRight: "1px solid $muted",
},
});
@@ -71,6 +71,6 @@ export const SidebarTabsContent = styled(TabsPrimitive.Content, {
bc: "$loContrast",
outline: "none",
'&[data-state="active"]': {
- borderRight: "1px solid $slate7",
+ borderRight: "1px solid $muted",
},
});
diff --git a/packages/design-system/src/components/skeleton.tsx b/packages/design-system/src/components/skeleton.tsx
index a4194c41ee..58826479cf 100644
--- a/packages/design-system/src/components/skeleton.tsx
+++ b/packages/design-system/src/components/skeleton.tsx
@@ -16,7 +16,7 @@ export const Skeleton = styled("div", {
animationDirection: "alternate",
animationIterationCount: "infinite",
animationTimingFunction: "ease-in-out",
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
borderRadius: "inherit",
bottom: 0,
content: '""',
diff --git a/packages/design-system/src/components/slider.tsx b/packages/design-system/src/components/slider.tsx
index ed65c23a70..9d67f51ed8 100644
--- a/packages/design-system/src/components/slider.tsx
+++ b/packages/design-system/src/components/slider.tsx
@@ -5,7 +5,7 @@ import * as SliderPrimitive from "@radix-ui/react-slider";
const SliderTrack = styled(SliderPrimitive.Track, {
position: "relative",
flexGrow: 1,
- backgroundColor: "$slate7",
+ backgroundColor: "$muted",
borderRadius: "$pill",
'&[data-orientation="horizontal"]': {
height: 2,
diff --git a/packages/design-system/src/components/status.tsx b/packages/design-system/src/components/status.tsx
index f9285a2c78..94bb9e375d 100644
--- a/packages/design-system/src/components/status.tsx
+++ b/packages/design-system/src/components/status.tsx
@@ -17,7 +17,7 @@ export const Status = styled("div", {
},
variant: {
gray: {
- backgroundColor: "$slate7",
+ backgroundColor: "$muted",
},
blue: {
backgroundColor: "$blue9",
diff --git a/packages/design-system/src/components/switch.tsx b/packages/design-system/src/components/switch.tsx
index 56e42f908b..222ead8f62 100644
--- a/packages/design-system/src/components/switch.tsx
+++ b/packages/design-system/src/components/switch.tsx
@@ -40,7 +40,7 @@ const StyledSwitch = styled(SwitchPrimitive.Root, {
outline: "none",
WebkitTapHighlightColor: "rgba(0,0,0,0)",
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
borderRadius: "$pill",
position: "relative",
"&:focus": {
diff --git a/packages/design-system/src/components/text-area.tsx b/packages/design-system/src/components/text-area.tsx
index 191ad5438c..f0fefb5a6c 100644
--- a/packages/design-system/src/components/text-area.tsx
+++ b/packages/design-system/src/components/text-area.tsx
@@ -11,7 +11,7 @@ export const TextArea = styled("textarea", {
width: "100%",
WebkitTapHighlightColor: "rgba(0,0,0,0)",
backgroundColor: "$loContrast",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
color: "$hiContrast",
fontVariantNumeric: "tabular-nums",
position: "relative",
@@ -24,7 +24,7 @@ export const TextArea = styled("textarea", {
zIndex: "1",
},
"&::placeholder": {
- color: "$slate9",
+ color: "$hint",
},
"&:disabled": {
pointerEvents: "none",
@@ -33,13 +33,13 @@ export const TextArea = styled("textarea", {
cursor: "not-allowed",
resize: "none",
"&::placeholder": {
- color: "$slate7",
+ color: "$muted",
},
},
"&:read-only": {
backgroundColor: "$slate2",
"&:focus": {
- boxShadow: "inset 0px 0px 0px 1px $colors$slate7",
+ boxShadow: "inset 0px 0px 0px 1px $colors$muted",
},
},
diff --git a/packages/design-system/src/components/text-field.tsx b/packages/design-system/src/components/text-field.tsx
index b1760fcf84..8eaf9261a5 100644
--- a/packages/design-system/src/components/text-field.tsx
+++ b/packages/design-system/src/components/text-field.tsx
@@ -52,14 +52,14 @@ const InputBase = styled("input", {
},
"&::placeholder": {
- color: "$slate9",
+ color: "$hint",
},
"&:disabled": {
color: "$slate8",
cursor: "not-allowed",
"&::placeholder": {
- color: "$slate7",
+ color: "$muted",
},
},
});
@@ -68,7 +68,7 @@ const TextFieldBase = styled("div", {
// Custom
display: "flex",
backgroundColor: "$loContrast",
- boxShadow: "inset 0 0 0 1px $colors$slate7",
+ boxShadow: "inset 0 0 0 1px $colors$muted",
color: "$hiContrast",
fontVariantNumeric: "tabular-nums",
gap: "$1",
@@ -91,7 +91,7 @@ const TextFieldBase = styled("div", {
"&:has(input:read-only)": {
backgroundColor: "$slate2",
"&:focus": {
- boxShadow: "inset 0px 0px 0px 1px $colors$slate7",
+ boxShadow: "inset 0px 0px 0px 1px $colors$muted",
},
},
diff --git a/packages/design-system/src/components/toggle-group.tsx b/packages/design-system/src/components/toggle-group.tsx
index c0456df718..6f9616220f 100644
--- a/packages/design-system/src/components/toggle-group.tsx
+++ b/packages/design-system/src/components/toggle-group.tsx
@@ -3,7 +3,7 @@ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
export const Root = styled(ToggleGroupPrimitive.Root, {
display: "inline-flex",
- backgroundColor: "$slate6",
+ backgroundColor: "$muted",
borderRadius: 4,
boxShadow: `0 2px 10px $blackA7`,
});
diff --git a/packages/design-system/src/components/tree/tree-node.tsx b/packages/design-system/src/components/tree/tree-node.tsx
index 1531ffe7de..ecd373bf68 100644
--- a/packages/design-system/src/components/tree/tree-node.tsx
+++ b/packages/design-system/src/components/tree/tree-node.tsx
@@ -38,7 +38,7 @@ const NestingLine = styled(Box, {
height: ITEM_HEIGHT,
borderRight: "solid",
borderRightWidth: 1,
- borderColor: "$slate9",
+ borderColor: "$hint",
variants: {
isSelected: { true: { borderColor: "$blue7" } },
},
diff --git a/packages/design-system/src/stitches.config.ts b/packages/design-system/src/stitches.config.ts
index 460364c816..aa5d860e37 100644
--- a/packages/design-system/src/stitches.config.ts
+++ b/packages/design-system/src/stitches.config.ts
@@ -195,7 +195,7 @@ const {
// Semantic colors
hiContrast: "$slate12",
loContrast: "$slate1",
- hint: "$slate10",
+ hint: "$slate9",
muted: "$slate6",
primary: "$blue12",
canvas: "hsl(0 0% 93%)",
@@ -478,12 +478,11 @@ export const darkTheme = createTheme({
...goldDarkA,
// Semantic colors
- hint: "$slate10",
- muted: "$slate8",
- primary: "$blue9",
hiContrast: "$slate12",
- // radix colors in this range are either too dark/too light, nothing gray/black in the 16-17% luminosity range
loContrast: "hsl(0 0% 17%)",
+ hint: "$slate9",
+ muted: "$slate8",
+ primary: "$blue9",
canvas: "hsl(0 0% 15%)",
panel: "$slate3",
panelOutline: "hsl(0deg 0% 100% / 10%)",