@primer/primitives 10.3.4 → 10.4.0-rc.06084fce

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 (108) hide show
  1. package/dist/build/schemas/shadowToken.d.ts +1992 -0
  2. package/dist/build/schemas/shadowToken.js +27 -0
  3. package/dist/css/base/motion/motion.css +1 -0
  4. package/dist/css/functional/themes/dark-colorblind.css +38 -2
  5. package/dist/css/functional/themes/dark-dimmed.css +38 -2
  6. package/dist/css/functional/themes/dark-high-contrast.css +38 -2
  7. package/dist/css/functional/themes/dark-tritanopia.css +38 -2
  8. package/dist/css/functional/themes/dark.css +38 -2
  9. package/dist/css/functional/themes/light-colorblind.css +38 -2
  10. package/dist/css/functional/themes/light-high-contrast.css +38 -2
  11. package/dist/css/functional/themes/light-tritanopia.css +38 -2
  12. package/dist/css/functional/themes/light.css +38 -2
  13. package/dist/css/primitives.css +1 -6
  14. package/dist/docs/base/motion/motion.json +14 -0
  15. package/dist/docs/functional/themes/dark-colorblind.json +12028 -1436
  16. package/dist/docs/functional/themes/dark-dimmed.json +12218 -1392
  17. package/dist/docs/functional/themes/dark-high-contrast.json +13308 -1584
  18. package/dist/docs/functional/themes/dark-tritanopia.json +11899 -1409
  19. package/dist/docs/functional/themes/dark.json +11584 -1314
  20. package/dist/docs/functional/themes/light-colorblind.json +11961 -1411
  21. package/dist/docs/functional/themes/light-high-contrast.json +14994 -3384
  22. package/dist/docs/functional/themes/light-tritanopia.json +11815 -1367
  23. package/dist/docs/functional/themes/light.json +11541 -1245
  24. package/dist/fallbacks/base/motion/motion.json +1 -0
  25. package/dist/figma/figma.json +1 -10
  26. package/dist/figma/themes/dark-colorblind.json +5096 -4524
  27. package/dist/figma/themes/dark-dimmed.json +5142 -4406
  28. package/dist/figma/themes/dark-high-contrast.json +5762 -3913
  29. package/dist/figma/themes/dark-tritanopia.json +4933 -4491
  30. package/dist/figma/themes/dark.json +5476 -5299
  31. package/dist/figma/themes/light-colorblind.json +5076 -4467
  32. package/dist/figma/themes/light-high-contrast.json +5707 -3916
  33. package/dist/figma/themes/light-tritanopia.json +4983 -4501
  34. package/dist/figma/themes/light.json +4795 -4502
  35. package/dist/internalCss/dark-colorblind.css +38 -2
  36. package/dist/internalCss/dark-dimmed.css +38 -2
  37. package/dist/internalCss/dark-high-contrast.css +38 -2
  38. package/dist/internalCss/dark-tritanopia.css +38 -2
  39. package/dist/internalCss/dark.css +38 -2
  40. package/dist/internalCss/light-colorblind.css +38 -2
  41. package/dist/internalCss/light-high-contrast.css +38 -2
  42. package/dist/internalCss/light-tritanopia.css +38 -2
  43. package/dist/internalCss/light.css +38 -2
  44. package/dist/styleLint/base/motion/motion.json +14 -0
  45. package/dist/styleLint/functional/themes/dark-colorblind.json +12028 -1436
  46. package/dist/styleLint/functional/themes/dark-dimmed.json +12217 -1391
  47. package/dist/styleLint/functional/themes/dark-high-contrast.json +13295 -1571
  48. package/dist/styleLint/functional/themes/dark-tritanopia.json +11897 -1407
  49. package/dist/styleLint/functional/themes/dark.json +11567 -1297
  50. package/dist/styleLint/functional/themes/light-colorblind.json +11922 -1372
  51. package/dist/styleLint/functional/themes/light-high-contrast.json +15008 -3398
  52. package/dist/styleLint/functional/themes/light-tritanopia.json +11816 -1368
  53. package/dist/styleLint/functional/themes/light.json +11542 -1246
  54. package/package.json +1 -1
  55. package/src/tokens/base/motion/timing.json5 +4 -0
  56. package/src/tokens/component/avatar.json5 +33 -0
  57. package/src/tokens/component/button.json5 +1714 -0
  58. package/src/tokens/component/card.json5 +18 -0
  59. package/src/tokens/{functional/color/light/app-light.json5 → component/codeMirror.json5} +67 -0
  60. package/src/tokens/component/contribution.json5 +344 -0
  61. package/src/tokens/component/counter.json5 +43 -0
  62. package/src/tokens/component/header.json5 +3 -0
  63. package/src/tokens/component/label.json5 +1942 -0
  64. package/src/tokens/component/menu.json5 +24 -0
  65. package/src/tokens/component/overlay.json5 +1 -1
  66. package/src/tokens/component/selectMenu.json5 +38 -0
  67. package/src/tokens/component/sideNav.json5 +22 -0
  68. package/src/tokens/component/tooltip.json5 +32 -0
  69. package/src/tokens/component/treeView.json5 +24 -0
  70. package/src/tokens/component/underlineNav.json5 +56 -0
  71. package/src/tokens/functional/color/bgColor.json5 +24 -20
  72. package/src/tokens/functional/color/control.json5 +1087 -0
  73. package/src/tokens/functional/color/{dark/data-vis-dark.json5 → data-vis.json5} +61 -21
  74. package/src/tokens/functional/color/display.json5 +2170 -0
  75. package/src/tokens/functional/color/focus.json5 +15 -0
  76. package/src/tokens/functional/color/selection.json5 +22 -0
  77. package/src/tokens/functional/color/{light/syntax-light.json5 → syntax.json5} +187 -0
  78. package/src/tokens/functional/shadow/{light.json5 → shadow.json5} +202 -120
  79. package/dist/css/functional/motion/motion.css +0 -6
  80. package/dist/docs/functional/motion/motion.json +0 -66
  81. package/dist/fallbacks/functional/motion/motion.json +0 -6
  82. package/dist/figma/shadows/dark-colorblind.json +0 -1152
  83. package/dist/figma/shadows/dark-dimmed.json +0 -1152
  84. package/dist/figma/shadows/dark-high-contrast.json +0 -1152
  85. package/dist/figma/shadows/dark-tritanopia.json +0 -1152
  86. package/dist/figma/shadows/dark.json +0 -1152
  87. package/dist/figma/shadows/light-colorblind.json +0 -1052
  88. package/dist/figma/shadows/light-high-contrast.json +0 -1052
  89. package/dist/figma/shadows/light-tritanopia.json +0 -1052
  90. package/dist/figma/shadows/light.json +0 -1052
  91. package/dist/styleLint/functional/motion/motion.json +0 -66
  92. package/src/tokens/functional/color/dark/app-dark.json5 +0 -254
  93. package/src/tokens/functional/color/dark/display-dark.json5 +0 -1258
  94. package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +0 -223
  95. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +0 -658
  96. package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +0 -159
  97. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +0 -107
  98. package/src/tokens/functional/color/dark/patterns-dark.json5 +0 -2676
  99. package/src/tokens/functional/color/dark/syntax-dark.json5 +0 -559
  100. package/src/tokens/functional/color/light/data-vis-light.json5 +0 -284
  101. package/src/tokens/functional/color/light/display-light.json5 +0 -1163
  102. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +0 -601
  103. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +0 -159
  104. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +0 -97
  105. package/src/tokens/functional/color/light/patterns-light.json5 +0 -2671
  106. package/src/tokens/functional/motion/loading.json5 +0 -17
  107. package/src/tokens/functional/motion/patterns.json5 +0 -35
  108. package/src/tokens/functional/shadow/dark.json5 +0 -369
