@primer/primitives 10.1.0-rc.f1589f93 → 10.1.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.
Files changed (119) hide show
  1. package/README.md +0 -21
  2. package/dist/build/filters/index.d.ts +0 -1
  3. package/dist/build/filters/index.js +0 -1
  4. package/dist/build/formats/jsonFigma.js +1 -2
  5. package/dist/build/platforms/css.js +6 -7
  6. package/dist/build/platforms/docJson.js +0 -1
  7. package/dist/build/platforms/fallbacks.js +0 -1
  8. package/dist/build/platforms/javascript.js +0 -1
  9. package/dist/build/platforms/json.js +0 -1
  10. package/dist/build/platforms/styleLint.js +0 -1
  11. package/dist/build/platforms/typescript.js +0 -1
  12. package/dist/build/primerStyleDictionary.js +7 -3
  13. package/dist/build/schemas/colorToken.d.ts +0 -18
  14. package/dist/build/schemas/colorToken.js +0 -7
  15. package/dist/build/transformers/borderToCss.js +2 -2
  16. package/dist/build/transformers/colorToRgbaFloat.js +2 -12
  17. package/dist/build/transformers/index.d.ts +0 -1
  18. package/dist/build/transformers/index.js +0 -1
  19. package/dist/css/functional/size/border.css +7 -6
  20. package/dist/css/functional/themes/dark-colorblind.css +60 -6
  21. package/dist/css/functional/themes/dark-dimmed.css +60 -6
  22. package/dist/css/functional/themes/dark-high-contrast.css +60 -6
  23. package/dist/css/functional/themes/dark-tritanopia.css +60 -6
  24. package/dist/css/functional/themes/dark.css +60 -6
  25. package/dist/css/functional/themes/light-colorblind.css +60 -6
  26. package/dist/css/functional/themes/light-high-contrast.css +60 -6
  27. package/dist/css/functional/themes/light-tritanopia.css +60 -6
  28. package/dist/css/functional/themes/light.css +60 -6
  29. package/dist/css/primitives.css +7 -6
  30. package/dist/docs/base/size/size.json +19 -19
  31. package/dist/docs/base/typography/typography.json +4 -4
  32. package/dist/docs/functional/size/border.json +41 -28
  33. package/dist/docs/functional/size/breakpoints.json +6 -6
  34. package/dist/docs/functional/size/size-coarse.json +3 -3
  35. package/dist/docs/functional/size/size-fine.json +3 -3
  36. package/dist/docs/functional/size/size.json +66 -66
  37. package/dist/docs/functional/size/viewport.json +6 -6
  38. package/dist/docs/functional/themes/dark-colorblind.json +475 -128
  39. package/dist/docs/functional/themes/dark-dimmed.json +519 -444
  40. package/dist/docs/functional/themes/dark-high-contrast.json +490 -241
  41. package/dist/docs/functional/themes/dark-tritanopia.json +485 -200
  42. package/dist/docs/functional/themes/dark.json +469 -102
  43. package/dist/docs/functional/themes/light-colorblind.json +463 -94
  44. package/dist/docs/functional/themes/light-high-contrast.json +487 -274
  45. package/dist/docs/functional/themes/light-tritanopia.json +463 -102
  46. package/dist/docs/functional/themes/light.json +460 -105
  47. package/dist/docs/functional/typography/typography.json +46 -46
  48. package/dist/fallbacks/functional/size/border.json +7 -6
  49. package/dist/figma/themes/dark-colorblind.json +14 -54
  50. package/dist/figma/themes/dark-dimmed.json +15 -356
  51. package/dist/figma/themes/dark-high-contrast.json +10 -129
  52. package/dist/figma/themes/dark-tritanopia.json +14 -111
  53. package/dist/figma/themes/dark.json +14 -34
  54. package/dist/figma/themes/light-colorblind.json +10 -20
  55. package/dist/figma/themes/light-high-contrast.json +10 -177
  56. package/dist/figma/themes/light-tritanopia.json +10 -24
  57. package/dist/figma/themes/light.json +10 -32
  58. package/dist/internalCss/dark-colorblind.css +88 -6
  59. package/dist/internalCss/dark-dimmed.css +88 -6
  60. package/dist/internalCss/dark-high-contrast.css +88 -6
  61. package/dist/internalCss/dark-tritanopia.css +88 -6
  62. package/dist/internalCss/dark.css +88 -6
  63. package/dist/internalCss/light-colorblind.css +88 -6
  64. package/dist/internalCss/light-high-contrast.css +88 -6
  65. package/dist/internalCss/light-tritanopia.css +88 -6
  66. package/dist/internalCss/light.css +88 -6
  67. package/dist/styleLint/base/size/size.json +19 -19
  68. package/dist/styleLint/base/typography/typography.json +4 -4
  69. package/dist/styleLint/functional/size/border.json +41 -28
  70. package/dist/styleLint/functional/size/breakpoints.json +6 -6
  71. package/dist/styleLint/functional/size/size-coarse.json +3 -3
  72. package/dist/styleLint/functional/size/size-fine.json +3 -3
  73. package/dist/styleLint/functional/size/size.json +66 -66
  74. package/dist/styleLint/functional/size/viewport.json +6 -6
  75. package/dist/styleLint/functional/themes/dark-colorblind.json +475 -128
  76. package/dist/styleLint/functional/themes/dark-dimmed.json +519 -444
  77. package/dist/styleLint/functional/themes/dark-high-contrast.json +490 -241
  78. package/dist/styleLint/functional/themes/dark-tritanopia.json +485 -200
  79. package/dist/styleLint/functional/themes/dark.json +469 -102
  80. package/dist/styleLint/functional/themes/light-colorblind.json +463 -94
  81. package/dist/styleLint/functional/themes/light-high-contrast.json +487 -274
  82. package/dist/styleLint/functional/themes/light-tritanopia.json +463 -102
  83. package/dist/styleLint/functional/themes/light.json +460 -105
  84. package/dist/styleLint/functional/typography/typography.json +46 -46
  85. package/package.json +1 -1
  86. package/src/tokens/base/typography/typography.json5 +48 -0
  87. package/src/tokens/functional/border/border.json5 +236 -0
  88. package/src/tokens/functional/color/dark/app-dark.json5 +0 -2
  89. package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +120 -6
  90. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +46 -29
  91. package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +15 -20
  92. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +32 -18
  93. package/src/tokens/functional/color/dark/patterns-dark.json5 +13 -45
  94. package/src/tokens/functional/color/dark/primitives-dark.json5 +1 -6
  95. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +67 -20
  96. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +4 -21
  97. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +3 -16
  98. package/src/tokens/functional/color/light/patterns-light.json5 +11 -47
  99. package/src/tokens/functional/color/light/primitives-light.json5 +2 -10
  100. package/src/tokens/functional/size/border.json5 +115 -0
  101. package/src/tokens/functional/typography/typography.json5 +527 -0
  102. package/dist/build/filters/isColorWithMix.d.ts +0 -7
  103. package/dist/build/filters/isColorWithMix.js +0 -24
  104. package/dist/build/transformers/colorToHexMix.d.ts +0 -8
  105. package/dist/build/transformers/colorToHexMix.js +0 -20
  106. package/dist/build/transformers/utilities/mix.d.ts +0 -5
  107. package/dist/build/transformers/utilities/mix.js +0 -38
  108. package/src/tokens/base/typography/typography.json +0 -48
  109. package/src/tokens/functional/border/dark.json5 +0 -12
  110. package/src/tokens/functional/border/light.json5 +0 -12
  111. package/src/tokens/functional/color/dark/patterns-dark.json +0 -3963
  112. package/src/tokens/functional/size/border.json +0 -111
  113. package/src/tokens/functional/typography/typography.json +0 -527
  114. /package/src/tokens/base/size/{size.json → size.json5} +0 -0
  115. /package/src/tokens/functional/size/{breakpoints.json → breakpoints.json5} +0 -0
  116. /package/src/tokens/functional/size/{size-coarse.json → size-coarse.json5} +0 -0
  117. /package/src/tokens/functional/size/{size-fine.json → size-fine.json5} +0 -0
  118. /package/src/tokens/functional/size/{size.json → size.json5} +0 -0
  119. /package/src/tokens/functional/size/{viewport.json → viewport.json5} +0 -0
