@neatui/css 1.0.20 → 1.0.22

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.
@@ -1 +1,3 @@
1
1
  @import './tabs@a.scss';
2
+ @import './tabs@b.scss';
3
+ @import './tabs@c.scss';
@@ -18,14 +18,14 @@ $sz: 'xs', 's', 'm', 'l', 'xl';
18
18
  position: relative;
19
19
  display: inline-block;
20
20
  cursor: pointer;
21
- margin-left: 1rem;
22
- margin-right: 1rem;
21
+ margin-left: 1em;
22
+ margin-right: 1em;
23
23
 
24
24
  &:first-child {
25
- margin-left: 0;
25
+ margin-left: 0 !important;
26
26
  }
27
27
  &:last-child {
28
- margin-right: 0;
28
+ margin-right: 0 !important;
29
29
  }
30
30
 
31
31
  &.active {
@@ -50,12 +50,17 @@ $sz: 'xs', 's', 'm', 'l', 'xl';
50
50
  }
51
51
 
52
52
  // 尺寸
53
- $base: 2em;
53
+ $base: 1.5em;
54
54
  @each $i in $sz {
55
55
  // @debug $i;
56
56
  &[ui-tabs~='#{$i}'] {
57
57
  height: $base;
58
58
  line-height: $base;
59
+
60
+ & > * {
61
+ margin-left: $base * 0.5 - 0.5em;
62
+ margin-right: $base * 0.5 - 0.5em;
63
+ }
59
64
  }
60
65
  $base: $base + 0.5;
61
66
  }
