mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 01:25:33 +08:00
038b74b844
* fix(misc): improve CLI version detection with path scanning - Extract version helper to parse semver from raw output - Add fallback path scanning when direct execution fails - Scan common npm global paths: .npm-global, .local/bin, homebrew - Support nvm by scanning all node versions under ~/.nvm/versions/node - Add platform-specific paths for macOS, Linux, and Windows - Ensure node is in PATH when executing CLI tools from scanned paths * fix(ui): use semantic color tokens for text foreground - Replace hardcoded gray-900/gray-100 with text-foreground in EndpointSpeedTest - Add text-foreground class to Input component for consistent theming - Ensures proper text color in both light and dark modes
24 lines
849 B
TypeScript
24 lines
849 B
TypeScript
import * as React from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
({ className, type, ...props }, ref) => {
|
|
return (
|
|
<input
|
|
type={type}
|
|
className={cn(
|
|
"flex h-9 w-full rounded-md border border-border-default bg-background text-foreground px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 disabled:cursor-not-allowed disabled:opacity-50",
|
|
className,
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
},
|
|
);
|
|
Input.displayName = "Input";
|
|
|
|
export { Input };
|