@@ -398,7 +398,7 @@
398
398
  },
399
399
  },
400
400
  hover: {
401
- $value: '{bgColor.accent.emphasis}',
401
+ $value: '#0860ca',
402
402
  $type: 'color',
403
403
  $extensions: {
404
404
  'org.primer.figma': {
@@ -407,13 +407,9 @@
407
407
  scopes: ['bgColor'],
408
408
  },
409
409
  },
410
- mix: {
411
- color: '{base.color.blue.7}',
412
- weight: 0.2,
413
- },
414
410
  },
415
411
  active: {
416
- $value: '{bgColor.accent.emphasis}',
412
+ $value: '#0757ba',
417
413
  $type: 'color',
418
414
  $extensions: {
419
415
  'org.primer.figma': {
@@ -422,10 +418,6 @@
422
418
  scopes: ['bgColor'],
423
419
  },
424
420
  },
425
- mix: {
426
- color: '{base.color.blue.7}',
427
- weight: 0.4,
428
- },
429
421
  },
430
422
  disabled: {
431
423
  $value: '{fgColor.disabled}',
@@ -881,7 +873,7 @@
881
873
  },
882
874
  },
883
875
  hover: {
884
- $value: '{bgColor.success.emphasis}',
876
+ $value: '#1c8139',
885
877
  $type: 'color',
886
878
  $extensions: {
887
879
  'org.primer.figma': {
@@ -890,13 +882,9 @@
890
882
  scopes: ['bgColor'],
891
883
  },
892
884
  },
893
- mix: {
894
- color: '{base.color.green.6}',
895
- weight: 0.2,
896
- },
897
885
  },
