@primer/primitives 10.0.0-rc.e413e85d → 10.0.0-rc.e5d395ea

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 +2 -2
  2. package/dist/build/PrimerStyleDictionary.js +27 -26
  3. package/dist/build/filters/isCubicBezier.d.ts +7 -0
  4. package/dist/build/filters/isCubicBezier.js +10 -0
  5. package/dist/build/formats/typescriptExportDefinition.js +2 -2
  6. package/dist/build/parsers/w3cJsonParser.js +2 -2
  7. package/dist/build/platforms/css.js +1 -0
  8. package/dist/build/schemas/borderToken.d.ts +3 -3
  9. package/dist/build/schemas/colorToken.d.ts +3 -3
  10. package/dist/build/schemas/cubicBezierToken.d.ts +18 -0
  11. package/dist/build/schemas/cubicBezierToken.js +8 -0
  12. package/dist/build/schemas/designToken.js +2 -1
  13. package/dist/build/schemas/dimensionToken.d.ts +3 -3
  14. package/dist/build/schemas/durationToken.d.ts +3 -3
  15. package/dist/build/schemas/fontFamilyToken.d.ts +3 -3
  16. package/dist/build/schemas/fontWeightToken.d.ts +3 -3
  17. package/dist/build/schemas/numberToken.d.ts +3 -3
  18. package/dist/build/schemas/shadowToken.d.ts +3 -3
  19. package/dist/build/schemas/stringToken.d.ts +3 -3
  20. package/dist/build/schemas/tokenType.d.ts +1 -1
  21. package/dist/build/schemas/typographyToken.d.ts +3 -3
  22. package/dist/build/schemas/validTokenType.d.ts +1 -1
  23. package/dist/build/schemas/validTokenType.js +1 -0
  24. package/dist/build/schemas/viewportRangeToken.d.ts +3 -3
  25. package/dist/build/transformers/cubicBezierToCss.d.ts +8 -0
  26. package/dist/build/transformers/cubicBezierToCss.js +23 -0
  27. package/dist/build/transformers/durationToCss.js +2 -2
  28. package/dist/build/transformers/index.d.ts +1 -0
  29. package/dist/build/transformers/index.js +1 -0
  30. package/dist/css/base/motion/motion.css +17 -0
  31. package/dist/css/functional/motion/motion.css +4 -3
  32. package/dist/css/functional/themes/dark-colorblind.css +42 -22
  33. package/dist/css/functional/themes/dark-dimmed.css +44 -24
  34. package/dist/css/functional/themes/dark-high-contrast.css +42 -22
  35. package/dist/css/functional/themes/dark-tritanopia.css +42 -22
  36. package/dist/css/functional/themes/dark.css +42 -22
  37. package/dist/css/functional/themes/light-colorblind.css +42 -22
  38. package/dist/css/functional/themes/light-high-contrast.css +44 -24
  39. package/dist/css/functional/themes/light-tritanopia.css +42 -22
  40. package/dist/css/functional/themes/light.css +42 -22
  41. package/dist/css/functional/typography/typography.css +43 -43
  42. package/dist/css/primitives.css +64 -46
  43. package/dist/docs/base/motion/motion.json +205 -0
  44. package/dist/docs/functional/motion/motion.json +18 -3
  45. package/dist/docs/functional/themes/dark-colorblind.json +533 -251
  46. package/dist/docs/functional/themes/dark-dimmed.json +560 -256
  47. package/dist/docs/functional/themes/dark-high-contrast.json +388 -148
  48. package/dist/docs/functional/themes/dark-tritanopia.json +535 -257
  49. package/dist/docs/functional/themes/dark.json +544 -256
  50. package/dist/docs/functional/themes/light-colorblind.json +355 -65
  51. package/dist/docs/functional/themes/light-high-contrast.json +333 -63
  52. package/dist/docs/functional/themes/light-tritanopia.json +307 -61
  53. package/dist/docs/functional/themes/light.json +336 -58
  54. package/dist/fallbacks/base/motion/motion.json +17 -0
  55. package/dist/fallbacks/functional/motion/motion.json +1 -0
  56. package/dist/figma/dimension/dimension.json +518 -518
  57. package/dist/figma/figma.json +19 -19
  58. package/dist/figma/scales/dark-dimmed.json +3536 -656
  59. package/dist/figma/scales/dark-high-constrast.json +3535 -655
  60. package/dist/figma/scales/dark.json +3371 -491
  61. package/dist/figma/scales/light-high-constrast.json +3533 -653
  62. package/dist/figma/scales/light.json +3370 -490
  63. package/dist/figma/shadows/dark-colorblind.json +285 -285
  64. package/dist/figma/shadows/dark-dimmed.json +285 -285
  65. package/dist/figma/shadows/dark-high-contrast.json +285 -285
  66. package/dist/figma/shadows/dark-tritanopia.json +285 -285
  67. package/dist/figma/shadows/dark.json +285 -285
  68. package/dist/figma/shadows/light-colorblind.json +254 -254
  69. package/dist/figma/shadows/light-high-contrast.json +254 -254
  70. package/dist/figma/shadows/light-tritanopia.json +254 -254
  71. package/dist/figma/shadows/light.json +254 -254
  72. package/dist/figma/themes/dark-colorblind.json +5177 -5048
  73. package/dist/figma/themes/dark-dimmed.json +5526 -5351
  74. package/dist/figma/themes/dark-high-contrast.json +4361 -4251
  75. package/dist/figma/themes/dark-tritanopia.json +5315 -5187
  76. package/dist/figma/themes/dark.json +5741 -5582
  77. package/dist/figma/themes/light-colorblind.json +5112 -4937
  78. package/dist/figma/themes/light-high-contrast.json +4465 -4322
  79. package/dist/figma/themes/light-tritanopia.json +5179 -5053
  80. package/dist/figma/themes/light.json +5657 -5500
  81. package/dist/figma/typography/typography.json +162 -162
  82. package/dist/internalCss/dark-colorblind.css +42 -22
  83. package/dist/internalCss/dark-dimmed.css +44 -24
  84. package/dist/internalCss/dark-high-contrast.css +42 -22
  85. package/dist/internalCss/dark-tritanopia.css +42 -22
  86. package/dist/internalCss/dark.css +42 -22
  87. package/dist/internalCss/light-colorblind.css +42 -22
  88. package/dist/internalCss/light-high-contrast.css +44 -24
  89. package/dist/internalCss/light-tritanopia.css +42 -22
  90. package/dist/internalCss/light.css +42 -22
  91. package/dist/styleLint/base/motion/motion.json +205 -0
  92. package/dist/styleLint/functional/motion/motion.json +18 -3
  93. package/dist/styleLint/functional/themes/dark-colorblind.json +533 -251
  94. package/dist/styleLint/functional/themes/dark-dimmed.json +560 -256
  95. package/dist/styleLint/functional/themes/dark-high-contrast.json +387 -147
  96. package/dist/styleLint/functional/themes/dark-tritanopia.json +535 -257
  97. package/dist/styleLint/functional/themes/dark.json +544 -256
  98. package/dist/styleLint/functional/themes/light-colorblind.json +355 -65
  99. package/dist/styleLint/functional/themes/light-high-contrast.json +333 -63
  100. package/dist/styleLint/functional/themes/light-tritanopia.json +307 -61
  101. package/dist/styleLint/functional/themes/light.json +336 -58
  102. package/package.json +19 -28
  103. package/src/tokens/base/motion/easing.json5 +26 -0
  104. package/src/tokens/base/motion/timing.json5 +50 -0
  105. package/src/tokens/functional/color/dark/app-dark.json5 +203 -88
  106. package/src/tokens/functional/color/dark/display-dark.json5 +95 -95
  107. package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +0 -8
  108. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +39 -26
  109. package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +54 -28
  110. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +36 -13
  111. package/src/tokens/functional/color/dark/patterns-dark.json5 +16 -4
  112. package/src/tokens/functional/color/dark/primitives-dark.json5 +1 -1
  113. package/src/tokens/functional/color/light/app-light.json5 +195 -85
  114. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +25 -25
  115. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +59 -26
  116. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +62 -10
  117. package/src/tokens/functional/color/light/patterns-light.json5 +13 -1
  118. package/src/tokens/functional/motion/loading.json5 +1 -1
  119. package/src/tokens/functional/motion/patterns.json5 +9 -2
