@primer/primitives 8.2.4-rc.d955f312 → 8.2.4-rc.ea4beb50

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 (74) hide show
  1. package/README.md +17 -18
  2. package/dist/css/functional/size/border.css +1 -0
  3. package/dist/css/functional/themes/dark-colorblind.css +18 -12
  4. package/dist/css/functional/themes/dark-dimmed.css +20 -14
  5. package/dist/css/functional/themes/dark-high-contrast.css +258 -252
  6. package/dist/css/functional/themes/dark-tritanopia.css +20 -14
  7. package/dist/css/functional/themes/dark.css +20 -14
  8. package/dist/css/functional/themes/light-colorblind.css +30 -24
  9. package/dist/css/functional/themes/light-high-contrast.css +154 -148
  10. package/dist/css/functional/themes/light-tritanopia.css +30 -24
  11. package/dist/css/functional/themes/light.css +18 -12
  12. package/dist/css/primitives.css +1 -0
  13. package/dist/docs/functional/size/border.json +31 -0
  14. package/dist/docs/functional/themes/dark-colorblind.json +236 -149
  15. package/dist/docs/functional/themes/dark-dimmed.json +247 -158
  16. package/dist/docs/functional/themes/dark-high-contrast.json +555 -458
  17. package/dist/docs/functional/themes/dark-tritanopia.json +240 -153
  18. package/dist/docs/functional/themes/dark.json +247 -158
  19. package/dist/docs/functional/themes/light-colorblind.json +254 -173
  20. package/dist/docs/functional/themes/light-high-contrast.json +452 -361
  21. package/dist/docs/functional/themes/light-tritanopia.json +252 -171
  22. package/dist/docs/functional/themes/light.json +246 -157
  23. package/dist/fallbacks/functional/size/border.json +1 -0
  24. package/dist/figma/dimension/dimension.json +14 -0
  25. package/dist/figma/themes/dark-colorblind.json +246 -198
  26. package/dist/figma/themes/dark-dimmed.json +249 -200
  27. package/dist/figma/themes/dark-high-contrast.json +675 -625
  28. package/dist/figma/themes/dark-tritanopia.json +248 -200
  29. package/dist/figma/themes/dark.json +249 -200
  30. package/dist/figma/themes/light-colorblind.json +265 -218
  31. package/dist/figma/themes/light-high-contrast.json +457 -407
  32. package/dist/figma/themes/light-tritanopia.json +264 -217
  33. package/dist/figma/themes/light.json +187 -138
  34. package/dist/internalCss/dark-colorblind.css +18 -12
  35. package/dist/internalCss/dark-dimmed.css +20 -14
  36. package/dist/internalCss/dark-high-contrast.css +258 -252
  37. package/dist/internalCss/dark-tritanopia.css +20 -14
  38. package/dist/internalCss/dark.css +20 -14
  39. package/dist/internalCss/light-colorblind.css +30 -24
  40. package/dist/internalCss/light-high-contrast.css +154 -148
  41. package/dist/internalCss/light-tritanopia.css +30 -24
  42. package/dist/internalCss/light.css +18 -12
  43. package/dist/styleLint/functional/size/border.json +31 -0
  44. package/dist/styleLint/functional/themes/dark-colorblind.json +236 -149
  45. package/dist/styleLint/functional/themes/dark-dimmed.json +247 -158
  46. package/dist/styleLint/functional/themes/dark-high-contrast.json +555 -458
  47. package/dist/styleLint/functional/themes/dark-tritanopia.json +240 -153
  48. package/dist/styleLint/functional/themes/dark.json +247 -158
  49. package/dist/styleLint/functional/themes/light-colorblind.json +254 -173
  50. package/dist/styleLint/functional/themes/light-high-contrast.json +452 -361
  51. package/dist/styleLint/functional/themes/light-tritanopia.json +252 -171
  52. package/dist/styleLint/functional/themes/light.json +246 -157
  53. package/package.json +38 -35
  54. package/src/formats/cssAdvanced.ts +3 -3
  55. package/src/formats/cssCustomMedia.ts +2 -2
  56. package/src/formats/javascriptCommonJs.ts +2 -2
  57. package/src/formats/javascriptEsm.ts +2 -2
  58. package/src/formats/jsonFigma.ts +2 -2
  59. package/src/formats/jsonNestedPrefixed.ts +2 -2
  60. package/src/formats/jsonOneDimensional.ts +2 -2
  61. package/src/formats/jsonPostCssFallback.ts +2 -2
  62. package/src/formats/typescriptExportDefinition.ts +2 -2
  63. package/src/schemas/designToken.ts +1 -1
  64. package/src/schemas/validTokenType.ts +1 -1
  65. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +528 -2
  66. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +4 -0
  67. package/src/tokens/functional/color/dark/patterns-dark.json5 +26 -0
  68. package/src/tokens/functional/color/dark/primitives-dark.json5 +78 -65
  69. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +400 -0
  70. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +3 -6
  71. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +3 -6
  72. package/src/tokens/functional/color/light/patterns-light.json5 +26 -0
  73. package/src/tokens/functional/color/light/primitives-light.json5 +77 -64
  74. package/src/tokens/functional/size/border.json +13 -0