@@ -1,123 +1,4 @@
1
1
  {
2
- avatar: {
3
- shadow: {
4
- $value: [
5
- {
6
- color: '{base.color.neutral.0}',
7
- alpha: 0.8,
8
- offsetX: '0px',
9
- offsetY: '0px',
10
- blur: '0px',
11
- spread: '2px',
12
- },
13
- ],
14
- $type: 'shadow',
15
- $extensions: {
16
- 'org.primer.figma': {
17
- collection: 'mode',
18
- group: 'component shadow',
19
- },
20
- },
21
- },
22
- },
23
- button: {
24
- default: {
25
- shadow: {
26
- resting: {
27
- $value: [
28
- {
29
- color: '{base.color.neutral.13}',
30
- alpha: 0.04,
31
- offsetX: '0px',
32
- offsetY: '1px',
33
- blur: '0px',
34
- spread: '0px',
35
- inset: false,
36
- },
37
- ],
38
- $type: 'shadow',
39
- $extensions: {
40
- 'org.primer.figma': {
41
- collection: 'mode',
42
- group: 'component shadow',
43
- },
44
- },
45
- },
46
- },
47
- },
48
- primary: {
49
- shadow: {
50
- selected: {
51
- $value: [
52
- {
53
- color: '{base.color.green.9}',
54
- alpha: 0.3,
55
- offsetX: '0px',
56
- offsetY: '1px',
57
- blur: '0px',
58
- spread: '0px',
59
- inset: true,
60
- },
61
- ],
62
- $type: 'shadow',
63
- $extensions: {
64
- 'org.primer.figma': {
65
- collection: 'mode',
66
- group: 'component shadow',
67
- },
68
- },
69
- },
70
- },
71
- },
72
- outline: {
73
- shadow: {
74
- selected: {
75
- $value: [
76
- {
77
- color: '{base.color.blue.9}',
78
- alpha: 0.2,
79
- offsetX: '0px',
80
- offsetY: '1px',
81
- blur: '0px',
82
- spread: '0px',
83
- inset: true,
84
- },
85
- ],
86
- $type: 'shadow',
87
- $extensions: {
88
- 'org.primer.figma': {
89
- collection: 'mode',
90
- group: 'component shadow',
91
- },
92
- },
93
- },
94
- },
95
- },
96
- danger: {
97
- shadow: {
98
- selected: {
99
- $value: [
100
- {
101
- color: '{base.color.red.9}',
102
- alpha: 0.2,
103
- offsetX: '0px',
104
- offsetY: '1px',
105
- blur: '0px',
106
- spread: '0px',
107
- inset: true,
108
- },
109
- ],
110
- $type: 'shadow',
111
- $extensions: {
112
- 'org.primer.figma': {
113
- collection: 'mode',
114
- group: 'component shadow',
115
- },
116
- },
117
- },
118
- },
119
- },
120
- },
121
2
  shadow: {
122
3
  inset: {
123
4
  $value: {
@@ -135,6 +16,19 @@
135
16
  collection: 'mode',
136
17
  group: 'shadow',
137
18
  },
19
+ 'org.primer.overrides': {
20
+ dark: {
21
+ $value: {
22
+ color: '{base.color.neutral.0}',
23
+ alpha: 0.24,
24
+ offsetX: '0px',
25
+ offsetY: '1px',
26
+ blur: '0px',
27
+ spread: '0px',
28
+ inset: true,
29
+ },
30
+ },
31
+ },
138
32
  },
139
33
  },
140
34
  resting: {
@@ -154,6 +48,19 @@
154
48
  collection: 'mode',
155
49
  group: 'shadow',
156
50
  },
51
+ 'org.primer.overrides': {
52
+ dark: {
53
+ $value: {
54
+ color: '{base.color.neutral.0}',
55
+ alpha: 0.8,
56
+ offsetX: '0px',
57
+ offsetY: '1px',
58
+ blur: '0px',
59
+ spread: '0px',
60
+ inset: false,
61
+ },
62
+ },
63
+ },
157
64
  },
