style(desktop): unify Input/Textarea/SelectTrigger on shared controlVariants

Mirror the buttonVariants exercise for non-composer form controls: add a
single controlVariants source of truth (2.5px radius, 12px text,
padding-driven sizing, chrome via desktop-input-chrome) and consume it from
Input, Textarea, and SelectTrigger. Drop per-call radius/height/font
overrides that fought the shared look.
This commit is contained in:
Brooklyn Nicholson
2026-06-03 22:03:46 -05:00
parent d6e2c940e9
commit 0776d1b19c
9 changed files with 57 additions and 19 deletions
+2 -2
View File
@@ -768,7 +768,7 @@ function CronEditorDialog({
<div className="grid items-start gap-4 sm:grid-cols-2">
<Field htmlFor="cron-frequency" label="Frequency">
<Select onValueChange={handleSchedulePresetChange} value={schedulePreset}>
<SelectTrigger className="h-9 rounded-md" id="cron-frequency">
<SelectTrigger id="cron-frequency">
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -783,7 +783,7 @@ function CronEditorDialog({
<Field htmlFor="cron-deliver" label="Deliver to">
<Select onValueChange={setDeliver} value={deliver}>
<SelectTrigger className="h-9 rounded-md" id="cron-deliver">
<SelectTrigger id="cron-deliver">
<SelectValue />
</SelectTrigger>
<SelectContent>
+1 -1
View File
@@ -651,7 +651,7 @@ function MessagingField({
</div>
<div className="flex items-center gap-2">
<Input
className="h-9 rounded-lg font-mono text-sm"
className="font-mono"
id={`messaging-field-${field.key}`}
onChange={event => onEdit(field.key, event.target.value)}
placeholder={field.is_set ? field.redacted_value || 'Replace current value' : copy.placeholder}
@@ -37,7 +37,7 @@ export function OverlaySearchInput({
<Search className="pointer-events-none absolute left-3 top-1/2 z-1 size-3.5 -translate-y-1/2 text-muted-foreground/80" />
<Input
className={cn(
'relative z-0 h-8 rounded-lg py-2 pl-8 text-[length:var(--conversation-text-font-size)]',
'relative z-0 py-2 pl-8 text-[length:var(--conversation-text-font-size)]',
hasTrailing || loading || value ? 'pr-16' : 'pr-8',
inputClassName
)}
@@ -71,7 +71,7 @@ export function PageSearchInput(props: OverlaySearchInputProps) {
<OverlaySearchInput
{...props}
containerClassName={cn('mx-auto w-[min(36rem,calc(100%-2rem))] min-w-0', props.containerClassName)}
inputClassName={cn('h-8 rounded-lg py-2 pl-8', props.inputClassName)}
inputClassName={cn('py-2 pl-8', props.inputClassName)}
/>
)
}
@@ -89,7 +89,7 @@ function ConfigField({
if (schema.type === 'number') {
return row(
<Input
className={cn('h-8', CONTROL_TEXT)}
className={CONTROL_TEXT}
onChange={e => {
const raw = e.target.value
const n = raw === '' ? 0 : Number(raw)
@@ -108,7 +108,7 @@ function ConfigField({
if (schema.type === 'list') {
return row(
<Input
className={cn('h-8', CONTROL_TEXT)}
className={CONTROL_TEXT}
onChange={e =>
onChange(
e.target.value
@@ -154,7 +154,7 @@ function ConfigField({
/>
) : (
<Input
className={cn('h-8', CONTROL_TEXT)}
className={CONTROL_TEXT}
onChange={e => onChange(e.target.value)}
placeholder="Not set"
value={String(value ?? '')}
+1 -1
View File
@@ -22,7 +22,7 @@ interface ProviderPrefix {
}
export const EMPTY_SELECT_VALUE = '__hermes_empty__'
export const CONTROL_TEXT = 'text-[0.8125rem]'
export const CONTROL_TEXT = 'text-xs'
export const PROVIDER_GROUPS: ProviderPrefix[] = [
{ prefix: 'NOUS_', name: 'Nous Portal', priority: 0 },