- pnpm catalog: centralize version governance for biome, ts, vitest,
zod, semantic-release, react, vite, and testing deps
- biome 1.9.4 → 2.4.13: migrate config (organizeImports → assist,
files.ignore → files.includes, enable tailwindDirectives for @theme)
- zod 3.24.3 → 4.3.6: update error message API to { message: "..." }
and .errors → .issues in all 4 Zod-using files
- vitest 3.2.3 → 4.1.5
- semantic-release 24.x → 25.0.3
- typescript 6.0.3 (ahead of 5.9.x standard; intentional)
- add commitlint 20.x with conventional config
- add husky 9.x with commit-msg and pre-commit hooks
- add .github/actions/setup composite action; update all 3 workflows
- fix: remove pnpm version: 9 from all workflows (reads packageManager)
- fix: node-version 20 → 24 in all 3 workflows
- add Makefile with dev/build/test/lint/typecheck/install targets
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { forwardRef } from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
export const Input = forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => (
|
|
<input
|
|
ref={ref}
|
|
className={cn(
|
|
"flex w-full rounded-lg px-3 py-2 text-sm transition-all outline-none",
|
|
"[background:var(--surface)] [color:var(--text-1)]",
|
|
"[border:1px_solid_var(--border-2)]",
|
|
"placeholder:[color:var(--text-4)]",
|
|
"focus:[border-color:var(--accent)]",
|
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
));
|
|
Input.displayName = "Input";
|
|
|
|
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
|
|
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
({ className, ...props }, ref) => (
|
|
<textarea
|
|
ref={ref}
|
|
className={cn(
|
|
"flex w-full rounded-lg px-3 py-2 text-sm transition-all outline-none resize-none",
|
|
"[background:var(--surface)] [color:var(--text-1)]",
|
|
"[border:1px_solid_var(--border-2)]",
|
|
"placeholder:[color:var(--text-4)]",
|
|
"focus:[border-color:var(--accent)]",
|
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
),
|
|
);
|
|
Textarea.displayName = "Textarea";
|