@papillonbits/components 1.1.0 → 1.2.0
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/build/primer/Alert/Alert.js +3 -3
- package/build/primer/Alert/Alert.scss +9 -169
- package/build/primer/Blankslate/Blankslate.scss +1 -93
- package/build/primer/Box/box-overlay.scss +9 -4
- package/build/primer/Box/box.scss +1 -297
- package/build/primer/BranchName/branch-name.scss +9 -6
- package/build/primer/Breadcrumb/Breadcrumb.scss +1 -46
- package/build/primer/Button/Button.scss +77 -76
- package/build/primer/Button/ButtonGroup.scss +13 -1
- package/build/primer/Dropdown/Dropdown.scss +1 -283
- package/build/primer/ErrorBoundary/ErrorBoundary.js +2 -3
- package/build/primer/Form/FormControl.scss +1 -674
- package/build/primer/Form/form-control.scss +45 -40
- package/build/primer/Form/form-group.scss +63 -34
- package/build/primer/Form/form-select.scss +5 -2
- package/build/primer/Form/index.scss +0 -1
- package/build/primer/Form/input-group.scss +12 -1
- package/build/primer/Form/radio-group.scss +17 -9
- package/build/primer/Grid/FlexGrid/FlexGrid.js +3 -3
- package/build/primer/Grid/FlexGrid/FlexGrid.scss +3 -1
- package/build/primer/Label/counters.scss +1 -40
- package/build/primer/Label/index.scss +0 -1
- package/build/primer/Label/issue-labels.scss +3 -0
- package/build/primer/Label/labels.scss +1 -94
- package/build/primer/Label/mixins.scss +7 -0
- package/build/primer/Label/states.scss +1 -60
- package/build/primer/Layout/app-frame.scss +13 -13
- package/build/primer/Layout/grid-offset.scss +2 -2
- package/build/primer/Layout/grid.scss +9 -9
- package/build/primer/Layout/index.scss +0 -1
- package/build/primer/Layout/layout.scss +1 -183
- package/build/primer/Layout/page-layout.scss +59 -28
- package/build/primer/Layout/stack.scss +9 -8
- package/build/primer/Navigation/Menu/Menu.scss +1 -123
- package/build/primer/Navigation/TabNav/TabNav.scss +1 -120
- package/build/primer/Navigation/UnderlineNav/UnderlineNav.scss +1 -141
- package/build/primer/Pagination/PreviousNext/PreviousNext.scss +16 -23
- package/build/primer/Popover/Popover.scss +1 -227
- package/build/primer/Progress/Progress.scss +1 -29
- package/build/primer/SelectMenu/SelectMenu.scss +88 -64
- package/build/primer/Subhead/Subhead.scss +1 -52
- package/build/primer/Toast/Toast.scss +31 -27
- package/build/primer/index.js +4 -1
- package/package.json +4 -4
- package/build/primer/Form/form-validation.scss +0 -370
- package/build/primer/Label/diffstat.scss +0 -37
- package/build/primer/Layout/mixins.scss +0 -108
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// stylelint-disable no-duplicate-selectors
|
|
5
5
|
// stylelint-disable media-query-no-invalid
|
|
6
6
|
|
|
7
|
-
$Layout-divider-color: var(--color-border-default) !default;
|
|
7
|
+
$Layout-divider-color: var(--borderColor-default, var(--color-border-default)) !default;
|
|
8
8
|
$Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
9
9
|
|
|
10
10
|
:root {
|
|
@@ -12,16 +12,45 @@ $Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
|
12
12
|
--Layout-content-width: 100%;
|
|
13
13
|
--Layout-template-columns: 1fr var(--Layout-pane-width);
|
|
14
14
|
--Layout-template-areas: 'content pane';
|
|
15
|
-
--Layout-column-gap:
|
|
16
|
-
--Layout-row-gap:
|
|
15
|
+
--Layout-column-gap: var(--base-size-16);
|
|
16
|
+
--Layout-row-gap: var(--base-size-16);
|
|
17
17
|
|
|
18
18
|
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
19
|
-
// stylelint-disable length-zero-no-unit
|
|
20
19
|
--Layout-outer-spacing-x: 0px; // wrapper margin x
|
|
21
20
|
--Layout-outer-spacing-y: 0px; // wrapper margin y
|
|
22
21
|
--Layout-inner-spacing-min: 0px; // default region padding
|
|
23
22
|
--Layout-inner-spacing-max: 0px; // relaxed content horizontal padding
|
|
24
|
-
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Layout beta mixins
|
|
26
|
+
|
|
27
|
+
// responsive region dividers
|
|
28
|
+
|
|
29
|
+
@mixin Layout-line-divider {
|
|
30
|
+
position: absolute;
|
|
31
|
+
// stylelint-disable-next-line primer/spacing
|
|
32
|
+
left: calc(var(--Layout-outer-spacing-x) * -1);
|
|
33
|
+
display: block;
|
|
34
|
+
width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
|
|
35
|
+
height: 1px;
|
|
36
|
+
content: '';
|
|
37
|
+
background-color: $Layout-divider-color;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin Layout-filled-divider {
|
|
41
|
+
position: absolute;
|
|
42
|
+
bottom: calc(var(--base-size-8) * -1);
|
|
43
|
+
// stylelint-disable-next-line primer/spacing
|
|
44
|
+
left: calc(var(--Layout-outer-spacing-x) * -1);
|
|
45
|
+
display: block;
|
|
46
|
+
width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
|
|
47
|
+
height: var(--base-size-8);
|
|
48
|
+
content: '';
|
|
49
|
+
background-color: var(--bgColor-inset, var(--color-canvas-inset));
|
|
50
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
51
|
+
box-shadow:
|
|
52
|
+
inset 0 1px $Layout-divider-color,
|
|
53
|
+
inset 0 -1px $Layout-divider-color;
|
|
25
54
|
}
|
|
26
55
|
|
|
27
56
|
.PageLayout {
|
|
@@ -231,6 +260,7 @@ $Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
|
231
260
|
&::before {
|
|
232
261
|
@include Layout-line-divider;
|
|
233
262
|
|
|
263
|
+
// stylelint-disable-next-line primer/spacing
|
|
234
264
|
top: calc(#{$border-width * -1} - var(--Layout-row-gap));
|
|
235
265
|
}
|
|
236
266
|
}
|
|
@@ -243,6 +273,7 @@ $Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
|
243
273
|
&::after {
|
|
244
274
|
@include Layout-line-divider;
|
|
245
275
|
|
|
276
|
+
// stylelint-disable-next-line primer/spacing
|
|
246
277
|
bottom: calc(#{$border-width * -1} - var(--Layout-row-gap));
|
|
247
278
|
}
|
|
248
279
|
}
|
|
@@ -250,24 +281,26 @@ $Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
|
250
281
|
.PageLayout-region--dividerNarrow-filled-before {
|
|
251
282
|
position: relative;
|
|
252
283
|
// stylelint-disable-next-line primer/spacing
|
|
253
|
-
margin-top: calc(
|
|
284
|
+
margin-top: calc(var(--base-size-8) + var(--Layout-row-gap));
|
|
254
285
|
|
|
255
286
|
&::after {
|
|
256
287
|
@include Layout-filled-divider;
|
|
257
288
|
|
|
258
|
-
|
|
289
|
+
// stylelint-disable-next-line primer/spacing
|
|
290
|
+
top: calc(calc(var(--base-size-8) * -1) - var(--Layout-row-gap));
|
|
259
291
|
}
|
|
260
292
|
}
|
|
261
293
|
|
|
262
294
|
.PageLayout-region--dividerNarrow-filled-after {
|
|
263
295
|
position: relative;
|
|
264
296
|
// stylelint-disable-next-line primer/spacing
|
|
265
|
-
margin-bottom: calc(
|
|
297
|
+
margin-bottom: calc(var(--base-size-8) + var(--Layout-row-gap));
|
|
266
298
|
|
|
267
299
|
&::before {
|
|
268
300
|
@include Layout-filled-divider;
|
|
269
301
|
|
|
270
|
-
|
|
302
|
+
// stylelint-disable-next-line primer/spacing
|
|
303
|
+
bottom: calc(calc(var(--base-size-8) * -1) - var(--Layout-row-gap));
|
|
271
304
|
}
|
|
272
305
|
}
|
|
273
306
|
}
|
|
@@ -306,74 +339,72 @@ $Layout-responsive-variant-max-breakpoint: 'md' !default;
|
|
|
306
339
|
// outer spacing
|
|
307
340
|
|
|
308
341
|
.PageLayout--outerSpacing-normal {
|
|
309
|
-
--Layout-outer-spacing-x:
|
|
310
|
-
--Layout-outer-spacing-y:
|
|
342
|
+
--Layout-outer-spacing-x: var(--base-size-16);
|
|
343
|
+
--Layout-outer-spacing-y: var(--base-size-16);
|
|
311
344
|
|
|
312
345
|
@include breakpoint(lg) {
|
|
313
|
-
--Layout-outer-spacing-x:
|
|
314
|
-
--Layout-outer-spacing-y:
|
|
346
|
+
--Layout-outer-spacing-x: var(--base-size-24);
|
|
347
|
+
--Layout-outer-spacing-y: var(--base-size-24);
|
|
315
348
|
}
|
|
316
349
|
}
|
|
317
350
|
|
|
318
351
|
.PageLayout--outerSpacing-condensed {
|
|
319
|
-
--Layout-outer-spacing-x:
|
|
320
|
-
--Layout-outer-spacing-y:
|
|
352
|
+
--Layout-outer-spacing-x: var(--base-size-16);
|
|
353
|
+
--Layout-outer-spacing-y: var(--base-size-16);
|
|
321
354
|
}
|
|
322
355
|
|
|
323
356
|
// inner spacing
|
|
324
357
|
|
|
325
358
|
.PageLayout--innerSpacing-normal {
|
|
326
|
-
--Layout-inner-spacing-min:
|
|
327
|
-
--Layout-inner-spacing-max:
|
|
359
|
+
--Layout-inner-spacing-min: var(--base-size-16);
|
|
360
|
+
--Layout-inner-spacing-max: var(--base-size-16);
|
|
328
361
|
|
|
329
362
|
@include breakpoint(lg) {
|
|
330
|
-
--Layout-inner-spacing-max:
|
|
363
|
+
--Layout-inner-spacing-max: var(--base-size-24);
|
|
331
364
|
}
|
|
332
365
|
}
|
|
333
366
|
|
|
334
367
|
.PageLayout--innerSpacing-condensed {
|
|
335
|
-
--Layout-inner-spacing-min:
|
|
336
|
-
--Layout-inner-spacing-max:
|
|
368
|
+
--Layout-inner-spacing-min: var(--base-size-16);
|
|
369
|
+
--Layout-inner-spacing-max: var(--base-size-16);
|
|
337
370
|
}
|
|
338
371
|
|
|
339
372
|
// column gap
|
|
340
373
|
|
|
341
374
|
.PageLayout--columnGap-normal {
|
|
342
|
-
--Layout-column-gap:
|
|
375
|
+
--Layout-column-gap: var(--base-size-16);
|
|
343
376
|
|
|
344
377
|
@include breakpoint(lg) {
|
|
345
|
-
--Layout-column-gap:
|
|
378
|
+
--Layout-column-gap: var(--base-size-24);
|
|
346
379
|
}
|
|
347
380
|
}
|
|
348
381
|
|
|
349
382
|
.PageLayout--columnGap-condensed {
|
|
350
|
-
--Layout-column-gap:
|
|
383
|
+
--Layout-column-gap: var(--base-size-16);
|
|
351
384
|
}
|
|
352
385
|
|
|
353
386
|
.PageLayout--columnGap-none {
|
|
354
387
|
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
355
|
-
// stylelint-disable-next-line length-zero-no-unit
|
|
356
388
|
--Layout-column-gap: 0px;
|
|
357
389
|
}
|
|
358
390
|
|
|
359
391
|
// row gap
|
|
360
392
|
|
|
361
393
|
.PageLayout--rowGap-normal {
|
|
362
|
-
--Layout-row-gap:
|
|
394
|
+
--Layout-row-gap: var(--base-size-16);
|
|
363
395
|
|
|
364
396
|
@include breakpoint(lg) {
|
|
365
|
-
--Layout-row-gap:
|
|
397
|
+
--Layout-row-gap: var(--base-size-24);
|
|
366
398
|
}
|
|
367
399
|
}
|
|
368
400
|
|
|
369
401
|
.PageLayout--rowGap-none {
|
|
370
402
|
// the `px` unit is mandatory for `calc()` execution. See https://stackoverflow.com/a/32518348
|
|
371
|
-
// stylelint-disable length-zero-no-unit
|
|
372
403
|
--Layout-row-gap: 0px;
|
|
373
404
|
}
|
|
374
405
|
|
|
375
406
|
.PageLayout--rowGap-condensed {
|
|
376
|
-
--Layout-row-gap:
|
|
407
|
+
--Layout-row-gap: var(--base-size-16);
|
|
377
408
|
}
|
|
378
409
|
|
|
379
410
|
// regions
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// stylelint-disable custom-property-pattern
|
|
2
|
-
// Stack layout helper component
|
|
3
2
|
// stylelint-disable media-query-no-invalid
|
|
4
3
|
|
|
4
|
+
// Stack layout helper component
|
|
5
|
+
|
|
5
6
|
.Stack {
|
|
6
7
|
// A Stack component lays elements horizontally or vertically on the page.
|
|
7
8
|
//
|
|
@@ -26,12 +27,12 @@
|
|
|
26
27
|
// │ ├─ &.Stack-item--expand-[ whenNarrow | whenRegular | whenWide ]
|
|
27
28
|
// │ ├─ &.Stack-item--keepSize-[ whenNarrow | whenRegular | whenWide ]
|
|
28
29
|
|
|
29
|
-
$Stack-gap-default: var(--
|
|
30
|
+
$Stack-gap-default: var(--stack-gap-normal, 16px);
|
|
30
31
|
|
|
31
32
|
--Stack-gap-whenRegular: #{$Stack-gap-default};
|
|
32
33
|
--Stack-gap-whenNarrow: #{$Stack-gap-default};
|
|
33
34
|
--Stack-gap-whenWide: var(--Stack-gap-whenRegular);
|
|
34
|
-
--Stack-divider-color: var(--color-border-default);
|
|
35
|
+
--Stack-divider-color: var(--borderColor-default, var(--color-border-default));
|
|
35
36
|
|
|
36
37
|
display: flex;
|
|
37
38
|
flex-flow: column;
|
|
@@ -66,18 +67,18 @@
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
.Stack--gap-condensed#{$viewportRange} {
|
|
69
|
-
--Stack-gap#{$viewportRange}: var(--
|
|
70
|
+
--Stack-gap#{$viewportRange}: var(--stack-gap-condensed, 8px);
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
.Stack--gap-normal#{$viewportRange} {
|
|
73
|
-
--Stack-gap#{$viewportRange}: var(--
|
|
74
|
+
--Stack-gap#{$viewportRange}: var(--stack-gap-normal, 16px);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
// There's no .Stack--gap-spacious-whenNarrow
|
|
77
78
|
// Narrow viewports render `spacious` gap as `normal`
|
|
78
79
|
@if $viewportRange != '-whenNarrow' {
|
|
79
80
|
.Stack--gap-spacious#{$viewportRange} {
|
|
80
|
-
--Stack-gap#{$viewportRange}: var(--
|
|
81
|
+
--Stack-gap#{$viewportRange}: var(--stack-gap-spacious, 24px);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -162,14 +163,14 @@
|
|
|
162
163
|
|
|
163
164
|
:not(.Stack--dir-inline#{$viewportRange}) > .Stack-divider,
|
|
164
165
|
:not(.Stack--dir-inline#{$viewportRange}) > .Stack-item > .Stack-divider {
|
|
165
|
-
border-block-end: var(--
|
|
166
|
+
border-block-end: var(--borderWidth-thin, var(--borderWidth-thin)) solid var(--Stack-divider-color);
|
|
166
167
|
inline-size: auto;
|
|
167
168
|
block-size: 0;
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
.Stack--dir-inline#{$viewportRange} > .Stack-divider,
|
|
171
172
|
.Stack--dir-inline#{$viewportRange} > .Stack-item > .Stack-divider {
|
|
172
|
-
border-inline-end: var(--
|
|
173
|
+
border-inline-end: var(--borderWidth-thin, var(--borderWidth-thin)) solid var(--Stack-divider-color);
|
|
173
174
|
inline-size: 0;
|
|
174
175
|
block-size: auto;
|
|
175
176
|
}
|
|
@@ -1,123 +1 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '~@papillonbits/css/build/primer/support/variables/layout.scss';
|
|
3
|
-
@import '~@papillonbits/css/build/primer/support/variables/typography.scss';
|
|
4
|
-
|
|
5
|
-
// Side menu
|
|
6
|
-
//
|
|
7
|
-
// A menu on the side of a page, defaults to left side. e.g. github.com/about
|
|
8
|
-
|
|
9
|
-
.menu {
|
|
10
|
-
margin-bottom: $spacer-3;
|
|
11
|
-
list-style: none;
|
|
12
|
-
background-color: var(--color-canvas-default);
|
|
13
|
-
border: $border-width $border-style var(--color-border-default);
|
|
14
|
-
border-radius: $border-radius;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.menu-item {
|
|
18
|
-
position: relative;
|
|
19
|
-
display: block;
|
|
20
|
-
padding: $spacer-2 $spacer-3;
|
|
21
|
-
color: var(--color-fg-default);
|
|
22
|
-
border-bottom: $border-width $border-style var(--color-border-muted);
|
|
23
|
-
|
|
24
|
-
&:first-child {
|
|
25
|
-
border-top: 0;
|
|
26
|
-
border-top-left-radius: $border-radius;
|
|
27
|
-
border-top-right-radius: $border-radius;
|
|
28
|
-
|
|
29
|
-
&::before {
|
|
30
|
-
border-top-left-radius: $border-radius;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:last-child {
|
|
35
|
-
border-bottom: 0;
|
|
36
|
-
border-bottom-right-radius: $border-radius;
|
|
37
|
-
border-bottom-left-radius: $border-radius;
|
|
38
|
-
|
|
39
|
-
&::before {
|
|
40
|
-
border-bottom-left-radius: $border-radius;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
text-decoration: none;
|
|
46
|
-
background-color: var(--color-neutral-subtle);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:active {
|
|
50
|
-
background-color: var(--color-canvas-subtle);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&.selected,
|
|
54
|
-
&[aria-selected='true'],
|
|
55
|
-
&[aria-current]:not([aria-current='false']) {
|
|
56
|
-
cursor: default;
|
|
57
|
-
background-color: var(--color-menu-bg-active);
|
|
58
|
-
|
|
59
|
-
&::before {
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 0;
|
|
62
|
-
bottom: 0;
|
|
63
|
-
left: 0;
|
|
64
|
-
width: 2px;
|
|
65
|
-
content: '';
|
|
66
|
-
background-color: var(--color-primer-border-active);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.octicon {
|
|
71
|
-
width: 16px;
|
|
72
|
-
margin-right: $spacer-2;
|
|
73
|
-
color: var(--color-fg-muted);
|
|
74
|
-
text-align: center;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.Counter {
|
|
78
|
-
float: right;
|
|
79
|
-
margin-left: $spacer-1;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.menu-warning {
|
|
83
|
-
float: right;
|
|
84
|
-
color: var(--color-attention-fg);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.avatar {
|
|
88
|
-
float: left;
|
|
89
|
-
margin-right: $spacer-1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.alert {
|
|
93
|
-
.Counter {
|
|
94
|
-
color: var(--color-danger-fg);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.menu-heading {
|
|
100
|
-
display: block;
|
|
101
|
-
padding: $spacer-2 $spacer-3;
|
|
102
|
-
margin-top: 0;
|
|
103
|
-
margin-bottom: 0;
|
|
104
|
-
font-size: inherit;
|
|
105
|
-
font-weight: $font-weight-bold;
|
|
106
|
-
color: var(--color-fg-default);
|
|
107
|
-
border-bottom: $border-width $border-style var(--color-border-muted);
|
|
108
|
-
|
|
109
|
-
&:hover {
|
|
110
|
-
text-decoration: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&:first-child {
|
|
114
|
-
border-top-left-radius: $border-radius;
|
|
115
|
-
border-top-right-radius: $border-radius;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&:last-child {
|
|
119
|
-
border-bottom: 0;
|
|
120
|
-
border-bottom-right-radius: $border-radius;
|
|
121
|
-
border-bottom-left-radius: $border-radius;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
1
|
+
@import '@primer/view-components/app/components/primer/alpha/menu';
|
|
@@ -1,120 +1 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '~@papillonbits/css/build/primer/support/variables/layout.scss';
|
|
3
|
-
@import '~@papillonbits/css/build/primer/support/variables/typography.scss';
|
|
4
|
-
|
|
5
|
-
// Outer wrapper
|
|
6
|
-
// stylelint-disable no-descending-specificity
|
|
7
|
-
// stylelint-disable selector-max-type
|
|
8
|
-
.tabnav {
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
margin-bottom: $spacer-3;
|
|
11
|
-
border-bottom: $border-width $border-style var(--color-border-default);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tabnav-tabs {
|
|
15
|
-
display: flex;
|
|
16
|
-
// stylelint-disable-next-line primer/spacing
|
|
17
|
-
margin-bottom: -1px;
|
|
18
|
-
overflow: auto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.tabnav-tab {
|
|
22
|
-
display: inline-block;
|
|
23
|
-
flex-shrink: 0;
|
|
24
|
-
padding: $spacer-2 $spacer-3;
|
|
25
|
-
font-size: $h5-size;
|
|
26
|
-
// stylelint-disable-next-line primer/typography
|
|
27
|
-
line-height: 23px;
|
|
28
|
-
color: var(--color-fg-muted);
|
|
29
|
-
text-decoration: none;
|
|
30
|
-
background-color: transparent;
|
|
31
|
-
border: $border-width $border-style transparent;
|
|
32
|
-
border-bottom: 0;
|
|
33
|
-
transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
|
|
34
|
-
|
|
35
|
-
&.selected,
|
|
36
|
-
&[aria-selected='true'],
|
|
37
|
-
&[aria-current]:not([aria-current='false']) {
|
|
38
|
-
color: var(--color-fg-default);
|
|
39
|
-
background-color: var(--color-canvas-default); // cover bottom border
|
|
40
|
-
border-color: var(--color-border-default);
|
|
41
|
-
border-radius: $border-radius $border-radius 0 0;
|
|
42
|
-
|
|
43
|
-
.octicon {
|
|
44
|
-
color: inherit;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:hover {
|
|
49
|
-
color: var(--color-fg-default);
|
|
50
|
-
text-decoration: none;
|
|
51
|
-
transition-duration: 0.1s;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:focus,
|
|
55
|
-
&:focus-visible {
|
|
56
|
-
border-radius: $border-radius $border-radius 0 0 !important;
|
|
57
|
-
outline-offset: -6px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:active {
|
|
61
|
-
color: var(--color-fg-muted);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.octicon {
|
|
65
|
-
margin-right: $spacer-1;
|
|
66
|
-
color: var(--color-fg-muted);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.Counter {
|
|
70
|
-
margin-left: $spacer-1;
|
|
71
|
-
color: inherit;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Tabnav extras
|
|
76
|
-
//
|
|
77
|
-
// Tabnav extras are non-tab elements that sit in the tabnav. Usually they're
|
|
78
|
-
// inline text or links.
|
|
79
|
-
|
|
80
|
-
.tabnav-extra {
|
|
81
|
-
display: inline-block;
|
|
82
|
-
// stylelint-disable-next-line primer/spacing
|
|
83
|
-
padding-top: 10px;
|
|
84
|
-
// stylelint-disable-next-line primer/spacing
|
|
85
|
-
margin-left: 10px;
|
|
86
|
-
font-size: $font-size-small;
|
|
87
|
-
color: var(--color-fg-muted);
|
|
88
|
-
|
|
89
|
-
> .octicon {
|
|
90
|
-
// stylelint-disable-next-line primer/spacing
|
|
91
|
-
margin-right: 2px;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// When tabnav-extra are anchors
|
|
96
|
-
// stylelint-disable-next-line selector-no-qualifying-type
|
|
97
|
-
a.tabnav-extra:hover {
|
|
98
|
-
color: var(--color-accent-fg);
|
|
99
|
-
text-decoration: none;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Tabnav buttons
|
|
103
|
-
//
|
|
104
|
-
// For when there are multiple buttons, space them out appropriately. Requires
|
|
105
|
-
// the buttons to be floated or inline-block.
|
|
106
|
-
|
|
107
|
-
.tabnav-btn {
|
|
108
|
-
margin-left: $spacer-2;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// custom-style
|
|
112
|
-
// .tabnav-inactive,
|
|
113
|
-
// .tabnav-tab-inactive {
|
|
114
|
-
// @include inactive;
|
|
115
|
-
// }
|
|
116
|
-
|
|
117
|
-
// custom-style
|
|
118
|
-
.tabnav-tab-hidden {
|
|
119
|
-
display: none;
|
|
120
|
-
}
|
|
1
|
+
@import '@primer/view-components/app/components/primer/alpha/tab_nav';
|
|
@@ -1,141 +1 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '~@papillonbits/css/build/primer/support/variables/misc.scss';
|
|
3
|
-
@import '~@papillonbits/css/build/primer/support/variables/layout.scss';
|
|
4
|
-
@import '~@papillonbits/css/build/primer/support/variables/typography.scss';
|
|
5
|
-
|
|
6
|
-
// stylelint-disable no-descending-specificity
|
|
7
|
-
$nav-height: $spacer-3 * 3 !default; // 48px
|
|
8
|
-
|
|
9
|
-
.UnderlineNav {
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: $nav-height;
|
|
12
|
-
overflow: auto hidden;
|
|
13
|
-
// stylelint-disable-next-line primer/box-shadow
|
|
14
|
-
box-shadow: inset 0 -1px 0 var(--color-border-muted);
|
|
15
|
-
-webkit-overflow-scrolling: auto;
|
|
16
|
-
justify-content: space-between;
|
|
17
|
-
|
|
18
|
-
.Counter {
|
|
19
|
-
margin-left: $spacer-2;
|
|
20
|
-
color: var(--color-fg-default);
|
|
21
|
-
background-color: var(--color-neutral-muted);
|
|
22
|
-
|
|
23
|
-
&--primary {
|
|
24
|
-
color: var(--color-fg-on-emphasis);
|
|
25
|
-
background-color: var(--color-neutral-emphasis);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.UnderlineNav-body {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
gap: $spacer-2;
|
|
34
|
-
list-style: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.UnderlineNav-item {
|
|
38
|
-
position: relative;
|
|
39
|
-
display: flex;
|
|
40
|
-
padding: 0 $spacer-2;
|
|
41
|
-
font-size: $body-font-size;
|
|
42
|
-
// stylelint-disable-next-line primer/typography
|
|
43
|
-
line-height: 30px;
|
|
44
|
-
color: var(--color-fg-default);
|
|
45
|
-
text-align: center;
|
|
46
|
-
white-space: nowrap;
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
background-color: transparent;
|
|
49
|
-
border: 0;
|
|
50
|
-
border-radius: $border-radius;
|
|
51
|
-
align-items: center;
|
|
52
|
-
|
|
53
|
-
&:hover,
|
|
54
|
-
&:focus,
|
|
55
|
-
&:focus-visible {
|
|
56
|
-
color: var(--color-fg-default);
|
|
57
|
-
text-decoration: none;
|
|
58
|
-
border-bottom-color: var(--color-neutral-muted);
|
|
59
|
-
outline-offset: -2px;
|
|
60
|
-
transition: border-bottom-color 0.12s ease-out;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// renders a visibly hidden "copy" of the label in bold, reserving box space for when label becomes bold on selected
|
|
64
|
-
[data-content]::before {
|
|
65
|
-
display: block;
|
|
66
|
-
height: 0;
|
|
67
|
-
font-weight: $font-weight-bold;
|
|
68
|
-
visibility: hidden;
|
|
69
|
-
content: attr(data-content);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// increase touch target area
|
|
73
|
-
&::before {
|
|
74
|
-
@include minTouchTarget($min-height: $nav-height);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// hover state was "sticking" on mobile after click
|
|
78
|
-
@media (pointer: fine) {
|
|
79
|
-
&:hover {
|
|
80
|
-
color: var(--color-fg-default);
|
|
81
|
-
text-decoration: none;
|
|
82
|
-
background: var(--color-action-list-item-default-hover-bg);
|
|
83
|
-
transition: background 0.12s ease-out;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&.selected,
|
|
88
|
-
&[role='tab'][aria-selected='true'],
|
|
89
|
-
&[aria-current]:not([aria-current='false']) {
|
|
90
|
-
font-weight: $font-weight-bold;
|
|
91
|
-
color: var(--color-fg-default);
|
|
92
|
-
border-bottom-color: var(--color-primer-border-active);
|
|
93
|
-
|
|
94
|
-
// current/selected underline
|
|
95
|
-
&::after {
|
|
96
|
-
position: absolute;
|
|
97
|
-
right: 50%;
|
|
98
|
-
// 48px total height / 2 (24px) + 1px
|
|
99
|
-
bottom: calc(50% - 25px);
|
|
100
|
-
width: 100%;
|
|
101
|
-
height: 2px;
|
|
102
|
-
content: '';
|
|
103
|
-
background: var(--color-primer-border-active);
|
|
104
|
-
border-radius: $border-radius;
|
|
105
|
-
transform: translate(50%, -50%);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.UnderlineNav--right {
|
|
111
|
-
justify-content: flex-end;
|
|
112
|
-
|
|
113
|
-
.UnderlineNav-actions {
|
|
114
|
-
flex: 1 1 auto;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.UnderlineNav-actions {
|
|
119
|
-
align-self: center;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.UnderlineNav--full {
|
|
123
|
-
display: block;
|
|
124
|
-
|
|
125
|
-
// required for underline to align with additional wrapper element
|
|
126
|
-
.UnderlineNav-body {
|
|
127
|
-
min-height: $nav-height;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.UnderlineNav-octicon {
|
|
132
|
-
display: inline !important;
|
|
133
|
-
margin-right: $spacer-2;
|
|
134
|
-
color: var(--color-fg-muted);
|
|
135
|
-
fill: var(--color-fg-muted);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.UnderlineNav-container {
|
|
139
|
-
display: flex;
|
|
140
|
-
justify-content: space-between;
|
|
141
|
-
}
|
|
1
|
+
@import '@primer/view-components/app/components/primer/alpha/underline_nav';
|