@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
@@ -1 +1,38 @@
|
|
1
|
-
|
1
|
+
/* Progress */
|
2
|
+
|
3
|
+
.Progress {
|
4
|
+
display: flex;
|
5
|
+
height: 8px;
|
6
|
+
overflow: hidden;
|
7
|
+
background-color: var(--progressBar-track-bgColor);
|
8
|
+
border-radius: var(--borderRadius-medium);
|
9
|
+
outline: solid 1px var(--progressBar-track-borderColor);
|
10
|
+
outline-offset: -1px;
|
11
|
+
}
|
12
|
+
|
13
|
+
.Progress--large {
|
14
|
+
height: 10px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.Progress--small {
|
18
|
+
height: 5px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.Progress-item {
|
22
|
+
outline: 2px solid transparent; /* Support Firefox custom colors */
|
23
|
+
background: LinkText;
|
24
|
+
}
|
25
|
+
|
26
|
+
.Progress-item + .Progress-item {
|
27
|
+
margin-left: var(--base-size-2);
|
28
|
+
}
|
29
|
+
|
30
|
+
@media (forced-colors: active) {
|
31
|
+
:root {
|
32
|
+
--progressBar-track-bgColor: CanvasText;
|
33
|
+
}
|
34
|
+
|
35
|
+
.Progress, .Progress-item {
|
36
|
+
forced-color-adjust: none;
|
37
|
+
}
|
38
|
+
}
|
@@ -1 +1,60 @@
|
|
1
|
-
|
1
|
+
/* State */
|
2
|
+
|
3
|
+
/* Default 32px */
|
4
|
+
|
5
|
+
.state, /* TODO: Deprecate */
|
6
|
+
.State {
|
7
|
+
display: inline-block;
|
8
|
+
/* stylelint-disable-next-line primer/spacing */
|
9
|
+
padding: var(--base-size-4) var(--control-medium-paddingInline-normal);
|
10
|
+
font-size: var(--text-body-size-medium);
|
11
|
+
font-weight: var(--base-text-weight-medium);
|
12
|
+
/* stylelint-disable-next-line primer/typography */
|
13
|
+
line-height: var(--control-medium-lineBoxHeight);
|
14
|
+
text-align: center;
|
15
|
+
white-space: nowrap;
|
16
|
+
/* stylelint-disable-next-line primer/borders */
|
17
|
+
border-radius: 2em;
|
18
|
+
}
|
19
|
+
|
20
|
+
.state, /* TODO: Deprecate */
|
21
|
+
.State,
|
22
|
+
.State--draft {
|
23
|
+
color: var(--fgColor-onEmphasis);
|
24
|
+
/* stylelint-disable-next-line primer/colors */
|
25
|
+
background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));
|
26
|
+
border: var(--borderWidth-thin) solid transparent;
|
27
|
+
box-shadow: var(--boxShadow-thin) var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis));
|
28
|
+
}
|
29
|
+
|
30
|
+
.State--open {
|
31
|
+
color: var(--fgColor-onEmphasis);
|
32
|
+
background-color: var(--bgColor-open-emphasis, var(--color-open-emphasis));
|
33
|
+
box-shadow: var(--boxShadow-thin) var(--borderColor-open-emphasis);
|
34
|
+
}
|
35
|
+
|
36
|
+
.State--merged {
|
37
|
+
color: var(--fgColor-onEmphasis);
|
38
|
+
background-color: var(--bgColor-done-emphasis, var(--color-done-emphasis));
|
39
|
+
box-shadow: var(--boxShadow-thin) var(--borderColor-done-emphasis);
|
40
|
+
}
|
41
|
+
|
42
|
+
.State--closed {
|
43
|
+
color: var(--fgColor-onEmphasis);
|
44
|
+
background-color: var(--bgColor-closed-emphasis, var(--color-closed-emphasis));
|
45
|
+
box-shadow: var(--boxShadow-thin) var(--borderColor-closed-emphasis);
|
46
|
+
}
|
47
|
+
|
48
|
+
/* Small 24px */
|
49
|
+
|
50
|
+
.State--small {
|
51
|
+
/* stylelint-disable-next-line primer/spacing */
|
52
|
+
padding: 0 10px;
|
53
|
+
font-size: var(--text-body-size-small);
|
54
|
+
/* stylelint-disable-next-line primer/typography */
|
55
|
+
line-height: var(--base-size-24);
|
56
|
+
}
|
57
|
+
|
58
|
+
.State--small .octicon {
|
59
|
+
width: 1em; /* Ensures different icons don't change State indicator width */
|
60
|
+
}
|
@@ -1 +1,64 @@
|
|
1
|
-
|
1
|
+
/* Subhead */
|
2
|
+
|
3
|
+
.Subhead {
|
4
|
+
display: flex;
|
5
|
+
/* stylelint-disable-next-line primer/spacing */
|
6
|
+
padding-bottom: var(--stack-padding-condensed);
|
7
|
+
/* stylelint-disable-next-line primer/spacing */
|
8
|
+
margin-bottom: var(--stack-gap-normal);
|
9
|
+
border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);
|
10
|
+
flex-flow: row wrap;
|
11
|
+
justify-content: flex-end; /* Keep actions right aligned. */
|
12
|
+
}
|
13
|
+
|
14
|
+
/* Modifier class to give a lot of breathing room between sections of content. */
|
15
|
+
|
16
|
+
.Subhead--spacious {
|
17
|
+
margin-top: var(--base-size-40);
|
18
|
+
}
|
19
|
+
|
20
|
+
/* <h2> sized heading with normal font weight */
|
21
|
+
|
22
|
+
.Subhead-heading {
|
23
|
+
font-weight: var(--base-text-weight-normal);
|
24
|
+
flex: 1 1 auto;
|
25
|
+
order: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
.Subhead-heading--large {
|
29
|
+
/* stylelint-disable-next-line primer/typography */
|
30
|
+
font-size: var(--base-size-24);
|
31
|
+
}
|
32
|
+
|
33
|
+
.Subhead-heading--medium {
|
34
|
+
font-size: var(--text-title-size-medium);
|
35
|
+
}
|
36
|
+
|
37
|
+
/* Make the text bold and red for dangerous content */
|
38
|
+
|
39
|
+
.Subhead-heading--danger {
|
40
|
+
font-weight: var(--base-text-weight-semibold);
|
41
|
+
color: var(--fgColor-danger);
|
42
|
+
}
|
43
|
+
|
44
|
+
/* One-liner of supporting text */
|
45
|
+
|
46
|
+
.Subhead-description {
|
47
|
+
font-size: var(--text-body-size-medium);
|
48
|
+
color: var(--fgColor-muted);
|
49
|
+
flex: 1 100%;
|
50
|
+
order: 2;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* Add 1 or 2 buttons to the right of the heading */
|
54
|
+
|
55
|
+
.Subhead-actions {
|
56
|
+
margin: var(--base-size-4) 0 var(--base-size-4) var(--base-size-4);
|
57
|
+
align-self: center;
|
58
|
+
justify-content: flex-end;
|
59
|
+
order: 1;
|
60
|
+
}
|
61
|
+
|
62
|
+
.Subhead-actions + .Subhead-description {
|
63
|
+
margin-top: var(--base-size-4);
|
64
|
+
}
|
@@ -1 +1,106 @@
|
|
1
|
-
|
1
|
+
/* TimelineItem */
|
2
|
+
|
3
|
+
.TimelineItem {
|
4
|
+
position: relative;
|
5
|
+
display: flex;
|
6
|
+
/* stylelint-disable-next-line primer/spacing */
|
7
|
+
padding: var(--stack-padding-normal) 0;
|
8
|
+
/* stylelint-disable-next-line primer/spacing */
|
9
|
+
margin-left: var(--stack-gap-normal);
|
10
|
+
|
11
|
+
/* The Timeline */
|
12
|
+
}
|
13
|
+
|
14
|
+
.TimelineItem::before {
|
15
|
+
position: absolute;
|
16
|
+
top: 0;
|
17
|
+
bottom: 0;
|
18
|
+
left: 0;
|
19
|
+
display: block;
|
20
|
+
width: var(--borderWidth-thick);
|
21
|
+
content: '';
|
22
|
+
/* stylelint-disable-next-line primer/colors */
|
23
|
+
background-color: var(--borderColor-muted);
|
24
|
+
}
|
25
|
+
|
26
|
+
.TimelineItem:target .TimelineItem-badge {
|
27
|
+
border-color: var(--borderColor-accent-emphasis);
|
28
|
+
/* stylelint-disable-next-line primer/box-shadow */
|
29
|
+
box-shadow: 0 0 0.2em var(--borderColor-accent-muted);
|
30
|
+
}
|
31
|
+
|
32
|
+
.TimelineItem-badge {
|
33
|
+
position: relative;
|
34
|
+
z-index: 1;
|
35
|
+
display: flex;
|
36
|
+
width: var(--control-medium-size);
|
37
|
+
height: var(--control-medium-size);
|
38
|
+
/* stylelint-disable-next-line primer/spacing */
|
39
|
+
margin-right: var(--controlStack-medium-gap-condensed);
|
40
|
+
/* stylelint-disable-next-line primer/spacing */
|
41
|
+
margin-left: calc(var(--control-medium-size) / -2 + 1px);
|
42
|
+
color: var(--fgColor-muted);
|
43
|
+
align-items: center;
|
44
|
+
background-color: var(--timelineBadge-bgColor);
|
45
|
+
/* stylelint-disable-next-line primer/colors */
|
46
|
+
border: var(--borderWidth-thick) solid var(--bgColor-default);
|
47
|
+
border-radius: 50%;
|
48
|
+
justify-content: center;
|
49
|
+
flex-shrink: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
.TimelineItem-badge--success {
|
53
|
+
color: var(--fgColor-onEmphasis);
|
54
|
+
background-color: var(--bgColor-success-emphasis);
|
55
|
+
border: var(--borderWidth-thin) solid transparent;
|
56
|
+
}
|
57
|
+
|
58
|
+
.TimelineItem-body {
|
59
|
+
min-width: 0;
|
60
|
+
max-width: 100%;
|
61
|
+
margin-top: var(--base-size-4);
|
62
|
+
color: var(--fgColor-muted);
|
63
|
+
flex: auto;
|
64
|
+
}
|
65
|
+
|
66
|
+
.TimelineItem-avatar {
|
67
|
+
position: absolute;
|
68
|
+
/* stylelint-disable-next-line primer/spacing */
|
69
|
+
left: -72px;
|
70
|
+
z-index: 1;
|
71
|
+
}
|
72
|
+
|
73
|
+
.TimelineItem-break {
|
74
|
+
position: relative;
|
75
|
+
z-index: 1;
|
76
|
+
height: var(--stack-gap-spacious);
|
77
|
+
margin: 0;
|
78
|
+
/* stylelint-disable-next-line primer/spacing */
|
79
|
+
margin-bottom: calc(var(--stack-gap-normal) * -1);
|
80
|
+
/* stylelint-disable-next-line primer/spacing */
|
81
|
+
margin-left: -56px;
|
82
|
+
background-color: var(--bgColor-default);
|
83
|
+
border: 0;
|
84
|
+
border-top: var(--borderWidth-thicker) solid var(--borderColor-default);
|
85
|
+
}
|
86
|
+
|
87
|
+
.TimelineItem--condensed {
|
88
|
+
padding-top: var(--base-size-4);
|
89
|
+
padding-bottom: 0;
|
90
|
+
|
91
|
+
/* TimelineItem--condensed is often grouped. (commits) */
|
92
|
+
}
|
93
|
+
|
94
|
+
.TimelineItem--condensed:last-child {
|
95
|
+
/* stylelint-disable-next-line primer/spacing */
|
96
|
+
padding-bottom: var(--stack-gap-normal);
|
97
|
+
}
|
98
|
+
|
99
|
+
.TimelineItem--condensed .TimelineItem-badge {
|
100
|
+
height: var(--base-size-16);
|
101
|
+
margin-top: var(--base-size-8);
|
102
|
+
margin-bottom: var(--base-size-8);
|
103
|
+
color: var(--fgColor-muted);
|
104
|
+
background-color: var(--bgColor-default);
|
105
|
+
border: 0;
|
106
|
+
}
|
@@ -1 +1,30 @@
|
|
1
|
-
|
1
|
+
/* Truncate */
|
2
|
+
|
3
|
+
.Truncate {
|
4
|
+
display: inline-flex;
|
5
|
+
min-width: 0;
|
6
|
+
max-width: 100%;
|
7
|
+
}
|
8
|
+
|
9
|
+
.Truncate > .Truncate-text {
|
10
|
+
min-width: 1ch;
|
11
|
+
max-width: fit-content;
|
12
|
+
overflow: hidden;
|
13
|
+
text-overflow: ellipsis;
|
14
|
+
white-space: nowrap;
|
15
|
+
}
|
16
|
+
|
17
|
+
:is(.Truncate > .Truncate-text) + .Truncate-text {
|
18
|
+
/* stylelint-disable-next-line primer/spacing */
|
19
|
+
margin-left: var(--control-small-gap);
|
20
|
+
}
|
21
|
+
|
22
|
+
.Truncate-text--primary:is(.Truncate > .Truncate-text) {
|
23
|
+
flex-basis: 200%;
|
24
|
+
}
|
25
|
+
|
26
|
+
.Truncate-text--expandable:is(.Truncate > .Truncate-text):hover,.Truncate-text--expandable:is(.Truncate > .Truncate-text):focus,.Truncate-text--expandable:is(.Truncate > .Truncate-text):active {
|
27
|
+
max-width: 100% !important;
|
28
|
+
flex-shrink: 0;
|
29
|
+
cursor: pointer;
|
30
|
+
}
|
@@ -2,11 +2,11 @@
|
|
2
2
|
"name": "beta/truncate",
|
3
3
|
"selectors": [
|
4
4
|
".Truncate",
|
5
|
-
".Truncate
|
6
|
-
":is(.Truncate
|
7
|
-
".Truncate-text--primary:is(.Truncate
|
8
|
-
".Truncate-text--expandable:is(.Truncate
|
9
|
-
".Truncate-text--expandable:is(.Truncate
|
10
|
-
".Truncate-text--expandable:is(.Truncate
|
5
|
+
".Truncate > .Truncate-text",
|
6
|
+
":is(.Truncate > .Truncate-text) + .Truncate-text",
|
7
|
+
".Truncate-text--primary:is(.Truncate > .Truncate-text)",
|
8
|
+
".Truncate-text--expandable:is(.Truncate > .Truncate-text):hover",
|
9
|
+
".Truncate-text--expandable:is(.Truncate > .Truncate-text):focus",
|
10
|
+
".Truncate-text--expandable:is(.Truncate > .Truncate-text):active"
|
11
11
|
]
|
12
12
|
}
|
@@ -1 +1,23 @@
|
|
1
|
-
|
1
|
+
/* CSS truncate */
|
2
|
+
|
3
|
+
/* css-truncate will shorten text with an ellipsis. */
|
4
|
+
|
5
|
+
/* css-truncate-overflow will shorten text with an ellipsis when overflowing */
|
6
|
+
|
7
|
+
.css-truncate.css-truncate-overflow,.css-truncate .css-truncate-overflow,.css-truncate.css-truncate-target,.css-truncate .css-truncate-target {
|
8
|
+
overflow: hidden;
|
9
|
+
text-overflow: ellipsis;
|
10
|
+
white-space: nowrap;
|
11
|
+
}
|
12
|
+
|
13
|
+
/* css-truncate-target will shorten text with an ellipsis and a max width */
|
14
|
+
|
15
|
+
.css-truncate.css-truncate-target,.css-truncate .css-truncate-target {
|
16
|
+
display: inline-block;
|
17
|
+
max-width: 125px;
|
18
|
+
vertical-align: top;
|
19
|
+
}
|
20
|
+
|
21
|
+
.css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target,.css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target,.css-truncate.expandable:hover .css-truncate-target,.css-truncate.expandable.css-truncate-target:hover {
|
22
|
+
max-width: 10000px !important;
|
23
|
+
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "truncate",
|
3
3
|
"selectors": [
|
4
|
-
".css-truncate .css-truncate-overflow",
|
5
|
-
".css-truncate .css-truncate-target",
|
6
4
|
".css-truncate.css-truncate-overflow",
|
5
|
+
".css-truncate .css-truncate-overflow",
|
7
6
|
".css-truncate.css-truncate-target",
|
8
|
-
".css-truncate.
|
7
|
+
".css-truncate .css-truncate-target",
|
9
8
|
".css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target",
|
10
9
|
".css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target",
|
11
|
-
".css-truncate.expandable:hover .css-truncate-target"
|
10
|
+
".css-truncate.expandable:hover .css-truncate-target",
|
11
|
+
".css-truncate.expandable.css-truncate-target:hover"
|
12
12
|
]
|
13
13
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.45.
|
3
|
+
"version": "0.45.2",
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
6
6
|
"module": "app/components/primer/primer.js",
|