@@ -0,0 +1,65 @@
1
+ $co: 'main', 'well', 'warn', 'risk', 'info';
2
+ $sz: 'xs', 's', 'm', 'l', 'xl';
3
+
4
+ [ui-tabs~='@b'] {
5
+ position: relative;
6
+ display: inline-flex;
7
+ max-width: 100%;
8
+ height: 2.5em;
9
+ white-space: nowrap;
10
+ overflow-x: auto;
11
+ overflow-y: hidden;
12
+ padding: 3px;
13
+ border-radius: 0.5em;
14
+
15
+ @include theme {
16
+ border: 1px solid co(line);
17
+ }
18
+
19
+ & > * {
20
+ cursor: pointer;
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ border-radius: 0.25em;
25
+ padding: 0.5em 1em;
26
+ &.active {
27
+ @include theme {
28
+ color: co(fore);
29
+ background: co(main);
30
+ }
31
+ }
32
+ }
33
+
34
+ // 对齐
35
+ &,
36
+ &[ui-tabs~='al'] {
37
+ text-align: left;
38
+ }
39
+ &[ui-tabs~='ac'] {
40
+ text-align: center;
41
+ }
42
+ &[ui-tabs~='ar'] {
43
+ text-align: right;
44
+ }
45
+
46
+ // 尺寸
47
+ $base: 1.5em;
48
+ @each $i in $sz {
49
+ &[ui-tabs~='#{$i}'] {
50
+ height: $base;
51
+
52
+ & > * {
53
+ padding: 0.5em $base - 1.25em;
54
+ }
55
+ }
56
+ $base: $base + 0.5;
57
+ }
58
+
59
+ &[ui-tabs~=':round'] {
60
+ border-radius: 100em;
61
+ & > * {
62
+ border-radius: 100em;
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,65 @@
1
+ $co: 'main', 'well', 'warn', 'risk', 'info';
2
+ $sz: 'xs', 's', 'm', 'l', 'xl';
3
+
4
+ [ui-tabs~='@c'] {
5
+ position: relative;
6
+ display: inline-flex;
7
+ max-width: 100%;
8
+ height: 2.5em;
9
+ white-space: nowrap;
10
+ overflow-x: auto;
11
+ overflow-y: hidden;
12
+ padding: 3px;
13
+ border-radius: 0.5em;
14
+
15
+ @include theme {
16
+ background: co(weak);
17
+ }
18
+
19
+ & > * {
20
+ cursor: pointer;
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ border-radius: 0.25em;
25
+ padding: 0.5em 1em;
26
+ &.active {
27
+ @include theme {
28
+ color: co(main);
29
+ background: co(fore);
30
+ }
31
+ }
32
+ }
33
+
34
+ // 对齐
35
+ &,
36
+ &[ui-tabs~='al'] {
37
+ text-align: left;
38
+ }
39
+ &[ui-tabs~='ac'] {
40
+ text-align: center;
41
+ }
42
+ &[ui-tabs~='ar'] {
43
+ text-align: right;
44
+ }
45
+
46
+ // 尺寸
47
+ $base: 1.5em;
48
+ @each $i in $sz {
49
+ &[ui-tabs~='#{$i}'] {
50
+ height: $base;
51
+
52
+ & > * {
53
+ padding: 0.5em $base - 1.25em;
54
+ }
55
+ }
56
+ $base: $base + 0.5;
57
+ }
58
+
59
+ &[ui-tabs~=':round'] {
60
+ border-radius: 100em;
61
+ & > * {
62
+ border-radius: 100em;
63
+ }
64
+ }
65
+ }
package/core/flex.scss CHANGED
@@ -377,95 +377,128 @@
377
377
  align-items: flex-start;
378
378
  align-content: flex-start;
379
379
  }
380
-
381
- &[ui-flex~='ct'] {
382
- justify-content: center;
383
- align-items: flex-start;
384
- align-content: flex-start;
380
+ &[ui-flex~='lm'] {
381
+ justify-content: flex-start;
382
+ align-items: center;
383
+ align-content: center;
385
384
  }
386
-
387
- &[ui-flex~='rt'] {
388
- justify-content: flex-end;
389
- align-items: flex-start;
390
- align-content: flex-start;
385
+ &[ui-flex~='lb'] {
386
+ justify-content: flex-start;
387
+ align-items: flex-end;
388
+ align-content: flex-end;
391
389
  }
392
-
393
- &[ui-flex~='xt'] {
394
- justify-content: space-between;
395
- align-items: flex-start;
390
+ &[ui-flex~='ld'] {
391
+ justify-content: flex-start;
396
392
  align-content: flex-start;
397
393
  }
398
- &[ui-flex~='at'] {
399
- justify-content: space-around;
400
- align-items: flex-start;
394
+ &[ui-flex~='ly'] {
395
+ justify-content: flex-start;
401
396
  align-content: flex-start;
402
397
  }
403
398
 
404
- &[ui-flex~='lm'] {
405
- justify-content: flex-start;
406
- align-items: center;
407
- align-content: center;
399
+ &[ui-flex~='ct'] {
400
+ justify-content: center;
401
+ align-items: flex-start;
402
+ align-content: flex-start;
408
403
  }
409
-
410
404
  &[ui-flex~='cm'] {
411
405
  justify-content: center;
412
406
  align-items: center;
413
407
  align-content: center;
414
408
  }
415
-
416
- &[ui-flex~='rm'] {
417
- justify-content: flex-end;
418
- align-items: center;
419
- align-content: center;
420
- }
421
-
422
- &[ui-flex~='xm'] {
423
- justify-content: space-between;
424
- align-items: center;
425
- align-content: center;
426
- }
427
-
428
- &[ui-flex~='am'] {
429
- justify-content: space-around;
430
- align-items: center;
431
- align-content: center;
432
- }
433
-
434
- &[ui-flex~='lb'] {
435
- justify-content: flex-start;
436
- align-items: flex-end;
437
- align-content: flex-end;
438
- }
439
-
440
409
  &[ui-flex~='cb'] {
441
410
  justify-content: center;
442
411
  align-items: flex-end;
443
412
  align-content: flex-end;
444
413
  }
414
+ &[ui-flex~='cd'] {
415
+ justify-content: center;
416
+ align-items: normal;
417
+ align-content: flex-start;
418
+ }
419
+ &[ui-flex~='cy'] {
420
+ justify-content: center;
421
+ align-items: normal;
422
+ align-content: flex-start;
423
+ }
445
424
 
425
+ &[ui-flex~='rt'] {
426
+ justify-content: flex-end;
427
+ align-items: flex-start;
428
+ align-content: flex-start;
429
+ }
430
+ &[ui-flex~='rm'] {
431
+ justify-content: flex-end;
432
+ align-items: center;
433
+ align-content: center;
434
+ }
446
435
  &[ui-flex~='rb'] {
447
436
  justify-content: flex-end;
448
437
  align-items: flex-end;
449
438
  align-content: flex-end;
450
439
  }
451
-
440
+ &[ui-flex~='rd'] {
441
+ justify-content: flex-end;
442
+ align-items: normal;
443
+ align-content: flex-start;
444
+ }
452
445
  &[ui-flex~='ry'] {
453
446
  justify-content: flex-end;
454
- align-items: stretch;
447
+ align-items: normal;
455
448
  align-content: space-between;
456
449
  }
457
450
 
451
+ &[ui-flex~='xt'] {
452
+ justify-content: space-between;
453
+ align-items: flex-start;
454
+ align-content: flex-start;
455
+ }
456
+ &[ui-flex~='xm'] {
457
+ justify-content: space-between;
458
+ align-items: center;
459
+ align-content: center;
460
+ }
458
461
  &[ui-flex~='xb'] {
459
462
  justify-content: space-between;
460
463
  align-items: flex-end;
461
464
  align-content: flex-end;
462
465
  }
466
+ &[ui-flex~='xd'] {
467
+ justify-content: space-between;
468
+ align-items: normal;
469
+ align-content: flex-start;
470
+ }
471
+ &[ui-flex~='xy'] {
472
+ justify-content: space-between;
473
+ align-items: normal;
474
+ align-content: flex-start;
475
+ }
463
476
 
477
+ &[ui-flex~='at'] {
478
+ justify-content: space-around;
479
+ align-items: flex-start;
480
+ align-content: flex-start;
481
+ }
482
+ &[ui-flex~='am'] {
483
+ justify-content: space-around;
484
+ align-items: center;
485
+ align-content: center;
486
+ }
464
487
  &[ui-flex~='ab'] {
465
488
  justify-content: space-around;
466
489
  align-items: flex-end;
467
490
  align-content: flex-end;
468
491
  }
492
+ &[ui-flex~='ad'] {
493
+ justify-content: space-around;
494
+ align-items: normal;
495
+ align-content: flex-start;
496
+ }
497
+ &[ui-flex~='ay'] {
498
+ justify-content: space-around;
499
+ align-items: normal;
500
+ align-content: flex-start;
501
+ }
469
502
  }
470
503
 
471
504
  [ui-flex~='col'] {
@@ -477,81 +510,88 @@
477
510
  align-items: flex-start;
478
511
  align-content: flex-start;
479
512
  }
480
-
481
- &[ui-flex~='ct'] {
482
- justify-content: flex-start;
483
- align-items: center;
484
- align-content: center;
485
- }
486
-
487
- &[ui-flex~='rt'] {
488
- justify-content: flex-start;
489
- align-items: flex-end;
490
- align-content: flex-end;
513
+ &[ui-flex~='lm'] {
514
+ justify-content: center;
515
+ align-items: flex-start;
516
+ align-content: flex-start;
491
517
  }
492
-
493
- &[ui-flex~='xt'] {
494
- justify-content: flex-start;
495
- align-items: stretch;
496
- align-content: stretch;
518
+ &[ui-flex~='lb'] {
519
+ justify-content: flex-end;
520
+ align-items: flex-start;
521
+ align-content: flex-start;
497
522
  }
498
- &[ui-flex~='at'] {
499
- justify-content: flex-start;
500
- align-items: space-around;
501
- align-content: space-around;
523
+ &[ui-flex~='ld'] {
524
+ justify-content: space-around;
525
+ align-items: flex-start;
526
+ align-content: flex-start;
502
527
  }
503
-
504
- &[ui-flex~='lm'] {
505
- justify-content: center;
528
+ &[ui-flex~='ly'] {
529
+ justify-content: space-between;
506
530
  align-items: flex-start;
507
531
  align-content: flex-start;
508
532
  }
509
533
 
534
+ &[ui-flex~='ct'] {
535
+ justify-content: flex-start;
536
+ align-items: center;
537
+ align-content: center;
538
+ }
510
539
  &[ui-flex~='cm'] {
511
540
  justify-content: center;
512
541
  align-items: center;
513
542
  align-content: center;
514
543
  }
544
+ &[ui-flex~='cb'] {
545
+ justify-content: flex-end;
546
+ align-items: center;
547
+ align-content: center;
548
+ }
549
+ &[ui-flex~='cd'] {
550
+ justify-content: space-around;
551
+ align-items: center;
552
+ align-content: center;
553
+ }
554
+ &[ui-flex~='cy'] {
555
+ justify-content: space-between;
556
+ align-items: center;
557
+ align-content: center;
558
+ }
515
559
 
516
- &[ui-flex~='rm'] {
517
- justify-content: center;
560
+ &[ui-flex~='rt'] {
561
+ justify-content: flex-start;
518
562
  align-items: flex-end;
519
563
  align-content: flex-end;
520
564
  }
521
-
522
- &[ui-flex~='xm'] {
523
- justify-content: center;
524
- align-items: stretch;
525
- align-content: stretch;
526
- }
527
- &[ui-flex~='am'] {
565
+ &[ui-flex~='rm'] {
528
566
  justify-content: center;
529
- align-items: space-around;
530
- align-content: space-around;
567
+ align-items: flex-end;
568
+ align-content: flex-end;
531
569
  }
532
-
533
- &[ui-flex~='lb'] {
570
+ &[ui-flex~='rb'] {
534
571
  justify-content: flex-end;
535
- align-items: flex-start;
536
- align-content: flex-start;
572
+ align-items: flex-end;
573
+ align-content: flex-end;
537
574
  }
538
-
539
- &[ui-flex~='cb'] {
540
- justify-content: flex-end;
541
- align-items: center;
542
- align-content: center;
575
+ &[ui-flex~='rd'] {
576
+ justify-content: space-around;
577
+ align-items: flex-end;
578
+ align-content: flex-end;
543
579
  }
544
-
545
- &[ui-flex~='rb'] {
546
- justify-content: flex-end;
580
+ &[ui-flex~='ry'] {
581
+ justify-content: space-between;
547
582
  align-items: flex-end;
548
583
  align-content: flex-end;
549
584
  }
550
585
 
551
- &[ui-flex~='xb'] {
552
- justify-content: flex-end;
553
- align-items: stretch;
554
- align-content: stretch;
586
+ &[ui-flex~='at'] {
587
+ justify-content: flex-start;
588
+ align-items: space-around;
589
+ align-content: space-around;
590
+ }
591
+ &[ui-flex~='am'] {
592
+ justify-content: center;
593
+ align-items: space-around;
594
+ align-content: space-around;
555
595
  }
556
596
  &[ui-flex~='ab'] {
557
597
  justify-content: flex-end;
@@ -568,50 +608,35 @@
568
608
  align-content: space-around;
569
609
  align-items: stretch;
570
610
  }
571
- &[ui-flex~='ly'] {
572
- justify-content: space-between;
573
- align-items: flex-start;
574
- align-content: flex-start;
575
- }
576
- &[ui-flex~='ld'] {
577
- justify-content: space-around;
578
- align-items: flex-start;
579
- align-content: flex-start;
580
- }
581
611
 
582
- &[ui-flex~='cy'] {
583
- justify-content: space-between;
584
- align-items: center;
585
- align-content: center;
612
+ &[ui-flex~='xt'] {
613
+ justify-content: flex-start;
614
+ align-items: stretch;
615
+ align-content: stretch;
586
616
  }
587
- &[ui-flex~='cd'] {
588
- justify-content: space-around;
589
- align-items: center;
590
- align-content: center;
617
+ &[ui-flex~='xm'] {
618
+ justify-content: center;
619
+ align-items: stretch;
620
+ align-content: stretch;
591
621
  }
592
- &[ui-flex~='ry'] {
593
- justify-content: space-between;
594
- align-items: flex-end;
595
- align-content: flex-end;
622
+ &[ui-flex~='xb'] {
623
+ justify-content: flex-end;
624
+ align-items: stretch;
625
+ align-content: stretch;
596
626
  }
597
- &[ui-flex~='rd'] {
627
+ &[ui-flex~='ad'] {
598
628
  justify-content: space-around;
599
- align-items: flex-end;
600
- align-content: flex-end;
601
- }
602
- &[ui-flex~='xy'] {
603
- justify-content: space-between;
604
- align-items: stretch;
605
- align-content: space-between;
629
+ align-items: space-around;
630
+ align-content: space-around;
606
631
  }
607
632
  &[ui-flex~='xd'] {
608
633
  justify-content: space-around;
609
634
  align-items: stretch;
610
635
  align-content: space-between;
611
636
  }
612
- &[ui-flex~='ad'] {
613
- justify-content: space-around;
614
- align-items: space-around;
615
- align-content: space-around;
637
+ &[ui-flex~='xy'] {
638
+ justify-content: space-between;
639
+ align-items: stretch;
640
+ align-content: space-between;
616
641
  }
617
642
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/css",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "neatui",
5
5
  "main": "./neatui.scss",
6
6
  "license": "MIT",