wip(desktop): progress
This commit is contained in:
@@ -7,6 +7,7 @@ export interface InputProps
|
||||
Partial<Pick<ComponentProps<typeof Kobalte>, "value" | "onChange" | "onKeyDown">> {
|
||||
label?: string
|
||||
hideLabel?: boolean
|
||||
hidden?: boolean
|
||||
description?: string
|
||||
}
|
||||
|
||||
@@ -14,6 +15,7 @@ export function Input(props: InputProps) {
|
||||
const [local, others] = splitProps(props, [
|
||||
"class",
|
||||
"label",
|
||||
"hidden",
|
||||
"hideLabel",
|
||||
"description",
|
||||
"value",
|
||||
@@ -21,7 +23,13 @@ export function Input(props: InputProps) {
|
||||
"onKeyDown",
|
||||
])
|
||||
return (
|
||||
<Kobalte data-component="input" value={local.value} onChange={local.onChange} onKeyDown={local.onKeyDown}>
|
||||
<Kobalte
|
||||
data-component="input"
|
||||
style={{ height: local.hidden ? 0 : undefined }}
|
||||
value={local.value}
|
||||
onChange={local.onChange}
|
||||
onKeyDown={local.onKeyDown}
|
||||
>
|
||||
<Show when={local.label}>
|
||||
<Kobalte.Label data-slot="input-label" classList={{ "sr-only": local.hideLabel }}>
|
||||
{local.label}
|
||||
|
||||
@@ -97,10 +97,18 @@
|
||||
[data-slot="list-item-active-icon"] {
|
||||
display: block;
|
||||
}
|
||||
[data-slot="list-item-extra-icon"] {
|
||||
color: var(--icon-strong-base) !important;
|
||||
}
|
||||
}
|
||||
&:active {
|
||||
background: var(--surface-raised-base-active);
|
||||
}
|
||||
&:hover {
|
||||
[data-slot="list-item-extra-icon"] {
|
||||
color: var(--icon-strong-base) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { FilteredListProps, useFilteredList } from "@opencode-ai/ui/hooks"
|
||||
import { Icon, IconProps } from "./icon"
|
||||
|
||||
export interface ListProps<T> extends FilteredListProps<T> {
|
||||
class?: string
|
||||
children: (item: T) => JSX.Element
|
||||
emptyMessage?: string
|
||||
onKeyEvent?: (event: KeyboardEvent, item: T | undefined) => void
|
||||
@@ -90,7 +91,7 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
|
||||
})
|
||||
|
||||
return (
|
||||
<div ref={setScrollRef} data-component="list">
|
||||
<div ref={setScrollRef} data-component="list" classList={{ [props.class ?? ""]: !!props.class }}>
|
||||
<Show
|
||||
when={flat().length > 0}
|
||||
fallback={
|
||||
|
||||
Reference in New Issue
Block a user