Merge remote-tracking branch 'origin/main' into ai-refactoring
This commit is contained in:
@@ -44,10 +44,10 @@ export function icon_button({ color, margin, layer, variant, size }: IconButtonO
|
||||
}
|
||||
|
||||
const padding = {
|
||||
top: size === Button.size.Small ? 0 : 2,
|
||||
bottom: size === Button.size.Small ? 0 : 2,
|
||||
left: size === Button.size.Small ? 0 : 4,
|
||||
right: size === Button.size.Small ? 0 : 4,
|
||||
top: size === Button.size.Small ? 2 : 2,
|
||||
bottom: size === Button.size.Small ? 2 : 2,
|
||||
left: size === Button.size.Small ? 2 : 4,
|
||||
right: size === Button.size.Small ? 2 : 4,
|
||||
}
|
||||
|
||||
return interactive({
|
||||
@@ -55,10 +55,10 @@ export function icon_button({ color, margin, layer, variant, size }: IconButtonO
|
||||
corner_radius: 6,
|
||||
padding: padding,
|
||||
margin: m,
|
||||
icon_width: 14,
|
||||
icon_width: 12,
|
||||
icon_height: 14,
|
||||
button_width: 20,
|
||||
button_height: 16,
|
||||
button_width: size === Button.size.Small ? 16 : 20,
|
||||
button_height: 14,
|
||||
},
|
||||
state: {
|
||||
default: {
|
||||
|
||||
@@ -12,7 +12,6 @@ import simple_message_notification from "./simple_message_notification"
|
||||
import project_shared_notification from "./project_shared_notification"
|
||||
import tooltip from "./tooltip"
|
||||
import terminal from "./terminal"
|
||||
import contact_finder from "./contact_finder"
|
||||
import collab_panel from "./collab_panel"
|
||||
import toolbar_dropdown_menu from "./toolbar_dropdown_menu"
|
||||
import incoming_call_notification from "./incoming_call_notification"
|
||||
@@ -22,6 +21,7 @@ import assistant from "./assistant"
|
||||
import { titlebar } from "./titlebar"
|
||||
import editor from "./editor"
|
||||
import feedback from "./feedback"
|
||||
import component_test from "./component_test"
|
||||
import { useTheme } from "../common"
|
||||
|
||||
export default function app(): any {
|
||||
@@ -54,6 +54,7 @@ export default function app(): any {
|
||||
tooltip: tooltip(),
|
||||
terminal: terminal(),
|
||||
assistant: assistant(),
|
||||
feedback: feedback()
|
||||
feedback: feedback(),
|
||||
component_test: component_test(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import { indicator } from "../component/indicator"
|
||||
export default function contacts_panel(): any {
|
||||
const theme = useTheme()
|
||||
|
||||
const CHANNEL_SPACING = 4 as const
|
||||
const NAME_MARGIN = 6 as const
|
||||
const SPACING = 12 as const
|
||||
const INDENT_SIZE = 8 as const
|
||||
@@ -37,7 +38,7 @@ export default function contacts_panel(): any {
|
||||
width: 14,
|
||||
},
|
||||
name: {
|
||||
...text(layer, "ui_sans", { size: "sm" }),
|
||||
...text(layer, "sans", { size: "sm" }),
|
||||
margin: {
|
||||
left: NAME_MARGIN,
|
||||
right: 4,
|
||||
@@ -69,7 +70,7 @@ export default function contacts_panel(): any {
|
||||
const subheader_row = toggleable({
|
||||
base: interactive({
|
||||
base: {
|
||||
...text(layer, "ui_sans", { size: "sm" }),
|
||||
...text(layer, "sans", { size: "sm" }),
|
||||
padding: {
|
||||
left: SPACING,
|
||||
right: SPACING,
|
||||
@@ -87,7 +88,7 @@ export default function contacts_panel(): any {
|
||||
state: {
|
||||
active: {
|
||||
default: {
|
||||
...text(theme.lowest, "ui_sans", { size: "sm" }),
|
||||
...text(theme.lowest, "sans", { size: "sm" }),
|
||||
background: background(theme.lowest),
|
||||
},
|
||||
clicked: {
|
||||
@@ -100,8 +101,8 @@ export default function contacts_panel(): any {
|
||||
const filter_input = {
|
||||
background: background(layer, "on"),
|
||||
corner_radius: 6,
|
||||
text: text(layer, "ui_sans", "base"),
|
||||
placeholder_text: text(layer, "ui_sans", "base", "disabled", {
|
||||
text: text(layer, "sans", "base"),
|
||||
placeholder_text: text(layer, "sans", "base", "disabled", {
|
||||
size: "xs",
|
||||
}),
|
||||
selection: theme.players[0],
|
||||
@@ -140,7 +141,7 @@ export default function contacts_panel(): any {
|
||||
},
|
||||
active: {
|
||||
default: {
|
||||
...text(theme.lowest, "ui_sans", { size: "sm" }),
|
||||
...text(theme.lowest, "sans", { size: "sm" }),
|
||||
background: background(theme.lowest),
|
||||
},
|
||||
clicked: {
|
||||
@@ -152,6 +153,10 @@ export default function contacts_panel(): any {
|
||||
|
||||
return {
|
||||
...collab_modals(),
|
||||
disclosure: {
|
||||
button: icon_button({ variant: "ghost", size: "sm" }),
|
||||
spacing: CHANNEL_SPACING,
|
||||
},
|
||||
log_in_button: interactive({
|
||||
base: {
|
||||
background: background(theme.middle),
|
||||
@@ -194,10 +199,10 @@ export default function contacts_panel(): any {
|
||||
add_channel_button: header_icon_button,
|
||||
leave_call_button: header_icon_button,
|
||||
row_height: ITEM_HEIGHT,
|
||||
channel_indent: INDENT_SIZE,
|
||||
channel_indent: INDENT_SIZE * 2 + 2,
|
||||
section_icon_size: 14,
|
||||
header_row: {
|
||||
...text(layer, "ui_sans", { size: "sm", weight: "bold" }),
|
||||
...text(layer, "sans", { size: "sm", weight: "bold" }),
|
||||
margin: { top: SPACING },
|
||||
padding: {
|
||||
left: SPACING,
|
||||
@@ -251,7 +256,7 @@ export default function contacts_panel(): any {
|
||||
},
|
||||
active: {
|
||||
default: {
|
||||
...text(theme.lowest, "ui_sans", { size: "sm" }),
|
||||
...text(theme.lowest, "sans", { size: "sm" }),
|
||||
background: background(theme.lowest),
|
||||
},
|
||||
clicked: {
|
||||
@@ -262,9 +267,9 @@ export default function contacts_panel(): any {
|
||||
}),
|
||||
channel_row: item_row,
|
||||
channel_name: {
|
||||
...text(layer, "ui_sans", { size: "sm" }),
|
||||
...text(layer, "sans", { size: "sm" }),
|
||||
margin: {
|
||||
left: NAME_MARGIN,
|
||||
left: CHANNEL_SPACING,
|
||||
},
|
||||
},
|
||||
list_empty_label_container: {
|
||||
@@ -279,7 +284,7 @@ export default function contacts_panel(): any {
|
||||
list_empty_state: toggleable({
|
||||
base: interactive({
|
||||
base: {
|
||||
...text(layer, "ui_sans", "variant", { size: "sm" }),
|
||||
...text(layer, "sans", "variant", { size: "sm" }),
|
||||
padding: {
|
||||
top: SPACING / 2,
|
||||
bottom: SPACING / 2,
|
||||
@@ -301,7 +306,7 @@ export default function contacts_panel(): any {
|
||||
},
|
||||
active: {
|
||||
default: {
|
||||
...text(theme.lowest, "ui_sans", { size: "sm" }),
|
||||
...text(theme.lowest, "sans", { size: "sm" }),
|
||||
background: background(theme.lowest),
|
||||
},
|
||||
clicked: {
|
||||
@@ -325,12 +330,12 @@ export default function contacts_panel(): any {
|
||||
right: 4,
|
||||
},
|
||||
background: background(layer, "hovered"),
|
||||
...text(layer, "ui_sans", "hovered", { size: "xs" })
|
||||
...text(layer, "sans", "hovered", { size: "xs" })
|
||||
},
|
||||
contact_status_free: indicator({ layer, color: "positive" }),
|
||||
contact_status_busy: indicator({ layer, color: "negative" }),
|
||||
contact_username: {
|
||||
...text(layer, "ui_sans", { size: "sm" }),
|
||||
...text(layer, "sans", { size: "sm" }),
|
||||
margin: {
|
||||
left: NAME_MARGIN,
|
||||
},
|
||||
@@ -347,7 +352,7 @@ export default function contacts_panel(): any {
|
||||
color: foreground(layer, "on"),
|
||||
},
|
||||
calling_indicator: {
|
||||
...text(layer, "mono", "variant", { size: "xs" }),
|
||||
...text(layer, "sans", "variant", { size: "xs" }),
|
||||
},
|
||||
tree_branch: toggleable({
|
||||
base: interactive({
|
||||
@@ -380,7 +385,7 @@ export default function contacts_panel(): any {
|
||||
},
|
||||
name: {
|
||||
...project_row.name,
|
||||
...text(layer, "mono", { size: "sm" }),
|
||||
...text(layer, "sans", { size: "sm" }),
|
||||
},
|
||||
},
|
||||
state: {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
import { useTheme } from "../common"
|
||||
import { text_button } from "../component/text_button"
|
||||
import { icon_button } from "../component/icon_button"
|
||||
import { text } from "./components"
|
||||
import { toggleable } from "../element"
|
||||
|
||||
export default function contacts_panel(): any {
|
||||
const theme = useTheme()
|
||||
|
||||
return {
|
||||
button: text_button({}),
|
||||
toggle: toggleable({
|
||||
base: text_button({}),
|
||||
state: {
|
||||
active: {
|
||||
...text_button({ color: "accent" })
|
||||
}
|
||||
}
|
||||
}),
|
||||
disclosure: {
|
||||
...text(theme.lowest, "sans", "base"),
|
||||
button: icon_button({ variant: "ghost" }),
|
||||
spacing: 4,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ export default function context_menu(): any {
|
||||
icon_width: 14,
|
||||
padding: { left: 6, right: 6, top: 2, bottom: 2 },
|
||||
corner_radius: 6,
|
||||
label: text(theme.middle, "ui_sans", { size: "sm" }),
|
||||
label: text(theme.middle, "sans", { size: "sm" }),
|
||||
keystroke: {
|
||||
...text(theme.middle, "sans", "variant", {
|
||||
size: "sm",
|
||||
|
||||
@@ -184,6 +184,7 @@ export default function editor(): any {
|
||||
theme.players[6],
|
||||
theme.players[7],
|
||||
],
|
||||
absent_selection: theme.players[7],
|
||||
autocomplete: {
|
||||
background: background(theme.middle),
|
||||
corner_radius: 8,
|
||||
|
||||
Reference in New Issue
Block a user