@primer/view-components 0.3.0-rc.dc2abcf9 → 0.3.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/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/assets/styles/primer_view_components.css +4999 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_list.css +710 -1
- package/app/components/primer/alpha/action_list.css.json +77 -77
- package/app/components/primer/alpha/auto_complete.css +130 -1
- package/app/components/primer/alpha/auto_complete.css.json +4 -4
- package/app/components/primer/alpha/banner.css +131 -1
- package/app/components/primer/alpha/banner.css.json +2 -2
- package/app/components/primer/alpha/button_marketing.css +204 -1
- package/app/components/primer/alpha/button_marketing.css.json +9 -9
- package/app/components/primer/alpha/dialog.css +607 -1
- package/app/components/primer/alpha/dialog.css.json +10 -10
- package/app/components/primer/alpha/dropdown.css +265 -1
- package/app/components/primer/alpha/dropdown.css.json +19 -19
- package/app/components/primer/alpha/layout.css +398 -1
- package/app/components/primer/alpha/layout.css.json +16 -16
- package/app/components/primer/alpha/menu.css +117 -1
- package/app/components/primer/alpha/menu.css.json +7 -7
- package/app/components/primer/alpha/overlay.css +32 -1
- package/app/components/primer/alpha/overlay.css.json +3 -2
- package/app/components/primer/alpha/segmented_control.css +175 -1
- package/app/components/primer/alpha/segmented_control.css.json +7 -7
- package/app/components/primer/alpha/tab_nav.css +106 -1
- package/app/components/primer/alpha/tab_nav.css.json +6 -6
- package/app/components/primer/alpha/text_field.css +849 -1
- package/app/components/primer/alpha/text_field.css.json +45 -45
- package/app/components/primer/alpha/toggle_switch.css +228 -1
- package/app/components/primer/alpha/toggle_switch.css.json +10 -10
- package/app/components/primer/alpha/underline_nav.css +149 -1
- package/app/components/primer/alpha/underline_nav.css.json +8 -8
- package/app/components/primer/anchored_position.js +1 -3
- package/app/components/primer/beta/avatar.css +74 -1
- package/app/components/primer/beta/avatar_stack.css +138 -1
- package/app/components/primer/beta/avatar_stack.css.json +6 -6
- package/app/components/primer/beta/blankslate.css +90 -1
- package/app/components/primer/beta/border_box.css +279 -1
- package/app/components/primer/beta/border_box.css.json +4 -4
- package/app/components/primer/beta/breadcrumbs.css +27 -1
- package/app/components/primer/beta/breadcrumbs.css.json +3 -3
- package/app/components/primer/beta/button.css +385 -1
- package/app/components/primer/beta/button.css.json +16 -16
- package/app/components/primer/beta/button_group.css +23 -1
- package/app/components/primer/beta/button_group.css.json +5 -5
- package/app/components/primer/beta/counter.css +36 -1
- package/app/components/primer/beta/flash.css +150 -1
- package/app/components/primer/beta/label.css +105 -1
- package/app/components/primer/beta/label.css.json +4 -4
- package/app/components/primer/beta/link.css +62 -1
- package/app/components/primer/beta/link.css.json +3 -3
- package/app/components/primer/beta/popover.css +235 -1
- package/app/components/primer/beta/popover.css.json +29 -29
- package/app/components/primer/beta/progress_bar.css +26 -1
- package/app/components/primer/beta/progress_bar.css.json +1 -1
- package/app/components/primer/beta/state.css +50 -1
- package/app/components/primer/beta/state.css.json +1 -1
- package/app/components/primer/beta/subhead.css +54 -1
- package/app/components/primer/beta/subhead.css.json +1 -1
- package/app/components/primer/beta/timeline_item.css +95 -1
- package/app/components/primer/beta/timeline_item.css.json +1 -1
- package/app/components/primer/beta/truncate.css +37 -1
- package/app/components/primer/beta/truncate.css.json +6 -6
- package/app/components/primer/truncate.css +30 -1
- package/app/components/primer/truncate.css.json +4 -4
- package/package.json +1 -1
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/* Progress */
|
|
2
|
+
|
|
3
|
+
.Progress {
|
|
4
|
+
display: flex;
|
|
5
|
+
height: 8px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
background-color: var(--bgColor-neutral-muted,var(--color-neutral-muted));
|
|
8
|
+
border-radius: 6px;
|
|
9
|
+
outline: 1px solid transparent; /* Support Firefox custom colors */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.Progress--large {
|
|
13
|
+
height: 10px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.Progress--small {
|
|
17
|
+
height: 5px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.Progress-item {
|
|
21
|
+
outline: 2px solid transparent; /* Support Firefox custom colors */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Progress-item + .Progress-item {
|
|
25
|
+
margin-left: 2px;
|
|
26
|
+
}
|
|
@@ -1 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
/* State */
|
|
2
|
+
|
|
3
|
+
/* Default 32px */
|
|
4
|
+
|
|
5
|
+
.state, /* TODO: Deprecate */
|
|
6
|
+
.State {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
padding: 5px var(--control-medium-paddingInline-normal,0.75rem);
|
|
9
|
+
font-size: var(--text-body-size-medium,0.875rem);
|
|
10
|
+
font-weight: var(--base-text-weight-medium,500);
|
|
11
|
+
line-height: var(--control-medium-lineBoxHeight,1.25rem);
|
|
12
|
+
text-align: center;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
border-radius: 2em;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.state, /* TODO: Deprecate */
|
|
18
|
+
.State,
|
|
19
|
+
.State--draft {
|
|
20
|
+
color: var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));
|
|
21
|
+
background-color: var(--bgColor-neutral-emphasis,var(--color-fg-subtle));
|
|
22
|
+
border: var(--borderWidth-thin,max(1px, 0.0625rem)) solid transparent;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.State--open {
|
|
26
|
+
color: var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));
|
|
27
|
+
background-color: var(--bgColor-open-emphasis,var(--color-open-fg));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.State--merged {
|
|
31
|
+
color: var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));
|
|
32
|
+
background-color: var(--bgColor-done-emphasis,var(--color-done-fg));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.State--closed {
|
|
36
|
+
color: var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));
|
|
37
|
+
background-color: var(--bgColor-closed-emphasis,var(--color-closed-fg));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Small 24px */
|
|
41
|
+
|
|
42
|
+
.State--small {
|
|
43
|
+
padding: 0 10px;
|
|
44
|
+
font-size: var(--text-body-size-small,0.75rem);
|
|
45
|
+
line-height: var(--base-size-24,1.5rem);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.State--small .octicon {
|
|
49
|
+
width: 1em; /* Ensures different icons don't change State indicator width */
|
|
50
|
+
}
|
|
@@ -1 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
/* Subhead */
|
|
2
|
+
|
|
3
|
+
.Subhead {
|
|
4
|
+
display: flex;
|
|
5
|
+
padding-bottom: var(--stack-padding-condensed,0.5rem);
|
|
6
|
+
margin-bottom: var(--stack-gap-normal,1rem);
|
|
7
|
+
border-bottom: var(--borderWidth-thin,max(1px, 0.0625rem)) solid var(--borderColor-muted,var(--color-neutral-muted));
|
|
8
|
+
flex-flow: row wrap;
|
|
9
|
+
justify-content: flex-end; /* Keep actions right aligned. */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Modifier class to give a lot of breathing room between sections of content. */
|
|
13
|
+
|
|
14
|
+
.Subhead--spacious {
|
|
15
|
+
margin-top: var(--base-size-40,2.5rem);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* <h2> sized heading with normal font weight */
|
|
19
|
+
|
|
20
|
+
.Subhead-heading {
|
|
21
|
+
font-size: 24px;
|
|
22
|
+
font-weight: var(--base-text-weight-normal,400);
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
order: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Make the text bold and red for dangerous content */
|
|
28
|
+
|
|
29
|
+
.Subhead-heading--danger {
|
|
30
|
+
font-weight: var(--base-text-weight-semibold,600);
|
|
31
|
+
color: var(--fgColor-danger,var(--color-danger-fg));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* One-liner of supporting text */
|
|
35
|
+
|
|
36
|
+
.Subhead-description {
|
|
37
|
+
font-size: var(--text-body-size-medium,0.875rem);
|
|
38
|
+
color: var(--fgColor-muted,var(--color-fg-muted));
|
|
39
|
+
flex: 1 100%;
|
|
40
|
+
order: 2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Add 1 or 2 buttons to the right of the heading */
|
|
44
|
+
|
|
45
|
+
.Subhead-actions {
|
|
46
|
+
margin: var(--base-size-4,0.25rem) 0 var(--base-size-4,0.25rem) var(--base-size-4,0.25rem);
|
|
47
|
+
align-self: center;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
order: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.Subhead-actions + .Subhead-description {
|
|
53
|
+
margin-top: var(--base-size-4,0.25rem);
|
|
54
|
+
}
|
|
@@ -1 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
/* TimelineItem */
|
|
2
|
+
|
|
3
|
+
.TimelineItem {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
padding: var(--stack-padding-normal,1rem) 0;
|
|
7
|
+
margin-left: var(--stack-gap-normal,1rem);
|
|
8
|
+
|
|
9
|
+
/* The Timeline */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.TimelineItem::before {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
display: block;
|
|
18
|
+
width: var(--borderWidth-thick,max(2px, 0.125rem));
|
|
19
|
+
content: '';
|
|
20
|
+
background-color: var(--borderColor-muted,var(--color-neutral-muted));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.TimelineItem:target .TimelineItem-badge {
|
|
24
|
+
border-color: var(--borderColor-accent-emphasis,var(--color-accent-fg));
|
|
25
|
+
box-shadow: 0 0 0.2em var(--borderColor-accent-muted,var(--color-accent-muted));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.TimelineItem-badge {
|
|
29
|
+
position: relative;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
display: flex;
|
|
32
|
+
width: var(--control-medium-size,2rem);
|
|
33
|
+
height: var(--control-medium-size,2rem);
|
|
34
|
+
margin-right: var(--controlStack-medium-gap-condensed,0.5rem);
|
|
35
|
+
margin-left: calc(var(--control-medium-size,2rem) / -2 + 1px);
|
|
36
|
+
color: var(--fgColor-muted,var(--color-fg-muted));
|
|
37
|
+
align-items: center;
|
|
38
|
+
background-color: var(--timelineBadge-bgColor,var(--color-timeline-badge-bg));
|
|
39
|
+
border: var(--borderWidth-thick,max(2px, 0.125rem)) solid var(--bgColor-default,var(--color-canvas-default));
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.TimelineItem-badge--success {
|
|
46
|
+
color: var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));
|
|
47
|
+
background-color: var(--bgColor-success-emphasis,var(--color-success-fg));
|
|
48
|
+
border: var(--borderWidth-thin,max(1px, 0.0625rem)) solid transparent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.TimelineItem-body {
|
|
52
|
+
min-width: 0;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
margin-top: var(--base-size-4,0.25rem);
|
|
55
|
+
color: var(--fgColor-muted,var(--color-fg-muted));
|
|
56
|
+
flex: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.TimelineItem-avatar {
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: -72px;
|
|
62
|
+
z-index: 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.TimelineItem-break {
|
|
66
|
+
position: relative;
|
|
67
|
+
z-index: 1;
|
|
68
|
+
height: var(--stack-gap-spacious,1.5rem);
|
|
69
|
+
margin: 0;
|
|
70
|
+
margin-bottom: calc(var(--stack-gap-normal,1rem) * -1);
|
|
71
|
+
margin-left: -56px;
|
|
72
|
+
background-color: var(--bgColor-default,var(--color-canvas-default));
|
|
73
|
+
border: 0;
|
|
74
|
+
border-top: var(--borderWidth-thicker,max(4px, 0.25rem)) solid var(--borderColor-default,var(--color-border-default));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.TimelineItem--condensed {
|
|
78
|
+
padding-top: var(--base-size-4,0.25rem);
|
|
79
|
+
padding-bottom: 0;
|
|
80
|
+
|
|
81
|
+
/* TimelineItem--condensed is often grouped. (commits) */
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.TimelineItem--condensed:last-child {
|
|
85
|
+
padding-bottom: var(--stack-gap-normal,1rem);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.TimelineItem--condensed .TimelineItem-badge {
|
|
89
|
+
height: var(--base-size-16,1rem);
|
|
90
|
+
margin-top: var(--base-size-8,0.5rem);
|
|
91
|
+
margin-bottom: var(--base-size-8,0.5rem);
|
|
92
|
+
color: var(--fgColor-muted,var(--color-fg-muted));
|
|
93
|
+
background-color: var(--bgColor-default,var(--color-canvas-default));
|
|
94
|
+
border: 0;
|
|
95
|
+
}
|
|
@@ -1 +1,37 @@
|
|
|
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: -moz-fit-content;
|
|
12
|
+
max-width: fit-content;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Truncate > .Truncate-text + .Truncate-text {
|
|
19
|
+
margin-left: var(--control-small-gap,0.25rem);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Truncate > .Truncate-text.Truncate-text--primary {
|
|
23
|
+
flex-basis: 200%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.Truncate > .Truncate-text.Truncate-text--expandable:hover,
|
|
27
|
+
.Truncate > .Truncate-text.Truncate-text--expandable:focus,
|
|
28
|
+
.Truncate > .Truncate-text.Truncate-text--expandable:active {
|
|
29
|
+
max-width: 100% !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.Truncate > .Truncate-text.Truncate-text--expandable:hover,
|
|
33
|
+
.Truncate > .Truncate-text.Truncate-text--expandable:focus,
|
|
34
|
+
.Truncate > .Truncate-text.Truncate-text--expandable:active {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"name": "beta/truncate",
|
|
3
3
|
"selectors": [
|
|
4
4
|
".Truncate",
|
|
5
|
-
".Truncate
|
|
6
|
-
".Truncate
|
|
7
|
-
".Truncate
|
|
8
|
-
".Truncate
|
|
9
|
-
".Truncate
|
|
10
|
-
".Truncate
|
|
5
|
+
".Truncate > .Truncate-text",
|
|
6
|
+
".Truncate > .Truncate-text + .Truncate-text",
|
|
7
|
+
".Truncate > .Truncate-text.Truncate-text--primary",
|
|
8
|
+
".Truncate > .Truncate-text.Truncate-text--expandable:hover",
|
|
9
|
+
".Truncate > .Truncate-text.Truncate-text--expandable:focus",
|
|
10
|
+
".Truncate > .Truncate-text.Truncate-text--expandable:active"
|
|
11
11
|
]
|
|
12
12
|
}
|
|
@@ -1 +1,30 @@
|
|
|
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,
|
|
8
|
+
.css-truncate .css-truncate-overflow,
|
|
9
|
+
.css-truncate.css-truncate-target,
|
|
10
|
+
.css-truncate .css-truncate-target {
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* css-truncate-target will shorten text with an ellipsis and a max width */
|
|
17
|
+
|
|
18
|
+
.css-truncate.css-truncate-target,
|
|
19
|
+
.css-truncate .css-truncate-target {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
max-width: 125px;
|
|
22
|
+
vertical-align: top;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target,
|
|
26
|
+
.css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target,
|
|
27
|
+
.css-truncate.expandable:hover .css-truncate-target,
|
|
28
|
+
.css-truncate.expandable.css-truncate-target:hover {
|
|
29
|
+
max-width: 10000px !important;
|
|
30
|
+
}
|
|
@@ -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