@mt-gloss/styles 0.0.3

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,590 @@
1
+ // ============================================
2
+ // COMPONENT: COMPOSED INPUTS
3
+ // SearchInput, PasswordInput, TagInput, PhoneInput
4
+ // ============================================
5
+
6
+ @use '../tokens' as *;
7
+ @use '../mixins' as *;
8
+
9
+ // --- SEARCH INPUT ---
10
+ .gloss-search-input-wrapper {
11
+ position: relative;
12
+ }
13
+
14
+ .gloss-search-input {
15
+ // Base input styles inherited from Input
16
+ }
17
+
18
+ .gloss-search-input__actions {
19
+ display: flex;
20
+ align-items: center;
21
+ gap: $space-1;
22
+ }
23
+
24
+ .gloss-search-input__clear {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ width: 20px;
29
+ height: 20px;
30
+ padding: 0;
31
+ border: none;
32
+ background: $color-gray-200;
33
+ border-radius: 50%;
34
+ cursor: pointer;
35
+ transition: background-color 0.15s ease;
36
+
37
+ svg {
38
+ color: $alias-text-secondary;
39
+ }
40
+
41
+ &:hover {
42
+ background: $color-gray-300;
43
+
44
+ svg {
45
+ color: $alias-text-primary;
46
+ }
47
+ }
48
+ }
49
+
50
+ .gloss-search-input__shortcut {
51
+ display: inline-flex;
52
+ align-items: center;
53
+ gap: 2px;
54
+ padding: 2px 6px;
55
+ background: $color-gray-100;
56
+ border: 1px solid $color-gray-200;
57
+ border-radius: $radius-sm;
58
+ font-size: $text-xs;
59
+ font-family: $font-mono;
60
+ color: $alias-text-secondary;
61
+
62
+ svg {
63
+ width: 10px;
64
+ height: 10px;
65
+ }
66
+ }
67
+
68
+ .gloss-search-input__suggestions {
69
+ position: absolute;
70
+ top: 100%;
71
+ left: 0;
72
+ right: 0;
73
+ margin-top: $space-1;
74
+ padding: $space-1 0;
75
+ background: $alias-bg-surface;
76
+ border: 1px solid $alias-border-default;
77
+ border-radius: $radius-lg;
78
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
79
+ z-index: 100;
80
+ list-style: none;
81
+ max-height: 280px;
82
+ overflow-y: auto;
83
+ }
84
+
85
+ .gloss-search-input__suggestion {
86
+ display: flex;
87
+ align-items: center;
88
+ gap: $space-3;
89
+ padding: $space-2 $space-3;
90
+ cursor: pointer;
91
+ transition: background-color 0.15s ease;
92
+
93
+ &:hover,
94
+ &--selected {
95
+ background: $alias-bg-hover;
96
+ }
97
+
98
+ svg {
99
+ color: $alias-text-secondary;
100
+ flex-shrink: 0;
101
+ }
102
+ }
103
+
104
+ .gloss-search-input__suggestion-content {
105
+ flex: 1;
106
+ min-width: 0;
107
+ }
108
+
109
+ .gloss-search-input__suggestion-label {
110
+ display: block;
111
+ font-size: $text-sm;
112
+ color: $alias-text-primary;
113
+ }
114
+
115
+ .gloss-search-input__suggestion-desc {
116
+ display: block;
117
+ font-size: $text-xs;
118
+ color: $alias-text-secondary;
119
+ white-space: nowrap;
120
+ overflow: hidden;
121
+ text-overflow: ellipsis;
122
+ }
123
+
124
+ // --- PASSWORD INPUT ---
125
+ .gloss-password-input-wrapper {
126
+ display: flex;
127
+ flex-direction: column;
128
+ gap: $space-2;
129
+ }
130
+
131
+ .gloss-password-input {
132
+ // Base input styles inherited from Input
133
+ }
134
+
135
+ .gloss-password-input__actions {
136
+ display: flex;
137
+ align-items: center;
138
+ gap: $space-1;
139
+ }
140
+
141
+ .gloss-password-input__toggle,
142
+ .gloss-password-input__generate {
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ width: 28px;
147
+ height: 28px;
148
+ padding: 0;
149
+ border: none;
150
+ background: transparent;
151
+ border-radius: $radius-sm;
152
+ cursor: pointer;
153
+ color: $alias-text-secondary;
154
+ transition: background-color 0.15s ease, color 0.15s ease;
155
+
156
+ &:hover {
157
+ background: $color-gray-100;
158
+ color: $alias-text-primary;
159
+ }
160
+ }
161
+
162
+ .gloss-password-input__strength {
163
+ display: flex;
164
+ align-items: center;
165
+ gap: $space-3;
166
+ }
167
+
168
+ .gloss-password-input__strength-bar {
169
+ flex: 1;
170
+ height: 4px;
171
+ background: $color-gray-200;
172
+ border-radius: $radius-full;
173
+ overflow: hidden;
174
+ }
175
+
176
+ .gloss-password-input__strength-fill {
177
+ height: 100%;
178
+ transition: width 0.3s ease, background-color 0.3s ease;
179
+ border-radius: $radius-full;
180
+ }
181
+
182
+ .gloss-password-input__strength-label {
183
+ font-size: $text-xs;
184
+ font-weight: 500;
185
+ min-width: 50px;
186
+ text-align: right;
187
+ }
188
+
189
+ .gloss-password-input__rules {
190
+ list-style: none;
191
+ padding: 0;
192
+ margin: 0;
193
+ display: flex;
194
+ flex-direction: column;
195
+ gap: $space-1;
196
+ }
197
+
198
+ .gloss-password-input__rule {
199
+ display: flex;
200
+ align-items: center;
201
+ gap: $space-2;
202
+ font-size: $text-sm;
203
+ color: $alias-text-secondary;
204
+
205
+ svg {
206
+ flex-shrink: 0;
207
+ color: $color-gray-400;
208
+ }
209
+
210
+ &--passed {
211
+ color: $color-green-600;
212
+
213
+ svg {
214
+ color: $color-green-500;
215
+ }
216
+ }
217
+ }
218
+
219
+ // --- TAG INPUT ---
220
+ .gloss-tag-input-wrapper {
221
+ display: flex;
222
+ flex-direction: column;
223
+ gap: $space-2;
224
+
225
+ &--disabled {
226
+ opacity: 0.6;
227
+ }
228
+ }
229
+
230
+ .gloss-tag-input__label {
231
+ font-size: $text-sm;
232
+ font-weight: 500;
233
+ color: $alias-text-primary;
234
+ }
235
+
236
+ .gloss-tag-input {
237
+ position: relative;
238
+ display: flex;
239
+ flex-wrap: wrap;
240
+ align-items: center;
241
+ min-height: 44px;
242
+ padding: $space-2;
243
+ background: $color-white;
244
+ border: 1px solid $alias-border-default;
245
+ border-radius: $radius-lg;
246
+ cursor: text;
247
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
248
+ @include shadow-input-default;
249
+
250
+ &--focused {
251
+ border-color: $alias-border-focus;
252
+ @include shadow-input-focus;
253
+ }
254
+
255
+ &--error {
256
+ border-color: $alias-border-error;
257
+ }
258
+
259
+ &--disabled {
260
+ cursor: not-allowed;
261
+ background: $alias-bg-disabled;
262
+ }
263
+
264
+ // Size variants
265
+ &--sm {
266
+ min-height: 36px;
267
+ padding: $space-1;
268
+
269
+ .gloss-tag-input__tag {
270
+ padding: $space-1 $space-2;
271
+ font-size: $text-xs;
272
+ }
273
+ }
274
+
275
+ &--lg {
276
+ min-height: 52px;
277
+ padding: $space-3;
278
+
279
+ .gloss-tag-input__tag {
280
+ padding: $space-2 $space-3;
281
+ font-size: $text-base;
282
+ }
283
+ }
284
+ }
285
+
286
+ .gloss-tag-input__tags {
287
+ display: flex;
288
+ flex-wrap: wrap;
289
+ align-items: center;
290
+ gap: $space-2;
291
+ flex: 1;
292
+ }
293
+
294
+ .gloss-tag-input__tag {
295
+ display: inline-flex;
296
+ align-items: center;
297
+ gap: $space-1;
298
+ padding: $space-1 $space-2;
299
+ background: $color-blue-100;
300
+ color: $color-blue-700;
301
+ border-radius: $radius-md;
302
+ font-size: $text-sm;
303
+ font-weight: 500;
304
+ animation: tag-enter 0.15s ease;
305
+ }
306
+
307
+ @keyframes tag-enter {
308
+ from {
309
+ opacity: 0;
310
+ transform: scale(0.8);
311
+ }
312
+ to {
313
+ opacity: 1;
314
+ transform: scale(1);
315
+ }
316
+ }
317
+
318
+ .gloss-tag-input__tag-text {
319
+ max-width: 200px;
320
+ overflow: hidden;
321
+ text-overflow: ellipsis;
322
+ white-space: nowrap;
323
+ }
324
+
325
+ .gloss-tag-input__tag-remove {
326
+ display: flex;
327
+ align-items: center;
328
+ justify-content: center;
329
+ width: 16px;
330
+ height: 16px;
331
+ padding: 0;
332
+ border: none;
333
+ background: transparent;
334
+ border-radius: 50%;
335
+ cursor: pointer;
336
+ color: $color-blue-600;
337
+ transition: background-color 0.15s ease;
338
+
339
+ &:hover {
340
+ background: $color-blue-200;
341
+ }
342
+
343
+ svg {
344
+ width: 12px;
345
+ height: 12px;
346
+ }
347
+ }
348
+
349
+ .gloss-tag-input__input {
350
+ flex: 1;
351
+ min-width: 100px;
352
+ padding: $space-1;
353
+ border: none;
354
+ background: transparent;
355
+ font-family: $font-body;
356
+ font-size: $text-sm;
357
+ color: $alias-text-primary;
358
+ outline: none;
359
+
360
+ &::placeholder {
361
+ color: $alias-text-tertiary;
362
+ }
363
+ }
364
+
365
+ .gloss-tag-input__suggestions {
366
+ position: absolute;
367
+ top: 100%;
368
+ left: 0;
369
+ right: 0;
370
+ margin-top: $space-1;
371
+ padding: $space-1 0;
372
+ background: $alias-bg-surface;
373
+ border: 1px solid $alias-border-default;
374
+ border-radius: $radius-lg;
375
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
376
+ z-index: 100;
377
+ list-style: none;
378
+ max-height: 200px;
379
+ overflow-y: auto;
380
+ }
381
+
382
+ .gloss-tag-input__suggestion {
383
+ padding: $space-2 $space-3;
384
+ font-size: $text-sm;
385
+ color: $alias-text-primary;
386
+ cursor: pointer;
387
+ transition: background-color 0.15s ease;
388
+
389
+ &:hover,
390
+ &--selected {
391
+ background: $alias-bg-hover;
392
+ }
393
+ }
394
+
395
+ .gloss-tag-input__helper {
396
+ display: flex;
397
+ align-items: center;
398
+ gap: $space-1;
399
+ font-size: $text-sm;
400
+ color: $alias-text-secondary;
401
+
402
+ &--error {
403
+ color: $alias-text-error;
404
+
405
+ svg {
406
+ color: $color-red-500;
407
+ }
408
+ }
409
+ }
410
+
411
+ // --- PHONE INPUT ---
412
+ .gloss-phone-input-wrapper {
413
+ display: flex;
414
+ flex-direction: column;
415
+ gap: $space-2;
416
+ }
417
+
418
+ .gloss-phone-input__label {
419
+ font-size: $text-sm;
420
+ font-weight: 500;
421
+ color: $alias-text-primary;
422
+ }
423
+
424
+ .gloss-phone-input {
425
+ display: flex;
426
+ align-items: stretch;
427
+ background: $color-white;
428
+ border: 1px solid $alias-border-default;
429
+ border-radius: $radius-lg;
430
+ overflow: hidden;
431
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
432
+ @include shadow-input-default;
433
+
434
+ &:focus-within {
435
+ border-color: $alias-border-focus;
436
+ @include shadow-input-focus;
437
+ }
438
+ }
439
+
440
+ .gloss-phone-input__country {
441
+ position: relative;
442
+ display: flex;
443
+ flex-shrink: 0;
444
+ border-right: 1px solid $alias-border-default;
445
+ }
446
+
447
+ .gloss-phone-input__country-btn {
448
+ display: flex;
449
+ align-items: center;
450
+ gap: $space-2;
451
+ padding: $space-2 $space-3;
452
+ border: none;
453
+ background: $color-gray-50;
454
+ cursor: pointer;
455
+ font-family: $font-body;
456
+ font-size: $text-sm;
457
+ color: $alias-text-primary;
458
+ transition: background-color 0.15s ease;
459
+
460
+ &:hover:not(:disabled) {
461
+ background: $color-gray-100;
462
+ }
463
+
464
+ &:disabled {
465
+ cursor: not-allowed;
466
+ opacity: 0.6;
467
+ }
468
+
469
+ svg {
470
+ color: $alias-text-secondary;
471
+ transition: transform 0.2s ease;
472
+ }
473
+
474
+ &[aria-expanded="true"] svg {
475
+ transform: rotate(180deg);
476
+ }
477
+ }
478
+
479
+ .gloss-phone-input__country-flag {
480
+ font-size: $text-xs;
481
+ font-weight: 600;
482
+ color: $alias-text-secondary;
483
+ background: $color-gray-200;
484
+ padding: 2px 4px;
485
+ border-radius: $radius-xs;
486
+ }
487
+
488
+ .gloss-phone-input__dial-code {
489
+ font-weight: 500;
490
+ color: $alias-text-secondary;
491
+ }
492
+
493
+ .gloss-phone-input__dial-code-static {
494
+ display: flex;
495
+ align-items: center;
496
+ padding: $space-2 $space-3;
497
+ font-size: $text-sm;
498
+ font-weight: 500;
499
+ color: $alias-text-secondary;
500
+ background: $color-gray-50;
501
+ }
502
+
503
+ .gloss-phone-input__dropdown {
504
+ position: absolute;
505
+ top: 100%;
506
+ left: 0;
507
+ min-width: 280px;
508
+ margin-top: $space-1;
509
+ padding: $space-1 0;
510
+ background: $alias-bg-surface;
511
+ border: 1px solid $alias-border-default;
512
+ border-radius: $radius-lg;
513
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
514
+ z-index: 100;
515
+ list-style: none;
516
+ max-height: 280px;
517
+ overflow-y: auto;
518
+ }
519
+
520
+ .gloss-phone-input__option {
521
+ display: flex;
522
+ align-items: center;
523
+ gap: $space-3;
524
+ padding: $space-2 $space-3;
525
+ cursor: pointer;
526
+ transition: background-color 0.15s ease;
527
+
528
+ &:hover,
529
+ &--selected {
530
+ background: $alias-bg-hover;
531
+ }
532
+ }
533
+
534
+ .gloss-phone-input__option-flag {
535
+ font-size: $text-xs;
536
+ font-weight: 600;
537
+ color: $alias-text-secondary;
538
+ background: $color-gray-200;
539
+ padding: 2px 4px;
540
+ border-radius: $radius-xs;
541
+ min-width: 28px;
542
+ text-align: center;
543
+ }
544
+
545
+ .gloss-phone-input__option-name {
546
+ flex: 1;
547
+ font-size: $text-sm;
548
+ color: $alias-text-primary;
549
+ }
550
+
551
+ .gloss-phone-input__option-dial {
552
+ font-size: $text-sm;
553
+ color: $alias-text-secondary;
554
+ }
555
+
556
+ .gloss-phone-input__input {
557
+ flex: 1;
558
+ min-width: 0;
559
+ padding: $space-3 $space-4;
560
+ border: none;
561
+ background: transparent;
562
+ font-family: $font-body;
563
+ font-size: $text-base;
564
+ color: $alias-text-primary;
565
+ outline: none;
566
+
567
+ &::placeholder {
568
+ color: $alias-text-tertiary;
569
+ }
570
+
571
+ &--error {
572
+ color: $alias-text-error;
573
+ }
574
+ }
575
+
576
+ .gloss-phone-input__helper {
577
+ display: flex;
578
+ align-items: center;
579
+ gap: $space-1;
580
+ font-size: $text-sm;
581
+ color: $alias-text-secondary;
582
+
583
+ &--error {
584
+ color: $alias-text-error;
585
+
586
+ svg {
587
+ color: $color-red-500;
588
+ }
589
+ }
590
+ }