898
886
  active: {
899
- $value: '{bgColor.success.emphasis}',
887
+ $value: '#197935',
900
888
  $type: 'color',
901
889
  $extensions: {
902
890
  'org.primer.figma': {
@@ -905,13 +893,9 @@
905
893
  scopes: ['bgColor'],
906
894
  },
907
895
  },
908
- mix: {
909
- color: '{base.color.green.6}',
910
- weight: 0.4,
911
- },
912
896
  },
913
897
  disabled: {
914
- $value: '{base.color.green.4}',
898
+ $value: '#95d8a6',
915
899
  $type: 'color',
916
900
  $extensions: {
917
901
  'org.primer.figma': {
@@ -920,10 +904,6 @@
920
904
  scopes: ['bgColor'],
921
905
  },
922
906
  },
923
- mix: {
924
- color: '{base.color.green.0}',
925
- weight: 0.6,
926
- },
927
907
  },
928
908
  },
929
909
  borderColor: {
@@ -1091,7 +1071,7 @@
1091
1071
  },
1092
1072
  },
1093
1073
  disabled: {
1094
- $value: '{control.transparent.bgColor.disabled}',
1074
+ $value: '{base.color.transparent}',
1095
1075
  $type: 'color',
1096
1076
  $extensions: {
1097
1077
  'org.primer.figma': {
@@ -1126,7 +1106,7 @@
1126
1106
  },
1127
1107
  },
1128
1108
  disabled: {
1129
- $value: '{control.borderColor.disabled}',
1109
+ $value: '{base.color.transparent}',
1130
1110
  $type: 'color',
1131
1111
  $extensions: {
1132
1112
  'org.primer.figma': {
@@ -1210,7 +1190,7 @@
1210
1190
  },
1211
1191
  },
1212
1192
  active: {
1213
- $value: '{bgColor.accent.emphasis}',
1193
+ $value: '#0757ba',
1214
1194
  $type: 'color',
1215
1195
  $extensions: {
1216
1196
  'org.primer.figma': {
@@ -1219,10 +1199,6 @@
1219
1199
  scopes: ['bgColor'],
1220
1200
  },
1221
1201
  },
1222
- mix: {
1223
- color: '{base.color.blue.7}',
1224
- weight: 0.4,
1225
- },
1226
1202
  },
1227
1203
  disabled: {
1228
1204
  $value: '{control.bgColor.disabled}',
@@ -1357,7 +1333,7 @@
1357
1333
  },
1358
1334
  },
1359
1335
  active: {
1360
- $value: '{base.color.red.6}',
1336
+ $value: '#8b0820',
1361
1337
  $type: 'color',
1362
1338
  $extensions: {
1363
1339
  'org.primer.figma': {
@@ -1366,10 +1342,6 @@
1366
1342
  scopes: ['bgColor'],
1367
1343
  },
1368
1344
  },
1369
- mix: {
1370
- color: '{base.color.red.8}',
1371
- weight: 0.4,
1372
- },
1373
1345
  },
1374
1346
  disabled: {
1375
1347
  $value: '{control.bgColor.disabled}',
@@ -1621,7 +1593,7 @@
1621
1593
  },
1622
1594
  fgColor: {
1623
1595
  rest: {
1624
- $value: '{base.color.red.5}',
1596
+ $value: '#c21c2c',
1625
1597
  $type: 'color',
1626
1598
  $extensions: {
1627
1599
  'org.primer.figma': {
@@ -1630,10 +1602,6 @@
1630
1602
  scopes: ['fgColor'],
1631
1603
  },
1632
1604
  },
1633
- mix: {
1634
- color: '{base.color.red.6}',
1635
- weight: 0.3,
1636
- },
1637
1605
  },
1638
1606
  hover: {
1639
1607
  $value: '{base.color.neutral.0}',
@@ -1676,7 +1644,7 @@
1676
1644
  },
1677
1645
  },
1678
1646
  hover: {
1679
- $value: '{reactionButton.selected.bgColor.rest}',
1647
+ $value: '#caecff',
1680
1648
  $type: 'color',
1681
1649
  $extensions: {
1682
1650
  'org.primer.figma': {
@@ -1685,10 +1653,6 @@
1685
1653
  scopes: ['bgColor'],
1686
1654
  },
1687
1655
  },
1688
- mix: {
1689
- color: '{base.color.blue.2}',
1690
- weight: 0.2,
1691
- },
1692
1656
  },
1693
1657
  },