@@ -0,0 +1,50 @@
1
+ {
2
+ base: {
3
+ duration: {
4
+ '0': {
5
+ $value: '0ms',
6
+ $type: 'duration',
7
+ },
8
+ '75': {
9
+ $value: '75ms',
10
+ $type: 'duration',
11
+ },
12
+ '200': {
13
+ $value: '200ms',
14
+ $type: 'duration',
15
+ },
16
+ '300': {
17
+ $value: '300ms',
18
+ $type: 'duration',
19
+ },
20
+ '400': {
21
+ $value: '400ms',
22
+ $type: 'duration',
23
+ },
24
+ '500': {
25
+ $value: '500ms',
26
+ $type: 'duration',
27
+ },
28
+ '600': {
29
+ $value: '600ms',
30
+ $type: 'duration',
31
+ },
32
+ '700': {
33
+ $value: '700ms',
34
+ $type: 'duration',
35
+ },
36
+ '800': {
37
+ $value: '800ms',
38
+ $type: 'duration',
39
+ },
40
+ '900': {
41
+ $value: '900ms',
42
+ $type: 'duration',
43
+ },
44
+ '1000': {
45
+ $value: '1000ms',
46
+ $type: 'duration',
47
+ },
48
+ },
49
+ },
50
+ }
@@ -47,79 +47,198 @@
47
47
  },
