@primer/components 0.0.0-2021915171552 → 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.
- package/CHANGELOG.md +5 -13
- package/codemods/deprecateUtilityComponents.js +1 -1
- package/dist/browser.esm.js +751 -751
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +759 -759
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.js +1 -1
- package/lib/BaseStyles.js +1 -1
- package/lib/BorderBox.js +1 -1
- package/lib/Caret.js +2 -2
- package/lib/Dialog.js +1 -1
- package/lib/Flash.js +16 -16
- package/lib/Label.js +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/StateLabel.js +19 -13
- package/lib/Token/_RemoveTokenButton.js +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -8
- package/lib/theme-preval.js +3105 -375
- package/lib/utils/testing.d.ts +493 -50
- package/lib-esm/ActionList/Item.js +1 -1
- package/lib-esm/BaseStyles.js +1 -1
- package/lib-esm/BorderBox.js +1 -1
- package/lib-esm/Caret.js +2 -2
- package/lib-esm/Dialog.js +1 -1
- package/lib-esm/Flash.js +16 -16
- package/lib-esm/Label.js +1 -1
- package/lib-esm/ProgressBar.js +1 -1
- package/lib-esm/StateLabel.js +19 -13
- package/lib-esm/Token/_RemoveTokenButton.js +1 -1
- package/lib-esm/index.d.ts +0 -1
- package/lib-esm/index.js +0 -1
- package/lib-esm/theme-preval.js +3105 -375
- package/lib-esm/utils/testing.d.ts +493 -50
- package/package.json +3 -4
- package/lib/ActionList2/Description.d.ts +0 -5
- package/lib/ActionList2/Description.js +0 -54
- package/lib/ActionList2/Divider.d.ts +0 -8
- package/lib/ActionList2/Divider.js +0 -42
- package/lib/ActionList2/Group.d.ts +0 -8
- package/lib/ActionList2/Group.js +0 -39
- package/lib/ActionList2/Header.d.ts +0 -26
- package/lib/ActionList2/Header.js +0 -55
- package/lib/ActionList2/Item.d.ts +0 -56
- package/lib/ActionList2/Item.js +0 -216
- package/lib/ActionList2/List.d.ts +0 -18
- package/lib/ActionList2/List.js +0 -52
- package/lib/ActionList2/Selection.d.ts +0 -5
- package/lib/ActionList2/Selection.js +0 -67
- package/lib/ActionList2/Visuals.d.ts +0 -12
- package/lib/ActionList2/Visuals.js +0 -101
- package/lib/ActionList2/hacks.d.ts +0 -30
- package/lib/ActionList2/hacks.js +0 -38
- package/lib/ActionList2/index.d.ts +0 -26
- package/lib/ActionList2/index.js +0 -36
- package/lib-esm/ActionList2/Description.d.ts +0 -5
- package/lib-esm/ActionList2/Description.js +0 -37
- package/lib-esm/ActionList2/Divider.d.ts +0 -8
- package/lib-esm/ActionList2/Divider.js +0 -30
- package/lib-esm/ActionList2/Group.d.ts +0 -8
- package/lib-esm/ActionList2/Group.js +0 -29
- package/lib-esm/ActionList2/Header.d.ts +0 -26
- package/lib-esm/ActionList2/Header.js +0 -45
- package/lib-esm/ActionList2/Item.d.ts +0 -56
- package/lib-esm/ActionList2/Item.js +0 -211
- package/lib-esm/ActionList2/List.d.ts +0 -18
- package/lib-esm/ActionList2/List.js +0 -42
- package/lib-esm/ActionList2/Selection.d.ts +0 -5
- package/lib-esm/ActionList2/Selection.js +0 -50
- package/lib-esm/ActionList2/Visuals.d.ts +0 -12
- package/lib-esm/ActionList2/Visuals.js +0 -76
- package/lib-esm/ActionList2/hacks.d.ts +0 -30
- package/lib-esm/ActionList2/hacks.js +0 -30
- package/lib-esm/ActionList2/index.d.ts +0 -26
- 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: '
|
9
|
-
backgroundColor: '
|
10
|
-
borderColor: '
|
8
|
+
color: 'alert.info.text',
|
9
|
+
backgroundColor: 'alert.info.bg',
|
10
|
+
borderColor: 'alert.info.border',
|
11
11
|
svg: {
|
12
|
-
color: '
|
12
|
+
color: 'alert.info.icon'
|
13
13
|
}
|
14
14
|
},
|
15
15
|
success: {
|
16
|
-
color: '
|
17
|
-
backgroundColor: 'success.
|
18
|
-
borderColor: 'success.
|
16
|
+
color: 'alert.success.text',
|
17
|
+
backgroundColor: 'alert.success.bg',
|
18
|
+
borderColor: 'alert.success.border',
|
19
19
|
svg: {
|
20
|
-
color: 'success.
|
20
|
+
color: 'alert.success.icon'
|
21
21
|
}
|
22
22
|
},
|
23
23
|
danger: {
|
24
|
-
color: '
|
25
|
-
backgroundColor: '
|
26
|
-
borderColor: '
|
24
|
+
color: 'alert.error.text',
|
25
|
+
backgroundColor: 'alert.error.bg',
|
26
|
+
borderColor: 'alert.error.border',
|
27
27
|
svg: {
|
28
|
-
color: '
|
28
|
+
color: 'alert.error.icon'
|
29
29
|
}
|
30
30
|
},
|
31
31
|
warning: {
|
32
|
-
color: '
|
33
|
-
backgroundColor: '
|
34
|
-
borderColor: '
|
32
|
+
color: 'alert.warn.text',
|
33
|
+
backgroundColor: 'alert.warn.bg',
|
34
|
+
borderColor: 'alert.warn.border',
|
35
35
|
svg: {
|
36
|
-
color: '
|
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: '
|
36
|
+
bg: 'label.primary.border',
|
37
37
|
variant: 'medium'
|
38
38
|
};
|
39
39
|
export default Label;
|
package/lib-esm/ProgressBar.js
CHANGED
package/lib-esm/StateLabel.js
CHANGED
@@ -19,28 +19,34 @@ const colorVariants = variant({
|
|
19
19
|
prop: 'status',
|
20
20
|
variants: {
|
21
21
|
issueClosed: {
|
22
|
-
backgroundColor: '
|
23
|
-
color: '
|
22
|
+
backgroundColor: 'prState.closed.bg',
|
23
|
+
color: 'prState.closed.text',
|
24
|
+
borderColor: 'prState.closed.border'
|
24
25
|
},
|
25
26
|
pullClosed: {
|
26
|
-
backgroundColor: '
|
27
|
-
color: '
|
27
|
+
backgroundColor: 'prState.closed.bg',
|
28
|
+
color: 'prState.closed.text',
|
29
|
+
borderColor: 'prState.closed.border'
|
28
30
|
},
|
29
31
|
pullMerged: {
|
30
|
-
backgroundColor: '
|
31
|
-
color: '
|
32
|
+
backgroundColor: 'prState.merged.bg',
|
33
|
+
color: 'prState.merged.text',
|
34
|
+
borderColor: 'prState.merged.border'
|
32
35
|
},
|
33
36
|
issueOpened: {
|
34
|
-
backgroundColor: '
|
35
|
-
color: '
|
37
|
+
backgroundColor: 'prState.open.bg',
|
38
|
+
color: 'prState.open.text',
|
39
|
+
borderColor: 'prState.open.border'
|
36
40
|
},
|
37
41
|
pullOpened: {
|
38
|
-
backgroundColor: '
|
39
|
-
color: '
|
42
|
+
backgroundColor: 'prState.open.bg',
|
43
|
+
color: 'prState.open.text',
|
44
|
+
borderColor: 'prState.open.border'
|
40
45
|
},
|
41
46
|
draft: {
|
42
|
-
backgroundColor: '
|
43
|
-
color: '
|
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.
|
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,
|
package/lib-esm/index.d.ts
CHANGED
@@ -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';
|