1694
1658
  fgColor: {
@@ -182,7 +182,7 @@
182
182
  },
183
183
  },
184
184
  danger: {
185
- $value: '{base.color.red.5}',
185
+ $value: '#d1242f',
186
186
  $type: 'color',
187
187
  $extensions: {
188
188
  'org.primer.figma': {
@@ -194,10 +194,6 @@
194
194
  },
195
195
  },
196
196
  },
197
- mix: {
198
- color: '{base.color.red.4}',
199
- weight: 0.05,
200
- },
201
197
  },
202
198
  closed: {
203
199
  $value: '{fgColor.danger}',
@@ -442,7 +438,7 @@
442
438
  },
443
439
  },
444
440
  emphasis: {
445
- $value: '{base.color.green.4}',
441
+ $value: '#1f883d',
446
442
  $type: 'color',
447
443
  $extensions: {
448
444
  'org.primer.figma': {
@@ -454,10 +450,6 @@
454
450
  },
455
451
  },
456
452
  },
457
- mix: {
458
- color: '{base.color.green.5}',
459
- weight: 0.75,
460
- },
461
453
  },
462
454
  },
463
455
  open: {
@@ -0,0 +1,115 @@
1
+ {
2
+ boxShadow: {
3
+ thin: {
4
+ $value: 'inset 0 0 0 {borderWidth.thin}',
5
+ $description: 'Thin shadow for borders',
6
+ $type: 'string',
7
+ },
8
+ thick: {
9
+ $value: 'inset 0 0 0 {borderWidth.thick}',
10
+ $type: 'string',
11
+ },
12
+ thicker: {
13
+ $value: 'inset 0 0 0 {borderWidth.thicker}',
14
+ $type: 'string',
15
+ },
16
+ },
17
+ borderWidth: {
18
+ default: {
19
+ $value: '{borderWidth.thin}',
20
+ $type: 'dimension',
21
+ },
22
+ thin: {
23
+ $value: '1px',
24
+ $type: 'dimension',
25
+ },
26
+ thick: {
27
+ $value: '2px',
28
+ $type: 'dimension',
29
+ },
30
+ thicker: {
31
+ $value: '4px',
32
+ $type: 'dimension',
33
+ },
34
+ },
35
+ borderRadius: {
36
+ small: {
37
+ $value: '3px',
38
+ $type: 'dimension',
39
+ $extensions: {
40
+ 'org.primer.figma': {
41
+ collection: 'functional/size',
42
+ scopes: ['radius'],
43
+ codeSyntax: {
44
+ web: 'var(--borderRadius-small) /* utility class: .rounded-1 */',
45
+ },
46
+ },
47
+ },
48
+ },
49
+ medium: {
50
+ $value: '6px',
51
+ $type: 'dimension',
52
+ $extensions: {
53
+ 'org.primer.figma': {
54
+ collection: 'functional/size',
55
+ scopes: ['radius'],
56
+ codeSyntax: {
57
+ web: 'var(--borderRadius-medium) /* utility class: .rounded-2 */',
58
+ },
59
+ },
60
+ },
61
+ },
62
+ large: {
63
+ $value: '12px',
64
+ $type: 'dimension',
65
+ $extensions: {
66
+ 'org.primer.figma': {
67
+ collection: 'functional/size',
68
+ scopes: ['radius'],
69
+ codeSyntax: {
70
+ web: 'var(--borderRadius-large) /* utility class: .rounded-3 */',
71
+ },
72
+ },
73
+ },
74
+ },
75
+ full: {
76
+ $value: '9999px',
77
+ $type: 'dimension',
78
+ $description: 'Use this border radius for pill shaped elements',
79
+ $extensions: {
80
+ 'org.primer.figma': {
81
+ collection: 'functional/size',
82
+ scopes: ['radius'],
83
+ codeSyntax: {
84
+ web: 'var(--borderRadius-full) /* utility class: .circle */',
85
+ },
86
+ },
87
+ },
88
+ },
89
+ default: {
90
+ $value: '{borderRadius.medium}',
91
+ $type: 'dimension',
92
+ $extensions: {
93
+ 'org.primer.figma': {
94
+ collection: 'functional/size',
95
+ scopes: ['radius'],
96
+ codeSyntax: {
97
+ web: 'var(--borderRadius-default) /* utility class: .rounded-2 */',
98
+ },
99
+ },
100
+ },
101
+ },
102
+ },
103
+ outline: {
104
+ focus: {
105
+ offset: {
106
+ $value: '-2px',
107
+ $type: 'dimension',
108
+ },
109
+ width: {
110
+ $value: '2px',
111
+ $type: 'dimension',
112
+ },
113
+ },
114
+ },
115
+ }