@primer/components 0.0.0-202191515130 → 0.0.0-202191517561

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 (75) hide show
  1. package/CHANGELOG.md +5 -13
  2. package/codemods/deprecateUtilityComponents.js +1 -1
  3. package/dist/browser.esm.js +755 -755
  4. package/dist/browser.esm.js.map +1 -1
  5. package/dist/browser.umd.js +756 -756
  6. package/dist/browser.umd.js.map +1 -1
  7. package/lib/ActionList/Item.js +1 -1
  8. package/lib/BaseStyles.js +1 -1
  9. package/lib/BorderBox.js +1 -1
  10. package/lib/Caret.js +2 -2
  11. package/lib/Dialog.js +1 -1
  12. package/lib/Flash.js +16 -16
  13. package/lib/Label.js +1 -1
  14. package/lib/ProgressBar.js +1 -1
  15. package/lib/StateLabel.js +19 -13
  16. package/lib/Token/_RemoveTokenButton.js +1 -1
  17. package/lib/index.d.ts +0 -1
  18. package/lib/index.js +0 -8
  19. package/lib/theme-preval.js +3105 -375
  20. package/lib/utils/testing.d.ts +493 -50
  21. package/lib-esm/ActionList/Item.js +1 -1
  22. package/lib-esm/BaseStyles.js +1 -1
  23. package/lib-esm/BorderBox.js +1 -1
  24. package/lib-esm/Caret.js +2 -2
  25. package/lib-esm/Dialog.js +1 -1
  26. package/lib-esm/Flash.js +16 -16
  27. package/lib-esm/Label.js +1 -1
  28. package/lib-esm/ProgressBar.js +1 -1
  29. package/lib-esm/StateLabel.js +19 -13
  30. package/lib-esm/Token/_RemoveTokenButton.js +1 -1
  31. package/lib-esm/index.d.ts +0 -1
  32. package/lib-esm/index.js +0 -1
  33. package/lib-esm/theme-preval.js +3105 -375
  34. package/lib-esm/utils/testing.d.ts +493 -50
  35. package/package.json +3 -3
  36. package/lib/ActionList2/Description.d.ts +0 -5
  37. package/lib/ActionList2/Description.js +0 -54
  38. package/lib/ActionList2/Divider.d.ts +0 -8
  39. package/lib/ActionList2/Divider.js +0 -42
  40. package/lib/ActionList2/Group.d.ts +0 -8
  41. package/lib/ActionList2/Group.js +0 -39
  42. package/lib/ActionList2/Header.d.ts +0 -26
  43. package/lib/ActionList2/Header.js +0 -55
  44. package/lib/ActionList2/Item.d.ts +0 -53
  45. package/lib/ActionList2/Item.js +0 -188
  46. package/lib/ActionList2/List.d.ts +0 -18
  47. package/lib/ActionList2/List.js +0 -52
  48. package/lib/ActionList2/Selection.d.ts +0 -5
  49. package/lib/ActionList2/Selection.js +0 -67
  50. package/lib/ActionList2/Visuals.d.ts +0 -12
  51. package/lib/ActionList2/Visuals.js +0 -91
  52. package/lib/ActionList2/hacks.d.ts +0 -30
  53. package/lib/ActionList2/hacks.js +0 -38
  54. package/lib/ActionList2/index.d.ts +0 -26
  55. package/lib/ActionList2/index.js +0 -36
  56. package/lib-esm/ActionList2/Description.d.ts +0 -5
  57. package/lib-esm/ActionList2/Description.js +0 -38
  58. package/lib-esm/ActionList2/Divider.d.ts +0 -8
  59. package/lib-esm/ActionList2/Divider.js +0 -30
  60. package/lib-esm/ActionList2/Group.d.ts +0 -8
  61. package/lib-esm/ActionList2/Group.js +0 -29
  62. package/lib-esm/ActionList2/Header.d.ts +0 -26
  63. package/lib-esm/ActionList2/Header.js +0 -45
  64. package/lib-esm/ActionList2/Item.d.ts +0 -53
  65. package/lib-esm/ActionList2/Item.js +0 -185
  66. package/lib-esm/ActionList2/List.d.ts +0 -18
  67. package/lib-esm/ActionList2/List.js +0 -42
  68. package/lib-esm/ActionList2/Selection.d.ts +0 -5
  69. package/lib-esm/ActionList2/Selection.js +0 -50
  70. package/lib-esm/ActionList2/Visuals.d.ts +0 -12
  71. package/lib-esm/ActionList2/Visuals.js +0 -68
  72. package/lib-esm/ActionList2/hacks.d.ts +0 -30
  73. package/lib-esm/ActionList2/hacks.js +0 -30
  74. package/lib-esm/ActionList2/index.d.ts +0 -26
  75. package/lib-esm/ActionList2/index.js +0 -23
