@bgord/design 0.4.0 → 0.7.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.
package/dist/main.css CHANGED
@@ -426,6 +426,8 @@
426
426
  display: -webkit-box;
427
427
  display: -ms-flexbox;
428
428
  display: flex;
429
+ -ms-flex-wrap: wrap;
430
+ flex-wrap: wrap;
429
431
  }
430
432
  *[data-display='block'] {
431
433
  display: block;
@@ -489,28 +491,6 @@
489
491
  }
490
492
  /* ===================== */
491
493
 
492
- /* Positions */
493
-
494
- *[data-position='static'] {
495
- position: static;
496
- }
497
- *[data-position='relative'] {
498
- position: relative;
499
- }
500
- *[data-position='absolute'] {
501
- position: absolute;
502
- }
503
- *[data-position='fixed'] {
504
- position: fixed;
505
- }
506
- *[data-position='sticky'] {
507
- position: sticky;
508
- }
509
- *[data-position='unset'] {
510
- position: unset;
511
- }
512
- /* ===================== */
513
-
514
494
  /* Flex wraps */
515
495
 
516
496
  *[data-wrap='nowrap'] {
@@ -531,19 +511,31 @@
531
511
  }
532
512
  /* ===================== */
533
513
 
534
- /* Displays */
514
+ /* Flex directions */
535
515
 
