@phcdevworks/spectre-tokens 4.13.0 → 4.14.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
@@ -410,7 +410,7 @@ var coreTokens = {
410
410
  },
411
411
  "text": "{colors.neutral.900}",
412
412
  "divider": "{colors.neutral.200}",
413
- "stripeBg": "{colors.neutral.50}",
413
+ "stripeBg": "{colors.black} / 0.05",
414
414
  "hoverBg": "{colors.neutral.100}",
415
415
  "selectedBg": "{colors.info.50}",
416
416
  "row": {
@@ -1491,7 +1491,7 @@ var coreTokens = {
1491
1491
  },
1492
1492
  "text": "{colors.neutral.900}",
1493
1493
  "divider": "{colors.neutral.200}",
1494
- "stripeBg": "{colors.neutral.50}",
1494
+ "stripeBg": "{colors.black} / 0.05",
1495
1495
  "hoverBg": "{colors.neutral.100}",
1496
1496
  "selectedBg": "{colors.info.50}",
1497
1497
  "row": {
@@ -2354,7 +2354,7 @@ var coreTokens = {
2354
2354
  },
2355
2355
  "text": "{colors.neutral.100}",
2356
2356
  "divider": "{colors.neutral.700}",
2357
- "stripeBg": "{colors.neutral.800}",
2357
+ "stripeBg": "{colors.white} / 0.06",
2358
2358
  "hoverBg": "{colors.neutral.700}",
2359
2359
  "selectedBg": "{colors.info.900}",
2360
2360
  "row": {
@@ -2787,6 +2787,14 @@ var coreTokens = {
2787
2787
  "spelling": "{colors.error.400}",
2788
2788
  "grammar": "{colors.info.400}"
2789
2789
  }
2790
+ },
2791
+ "link": {
2792
+ "default": "{colors.brand.400}",
2793
+ "hover": "{colors.brand.300}",
2794
+ "active": "{colors.brand.200}",
2795
+ "visited": "{colors.accent.300}",
2796
+ "underline": "{colors.brand.400} / 0.4",
2797
+ "underlineHover": "{colors.brand.300}"
2790
2798
  }
2791
2799
  },
2792
2800
  "highContrast": {
@@ -4606,6 +4614,21 @@ var coreTokens = {
4606
4614
  "extrabold": 800,
4607
4615
  "black": 900
4608
4616
  },
4617
+ "fontSize": {
4618
+ "12": "0.75rem",
4619
+ "14": "0.875rem",
4620
+ "16": "1rem",
4621
+ "18": "1.125rem",
4622
+ "20": "1.25rem",
4623
+ "24": "1.5rem",
4624
+ "30": "1.875rem",
4625
+ "36": "2.25rem",
4626
+ "48": "3rem",
4627
+ "60": "3.75rem",
4628
+ "72": "4.5rem",
4629
+ "96": "6rem",
4630
+ "128": "8rem"
4631
+ },
4609
4632
  "surface": {
4610
4633
  "page": "{colors.neutral.50}",
4611
4634
  "card": "{colors.white}",
@@ -4801,46 +4824,64 @@ var coreTokens = {
4801
4824
  "letterSpacing": "0em"
4802
4825
  },
4803
4826
  "lg": {
4827
+ "size": "1.125rem",
4828
+ "lineHeight": "1.875rem",
4829
+ "weight": 500,
4830
+ "letterSpacing": "0em"
4831
+ },
4832
+ "xl": {
4804
4833
  "size": "1.25rem",
4805
4834
  "lineHeight": "2rem",
4806
4835
  "weight": 600,
4807
4836
  "letterSpacing": "0em"
4808
4837
  },
4809
- "xl": {
4838
+ "2xl": {
4810
4839
  "size": "1.5rem",
4811
4840
  "lineHeight": "2.125rem",
4812
4841
  "weight": 600,
4813
4842
  "letterSpacing": "0em"
4814
4843
  },
4815
- "2xl": {
4844
+ "3xl": {
4816
4845
  "size": "1.875rem",
4817
4846
  "lineHeight": "2.5rem",
4818
4847
  "weight": 700,
4819
4848
  "letterSpacing": "0em"
4820
4849
  },
4821
- "3xl": {
4850
+ "4xl": {
4822
4851
  "size": "2.25rem",
4823
4852
  "lineHeight": "2.75rem",
4824
4853
  "weight": 700,
4825
4854
  "letterSpacing": "0em"
4826
4855
  },
4827
- "4xl": {
4856
+ "5xl": {
4828
4857
  "size": "3rem",
4829
4858
  "lineHeight": "3.5rem",
4830
4859
  "weight": 800,
4831
4860
  "letterSpacing": "0em"
4832
4861
  },
4833
- "5xl": {
4862
+ "6xl": {
4834
4863
  "size": "3.75rem",
4835
4864
  "lineHeight": "4.25rem",
4836
4865
  "weight": 800,
4837
4866
  "letterSpacing": "0em"
4838
4867
  },
4839
- "6xl": {
4868
+ "7xl": {
4840
4869
  "size": "4.5rem",
4841
4870
  "lineHeight": "5rem",
4842
4871
  "weight": 900,
4843
4872
  "letterSpacing": "0em"
4873
+ },
4874
+ "8xl": {
4875
+ "size": "6rem",
4876
+ "lineHeight": "6.5rem",
4877
+ "weight": 900,
4878
+ "letterSpacing": "0em"
4879
+ },
4880
+ "9xl": {
4881
+ "size": "8rem",
4882
+ "lineHeight": "8.5rem",
4883
+ "weight": 900,
4884
+ "letterSpacing": "0em"
4844
4885
  }
4845
4886
  },
4846
4887
  "typography": {
@@ -4869,90 +4910,108 @@ var coreTokens = {
4869
4910
  "letterSpacing": "0em"
4870
4911
  },
4871
4912
  "lg": {
4913
+ "fontSize": "1.125rem",
4914
+ "lineHeight": "1.875rem",
4915
+ "fontWeight": 500,
4916
+ "letterSpacing": "0em"
4917
+ },
4918
+ "xl": {
4872
4919
  "fontSize": "1.25rem",
4873
4920
  "lineHeight": "2rem",
4874
4921
  "fontWeight": 600,
4875
4922
  "letterSpacing": "0em"
4876
4923
  },
4877
- "xl": {
4924
+ "2xl": {
4878
4925
  "fontSize": "1.5rem",
4879
4926
  "lineHeight": "2.125rem",
4880
4927
  "fontWeight": 600,
4881
4928
  "letterSpacing": "0em"
4882
4929
  },
4883
- "2xl": {
4930
+ "3xl": {
4884
4931
  "fontSize": "1.875rem",
4885
4932
  "lineHeight": "2.5rem",
4886
4933
  "fontWeight": 700,
4887
4934
  "letterSpacing": "0em"
4888
4935
  },
4889
- "3xl": {
4936
+ "4xl": {
4890
4937
  "fontSize": "2.25rem",
4891
4938
  "lineHeight": "2.75rem",
4892
4939
  "fontWeight": 700,
4893
4940
  "letterSpacing": "0em"
4894
4941
  },
4895
- "4xl": {
4942
+ "5xl": {
4896
4943
  "fontSize": "3rem",
4897
4944
  "lineHeight": "3.5rem",
4898
4945
  "fontWeight": 800,
4899
4946
  "letterSpacing": "0em"
4900
4947
  },
4901
- "5xl": {
4948
+ "6xl": {
4902
4949
  "fontSize": "3.75rem",
4903
4950
  "lineHeight": "4.25rem",
4904
4951
  "fontWeight": 800,
4905
4952
  "letterSpacing": "0em"
4906
4953
  },
4907
- "6xl": {
4954
+ "7xl": {
4908
4955
  "fontSize": "4.5rem",
4909
4956
  "lineHeight": "5rem",
4910
4957
  "fontWeight": 900,
4911
4958
  "letterSpacing": "0em"
4959
+ },
4960
+ "8xl": {
4961
+ "fontSize": "6rem",
4962
+ "lineHeight": "6.5rem",
4963
+ "fontWeight": 900,
4964
+ "letterSpacing": "0em"
4965
+ },
4966
+ "9xl": {
4967
+ "fontSize": "8rem",
4968
+ "lineHeight": "8.5rem",
4969
+ "fontWeight": 900,
4970
+ "letterSpacing": "0em"
4912
4971
  }
4913
4972
  },
4914
4973
  "heading": {
4915
4974
  "h1": {
4975
+ "fontFamily": "{typography.families.sans}",
4976
+ "fontSize": "{typography.scale.6xl.fontSize}",
4977
+ "lineHeight": "{typography.scale.6xl.lineHeight}",
4978
+ "fontWeight": 800,
4979
+ "letterSpacing": "{typography.scale.6xl.letterSpacing}"
4980
+ },
4981
+ "h2": {
4916
4982
  "fontFamily": "{typography.families.sans}",
4917
4983
  "fontSize": "{typography.scale.5xl.fontSize}",
4918
4984
  "lineHeight": "{typography.scale.5xl.lineHeight}",
4919
- "fontWeight": 800,
4985
+ "fontWeight": 700,
4920
4986
  "letterSpacing": "{typography.scale.5xl.letterSpacing}"
4921
4987
  },
4922
- "h2": {
4988
+ "h3": {
4923
4989
  "fontFamily": "{typography.families.sans}",
4924
4990
  "fontSize": "{typography.scale.4xl.fontSize}",
4925
4991
  "lineHeight": "{typography.scale.4xl.lineHeight}",
4926
4992
  "fontWeight": 700,
4927
4993
  "letterSpacing": "{typography.scale.4xl.letterSpacing}"
4928
4994
  },
4929
- "h3": {
4995
+ "h4": {
4930
4996
  "fontFamily": "{typography.families.sans}",
4931
4997
  "fontSize": "{typography.scale.3xl.fontSize}",
4932
4998
  "lineHeight": "{typography.scale.3xl.lineHeight}",
4933
- "fontWeight": 700,
4999
+ "fontWeight": 600,
4934
5000
  "letterSpacing": "{typography.scale.3xl.letterSpacing}"
4935
5001
  },
4936
- "h4": {
5002
+ "h5": {
4937
5003
  "fontFamily": "{typography.families.sans}",
4938
5004
  "fontSize": "{typography.scale.2xl.fontSize}",
4939
5005
  "lineHeight": "{typography.scale.2xl.lineHeight}",
4940
5006
  "fontWeight": 600,
4941
5007
  "letterSpacing": "{typography.scale.2xl.letterSpacing}"
4942
5008
  },
4943
- "h5": {
5009
+ "h6": {
4944
5010
  "fontFamily": "{typography.families.sans}",
4945
5011
  "fontSize": "{typography.scale.xl.fontSize}",
4946
5012
  "lineHeight": "{typography.scale.xl.lineHeight}",
4947
5013
  "fontWeight": 600,
4948
5014
  "letterSpacing": "{typography.scale.xl.letterSpacing}"
4949
- },
4950
- "h6": {
4951
- "fontFamily": "{typography.families.sans}",
4952
- "fontSize": "{typography.scale.lg.fontSize}",
4953
- "lineHeight": "{typography.scale.lg.lineHeight}",
4954
- "fontWeight": 600,
4955
- "letterSpacing": "{typography.scale.lg.letterSpacing}"
4956
5015
  }
4957
5016
  },
4958
5017
  "body": {
@@ -4964,54 +5023,54 @@ var coreTokens = {
4964
5023
  },
4965
5024
  "display": {
4966
5025
  "1": {
5026
+ "fontFamily": "{typography.families.sans}",
5027
+ "fontSize": "{typography.scale.7xl.fontSize}",
5028
+ "lineHeight": "{typography.scale.7xl.lineHeight}",
5029
+ "fontWeight": 800,
5030
+ "letterSpacing": "{typography.scale.7xl.letterSpacing}"
5031
+ },
5032
+ "2": {
4967
5033
  "fontFamily": "{typography.families.sans}",
4968
5034
  "fontSize": "{typography.scale.6xl.fontSize}",
4969
5035
  "lineHeight": "{typography.scale.6xl.lineHeight}",
4970
5036
  "fontWeight": 800,
4971
5037
  "letterSpacing": "{typography.scale.6xl.letterSpacing}"
4972
5038
  },
4973
- "2": {
5039
+ "3": {
4974
5040
  "fontFamily": "{typography.families.sans}",
4975
5041
  "fontSize": "{typography.scale.5xl.fontSize}",
4976
5042
  "lineHeight": "{typography.scale.5xl.lineHeight}",
4977
- "fontWeight": 800,
5043
+ "fontWeight": 700,
4978
5044
  "letterSpacing": "{typography.scale.5xl.letterSpacing}"
4979
5045
  },
4980
- "3": {
5046
+ "4": {
4981
5047
  "fontFamily": "{typography.families.sans}",
4982
5048
  "fontSize": "{typography.scale.4xl.fontSize}",
4983
5049
  "lineHeight": "{typography.scale.4xl.lineHeight}",
4984
5050
  "fontWeight": 700,
4985
5051
  "letterSpacing": "{typography.scale.4xl.letterSpacing}"
4986
5052
  },
4987
- "4": {
5053
+ "5": {
4988
5054
  "fontFamily": "{typography.families.sans}",
4989
5055
  "fontSize": "{typography.scale.3xl.fontSize}",
4990
5056
  "lineHeight": "{typography.scale.3xl.lineHeight}",
4991
- "fontWeight": 700,
5057
+ "fontWeight": 600,
4992
5058
  "letterSpacing": "{typography.scale.3xl.letterSpacing}"
4993
5059
  },
4994
- "5": {
5060
+ "6": {
4995
5061
  "fontFamily": "{typography.families.sans}",
4996
5062
  "fontSize": "{typography.scale.2xl.fontSize}",
4997
5063
  "lineHeight": "{typography.scale.2xl.lineHeight}",
4998
5064
  "fontWeight": 600,
4999
5065
  "letterSpacing": "{typography.scale.2xl.letterSpacing}"
5000
- },
5001
- "6": {
5002
- "fontFamily": "{typography.families.sans}",
5003
- "fontSize": "{typography.scale.xl.fontSize}",
5004
- "lineHeight": "{typography.scale.xl.lineHeight}",
5005
- "fontWeight": 600,
5006
- "letterSpacing": "{typography.scale.xl.letterSpacing}"
5007
5066
  }
5008
5067
  },
5009
5068
  "lead": {
5010
5069
  "fontFamily": "{typography.families.sans}",
5011
- "fontSize": "{typography.scale.lg.fontSize}",
5012
- "lineHeight": "{typography.scale.lg.lineHeight}",
5070
+ "fontSize": "{typography.scale.xl.fontSize}",
5071
+ "lineHeight": "{typography.scale.xl.lineHeight}",
5013
5072
  "fontWeight": 400,
5014
- "letterSpacing": "{typography.scale.lg.letterSpacing}"
5073
+ "letterSpacing": "{typography.scale.xl.letterSpacing}"
5015
5074
  }
5016
5075
  }
5017
5076
  };
@@ -5234,6 +5293,12 @@ var createCssVariableMap = (tokens2, options = {}) => {
5234
5293
  assign(toVariableName(prefix, "font-weight", key), value);
5235
5294
  });
5236
5295
  }
5296
+ const fontSize = baseTokens.fontSize;
5297
+ if (fontSize) {
5298
+ Object.entries(fontSize).forEach(([key, value]) => {
5299
+ assign(toVariableName(prefix, "font-size", key), value);
5300
+ });
5301
+ }
5237
5302
  const textDecoration = baseTokens.textDecoration;
5238
5303
  if (textDecoration) {
5239
5304
  Object.entries(textDecoration).forEach(([group, scale]) => {
@@ -5450,12 +5515,12 @@ var generateCssVariables = (tokens2, options = {}) => {
5450
5515
  (path) => ["form", ...path.map(kebabPathSegment)],
5451
5516
  void 0
5452
5517
  );
5518
+ const darkLink = getPath(darkMode, ["link"]);
5453
5519
  const highContrastLink = getPath(highContrastMode, ["link"]);
5454
5520
  Object.entries(linkTokens).forEach(([key, value]) => {
5455
5521
  const varName = toVariableName(prefix, "link", kebabPathSegment(key));
5456
- const resolved = pickSemantic(tokens2, value);
5457
- addBase(varName, resolved);
5458
- addDark(varName, resolved);
5522
+ addBase(varName, pickSemantic(tokens2, value));
5523
+ addDark(varName, pickSemantic(tokens2, getPath(darkLink, [key]), value));
5459
5524
  addHighContrast(varName, pickSemantic(tokens2, getPath(highContrastLink, [key]), value));
5460
5525
  });
5461
5526
  const highContrastButtons = getPath(highContrastMode, ["buttons"]);