package/README.md CHANGED
@@ -27,7 +27,7 @@ Data is served from the `dist/` folder:
27
27
 
28
28
  All available imports:
29
29
 
30
- ```
30
+ ```css
31
31
  /* size/typography */
32
32
  @import '@primer/primitives/dist/css/base/size/size.css';
33
33
  @import '@primer/primitives/dist/css/base/typography/typography.css';
@@ -70,13 +70,13 @@ In the individual files, e.g. `light.high-contrast.json5` you can now add tokens
70
70
  You can create color tokens that inherit a color but have a different alpha value by adding the `alpha` property.
71
71
  **Note:** The original alpha value will be replaced by your value. If you add `alpha: 0.4` to a color, it doesn't matter if the color you reference has no `alpha` or `alpha: 0.7`, the new token will always have newly the defined value of `alpha: 0.4`.
72
72
 
73
- ```js
73
+ ```json5
74
74
  {
75
75
  muted: {
76
76
  $value: '{base.color.blue.3}',
77
77
  alpha: 0.4, // the opacity value of the color === 40% opaque
78
78
  $type: 'color',
79
- }
79
+ },
80
80
  }
81
81
  ```
82
82
 
@@ -88,17 +88,17 @@ The `mix` proeprty mixes the color it gets into the main color from the `$value`
88
88
 
89
89
  A `mix` proprty must always have a `color` and a `weight` child. `color` can be a `hex` value or a reference to a valid color. The `weight` property must receive a value between `0.0` and `1`.
90
90
 
91
- ```js
91
+ ```json5
92
92
  {
93
93
  control: {
94
- $value: '{base.color.gray.4}', // main color
95
- $type: 'color',
96
- mix: {
97
- color: '{base.color.gray.5}', // color to mix into the main color
98
- weight: 0.2, // amount of the mix color that is added === 20% of gray.5 is mix into gray.4
94
+ $value: '{base.color.gray.4}', // main color
95
+ $type: 'color',
96
+ mix: {
97
+ color: '{base.color.gray.5}', // color to mix into the main color
98
+ weight: 0.2, // amount of the mix color that is added === 20% of gray.5 is mix into gray.4
99
+ },
99
100
  },
100
101
  }
101
- }
102
102
  ```
103
103
 
104
104
  #### Extensions property
@@ -113,7 +113,7 @@ For our Figma export we use the following meta data:
113
113
 
114
114
  Code example
115
115
 
