refactor(ui): replace inline INPUT_CLS/LABEL_CLS/BTN_DANGER constants and action link classes with CSS component classes

Remove duplicated Tailwind class string constants from 15 component files.
Use app-input, app-select, app-label, app-action-danger-btn, and
app-action-delete CSS component classes from globals.css instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 09:21:03 +02:00
parent 9ba49c9ab8
commit 05aa864359
15 changed files with 159 additions and 197 deletions
@@ -11,8 +11,6 @@ interface Props {
onSetFilter: (key: string, value: string, type: FieldType) => void;
}
const INPUT_CLS = "app-input";
export function CustomFieldFilterBar({ filterableFields, activeFilters, onSetFilter }: Props) {
if (filterableFields.length === 0) return null;
@@ -32,7 +30,7 @@ export function CustomFieldFilterBar({ filterableFields, activeFilters, onSetFil
key={field.key}
value={value}
onChange={(e) => onSetFilter(field.key, e.target.value, field.type)}
className={INPUT_CLS}
className="app-input"
aria-label={field.label}
>
<option value="">{field.label}: any</option>
@@ -48,7 +46,7 @@ export function CustomFieldFilterBar({ filterableFields, activeFilters, onSetFil
key={field.key}
value={value}
onChange={(e) => onSetFilter(field.key, e.target.value, field.type)}
className={INPUT_CLS}
className="app-input"
aria-label={field.label}
>
<option value="">{field.label}: any</option>
@@ -67,7 +65,7 @@ export function CustomFieldFilterBar({ filterableFields, activeFilters, onSetFil
value={value}
onChange={(e) => onSetFilter(field.key, e.target.value, field.type)}
placeholder={field.label}
className={`${INPUT_CLS} w-32`}
className="app-input w-32"
aria-label={field.label}
/>
);
@@ -80,7 +78,7 @@ export function CustomFieldFilterBar({ filterableFields, activeFilters, onSetFil
type="date"
value={value}
onChange={(e) => onSetFilter(field.key, e.target.value, field.type)}
className={INPUT_CLS}
className="app-input"
aria-label={field.label}
/>
);
@@ -94,7 +92,7 @@ export function CustomFieldFilterBar({ filterableFields, activeFilters, onSetFil
value={value}
onChange={(e) => onSetFilter(field.key, e.target.value, field.type)}
placeholder={field.label}
className={`${INPUT_CLS} w-40`}
className="app-input w-40"
aria-label={field.label}
/>
);