@duskmoon-dev/core 1.1.1 → 1.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.
@@ -0,0 +1,308 @@
1
+ /**
2
+ * Form Group Component Styles
3
+ * DuskMoonUI - Form layout utilities including label, helper text, fieldset
4
+ */
5
+
6
+ @layer components {
7
+ /* Form Group Container */
8
+ .form-group {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 0.25rem;
12
+ width: 100%;
13
+ }
14
+
15
+ .form-group-horizontal {
16
+ flex-direction: row;
17
+ align-items: flex-start;
18
+ gap: 1rem;
19
+ }
20
+
21
+ .form-group-horizontal .form-label {
22
+ min-width: 8rem;
23
+ padding-top: 0.75rem;
24
+ }
25
+
26
+ .form-group-horizontal .form-control {
27
+ flex: 1;
28
+ }
29
+
30
+ /* Form Label */
31
+ .form-label {
32
+ display: block;
33
+ font-size: 0.875rem;
34
+ font-weight: 500;
35
+ line-height: 1.25rem;
36
+ color: var(--color-on-surface);
37
+ margin-bottom: 0.25rem;
38
+ }
39
+
40
+ .form-label-required::after {
41
+ content: ' *';
42
+ color: var(--color-error);
43
+ }
44
+
45
+ .form-label-optional::after {
46
+ content: ' (optional)';
47
+ font-size: 0.75rem;
48
+ font-weight: 400;
49
+ color: var(--color-on-surface-variant);
50
+ }
51
+
52
+ /* Label Sizes */
53
+ .form-label-sm {
54
+ font-size: 0.75rem;
55
+ line-height: 1rem;
56
+ }
57
+
58
+ .form-label-lg {
59
+ font-size: 1rem;
60
+ line-height: 1.5rem;
61
+ }
62
+
63
+ /* Form Control Wrapper */
64
+ .form-control {
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: 0.25rem;
68
+ }
69
+
70
+ /* Helper Text */
71
+ .helper-text {
72
+ font-size: 0.75rem;
73
+ line-height: 1rem;
74
+ color: var(--color-on-surface-variant);
75
+ margin-top: 0.25rem;
76
+ }
77
+
78
+ .helper-text-error {
79
+ color: var(--color-error);
80
+ }
81
+
82
+ .helper-text-success {
83
+ color: var(--color-success);
84
+ }
85
+
86
+ .helper-text-warning {
87
+ color: var(--color-warning);
88
+ }
89
+
90
+ .helper-text-info {
91
+ color: var(--color-info);
92
+ }
93
+
94
+ /* Helper Text with Icon */
95
+ .helper-text-icon {
96
+ display: inline-flex;
97
+ align-items: center;
98
+ gap: 0.25rem;
99
+ }
100
+
101
+ .helper-text-icon svg,
102
+ .helper-text-icon .icon {
103
+ width: 0.875rem;
104
+ height: 0.875rem;
105
+ }
106
+
107
+ /* Form Hint (above input) */
108
+ .form-hint {
109
+ font-size: 0.75rem;
110
+ line-height: 1rem;
111
+ color: var(--color-on-surface-variant);
112
+ margin-bottom: 0.25rem;
113
+ }
114
+
115
+ /* Fieldset */
116
+ .fieldset {
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 1rem;
120
+ padding: 1rem;
121
+ margin: 0;
122
+ border: 1px solid var(--color-outline-variant);
123
+ border-radius: 0.5rem;
124
+ background-color: transparent;
125
+ }
126
+
127
+ .fieldset-legend {
128
+ padding: 0 0.5rem;
129
+ font-size: 0.875rem;
130
+ font-weight: 600;
131
+ line-height: 1.25rem;
132
+ color: var(--color-on-surface);
133
+ }
134
+
135
+ /* Fieldset Variants */
136
+ .fieldset-filled {
137
+ background-color: var(--color-surface-container-lowest);
138
+ border-color: transparent;
139
+ }
140
+
141
+ .fieldset-borderless {
142
+ border: none;
143
+ padding: 0;
144
+ }
145
+
146
+ /* Fieldset with Card Style */
147
+ .fieldset-card {
148
+ background-color: var(--color-surface);
149
+ border-color: transparent;
150
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
151
+ padding: 1.5rem;
152
+ }
153
+
154
+ /* Form Row */
155
+ .form-row {
156
+ display: flex;
157
+ flex-wrap: wrap;
158
+ gap: 1rem;
159
+ }
160
+
161
+ .form-row > .form-group {
162
+ flex: 1;
163
+ min-width: 200px;
164
+ }
165
+
166
+ /* Form Grid */
167
+ .form-grid {
168
+ display: grid;
169
+ gap: 1rem;
170
+ }
171
+
172
+ .form-grid-2 {
173
+ grid-template-columns: repeat(2, 1fr);
174
+ }
175
+
176
+ .form-grid-3 {
177
+ grid-template-columns: repeat(3, 1fr);
178
+ }
179
+
180
+ .form-grid-4 {
181
+ grid-template-columns: repeat(4, 1fr);
182
+ }
183
+
184
+ @media (max-width: 640px) {
185
+ .form-grid-2,
186
+ .form-grid-3,
187
+ .form-grid-4 {
188
+ grid-template-columns: 1fr;
189
+ }
190
+ }
191
+
192
+ /* Form Actions */
193
+ .form-actions {
194
+ display: flex;
195
+ align-items: center;
196
+ gap: 0.75rem;
197
+ margin-top: 1rem;
198
+ }
199
+
200
+ .form-actions-right {
201
+ justify-content: flex-end;
202
+ }
203
+
204
+ .form-actions-center {
205
+ justify-content: center;
206
+ }
207
+
208
+ .form-actions-between {
209
+ justify-content: space-between;
210
+ }
211
+
212
+ /* Form Divider */
213
+ .form-divider {
214
+ height: 1px;
215
+ background-color: var(--color-outline-variant);
216
+ margin: 1rem 0;
217
+ }
218
+
219
+ .form-divider-text {
220
+ display: flex;
221
+ align-items: center;
222
+ gap: 1rem;
223
+ color: var(--color-on-surface-variant);
224
+ font-size: 0.75rem;
225
+ text-transform: uppercase;
226
+ }
227
+
228
+ .form-divider-text::before,
229
+ .form-divider-text::after {
230
+ content: '';
231
+ flex: 1;
232
+ height: 1px;
233
+ background-color: var(--color-outline-variant);
234
+ }
235
+
236
+ /* Form Section */
237
+ .form-section {
238
+ display: flex;
239
+ flex-direction: column;
240
+ gap: 1rem;
241
+ }
242
+
243
+ .form-section-title {
244
+ font-size: 1rem;
245
+ font-weight: 600;
246
+ color: var(--color-on-surface);
247
+ margin-bottom: 0.5rem;
248
+ }
249
+
250
+ .form-section-description {
251
+ font-size: 0.875rem;
252
+ color: var(--color-on-surface-variant);
253
+ margin-bottom: 1rem;
254
+ }
255
+
256
+ /* Inline Form */
257
+ .form-inline {
258
+ display: flex;
259
+ flex-wrap: wrap;
260
+ align-items: flex-end;
261
+ gap: 0.75rem;
262
+ }
263
+
264
+ .form-inline .form-group {
265
+ flex: none;
266
+ width: auto;
267
+ }
268
+
269
+ /* Character Counter */
270
+ .form-counter {
271
+ font-size: 0.75rem;
272
+ color: var(--color-on-surface-variant);
273
+ text-align: right;
274
+ margin-top: 0.25rem;
275
+ }
276
+
277
+ .form-counter-error {
278
+ color: var(--color-error);
279
+ }
280
+
281
+ /* Error State on Form Group */
282
+ .form-group-error .form-label {
283
+ color: var(--color-error);
284
+ }
285
+
286
+ .form-group-error .input,
287
+ .form-group-error .select,
288
+ .form-group-error .textarea {
289
+ border-color: var(--color-error);
290
+ }
291
+
292
+ /* Success State on Form Group */
293
+ .form-group-success .form-label {
294
+ color: var(--color-success);
295
+ }
296
+
297
+ .form-group-success .input,
298
+ .form-group-success .select,
299
+ .form-group-success .textarea {
300
+ border-color: var(--color-success);
301
+ }
302
+
303
+ /* Disabled Form Group */
304
+ .form-group-disabled {
305
+ opacity: 0.5;
306
+ pointer-events: none;
307
+ }
308
+ }