Update & format
This commit is contained in:
@@ -181,7 +181,7 @@ export default function assistant(theme: ColorScheme): any {
|
||||
},
|
||||
},
|
||||
}),
|
||||
savedAt: {
|
||||
saved_at: {
|
||||
margin: { left: 8 },
|
||||
...text(theme.highest, "sans", "default", { size: "xs" }),
|
||||
},
|
||||
|
||||
@@ -6,7 +6,9 @@ import { toggleable } from "../element"
|
||||
export default function command_palette(theme: ColorScheme): any {
|
||||
const key = toggleable({
|
||||
base: {
|
||||
text: text(theme.highest, "mono", "variant", "default", { size: "xs" }),
|
||||
text: text(theme.highest, "mono", "variant", "default", {
|
||||
size: "xs",
|
||||
}),
|
||||
corner_radius: 2,
|
||||
background: background(theme.highest, "on"),
|
||||
padding: {
|
||||
@@ -23,7 +25,9 @@ export default function command_palette(theme: ColorScheme): any {
|
||||
},
|
||||
state: {
|
||||
active: {
|
||||
text: text(theme.highest, "mono", "on", "default", { size: "xs" }),
|
||||
text: text(theme.highest, "mono", "on", "default", {
|
||||
size: "xs",
|
||||
}),
|
||||
background: with_opacity(background(theme.highest, "on"), 0.2),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
font_families,
|
||||
font_sizes,
|
||||
FontWeight,
|
||||
} from "../common"
|
||||
import { font_families, font_sizes, FontWeight } from "../common"
|
||||
import { Layer, Styles, StyleSets, Style } from "../theme/color_scheme"
|
||||
|
||||
function is_style_set(key: any): key is StyleSets {
|
||||
|
||||
@@ -17,7 +17,9 @@ export default function contact_finder(theme: ColorScheme): any {
|
||||
background: background(theme.middle, "on"),
|
||||
corner_radius: 6,
|
||||
text: text(theme.middle, "mono"),
|
||||
placeholder_text: text(theme.middle, "mono", "on", "disabled", { size: "xs" }),
|
||||
placeholder_text: text(theme.middle, "mono", "on", "disabled", {
|
||||
size: "xs",
|
||||
}),
|
||||
selection: theme.players[0],
|
||||
border: border(theme.middle),
|
||||
padding: {
|
||||
|
||||
@@ -29,7 +29,9 @@ export default function context_menu(theme: ColorScheme): any {
|
||||
state: {
|
||||
hovered: {
|
||||
background: background(theme.middle, "hovered"),
|
||||
label: text(theme.middle, "sans", "hovered", { size: "sm" }),
|
||||
label: text(theme.middle, "sans", "hovered", {
|
||||
size: "sm",
|
||||
}),
|
||||
keystroke: {
|
||||
...text(theme.middle, "sans", "hovered", {
|
||||
size: "sm",
|
||||
|
||||
@@ -2,7 +2,6 @@ import { ColorScheme } from "../theme/color_scheme"
|
||||
import { background, border, foreground, svg, text } from "./components"
|
||||
import { interactive } from "../element"
|
||||
export default function copilot(theme: ColorScheme): any {
|
||||
|
||||
const content_width = 264
|
||||
|
||||
const cta_button =
|
||||
@@ -61,7 +60,10 @@ export default function copilot(theme: ColorScheme): any {
|
||||
modal: {
|
||||
title_text: {
|
||||
default: {
|
||||
...text(theme.middle, "sans", { size: "xs", weight: "bold" }),
|
||||
...text(theme.middle, "sans", {
|
||||
size: "xs",
|
||||
weight: "bold",
|
||||
}),
|
||||
},
|
||||
},
|
||||
titlebar: {
|
||||
@@ -163,7 +165,10 @@ export default function copilot(theme: ColorScheme): any {
|
||||
},
|
||||
|
||||
hint: {
|
||||
...text(theme.middle, "sans", { size: "xs", color: "#838994" }),
|
||||
...text(theme.middle, "sans", {
|
||||
size: "xs",
|
||||
color: "#838994",
|
||||
}),
|
||||
margin: {
|
||||
top: 6,
|
||||
bottom: 2,
|
||||
@@ -271,7 +276,10 @@ export default function copilot(theme: ColorScheme): any {
|
||||
},
|
||||
|
||||
hint: {
|
||||
...text(theme.middle, "sans", { size: "xs", color: "#838994" }),
|
||||
...text(theme.middle, "sans", {
|
||||
size: "xs",
|
||||
color: "#838994",
|
||||
}),
|
||||
margin: {
|
||||
top: 24,
|
||||
bottom: 4,
|
||||
|
||||
@@ -191,20 +191,12 @@ export default function editor(theme: ColorScheme): any {
|
||||
item: autocomplete_item,
|
||||
hovered_item: {
|
||||
...autocomplete_item,
|
||||
match_highlight: foreground(
|
||||
theme.middle,
|
||||
"accent",
|
||||
"hovered"
|
||||
),
|
||||
match_highlight: foreground(theme.middle, "accent", "hovered"),
|
||||
background: background(theme.middle, "hovered"),
|
||||
},
|
||||
selected_item: {
|
||||
...autocomplete_item,
|
||||
match_highlight: foreground(
|
||||
theme.middle,
|
||||
"accent",
|
||||
"active"
|
||||
),
|
||||
match_highlight: foreground(theme.middle, "accent", "active"),
|
||||
background: background(theme.middle, "active"),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -34,7 +34,9 @@ export default function feedback(theme: ColorScheme): any {
|
||||
},
|
||||
}),
|
||||
button_margin: 8,
|
||||
info_text_default: text(theme.highest, "sans", "default", { size: "xs" }),
|
||||
info_text_default: text(theme.highest, "sans", "default", {
|
||||
size: "xs",
|
||||
}),
|
||||
link_text_default: text(theme.highest, "sans", "default", {
|
||||
size: "xs",
|
||||
underline: true,
|
||||
|
||||
@@ -39,7 +39,9 @@ export default function hover_popover(theme: ColorScheme): any {
|
||||
padding: { top: 4 },
|
||||
},
|
||||
prose: text(theme.middle, "sans", { size: "sm" }),
|
||||
diagnostic_source_highlight: { color: foreground(theme.middle, "accent") },
|
||||
diagnostic_source_highlight: {
|
||||
color: foreground(theme.middle, "accent"),
|
||||
},
|
||||
highlight: theme.ramps.neutral(0.5).alpha(0.2).hex(), // TODO: blend was used here. Replace with something better
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,10 @@ export default function incoming_call_notification(
|
||||
margin: { top: -3 },
|
||||
},
|
||||
worktree_roots: {
|
||||
...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold" }),
|
||||
...text(theme.middle, "sans", "variant", {
|
||||
size: "xs",
|
||||
weight: "bold",
|
||||
}),
|
||||
margin: { top: -3 },
|
||||
},
|
||||
button_width: 96,
|
||||
|
||||
@@ -173,7 +173,9 @@ export default function project_panel(theme: ColorScheme): any {
|
||||
{
|
||||
default: {
|
||||
background: background(theme.middle, "active"),
|
||||
text: text(theme.middle, "mono", "disabled", { size: "sm" }),
|
||||
text: text(theme.middle, "mono", "disabled", {
|
||||
size: "sm",
|
||||
}),
|
||||
},
|
||||
}
|
||||
),
|
||||
|
||||
@@ -29,7 +29,10 @@ export default function project_shared_notification(
|
||||
margin: { top: -3 },
|
||||
},
|
||||
worktree_roots: {
|
||||
...text(theme.middle, "sans", "variant", { size: "xs", weight: "bold" }),
|
||||
...text(theme.middle, "sans", "variant", {
|
||||
size: "xs",
|
||||
weight: "bold",
|
||||
}),
|
||||
margin: { top: -3 },
|
||||
},
|
||||
button_width: 96,
|
||||
|
||||
@@ -33,7 +33,10 @@ export default function search(theme: ColorScheme): any {
|
||||
|
||||
return {
|
||||
// TODO: Add an activeMatchBackground on the rust side to differentiate between active and inactive
|
||||
match_background: with_opacity(foreground(theme.highest, "accent"), 0.4),
|
||||
match_background: with_opacity(
|
||||
foreground(theme.highest, "accent"),
|
||||
0.4
|
||||
),
|
||||
option_button: toggleable({
|
||||
base: interactive({
|
||||
base: {
|
||||
|
||||
@@ -2,9 +2,7 @@ import { ColorScheme } from "../theme/color_scheme"
|
||||
import { background, border, foreground, text } from "./components"
|
||||
import { interactive } from "../element"
|
||||
|
||||
export default function simple_message_notification(
|
||||
theme: ColorScheme
|
||||
): any {
|
||||
export default function simple_message_notification(theme: ColorScheme): any {
|
||||
const header_padding = 8
|
||||
|
||||
return {
|
||||
|
||||
@@ -43,7 +43,9 @@ export default function dropdown_menu(theme: ColorScheme): any {
|
||||
state: {
|
||||
hovered: {
|
||||
background: background(theme.middle, "hovered"),
|
||||
...text(theme.middle, "sans", "hovered", { size: "sm" }),
|
||||
...text(theme.middle, "sans", "hovered", {
|
||||
size: "sm",
|
||||
}),
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -2,7 +2,6 @@ import { ColorScheme } from "../theme/color_scheme"
|
||||
import { foreground, text } from "./components"
|
||||
import { interactive } from "../element"
|
||||
|
||||
|
||||
export default function update_notification(theme: ColorScheme): any {
|
||||
const header_padding = 8
|
||||
|
||||
|
||||
@@ -32,7 +32,12 @@ export default function welcome(theme: ColorScheme): any {
|
||||
|
||||
return {
|
||||
page_width: 320,
|
||||
logo: svg(foreground(theme.highest, "default"), "icons/logo_96.svg", 64, 64),
|
||||
logo: svg(
|
||||
foreground(theme.highest, "default"),
|
||||
"icons/logo_96.svg",
|
||||
64,
|
||||
64
|
||||
),
|
||||
logo_subheading: {
|
||||
...text(theme.highest, "sans", "variant", { size: "md" }),
|
||||
margin: {
|
||||
@@ -54,7 +59,10 @@ export default function welcome(theme: ColorScheme): any {
|
||||
},
|
||||
checkbox_group: {
|
||||
border: border(theme.highest, "variant"),
|
||||
background: with_opacity(background(theme.highest, "hovered"), 0.25),
|
||||
background: with_opacity(
|
||||
background(theme.highest, "hovered"),
|
||||
0.25
|
||||
),
|
||||
corner_radius: 4,
|
||||
padding: {
|
||||
left: 12,
|
||||
@@ -77,11 +85,21 @@ export default function welcome(theme: ColorScheme): any {
|
||||
left: 7,
|
||||
right: 7,
|
||||
},
|
||||
...text(theme.highest, "sans", "default", interactive_text_size),
|
||||
...text(
|
||||
theme.highest,
|
||||
"sans",
|
||||
"default",
|
||||
interactive_text_size
|
||||
),
|
||||
},
|
||||
state: {
|
||||
hovered: {
|
||||
...text(theme.highest, "sans", "default", interactive_text_size),
|
||||
...text(
|
||||
theme.highest,
|
||||
"sans",
|
||||
"default",
|
||||
interactive_text_size
|
||||
),
|
||||
background: background(theme.highest, "hovered"),
|
||||
},
|
||||
},
|
||||
@@ -106,7 +124,12 @@ export default function welcome(theme: ColorScheme): any {
|
||||
...text(theme.highest, "sans", interactive_text_size),
|
||||
// Also supports margin, container, border, etc.
|
||||
},
|
||||
icon: svg(foreground(theme.highest, "on"), "icons/check_12.svg", 12, 12),
|
||||
icon: svg(
|
||||
foreground(theme.highest, "on"),
|
||||
"icons/check_12.svg",
|
||||
12,
|
||||
12
|
||||
),
|
||||
default: {
|
||||
...checkbox_base,
|
||||
background: background(theme.highest, "default"),
|
||||
|
||||
@@ -140,18 +140,10 @@ export default function workspace(theme: ColorScheme): any {
|
||||
state: {
|
||||
hovered: {
|
||||
color: foreground(theme.highest, "on", "hovered"),
|
||||
background: background(
|
||||
theme.highest,
|
||||
"on",
|
||||
"hovered"
|
||||
),
|
||||
background: background(theme.highest, "on", "hovered"),
|
||||
},
|
||||
disabled: {
|
||||
color: foreground(
|
||||
theme.highest,
|
||||
"on",
|
||||
"disabled"
|
||||
),
|
||||
color: foreground(theme.highest, "on", "disabled"),
|
||||
},
|
||||
},
|
||||
}),
|
||||
@@ -170,11 +162,7 @@ export default function workspace(theme: ColorScheme): any {
|
||||
state: {
|
||||
hovered: {
|
||||
color: foreground(theme.highest, "on", "hovered"),
|
||||
background: background(
|
||||
theme.highest,
|
||||
"on",
|
||||
"hovered"
|
||||
),
|
||||
background: background(theme.highest, "on", "hovered"),
|
||||
},
|
||||
},
|
||||
}),
|
||||
@@ -194,6 +182,9 @@ export default function workspace(theme: ColorScheme): any {
|
||||
width: 400,
|
||||
margin: { right: 10, bottom: 10 },
|
||||
},
|
||||
drop_target_overlay_color: with_opacity(foreground(theme.lowest, "variant"), 0.5),
|
||||
drop_target_overlay_color: with_opacity(
|
||||
foreground(theme.lowest, "variant"),
|
||||
0.5
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user