@@ -54,13 +54,471 @@ export declare function render(component: React.ReactElement, theme?: {
54
54
  };
55
55
  space: string[];
56
56
  colorSchemes: Record<"light" | "light_protanopia" | "dark" | "dark_dimmed" | "dark_high_contrast" | "dark_protanopia", Record<"colors" | "shadows", Partial<{
57
- canvasDefaultTransparent: string;
58
- marketingIcon: {
57
+ auto: {
58
+ black: string;
59
+ white: string;
60
+ gray: string[];
61
+ blue: string[];
62
+ green: string[];
63
+ yellow: string[];
64
+ orange: string[];
65
+ red: string[];
66
+ purple: string[];
67
+ pink: string[];
68
+ };
69
+ text: {
70
+ primary: string;
71
+ secondary: string;
72
+ tertiary: string;
73
+ placeholder: string;
74
+ disabled: string;
75
+ inverse: string;
76
+ link: string;
77
+ danger: string;
78
+ success: string;
79
+ warning: string;
80
+ white: string;
81
+ };
82
+ icon: {
59
83
  primary: string;
60
84
  secondary: string;
85
+ tertiary: string;
86
+ info: string;
87
+ danger: string;
88
+ success: string;
89
+ warning: string;
90
+ };
91
+ border: {
92
+ primary: string;
93
+ secondary: string;
94
+ tertiary: string;
95
+ overlay: string;
96
+ inverse: string;
97
+ info: string;
98
+ danger: string;
99
+ success: string;
100
+ warning: string;
101
+ default: string;
102
+ muted: string;
103
+ subtle: string;
104
+ };
105
+ bg: {
106
+ canvas: string;
107
+ canvasMobile: string;
108
+ canvasInverse: string;
109
+ canvasInset: string;
110
+ primary: string;
111
+ secondary: string;
112
+ tertiary: string;
113
+ overlay: string;
114
+ backdrop: string;
115
+ info: string;
116
+ infoInverse: string;
117
+ danger: string;
118
+ dangerInverse: string;
119
+ success: string;
120
+ successInverse: string;
121
+ warning: string;
122
+ warningInverse: string;
123
+ };
124
+ shadow: {
125
+ highlight: string;
126
+ inset: string;
127
+ small: string;
128
+ medium: string;
129
+ large: string;
130
+ extraLarge: string;
131
+ };
132
+ state: {
133
+ hover: {
134
+ primaryBg: string;
135
+ primaryBorder: string;
136
+ primaryText: string;
137
+ primaryIcon: string;
138
+ secondaryBg: string;
139
+ secondaryBorder: string;
140
+ };
141
+ selected: {
142
+ primaryBg: string;
143
+ primaryBorder: string;
144
+ primaryText: string;
145
+ primaryIcon: string;
146
+ };
147
+ focus: {
148
+ border: string;
149
+ shadow: string;
150
+ };
151
+ };
152
+ fade: {
153
+ fg10: string;
154
+ fg15: string;
155
+ fg30: string;
156
+ fg50: string;
157
+ fg70: string;
158
+ fg85: string;
159
+ black10: string;
160
+ black15: string;
161
+ black30: string;
162
+ black50: string;
163
+ black70: string;
164
+ black85: string;
165
+ white10: string;
166
+ white15: string;
167
+ white30: string;
168
+ white50: string;
169
+ white70: string;
170
+ white85: string;
171
+ };
172
+ alert: {
173
+ info: {
174
+ text: string;
175
+ icon: string;
176
+ bg: string;
177
+ border: string;
178
+ };
179
+ warn: {
180
+ text: string;
181
+ icon: string;
182
+ bg: string;
183
+ border: string;
184
+ };
185
+ error: {
186
+ text: string;
187
+ icon: string;
188
+ bg: string;
189
+ border: string;
190
+ };
191
+ success: {
192
+ text: string;
193
+ icon: string;
194
+ bg: string;
195
+ border: string;
196
+ };
197
+ };
198
+ autocomplete: {
199
+ shadow: string;
200
+ rowBorder: string;
201
+ };
202
+ blankslate: {
203
+ icon: string;
204
+ };
205
+ counter: {
206
+ text: string;
207
+ bg: string;
208
+ primary: {
209
+ text: string;
210
+ bg: string;
211
+ };
212
+ secondary: {
213
+ text: string;
214
+ bg: string;
215
+ };
216
+ };
217
+ box: {
218
+ blueBorder: string;
219
+ rowYellowBg: string;
220
+ rowBlueBg: string;
221
+ headerBlueBg: string;
222
+ headerBlueBorder: string;
223
+ borderInfo: string;
224
+ bgInfo: string;
225
+ borderWarning: string;
226
+ bgWarning: string;
227
+ };
228
+ branchName: {
229
+ text: string;
230
+ icon: string;
231
+ bg: string;
232
+ link: {
233
+ text: string;
234
+ icon: string;
235
+ bg: string;
236
+ };
237
+ };
238
+ markdown: {
239
+ codeBg: string;
240
+ frameBorder: string;
241
+ blockquoteBorder: string;
242
+ tableBorder: string;
243
+ tableTrBorder: string;
244
+ };
245
+ filterItem: {
246
+ barBg: string;
247
+ };
248
+ hiddenTextExpander: {
249
+ bg: string;
250
+ bgHover: string;
251
+ };
252
+ dragAndDrop: {
253
+ border: string;
254
+ };
255
+ uploadEnabled: {
256
+ border: string;
257
+ borderFocused: string;
258
+ };
259
+ previewableCommentForm: {
260
+ border: string;
261
+ };
262
+ verifiedBadge: {
263
+ text: string;
264
+ bg: string;
265
+ border: string;
266
+ };
267
+ socialCount: {
268
+ bg: string;
269
+ };
270
+ tooltip: {
271
+ text: string;
272
+ bg: string;
273
+ };
274
+ filesExplorerIcon: string;
275
+ hlAuthorBg: string;
276
+ hlAuthorBorder: string;
277
+ logoSubdued: string;
278
+ discussionBorder: string;
279
+ discussionBgSuccess: string;
280
+ actionsWorkflowTableStickyBg: string;
281
+ repoLanguageColorBorder: string;
282
+ codeSelectionBg: string;
283
+ highlight: {
284
+ text: string;
285
+ bg: string;
286
+ };
287
+ blob: {
288
+ lineHighlightBg: string;
289
+ lineHighlightBorder: string;
290
+ };
291
+ topicTag: {
292
+ text: string;
293
+ bg: string;
294
+ hoverBg: string;
295
+ activeBg: string;
296
+ border: string;
297
+ };
298
+ footerInvertocat: {
299
+ octicon: string;
300
+ octiconHover: string;
301
+ };
302
+ dropdown: {
303
+ shadow: string;
304
+ };
305
+ label: {
306
+ border: string;
307
+ primary: {
308
+ text: string;
309
+ border: string;
310
+ };
311
+ secondary: {
312
+ text: string;
313
+ border: string;
314
+ };
315
+ info: {
316
+ text: string;
317
+ border: string;
318
+ };
319
+ success: {
320
+ text: string;
321
+ border: string;
322
+ };
323
+ warning: {
324
+ text: string;
325
+ border: string;
326
+ };
327
+ danger: {
328
+ text: string;
329
+ border: string;
330
+ };
331
+ orange: {
332
+ text: string;
333
+ border: string;
334
+ };
335
+ };
336
+ input: {
337
+ bg: string;
338
+ contrastBg: string;
339
+ border: string;
340
+ shadow: string;
341
+ disabledBorder: string;
342
+ warningBorder: string;
343
+ errorBorder: string;
344
+ tooltip: {
345
+ success: {
346
+ text: string;
347
+ bg: string;
348
+ border: string;
349
+ };
350
+ warning: {
351
+ text: string;
352
+ bg: string;
353
+ border: string;
354
+ };
355
+ error: {
356
+ text: string;
357
+ bg: string;
358
+ border: string;
359
+ };
360
+ };
361
+ disabledBg: string;
362
+ };
363
+ toast: {
364
+ text: string;
365
+ bg: string;
366
+ border: string;
367
+ shadow: string;
368
+ icon: string;
369
+ iconBg: string;
370
+ iconBorder: string;
371
+ success: {
372
+ text: string;
373
+ border: string;
374
+ icon: string;
375
+ iconBg: string;
376
+ iconBorder: string;
377
+ };
378
+ warning: {
379
+ text: string;
380
+ border: string;
381
+ icon: string;
382
+ iconBg: string;
383
+ iconBorder: string;
384
+ };
385
+ danger: {
386
+ text: string;
387
+ border: string;
388
+ icon: string;
389
+ iconBg: string;
390
+ iconBorder: string;
391
+ };
392
+ loading: {
393
+ text: string;
394
+ border: string;
395
+ icon: string;
396
+ iconBg: string;
397
+ iconBorder: string;
398
+ };
399
+ };
400
+ timeline: {
401
+ text: string;
402
+ badgeSuccessBorder: string;
403
+ targetBadgeBorder: string;
404
+ targetBadgeShadow: string;
405
+ badgeBg: string;
406
+ };
407
+ diffstat: {
408
+ neutralBg: string;
409
+ neutralBorder: string;
410
+ deletionBorder: string;
411
+ additionBorder: string;
412
+ deletionBg: string;
413
+ additionBg: string;
414
+ };
415
+ diff: {
416
+ addition: {
417
+ text: string;
418
+ bg: string;
419
+ border: string;
420
+ };
421
+ deletion: {
422
+ text: string;
423
+ bg: string;
424
+ border: string;
425
+ };
426
+ change: {
427
+ text: string;
428
+ bg: string;
429
+ border: string;
430
+ };
431
+ };
432
+ mergeBox: {
433
+ successIconBg: string;
434
+ successIconText: string;
435
+ successIconBorder: string;
436
+ successIndicatorBg: string;
437
+ successIndicatorBorder: string;
438
+ mergedIconBg: string;
439
+ mergedIconText: string;
440
+ mergedIconBorder: string;
441
+ mergedBoxBorder: string;
442
+ neutralIconBg: string;
443
+ neutralIconText: string;
444
+ neutralIconBorder: string;
445
+ neutralIndicatorBg: string;
446
+ neutralIndicatorBorder: string;
447
+ warningIconBg: string;
448
+ warningIconText: string;
449
+ warningIconBorder: string;
450
+ warningBoxBorder: string;
451
+ warningMergeHighlight: string;
452
+ errorIconBg: string;
453
+ errorIconText: string;
454
+ errorIconBorder: string;
455
+ errorIndicatorBg: string;
456
+ errorIndicatorBorder: string;
457
+ };
458
+ underlinenav: {
459
+ border: string;
460
+ borderHover: string;
461
+ borderActive: string;
462
+ text: string;
463
+ textHover: string;
464
+ textActive: string;
465
+ icon: string;
466
+ iconHover: string;
467
+ iconActive: string;
468
+ counterText: string;
469
+ counterBg: string;
470
+ };
471
+ selectMenu: {
472
+ borderSecondary: string;
473
+ shadow: string;
474
+ backdropBg: string;
475
+ backdropBorder: string;
476
+ tapHighlight: string;
477
+ tapFocusBg: string;
478
+ };
479
+ sidenav: {
480
+ borderActive: string;
481
+ selectedBg: string;
482
+ };
483
+ menu: {
484
+ headingText: string;
485
+ borderActive: string;
486
+ bgActive: string;
487
+ };
488
+ project: {
489
+ cardBg: string;
490
+ headerBg: string;
491
+ sidebarBg: string;
492
+ gradientIn: string;
493
+ gradientOut: string;
494
+ };
495
+ prState: {
496
+ draft: {
497
+ text: string;
498
+ bg: string;
499
+ border: string;
500
+ };
501
+ open: {
502
+ text: string;
503
+ bg: string;
504
+ border: string;
505
+ };
506
+ merged: {
507
+ text: string;
508
+ bg: string;
509
+ border: string;
510
+ };
511
+ closed: {
512
+ text: string;
513
+ bg: string;
514
+ border: string;
515
+ };
61
516
  };
62
517
  diffBlob: {
518
+ numText: string;
519
+ numHoverText: string;
63
520
  addition: {
521
+ numHoverText: string;
64
522
  numText: string;
65
523
  fg: string;
66
524
  numBg: string;
@@ -68,6 +526,7 @@ export declare function render(component: React.ReactElement, theme?: {
68
526
  wordBg: string;
69
527
  };
70
528
  deletion: {
529
+ numHoverText: string;
71
530
  numText: string;
72
531
  fg: string;
73
532
  numBg: string;
@@ -75,17 +534,45 @@ export declare function render(component: React.ReactElement, theme?: {
75
534
  wordBg: string;
76
535
  };
77
536
  hunk: {
537
+ text: string;
78
538
  numBg: string;
539
+ lineBg: string;
79
540
  };
541
+ emptyBlockBg: string;
542
+ selectedLineHighlightBg: string;
543
+ selectedLineHighlightBorder: string;
80
544
  expander: {
545
+ hoverIcon: string;
546
+ hoverBg: string;
81
547
  icon: string;
82
548
  };
549
+ commentButton: {
550
+ icon: string;
551
+ bg: string;
552
+ gradientBg: string;
553
+ };
83
554
  selectedLineHighlightMixBlendMode: string;
84
555
  };
85
- diffstat: {
86
- deletionBorder: string;
87
- additionBorder: string;
88
- additionBg: string;
556
+ globalNav: {
557
+ logo: string;
558
+ bg: string;
559
+ text: string;
560
+ icon: string;
561
+ inputBg: string;
562
+ inputBorder: string;
563
+ inputIcon: string;
564
+ inputPlaceholder: string;
565
+ };
566
+ introShelf: {
567
+ gradientLeft: string;
568
+ gradientRight: string;
569
+ gradientIn: string;
570
+ gradientOut: string;
571
+ };
572
+ canvasDefaultTransparent: string;
573
+ marketingIcon: {
574
+ primary: string;
575
+ secondary: string;
89
576
  };
90
577
  searchKeyword: {
91
578
  hl: string;
@@ -224,12 +711,6 @@ export declare function render(component: React.ReactElement, theme?: {
224
711
  cyanBright: string;
225
712
  };
226
713
  };
227
- project: {
228
- headerBg: string;
229
- sidebarBg: string;
230
- gradientIn: string;
231
- gradientOut: string;
232
- };
233
714
  mktg: {
234
715
  success: string;
235
716
  info: string;
@@ -302,14 +783,6 @@ export declare function render(component: React.ReactElement, theme?: {
302
783
  stackFadeMore: string;
303
784
  childShadow: string;
304
785
  };
305
- topicTag: {
306
- border: string;
307
- };
308
- selectMenu: {
309
- backdropBorder: string;
310
- tapHighlight: string;
311
- tapFocusBg: string;
312
- };
313
786
  overlay: {
314
787
  shadow: string;
315
788
  };
@@ -322,18 +795,6 @@ export declare function render(component: React.ReactElement, theme?: {
322
795
  bg: string;
323
796
  border: string;
324
797
  };
325
- sidenav: {
326
- selectedBg: string;
327
- };
328
- menu: {
329
- bgActive: string;
330
- };
331
- input: {
332
- disabledBg: string;
333
- };
334
- timeline: {
335
- badgeBg: string;
336
- };
337
798
  ansi: {
338
799
  black: string;
339
800
  blackBright: string;
@@ -430,10 +891,6 @@ export declare function render(component: React.ReactElement, theme?: {
430
891
  hoverIcon: string;
431
892
  };
432
893
  };
433
- underlinenav: {
434
- icon: string;
435
- borderHover: string;
436
- };
437
894
  fg: {
438
895
  default: string;
439
896
  muted: string;
@@ -446,17 +903,6 @@ export declare function render(component: React.ReactElement, theme?: {
446
903
  inset: string;
447
904
  subtle: string;
448
905
  };
449
- border: {
450
- default: string;
451
- muted: string;
452
- subtle: string;
453
- };
454
- shadow: {
455
- small: string;
456
- medium: string;
457
- large: string;
458
- extraLarge: string;
459
- };
460
906
  neutral: {
461
907
  emphasisPlus: string;
462
908
  emphasis: string;
@@ -506,9 +952,6 @@ export declare function render(component: React.ReactElement, theme?: {
506
952
  subtle: string;
507
953
  };
508
954
  primer: {
509
- fg: {
510
- disabled: string;
511
- };
512
955
  canvas: {
513
956
  backdrop: string;
514
957
  sticky: string;
@@ -225,7 +225,7 @@ export const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
225
225
  readOnly: true,
226
226
  "aria-readonly": "false"
227
227
  })) : selected && /*#__PURE__*/React.createElement(CheckIcon, {
228
- fill: theme === null || theme === void 0 ? void 0 : theme.colors.fg.default
228
+ fill: theme === null || theme === void 0 ? void 0 : theme.colors.text.primary
229
229
  })), LeadingVisual && /*#__PURE__*/React.createElement(LeadingVisualContainer, {
230
230
  variant: variant,
231
231
  disabled: disabled
@@ -42,7 +42,7 @@ function BaseStyles(props) {
42
42
 
43
43
  BaseStyles.displayName = "BaseStyles";
44
44
  BaseStyles.defaultProps = {
45
- color: 'fg.default',
45
+ color: 'text.primary',
46
46
  fontFamily: 'normal',
47
47
  lineHeight: 'default'
48
48
  };
@@ -11,7 +11,7 @@ const BorderBox = styled(Box).withConfig({
11
11
  BorderBox.defaultProps = {
12
12
  borderWidth: '1px',
13
13
  borderStyle: 'solid',
14
- borderColor: 'border.default',
14
+ borderColor: 'border.primary',
15
15
  borderRadius: 2
16
16
  };
17
17
  export default BorderBox;
package/lib-esm/Caret.js CHANGED
@@ -106,8 +106,8 @@ function Caret(props) {
106
106
  Caret.displayName = "Caret";
107
107
  Caret.locations = ['top', 'top-left', 'top-right', 'right', 'right-top', 'right-bottom', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-top', 'left-bottom'];
108
108
  Caret.defaultProps = {
109
- bg: 'canvas.default',
110
- borderColor: 'border.default',
109
+ bg: 'bg.canvas',
110
+ borderColor: 'border.primary',
111
111
  borderWidth: 1
112
112
  };
113
113
  export default Caret;
package/lib-esm/Dialog.js CHANGED
@@ -98,7 +98,7 @@ const Dialog = /*#__PURE__*/forwardRef(({
98
98
  }), children)) : null;
99
99
  });
100
100
  DialogHeader.defaultProps = {
101
- backgroundColor: 'canvas.subtle'
101
+ backgroundColor: 'bg.tertiary'
102
102
  };
103
103
  DialogHeader.propTypes = { ...Box.propTypes
104
104
  };