536
- *[data-z='0'] {
537
- z-index: 0;
516
+ *[data-direction='row'] {
517
+ -webkit-box-orient: horizontal;
518
+ -webkit-box-direction: normal;
519
+ -ms-flex-direction: row;
520
+ flex-direction: row;
538
521
  }
539
- *[data-z='1'] {
540
- z-index: 1;
522
+ *[data-direction='row-reverse'] {
523
+ -webkit-box-orient: horizontal;
524
+ -webkit-box-direction: reverse;
525
+ -ms-flex-direction: row-reverse;
526
+ flex-direction: row-reverse;
541
527
  }
542
- *[data-z='2'] {
543
- z-index: 2;
528
+ *[data-direction='column'] {
529
+ -webkit-box-orient: vertical;
530
+ -webkit-box-direction: normal;
531
+ -ms-flex-direction: column;
532
+ flex-direction: column;
544
533
  }
545
- *[data-z='3'] {
546
- z-index: 3;
534
+ *[data-direction='column-reverse'] {
535
+ -webkit-box-orient: vertical;
536
+ -webkit-box-direction: reverse;
537
+ -ms-flex-direction: column-reverse;
538
+ flex-direction: column-reverse;
547
539
  }
548
540
  /* ===================== */
549
541
 
@@ -560,6 +552,44 @@
560
552
  }
561
553
  /* ===================== */
562
554
 
555
+ /* Positions */
556
+
557
+ *[data-position='static'] {
558
+ position: static;
559
+ }
560
+ *[data-position='relative'] {
561
+ position: relative;
562
+ }
563
+ *[data-position='absolute'] {
564
+ position: absolute;
565
+ }
566
+ *[data-position='fixed'] {
567
+ position: fixed;
568
+ }
569
+ *[data-position='sticky'] {
570
+ position: sticky;
571
+ }
572
+ *[data-position='unset'] {
573
+ position: unset;
574
+ }
575
+ /* ===================== */
576
+
577
+ /* Displays */
578
+
579
+ *[data-z='0'] {
580
+ z-index: 0;
581
+ }
582
+ *[data-z='1'] {
583
+ z-index: 1;
584
+ }
585
+ *[data-z='2'] {
586
+ z-index: 2;
587
+ }
588
+ *[data-z='3'] {
589
+ z-index: 3;
590
+ }
591
+ /* ===================== */
592
+
563
593
  /* Font sizes */
564
594
 
565
595
  *[data-fs='12'] {
@@ -582,31 +612,81 @@
582
612
  }
583
613
  /* ===================== */
584
614
 
585
- /* Flex directions */
615
+ /* Font sizes */
586
616
 
587
- *[data-direction='row'] {
588
- -webkit-box-orient: horizontal;
589
- -webkit-box-direction: normal;
590
- -ms-flex-direction: row;
591
- flex-direction: row;
617
+ *[data-fw='300'] {
618
+ font-weight: 300;
592
619
  }
593
- *[data-direction='row-reverse'] {
594
- -webkit-box-orient: horizontal;
595
- -webkit-box-direction: reverse;
596
- -ms-flex-direction: row-reverse;
597
- flex-direction: row-reverse;
620
+ *[data-fw='400'] {
621
+ font-weight: 400;
598
622
  }
599
- *[data-direction='column'] {
600
- -webkit-box-orient: vertical;
601
- -webkit-box-direction: normal;
602
- -ms-flex-direction: column;
603
- flex-direction: column;
623
+ *[data-fw='500'] {
624
+ font-weight: 500;
604
625
  }
605
- *[data-direction='column-reverse'] {
606
- -webkit-box-orient: vertical;
607
- -webkit-box-direction: reverse;
608
- -ms-flex-direction: column-reverse;
609
- flex-direction: column-reverse;
626
+ *[data-fw='700'] {
627
+ font-weight: 700;
628
+ }
629
+ *[data-fw='900'] {
630
+ font-weight: 900;
631
+ }
632
+ *[data-fw='unset'] {
633
+ font-weight: unset;
634
+ }
635
+ /* ===================== */
636
+
637
+ /* Line heights */
638
+
639
+ *[data-lh='12'] {
640
+ line-height: 12;
641
+ }
642
+ *[data-lh='16'] {
643
+ line-height: 16;
644
+ }
645
+ *[data-lh='20'] {
646
+ line-height: 20;
647
+ }
648
+ *[data-lh='24'] {
649
+ line-height: 24;
650
+ }
651
+ *[data-lh='32'] {
652
+ line-height: 32;
653
+ }
654
+ *[data-lh='unset'] {
655
+ line-height: unset;
656
+ }
657
+ /* ===================== */
658
+
659
+ /* Backgrounds */
660
+
661
+ *[data-bg='white'] {
662
+ background-color: #F9FAFB;
663
+ }
664
+ *[data-bg='gray-100'] {
665
+ background-color: #F3F4F6;
666
+ }
667
+ *[data-bg='gray-200'] {
668
+ background-color: #E5E7EB;
669
+ }
670
+ *[data-bg='gray-300'] {
671
+ background-color: #D1D5DB;
672
+ }
673
+ *[data-bg='gray-400'] {
674
+ background-color: #9CA3AF;
675
+ }
676
+ *[data-bg='gray-500'] {
677
+ background-color: #6B7280;
678
+ }
679
+ *[data-bg='gray-600'] {
680
+ background-color: #4B5563;
681
+ }
682
+ *[data-bg='gray-700'] {
683
+ background-color: #374151;
684
+ }
685
+ *[data-bg='gray-800'] {
686
+ background-color: #1F2937;
687
+ }
688
+ *[data-bg='black'] {
689
+ background-color: #111827;
610
690
  }
611
691
  /* ===================== */
612
692
 
package/dist/main.min.css CHANGED
@@ -1 +1 @@
1
- [data-m='0']{margin:0}[data-m='3']{margin:3px}[data-m='6']{margin:6px}[data-m='12']{margin:12px}[data-m='24']{margin:24px}[data-m='48']{margin:48px}[data-m='72']{margin:72px}[data-m=auto]{margin:auto}[data-m=unset]{margin:unset}[data-mx='0']{margin-left:0;margin-right:0}[data-mx='3']{margin-left:3px;margin-right:3px}[data-mx='6']{margin-left:6px;margin-right:6px}[data-mx='12']{margin-left:12px;margin-right:12px}[data-mx='24']{margin-left:24px;margin-right:24px}[data-mx='48']{margin-left:48px;margin-right:48px}[data-mx='72']{margin-left:72px;margin-right:72px}[data-mx=auto]{margin-left:auto;margin-right:auto}[data-mx=unset]{margin-left:unset;margin-right:unset}[data-my='0']{margin-top:0;margin-bottom:0}[data-my='3']{margin-top:3px;margin-bottom:3px}[data-my='6']{margin-top:6px;margin-bottom:6px}[data-my='12']{margin-top:12px;margin-bottom:12px}[data-my='24']{margin-top:24px;margin-bottom:24px}[data-my='48']{margin-top:48px;margin-bottom:48px}[data-my='72']{margin-top:72px;margin-bottom:72px}[data-my=auto]{margin-top:auto;margin-bottom:auto}[data-my=unset]{margin-top:unset;margin-bottom:unset}[data-mt='0']{margin-top:0}[data-mt='3']{margin-top:3px}[data-mt='6']{margin-top:6px}[data-mt='12']{margin-top:12px}[data-mt='24']{margin-top:24px}[data-mt='48']{margin-top:48px}[data-mt='72']{margin-top:72px}[data-mt=auto]{margin-top:auto}[data-mt=unset]{margin-top:unset}[data-mr='0']{margin-right:0}[data-mr='3']{margin-right:3px}[data-mr='6']{margin-right:6px}[data-mr='12']{margin-right:12px}[data-mr='24']{margin-right:24px}[data-mr='48']{margin-right:48px}[data-mr='72']{margin-right:72px}[data-mr=auto]{margin-right:auto}[data-mr=unset]{margin-right:unset}[data-mb='0']{margin-bottom:0}[data-mb='3']{margin-bottom:3px}[data-mb='6']{margin-bottom:6px}[data-mb='12']{margin-bottom:12px}[data-mb='24']{margin-bottom:24px}[data-mb='48']{margin-bottom:48px}[data-mb='72']{margin-bottom:72px}[data-mb=auto]{margin-bottom:auto}[data-mb=unset]{margin-bottom:unset}[data-ml='0']{margin-left:0}[data-ml='3']{margin-left:3px}[data-ml='6']{margin-left:6px}[data-ml='12']{margin-left:12px}[data-ml='24']{margin-left:24px}[data-ml='48']{margin-left:48px}[data-ml='72']{margin-left:72px}[data-ml=auto]{margin-left:auto}[data-ml=unset]{margin-left:unset}[data-p='0']{padding:0}[data-p='3']{padding:3px}[data-p='6']{padding:6px}[data-p='12']{padding:12px}[data-p='24']{padding:24px}[data-p='48']{padding:48px}[data-p='72']{padding:72px}[data-p=auto]{padding:auto}[data-p=unset]{padding:unset}[data-px='0']{padding-left:0;padding-right:0}[data-px='3']{padding-left:3px;padding-right:3px}[data-px='6']{padding-left:6px;padding-right:6px}[data-px='12']{padding-left:12px;padding-right:12px}[data-px='24']{padding-left:24px;padding-right:24px}[data-px='48']{padding-left:48px;padding-right:48px}[data-px='72']{padding-left:72px;padding-right:72px}[data-px=auto]{padding-left:auto;padding-right:auto}[data-px=unset]{padding-left:unset;padding-right:unset}[data-py='0']{padding-top:0;padding-bottom:0}[data-py='3']{padding-top:3px;padding-bottom:3px}[data-py='6']{padding-top:6px;padding-bottom:6px}[data-py='12']{padding-top:12px;padding-bottom:12px}[data-py='24']{padding-top:24px;padding-bottom:24px}[data-py='48']{padding-top:48px;padding-bottom:48px}[data-py='72']{padding-top:72px;padding-bottom:72px}[data-py=auto]{padding-top:auto;padding-bottom:auto}[data-py=unset]{padding-top:unset;padding-bottom:unset}[data-pt='0']{padding-top:0}[data-pt='3']{padding-top:3px}[data-pt='6']{padding-top:6px}[data-pt='12']{padding-top:12px}[data-pt='24']{padding-top:24px}[data-pt='48']{padding-top:48px}[data-pt='72']{padding-top:72px}[data-pt=auto]{padding-top:auto}[data-pt=unset]{padding-top:unset}[data-pr='0']{padding-right:0}[data-pr='3']{padding-right:3px}[data-pr='6']{padding-right:6px}[data-pr='12']{padding-right:12px}[data-pr='24']{padding-right:24px}[data-pr='48']{padding-right:48px}[data-pr='72']{padding-right:72px}[data-pr=auto]{padding-right:auto}[data-pr=unset]{padding-right:unset}[data-pb='0']{padding-bottom:0}[data-pb='3']{padding-bottom:3px}[data-pb='6']{padding-bottom:6px}[data-pb='12']{padding-bottom:12px}[data-pb='24']{padding-bottom:24px}[data-pb='48']{padding-bottom:48px}[data-pb='72']{padding-bottom:72px}[data-pb=auto]{padding-bottom:auto}[data-pb=unset]{padding-bottom:unset}[data-pl='0']{padding-left:0}[data-pl='3']{padding-left:3px}[data-pl='6']{padding-left:6px}[data-pl='12']{padding-left:12px}[data-pl='24']{padding-left:24px}[data-pl='48']{padding-left:48px}[data-pl='72']{padding-left:72px}[data-pl=auto]{padding-left:auto}[data-pl=unset]{padding-left:unset}[data-display=flex]{display:-webkit-box;display:-ms-flexbox;display:flex}[data-display=block]{display:block}[data-display=inline-block]{display:inline-block}[data-main=start]{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start}[data-main=end]{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end}[data-main=between]{-webkit-box-pack:between;-ms-flex-pack:between;justify-content:between}[data-main=center]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-main=baseline]{-webkit-box-pack:baseline;-ms-flex-pack:baseline;justify-content:baseline}[data-cross=start]{-webkit-box-align:start;-ms-flex-align:start;align-items:start}[data-cross=end]{-webkit-box-align:end;-ms-flex-align:end;align-items:end}[data-cross=between]{-webkit-box-align:between;-ms-flex-align:between;align-items:between}[data-cross=center]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-cross=baseline]{-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}[data-position=static]{position:static}[data-position=relative]{position:relative}[data-position=absolute]{position:absolute}[data-position=fixed]{position:fixed}[data-position=sticky]{position:sticky}[data-position=unset]{position:unset}[data-wrap=nowrap]{-ms-flex-wrap:nowrap;flex-wrap:nowrap}[data-wrap=wrap]{-ms-flex-wrap:wrap;flex-wrap:wrap}[data-wrap=wrap-reverse]{-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}[data-wrap=unset]{-ms-flex-wrap:unset;flex-wrap:unset}[data-z='0']{z-index:0}[data-z='1']{z-index:1}[data-z='2']{z-index:2}[data-z='3']{z-index:3}[data-width='100%']{width:100%}[data-width=auto]{width:auto}[data-width=unset]{width:unset}[data-fs='12']{font-size:12px}[data-fs='14']{font-size:14px}[data-fs='16']{font-size:16px}[data-fs='20']{font-size:20px}[data-fs='24']{font-size:24px}[data-fs='32']{font-size:32px}[data-direction=row]{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}[data-direction=row-reverse]{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}[data-direction=column]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[data-direction=column-reverse]{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}
1
+ [data-m='0']{margin:0}[data-m='3']{margin:3px}[data-m='6']{margin:6px}[data-m='12']{margin:12px}[data-m='24']{margin:24px}[data-m='48']{margin:48px}[data-m='72']{margin:72px}[data-m=auto]{margin:auto}[data-m=unset]{margin:unset}[data-mx='0']{margin-left:0;margin-right:0}[data-mx='3']{margin-left:3px;margin-right:3px}[data-mx='6']{margin-left:6px;margin-right:6px}[data-mx='12']{margin-left:12px;margin-right:12px}[data-mx='24']{margin-left:24px;margin-right:24px}[data-mx='48']{margin-left:48px;margin-right:48px}[data-mx='72']{margin-left:72px;margin-right:72px}[data-mx=auto]{margin-left:auto;margin-right:auto}[data-mx=unset]{margin-left:unset;margin-right:unset}[data-my='0']{margin-top:0;margin-bottom:0}[data-my='3']{margin-top:3px;margin-bottom:3px}[data-my='6']{margin-top:6px;margin-bottom:6px}[data-my='12']{margin-top:12px;margin-bottom:12px}[data-my='24']{margin-top:24px;margin-bottom:24px}[data-my='48']{margin-top:48px;margin-bottom:48px}[data-my='72']{margin-top:72px;margin-bottom:72px}[data-my=auto]{margin-top:auto;margin-bottom:auto}[data-my=unset]{margin-top:unset;margin-bottom:unset}[data-mt='0']{margin-top:0}[data-mt='3']{margin-top:3px}[data-mt='6']{margin-top:6px}[data-mt='12']{margin-top:12px}[data-mt='24']{margin-top:24px}[data-mt='48']{margin-top:48px}[data-mt='72']{margin-top:72px}[data-mt=auto]{margin-top:auto}[data-mt=unset]{margin-top:unset}[data-mr='0']{margin-right:0}[data-mr='3']{margin-right:3px}[data-mr='6']{margin-right:6px}[data-mr='12']{margin-right:12px}[data-mr='24']{margin-right:24px}[data-mr='48']{margin-right:48px}[data-mr='72']{margin-right:72px}[data-mr=auto]{margin-right:auto}[data-mr=unset]{margin-right:unset}[data-mb='0']{margin-bottom:0}[data-mb='3']{margin-bottom:3px}[data-mb='6']{margin-bottom:6px}[data-mb='12']{margin-bottom:12px}[data-mb='24']{margin-bottom:24px}[data-mb='48']{margin-bottom:48px}[data-mb='72']{margin-bottom:72px}[data-mb=auto]{margin-bottom:auto}[data-mb=unset]{margin-bottom:unset}[data-ml='0']{margin-left:0}[data-ml='3']{margin-left:3px}[data-ml='6']{margin-left:6px}[data-ml='12']{margin-left:12px}[data-ml='24']{margin-left:24px}[data-ml='48']{margin-left:48px}[data-ml='72']{margin-left:72px}[data-ml=auto]{margin-left:auto}[data-ml=unset]{margin-left:unset}[data-p='0']{padding:0}[data-p='3']{padding:3px}[data-p='6']{padding:6px}[data-p='12']{padding:12px}[data-p='24']{padding:24px}[data-p='48']{padding:48px}[data-p='72']{padding:72px}[data-p=auto]{padding:auto}[data-p=unset]{padding:unset}[data-px='0']{padding-left:0;padding-right:0}[data-px='3']{padding-left:3px;padding-right:3px}[data-px='6']{padding-left:6px;padding-right:6px}[data-px='12']{padding-left:12px;padding-right:12px}[data-px='24']{padding-left:24px;padding-right:24px}[data-px='48']{padding-left:48px;padding-right:48px}[data-px='72']{padding-left:72px;padding-right:72px}[data-px=auto]{padding-left:auto;padding-right:auto}[data-px=unset]{padding-left:unset;padding-right:unset}[data-py='0']{padding-top:0;padding-bottom:0}[data-py='3']{padding-top:3px;padding-bottom:3px}[data-py='6']{padding-top:6px;padding-bottom:6px}[data-py='12']{padding-top:12px;padding-bottom:12px}[data-py='24']{padding-top:24px;padding-bottom:24px}[data-py='48']{padding-top:48px;padding-bottom:48px}[data-py='72']{padding-top:72px;padding-bottom:72px}[data-py=auto]{padding-top:auto;padding-bottom:auto}[data-py=unset]{padding-top:unset;padding-bottom:unset}[data-pt='0']{padding-top:0}[data-pt='3']{padding-top:3px}[data-pt='6']{padding-top:6px}[data-pt='12']{padding-top:12px}[data-pt='24']{padding-top:24px}[data-pt='48']{padding-top:48px}[data-pt='72']{padding-top:72px}[data-pt=auto]{padding-top:auto}[data-pt=unset]{padding-top:unset}[data-pr='0']{padding-right:0}[data-pr='3']{padding-right:3px}[data-pr='6']{padding-right:6px}[data-pr='12']{padding-right:12px}[data-pr='24']{padding-right:24px}[data-pr='48']{padding-right:48px}[data-pr='72']{padding-right:72px}[data-pr=auto]{padding-right:auto}[data-pr=unset]{padding-right:unset}[data-pb='0']{padding-bottom:0}[data-pb='3']{padding-bottom:3px}[data-pb='6']{padding-bottom:6px}[data-pb='12']{padding-bottom:12px}[data-pb='24']{padding-bottom:24px}[data-pb='48']{padding-bottom:48px}[data-pb='72']{padding-bottom:72px}[data-pb=auto]{padding-bottom:auto}[data-pb=unset]{padding-bottom:unset}[data-pl='0']{padding-left:0}[data-pl='3']{padding-left:3px}[data-pl='6']{padding-left:6px}[data-pl='12']{padding-left:12px}[data-pl='24']{padding-left:24px}[data-pl='48']{padding-left:48px}[data-pl='72']{padding-left:72px}[data-pl=auto]{padding-left:auto}[data-pl=unset]{padding-left:unset}[data-display=flex]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-display=block]{display:block}[data-display=inline-block]{display:inline-block}[data-main=start]{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start}[data-main=end]{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end}[data-main=between]{-webkit-box-pack:between;-ms-flex-pack:between;justify-content:between}[data-main=center]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-main=baseline]{-webkit-box-pack:baseline;-ms-flex-pack:baseline;justify-content:baseline}[data-cross=start]{-webkit-box-align:start;-ms-flex-align:start;align-items:start}[data-cross=end]{-webkit-box-align:end;-ms-flex-align:end;align-items:end}[data-cross=between]{-webkit-box-align:between;-ms-flex-align:between;align-items:between}[data-cross=center]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-cross=baseline]{-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}[data-wrap=nowrap]{-ms-flex-wrap:nowrap;flex-wrap:nowrap}[data-wrap=wrap]{-ms-flex-wrap:wrap;flex-wrap:wrap}[data-wrap=wrap-reverse]{-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}[data-wrap=unset]{-ms-flex-wrap:unset;flex-wrap:unset}[data-direction=row]{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}[data-direction=row-reverse]{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}[data-direction=column]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[data-direction=column-reverse]{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}[data-width='100%']{width:100%}[data-width=auto]{width:auto}[data-width=unset]{width:unset}[data-position=static]{position:static}[data-position=relative]{position:relative}[data-position=absolute]{position:absolute}[data-position=fixed]{position:fixed}[data-position=sticky]{position:sticky}[data-position=unset]{position:unset}[data-z='0']{z-index:0}[data-z='1']{z-index:1}[data-z='2']{z-index:2}[data-z='3']{z-index:3}[data-fs='12']{font-size:12px}[data-fs='14']{font-size:14px}[data-fs='16']{font-size:16px}[data-fs='20']{font-size:20px}[data-fs='24']{font-size:24px}[data-fs='32']{font-size:32px}[data-fw='300']{font-weight:300}[data-fw='400']{font-weight:400}[data-fw='500']{font-weight:500}[data-fw='700']{font-weight:700}[data-fw='900']{font-weight:900}[data-fw=unset]{font-weight:unset}[data-lh='12']{line-height:12}[data-lh='16']{line-height:16}[data-lh='20']{line-height:20}[data-lh='24']{line-height:24}[data-lh='32']{line-height:32}[data-lh=unset]{line-height:unset}[data-bg=white]{background-color:#f9fafb}[data-bg=gray-100]{background-color:#f3f4f6}[data-bg=gray-200]{background-color:#e5e7eb}[data-bg=gray-300]{background-color:#d1d5db}[data-bg=gray-400]{background-color:#9ca3af}[data-bg=gray-500]{background-color:#6b7280}[data-bg=gray-600]{background-color:#4b5563}[data-bg=gray-700]{background-color:#374151}[data-bg=gray-800]{background-color:#1f2937}[data-bg=black]{background-color:#111827}
package/dist/tokens.d.ts CHANGED
@@ -14,6 +14,12 @@ declare type WidthType = '100%' | 'auto' | 'unset';
14
14
  export declare const Widths: Record<WidthType, string>;
15
15
  declare type FontSizeType = '12' | '14' | '16' | '20' | '24' | '32';
16
16
  export declare const FontSizes: Record<FontSizeType, string>;
17
+ declare type FontWeightType = '300' | '400' | '500' | '700' | '900' | 'unset';
18
+ export declare const FontWeights: Record<FontWeightType, string>;
19
+ declare type LineHeightType = '12' | '16' | '20' | '24' | '32' | 'unset';
20
+ export declare const LineHeights: Record<LineHeightType, string>;
17
21
  declare type FlexDirectionType = 'row' | 'row-reverse' | 'column' | 'column-reverse';
18
22
  export declare const FlexDirections: Record<FlexDirectionType, string>;
23
+ declare type ColorsType = 'white' | 'gray-100' | 'gray-200' | 'gray-300' | 'gray-400' | 'gray-500' | 'gray-600' | 'gray-700' | 'gray-800' | 'black';
24
+ export declare const Colors: Record<ColorsType, string>;
19
25
  export {};
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.4.0",
2
+ "version": "0.7.0",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -0,0 +1,32 @@
1
+ import { GeneratorInterface, GeneratorConfigType } from './generator';
2
+
3
+ export class BackgroundsGenerator implements GeneratorInterface {
4
+ spacing: GeneratorConfigType['spacing'];
5
+ displays: GeneratorConfigType['displays'];
6
+ colors: GeneratorConfigType['colors'];
7
+
8
+ constructor(config: GeneratorConfigType) {
9
+ this.spacing = config.spacing;
10
+ this.displays = config.displays;
11
+ this.colors = config.colors;
12
+ }
13
+
14
+ generateHeader(): string {
15
+ return '/* Backgrounds */\n\n';
16
+ }
17
+
18
+ generateCss(): string {
19
+ let output = '';
20
+
21
+ // Regular display: data-bg="*"
22
+ for (const [key, value] of Object.entries(this.colors)) {
23
+ output += `*[data-bg='${key}'] {\n background-color: ${value};\n}\n`;
24
+ }
25
+
26
+ return output;
27
+ }
28
+
29
+ generateFooter(): string {
30
+ return '/* ===================== */\n\n';
31
+ }
32
+ }
@@ -18,7 +18,11 @@ export class DisplaysGenerator implements GeneratorInterface {
18
18
 
19
19
  // Regular display: data-display="*"
20
20
  for (const [key, value] of Object.entries(this.displays)) {
21
- output += `*[data-display='${key}'] {\n display: ${value};\n}\n`;
21
+ if (value === 'flex') {
22
+ output += `*[data-display='${key}'] {\n display: ${value};\nflex-wrap: wrap;\n}\n`;
23
+ } else {
24
+ output += `*[data-display='${key}'] {\n display: ${value};\n}\n`;
25
+ }
22
26
  }
23
27
 
24
28
  return output;
@@ -0,0 +1,32 @@
1
+ import { GeneratorInterface, GeneratorConfigType } from './generator';
2
+
3
+ export class FontWeightGenerator implements GeneratorInterface {
4
+ spacing: GeneratorConfigType['spacing'];
5
+ displays: GeneratorConfigType['displays'];
6
+ fontWeights: GeneratorConfigType['fontWeights'];
7
+
8
+ constructor(config: GeneratorConfigType) {
9
+ this.spacing = config.spacing;
10
+ this.displays = config.displays;
11
+ this.fontWeights = config.fontWeights;
12
+ }
13
+
14
+ generateHeader(): string {
15
+ return '/* Font sizes */\n\n';
16
+ }
17
+
18
+ generateCss(): string {
19
+ let output = '';
20
+
21
+ // Regular display: data-fw="*"
22
+ for (const [key, value] of Object.entries(this.fontWeights)) {
23
+ output += `*[data-fw='${key}'] {\n font-weight: ${value};\n}\n`;
24
+ }
25
+
26
+ return output;
27
+ }
28
+
29
+ generateFooter(): string {
30
+ return '/* ===================== */\n\n';
31
+ }
32
+ }
@@ -10,7 +10,10 @@ import { FlexWrapGenerator } from './flex-wraps-generator';
10
10
  import { ZIndexGenerator } from './z-index-generator';
11
11
  import { WidthsGenerator } from './widhts-generator';
12
12
  import { FontSizeGenerator } from './font-size-generator';
13
+ import { FontWeightGenerator } from './font-weight-generator';
14
+ import { LineHeightsGenerator } from './line-height-generator';
13
15
  import { FlexDirectionsGenerator } from './flex-directions-generator';
16
+ import { BackgroundsGenerator } from './backgrounds-generator';
14
17
 
15
18
  import {
16
19
  Spacing,
@@ -21,7 +24,10 @@ import {
21
24
  ZIndexes,
22
25
  Widths,
23
26
  FontSizes,
27
+ FontWeights,
24
28
  FlexDirections,
29
+ LineHeights,
30
+ Colors,
25
31
  } from './tokens';
26
32
 
27
33
  class GeneratorProcessor {
@@ -50,19 +56,29 @@ export async function main() {
50
56
  zIndexes: ZIndexes,
51
57
  widths: Widths,
52
58
  fontSizes: FontSizes,
59
+ fontWeights: FontWeights,
60
+ lineHeights: LineHeights,
53
61
  flexDirections: FlexDirections,
62
+ colors: Colors,
54
63
  };
55
64
 
56
65
  await new GeneratorProcessor().process([
57
66
  new Margins(config),
58
67
  new Paddings(config),
68
+
59
69
  new DisplaysGenerator(config),
60
70
  new AxisPlacementsGenerator(config),
61
- new PositionsGenerator(config),
62
71
  new FlexWrapGenerator(config),
63
- new ZIndexGenerator(config),
72
+ new FlexDirectionsGenerator(config),
73
+
64
74
  new WidthsGenerator(config),
75
+ new PositionsGenerator(config),
76
+ new ZIndexGenerator(config),
77
+
65
78
  new FontSizeGenerator(config),
66
- new FlexDirectionsGenerator(config),
79
+ new FontWeightGenerator(config),
80
+ new LineHeightsGenerator(config),
81
+
82
+ new BackgroundsGenerator(config),
67
83
  ]);
68
84
  }
package/src/generator.ts CHANGED
@@ -8,6 +8,9 @@ import {
8
8
  Widths,
9
9
  FontSizes,
10
10
  FlexDirections,
11
+ FontWeights,
12
+ LineHeights,
13
+ Colors,
11
14
  } from './tokens';
12
15
 
13
16
  export interface GeneratorInterface {
@@ -28,5 +31,8 @@ export type GeneratorConfigType = {
28
31
  zIndexes: typeof ZIndexes;
29
32
  widths: typeof Widths;
30
33
  fontSizes: typeof FontSizes;
34
+ fontWeights: typeof FontWeights;
35
+ lineHeights: typeof LineHeights;
31
36
  flexDirections: typeof FlexDirections;
37
+ colors: typeof Colors;
32
38
  };
@@ -0,0 +1,32 @@
1
+ import { GeneratorInterface, GeneratorConfigType } from './generator';
2
+
3
+ export class LineHeightsGenerator implements GeneratorInterface {
4
+ spacing: GeneratorConfigType['spacing'];
5
+ displays: GeneratorConfigType['displays'];
6
+ lineHeights: GeneratorConfigType['lineHeights'];
7
+
8
+ constructor(config: GeneratorConfigType) {
9
+ this.spacing = config.spacing;
10
+ this.displays = config.displays;
11
+ this.lineHeights = config.lineHeights;
12
+ }
13
+
14
+ generateHeader(): string {
15
+ return '/* Line heights */\n\n';
16
+ }
17
+
18
+ generateCss(): string {
19
+ let output = '';
20
+
21
+ // Regular display: data-lh="*"
22
+ for (const [key, value] of Object.entries(this.lineHeights)) {
23
+ output += `*[data-lh='${key}'] {\n line-height: ${value};\n}\n`;
24
+ }
25
+
26
+ return output;
27
+ }
28
+
29
+ generateFooter(): string {
30
+ return '/* ===================== */\n\n';
31
+ }
32
+ }
package/src/tokens.ts CHANGED
@@ -93,6 +93,28 @@ export const FontSizes: Record<FontSizeType, string> = {
93
93
  32: '32',
94
94
  };
95
95
 
96
+ type FontWeightType = '300' | '400' | '500' | '700' | '900' | 'unset';
97
+
98
+ export const FontWeights: Record<FontWeightType, string> = {
99
+ '300': '300',
100
+ '400': '400',
101
+ '500': '500',
102
+ '700': '700',
103
+ '900': '900',
104
+ unset: 'unset',
105
+ };
106
+
107
+ type LineHeightType = '12' | '16' | '20' | '24' | '32' | 'unset';
108
+
109
+ export const LineHeights: Record<LineHeightType, string> = {
110
+ '12': '12',
111
+ '16': '16',
112
+ '20': '20',
113
+ '24': '24',
114
+ '32': '32',
115
+ unset: 'unset',
116
+ };
117
+
96
118
  type FlexDirectionType = 'row' | 'row-reverse' | 'column' | 'column-reverse';
97
119
 
98
120
  export const FlexDirections: Record<FlexDirectionType, string> = {
@@ -101,3 +123,28 @@ export const FlexDirections: Record<FlexDirectionType, string> = {
101
123
  column: 'column',
102
124
  'column-reverse': 'column-reverse',
103
125
  };
126
+
127
+ type ColorsType =
128
+ | 'white'
129
+ | 'gray-100'
130
+ | 'gray-200'
131
+ | 'gray-300'
132
+ | 'gray-400'
133
+ | 'gray-500'
134
+ | 'gray-600'
135
+ | 'gray-700'
136
+ | 'gray-800'
137
+ | 'black';
138
+
139
+ export const Colors: Record<ColorsType, string> = {
140
+ white: '#F9FAFB',
141
+ 'gray-100': '#F3F4F6',
142
+ 'gray-200': '#E5E7EB',
143
+ 'gray-300': '#D1D5DB',
144
+ 'gray-400': '#9CA3AF',
145
+ 'gray-500': '#6B7280',
146
+ 'gray-600': '#4B5563',
147
+ 'gray-700': '#374151',
148
+ 'gray-800': '#1F2937',
149
+ black: '#111827',
150
+ };