116
- ```js
116
+ ```json5
117
117
  bgColor: {
118
118
  $value: '{borderColor.accent.muted}',
119
119
  $type: 'color',
@@ -133,18 +133,18 @@ Token names have to be in camelCase or kebab-case and may only include letters,
133
133
  The only acception is the `@`-hack. This is used when you want to have a default value and sub-values, e.g. `bgColor.accent` and `bgColor.accent.muted`.
134
134
  In this case you can create the follwing structure. The `@` will be removed from the name and act as the default value.
135
135
 
136
- ```js
136
+ ```json5
137
137
  {
138
138
  bgColor: {
139
139
  accent: {
140
- "@": {
140
+ '@': {
141
141
  // values for accent (default)
142
142
  },
143
- "muted": {
143
+ muted: {
144
144
  // values for accent-muted
145
- }
146
- }
147
- }
145
+ },
146
+ },
147
+ },
148
148
  }
149
149
  ```
150
150
 
@@ -155,4 +155,3 @@ In this case you can create the follwing structure. The `@` will be removed from
155
155
  [primer]: https://github.com/primer/primer
156
156
  [npm]: https://www.npmjs.com/
157
157
  [install-npm]: https://docs.npmjs.com/getting-started/installing-node
158
- [scss]: https://sass-lang.com/
@@ -9,6 +9,7 @@
9
9
  --borderRadius-medium: 0.375rem;
10
10
  --borderRadius-large: 0.75rem;
11
11
  --borderRadius-full: 624.9375rem;
12
+ --borderRadius-default: 0.375rem;
12
13
  --outline-focus-offset: -0.125rem;
13
14
  --outline-focus-width: 0.125rem;
14
15
  }
@@ -428,20 +428,23 @@
428
428
  --label-coral-fgColor-rest: #f7794b;
429
429
  --label-coral-fgColor-hover: #fa8c61;
430
430
  --label-coral-fgColor-active: #fdaa86;
431
+ --tooltip-bgColor: #6e7681;
432
+ --tooltip-fgColor: #ffffff;
431
433
  --fgColor-default: #e6edf3;
432
434
  --fgColor-muted: #8d96a0;
433
435
  --fgColor-onEmphasis: #ffffff;
436
+ --fgColor-onInverse: #010409;
434
437
  --fgColor-white: #ffffff;
435
438
  --fgColor-black: #010409;
436
439
  --fgColor-disabled: #6e7681;
437
440
  --fgColor-link: #4493f8;
438
- --fgColor-neutral: #6e7681;
441
+ --fgColor-neutral: #b1bac4;
439
442
  --fgColor-accent: #4493f8;
440
443
  --fgColor-success: #58a6ff;
444
+ --fgColor-open: #f0883e;
441
445
  --fgColor-attention: #d29922;
442
446
  --fgColor-severe: #db6d28;
443
447
  --fgColor-danger: #db6d28;
444
- --fgColor-open: #f0883e;
445
448
  --fgColor-closed: #8b949e;
446
449
  --fgColor-done: #ab7df8;
447
450
  --fgColor-upsell: #ab7df8;
@@ -461,14 +464,14 @@
461
464
  --bgColor-accent-emphasis: #1f6feb;
462
465
  --bgColor-success-muted: #388bfd26;
463
466
  --bgColor-success-emphasis: #1f6feb;
467
+ --bgColor-open-muted: #db6d2866;
468
+ --bgColor-open-emphasis: #bd561d;
464
469
  --bgColor-attention-muted: #bb800926;
465
470
  --bgColor-attention-emphasis: #9e6a03;
466
471
  --bgColor-severe-muted: #db6d281a;
467
472
  --bgColor-severe-emphasis: #bd561d;
468
473
  --bgColor-danger-muted: #db6d281a;
469
474
  --bgColor-danger-emphasis: #bd561d;
470
- --bgColor-open-muted: #db6d2866;
471
- --bgColor-open-emphasis: #bd561d;
472
475
  --bgColor-closed-muted: #6e768166;
473
476
  --bgColor-closed-emphasis: #6e7681;
474
477
  --bgColor-done-muted: #ab7df826;
@@ -489,14 +492,14 @@
489
492
  --borderColor-accent-emphasis: #1f6feb;
490
493
  --borderColor-success-muted: #388bfd66;
491
494
  --borderColor-success-emphasis: #1f6feb;
495
+ --borderColor-open-muted: #db6d2866;
496
+ --borderColor-open-emphasis: #db6d28;
492
497
  --borderColor-attention-muted: #bb800966;
493
498
  --borderColor-attention-emphasis: #9e6a03;
494
499
  --borderColor-severe-muted: #db6d2866;
495
500
  --borderColor-severe-emphasis: #bd561d;
496
501
  --borderColor-danger-muted: #db6d2866;
497
502
  --borderColor-danger-emphasis: #bd561d;
498
- --borderColor-open-muted: #db6d2866;
499
- --borderColor-open-emphasis: #db6d28;
500
503
  --borderColor-closed-muted: #6e768166;
501
504
  --borderColor-closed-emphasis: #6e7681;
502
505
  --borderColor-done-muted: #ab7df866;
@@ -992,20 +995,23 @@
992
995
  --label-coral-fgColor-rest: #f7794b;
993
996
  --label-coral-fgColor-hover: #fa8c61;
994
997
  --label-coral-fgColor-active: #fdaa86;
998
+ --tooltip-bgColor: #6e7681;
999
+ --tooltip-fgColor: #ffffff;
995
1000
  --fgColor-default: #e6edf3;
996
1001
  --fgColor-muted: #8d96a0;
997
1002
  --fgColor-onEmphasis: #ffffff;
1003
+ --fgColor-onInverse: #010409;
998
1004
  --fgColor-white: #ffffff;
999
1005
  --fgColor-black: #010409;
1000
1006
  --fgColor-disabled: #6e7681;
1001
1007
  --fgColor-link: #4493f8;
1002
- --fgColor-neutral: #6e7681;
1008
+ --fgColor-neutral: #b1bac4;
1003
1009
  --fgColor-accent: #4493f8;
1004
1010
  --fgColor-success: #58a6ff;
1011
+ --fgColor-open: #f0883e;
1005
1012
  --fgColor-attention: #d29922;
1006
1013
  --fgColor-severe: #db6d28;
1007
1014
  --fgColor-danger: #db6d28;
1008
- --fgColor-open: #f0883e;
1009
1015
  --fgColor-closed: #8b949e;
1010
1016
  --fgColor-done: #ab7df8;
1011
1017
  --fgColor-upsell: #ab7df8;
@@ -1025,14 +1031,14 @@
1025
1031
  --bgColor-accent-emphasis: #1f6feb;
1026
1032
  --bgColor-success-muted: #388bfd26;
1027
1033
  --bgColor-success-emphasis: #1f6feb;
1034
+ --bgColor-open-muted: #db6d2866;
1035
+ --bgColor-open-emphasis: #bd561d;
1028
1036
  --bgColor-attention-muted: #bb800926;
1029
1037
  --bgColor-attention-emphasis: #9e6a03;
1030
1038
  --bgColor-severe-muted: #db6d281a;
1031
1039
  --bgColor-severe-emphasis: #bd561d;
1032
1040
  --bgColor-danger-muted: #db6d281a;
1033
1041
  --bgColor-danger-emphasis: #bd561d;
1034
- --bgColor-open-muted: #db6d2866;
1035
- --bgColor-open-emphasis: #bd561d;
1036
1042
  --bgColor-closed-muted: #6e768166;
1037
1043
  --bgColor-closed-emphasis: #6e7681;
1038
1044
  --bgColor-done-muted: #ab7df826;
@@ -1053,14 +1059,14 @@
1053
1059
  --borderColor-accent-emphasis: #1f6feb;
1054
1060
  --borderColor-success-muted: #388bfd66;
1055
1061
  --borderColor-success-emphasis: #1f6feb;
1062
+ --borderColor-open-muted: #db6d2866;
1063
+ --borderColor-open-emphasis: #db6d28;
1056
1064
  --borderColor-attention-muted: #bb800966;
1057
1065
  --borderColor-attention-emphasis: #9e6a03;
1058
1066
  --borderColor-severe-muted: #db6d2866;
1059
1067
  --borderColor-severe-emphasis: #bd561d;
1060
1068
  --borderColor-danger-muted: #db6d2866;
1061
1069
  --borderColor-danger-emphasis: #bd561d;
1062
- --borderColor-open-muted: #db6d2866;
1063
- --borderColor-open-emphasis: #db6d28;
1064
1070
  --borderColor-closed-muted: #6e768166;
1065
1071
  --borderColor-closed-emphasis: #6e7681;
1066
1072
  --borderColor-done-muted: #ab7df866;
@@ -428,20 +428,23 @@
428
428
  --label-coral-fgColor-rest: #f7794b;
429
429
  --label-coral-fgColor-hover: #fa8c61;
430
430
  --label-coral-fgColor-active: #fdaa86;
431
+ --tooltip-bgColor: #636e7b;
432
+ --tooltip-fgColor: #cdd9e5;
431
433
  --fgColor-default: #c5d1de;
432
434
  --fgColor-muted: #778491;
433
435
  --fgColor-onEmphasis: #cdd9e5;
436
+ --fgColor-onInverse: #1c2128;
434
437
  --fgColor-white: #cdd9e5;
435
438
  --fgColor-black: #1c2128;
436
439
  --fgColor-disabled: #636e7b;
437
440
  --fgColor-link: #478be6;
438
- --fgColor-neutral: #636e7b;
441
+ --fgColor-neutral: #909dab;
439
442
  --fgColor-accent: #478be6;
440
443
  --fgColor-success: #57ab5a;
444
+ --fgColor-open: #57ab5a;
441
445
  --fgColor-attention: #c69026;
442
446
  --fgColor-severe: #cc6b2c;
443
447
  --fgColor-danger: #e5534b;
444
- --fgColor-open: #57ab5a;
445
448
  --fgColor-closed: #e5534b;
446
449
  --fgColor-done: #986ee2;
447
450
  --fgColor-upsell: #986ee2;
@@ -461,15 +464,15 @@
461
464
  --bgColor-accent-emphasis: #316dca;
462
465
  --bgColor-success-muted: #46954a26;
463
466
  --bgColor-success-emphasis: #347d39;
467
+ --bgColor-open-muted: #46954a26;
468
+ --bgColor-open-emphasis: #347d39;
464
469
  --bgColor-attention-muted: #ae7c1426;
465
470
  --bgColor-attention-emphasis: #966600;
466
471
  --bgColor-severe-muted: #cc6b2c1a;
467
472
  --bgColor-severe-emphasis: #ae5622;
468
473
  --bgColor-danger-muted: #e5534b1a;
469
474
  --bgColor-danger-emphasis: #c93c37;
470
- --bgColor-open-muted: #46954a1a;
471
- --bgColor-open-emphasis: #347d39;
472
- --bgColor-closed-muted: #e5534b26;
475
+ --bgColor-closed-muted: #e5534b1a;
473
476
  --bgColor-closed-emphasis: #c93c37;
474
477
  --bgColor-done-muted: #986ee226;
475
478
  --bgColor-done-emphasis: #8256d0;
@@ -489,14 +492,14 @@
489
492
  --borderColor-accent-emphasis: #316dca;
490
493
  --borderColor-success-muted: #46954a66;
491
494
  --borderColor-success-emphasis: #347d39;
495
+ --borderColor-open-muted: #46954a66;
496
+ --borderColor-open-emphasis: #347d39;
492
497
  --borderColor-attention-muted: #ae7c1466;
493
498
  --borderColor-attention-emphasis: #966600;
494
499
  --borderColor-severe-muted: #cc6b2c66;
495
500
  --borderColor-severe-emphasis: #ae5622;
496
501
  --borderColor-danger-muted: #e5534b66;
497
502
  --borderColor-danger-emphasis: #c93c37;
498
- --borderColor-open-muted: #46954a66;
499
- --borderColor-open-emphasis: #347d39;
500
503
  --borderColor-closed-muted: #e5534b66;
501
504
  --borderColor-closed-emphasis: #c93c37;
502
505
  --borderColor-done-muted: #986ee266;
@@ -992,20 +995,23 @@
992
995
  --label-coral-fgColor-rest: #f7794b;
993
996
  --label-coral-fgColor-hover: #fa8c61;
994
997
  --label-coral-fgColor-active: #fdaa86;
998
+ --tooltip-bgColor: #636e7b;
999
+ --tooltip-fgColor: #cdd9e5;
995
1000
  --fgColor-default: #c5d1de;
996
1001
  --fgColor-muted: #778491;
997
1002
  --fgColor-onEmphasis: #cdd9e5;
1003
+ --fgColor-onInverse: #1c2128;
998
1004
  --fgColor-white: #cdd9e5;
999
1005
  --fgColor-black: #1c2128;
1000
1006
  --fgColor-disabled: #636e7b;
1001
1007
  --fgColor-link: #478be6;
1002
- --fgColor-neutral: #636e7b;
1008
+ --fgColor-neutral: #909dab;
1003
1009
  --fgColor-accent: #478be6;
1004
1010
  --fgColor-success: #57ab5a;
1011
+ --fgColor-open: #57ab5a;
1005
1012
  --fgColor-attention: #c69026;
1006
1013
  --fgColor-severe: #cc6b2c;
1007
1014
  --fgColor-danger: #e5534b;
1008
- --fgColor-open: #57ab5a;
1009
1015
  --fgColor-closed: #e5534b;
1010
1016
  --fgColor-done: #986ee2;
1011
1017
  --fgColor-upsell: #986ee2;
@@ -1025,15 +1031,15 @@
1025
1031
  --bgColor-accent-emphasis: #316dca;
1026
1032
  --bgColor-success-muted: #46954a26;
1027
1033
  --bgColor-success-emphasis: #347d39;
1034
+ --bgColor-open-muted: #46954a26;
1035
+ --bgColor-open-emphasis: #347d39;
1028
1036
  --bgColor-attention-muted: #ae7c1426;
1029
1037
  --bgColor-attention-emphasis: #966600;
1030
1038
  --bgColor-severe-muted: #cc6b2c1a;
1031
1039
  --bgColor-severe-emphasis: #ae5622;
1032
1040
  --bgColor-danger-muted: #e5534b1a;
1033
1041
  --bgColor-danger-emphasis: #c93c37;
1034
- --bgColor-open-muted: #46954a1a;
1035
- --bgColor-open-emphasis: #347d39;
1036
- --bgColor-closed-muted: #e5534b26;
1042
+ --bgColor-closed-muted: #e5534b1a;
1037
1043
  --bgColor-closed-emphasis: #c93c37;
1038
1044
  --bgColor-done-muted: #986ee226;
1039
1045
  --bgColor-done-emphasis: #8256d0;
@@ -1053,14 +1059,14 @@
1053
1059
  --borderColor-accent-emphasis: #316dca;
1054
1060
  --borderColor-success-muted: #46954a66;
1055
1061
  --borderColor-success-emphasis: #347d39;
1062
+ --borderColor-open-muted: #46954a66;
1063
+ --borderColor-open-emphasis: #347d39;
1056
1064
  --borderColor-attention-muted: #ae7c1466;
1057
1065
  --borderColor-attention-emphasis: #966600;
1058
1066
  --borderColor-severe-muted: #cc6b2c66;
1059
1067
  --borderColor-severe-emphasis: #ae5622;
1060
1068
  --borderColor-danger-muted: #e5534b66;
1061
1069
  --borderColor-danger-emphasis: #c93c37;
1062
- --borderColor-open-muted: #46954a66;
1063
- --borderColor-open-emphasis: #347d39;
1064
1070
  --borderColor-closed-muted: #e5534b66;
1065
1071
  --borderColor-closed-emphasis: #c93c37;
1066
1072
  --borderColor-done-muted: #986ee266;