forked from Creditra/Creditra-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormField.css
More file actions
127 lines (109 loc) · 2.45 KB
/
Copy pathFormField.css
File metadata and controls
127 lines (109 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* FormField Component Styles */
.form-field {
display: flex;
flex-direction: column;
gap: var(--space-sm);
margin-bottom: var(--space-xl);
}
.form-field__label {
display: block;
font-size: 0.9rem;
font-weight: 500;
color: var(--text);
line-height: var(--lh-small);
}
.form-field__required {
color: var(--error);
margin-left: var(--space-xs);
font-weight: 600;
}
.form-field__help {
font-size: 0.85rem;
color: var(--muted);
line-height: var(--lh-small);
margin: 0;
}
.form-field__input,
.form-field__textarea {
width: 100%;
padding: 0.625rem 0.75rem;
font-size: 0.9rem;
line-height: var(--lh-body);
color: var(--text);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
font-family: inherit;
}
.form-field__textarea {
min-height: 100px;
resize: vertical;
}
.form-field__input:hover,
.form-field__textarea:hover {
border-color: var(--accent);
}
.form-field__input:focus,
.form-field__textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}
.form-field__input--error,
.form-field__textarea--error {
border-color: var(--error);
}
.form-field__input--error:focus,
.form-field__textarea--error:focus {
box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.1);
}
.form-field__error {
display: flex;
align-items: flex-start;
gap: var(--space-sm);
padding: var(--space-md);
font-size: 0.85rem;
color: var(--error);
background: rgba(248, 81, 73, 0.1);
border: 1px solid rgba(248, 81, 73, 0.3);
border-radius: 6px;
line-height: var(--lh-small);
}
.form-field__error-icon {
width: 16px;
height: 16px;
flex-shrink: 0;
margin-top: 1px;
}
/* Checkbox and Radio Variants */
.form-field--checkbox,
.form-field--radio {
flex-direction: row;
align-items: flex-start;
gap: var(--space-md);
margin-bottom: var(--space-lg);
}
.form-field--checkbox .form-field__input,
.form-field--radio .form-field__input {
width: auto;
margin-top: 2px;
cursor: pointer;
}
.form-field--checkbox .form-field__label,
.form-field--radio .form-field__label {
cursor: pointer;
user-select: none;
}
/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
.form-field__input,
.form-field__textarea {
transition: none;
}
}
/* Reduced Motion Override */
[data-motion="reduced"] .form-field__input,
[data-motion="reduced"] .form-field__textarea {
transition: none;
}