@primer/primitives 7.12.0-rc.fd97c40 → 7.12.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 (91) hide show
  1. package/README.md +21 -0
  2. package/package.json +1 -1
  3. package/tokens-next-private/css/functional/size/size.css +6 -0
  4. package/tokens-next-private/css/functional/themes/dark-colorblind.css +2 -0
  5. package/tokens-next-private/css/functional/themes/dark-dimmed.css +2 -0
  6. package/tokens-next-private/css/functional/themes/dark-high-contrast.css +2 -0
  7. package/tokens-next-private/css/functional/themes/dark-tritanopia.css +2 -0
  8. package/tokens-next-private/css/functional/themes/dark.css +2 -0
  9. package/tokens-next-private/css/functional/themes/light-colorblind.css +2 -0
  10. package/tokens-next-private/css/functional/themes/light-high-contrast.css +2 -0
  11. package/tokens-next-private/css/functional/themes/light-tritanopia.css +2 -0
  12. package/tokens-next-private/css/functional/themes/light.css +2 -0
  13. package/tokens-next-private/docs/functional/size/size.json +298 -88
  14. package/tokens-next-private/docs/functional/themes/dark-colorblind.json +28 -1
  15. package/tokens-next-private/docs/functional/themes/dark-dimmed.json +28 -1
  16. package/tokens-next-private/docs/functional/themes/dark-high-contrast.json +28 -1
  17. package/tokens-next-private/docs/functional/themes/dark-tritanopia.json +28 -1
  18. package/tokens-next-private/docs/functional/themes/dark.json +28 -1
  19. package/tokens-next-private/docs/functional/themes/light-colorblind.json +27 -0
  20. package/tokens-next-private/docs/functional/themes/light-high-contrast.json +27 -0
  21. package/tokens-next-private/docs/functional/themes/light-tritanopia.json +27 -0
  22. package/tokens-next-private/docs/functional/themes/light.json +27 -0
  23. package/tokens-next-private/fallbacks/color-fallbacks.json +12 -11
  24. package/tokens-next-private/fallbacks/functional/size/size.json +6 -0
  25. package/tokens-next-private/figma/dimension/dimension.json +188 -84
  26. package/tokens-next-private/figma/figma.json +3 -0
  27. package/tokens-next-private/figma/themes/dark.json +109 -94
  28. package/tokens-next-private/figma/themes/light.json +114 -99
  29. package/tokens-next-private/scss/functional/size/size.scss +6 -0
  30. package/tokens-next-private/scss/functional/themes/dark-colorblind.scss +1 -0
  31. package/tokens-next-private/scss/functional/themes/dark-dimmed.scss +1 -0
  32. package/tokens-next-private/scss/functional/themes/dark-high-contrast.scss +1 -0
  33. package/tokens-next-private/scss/functional/themes/dark-tritanopia.scss +1 -0
  34. package/tokens-next-private/scss/functional/themes/dark.scss +1 -0
  35. package/tokens-next-private/scss/functional/themes/light-colorblind.scss +1 -0
  36. package/tokens-next-private/scss/functional/themes/light-high-contrast.scss +1 -0
  37. package/tokens-next-private/scss/functional/themes/light-tritanopia.scss +1 -0
  38. package/tokens-next-private/scss/functional/themes/light.scss +1 -0
  39. package/tokens-v2-private/css/tokens/base/size/size.css +1 -1
  40. package/tokens-v2-private/css/tokens/base/typography/typography.css +1 -1
  41. package/tokens-v2-private/css/tokens/functional/size/border.css +1 -1
  42. package/tokens-v2-private/css/tokens/functional/size/breakpoints.css +1 -1
  43. package/tokens-v2-private/css/tokens/functional/size/size-coarse.css +1 -1
  44. package/tokens-v2-private/css/tokens/functional/size/size-fine.css +1 -1
  45. package/tokens-v2-private/css/tokens/functional/size/size.css +1 -1
  46. package/tokens-v2-private/css/tokens/functional/typography/typography.css +1 -1
  47. package/tokens-v2-private/js/module/tokens/base/size/size.js +1 -1
  48. package/tokens-v2-private/js/module/tokens/base/typography/typography.js +1 -1
  49. package/tokens-v2-private/js/module/tokens/functional/size/border.js +1 -1
  50. package/tokens-v2-private/js/module/tokens/functional/size/breakpoints.js +1 -1
  51. package/tokens-v2-private/js/module/tokens/functional/size/size-coarse.js +1 -1
  52. package/tokens-v2-private/js/module/tokens/functional/size/size-fine.js +1 -1
  53. package/tokens-v2-private/js/module/tokens/functional/size/size.js +1 -1
  54. package/tokens-v2-private/js/module/tokens/functional/size/viewport.js +1 -1
  55. package/tokens-v2-private/js/module/tokens/functional/typography/typography.js +1 -1
  56. package/tokens-v2-private/js/tokens/base/size/size.js +1 -1
  57. package/tokens-v2-private/js/tokens/base/typography/typography.js +1 -1
  58. package/tokens-v2-private/js/tokens/functional/size/border.js +1 -1
  59. package/tokens-v2-private/js/tokens/functional/size/breakpoints.js +1 -1
  60. package/tokens-v2-private/js/tokens/functional/size/size-coarse.js +1 -1
  61. package/tokens-v2-private/js/tokens/functional/size/size-fine.js +1 -1
  62. package/tokens-v2-private/js/tokens/functional/size/size.js +1 -1
  63. package/tokens-v2-private/js/tokens/functional/size/viewport.js +1 -1
  64. package/tokens-v2-private/js/tokens/functional/typography/typography.js +1 -1
  65. package/tokens-v2-private/scss/tokens/base/size/size.scss +1 -1
  66. package/tokens-v2-private/scss/tokens/base/typography/typography.scss +1 -1
  67. package/tokens-v2-private/scss/tokens/functional/size/border.scss +1 -1
  68. package/tokens-v2-private/scss/tokens/functional/size/breakpoints.scss +1 -1
  69. package/tokens-v2-private/scss/tokens/functional/size/size-coarse.scss +1 -1
  70. package/tokens-v2-private/scss/tokens/functional/size/size-fine.scss +1 -1
  71. package/tokens-v2-private/scss/tokens/functional/size/size.scss +1 -1
  72. package/tokens-v2-private/scss/tokens/functional/size/viewport.scss +1 -1
  73. package/tokens-v2-private/scss/tokens/functional/typography/typography.scss +1 -1
  74. package/tokens-v2-private/ts/tokens/base/size/size.d.ts +1 -1
  75. package/tokens-v2-private/ts/tokens/base/size/size.js +1 -1
  76. package/tokens-v2-private/ts/tokens/base/typography/typography.d.ts +1 -1
  77. package/tokens-v2-private/ts/tokens/base/typography/typography.js +1 -1
  78. package/tokens-v2-private/ts/tokens/functional/size/border.d.ts +1 -1
  79. package/tokens-v2-private/ts/tokens/functional/size/border.js +1 -1
  80. package/tokens-v2-private/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  81. package/tokens-v2-private/ts/tokens/functional/size/breakpoints.js +1 -1
  82. package/tokens-v2-private/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  83. package/tokens-v2-private/ts/tokens/functional/size/size-coarse.js +1 -1
  84. package/tokens-v2-private/ts/tokens/functional/size/size-fine.d.ts +1 -1
  85. package/tokens-v2-private/ts/tokens/functional/size/size-fine.js +1 -1
  86. package/tokens-v2-private/ts/tokens/functional/size/size.d.ts +1 -1
  87. package/tokens-v2-private/ts/tokens/functional/size/size.js +1 -1
  88. package/tokens-v2-private/ts/tokens/functional/size/viewport.d.ts +1 -1
  89. package/tokens-v2-private/ts/tokens/functional/size/viewport.js +1 -1
  90. package/tokens-v2-private/ts/tokens/functional/typography/typography.d.ts +1 -1
  91. package/tokens-v2-private/ts/tokens/functional/typography/typography.js +1 -1