158
65
  },
159
66
  small: {
@@ -174,6 +81,21 @@
174
81
  collection: 'mode',
175
82
  group: 'shadow',
176
83
  },
84
+ 'org.primer.overrides': {
85
+ dark: {
86
+ $value: [
87
+ {
88
+ color: '{base.color.neutral.0}',
89
+ alpha: 0.4,
90
+ offsetX: '0px',
91
+ offsetY: '1px',
92
+ blur: '0px',
93
+ spread: '0px',
94
+ inset: false,
95
+ },
96
+ ],
97
+ },
98
+ },
177
99
  },
178
100
  },
179
101
  medium: {
@@ -193,6 +115,20 @@
193
115
  collection: 'mode',
194
116
  group: 'shadow',
195
117
  },
118
+ 'org.primer.overrides': {
119
+ dark: {
120
+ $value: [
121
+ {
122
+ color: '{base.color.neutral.0}',
123
+ alpha: 0.8,
124
+ offsetX: '0px',
125
+ offsetY: '3px',
126
+ blur: '6px',
127
+ spread: '0px',
128
+ },
129
+ ],
130
+ },
131
+ },
196
132
  },
197
133
  },
198
134
  },
@@ -230,6 +166,36 @@
230
166
  collection: 'mode',
231
167
  group: 'shadow',
232
168
  },
