@moontra/moonui 6.0.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,13 +5,24 @@ import { cva, type VariantProps } from "class-variance-authority"
5
5
  import { cn } from "../../lib/utils"
6
6
  import { Loader2 } from "lucide-react"
7
7
 
8
+ // #296: Form kontrolü kenarlıkları hardcode Tailwind grisi kullanıyordu ve
9
+ // `--input` token'ını tamamen atlıyordu; #284'ün token onarımı bu yüzeylere
10
+ // hiç ulaşmıyordu. Ölçüldü (WCAG 1.4.11, eşik 3.0):
11
+ // border-gray-200 1.24 · border-gray-300 1.47 · dark:border-gray-700 1.72
12
+ // dark:border-gray-600 2.35 · hover:border-gray-400 2.54 → hepsi KALIYOR
13
+ // `border-input` ile: açık 3.11, koyu 3.37 — ikisi de geçiyor.
14
+ // Hover kenarlık ezmeleri kaldırıldı: taban kenarlık zaten eşiği geçiyor,
15
+ // ayrı bir hover grisi tutmak yalnız token'ı yeniden atlamak olurdu.
16
+ // NOT: text-gray-* sınıflarına DOKUNULMADI — hepsi kontrastı geçiyor
17
+ // (4.83–17.74); onları çevirmek estetik refactor olurdu, a11y kazancı yok.
18
+
8
19
  /**
9
20
  * Textarea Variant Styles
10
21
  */
11
22
  const textareaVariants = cva(
12
23
  [
13
24
  "flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200",
14
- "text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
25
+ "text-foreground placeholder:text-muted-foreground",
15
26
  "disabled:cursor-not-allowed disabled:opacity-50",
16
27
  "focus-visible:outline-none dark:text-gray-200",
17
28
  "resize-none" // Always disable manual resize, we control it
@@ -19,10 +30,10 @@ const textareaVariants = cva(
19
30
  {
20
31
  variants: {
21
32
  variant: {
22
- default: "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",
23
- outline: "border-2 border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:border-primary dark:focus-visible:border-primary/80",
33
+ default: "border border-input bg-background dark:bg-gray-800/80 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",
34
+ outline: "border-2 border-input bg-transparent focus-visible:border-primary dark:focus-visible:border-primary/80",
24
35
  ghost: "border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
25
- underline: "border-t-0 border-l-0 border-r-0 border-b-2 border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"
36
+ underline: "border-t-0 border-l-0 border-r-0 border-b-2 border-input rounded-none px-0 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"
26
37
  },
27
38
  size: {
28
39
  sm: "min-h-[60px] text-xs",