@thl-ui/styles 0.0.0-stage → 0.1.1

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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -2
  3. package/dist/components/alert.css +1 -0
  4. package/dist/components/app.css +1 -0
  5. package/dist/components/avatar.css +1 -0
  6. package/dist/components/badge.css +1 -0
  7. package/dist/components/button.css +1 -0
  8. package/dist/components/card.css +1 -0
  9. package/dist/components/form.css +1 -0
  10. package/dist/components/nav.css +1 -0
  11. package/dist/components/overlay.css +1 -0
  12. package/dist/components/pages.css +1 -0
  13. package/dist/components/progress.css +1 -0
  14. package/dist/components/ribbon.css +1 -0
  15. package/dist/components/table.css +1 -0
  16. package/dist/components/widgets.css +1 -0
  17. package/dist/fonts/OFL.txt +93 -0
  18. package/dist/fonts/open-sans-cyrillic-ext-wght-normal.woff2 +0 -0
  19. package/dist/fonts/open-sans-cyrillic-wght-normal.woff2 +0 -0
  20. package/dist/fonts/open-sans-greek-ext-wght-normal.woff2 +0 -0
  21. package/dist/fonts/open-sans-greek-wght-normal.woff2 +0 -0
  22. package/dist/fonts/open-sans-latin-ext-wght-normal.woff2 +0 -0
  23. package/dist/fonts/open-sans-latin-wght-normal.woff2 +0 -0
  24. package/dist/fonts/open-sans-vietnamese-wght-normal.woff2 +0 -0
  25. package/dist/fonts.css +70 -0
  26. package/dist/thl-ui.css +447 -0
  27. package/dist/tokens.css +376 -0
  28. package/package.json +48 -4
  29. package/src/_base.scss +408 -0
  30. package/src/_mixins.scss +53 -0
  31. package/src/components/_alert.scss +183 -0
  32. package/src/components/_avatar.scss +75 -0
  33. package/src/components/_badge.scss +112 -0
  34. package/src/components/_button.scss +242 -0
  35. package/src/components/_card.scss +211 -0
  36. package/src/components/_form.scss +959 -0
  37. package/src/components/_nav.scss +738 -0
  38. package/src/components/_overlay.scss +382 -0
  39. package/src/components/_progress.scss +103 -0
  40. package/src/components/_ribbon.scss +136 -0
  41. package/src/components/_table.scss +215 -0
  42. package/src/components/_widgets.scss +1102 -0
  43. package/src/index.scss +16 -0
  44. package/src/layout/_app.scss +804 -0
  45. package/src/pages/_pages.scss +691 -0
