@phcdevworks/spectre-tokens 2.6.0 → 2.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/index.js CHANGED
@@ -299,7 +299,7 @@ var coreTokens = {
299
299
  "badge": {
300
300
  "neutralBg": "{colors.neutral.700}",
301
301
  "neutralBgHover": "{colors.neutral.600}",
302
- "neutralText": "{colors.neutral.100}",
302
+ "neutralText": "{colors.neutral.50}",
303
303
  "infoBg": "{colors.info.800}",
304
304
  "infoBgHover": "{colors.info.700}",
305
305
  "infoText": "{colors.info.100}",
@@ -470,13 +470,17 @@ var coreTokens = {
470
470
  "sm": "2px",
471
471
  "md": "4px",
472
472
  "lg": "8px",
473
+ "xl": "12px",
474
+ "2xl": "16px",
473
475
  "pill": "999px"
474
476
  },
475
477
  "shadows": {
476
478
  "none": "none",
477
479
  "sm": "0 1px 2px 0 {colors.black} / 0.06",
478
480
  "md": "0 2px 6px -1px {colors.black} / 0.08",
479
- "lg": "0 6px 16px -4px {colors.black} / 0.12"
481
+ "lg": "0 6px 16px -4px {colors.black} / 0.12",
482
+ "xl": "0 12px 24px -6px {colors.black} / 0.15",
483
+ "2xl": "0 20px 48px -12px {colors.black} / 0.20"
480
484
  },
481
485
  "breakpoints": {
482
486
  "sm": "640px",
@@ -493,64 +497,69 @@ var coreTokens = {
493
497
  "overlay": "1300",
494
498
  "modal": "1400",
495
499
  "popover": "1500",
496
- "tooltip": "1600"
500
+ "tooltip": "1600",
501
+ "toast": "1700"
497
502
  },
498
503
  "transitions": {
499
504
  "duration": {
500
505
  "instant": "75ms",
501
506
  "fast": "150ms",
502
507
  "base": "200ms",
508
+ "relaxed": "250ms",
503
509
  "moderate": "300ms",
504
510
  "slow": "500ms",
505
- "slower": "700ms"
511
+ "slower": "700ms",
512
+ "long": "1000ms",
513
+ "slowest": "1200ms"
506
514
  },
507
515
  "easing": {
508
516
  "linear": "linear",
509
517
  "in": "cubic-bezier(0.4, 0, 1, 1)",
510
518
  "out": "cubic-bezier(0, 0, 0.2, 1)",
511
519
  "inOut": "cubic-bezier(0.4, 0, 0.2, 1)",
512
- "spring": "cubic-bezier(0.4, 0, 0.2, 1)"
520
+ "spring": "cubic-bezier(0.4, 0, 0.2, 1)",
521
+ "overshoot": "cubic-bezier(0.34, 1.56, 0.64, 1)"
513
522
  }
514
523
  },
515
524
  "animations": {
516
525
  "fadeIn": {
517
- "duration": "200ms",
518
- "easing": "cubic-bezier(0, 0, 0.2, 1)",
526
+ "duration": "{transitions.duration.base}",
527
+ "easing": "{transitions.easing.out}",
519
528
  "keyframes": "fade-in"
520
529
  },
521
530
  "fadeOut": {
522
- "duration": "150ms",
523
- "easing": "cubic-bezier(0.4, 0, 1, 1)",
531
+ "duration": "{transitions.duration.fast}",
532
+ "easing": "{transitions.easing.in}",
524
533
  "keyframes": "fade-out"
525
534
  },
526
535
  "slideUp": {
527
- "duration": "300ms",
528
- "easing": "cubic-bezier(0, 0, 0.2, 1)",
536
+ "duration": "{transitions.duration.moderate}",
537
+ "easing": "{transitions.easing.out}",
529
538
  "keyframes": "slide-up"
530
539
  },
531
540
  "slideDown": {
532
- "duration": "300ms",
533
- "easing": "cubic-bezier(0, 0, 0.2, 1)",
541
+ "duration": "{transitions.duration.moderate}",
542
+ "easing": "{transitions.easing.out}",
534
543
  "keyframes": "slide-down"
535
544
  },
536
545
  "scaleIn": {
537
- "duration": "200ms",
538
- "easing": "cubic-bezier(0.34, 1.56, 0.64, 1)",
546
+ "duration": "{transitions.duration.base}",
547
+ "easing": "{transitions.easing.overshoot}",
539
548
  "keyframes": "scale-in"
540
549
  },
541
550
  "bounce": {
542
- "duration": "300ms",
543
- "easing": "cubic-bezier(0.4, 0, 0.2, 1)",
551
+ "duration": "{transitions.duration.moderate}",
552
+ "easing": "{transitions.easing.spring}",
544
553
  "keyframes": "bounce"
545
554
  },
546
555
  "shake": {
547
- "duration": "250ms",
548
- "easing": "cubic-bezier(0.4, 0, 0.2, 1)",
556
+ "duration": "{transitions.duration.relaxed}",
557
+ "easing": "{transitions.easing.spring}",
549
558
  "keyframes": "shake"
550
559
  },
551
560
  "pulse": {
552
- "duration": "1200ms",
553
- "easing": "cubic-bezier(0.4, 0, 0.2, 1)",
561
+ "duration": "{transitions.duration.slowest}",
562
+ "easing": "{transitions.easing.spring}",
554
563
  "keyframes": "pulse"
555
564
  }
556
565
  },
@@ -558,6 +567,7 @@ var coreTokens = {
558
567
  "disabled": "0.38",
559
568
  "hover": "0.92",
560
569
  "active": "0.84",
570
+ "loading": "0.6",
561
571
  "focus": "1",
562
572
  "overlay": "0.5",
563
573
  "tooltip": "0.95"
@@ -565,6 +575,7 @@ var coreTokens = {
565
575
  "aspectRatios": {
566
576
  "square": "1/1",
567
577
  "video": "16/9",
578
+ "classic": "3/2",
568
579
  "portrait": "3/4",
569
580
  "landscape": "4/3",
570
581
  "ultrawide": "21/9",
@@ -592,6 +603,10 @@ var coreTokens = {
592
603
  "width": {
593
604
  "base": "1px",
594
605
  "thick": "2px"
606
+ },
607
+ "style": {
608
+ "none": "none",
609
+ "solid": "solid"
595
610
  }
596
611
  },
597
612
  "surface": {
@@ -655,47 +670,56 @@ var coreTokens = {
655
670
  "sm": {
656
671
  "size": "0.875rem",
657
672
  "lineHeight": "1.5rem",
658
- "weight": 400
673
+ "weight": 400,
674
+ "letterSpacing": "0em"
659
675
  },
660
676
  "md": {
661
677
  "size": "1rem",
662
678
  "lineHeight": "1.75rem",
663
- "weight": 500
679
+ "weight": 500,
680
+ "letterSpacing": "0em"
664
681
  },
665
682
  "lg": {
666
683
  "size": "1.25rem",
667
684
  "lineHeight": "2rem",
668
- "weight": 600
685
+ "weight": 600,
686
+ "letterSpacing": "0em"
669
687
  },
670
688
  "xl": {
671
689
  "size": "1.5rem",
672
690
  "lineHeight": "2.125rem",
673
- "weight": 600
691
+ "weight": 600,
692
+ "letterSpacing": "0em"
674
693
  },
675
694
  "2xl": {
676
695
  "size": "1.875rem",
677
696
  "lineHeight": "2.5rem",
678
- "weight": 700
697
+ "weight": 700,
698
+ "letterSpacing": "0em"
679
699
  },
680
700
  "3xl": {
681
701
  "size": "2.25rem",
682
702
  "lineHeight": "2.75rem",
683
- "weight": 700
703
+ "weight": 700,
704
+ "letterSpacing": "0em"
684
705
  },
685
706
  "4xl": {
686
707
  "size": "3rem",
687
708
  "lineHeight": "3.5rem",
688
- "weight": 800
709
+ "weight": 800,
710
+ "letterSpacing": "0em"
689
711
  },
690
712
  "5xl": {
691
713
  "size": "3.75rem",
692
714
  "lineHeight": "4.25rem",
693
- "weight": 800
715
+ "weight": 800,
716
+ "letterSpacing": "0em"
694
717
  },
695
718
  "6xl": {
696
719
  "size": "4.5rem",
697
720
  "lineHeight": "5rem",
698
- "weight": 900
721
+ "weight": 900,
722
+ "letterSpacing": "0em"
699
723
  }
700
724
  },
701
725
  "typography": {
@@ -714,47 +738,56 @@ var coreTokens = {
714
738
  "sm": {
715
739
  "fontSize": "0.875rem",
716
740
  "lineHeight": "1.5rem",
717
- "fontWeight": 400
741
+ "fontWeight": 400,
742
+ "letterSpacing": "0em"
718
743
  },
719
744
  "md": {
720
745
  "fontSize": "1rem",
721
746
  "lineHeight": "1.75rem",
722
- "fontWeight": 500
747
+ "fontWeight": 500,
748
+ "letterSpacing": "0em"
723
749
  },
724
750
  "lg": {
725
751
  "fontSize": "1.25rem",
726
752
  "lineHeight": "2rem",
727
- "fontWeight": 600
753
+ "fontWeight": 600,
754
+ "letterSpacing": "0em"
728
755
  },
729
756
  "xl": {
730
757
  "fontSize": "1.5rem",
731
758
  "lineHeight": "2.125rem",
732
- "fontWeight": 600
759
+ "fontWeight": 600,
760
+ "letterSpacing": "0em"
733
761
  },
734
762
  "2xl": {
735
763
  "fontSize": "1.875rem",
736
764
  "lineHeight": "2.5rem",
737
- "fontWeight": 700
765
+ "fontWeight": 700,
766
+ "letterSpacing": "0em"
738
767
  },
739
768
  "3xl": {
740
769
  "fontSize": "2.25rem",
741
770
  "lineHeight": "2.75rem",
742
- "fontWeight": 700
771
+ "fontWeight": 700,
772
+ "letterSpacing": "0em"
743
773
  },
744
774
  "4xl": {
745
775
  "fontSize": "3rem",
746
776
  "lineHeight": "3.5rem",
747
- "fontWeight": 800
777
+ "fontWeight": 800,
778
+ "letterSpacing": "0em"
748
779
  },
749
780
  "5xl": {
750
781
  "fontSize": "3.75rem",
751
782
  "lineHeight": "4.25rem",
752
- "fontWeight": 800
783
+ "fontWeight": 800,
784
+ "letterSpacing": "0em"
753
785
  },
754
786
  "6xl": {
755
787
  "fontSize": "4.5rem",
756
788
  "lineHeight": "5rem",
757
- "fontWeight": 900
789
+ "fontWeight": 900,
790
+ "letterSpacing": "0em"
758
791
  }
759
792
  }
760
793
  }
@@ -897,6 +930,11 @@ var createCssVariableMap = (tokens2, options = {}) => {
897
930
  assign(toVariableName(prefix, "border", "width", key), value);
898
931
  });
899
932
  }
933
+ if (border?.style) {
934
+ Object.entries(border.style).forEach(([key, value]) => {
935
+ assign(toVariableName(prefix, "border", "style", key), value);
936
+ });
937
+ }
900
938
  Object.entries(baseTokens.radii).forEach(([key, value]) => {
901
939
  assign(toVariableName(prefix, "radius", key), value);
902
940
  });
@@ -922,27 +960,6 @@ var createCssVariableMap = (tokens2, options = {}) => {
922
960
  const scaleEntry = entry;
923
961
  assign(toVariableName(prefix, "font", key, "letter-spacing"), scaleEntry.letterSpacing);
924
962
  });
925
- assign(toVariableName(prefix, "text", "on", "page", "default"), tokens2.text.onPage.default);
926
- assign(toVariableName(prefix, "text", "on", "page", "muted"), tokens2.text.onPage.muted);
927
- assign(toVariableName(prefix, "text", "on", "page", "subtle"), tokens2.text.onPage.subtle);
928
- assign(toVariableName(prefix, "text", "on", "page", "meta"), tokens2.text.onPage.meta);
929
- assign(toVariableName(prefix, "text", "on", "surface", "default"), tokens2.text.onSurface.default);
930
- assign(toVariableName(prefix, "text", "on", "surface", "muted"), tokens2.text.onSurface.muted);
931
- assign(toVariableName(prefix, "text", "on", "surface", "subtle"), tokens2.text.onSurface.subtle);
932
- assign(toVariableName(prefix, "text", "on", "surface", "meta"), tokens2.text.onSurface.meta);
933
- const badge = tokens2.component?.badge;
934
- if (badge) {
935
- BADGE_VARIANTS.forEach(({ variant, bgKey, textKey }) => {
936
- assign(toVariableName(prefix, "badge", variant, "bg"), badge[bgKey]);
937
- assign(toVariableName(prefix, "badge", variant, "text"), badge[textKey]);
938
- });
939
- }
940
- const iconBox = tokens2.component?.iconBox;
941
- if (iconBox) {
942
- ICON_BOX_FIELDS.forEach(({ name, tokenKey }) => {
943
- assign(toVariableName(prefix, "icon-box", name), iconBox[tokenKey]);
944
- });
945
- }
946
963
  Object.entries(baseTokens.shadows).forEach(([key, value]) => {
947
964
  assign(toVariableName(prefix, "shadow", key), value);
948
965
  });