48
48
  },
49
49
  diffBlob: {
50
- addition: {
50
+ additionLine: {
51
51
  fgColor: {
52
- text: {
53
- $value: '{fgColor.default}',
54
- $type: 'color',
55
- $extensions: {
56
- 'org.primer.figma': {
57
- collection: 'mode',
58
- mode: 'dark',
59
- group: 'component',
60
- scopes: ['fgColor'],
61
- },
52
+ $value: '{fgColor.default}',
53
+ $type: 'color',
54
+ $extensions: {
55
+ 'org.primer.figma': {
56
+ collection: 'mode',
57
+ mode: 'dark',
58
+ group: 'component',
59
+ scopes: ['fgColor'],
62
60
  },
63
61
  },
64
- num: {
65
- $value: '{fgColor.default}',
66
- $type: 'color',
67
- $extensions: {
68
- 'org.primer.figma': {
69
- collection: 'mode',
70
- mode: 'dark',
71
- group: 'component',
72
- scopes: ['fgColor'],
73
- },
62
+ },
63
+ bgColor: {
64
+ $value: '{bgColor.success.muted}',
65
+ $type: 'color',
66
+ $extensions: {
67
+ 'org.primer.figma': {
68
+ collection: 'mode',
69
+ mode: 'dark',
70
+ group: 'component',
71
+ scopes: ['bgColor'],
72
+ },
73
+ },
74
+ alpha: 0.15,
75
+ mix: null,
76
+ },
77
+ },
78
+ additionWord: {
79
+ fgColor: {
80
+ $value: '{fgColor.default}',
81
+ $type: 'color',
82
+ $extensions: {
83
+ 'org.primer.figma': {
84
+ collection: 'mode',
85
+ mode: 'dark',
86
+ group: 'component',
87
+ scopes: ['fgColor'],
74
88
  },
75
89
  },
76
90
  },
77
91
  bgColor: {
78
- num: {
79
- $value: '{base.color.green.3}',
80
- $type: 'color',
81
- $extensions: {
82
- 'org.primer.figma': {
83
- collection: 'mode',
84
- mode: 'dark',
85
- group: 'component',
86
- scopes: ['bgColor'],
87
- },
92
+ $value: '{base.color.green.4}',
93
+ $type: 'color',
94
+ $extensions: {
95
+ 'org.primer.figma': {
96
+ collection: 'mode',
97
+ mode: 'dark',
98
+ group: 'component',
99
+ scopes: ['bgColor'],
88
100
  },
89
- alpha: 0.3,
90
101
  },
91
- line: {
92
- $value: '{base.color.green.4}',
93
- $type: 'color',
94
- $extensions: {
95
- 'org.primer.figma': {
96
- collection: 'mode',
97
- mode: 'dark',
98
- group: 'component',
99
- scopes: ['bgColor'],
100
- },
102
+ alpha: 0.4,
103
+ },
104
+ },
105
+ additionNum: {
106
+ fgColor: {
107
+ $value: '{fgColor.default}',
108
+ $type: 'color',
109
+ $extensions: {
110
+ 'org.primer.figma': {
111
+ collection: 'mode',
112
+ mode: 'dark',
113
+ group: 'component',
114
+ scopes: ['fgColor'],
101
115
  },
102
- alpha: 0.15,
103
- mix: null,
104
116
  },
105
- word: {
106
- $value: '{base.color.green.4}',
107
- $type: 'color',
108
- $extensions: {
109
- 'org.primer.figma': {
110
- collection: 'mode',
111
- mode: 'dark',
112
- group: 'component',
113
- scopes: ['bgColor'],
114
- },
117
+ },
118
+ bgColor: {
119
+ $value: '{base.color.green.3}',
120
+ $type: 'color',
121
+ $extensions: {
122
+ 'org.primer.figma': {
123
+ collection: 'mode',
124
+ mode: 'dark',
125
+ group: 'component',
126
+ scopes: ['bgColor'],
115
127
  },
116
- alpha: 0.4,
117
128
  },
129
+ alpha: 0.3,
118
130
  },
119
131
  },
120
- deletion: {
132
+ deletionLine: {
121
133
  fgColor: {
122
- text: {
134
+ $value: '{fgColor.default}',
135
+ $type: 'color',
136
+ $extensions: {
137
+ 'org.primer.figma': {
138
+ collection: 'mode',
139
+ mode: 'dark',
140
+ group: 'component',
141
+ scopes: ['fgColor'],
142
+ },
143
+ },
144
+ },
145
+ bgColor: {
146
+ $value: '{bgColor.danger.muted}',
147
+ $type: 'color',
148
+ $extensions: {
149
+ 'org.primer.figma': {
150
+ collection: 'mode',
151
+ mode: 'dark',
152
+ group: 'component',
153
+ scopes: ['bgColor'],
154
+ },
155
+ },
156
+ mix: null,
157
+ },
158
+ },
159
+ deletionWord: {
160
+ fgColor: {
161
+ $value: '{fgColor.default}',
162
+ $type: 'color',
163
+ $extensions: {
164
+ 'org.primer.figma': {
165
+ collection: 'mode',
166
+ mode: 'dark',
167
+ group: 'component',
168
+ scopes: ['fgColor'],
169
+ },
170
+ },
171
+ },
172
+ bgColor: {
173
+ $value: '{base.color.red.4}',
174
+ $type: 'color',
175
+ $extensions: {
176
+ 'org.primer.figma': {
177
+ collection: 'mode',
178
+ mode: 'dark',
179
+ group: 'component',
180
+ scopes: ['bgColor'],
181
+ },
182
+ },
183
+ alpha: 0.4,
184
+ },
185
+ },
186
+ deletionNum: {
187
+ fgColor: {
188
+ $value: '{fgColor.default}',
189
+ $type: 'color',
190
+ $extensions: {
191
+ 'org.primer.figma': {
192
+ collection: 'mode',
193
+ mode: 'dark',
194
+ group: 'component',
195
+ scopes: ['fgColor'],
196
+ },
197
+ },
198
+ },
199
+ bgColor: {
200
+ $value: '{base.color.red.4}',
201
+ $type: 'color',
202
+ $extensions: {
203
+ 'org.primer.figma': {
204
+ collection: 'mode',
205
+ mode: 'dark',
206
+ group: 'component',
207
+ scopes: ['bgColor'],
208
+ },
209
+ },
210
+ alpha: 0.3,
211
+ },
212
+ },
213
+ hunkLine: {
214
+ fgColor: {
215
+ $value: '{fgColor.muted}',
216
+ $type: 'color',
217
+ $extensions: {
218
+ 'org.primer.figma': {
219
+ collection: 'mode',
220
+ mode: 'dark',
221
+ group: 'component',
222
+ scopes: ['fgColor'],
223
+ },
224
+ },
225
+ },
226
+ bgColor: {
227
+ $value: '{bgColor.accent.muted}',
228
+ $type: 'color',
229
+ $extensions: {
230
+ 'org.primer.figma': {
231
+ collection: 'mode',
232
+ mode: 'dark',
233
+ group: 'component',
234
+ scopes: ['bgColor'],
235
+ },
236
+ },
237
+ },
238
+ },
239
+ hunkNum: {
240
+ fgColor: {
241
+ rest: {
123
242
  $value: '{fgColor.default}',
124
243
  $type: 'color',
125
244
  $extensions: {
@@ -131,8 +250,8 @@
131
250
  },
132
251
  },
133
252
  },
134
- num: {
135
- $value: '{fgColor.default}',
253
+ hover: {
254
+ $value: '{fgColor.onEmphasis}',
136
255
  $type: 'color',
137
256
  $extensions: {
138
257
  'org.primer.figma': {
@@ -145,8 +264,8 @@
145
264
  },
146
265
  },
147
266
  bgColor: {
148
- num: {
149
- $value: '{base.color.red.4}',
267
+ rest: {
268
+ $value: '{base.color.blue.8}',
150
269
  $type: 'color',
151
270
  $extensions: {
152
271
  'org.primer.figma': {
@@ -156,10 +275,9 @@
156
275
  scopes: ['bgColor'],
157
276
  },
158
277
  },
159
- alpha: 0.3,
160
278
  },
161
- line: {
162
- $value: '{base.color.red.4}',
279
+ hover: {
280
+ $value: '{bgColor.accent.emphasis}',
163
281
  $type: 'color',
164
282
  $extensions: {
165
283
  'org.primer.figma': {
@@ -169,36 +287,33 @@
169
287
  scopes: ['bgColor'],
170
288
  },
171
289
  },
172
- alpha: 0.15,
173
- mix: null,
174
290
  },
175
- word: {
176
- $value: '{base.color.red.4}',
177
- $type: 'color',
178
- $extensions: {
179
- 'org.primer.figma': {
180
- collection: 'mode',
181
- mode: 'dark',
182
- group: 'component',
183
- scopes: ['bgColor'],
184
- },
291
+ },
292
+ },
293
+ emptyNum: {
294
+ bgColor: {
295
+ $value: '{bgColor.muted}',
296
+ $type: 'color',
297
+ $extensions: {
298
+ 'org.primer.figma': {
299
+ collection: 'mode',
300
+ mode: 'dark',
301
+ group: 'component',
302
+ scopes: ['bgColor'],
185
303
  },
186
- alpha: 0.4,
187
304
  },
188
305
  },
189
306
  },
190
- hunk: {
307
+ emptyLine: {
191
308
  bgColor: {
192
- num: {
193
- $value: '{borderColor.accent.muted}',
194
- $type: 'color',
195
- $extensions: {
196
- 'org.primer.figma': {
197
- collection: 'mode',
198
- mode: 'dark',
199
- group: 'component',
200
- scopes: ['bgColor'],
201
- },
309
+ $value: '{bgColor.muted}',
310
+ $type: 'color',
311
+ $extensions: {
312
+ 'org.primer.figma': {
313
+ collection: 'mode',
314
+ mode: 'dark',
315
+ group: 'component',
316
+ scopes: ['bgColor'],
202
317
  },
203
318
  },
204
319
  },