@@ -0,0 +1,959 @@
1
+ @use '../mixins' as *;
2
+
3
+ .#{$p}-form {
4
+ &--horizontal .#{$p}-field {
5
+ display: grid;
6
+ grid-template-columns: 180px 1fr;
7
+ align-items: start;
8
+ gap: 6px 20px;
9
+ .#{$p}-field__label {
10
+ padding-top: 9px;
11
+ margin: 0;
12
+ text-align: end;
13
+ }
14
+ .#{$p}-field__help,
15
+ .#{$p}-field__error {
16
+ grid-column: 2;
17
+ }
18
+ @include down(sm) {
19
+ grid-template-columns: 1fr;
20
+ .#{$p}-field__label {
21
+ text-align: start;
22
+ padding-top: 0;
23
+ }
24
+ .#{$p}-field__help,
25
+ .#{$p}-field__error {
26
+ grid-column: 1;
27
+ }
28
+ }
29
+ }
30
+ &--bordered .#{$p}-field {
31
+ border-bottom: 1px solid v(border-color);
32
+ padding: 15px 0;
33
+ margin: 0;
34
+ }
35
+ &__actions {
36
+ display: flex;
37
+ gap: 8px;
38
+ flex-wrap: wrap;
39
+ margin-top: 10px;
40
+ }
41
+ &__section {
42
+ font-weight: 600;
43
+ color: v(heading);
44
+ margin: 25px 0 15px;
45
+ padding-bottom: 8px;
46
+ border-bottom: 1px solid v(border-color);
47
+ font-size: v(h4) !important;
48
+ line-height: 22px !important;
49
+ }
50
+ }
51
+
52
+ .#{$p}-field {
53
+ margin-bottom: 20px;
54
+ position: relative;
55
+ &__label {
56
+ display: block;
57
+ margin-bottom: 7px;
58
+ font-weight: 500;
59
+ color: v(text-strong);
60
+ font-size: 14px;
61
+ }
62
+ &__required {
63
+ color: v(color-danger-text);
64
+ margin-inline-start: 2px;
65
+ }
66
+ &__label--required::after {
67
+ content: '*';
68
+ color: v(color-danger-text);
69
+ margin-inline-start: 2px;
70
+ }
71
+ &__help {
72
+ margin-top: 5px;
73
+ font-size: 12px;
74
+ color: v(text);
75
+ }
76
+ &__error {
77
+ margin-top: 5px;
78
+ font-size: 12px;
79
+ color: v(color-danger-text);
80
+ }
81
+ &.has-error .#{$p}-input,
82
+ &.has-error .#{$p}-select__control {
83
+ border-color: v(color-danger);
84
+ }
85
+ &.has-success .#{$p}-input {
86
+ border-color: v(color-success);
87
+ }
88
+ &.has-warning .#{$p}-input {
89
+ border-color: v(color-warning);
90
+ }
91
+ }
92
+
93
+ .#{$p}-input {
94
+ display: block;
95
+ width: 100%;
96
+ height: v(control-height);
97
+ padding: 7px 12px;
98
+ font: inherit;
99
+ font-size: v(font-size);
100
+ color: v(text-strong);
101
+ background: v(surface);
102
+ border: 1px solid v(border-color);
103
+ border-radius: v(radius-sm);
104
+ box-shadow: none;
105
+ transition:
106
+ border-color v(transition),
107
+ box-shadow v(transition);
108
+ &::placeholder {
109
+ color: v(text);
110
+ opacity: 0.75;
111
+ }
112
+ &:focus {
113
+ outline: none;
114
+ border-color: v(theme);
115
+ box-shadow: 0 0 0 3px color-mix(in srgb, #{v(theme)} 15%, transparent);
116
+ }
117
+ &:disabled,
118
+ &[readonly] {
119
+ background: v(surface-muted);
120
+ cursor: not-allowed;
121
+ }
122
+ &--size-sm {
123
+ height: v(control-height-sm);
124
+ font-size: 13px;
125
+ padding: 4px 10px;
126
+ }
127
+ &--size-lg {
128
+ height: v(control-height-lg);
129
+ font-size: 16px;
130
+ padding: 10px 16px;
131
+ }
132
+ &--textarea {
133
+ height: auto;
134
+ min-height: 90px;
135
+ resize: vertical;
136
+ }
137
+ &--rounded {
138
+ border-radius: v(radius-pill);
139
+ }
140
+ /* form-control-line / form-material */
141
+ &--line,
142
+ &--material {
143
+ border: 0;
144
+ border-radius: 0;
145
+ padding-inline: 0;
146
+ background: transparent;
147
+ border-bottom: 1px solid v(border-color);
148
+ background-image: linear-gradient(v(theme), v(theme));
149
+ background-size: 0 2px;
150
+ background-repeat: no-repeat;
151
+ background-position: center bottom;
152
+ transition: background-size 0.3s;
153
+ &:focus {
154
+ box-shadow: none;
155
+ background-size: 100% 2px;
156
+ }
157
+ }
158
+ @at-root select#{&} {
159
+ appearance: none;
160
+ padding-inline-end: 32px;
161
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d9498' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
162
+ background-repeat: no-repeat;
163
+ background-position: right 12px center;
164
+ }
165
+ }
166
+ [dir='rtl'] select.#{$p}-input {
167
+ background-position: left 12px center;
168
+ }
169
+
170
+ /* floating label */
171
+ .#{$p}-float {
172
+ position: relative;
173
+ .#{$p}-input {
174
+ padding-top: 18px;
175
+ height: 50px;
176
+ }
177
+ &__label {
178
+ position: absolute;
179
+ inset-inline-start: 12px;
180
+ top: 15px;
181
+ color: v(text);
182
+ pointer-events: none;
183
+ transition: all 0.2s;
184
+ font-size: 14px;
185
+ }
186
+ .#{$p}-input:focus + &__label,
187
+ .#{$p}-input:not(:placeholder-shown) + &__label {
188
+ top: 5px;
189
+ font-size: 11px;
190
+ color: v(theme-text);
191
+ }
192
+ .#{$p}-input--material + &__label {
193
+ inset-inline-start: 0;
194
+ }
195
+ }
196
+
197
+ /* input group */
198
+ .#{$p}-input-group {
199
+ display: flex;
200
+ width: 100%;
201
+ align-items: stretch;
202
+ > .#{$p}-input {
203
+ flex: 1;
204
+ min-width: 0;
205
+ }
206
+ > *:not(:first-child) {
207
+ border-start-start-radius: 0;
208
+ border-end-start-radius: 0;
209
+ margin-inline-start: -1px;
210
+ }
211
+ > *:not(:last-child) {
212
+ border-start-end-radius: 0;
213
+ border-end-end-radius: 0;
214
+ }
215
+ &__addon {
216
+ display: inline-flex;
217
+ align-items: center;
218
+ padding: 0 12px;
219
+ background: v(surface-muted);
220
+ border: 1px solid v(border-color);
221
+ border-radius: v(radius-sm);
222
+ color: v(text-strong);
223
+ white-space: nowrap;
224
+ }
225
+ > .#{$p}-btn {
226
+ height: auto;
227
+ border-radius: v(radius-sm);
228
+ }
229
+ }
230
+
231
+ /* checkbox / radio (CSS-only) */
232
+ .#{$p}-check {
233
+ --_c: #{v(theme)};
234
+ display: inline-flex;
235
+ align-items: center;
236
+ gap: 8px;
237
+ cursor: pointer;
238
+ user-select: none;
239
+ position: relative;
240
+ margin-inline-end: 16px;
241
+ line-height: 1.4;
242
+ color: v(text-strong);
243
+ @each $c in $colors {
244
+ &--#{$c} {
245
+ --_c: #{v(color-#{$c})};
246
+ }
247
+ }
248
+ &__input {
249
+ position: absolute;
250
+ opacity: 0;
251
+ width: 1px;
252
+ height: 1px;
253
+ }
254
+ &__box {
255
+ width: 18px;
256
+ height: 18px;
257
+ flex-shrink: 0;
258
+ border: 1px solid v(border-color);
259
+ border-radius: v(radius-sm);
260
+ background: v(surface);
261
+ display: inline-flex;
262
+ align-items: center;
263
+ justify-content: center;
264
+ transition: all 0.15s;
265
+ &::after {
266
+ content: '';
267
+ width: 5px;
268
+ height: 9px;
269
+ border: solid #fff;
270
+ border-width: 0 2px 2px 0;
271
+ transform: rotate(45deg) scale(0);
272
+ margin-top: -2px;
273
+ transition: transform 0.15s;
274
+ }
275
+ }
276
+ &__input:checked + &__box {
277
+ background: var(--_c);
278
+ border-color: var(--_c);
279
+ &::after {
280
+ transform: rotate(45deg) scale(1);
281
+ }
282
+ }
283
+ &__input:indeterminate + &__box {
284
+ background: var(--_c);
285
+ border-color: var(--_c);
286
+ &::after {
287
+ width: 9px;
288
+ height: 0;
289
+ border-width: 0 0 2px;
290
+ transform: none;
291
+ margin: 0;
292
+ }
293
+ }
294
+ &__input:focus-visible + &__box {
295
+ @include focus-ring;
296
+ }
297
+ &__input:disabled + &__box {
298
+ opacity: 0.5;
299
+ }
300
+ &.is-disabled {
301
+ cursor: not-allowed;
302
+ opacity: 0.7;
303
+ }
304
+ &--circle &__box {
305
+ border-radius: 50%;
306
+ }
307
+ &--radio &__box {
308
+ border-radius: 50%;
309
+ &::after {
310
+ width: 8px;
311
+ height: 8px;
312
+ border: 0;
313
+ border-radius: 50%;
314
+ background: #fff;
315
+ transform: scale(0);
316
+ margin: 0;
317
+ }
318
+ }
319
+ &--radio &__input:checked + &__box::after {
320
+ transform: scale(1);
321
+ }
322
+ /* "flat" / "square" / "circle" styles */
323
+ &--flat &__box {
324
+ border: 0;
325
+ background: v(color-light);
326
+ }
327
+ &--square &__box {
328
+ border-radius: 0;
329
+ }
330
+ }
331
+ .#{$p}-check-group {
332
+ display: flex;
333
+ flex-wrap: wrap;
334
+ gap: 10px 0;
335
+ &--vertical {
336
+ flex-direction: column;
337
+ }
338
+ }
339
+
340
+ /* switch */
341
+ .#{$p}-switch {
342
+ --_c: #{v(theme)};
343
+ display: inline-flex;
344
+ align-items: center;
345
+ gap: 10px;
346
+ cursor: pointer;
347
+ user-select: none;
348
+ color: v(text-strong);
349
+ @each $c in $colors {
350
+ &--#{$c} {
351
+ --_c: #{v(color-#{$c})};
352
+ }
353
+ }
354
+ &__input {
355
+ position: absolute;
356
+ opacity: 0;
357
+ width: 1px;
358
+ height: 1px;
359
+ }
360
+ &__track {
361
+ position: relative;
362
+ width: 50px;
363
+ height: 26px;
364
+ border-radius: 20px;
365
+ background: v(surface);
366
+ border: 1px solid v(border-color);
367
+ transition: all 0.3s;
368
+ flex-shrink: 0;
369
+ &::after {
370
+ content: '';
371
+ position: absolute;
372
+ top: 1px;
373
+ inset-inline-start: 1px;
374
+ width: 22px;
375
+ height: 22px;
376
+ border-radius: 50%;
377
+ background: #fff;
378
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
379
+ transition: all 0.3s;
380
+ }
381
+ }
382
+ &__input:checked + &__track {
383
+ background: var(--_c);
384
+ border-color: var(--_c);
385
+ box-shadow: inset 0 0 0 13px var(--_c);
386
+ &::after {
387
+ inset-inline-start: 25px;
388
+ }
389
+ }
390
+ &__input:focus-visible + &__track {
391
+ @include focus-ring;
392
+ }
393
+ &__input:disabled + &__track {
394
+ opacity: 0.5;
395
+ }
396
+ &--size-sm &__track {
397
+ width: 36px;
398
+ height: 20px;
399
+ &::after {
400
+ width: 16px;
401
+ height: 16px;
402
+ }
403
+ }
404
+ &--size-sm &__input:checked + &__track::after {
405
+ inset-inline-start: 17px;
406
+ }
407
+ &--size-lg &__track {
408
+ width: 66px;
409
+ height: 34px;
410
+ border-radius: 30px;
411
+ &::after {
412
+ width: 30px;
413
+ height: 30px;
414
+ }
415
+ }
416
+ &--size-lg &__input:checked + &__track::after {
417
+ inset-inline-start: 33px;
418
+ }
419
+ }
420
+
421
+ /* number input */
422
+ .#{$p}-number {
423
+ display: flex;
424
+ width: 100%;
425
+ .#{$p}-input {
426
+ text-align: center;
427
+ border-radius: 0;
428
+ flex: 1;
429
+ min-width: 0;
430
+ -moz-appearance: textfield;
431
+ &::-webkit-inner-spin-button,
432
+ &::-webkit-outer-spin-button {
433
+ -webkit-appearance: none;
434
+ }
435
+ }
436
+ &__btn {
437
+ width: v(control-height);
438
+ flex-shrink: 0;
439
+ background: v(surface-muted);
440
+ border: 1px solid v(border-color);
441
+ color: v(text-strong);
442
+ cursor: pointer;
443
+ font-size: 16px;
444
+ &:first-child {
445
+ border-start-start-radius: v(radius-sm);
446
+ border-end-start-radius: v(radius-sm);
447
+ margin-inline-end: -1px;
448
+ }
449
+ &:last-child {
450
+ border-start-end-radius: v(radius-sm);
451
+ border-end-end-radius: v(radius-sm);
452
+ margin-inline-start: -1px;
453
+ }
454
+ &:hover {
455
+ color: v(theme-text);
456
+ }
457
+ &:disabled {
458
+ opacity: 0.5;
459
+ cursor: not-allowed;
460
+ }
461
+ }
462
+ }
463
+
464
+ /* slider */
465
+ .#{$p}-slider {
466
+ --_c: #{v(theme)};
467
+ --_on: #{v(on-theme)};
468
+ position: relative;
469
+ padding: 28px 10px 10px;
470
+ user-select: none;
471
+ touch-action: none;
472
+ @each $c in $colors {
473
+ &--#{$c} {
474
+ --_c: #{v(color-#{$c})};
475
+ --_on: #{on($c)};
476
+ }
477
+ }
478
+ &__rail {
479
+ position: relative;
480
+ height: 6px;
481
+ border-radius: 3px;
482
+ background: v(color-light);
483
+ cursor: pointer;
484
+ }
485
+ &__fill {
486
+ position: absolute;
487
+ top: 0;
488
+ bottom: 0;
489
+ background: var(--_c);
490
+ border-radius: 3px;
491
+ }
492
+ &__thumb {
493
+ position: absolute;
494
+ top: 50%;
495
+ width: 20px;
496
+ height: 20px;
497
+ margin-block-start: -10px;
498
+ margin-inline-start: -10px;
499
+ border-radius: 50%;
500
+ background: v(surface);
501
+ border: 3px solid var(--_c);
502
+ box-shadow: v(shadow-sm);
503
+ cursor: grab;
504
+ z-index: 2;
505
+ &:active {
506
+ cursor: grabbing;
507
+ }
508
+ &:focus-visible {
509
+ @include focus-ring;
510
+ }
511
+ }
512
+ &__tip {
513
+ position: absolute;
514
+ bottom: calc(100% + 10px);
515
+ left: 50%;
516
+ transform: translateX(-50%);
517
+ background: var(--_c);
518
+ color: var(--_on);
519
+ font-size: 11px;
520
+ padding: 2px 6px;
521
+ border-radius: v(radius-sm);
522
+ white-space: nowrap;
523
+ }
524
+ &__scale {
525
+ display: flex;
526
+ justify-content: space-between;
527
+ font-size: 11px;
528
+ color: v(text);
529
+ margin-top: 8px;
530
+ }
531
+ &.is-disabled {
532
+ pointer-events: none;
533
+ --_c: #{v(color-muted)};
534
+ --_on: #{on('muted')};
535
+ }
536
+ }
537
+
538
+ /* select / combobox / tags */
539
+ .#{$p}-select {
540
+ position: relative;
541
+ width: 100%;
542
+ &__control {
543
+ display: flex;
544
+ align-items: center;
545
+ flex-wrap: wrap;
546
+ gap: 4px;
547
+ min-height: v(control-height);
548
+ padding-block: 3px;
549
+ padding-inline: 8px 34px;
550
+ background: v(surface);
551
+ border: 1px solid v(border-color);
552
+ border-radius: v(radius-sm);
553
+ cursor: pointer;
554
+ position: relative;
555
+ &.is-focused {
556
+ border-color: v(theme);
557
+ box-shadow: 0 0 0 3px color-mix(in srgb, #{v(theme)} 15%, transparent);
558
+ }
559
+ }
560
+ &__value {
561
+ padding: 0 4px;
562
+ color: v(text-strong);
563
+ overflow: hidden;
564
+ text-overflow: ellipsis;
565
+ white-space: nowrap;
566
+ }
567
+ &__placeholder {
568
+ padding: 0 4px;
569
+ color: v(text);
570
+ opacity: 0.8;
571
+ }
572
+ &__search {
573
+ flex: 1;
574
+ min-width: 60px;
575
+ border: 0;
576
+ outline: 0;
577
+ background: transparent;
578
+ font: inherit;
579
+ color: v(text-strong);
580
+ padding: 4px;
581
+ }
582
+ &__tag {
583
+ display: inline-flex;
584
+ align-items: center;
585
+ gap: 4px;
586
+ padding: 2px 8px;
587
+ font-size: 12px;
588
+ background: v(theme);
589
+ color: v(on-theme);
590
+ border-radius: v(radius-sm);
591
+ button {
592
+ background: none;
593
+ border: 0;
594
+ color: inherit;
595
+ cursor: pointer;
596
+ padding: 0;
597
+ font-size: 14px;
598
+ line-height: 1;
599
+ opacity: 0.8;
600
+ &:hover {
601
+ opacity: 1;
602
+ }
603
+ }
604
+ }
605
+ &__indicators {
606
+ position: absolute;
607
+ inset-inline-end: 8px;
608
+ top: 50%;
609
+ transform: translateY(-50%);
610
+ display: flex;
611
+ gap: 4px;
612
+ color: v(text);
613
+ button {
614
+ background: none;
615
+ border: 0;
616
+ color: inherit;
617
+ cursor: pointer;
618
+ padding: 0 2px;
619
+ }
620
+ }
621
+ &__menu {
622
+ position: absolute;
623
+ top: 100%;
624
+ inset-inline: 0;
625
+ margin-top: 4px;
626
+ z-index: v(z-dropdown);
627
+ max-height: 260px;
628
+ overflow-y: auto;
629
+ background: v(surface);
630
+ border: 1px solid v(border-color);
631
+ border-radius: v(radius);
632
+ box-shadow: v(shadow-lg);
633
+ padding: 4px 0;
634
+ list-style: none;
635
+ margin-bottom: 0;
636
+ }
637
+ &__option {
638
+ padding: 8px 12px;
639
+ cursor: pointer;
640
+ color: v(text-strong);
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: space-between;
644
+ gap: 8px;
645
+ &.is-highlighted {
646
+ background: v(surface-muted);
647
+ }
648
+ &.is-selected {
649
+ color: v(theme-text);
650
+ font-weight: 600;
651
+ }
652
+ &.is-disabled {
653
+ opacity: 0.5;
654
+ cursor: not-allowed;
655
+ }
656
+ }
657
+ &__group {
658
+ padding: 6px 12px;
659
+ font-size: 11px;
660
+ font-weight: 700;
661
+ text-transform: uppercase;
662
+ color: v(text);
663
+ }
664
+ &__empty {
665
+ padding: 10px 12px;
666
+ color: v(text);
667
+ text-align: center;
668
+ }
669
+ &.is-disabled {
670
+ pointer-events: none;
671
+ background: v(surface-muted);
672
+ .#{$p}-select__control {
673
+ background: v(surface-muted);
674
+ }
675
+ }
676
+ }
677
+
678
+ /* upload (list / single) */
679
+ .#{$p}-upload {
680
+ &__zone {
681
+ display: flex;
682
+ flex-direction: column;
683
+ align-items: center;
684
+ justify-content: center;
685
+ gap: 10px;
686
+ min-height: 200px;
687
+ padding: 30px 20px;
688
+ text-align: center;
689
+ cursor: pointer;
690
+ border: 2px dashed v(border-color);
691
+ border-radius: v(radius);
692
+ background: v(surface);
693
+ color: v(text);
694
+ transition: all 0.2s;
695
+ &:hover,
696
+ &.is-dragging {
697
+ border-color: v(theme);
698
+ background: color-mix(in srgb, #{v(theme)} 5%, #{v(surface)});
699
+ color: v(theme-text);
700
+ }
701
+ &:focus-visible {
702
+ @include focus-ring;
703
+ }
704
+ }
705
+ &__icon {
706
+ font-size: 44px;
707
+ line-height: 1;
708
+ opacity: 0.7;
709
+ }
710
+ &__input {
711
+ display: none;
712
+ }
713
+ &__list {
714
+ list-style: none;
715
+ padding: 0;
716
+ margin: 15px 0 0;
717
+ display: grid;
718
+ gap: 10px;
719
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
720
+ }
721
+ &__file {
722
+ position: relative;
723
+ border: 1px solid v(border-color);
724
+ border-radius: v(radius);
725
+ padding: 10px;
726
+ background: v(surface);
727
+ font-size: 12px;
728
+ overflow: hidden;
729
+ img {
730
+ width: 100%;
731
+ height: 90px;
732
+ object-fit: cover;
733
+ border-radius: v(radius-sm);
734
+ display: block;
735
+ margin-bottom: 6px;
736
+ }
737
+ &.is-error {
738
+ border-color: v(color-danger);
739
+ }
740
+ }
741
+ &__name {
742
+ font-weight: 600;
743
+ color: v(text-strong);
744
+ overflow: hidden;
745
+ text-overflow: ellipsis;
746
+ white-space: nowrap;
747
+ }
748
+ &__meta {
749
+ color: v(text);
750
+ }
751
+ &__remove {
752
+ position: absolute;
753
+ top: 4px;
754
+ inset-inline-end: 4px;
755
+ width: 22px;
756
+ height: 22px;
757
+ border-radius: 50%;
758
+ border: 0;
759
+ background: rgba(0, 0, 0, 0.55);
760
+ color: #fff;
761
+ cursor: pointer;
762
+ line-height: 1;
763
+ }
764
+ &__errors {
765
+ margin-top: 8px;
766
+ color: v(color-danger-text);
767
+ font-size: 13px;
768
+ }
769
+ &__preview {
770
+ position: relative;
771
+ img {
772
+ max-height: 180px;
773
+ }
774
+ }
775
+ }
776
+
777
+ /* date / time / color pickers */
778
+ .#{$p}-picker {
779
+ position: relative;
780
+ display: block;
781
+ &__panel {
782
+ position: absolute;
783
+ top: 100%;
784
+ inset-inline-start: 0;
785
+ margin-top: 4px;
786
+ z-index: v(z-dropdown);
787
+ background: v(surface);
788
+ border: 1px solid v(border-color);
789
+ border-radius: v(radius);
790
+ box-shadow: v(shadow-lg);
791
+ padding: 12px;
792
+ min-width: 280px;
793
+ animation: #{$p}-slide-down 0.2s;
794
+ display: flex;
795
+ gap: 12px;
796
+ }
797
+ &__panel--end {
798
+ inset-inline-start: auto;
799
+ inset-inline-end: 0;
800
+ }
801
+ &__ranges {
802
+ list-style: none;
803
+ margin: 0;
804
+ padding: 0;
805
+ padding-inline-end: 12px;
806
+ border-inline-end: 1px solid v(border-color);
807
+ min-width: 130px;
808
+ button {
809
+ display: block;
810
+ width: 100%;
811
+ text-align: start;
812
+ padding: 6px 10px;
813
+ border: 0;
814
+ background: none;
815
+ font: inherit;
816
+ color: v(text-strong);
817
+ cursor: pointer;
818
+ border-radius: v(radius-sm);
819
+ &:hover,
820
+ &.is-active {
821
+ background: v(theme);
822
+ color: v(on-theme);
823
+ }
824
+ }
825
+ }
826
+ &__footer {
827
+ display: flex;
828
+ justify-content: space-between;
829
+ gap: 8px;
830
+ margin-top: 10px;
831
+ padding-top: 10px;
832
+ border-top: 1px solid v(border-color);
833
+ }
834
+ }
835
+ .#{$p}-calendar-grid {
836
+ &__head {
837
+ display: flex;
838
+ align-items: center;
839
+ justify-content: space-between;
840
+ margin-bottom: 8px;
841
+ font-weight: 600;
842
+ color: v(heading);
843
+ button {
844
+ background: none;
845
+ border: 0;
846
+ cursor: pointer;
847
+ color: v(text-strong);
848
+ padding: 4px 8px;
849
+ border-radius: v(radius-sm);
850
+ font: inherit;
851
+ &:hover {
852
+ background: v(surface-muted);
853
+ }
854
+ }
855
+ }
856
+ table {
857
+ border-collapse: collapse;
858
+ width: 100%;
859
+ }
860
+ th {
861
+ font-size: 11px;
862
+ font-weight: 600;
863
+ color: v(text);
864
+ padding: 4px 0;
865
+ text-align: center;
866
+ }
867
+ td {
868
+ padding: 1px;
869
+ text-align: center;
870
+ }
871
+ &__day {
872
+ width: 34px;
873
+ height: 32px;
874
+ border: 0;
875
+ background: none;
876
+ font: inherit;
877
+ font-size: 13px;
878
+ color: v(text-strong);
879
+ cursor: pointer;
880
+ border-radius: v(radius-sm);
881
+ &:hover {
882
+ background: v(surface-muted);
883
+ }
884
+ &.is-outside {
885
+ color: v(text);
886
+ }
887
+ &.is-today {
888
+ font-weight: 700;
889
+ color: v(theme-text);
890
+ }
891
+ &.is-in-range {
892
+ background: color-mix(in srgb, #{v(theme)} 15%, transparent);
893
+ border-radius: 0;
894
+ }
895
+ &.is-selected {
896
+ background: v(theme);
897
+ color: v(on-theme);
898
+ }
899
+ &:disabled {
900
+ color: v(text);
901
+ text-decoration: line-through;
902
+ opacity: 0.75;
903
+ cursor: not-allowed;
904
+ }
905
+ }
906
+ }
907
+ .#{$p}-time-list {
908
+ display: flex;
909
+ gap: 6px;
910
+ ul {
911
+ list-style: none;
912
+ margin: 0;
913
+ padding: 0;
914
+ max-height: 220px;
915
+ overflow-y: auto;
916
+ width: 56px;
917
+ }
918
+ button {
919
+ width: 100%;
920
+ padding: 5px;
921
+ border: 0;
922
+ background: none;
923
+ cursor: pointer;
924
+ font: inherit;
925
+ color: v(text-strong);
926
+ border-radius: v(radius-sm);
927
+ &:hover {
928
+ background: v(surface-muted);
929
+ }
930
+ &.is-selected {
931
+ background: v(theme);
932
+ color: v(on-theme);
933
+ }
934
+ }
935
+ }
936
+ .#{$p}-color-swatch {
937
+ display: inline-block;
938
+ width: 22px;
939
+ height: 22px;
940
+ border-radius: v(radius-sm);
941
+ border: 1px solid v(border-color);
942
+ vertical-align: middle;
943
+ }
944
+ .#{$p}-color-palette {
945
+ display: grid;
946
+ grid-template-columns: repeat(8, 24px);
947
+ gap: 6px;
948
+ button {
949
+ width: 24px;
950
+ height: 24px;
951
+ border-radius: v(radius-sm);
952
+ border: 1px solid rgba(0, 0, 0, 0.1);
953
+ cursor: pointer;
954
+ &.is-selected {
955
+ outline: 2px solid v(text-strong);
956
+ outline-offset: 1px;
957
+ }
958
+ }
959
+ }