@primer/components 0.0.0-202110815533 → 0.0.0-2021108175016
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
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# @primer/components
|
2
2
|
|
3
|
-
## 0.0.0-
|
3
|
+
## 0.0.0-2021108175016
|
4
4
|
|
5
5
|
### Minor Changes
|
6
6
|
|
@@ -10,11 +10,9 @@
|
|
10
10
|
|
11
11
|
### Patch Changes
|
12
12
|
|
13
|
-
-
|
13
|
+
- Fake entry to force publishing
|
14
14
|
|
15
|
-
*
|
16
|
-
|
17
|
-
- [#1549](https://github.com/primer/react/pull/1549) [`f565840f`](https://github.com/primer/react/commit/f565840f2d879b987ef9df7cd046e146214ed5f5) Thanks [@michael-lefebvre](https://github.com/michael-lefebvre)! - Fix `auxiliaryText` in ActionList Group header
|
15
|
+
* [#1549](https://github.com/primer/react/pull/1549) [`f565840f`](https://github.com/primer/react/commit/f565840f2d879b987ef9df7cd046e146214ed5f5) Thanks [@michael-lefebvre](https://github.com/michael-lefebvre)! - Fix `auxiliaryText` in ActionList Group header
|
18
16
|
|
19
17
|
## 31.1.0
|
20
18
|
|
@@ -7,19 +7,11 @@ export declare const getVariantStyles: (variant: ItemProps['variant'], disabled:
|
|
7
7
|
iconColor: string;
|
8
8
|
annotationColor: string;
|
9
9
|
hoverColor?: undefined;
|
10
|
-
selectedBg?: undefined;
|
11
10
|
} | {
|
12
11
|
color: string;
|
13
12
|
iconColor: string;
|
14
13
|
annotationColor: string;
|
15
14
|
hoverColor: string;
|
16
|
-
selectedBg?: undefined;
|
17
|
-
} | {
|
18
|
-
color: string;
|
19
|
-
iconColor: string;
|
20
|
-
annotationColor: string;
|
21
|
-
hoverColor: string;
|
22
|
-
selectedBg: string;
|
23
15
|
};
|
24
16
|
export declare type ItemProps = {
|
25
17
|
/**
|
package/lib/ActionList2/Item.js
CHANGED
@@ -54,8 +54,7 @@ const getVariantStyles = (variant, disabled) => {
|
|
54
54
|
color: 'fg.default',
|
55
55
|
iconColor: 'fg.muted',
|
56
56
|
annotationColor: 'fg.muted',
|
57
|
-
hoverColor: 'fg.default'
|
58
|
-
selectedBg: 'actionListItem.default.selectedBg'
|
57
|
+
hoverColor: 'fg.default'
|
59
58
|
};
|
60
59
|
}
|
61
60
|
};
|
@@ -110,9 +109,6 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
110
109
|
color: getVariantStyles(variant, disabled).color,
|
111
110
|
textDecoration: 'none',
|
112
111
|
// for as="a"
|
113
|
-
'&[aria-selected=true]': {
|
114
|
-
backgroundColor: getVariantStyles(variant, disabled).selectedBg
|
115
|
-
},
|
116
112
|
':not([aria-disabled])': {
|
117
113
|
cursor: 'pointer'
|
118
114
|
},
|
@@ -122,9 +118,13 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
122
118
|
color: getVariantStyles(variant, disabled).hoverColor
|
123
119
|
},
|
124
120
|
':focus:not([aria-disabled])': {
|
125
|
-
backgroundColor: `actionListItem.${variant}.
|
121
|
+
backgroundColor: `actionListItem.${variant}.selectedBg`,
|
126
122
|
color: getVariantStyles(variant, disabled).hoverColor,
|
127
123
|
outline: 'none'
|
124
|
+
},
|
125
|
+
':active:not([aria-disabled])': {
|
126
|
+
backgroundColor: `actionListItem.${variant}.activeBg`,
|
127
|
+
color: getVariantStyles(variant, disabled).hoverColor
|
128
128
|
}
|
129
129
|
},
|
130
130
|
|
@@ -186,8 +186,8 @@ const Item = /*#__PURE__*/_react.default.forwardRef(({
|
|
186
186
|
"aria-selected": selected,
|
187
187
|
"aria-disabled": disabled ? true : undefined,
|
188
188
|
tabIndex: disabled ? undefined : -1,
|
189
|
-
"aria-labelledby":
|
190
|
-
"aria-describedby": slots.BlockDescription
|
189
|
+
"aria-labelledby": labelId,
|
190
|
+
"aria-describedby": [slots.InlineDescription && inlineDescriptionId, slots.BlockDescription && blockDescriptionId].filter(Boolean).join(' ')
|
191
191
|
}, props), /*#__PURE__*/_react.default.createElement(_PrivateItemWrapper, null, /*#__PURE__*/_react.default.createElement(_Selection.Selection, {
|
192
192
|
selected: selected,
|
193
193
|
disabled: disabled
|
@@ -7,19 +7,11 @@ export declare const getVariantStyles: (variant: ItemProps['variant'], disabled:
|
|
7
7
|
iconColor: string;
|
8
8
|
annotationColor: string;
|
9
9
|
hoverColor?: undefined;
|
10
|
-
selectedBg?: undefined;
|
11
10
|
} | {
|
12
11
|
color: string;
|
13
12
|
iconColor: string;
|
14
13
|
annotationColor: string;
|
15
14
|
hoverColor: string;
|
16
|
-
selectedBg?: undefined;
|
17
|
-
} | {
|
18
|
-
color: string;
|
19
|
-
iconColor: string;
|
20
|
-
annotationColor: string;
|
21
|
-
hoverColor: string;
|
22
|
-
selectedBg: string;
|
23
15
|
};
|
24
16
|
export declare type ItemProps = {
|
25
17
|
/**
|
@@ -32,8 +32,7 @@ export const getVariantStyles = (variant, disabled) => {
|
|
32
32
|
color: 'fg.default',
|
33
33
|
iconColor: 'fg.muted',
|
34
34
|
annotationColor: 'fg.muted',
|
35
|
-
hoverColor: 'fg.default'
|
36
|
-
selectedBg: 'actionListItem.default.selectedBg'
|
35
|
+
hoverColor: 'fg.default'
|
37
36
|
};
|
38
37
|
}
|
39
38
|
};
|
@@ -81,9 +80,6 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
81
80
|
color: getVariantStyles(variant, disabled).color,
|
82
81
|
textDecoration: 'none',
|
83
82
|
// for as="a"
|
84
|
-
'&[aria-selected=true]': {
|
85
|
-
backgroundColor: getVariantStyles(variant, disabled).selectedBg
|
86
|
-
},
|
87
83
|
':not([aria-disabled])': {
|
88
84
|
cursor: 'pointer'
|
89
85
|
},
|
@@ -93,9 +89,13 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
93
89
|
color: getVariantStyles(variant, disabled).hoverColor
|
94
90
|
},
|
95
91
|
':focus:not([aria-disabled])': {
|
96
|
-
backgroundColor: `actionListItem.${variant}.
|
92
|
+
backgroundColor: `actionListItem.${variant}.selectedBg`,
|
97
93
|
color: getVariantStyles(variant, disabled).hoverColor,
|
98
94
|
outline: 'none'
|
95
|
+
},
|
96
|
+
':active:not([aria-disabled])': {
|
97
|
+
backgroundColor: `actionListItem.${variant}.activeBg`,
|
98
|
+
color: getVariantStyles(variant, disabled).hoverColor
|
99
99
|
}
|
100
100
|
},
|
101
101
|
|
@@ -155,8 +155,8 @@ export const Item = /*#__PURE__*/React.forwardRef(({
|
|
155
155
|
"aria-selected": selected,
|
156
156
|
"aria-disabled": disabled ? true : undefined,
|
157
157
|
tabIndex: disabled ? undefined : -1,
|
158
|
-
"aria-labelledby":
|
159
|
-
"aria-describedby": slots.BlockDescription
|
158
|
+
"aria-labelledby": labelId,
|
159
|
+
"aria-describedby": [slots.InlineDescription && inlineDescriptionId, slots.BlockDescription && blockDescriptionId].filter(Boolean).join(' ')
|
160
160
|
}, props), /*#__PURE__*/React.createElement(_PrivateItemWrapper, null, /*#__PURE__*/React.createElement(Selection, {
|
161
161
|
selected: selected,
|
162
162
|
disabled: disabled
|