@primer/view-components 0.45.1-rc.015a120e → 0.45.2
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/app/assets/styles/primer_view_components.css +6963 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_bar.css +49 -1
- package/app/components/primer/alpha/action_list.css +525 -1
- package/app/components/primer/alpha/action_list.css.json +64 -64
- package/app/components/primer/alpha/auto_complete.css +131 -1
- package/app/components/primer/alpha/auto_complete.css.json +3 -3
- package/app/components/primer/alpha/banner.css +146 -1
- package/app/components/primer/alpha/banner.css.json +2 -2
- package/app/components/primer/alpha/button_marketing.css +183 -1
- package/app/components/primer/alpha/button_marketing.css.json +6 -6
- package/app/components/primer/alpha/dialog.css +377 -1
- package/app/components/primer/alpha/dialog.css.json +2 -2
- package/app/components/primer/alpha/dropdown.css +296 -1
- package/app/components/primer/alpha/dropdown.css.json +19 -19
- package/app/components/primer/alpha/layout.css +374 -1
- package/app/components/primer/alpha/layout.css.json +10 -10
- package/app/components/primer/alpha/menu.css +124 -1
- package/app/components/primer/alpha/menu.css.json +5 -5
- package/app/components/primer/alpha/overlay.css +25 -1
- package/app/components/primer/alpha/segmented_control.css +161 -1
- package/app/components/primer/alpha/segmented_control.css.json +5 -5
- package/app/components/primer/alpha/select_panel.css +10 -1
- package/app/components/primer/alpha/skeleton_box.css +36 -1
- package/app/components/primer/alpha/stack.css +255 -1
- package/app/components/primer/alpha/stack.css.json +84 -84
- package/app/components/primer/alpha/stack_item.css +27 -1
- package/app/components/primer/alpha/stack_item.css.json +6 -6
- package/app/components/primer/alpha/tab_nav.css +112 -1
- package/app/components/primer/alpha/tab_nav.css.json +5 -5
- package/app/components/primer/alpha/text_field.css +792 -1
- package/app/components/primer/alpha/text_field.css.json +39 -39
- package/app/components/primer/alpha/toggle_switch.css +230 -1
- package/app/components/primer/alpha/toggle_switch.css.json +10 -10
- package/app/components/primer/alpha/tree_view.css +396 -1
- package/app/components/primer/alpha/tree_view.css.json +25 -25
- package/app/components/primer/alpha/underline_nav.css +150 -1
- package/app/components/primer/alpha/underline_nav.css.json +6 -6
- package/app/components/primer/beta/avatar.css +77 -1
- package/app/components/primer/beta/avatar_stack.css +134 -1
- package/app/components/primer/beta/avatar_stack.css.json +6 -7
- package/app/components/primer/beta/blankslate.css +168 -1
- package/app/components/primer/beta/border_box.css +218 -1
- package/app/components/primer/beta/border_box.css.json +3 -3
- package/app/components/primer/beta/breadcrumbs.css +29 -1
- package/app/components/primer/beta/breadcrumbs.css.json +2 -2
- package/app/components/primer/beta/button.css +359 -1
- package/app/components/primer/beta/button.css.json +17 -17
- package/app/components/primer/beta/button_group.css +20 -1
- package/app/components/primer/beta/button_group.css.json +3 -3
- package/app/components/primer/beta/counter.css +38 -1
- package/app/components/primer/beta/flash.css +152 -1
- package/app/components/primer/beta/label.css +109 -1
- package/app/components/primer/beta/label.css.json +3 -3
- package/app/components/primer/beta/link.css +79 -1
- package/app/components/primer/beta/link.css.json +1 -1
- package/app/components/primer/beta/popover.css +215 -1
- package/app/components/primer/beta/popover.css.json +23 -23
- package/app/components/primer/beta/progress_bar.css +38 -1
- package/app/components/primer/beta/progress_bar.css.json +1 -1
- package/app/components/primer/beta/state.css +60 -1
- package/app/components/primer/beta/state.css.json +1 -1
- package/app/components/primer/beta/subhead.css +64 -1
- package/app/components/primer/beta/subhead.css.json +1 -1
- package/app/components/primer/beta/timeline_item.css +106 -1
- package/app/components/primer/beta/timeline_item.css.json +1 -1
- package/app/components/primer/beta/truncate.css +30 -1
- package/app/components/primer/beta/truncate.css.json +6 -6
- package/app/components/primer/truncate.css +23 -1
- package/app/components/primer/truncate.css.json +4 -4
- package/package.json +1 -1
@@ -2,8 +2,8 @@
|
|
2
2
|
"name": "beta/breadcrumbs",
|
3
3
|
"selectors": [
|
4
4
|
".breadcrumb-item",
|
5
|
-
".breadcrumb-item
|
6
|
-
":is(.breadcrumb-item-selected,.breadcrumb-item[aria-current]:not([aria-current=false]))
|
5
|
+
".breadcrumb-item::after",
|
6
|
+
":is(.breadcrumb-item-selected,.breadcrumb-item[aria-current]:not([aria-current='false']))::after",
|
7
7
|
".breadcrumb-item-selected a"
|
8
8
|
]
|
9
9
|
}
|
@@ -1 +1,359 @@
|
|
1
|
-
|
1
|
+
/* stylelint-disable selector-no-qualifying-type */
|
2
|
+
/* stylelint-disable selector-max-type */
|
3
|
+
/* stylelint-disable primer/spacing */
|
4
|
+
/* CSS for Button */
|
5
|
+
/* temporary, pre primitives release */
|
6
|
+
:root {
|
7
|
+
--duration-fast: 80ms;
|
8
|
+
--easing-easeInOut: cubic-bezier(0.65, 0, 0.35, 1);
|
9
|
+
}
|
10
|
+
/* base button */
|
11
|
+
.Button {
|
12
|
+
position: relative;
|
13
|
+
display: inline-flex;
|
14
|
+
min-width: max-content;
|
15
|
+
height: var(--control-medium-size);
|
16
|
+
padding: 0 var(--control-medium-paddingInline-normal);
|
17
|
+
font-size: var(--text-body-size-medium);
|
18
|
+
font-weight: var(--base-text-weight-medium);
|
19
|
+
color: var(--button-default-fgColor-rest);
|
20
|
+
text-align: center;
|
21
|
+
cursor: pointer;
|
22
|
+
flex-direction: row;
|
23
|
+
-webkit-user-select: none;
|
24
|
+
user-select: none;
|
25
|
+
background-color: transparent;
|
26
|
+
border: var(--borderWidth-thin) solid;
|
27
|
+
border-color: transparent;
|
28
|
+
border-radius: var(--borderRadius-medium);
|
29
|
+
transition: var(--duration-fast) var(--easing-easeInOut);
|
30
|
+
transition-property: color, fill, background-color, border-color;
|
31
|
+
justify-content: space-between;
|
32
|
+
align-items: center;
|
33
|
+
gap: var(--base-size-4);
|
34
|
+
|
35
|
+
/* mobile friendly sizing */
|
36
|
+
}
|
37
|
+
@media (pointer: coarse) {
|
38
|
+
:is(.Button::before) {
|
39
|
+
position: absolute;
|
40
|
+
top: 50%;
|
41
|
+
left: 50%;
|
42
|
+
width: 100%;
|
43
|
+
height: 100%;
|
44
|
+
min-height: 48px;
|
45
|
+
content: "";
|
46
|
+
transform: translateX(-50%) translateY(-50%);
|
47
|
+
min-width: 48px;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
/* base states */
|
51
|
+
.Button:hover {
|
52
|
+
transition-duration: var(--duration-fast);
|
53
|
+
}
|
54
|
+
.Button:active {
|
55
|
+
transition: none;
|
56
|
+
}
|
57
|
+
.Button:disabled,.Button[aria-disabled='true'] {
|
58
|
+
cursor: not-allowed;
|
59
|
+
box-shadow: none;
|
60
|
+
}
|
61
|
+
.Button.Button--iconOnly {
|
62
|
+
color: var(--fgColor-muted);
|
63
|
+
}
|
64
|
+
:is(a.Button,summary.Button):hover {
|
65
|
+
-webkit-text-decoration: none;
|
66
|
+
text-decoration: none;
|
67
|
+
}
|
68
|
+
/* wrap grid content to allow trailingAction to lock-right */
|
69
|
+
.Button-content {
|
70
|
+
flex: 1 0 auto;
|
71
|
+
display: grid;
|
72
|
+
grid-template-areas: 'leadingVisual text trailingVisual';
|
73
|
+
grid-template-columns: min-content minmax(0, auto) min-content;
|
74
|
+
align-items: center;
|
75
|
+
place-content: center;
|
76
|
+
|
77
|
+
/* padding-bottom: 1px; optical alignment for firefox */
|
78
|
+
}
|
79
|
+
.Button-content > :not(:last-child) {
|
80
|
+
margin-right: var(--control-medium-gap);
|
81
|
+
}
|
82
|
+
/* center child elements for fullWidth */
|
83
|
+
.Button-content--alignStart {
|
84
|
+
justify-content: start;
|
85
|
+
}
|
86
|
+
/* button child elements */
|
87
|
+
/* align svg */
|
88
|
+
.Button-visual {
|
89
|
+
display: flex;
|
90
|
+
pointer-events: none; /* allow click handler to work, avoiding visuals */
|
91
|
+
}
|
92
|
+
.Button-visual .Counter {
|
93
|
+
color: inherit;
|
94
|
+
background-color: var(--buttonCounter-default-bgColor-rest);
|
95
|
+
}
|
96
|
+
.Button-label {
|
97
|
+
line-height: var(--text-body-lineHeight-medium);
|
98
|
+
white-space: nowrap;
|
99
|
+
grid-area: text;
|
100
|
+
}
|
101
|
+
.Button-leadingVisual {
|
102
|
+
grid-area: leadingVisual;
|
103
|
+
}
|
104
|
+
.Button-leadingVisual svg {
|
105
|
+
fill: currentcolor;
|
106
|
+
}
|
107
|
+
.Button-trailingVisual {
|
108
|
+
grid-area: trailingVisual;
|
109
|
+
}
|
110
|
+
.Button-trailingAction {
|
111
|
+
margin-right: calc(var(--base-size-4) * -1);
|
112
|
+
}
|
113
|
+
/* sizes */
|
114
|
+
.Button--small {
|
115
|
+
min-width: var(--control-small-size);
|
116
|
+
height: var(--control-small-size);
|
117
|
+
padding: 0 var(--control-small-paddingInline-condensed);
|
118
|
+
font-size: var(--text-body-size-small);
|
119
|
+
gap: var(--control-small-gap);
|
120
|
+
}
|
121
|
+
.Button--small .Button-label {
|
122
|
+
line-height: var(--text-body-lineHeight-small);
|
123
|
+
}
|
124
|
+
:is(.Button--small .Button-content) > :not(:last-child) {
|
125
|
+
margin-right: var(--control-small-gap);
|
126
|
+
}
|
127
|
+
.Button--large {
|
128
|
+
height: var(--control-large-size);
|
129
|
+
padding: 0 var(--control-large-paddingInline-spacious);
|
130
|
+
gap: var(--control-large-gap);
|
131
|
+
}
|
132
|
+
.Button--large .Button-label {
|
133
|
+
line-height: var(--text-body-lineHeight-large);
|
134
|
+
}
|
135
|
+
:is(.Button--large .Button-content) > :not(:last-child) {
|
136
|
+
margin-right: var(--control-large-gap);
|
137
|
+
}
|
138
|
+
.Button--fullWidth {
|
139
|
+
width: 100%;
|
140
|
+
}
|
141
|
+
/* allow button label text to wrap */
|
142
|
+
.Button--labelWrap {
|
143
|
+
min-width: fit-content;
|
144
|
+
height: unset;
|
145
|
+
min-height: var(--control-medium-size);
|
146
|
+
}
|
147
|
+
.Button--labelWrap .Button-content {
|
148
|
+
flex: 1 1 auto;
|
149
|
+
align-self: stretch;
|
150
|
+
padding-block: calc(var(--control-medium-paddingBlock) - var(--base-size-2));
|
151
|
+
}
|
152
|
+
.Button--labelWrap .Button-label {
|
153
|
+
white-space: unset;
|
154
|
+
}
|
155
|
+
.Button--labelWrap.Button--small {
|
156
|
+
height: unset;
|
157
|
+
min-height: var(--control-small-size);
|
158
|
+
}
|
159
|
+
.Button--labelWrap.Button--small .Button-content {
|
160
|
+
padding-block: calc(var(--control-small-paddingBlock) - var(--base-size-2));
|
161
|
+
}
|
162
|
+
.Button--labelWrap.Button--large {
|
163
|
+
height: unset;
|
164
|
+
min-height: var(--control-large-size);
|
165
|
+
padding-inline: var(--control-large-paddingInline-spacious);
|
166
|
+
}
|
167
|
+
.Button--labelWrap.Button--large .Button-content {
|
168
|
+
padding-block: calc(var(--control-large-paddingBlock) - var(--base-size-2));
|
169
|
+
}
|
170
|
+
/* variants */
|
171
|
+
/* primary */
|
172
|
+
.Button--primary {
|
173
|
+
color: var(--button-primary-fgColor-rest);
|
174
|
+
fill: var(--button-primary-iconColor-rest);
|
175
|
+
background-color: var(--button-primary-bgColor-rest);
|
176
|
+
border-color: var(--button-primary-borderColor-rest);
|
177
|
+
box-shadow: var(--shadow-resting-small, var(--color-btn-primary-shadow));
|
178
|
+
}
|
179
|
+
.Button--primary.Button--iconOnly {
|
180
|
+
color: var(--button-primary-iconColor-rest);
|
181
|
+
}
|
182
|
+
.Button--primary:hover:not(:disabled,.Button--inactive) {
|
183
|
+
background-color: var(--button-primary-bgColor-hover);
|
184
|
+
border-color: var(--button-primary-borderColor-hover);
|
185
|
+
}
|
186
|
+
/* fallback :focus state */
|
187
|
+
.Button--primary:focus {
|
188
|
+
outline: 2px solid var(--focus-outlineColor);
|
189
|
+
outline-offset: -2px;
|
190
|
+
box-shadow: inset 0 0 0 3px var(--fgColor-onEmphasis);
|
191
|
+
|
192
|
+
/* remove fallback :focus if :focus-visible is supported */
|
193
|
+
}
|
194
|
+
.Button--primary:focus:not(:focus-visible) {
|
195
|
+
outline: solid 1px transparent;
|
196
|
+
box-shadow: none;
|
197
|
+
}
|
198
|
+
/* default focus state */
|
199
|
+
.Button--primary:focus-visible {
|
200
|
+
outline: 2px solid var(--focus-outlineColor);
|
201
|
+
outline-offset: -2px;
|
202
|
+
box-shadow: inset 0 0 0 3px var(--fgColor-onEmphasis);
|
203
|
+
}
|
204
|
+
.Button--primary:active:not(:disabled),.Button--primary[aria-pressed='true'] {
|
205
|
+
background-color: var(--button-primary-bgColor-active);
|
206
|
+
box-shadow: var(--button-primary-shadow-selected);
|
207
|
+
}
|
208
|
+
.Button--primary:disabled,.Button--primary[aria-disabled='true'] {
|
209
|
+
color: var(--button-primary-fgColor-disabled);
|
210
|
+
fill: var(--button-primary-fgColor-disabled);
|
211
|
+
background-color: var(--button-primary-bgColor-disabled);
|
212
|
+
border-color: var(--button-primary-borderColor-disabled);
|
213
|
+
}
|
214
|
+
.Button--primary .Counter {
|
215
|
+
color: inherit;
|
216
|
+
background-color: var(--buttonCounter-primary-bgColor-rest);
|
217
|
+
}
|
218
|
+
/* default (secondary) */
|
219
|
+
.Button--secondary {
|
220
|
+
color: var(--button-default-fgColor-rest);
|
221
|
+
fill: var(--fgColor-muted); /* help this */
|
222
|
+
background-color: var(--button-default-bgColor-rest);
|
223
|
+
border-color: var(--button-default-borderColor-rest);
|
224
|
+
box-shadow: var(--button-default-shadow-resting), var(--button-default-shadow-inset);
|
225
|
+
}
|
226
|
+
.Button--secondary:hover:not(:disabled,.Button--inactive) {
|
227
|
+
background-color: var(--button-default-bgColor-hover);
|
228
|
+
border-color: var(--button-default-borderColor-hover);
|
229
|
+
}
|
230
|
+
.Button--secondary:active:not(:disabled) {
|
231
|
+
background-color: var(--button-default-bgColor-active);
|
232
|
+
border-color: var(--button-default-borderColor-active);
|
233
|
+
}
|
234
|
+
.Button--secondary[aria-pressed='true'] {
|
235
|
+
background-color: var(--button-default-bgColor-selected);
|
236
|
+
box-shadow: var(--shadow-inset);
|
237
|
+
}
|
238
|
+
.Button--secondary:disabled,.Button--secondary[aria-disabled='true'] {
|
239
|
+
color: var(--control-fgColor-disabled);
|
240
|
+
fill: var(--control-fgColor-disabled);
|
241
|
+
background-color: var(--button-default-bgColor-disabled);
|
242
|
+
border-color: var(--button-default-borderColor-disabled);
|
243
|
+
}
|
244
|
+
.Button--invisible {
|
245
|
+
color: var(--button-invisible-fgColor-rest);
|
246
|
+
}
|
247
|
+
.Button--invisible.Button--iconOnly {
|
248
|
+
color: var(--button-invisible-iconColor-rest, var(--color-fg-muted));
|
249
|
+
}
|
250
|
+
.Button--invisible:hover:not(:disabled,.Button--inactive) {
|
251
|
+
background-color: var(--control-transparent-bgColor-hover, var(--color-action-list-item-default-hover-bg));
|
252
|
+
}
|
253
|
+
.Button--invisible[aria-pressed='true'],.Button--invisible:active:not(:disabled) {
|
254
|
+
background-color: var(--button-invisible-bgColor-active);
|
255
|
+
}
|
256
|
+
.Button--invisible:disabled,.Button--invisible[aria-disabled='true'] {
|
257
|
+
color: var(--button-invisible-fgColor-disabled);
|
258
|
+
fill: var(--button-invisible-fgColor-disabled);
|
259
|
+
background-color: var(--button-invisible-bgColor-disabled);
|
260
|
+
border-color: var(--button-invisible-borderColor-disabled);
|
261
|
+
}
|
262
|
+
/* if button has no visuals, use link blue for text */
|
263
|
+
.Button--invisible.Button--invisible-noVisuals .Button-label {
|
264
|
+
color: var(--button-invisible-fgColor-rest);
|
265
|
+
}
|
266
|
+
.Button--invisible .Button-visual {
|
267
|
+
color: var(--button-invisible-iconColor-rest, var(--color-fg-muted));
|
268
|
+
}
|
269
|
+
:is(.Button--invisible .Button-visual) .Counter {
|
270
|
+
color: var(--fgColor-default);
|
271
|
+
}
|
272
|
+
.Button--link {
|
273
|
+
display: inline-block;
|
274
|
+
min-width: fit-content;
|
275
|
+
height: unset;
|
276
|
+
padding: 0;
|
277
|
+
font-size: inherit;
|
278
|
+
color: var(--fgColor-link);
|
279
|
+
fill: var(--fgColor-link);
|
280
|
+
border: none;
|
281
|
+
}
|
282
|
+
.Button--link:hover:not(:disabled,.Button--inactive) {
|
283
|
+
-webkit-text-decoration: underline;
|
284
|
+
text-decoration: underline;
|
285
|
+
}
|
286
|
+
.Button--link:focus-visible,.Button--link:focus {
|
287
|
+
outline-offset: 2px;
|
288
|
+
}
|
289
|
+
.Button--link:disabled,.Button--link[aria-disabled='true'] {
|
290
|
+
color: var(--control-fgColor-disabled);
|
291
|
+
fill: var(--control-fgColor-disabled);
|
292
|
+
background-color: transparent;
|
293
|
+
border-color: transparent;
|
294
|
+
}
|
295
|
+
.Button--link .Button-label {
|
296
|
+
white-space: unset;
|
297
|
+
}
|
298
|
+
/* danger */
|
299
|
+
.Button--danger {
|
300
|
+
color: var(--button-danger-fgColor-rest);
|
301
|
+
fill: var(--button-danger-iconColor-rest);
|
302
|
+
background-color: var(--button-danger-bgColor-rest);
|
303
|
+
border-color: var(--button-danger-borderColor-rest);
|
304
|
+
box-shadow: var(--button-default-shadow-resting), var(--button-default-shadow-inset);
|
305
|
+
}
|
306
|
+
.Button--danger.Button--iconOnly {
|
307
|
+
color: var(--button-danger-iconColor-rest);
|
308
|
+
}
|
309
|
+
.Button--danger:hover:not(:disabled,.Button--inactive) {
|
310
|
+
color: var(--button-danger-fgColor-hover);
|
311
|
+
fill: var(--button-danger-fgColor-hover);
|
312
|
+
background-color: var(--button-danger-bgColor-hover);
|
313
|
+
border-color: var(--button-danger-borderColor-hover);
|
314
|
+
box-shadow: var(--shadow-resting-small);
|
315
|
+
}
|
316
|
+
.Button--danger:hover:not(:disabled,.Button--inactive) .Counter {
|
317
|
+
color: var(--buttonCounter-danger-fgColor-hover);
|
318
|
+
background-color: var(--buttonCounter-danger-bgColor-hover);
|
319
|
+
}
|
320
|
+
.Button--danger:active:not(:disabled),.Button--danger[aria-pressed='true'] {
|
321
|
+
color: var(--button-danger-fgColor-active);
|
322
|
+
fill: var(--button-danger-fgColor-active);
|
323
|
+
background-color: var(--button-danger-bgColor-active);
|
324
|
+
border-color: var(--button-danger-borderColor-active);
|
325
|
+
box-shadow: var(--button-danger-shadow-selected);
|
326
|
+
}
|
327
|
+
.Button--danger:disabled,.Button--danger[aria-disabled='true'] {
|
328
|
+
color: var(--button-danger-fgColor-disabled);
|
329
|
+
fill: var(--button-danger-fgColor-disabled);
|
330
|
+
background-color: var(--button-danger-bgColor-disabled);
|
331
|
+
border-color: var(--button-default-borderColor-disabled);
|
332
|
+
}
|
333
|
+
:is(.Button--danger:disabled,.Button--danger[aria-disabled='true']) .Counter {
|
334
|
+
color: var(--buttonCounter-danger-fgColor-disabled);
|
335
|
+
background-color: var(--buttonCounter-danger-bgColor-disabled);
|
336
|
+
}
|
337
|
+
.Button--danger .Counter {
|
338
|
+
color: var(--buttonCounter-danger-fgColor-rest);
|
339
|
+
background-color: var(--buttonCounter-danger-bgColor-rest);
|
340
|
+
}
|
341
|
+
.Button--iconOnly {
|
342
|
+
display: inline-grid;
|
343
|
+
width: var(--control-medium-size);
|
344
|
+
padding: unset;
|
345
|
+
place-content: center;
|
346
|
+
}
|
347
|
+
.Button--iconOnly.Button--small {
|
348
|
+
width: var(--control-small-size);
|
349
|
+
}
|
350
|
+
.Button--iconOnly.Button--large {
|
351
|
+
width: var(--control-large-size);
|
352
|
+
}
|
353
|
+
/* `disabled` takes precedence over `inactive` */
|
354
|
+
.Button--inactive:not([aria-disabled='true'], :disabled) {
|
355
|
+
color: var(--button-inactive-fgColor);
|
356
|
+
cursor: default;
|
357
|
+
background-color: var(--button-inactive-bgColor);
|
358
|
+
border: 0;
|
359
|
+
}
|
@@ -3,15 +3,15 @@
|
|
3
3
|
"selectors": [
|
4
4
|
":root",
|
5
5
|
".Button",
|
6
|
-
":is(.Button
|
6
|
+
":is(.Button::before)",
|
7
7
|
".Button:hover",
|
8
8
|
".Button:active",
|
9
9
|
".Button:disabled",
|
10
|
-
".Button[aria-disabled=true]",
|
10
|
+
".Button[aria-disabled='true']",
|
11
11
|
".Button.Button--iconOnly",
|
12
12
|
":is(a.Button,summary.Button):hover",
|
13
13
|
".Button-content",
|
14
|
-
".Button-content
|
14
|
+
".Button-content > :not(:last-child)",
|
15
15
|
".Button-content--alignStart",
|
16
16
|
".Button-visual",
|
17
17
|
".Button-visual .Counter",
|
@@ -22,10 +22,10 @@
|
|
22
22
|
".Button-trailingAction",
|
23
23
|
".Button--small",
|
24
24
|
".Button--small .Button-label",
|
25
|
-
":is(.Button--small .Button-content)
|
25
|
+
":is(.Button--small .Button-content) > :not(:last-child)",
|
26
26
|
".Button--large",
|
27
27
|
".Button--large .Button-label",
|
28
|
-
":is(.Button--large .Button-content)
|
28
|
+
":is(.Button--large .Button-content) > :not(:last-child)",
|
29
29
|
".Button--fullWidth",
|
30
30
|
".Button--labelWrap",
|
31
31
|
".Button--labelWrap .Button-content",
|
@@ -41,46 +41,46 @@
|
|
41
41
|
".Button--primary:focus:not(:focus-visible)",
|
42
42
|
".Button--primary:focus-visible",
|
43
43
|
".Button--primary:active:not(:disabled)",
|
44
|
-
".Button--primary[aria-pressed=true]",
|
44
|
+
".Button--primary[aria-pressed='true']",
|
45
45
|
".Button--primary:disabled",
|
46
|
-
".Button--primary[aria-disabled=true]",
|
46
|
+
".Button--primary[aria-disabled='true']",
|
47
47
|
".Button--primary .Counter",
|
48
48
|
".Button--secondary",
|
49
49
|
".Button--secondary:hover:not(:disabled,.Button--inactive)",
|
50
50
|
".Button--secondary:active:not(:disabled)",
|
51
|
-
".Button--secondary[aria-pressed=true]",
|
51
|
+
".Button--secondary[aria-pressed='true']",
|
52
52
|
".Button--secondary:disabled",
|
53
|
-
".Button--secondary[aria-disabled=true]",
|
53
|
+
".Button--secondary[aria-disabled='true']",
|
54
54
|
".Button--invisible",
|
55
55
|
".Button--invisible.Button--iconOnly",
|
56
56
|
".Button--invisible:hover:not(:disabled,.Button--inactive)",
|
57
|
+
".Button--invisible[aria-pressed='true']",
|
57
58
|
".Button--invisible:active:not(:disabled)",
|
58
|
-
".Button--invisible[aria-pressed=true]",
|
59
59
|
".Button--invisible:disabled",
|
60
|
-
".Button--invisible[aria-disabled=true]",
|
60
|
+
".Button--invisible[aria-disabled='true']",
|
61
61
|
".Button--invisible.Button--invisible-noVisuals .Button-label",
|
62
62
|
".Button--invisible .Button-visual",
|
63
63
|
":is(.Button--invisible .Button-visual) .Counter",
|
64
64
|
".Button--link",
|
65
65
|
".Button--link:hover:not(:disabled,.Button--inactive)",
|
66
|
-
".Button--link:focus",
|
67
66
|
".Button--link:focus-visible",
|
67
|
+
".Button--link:focus",
|
68
68
|
".Button--link:disabled",
|
69
|
-
".Button--link[aria-disabled=true]",
|
69
|
+
".Button--link[aria-disabled='true']",
|
70
70
|
".Button--link .Button-label",
|
71
71
|
".Button--danger",
|
72
72
|
".Button--danger.Button--iconOnly",
|
73
73
|
".Button--danger:hover:not(:disabled,.Button--inactive)",
|
74
74
|
".Button--danger:hover:not(:disabled,.Button--inactive) .Counter",
|
75
75
|
".Button--danger:active:not(:disabled)",
|
76
|
-
".Button--danger[aria-pressed=true]",
|
76
|
+
".Button--danger[aria-pressed='true']",
|
77
77
|
".Button--danger:disabled",
|
78
|
-
".Button--danger[aria-disabled=true]",
|
79
|
-
":is(.Button--danger:disabled,.Button--danger[aria-disabled=true]) .Counter",
|
78
|
+
".Button--danger[aria-disabled='true']",
|
79
|
+
":is(.Button--danger:disabled,.Button--danger[aria-disabled='true']) .Counter",
|
80
80
|
".Button--danger .Counter",
|
81
81
|
".Button--iconOnly",
|
82
82
|
".Button--iconOnly.Button--small",
|
83
83
|
".Button--iconOnly.Button--large",
|
84
|
-
".Button--inactive:not([aria-disabled=true]
|
84
|
+
".Button--inactive:not([aria-disabled='true'], :disabled)"
|
85
85
|
]
|
86
86
|
}
|
@@ -1 +1,20 @@
|
|
1
|
-
.ButtonGroup
|
1
|
+
.ButtonGroup {
|
2
|
+
display: inline-flex;
|
3
|
+
}
|
4
|
+
.ButtonGroup .Button {
|
5
|
+
/* stylelint-disable-next-line primer/spacing */
|
6
|
+
margin-inline-end: -1px;
|
7
|
+
position: relative;
|
8
|
+
border-radius: 0;
|
9
|
+
}
|
10
|
+
:is(.ButtonGroup .Button):focus,:is(.ButtonGroup .Button):active,:is(.ButtonGroup .Button):hover {
|
11
|
+
z-index: 1;
|
12
|
+
}
|
13
|
+
.ButtonGroup > :first-child .Button {
|
14
|
+
border-top-left-radius: var(--borderRadius-medium);
|
15
|
+
border-bottom-left-radius: var(--borderRadius-medium);
|
16
|
+
}
|
17
|
+
.ButtonGroup > :last-child .Button {
|
18
|
+
border-top-right-radius: var(--borderRadius-medium);
|
19
|
+
border-bottom-right-radius: var(--borderRadius-medium);
|
20
|
+
}
|
@@ -3,10 +3,10 @@
|
|
3
3
|
"selectors": [
|
4
4
|
".ButtonGroup",
|
5
5
|
".ButtonGroup .Button",
|
6
|
-
":is(.ButtonGroup .Button):active",
|
7
6
|
":is(.ButtonGroup .Button):focus",
|
7
|
+
":is(.ButtonGroup .Button):active",
|
8
8
|
":is(.ButtonGroup .Button):hover",
|
9
|
-
".ButtonGroup
|
10
|
-
".ButtonGroup
|
9
|
+
".ButtonGroup > :first-child .Button",
|
10
|
+
".ButtonGroup > :last-child .Button"
|
11
11
|
]
|
12
12
|
}
|
@@ -1 +1,38 @@
|
|
1
|
-
|
1
|
+
/* Counter */
|
2
|
+
|
3
|
+
.Counter {
|
4
|
+
display: inline-block;
|
5
|
+
min-width: var(--base-size-20); /* makes sure it's a circle with just one digit */
|
6
|
+
padding: 0 var(--base-size-6);
|
7
|
+
font-size: var(--text-body-size-small);
|
8
|
+
font-weight: var(--base-text-weight-medium);
|
9
|
+
/* stylelint-disable-next-line primer/typography */
|
10
|
+
line-height: calc(var(--base-size-20) - var(--borderWidth-thin) * 2); /* 20px - 2px for the borders */
|
11
|
+
color: var(--fgColor-default);
|
12
|
+
text-align: center;
|
13
|
+
background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted));
|
14
|
+
border: var(--borderWidth-thin) solid var(--counter-borderColor);
|
15
|
+
/* stylelint-disable-next-line primer/borders */
|
16
|
+
border-radius: 2em;
|
17
|
+
}
|
18
|
+
|
19
|
+
.Counter:empty {
|
20
|
+
display: none;
|
21
|
+
}
|
22
|
+
|
23
|
+
/* Is this selector used? could not find any use of it */
|
24
|
+
|
25
|
+
.Counter .octicon {
|
26
|
+
vertical-align: text-top;
|
27
|
+
opacity: 0.8;
|
28
|
+
}
|
29
|
+
|
30
|
+
.Counter--primary {
|
31
|
+
color: var(--fgColor-onEmphasis);
|
32
|
+
background-color: var(--bgColor-neutral-emphasis);
|
33
|
+
}
|
34
|
+
|
35
|
+
.Counter--secondary {
|
36
|
+
color: var(--fgColor-muted);
|
37
|
+
background-color: var(--bgColor-neutral-muted);
|
38
|
+
}
|