@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
package/lib-esm/Flash.js CHANGED
@@ -5,35 +5,35 @@ import sx from './sx';
5
5
  const variants = variant({
6
6
  variants: {
7
7
  default: {
8
- color: 'fg.default',
9
- backgroundColor: 'accent.subtle',
10
- borderColor: 'accent.muted',
8
+ color: 'alert.info.text',
9
+ backgroundColor: 'alert.info.bg',
10
+ borderColor: 'alert.info.border',
11
11
  svg: {
12
- color: 'accent.fg'
12
+ color: 'alert.info.icon'
13
13
  }
14
14
  },
15
15
  success: {
16
- color: 'fg.default',
17
- backgroundColor: 'success.subtle',
18
- borderColor: 'success.muted',
16
+ color: 'alert.success.text',
17
+ backgroundColor: 'alert.success.bg',
18
+ borderColor: 'alert.success.border',
19
19
  svg: {
20
- color: 'success.fg'
20
+ color: 'alert.success.icon'
21
21
  }
22
22
  },
23
23
  danger: {
24
- color: 'fg.default',
25
- backgroundColor: 'danger.subtle',
26
- borderColor: 'danger.muted',
24
+ color: 'alert.error.text',
25
+ backgroundColor: 'alert.error.bg',
26
+ borderColor: 'alert.error.border',
27
27
  svg: {
28
- color: 'danger.fg'
28
+ color: 'alert.error.icon'
29
29
  }
30
30
  },
31
31
  warning: {
32
- color: 'fg.default',
33
- backgroundColor: 'attention.subtle',
34
- borderColor: 'attention.muted',
32
+ color: 'alert.warn.text',
33
+ backgroundColor: 'alert.warn.bg',
34
+ borderColor: 'alert.warn.border',
35
35
  svg: {
36
- color: 'attention.fg'
36
+ color: 'alert.warn.icon'
37
37
  }
38
38
  }
39
39
  }
package/lib-esm/Label.js CHANGED
@@ -33,7 +33,7 @@ const Label = styled.span.withConfig({
33
33
  componentId: "sc-1t3ykp0-0"
34
34
  })(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";&:hover{text-decoration:none;}", " ", " ", " ", " ", ""], get('fontWeights.semibold'), get('colors.fg.onEmphasis'), get('radii.3'), sizeVariant, COMMON, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', sx);
35
35
  Label.defaultProps = {
36
- bg: 'neutral.emphasis',
36
+ bg: 'label.primary.border',
37
37
  variant: 'medium'
38
38
  };
39
39
  export default Label;
@@ -36,7 +36,7 @@ function ProgressBar({
36
36
 
37
37
  ProgressBar.displayName = "ProgressBar";
38
38
  ProgressBar.defaultProps = {
39
- bg: 'success.emphasis',
39
+ bg: 'bg.successInverse',
40
40
  barSize: 'default'
41
41
  };
42
42
  export default ProgressBar;
@@ -19,28 +19,34 @@ const colorVariants = variant({
19
19
  prop: 'status',
20
20
  variants: {
21
21
  issueClosed: {
22
- backgroundColor: 'danger.emphasis',
23
- color: 'fg.onEmphasis'
22
+ backgroundColor: 'prState.closed.bg',
23
+ color: 'prState.closed.text',
24
+ borderColor: 'prState.closed.border'
24
25
  },
25
26
  pullClosed: {
26
- backgroundColor: 'danger.emphasis',
27
- color: 'fg.onEmphasis'
27
+ backgroundColor: 'prState.closed.bg',
28
+ color: 'prState.closed.text',
29
+ borderColor: 'prState.closed.border'
28
30
  },
29
31
  pullMerged: {
30
- backgroundColor: 'done.emphasis',
31
- color: 'fg.onEmphasis'
32
+ backgroundColor: 'prState.merged.bg',
33
+ color: 'prState.merged.text',
34
+ borderColor: 'prState.merged.border'
32
35
  },
33
36
  issueOpened: {
34
- backgroundColor: 'success.emphasis',
35
- color: 'fg.onEmphasis'
37
+ backgroundColor: 'prState.open.bg',
38
+ color: 'prState.open.text',
39
+ borderColor: 'prState.open.border'
36
40
  },
37
41
  pullOpened: {
38
- backgroundColor: 'success.emphasis',
39
- color: 'fg.onEmphasis'
42
+ backgroundColor: 'prState.open.bg',
43
+ color: 'prState.open.text',
44
+ borderColor: 'prState.open.border'
40
45
  },
41
46
  draft: {
42
- backgroundColor: 'neutral.emphasis',
43
- color: 'fg.onEmphasis'
47
+ backgroundColor: 'prState.draft.bg',
48
+ color: 'prState.draft.text',
49
+ borderColor: 'prState.draft.border'
44
50
  }
45
51
  }
46
52
  });
@@ -62,7 +68,7 @@ const sizeVariants = variant({
62
68
  const StateLabelBase = styled.span.withConfig({
63
69
  displayName: "StateLabel__StateLabelBase",
64
70
  componentId: "k4pd9e-0"
65
- })(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.canvas.default'), get('radii.3'), colorVariants, sizeVariants, COMMON, sx);
71
+ })(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";border-width:1px;border-style:solid;", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.canvas.default'), get('radii.3'), colorVariants, sizeVariants, COMMON, sx);
66
72
 
67
73
  function StateLabel({
68
74
  children,
@@ -34,7 +34,7 @@ const getTokenButtonIconSize = size => parseInt(tokenSizes[size || defaultTokenS
34
34
  const StyledTokenButton = styled.span.withConfig({
35
35
  displayName: "_RemoveTokenButton__StyledTokenButton",
36
36
  componentId: "sc-14lvcw1-0"
37
- })(["background-color:transparent;font-family:inherit;color:currentColor;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;user-select:none;appearance:none;text-decoration:none;padding:0;transform:", ";align-self:baseline;border:0;border-radius:999px;&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}", " ", ""], props => `translate(${props.borderOffset}px, -${props.borderOffset}px)`, get('colors.neutral.muted'), get('colors.neutral.subtle'), variants, sx);
37
+ })(["background-color:transparent;font-family:inherit;color:currentColor;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;user-select:none;appearance:none;text-decoration:none;padding:0;transform:", ";align-self:baseline;border:0;border-radius:999px;&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}", " ", ""], props => `translate(${props.borderOffset}px, -${props.borderOffset}px)`, get('colors.fade.fg10'), get('colors.fade.fg15'), variants, sx);
38
38
 
39
39
  const RemoveTokenButton = ({
40
40
  'aria-label': ariaLabel,
@@ -22,7 +22,6 @@ export { useOnEscapePress } from './hooks/useOnEscapePress';
22
22
  export { useOverlay } from './hooks/useOverlay';
23
23
  export { useConfirm } from './Dialog/ConfirmationDialog';
24
24
  export { ActionList } from './ActionList';
25
- export { ActionList as ActionList2 } from './ActionList2';
26
25
  export { ActionMenu } from './ActionMenu';
27
26
  export type { ActionMenuProps } from './ActionMenu';
28
27
  export { default as Autocomplete } from './Autocomplete';
package/lib-esm/index.js CHANGED
@@ -18,7 +18,6 @@ export { useOverlay } from './hooks/useOverlay';
18
18
  export { useConfirm } from './Dialog/ConfirmationDialog'; // Components
19
19
 
20
20
  export { ActionList } from './ActionList';
21
- export { ActionList as ActionList2 } from './ActionList2';
22
21
  export { ActionMenu } from './ActionMenu';
23
22
  export { default as Autocomplete } from './Autocomplete';
24
23
  export { default as Avatar } from './Avatar';