169
+ 'org.primer.overrides': {
170
+ dark: {
171
+ $value: [
172
+ {
173
+ color: '{overlay.borderColor}',
174
+ alpha: 1,
175
+ offsetX: '0px',
176
+ offsetY: '0px',
177
+ blur: '0px',
178
+ spread: '1px',
179
+ },
180
+ {
181
+ color: '{base.color.neutral.0}',
182
+ alpha: 0.4,
183
+ offsetX: '0px',
184
+ offsetY: '6px',
185
+ blur: '12px',
186
+ spread: '-3px',
187
+ },
188
+ {
189
+ color: '{base.color.neutral.0}',
190
+ alpha: 0.4,
191
+ offsetX: '0px',
192
+ offsetY: '6px',
193
+ blur: '18px',
194
+ spread: '0px',
195
+ },
196
+ ],
197
+ },
198
+ },
233
199
  },
234
200
  },
235
201
  medium: {
@@ -281,6 +247,52 @@
281
247
  collection: 'mode',
282
248
  group: 'shadow',
283
249
  },
250
+ 'org.primer.overrides': {
251
+ dark: {
252
+ $value: [
253
+ {
254
+ color: '{overlay.borderColor}',
255
+ alpha: 1,
256
+ offsetX: '0px',
257
+ offsetY: '0px',
258
+ blur: '0px',
259
+ spread: '1px',
260
+ },
261
+ {
262
+ color: '{base.color.neutral.0}',
263
+ alpha: 0.4,
264
+ offsetX: '0px',
265
+ offsetY: '8px',
266
+ blur: '16px',
267
+ spread: '-4px',
268
+ },
269
+ {
270
+ color: '{base.color.neutral.0}',
271
+ alpha: 0.4,
272
+ offsetX: '0px',
273
+ offsetY: '4px',
274
+ blur: '32px',
275
+ spread: '-4px',
276
+ },
277
+ {
278
+ color: '{base.color.neutral.0}',
279
+ alpha: 0.4,
280
+ offsetX: '0px',
281
+ offsetY: '24px',
282
+ blur: '48px',
283
+ spread: '-12px',
284
+ },
285
+ {
286
+ color: '{base.color.neutral.0}',
287
+ alpha: 0.4,
288
+ offsetX: '0px',
289
+ offsetY: '48px',
290
+ blur: '96px',
291
+ spread: '-24px',
292
+ },
293
+ ],
294
+ },
295
+ },
284
296
  },
285
297
  },
286
298
  large: {
@@ -308,6 +320,28 @@
308
320
  collection: 'mode',
309
321
  group: 'shadow',
310
322
  },
323
+ 'org.primer.overrides': {
324
+ dark: {
325
+ $value: [
326
+ {
327
+ color: '{overlay.borderColor}',
328
+ alpha: 1,
329
+ offsetX: '0px',
330
+ offsetY: '0px',
331
+ blur: '0px',
332
+ spread: '1px',
333
+ },
334
+ {
335
+ color: '{base.color.neutral.0}',
336
+ alpha: 1,
337
+ offsetX: '0px',
338
+ offsetY: '24px',
339
+ blur: '48px',
340
+ spread: '0px',
341
+ },
342
+ ],
343
+ },
344
+ },
311
345
  },
312
346
  },
313
347
  xlarge: {
@@ -335,6 +369,28 @@
335
369
  collection: 'mode',
336
370
  group: 'shadow',
337
371
  },
372
+ 'org.primer.overrides': {
373
+ dark: {
374
+ $value: [
375
+ {
376
+ color: '{overlay.borderColor}',
377
+ alpha: 1,
378
+ offsetX: '0px',
379
+ offsetY: '0px',
380
+ blur: '0px',
381
+ spread: '1px',
382
+ },
383
+ {
384
+ color: '{base.color.neutral.0}',
385
+ alpha: 1,
386
+ offsetX: '0px',
387
+ offsetY: '32px',
388
+ blur: '64px',
389
+ spread: '0px',
390
+ },
391
+ ],
392
+ },
393
+ },
338
394
  },
339
395
  },
340
396
  legacy: {
@@ -357,7 +413,33 @@
357
413
  },
358
414
  ],
359
415
  $type: 'shadow',
416
+ $extensions: {
417
+ 'org.primer.figma': {
418
+ },
419
+ 'org.primer.overrides': {
420
+ dark: {
421
+ $value: [
422
+ {
423
+ color: '{base.color.neutral.0}',
424
+ alpha: 0.4,
425
+ offsetX: '0px',
426
+ offsetY: '6px',
427
+ blur: '12px',
428
+ spread: '-3px',
429
+ },
430
+ {
431
+ color: '{base.color.neutral.0}',
432
+ alpha: 0.4,
433
+ offsetX: '0px',
434
+ offsetY: '6px',
435
+ blur: '18px',
436
+ spread: '0px',
437
+ },
438
+ ],
439
+ },
440
+ },
441
+ },
360
442
  },