package/README.md CHANGED
@@ -194,6 +194,27 @@ Code example
194
194
  }
195
195
  ```
196
196
 
197
+ #### Token names and @-hack
198
+
199
+ Token names have to be in camelCase or kebab-case and may only include letters, numbers and `-`. This is enforced by the token validation (`npm run lint:tokens`).
200
+ 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`.
201
+ In this case you can create the follwing structure. The `@` will be removed from the name and act as the default value.
202
+
203
+ ```js
204
+ {
205
+ bgColor: {
206
+ accent: {
207
+ "@": {
208
+ // default values
209
+ },
210
+ "muted": {
211
+ // values for accent-muted
212
+ }
213
+ }
214
+ }
215
+ }
216
+ ```
217
+
197
218
  ## License
198
219
 
199
220
  [MIT](./LICENSE) © [GitHub](https://github.com/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/primitives",
3
- "version": "7.12.0-rc.fd97c40",
3
+ "version": "7.12.0",
4
4
  "description": "Typography, spacing, and color primitives for Primer design system",
5
5
  "files": [
6
6
  "dist",
@@ -40,6 +40,12 @@
40
40
  --controlStack-large-gap-auto: 0.5rem;
41
41
  --controlStack-large-gap-condensed: 0.5rem;
42
42
  --controlStack-large-gap-spacious: 0.75rem;
43
+ --space-xxsmall: 0.125rem;
44
+ --space-xsmall: 0.25rem;
45
+ --space-small: 0.375rem;
46
+ --space-medium: 0.5rem;
47
+ --space-large: 0.75rem;
48
+ --space-xlarge: 1rem;
43
49
  --stack-padding-condensed: 0.5rem;
44
50
  --stack-padding-normal: 1rem;
45
51
  --stack-padding-spacious: 1.5rem;
@@ -200,6 +200,7 @@
200
200
  --fgColor-sponsors: #db61a2;
201
201
  --bgColor-default: #0d1117;
202
202
  --bgColor-muted: #161b22;
203
+ --bgColor-inset: #010409;
203
204
  --bgColor-emphasis: #6e7681;
204
205
  --bgColor-disabled: #161b22;
205
206
  --bgColor-transparent: #00000000;
@@ -601,6 +602,7 @@
601
602
  --fgColor-sponsors: #db61a2;
602
603
  --bgColor-default: #0d1117;
603
604
  --bgColor-muted: #161b22;
605
+ --bgColor-inset: #010409;
604
606
  --bgColor-emphasis: #6e7681;
605
607
  --bgColor-disabled: #161b22;
606
608
  --bgColor-transparent: #00000000;
@@ -200,6 +200,7 @@
200
200
  --fgColor-sponsors: #c96198;
201
201
  --bgColor-default: #22272e;
202
202
  --bgColor-muted: #2d333b;
203
+ --bgColor-inset: #1c2128;
203
204
  --bgColor-emphasis: #636e7b;
204
205
  --bgColor-disabled: #2d333b;
205
206
  --bgColor-transparent: #00000000;
@@ -601,6 +602,7 @@
601
602
  --fgColor-sponsors: #c96198;
602
603
  --bgColor-default: #22272e;
603
604
  --bgColor-muted: #2d333b;
605
+ --bgColor-inset: #1c2128;
604
606
  --bgColor-emphasis: #636e7b;
605
607
  --bgColor-disabled: #2d333b;
606
608
  --bgColor-transparent: #00000000;
@@ -200,6 +200,7 @@
200
200
  --fgColor-sponsors: #ef6eb1;
201
201
  --bgColor-default: #0a0c10;
202
202
  --bgColor-muted: #272b33;
203
+ --bgColor-inset: #010409;
203
204
  --bgColor-emphasis: #ffffff;
204
205
  --bgColor-disabled: #272b33;
205
206
  --bgColor-transparent: #00000000;
@@ -601,6 +602,7 @@
601
602
  --fgColor-sponsors: #ef6eb1;
602
603
  --bgColor-default: #0a0c10;
603
604
  --bgColor-muted: #272b33;
605
+ --bgColor-inset: #010409;
604
606
  --bgColor-emphasis: #ffffff;
605
607
  --bgColor-disabled: #272b33;
606
608
  --bgColor-transparent: #00000000;
@@ -200,6 +200,7 @@
200
200
  --fgColor-sponsors: #db61a2;
201
201
  --bgColor-default: #0d1117;
202
202
  --bgColor-muted: #161b22;
203
+ --bgColor-inset: #010409;
203
204
  --bgColor-emphasis: #6e7681;
204
205
  --bgColor-disabled: #161b22;
205
206
  --bgColor-transparent: #00000000;
@@ -601,6 +602,7 @@
601
602
  --fgColor-sponsors: #db61a2;
602
603
  --bgColor-default: #0d1117;
603
604
  --bgColor-muted: #161b22;
605
+ --bgColor-inset: #010409;
604
606
  --bgColor-emphasis: #6e7681;
605
607
  --bgColor-disabled: #161b22;
606
608
  --bgColor-transparent: #00000000;
@@ -200,6 +200,7 @@
200
200
  --fgColor-sponsors: #db61a2;
201
201
  --bgColor-default: #0d1117;
202
202
  --bgColor-muted: #161b22;
203
+ --bgColor-inset: #010409;
203
204
  --bgColor-emphasis: #6e7681;
204
205
  --bgColor-disabled: #161b22;
205
206
  --bgColor-transparent: #00000000;
@@ -601,6 +602,7 @@
601
602
  --fgColor-sponsors: #db61a2;
602
603
  --bgColor-default: #0d1117;
603
604
  --bgColor-muted: #161b22;
605
+ --bgColor-inset: #010409;
604
606
  --bgColor-emphasis: #6e7681;
605
607
  --bgColor-disabled: #161b22;
606
608
  --bgColor-transparent: #00000000;
@@ -201,6 +201,7 @@
201
201
  --fgColor-sponsors: #bf3989;
202
202
  --bgColor-default: #ffffff;
203
203
  --bgColor-muted: #f6f8fa;
204
+ --bgColor-inset: #f6f8fa;
204
205
  --bgColor-emphasis: #24292f;
205
206
  --bgColor-disabled: #f6f8fa;
206
207
  --bgColor-transparent: #ffffff00;
@@ -602,6 +603,7 @@
602
603
  --fgColor-sponsors: #bf3989;
603
604
  --bgColor-default: #ffffff;
604
605
  --bgColor-muted: #f6f8fa;
606
+ --bgColor-inset: #f6f8fa;
605
607
  --bgColor-emphasis: #24292f;
606
608
  --bgColor-disabled: #f6f8fa;
607
609
  --bgColor-transparent: #ffffff00;
@@ -201,6 +201,7 @@
201
201
  --fgColor-sponsors: #971368;
202
202
  --bgColor-default: #ffffff;
203
203
  --bgColor-muted: #e7ecf0;
204
+ --bgColor-inset: #ffffff;
204
205
  --bgColor-emphasis: #0e1116;
205
206
  --bgColor-disabled: #e7ecf0;
206
207
  --bgColor-transparent: #ffffff00;
@@ -602,6 +603,7 @@
602
603
  --fgColor-sponsors: #971368;
603
604
  --bgColor-default: #ffffff;
604
605
  --bgColor-muted: #e7ecf0;
606
+ --bgColor-inset: #ffffff;
605
607
  --bgColor-emphasis: #0e1116;
606
608
  --bgColor-disabled: #e7ecf0;
607
609
  --bgColor-transparent: #ffffff00;
@@ -201,6 +201,7 @@
201
201
  --fgColor-sponsors: #bf3989;
202
202
  --bgColor-default: #ffffff;
203
203
  --bgColor-muted: #f6f8fa;
204
+ --bgColor-inset: #f6f8fa;
204
205
  --bgColor-emphasis: #24292f;
205
206
  --bgColor-disabled: #f6f8fa;
206
207
  --bgColor-transparent: #ffffff00;
@@ -602,6 +603,7 @@
602
603
  --fgColor-sponsors: #bf3989;
603
604
  --bgColor-default: #ffffff;
604
605
  --bgColor-muted: #f6f8fa;
606
+ --bgColor-inset: #f6f8fa;
605
607
  --bgColor-emphasis: #24292f;
606
608
  --bgColor-disabled: #f6f8fa;
607
609
  --bgColor-transparent: #ffffff00;
@@ -201,6 +201,7 @@
201
201
  --fgColor-sponsors: #bf3989;
202
202
  --bgColor-default: #ffffff;
203
203
  --bgColor-muted: #f6f8fa;
204
+ --bgColor-inset: #f6f8fa;
204
205
  --bgColor-emphasis: #24292f;
205
206
  --bgColor-disabled: #f6f8fa;
206
207
  --bgColor-transparent: #ffffff00;
@@ -602,6 +603,7 @@
602
603
  --fgColor-sponsors: #bf3989;
603
604
  --bgColor-default: #ffffff;
604
605
  --bgColor-muted: #f6f8fa;
606
+ --bgColor-inset: #f6f8fa;
605
607
  --bgColor-emphasis: #24292f;
606
608
  --bgColor-disabled: #f6f8fa;
607
609
  --bgColor-transparent: #ffffff00;