361
443
  },
362
444
  },
363
- }
445
+ }
@@ -1,6 +0,0 @@
1
- :root {
2
- --motion-loading-delay-default: var(--base-duration-1000); /* The amount of time to wait before showing a loading indicator or announcing a loading state to assistive technologies. */
3
- --motion-skeletonLoader-shimmer-duration-scale: var(--base-duration-1000); /* The amount of times it takes the "shimmer" effect to go from the start (left) of the skeleton loader to the end (right) */
4
- --motion-spinner-duration-rotation: var(--base-duration-1000); /* The amount of time it takes the "Spinner" loading indicator to make a full 360deg rotation */
5
- --motion-spinner-easing-rotation: var(--base-easing-linear); /* The easing curve for the "Spinner" loading indicator rotation */
6
- }
@@ -1,66 +0,0 @@
1
- {
2
- "motion-loading-delay-default": {
3
- "filePath": "src/tokens/functional/motion/loading.json5",
4
- "isSource": true,
5
- "original": {
6
- "$value": "{base.duration.1000}",
7
- "$type": "duration",
8
- "$description": "The amount of time to wait before showing a loading indicator or announcing a loading state to assistive technologies."
9
- },
10
- "name": "motion-loading-delay-default",
11
- "attributes": {},
12
- "path": ["motion", "loading", "delay", "default"],
13
- "key": "{motion.loading.delay.default}",
14
- "value": "1000ms",
15
- "type": "duration",
16
- "description": "The amount of time to wait before showing a loading indicator or announcing a loading state to assistive technologies."
17
- },
18
- "motion-skeletonLoader-shimmer-duration-scale": {
19
- "filePath": "src/tokens/functional/motion/patterns.json5",
20
- "isSource": true,
21
- "original": {
22
- "$value": "{base.duration.1000}",
23
- "$type": "duration",
24
- "$description": "The amount of times it takes the \"shimmer\" effect to go from the start (left) of the skeleton loader to the end (right)"
25
- },
26
- "name": "motion-skeletonLoader-shimmer-duration-scale",
27
- "attributes": {},
28
- "path": ["motion", "skeletonLoader", "shimmer", "duration", "scale"],
29
- "key": "{motion.skeletonLoader.shimmer.duration.scale}",
30
- "value": "1000ms",
31
- "type": "duration",
32
- "description": "The amount of times it takes the \"shimmer\" effect to go from the start (left) of the skeleton loader to the end (right)"
33
- },
34
- "motion-spinner-duration-rotation": {
35
- "filePath": "src/tokens/functional/motion/patterns.json5",
36
- "isSource": true,
37
- "original": {
38
- "$value": "{base.duration.1000}",
39
- "$type": "duration",
40
- "$description": "The amount of time it takes the \"Spinner\" loading indicator to make a full 360deg rotation"
41
- },
42
- "name": "motion-spinner-duration-rotation",
43
- "attributes": {},
44
- "path": ["motion", "spinner", "duration", "rotation"],
45
- "key": "{motion.spinner.duration.rotation}",
46
- "value": "1000ms",
47
- "type": "duration",
48
- "description": "The amount of time it takes the \"Spinner\" loading indicator to make a full 360deg rotation"
49
- },
50
- "motion-spinner-easing-rotation": {
51
- "filePath": "src/tokens/functional/motion/patterns.json5",
52
- "isSource": true,
53
- "original": {
54
- "$value": "{base.easing.linear}",
55
- "$type": "cubicBezier",
56
- "$description": "The easing curve for the \"Spinner\" loading indicator rotation"
57
- },
58
- "name": "motion-spinner-easing-rotation",
59
- "attributes": {},
60
- "path": ["motion", "spinner", "easing", "rotation"],
61
- "key": "{motion.spinner.easing.rotation}",
62
- "value": [0, 0, 1, 1],
63
- "type": "cubicBezier",
64
- "description": "The easing curve for the \"Spinner\" loading indicator rotation"
65
- }
66
- }
@@ -1,6 +0,0 @@
1
- {
2
- "--motion-loading-delay-default": "1000ms",
3
- "--motion-spinner-duration-rotation": "1000ms",
4
- "--motion-spinner-easing-rotation": [0, 0, 1, 1],
5
- "--motion-skeletonLoader-shimmer-duration-scale": "1000ms"
6
- }