primer_view_components 0.0.122 → 0.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +2 -2
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list/item.rb +11 -0
- data/app/components/primer/alpha/action_list.css.json +41 -0
- data/app/components/primer/alpha/auto_complete.css.json +11 -0
- data/app/components/primer/alpha/banner.css.json +14 -0
- data/app/components/primer/alpha/button_marketing.css.json +10 -0
- data/app/components/primer/alpha/dialog.css.json +63 -0
- data/app/components/primer/alpha/dropdown.css.json +21 -0
- data/app/components/primer/alpha/layout.css.json +27 -0
- data/app/components/primer/alpha/menu.css.json +11 -0
- data/app/components/primer/alpha/nav_list/item.rb +7 -1
- data/app/components/primer/alpha/nav_list/section.rb +5 -5
- data/app/components/primer/alpha/nav_list.d.ts +6 -3
- data/app/components/primer/alpha/nav_list.js +98 -6
- data/app/components/primer/alpha/nav_list.rb +7 -2
- data/app/components/primer/alpha/nav_list.ts +109 -3
- data/app/components/primer/alpha/overlay/body.rb +26 -0
- data/app/components/primer/alpha/overlay/footer.rb +41 -0
- data/app/components/primer/alpha/overlay/header.html.erb +15 -0
- data/app/components/primer/alpha/overlay/header.rb +47 -0
- data/app/components/primer/alpha/overlay.css +1 -0
- data/app/components/primer/alpha/overlay.css.json +11 -0
- data/app/components/primer/alpha/overlay.css.map +1 -0
- data/app/components/primer/alpha/overlay.html.erb +11 -0
- data/app/components/primer/alpha/overlay.pcss +14 -0
- data/app/components/primer/alpha/overlay.rb +194 -0
- data/app/components/primer/alpha/segmented_control.css.json +15 -0
- data/app/components/primer/alpha/tab_nav.css.json +10 -0
- data/app/components/primer/alpha/text_field.css.json +38 -0
- data/app/components/primer/alpha/toggle_switch.css.json +16 -0
- data/app/components/primer/alpha/underline_nav.css.json +13 -0
- data/app/components/primer/anchored_position.d.ts +27 -0
- data/app/components/primer/anchored_position.js +149 -0
- data/app/components/primer/anchored_position.ts +167 -0
- data/app/components/primer/beta/avatar.css.json +14 -0
- data/app/components/primer/beta/avatar_stack.css.json +9 -0
- data/app/components/primer/beta/blankslate.css.json +12 -0
- data/app/components/primer/beta/border_box.css.json +32 -0
- data/app/components/primer/beta/breadcrumbs.css.json +4 -0
- data/app/components/primer/beta/button.css.json +22 -0
- data/app/components/primer/beta/counter.css.json +6 -0
- data/app/components/primer/beta/flash.css.json +15 -0
- data/app/components/primer/beta/flash.html.erb +1 -2
- data/app/components/primer/beta/label.css.json +20 -0
- data/app/components/primer/beta/link.css.json +8 -0
- data/app/components/primer/beta/popover.css.json +18 -0
- data/app/components/primer/beta/progress_bar.css.json +6 -0
- data/app/components/primer/beta/state.css.json +10 -0
- data/app/components/primer/beta/subhead.css.json +8 -0
- data/app/components/primer/beta/timeline_item.css.json +9 -0
- data/app/components/primer/beta/truncate.css.json +6 -0
- data/app/components/primer/component.rb +1 -1
- data/app/components/primer/primer.d.ts +2 -0
- data/app/components/primer/primer.js +2 -0
- data/app/components/primer/primer.pcss +3 -0
- data/app/components/primer/primer.ts +2 -0
- data/app/components/primer/truncate.css.json +7 -0
- data/app/lib/primer/css/layout.css.json +263 -0
- data/app/lib/primer/css/utilities.css.json +1636 -0
- data/lib/primer/view_components/linters/base_linter.rb +1 -1
- data/lib/primer/view_components/linters/disallow_component_css_counter.rb +30 -0
- data/lib/primer/view_components/version.rb +2 -2
- data/lib/primer/yard/component_manifest.rb +1 -0
- data/previews/primer/alpha/overlay_preview/middle_of_page.html.erb +17 -0
- data/previews/primer/alpha/overlay_preview.rb +107 -0
- data/static/arguments.json +104 -0
- data/static/audited_at.json +4 -0
- data/static/classes.json +311 -0
- data/static/constants.json +102 -0
- data/static/previews.json +21 -0
- data/static/statuses.json +4 -0
- metadata +19 -2
@@ -0,0 +1,149 @@
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
5
|
+
};
|
6
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
7
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
10
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
11
|
+
};
|
12
|
+
var _AnchoredPositionElement_anchorElement, _AnchoredPositionElement_animationFrame;
|
13
|
+
import { getAnchoredPosition } from '@primer/behaviors';
|
14
|
+
const updateWhenVisible = (() => {
|
15
|
+
const anchors = new Set();
|
16
|
+
let intersectionObserver = null;
|
17
|
+
let resizeObserver = null;
|
18
|
+
function updateVisibleAnchors() {
|
19
|
+
for (const anchor of anchors) {
|
20
|
+
anchor.update();
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return (el) => {
|
24
|
+
// eslint-disable-next-line github/prefer-observers
|
25
|
+
window.addEventListener('resize', updateVisibleAnchors);
|
26
|
+
intersectionObserver || (intersectionObserver = new IntersectionObserver(entries => {
|
27
|
+
for (const entry of entries) {
|
28
|
+
const target = entry.target;
|
29
|
+
if (entry.isIntersecting) {
|
30
|
+
target.update();
|
31
|
+
anchors.add(target);
|
32
|
+
}
|
33
|
+
else {
|
34
|
+
anchors.delete(target);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}));
|
38
|
+
resizeObserver || (resizeObserver = new ResizeObserver(() => {
|
39
|
+
for (const anchor of anchors) {
|
40
|
+
anchor.update();
|
41
|
+
}
|
42
|
+
}));
|
43
|
+
resizeObserver.observe(el.ownerDocument.documentElement);
|
44
|
+
intersectionObserver.observe(el);
|
45
|
+
};
|
46
|
+
})();
|
47
|
+
export default class AnchoredPositionElement extends HTMLElement {
|
48
|
+
constructor() {
|
49
|
+
super(...arguments);
|
50
|
+
_AnchoredPositionElement_anchorElement.set(this, null);
|
51
|
+
_AnchoredPositionElement_animationFrame.set(this, void 0);
|
52
|
+
}
|
53
|
+
get align() {
|
54
|
+
const value = this.getAttribute('align');
|
55
|
+
if (value === 'center' || value === 'end')
|
56
|
+
return value;
|
57
|
+
return 'start';
|
58
|
+
}
|
59
|
+
set align(value) {
|
60
|
+
this.setAttribute('align', `${value}`);
|
61
|
+
}
|
62
|
+
get side() {
|
63
|
+
const value = this.getAttribute('side');
|
64
|
+
if (value === 'inside-top' ||
|
65
|
+
value === 'inside-bottom' ||
|
66
|
+
value === 'inside-left' ||
|
67
|
+
value === 'inside-right' ||
|
68
|
+
value === 'inside-center' ||
|
69
|
+
value === 'outside-top' ||
|
70
|
+
value === 'outside-left' ||
|
71
|
+
value === 'outside-right') {
|
72
|
+
return value;
|
73
|
+
}
|
74
|
+
return 'outside-bottom';
|
75
|
+
}
|
76
|
+
set side(value) {
|
77
|
+
this.setAttribute('side', `${value}`);
|
78
|
+
}
|
79
|
+
get anchorOffset() {
|
80
|
+
const alias = this.getAttribute('anchor-offset');
|
81
|
+
if (alias === 'spacious' || alias === '8')
|
82
|
+
return 8;
|
83
|
+
return 4;
|
84
|
+
}
|
85
|
+
set anchorOffset(value) {
|
86
|
+
this.setAttribute('anchor-offset', `${value}`);
|
87
|
+
}
|
88
|
+
get anchor() {
|
89
|
+
return this.getAttribute('anchor') || '';
|
90
|
+
}
|
91
|
+
set anchor(value) {
|
92
|
+
this.setAttribute('anchor', `${value}`);
|
93
|
+
}
|
94
|
+
get anchorElement() {
|
95
|
+
if (__classPrivateFieldGet(this, _AnchoredPositionElement_anchorElement, "f"))
|
96
|
+
return __classPrivateFieldGet(this, _AnchoredPositionElement_anchorElement, "f");
|
97
|
+
const idRef = this.anchor;
|
98
|
+
if (!idRef)
|
99
|
+
return null;
|
100
|
+
return this.ownerDocument.getElementById(idRef);
|
101
|
+
}
|
102
|
+
set anchorElement(value) {
|
103
|
+
__classPrivateFieldSet(this, _AnchoredPositionElement_anchorElement, value, "f");
|
104
|
+
if (!__classPrivateFieldGet(this, _AnchoredPositionElement_anchorElement, "f")) {
|
105
|
+
this.removeAttribute('anchor');
|
106
|
+
}
|
107
|
+
}
|
108
|
+
get alignmentOffset() {
|
109
|
+
return Number(this.getAttribute('alignment-offset'));
|
110
|
+
}
|
111
|
+
set alignmentOffset(value) {
|
112
|
+
this.setAttribute('alignment-offset', `${value}`);
|
113
|
+
}
|
114
|
+
get allowOutOfBounds() {
|
115
|
+
return this.hasAttribute('allow-out-of-bounds');
|
116
|
+
}
|
117
|
+
set allowOutOfBounds(value) {
|
118
|
+
this.toggleAttribute('allow-out-of-bounds', value);
|
119
|
+
}
|
120
|
+
connectedCallback() {
|
121
|
+
this.update();
|
122
|
+
this.addEventListener('beforetoggle', () => this.update());
|
123
|
+
updateWhenVisible(this);
|
124
|
+
}
|
125
|
+
attributeChangedCallback() {
|
126
|
+
this.update();
|
127
|
+
}
|
128
|
+
update() {
|
129
|
+
if (!this.isConnected)
|
130
|
+
return;
|
131
|
+
cancelAnimationFrame(__classPrivateFieldGet(this, _AnchoredPositionElement_animationFrame, "f"));
|
132
|
+
__classPrivateFieldSet(this, _AnchoredPositionElement_animationFrame, requestAnimationFrame(() => {
|
133
|
+
const anchor = this.anchorElement;
|
134
|
+
if (!anchor)
|
135
|
+
return;
|
136
|
+
const { left, top, anchorSide, anchorAlign } = getAnchoredPosition(this, anchor, this);
|
137
|
+
this.style.top = `${top}px`;
|
138
|
+
this.style.left = `${left}px`;
|
139
|
+
this.classList.remove('Overlay--anchorAlign-start', 'Overlay--anchorAlign-center', 'Overlay--anchorAlign-end', 'Overlay--anchorSide-insideTop', 'Overlay--anchorSide-insideBottom', 'Overlay--anchorSide-insideLeft', 'Overlay--anchorSide-insideRight', 'Overlay--anchorSide-insideCenter', 'Overlay--anchorSide-outsideTop', 'Overlay--anchorSide-outsideLeft', 'Overlay--anchorSide-outsideRight');
|
140
|
+
this.classList.add(`Overlay--anchorAlign-${anchorAlign}`, `Overlay--anchorSide-${anchorSide}`);
|
141
|
+
}), "f");
|
142
|
+
}
|
143
|
+
}
|
144
|
+
_AnchoredPositionElement_anchorElement = new WeakMap(), _AnchoredPositionElement_animationFrame = new WeakMap();
|
145
|
+
AnchoredPositionElement.observedAttributes = ['align', 'side', 'anchor', 'alignment-offset', 'allow-out-of-bounds'];
|
146
|
+
if (!customElements.get('anchored-position')) {
|
147
|
+
window.AnchoredPositionElement = AnchoredPositionElement;
|
148
|
+
customElements.define('anchored-position', AnchoredPositionElement);
|
149
|
+
}
|
@@ -0,0 +1,167 @@
|
|
1
|
+
import type {AnchorAlignment, AnchorSide, PositionSettings} from '@primer/behaviors'
|
2
|
+
import {getAnchoredPosition} from '@primer/behaviors'
|
3
|
+
|
4
|
+
const updateWhenVisible = (() => {
|
5
|
+
const anchors = new Set<AnchoredPositionElement>()
|
6
|
+
let intersectionObserver: IntersectionObserver | null = null
|
7
|
+
let resizeObserver: ResizeObserver | null = null
|
8
|
+
function updateVisibleAnchors() {
|
9
|
+
for (const anchor of anchors) {
|
10
|
+
anchor.update()
|
11
|
+
}
|
12
|
+
}
|
13
|
+
return (el: AnchoredPositionElement) => {
|
14
|
+
// eslint-disable-next-line github/prefer-observers
|
15
|
+
window.addEventListener('resize', updateVisibleAnchors)
|
16
|
+
intersectionObserver ||= new IntersectionObserver(entries => {
|
17
|
+
for (const entry of entries) {
|
18
|
+
const target = entry.target as AnchoredPositionElement
|
19
|
+
if (entry.isIntersecting) {
|
20
|
+
target.update()
|
21
|
+
anchors.add(target)
|
22
|
+
} else {
|
23
|
+
anchors.delete(target)
|
24
|
+
}
|
25
|
+
}
|
26
|
+
})
|
27
|
+
resizeObserver ||= new ResizeObserver(() => {
|
28
|
+
for (const anchor of anchors) {
|
29
|
+
anchor.update()
|
30
|
+
}
|
31
|
+
})
|
32
|
+
resizeObserver.observe(el.ownerDocument.documentElement)
|
33
|
+
intersectionObserver.observe(el)
|
34
|
+
}
|
35
|
+
})()
|
36
|
+
|
37
|
+
export default class AnchoredPositionElement extends HTMLElement implements PositionSettings {
|
38
|
+
get align(): AnchorAlignment {
|
39
|
+
const value = this.getAttribute('align')
|
40
|
+
if (value === 'center' || value === 'end') return value
|
41
|
+
return 'start'
|
42
|
+
}
|
43
|
+
|
44
|
+
set align(value: AnchorAlignment) {
|
45
|
+
this.setAttribute('align', `${value}`)
|
46
|
+
}
|
47
|
+
|
48
|
+
get side(): AnchorSide {
|
49
|
+
const value = this.getAttribute('side')
|
50
|
+
if (
|
51
|
+
value === 'inside-top' ||
|
52
|
+
value === 'inside-bottom' ||
|
53
|
+
value === 'inside-left' ||
|
54
|
+
value === 'inside-right' ||
|
55
|
+
value === 'inside-center' ||
|
56
|
+
value === 'outside-top' ||
|
57
|
+
value === 'outside-left' ||
|
58
|
+
value === 'outside-right'
|
59
|
+
) {
|
60
|
+
return value
|
61
|
+
}
|
62
|
+
return 'outside-bottom'
|
63
|
+
}
|
64
|
+
|
65
|
+
set side(value: AnchorSide) {
|
66
|
+
this.setAttribute('side', `${value}`)
|
67
|
+
}
|
68
|
+
|
69
|
+
get anchorOffset(): number {
|
70
|
+
const alias = this.getAttribute('anchor-offset')
|
71
|
+
if (alias === 'spacious' || alias === '8') return 8
|
72
|
+
return 4
|
73
|
+
}
|
74
|
+
|
75
|
+
set anchorOffset(value: number | 'normal' | 'spacious') {
|
76
|
+
this.setAttribute('anchor-offset', `${value}`)
|
77
|
+
}
|
78
|
+
|
79
|
+
get anchor() {
|
80
|
+
return this.getAttribute('anchor') || ''
|
81
|
+
}
|
82
|
+
|
83
|
+
set anchor(value: string) {
|
84
|
+
this.setAttribute('anchor', `${value}`)
|
85
|
+
}
|
86
|
+
|
87
|
+
#anchorElement: HTMLElement | null = null
|
88
|
+
get anchorElement(): HTMLElement | null {
|
89
|
+
if (this.#anchorElement) return this.#anchorElement
|
90
|
+
const idRef = this.anchor
|
91
|
+
if (!idRef) return null
|
92
|
+
return this.ownerDocument.getElementById(idRef)
|
93
|
+
}
|
94
|
+
|
95
|
+
set anchorElement(value: HTMLElement | null) {
|
96
|
+
this.#anchorElement = value
|
97
|
+
if (!this.#anchorElement) {
|
98
|
+
this.removeAttribute('anchor')
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
get alignmentOffset(): number {
|
103
|
+
return Number(this.getAttribute('alignment-offset'))
|
104
|
+
}
|
105
|
+
|
106
|
+
set alignmentOffset(value: number) {
|
107
|
+
this.setAttribute('alignment-offset', `${value}`)
|
108
|
+
}
|
109
|
+
|
110
|
+
get allowOutOfBounds() {
|
111
|
+
return this.hasAttribute('allow-out-of-bounds')
|
112
|
+
}
|
113
|
+
|
114
|
+
set allowOutOfBounds(value: boolean) {
|
115
|
+
this.toggleAttribute('allow-out-of-bounds', value)
|
116
|
+
}
|
117
|
+
|
118
|
+
connectedCallback() {
|
119
|
+
this.update()
|
120
|
+
this.addEventListener('beforetoggle', () => this.update())
|
121
|
+
updateWhenVisible(this)
|
122
|
+
}
|
123
|
+
|
124
|
+
static observedAttributes = ['align', 'side', 'anchor', 'alignment-offset', 'allow-out-of-bounds']
|
125
|
+
attributeChangedCallback() {
|
126
|
+
this.update()
|
127
|
+
}
|
128
|
+
|
129
|
+
#animationFrame: ReturnType<typeof requestAnimationFrame>
|
130
|
+
update() {
|
131
|
+
if (!this.isConnected) return
|
132
|
+
cancelAnimationFrame(this.#animationFrame)
|
133
|
+
|
134
|
+
this.#animationFrame = requestAnimationFrame(() => {
|
135
|
+
const anchor = this.anchorElement
|
136
|
+
if (!anchor) return
|
137
|
+
const {left, top, anchorSide, anchorAlign} = getAnchoredPosition(this, anchor, this)
|
138
|
+
this.style.top = `${top}px`
|
139
|
+
this.style.left = `${left}px`
|
140
|
+
this.classList.remove(
|
141
|
+
'Overlay--anchorAlign-start',
|
142
|
+
'Overlay--anchorAlign-center',
|
143
|
+
'Overlay--anchorAlign-end',
|
144
|
+
'Overlay--anchorSide-insideTop',
|
145
|
+
'Overlay--anchorSide-insideBottom',
|
146
|
+
'Overlay--anchorSide-insideLeft',
|
147
|
+
'Overlay--anchorSide-insideRight',
|
148
|
+
'Overlay--anchorSide-insideCenter',
|
149
|
+
'Overlay--anchorSide-outsideTop',
|
150
|
+
'Overlay--anchorSide-outsideLeft',
|
151
|
+
'Overlay--anchorSide-outsideRight'
|
152
|
+
)
|
153
|
+
this.classList.add(`Overlay--anchorAlign-${anchorAlign}`, `Overlay--anchorSide-${anchorSide}`)
|
154
|
+
})
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
if (!customElements.get('anchored-position')) {
|
159
|
+
window.AnchoredPositionElement = AnchoredPositionElement
|
160
|
+
customElements.define('anchored-position', AnchoredPositionElement)
|
161
|
+
}
|
162
|
+
|
163
|
+
declare global {
|
164
|
+
interface Window {
|
165
|
+
AnchoredPositionElement: typeof AnchoredPositionElement
|
166
|
+
}
|
167
|
+
}
|
@@ -13,5 +13,19 @@
|
|
13
13
|
".avatar-6",
|
14
14
|
".avatar-7",
|
15
15
|
".avatar-8"
|
16
|
+
],
|
17
|
+
"classes": [
|
18
|
+
"avatar",
|
19
|
+
"avatar-link",
|
20
|
+
"avatar-group-item",
|
21
|
+
"avatar-1",
|
22
|
+
"avatar-2",
|
23
|
+
"avatar-small",
|
24
|
+
"avatar-3",
|
25
|
+
"avatar-4",
|
26
|
+
"avatar-5",
|
27
|
+
"avatar-6",
|
28
|
+
"avatar-7",
|
29
|
+
"avatar-8"
|
16
30
|
]
|
17
31
|
}
|
@@ -24,5 +24,14 @@
|
|
24
24
|
".AvatarStack--right .avatar.avatar-more:before",
|
25
25
|
".AvatarStack--right .avatar.avatar-more:after",
|
26
26
|
".AvatarStack--right .avatar"
|
27
|
+
],
|
28
|
+
"classes": [
|
29
|
+
"AvatarStack",
|
30
|
+
"AvatarStack-body",
|
31
|
+
"AvatarStack--two",
|
32
|
+
"AvatarStack--three-plus",
|
33
|
+
"avatar",
|
34
|
+
"avatar-more",
|
35
|
+
"AvatarStack--right"
|
27
36
|
]
|
28
37
|
}
|
@@ -18,5 +18,17 @@
|
|
18
18
|
".blankslate-large h3",
|
19
19
|
".blankslate-large p",
|
20
20
|
".blankslate-clean-background"
|
21
|
+
],
|
22
|
+
"classes": [
|
23
|
+
"blankslate",
|
24
|
+
"blankslate-icon",
|
25
|
+
"blankslate-image",
|
26
|
+
"blankslate-heading",
|
27
|
+
"blankslate-action",
|
28
|
+
"blankslate-capped",
|
29
|
+
"blankslate-spacious",
|
30
|
+
"blankslate-narrow",
|
31
|
+
"blankslate-large",
|
32
|
+
"blankslate-clean-background"
|
21
33
|
]
|
22
34
|
}
|
@@ -50,5 +50,37 @@
|
|
50
50
|
".Box-row--blue",
|
51
51
|
".Box-row--gray",
|
52
52
|
".Box-btn-octicon.btn-octicon"
|
53
|
+
],
|
54
|
+
"classes": [
|
55
|
+
"Box",
|
56
|
+
"Box--condensed",
|
57
|
+
"Box-body",
|
58
|
+
"Box-footer",
|
59
|
+
"Box-header",
|
60
|
+
"Box-btn-octicon",
|
61
|
+
"btn-octicon",
|
62
|
+
"Box-row",
|
63
|
+
"Box--spacious",
|
64
|
+
"Box-title",
|
65
|
+
"Box-row--unread",
|
66
|
+
"unread",
|
67
|
+
"navigation-focus",
|
68
|
+
"Box-row--drag-button",
|
69
|
+
"is-dragging",
|
70
|
+
"sortable-chosen",
|
71
|
+
"sortable-ghost",
|
72
|
+
"Box-row--drag-hide",
|
73
|
+
"Box-row--focus-gray",
|
74
|
+
"Box-row--focus-blue",
|
75
|
+
"Box-row--hover-gray",
|
76
|
+
"Box-row--hover-blue",
|
77
|
+
"Box-row-link",
|
78
|
+
"Box--scrollable",
|
79
|
+
"Box--blue",
|
80
|
+
"Box--danger",
|
81
|
+
"Box-header--blue",
|
82
|
+
"Box-row--yellow",
|
83
|
+
"Box-row--blue",
|
84
|
+
"Box-row--gray"
|
53
85
|
]
|
54
86
|
}
|
@@ -67,5 +67,27 @@
|
|
67
67
|
".Button--iconOnly",
|
68
68
|
".Button--iconOnly.Button--small",
|
69
69
|
".Button--iconOnly.Button--large"
|
70
|
+
],
|
71
|
+
"classes": [
|
72
|
+
"Button",
|
73
|
+
"Button-withTooltip",
|
74
|
+
"Button-content",
|
75
|
+
"Button-content--alignStart",
|
76
|
+
"Button-visual",
|
77
|
+
"Counter",
|
78
|
+
"Button-label",
|
79
|
+
"Button-leadingVisual",
|
80
|
+
"Button-trailingVisual",
|
81
|
+
"Button-trailingAction",
|
82
|
+
"Button--small",
|
83
|
+
"Button--large",
|
84
|
+
"Button--fullWidth",
|
85
|
+
"Button--primary",
|
86
|
+
"Button--secondary",
|
87
|
+
"Button--invisible",
|
88
|
+
"Button--invisible-noVisuals",
|
89
|
+
"Button--link",
|
90
|
+
"Button--danger",
|
91
|
+
"Button--iconOnly"
|
70
92
|
]
|
71
93
|
}
|
@@ -23,5 +23,20 @@
|
|
23
23
|
".flash-banner",
|
24
24
|
".flash-full",
|
25
25
|
".warning"
|
26
|
+
],
|
27
|
+
"classes": [
|
28
|
+
"flash",
|
29
|
+
"octicon",
|
30
|
+
"flash-messages",
|
31
|
+
"flash-close",
|
32
|
+
"flash-action",
|
33
|
+
"btn",
|
34
|
+
"btn-primary",
|
35
|
+
"flash-warn",
|
36
|
+
"flash-error",
|
37
|
+
"flash-success",
|
38
|
+
"flash-full",
|
39
|
+
"flash-banner",
|
40
|
+
"warning"
|
26
41
|
]
|
27
42
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
|
2
|
-
<%= primer_octicon @icon if @icon %>
|
3
|
-
<%= content %>
|
2
|
+
<%= primer_octicon @icon if @icon %><%= content %>
|
4
3
|
<% if @dismissible %>
|
5
4
|
<button class="flash-close js-flash-close" type="button" aria-label="Close">
|
6
5
|
<%= primer_octicon "x" %>
|
@@ -21,5 +21,25 @@
|
|
21
21
|
".Label--closed",
|
22
22
|
".Label--done",
|
23
23
|
".Label--sponsors"
|
24
|
+
],
|
25
|
+
"classes": [
|
26
|
+
"labels",
|
27
|
+
"Label",
|
28
|
+
"label",
|
29
|
+
"Label--large",
|
30
|
+
"Label--inline",
|
31
|
+
"Label--primary",
|
32
|
+
"Label--secondary",
|
33
|
+
"Label--accent",
|
34
|
+
"Label--info",
|
35
|
+
"Label--success",
|
36
|
+
"Label--attention",
|
37
|
+
"Label--warning",
|
38
|
+
"Label--severe",
|
39
|
+
"Label--danger",
|
40
|
+
"Label--open",
|
41
|
+
"Label--closed",
|
42
|
+
"Label--done",
|
43
|
+
"Label--sponsors"
|
24
44
|
]
|
25
45
|
}
|
@@ -15,5 +15,13 @@
|
|
15
15
|
".Link--muted:hover [class*=color-fg]",
|
16
16
|
".Link--primary:hover [class*=color-fg]",
|
17
17
|
".Link--secondary:hover [class*=color-fg]"
|
18
|
+
],
|
19
|
+
"classes": [
|
20
|
+
"Link",
|
21
|
+
"Link--primary",
|
22
|
+
"Link--secondary",
|
23
|
+
"Link--muted",
|
24
|
+
"Link--onHover",
|
25
|
+
"color-fg"
|
18
26
|
]
|
19
27
|
}
|
@@ -35,5 +35,23 @@
|
|
35
35
|
".Popover-message--right:before",
|
36
36
|
".Popover-message--large",
|
37
37
|
".Popover-message>.btn-octicon"
|
38
|
+
],
|
39
|
+
"classes": [
|
40
|
+
"Popover",
|
41
|
+
"Popover-message",
|
42
|
+
"Popover-message--no-caret",
|
43
|
+
"Popover-message--bottom-left",
|
44
|
+
"Popover-message--bottom-right",
|
45
|
+
"Popover-message--bottom",
|
46
|
+
"Popover-message--top-right",
|
47
|
+
"Popover-message--top-left",
|
48
|
+
"Popover-message--left-bottom",
|
49
|
+
"Popover-message--left-top",
|
50
|
+
"Popover-message--left",
|
51
|
+
"Popover-message--right-bottom",
|
52
|
+
"Popover-message--right-top",
|
53
|
+
"Popover-message--right",
|
54
|
+
"Popover-message--large",
|
55
|
+
"btn-octicon"
|
38
56
|
]
|
39
57
|
}
|
@@ -8,5 +8,13 @@
|
|
8
8
|
".Subhead-description",
|
9
9
|
".Subhead-actions",
|
10
10
|
".Subhead-actions+.Subhead-description"
|
11
|
+
],
|
12
|
+
"classes": [
|
13
|
+
"Subhead",
|
14
|
+
"Subhead--spacious",
|
15
|
+
"Subhead-heading",
|
16
|
+
"Subhead-heading--danger",
|
17
|
+
"Subhead-description",
|
18
|
+
"Subhead-actions"
|
11
19
|
]
|
12
20
|
}
|
@@ -12,5 +12,14 @@
|
|
12
12
|
".TimelineItem--condensed",
|
13
13
|
".TimelineItem--condensed:last-child",
|
14
14
|
".TimelineItem--condensed .TimelineItem-badge"
|
15
|
+
],
|
16
|
+
"classes": [
|
17
|
+
"TimelineItem",
|
18
|
+
"TimelineItem-badge",
|
19
|
+
"TimelineItem-badge--success",
|
20
|
+
"TimelineItem-body",
|
21
|
+
"TimelineItem-avatar",
|
22
|
+
"TimelineItem-break",
|
23
|
+
"TimelineItem--condensed"
|
15
24
|
]
|
16
25
|
}
|
@@ -8,5 +8,11 @@
|
|
8
8
|
".Truncate>.Truncate-text.Truncate-text--expandable:active",
|
9
9
|
".Truncate>.Truncate-text.Truncate-text--expandable:focus",
|
10
10
|
".Truncate>.Truncate-text.Truncate-text--expandable:hover"
|
11
|
+
],
|
12
|
+
"classes": [
|
13
|
+
"Truncate",
|
14
|
+
"Truncate-text",
|
15
|
+
"Truncate-text--primary",
|
16
|
+
"Truncate-text--expandable"
|
11
17
|
]
|
12
18
|
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
@import "@oddbird/popover-polyfill/dist/popover.css";
|
2
|
+
|
1
3
|
/* CSS component styles here */
|
2
4
|
|
3
5
|
/* alpha */
|
@@ -20,6 +22,7 @@
|
|
20
22
|
@import "./beta/avatar_stack.pcss";
|
21
23
|
@import "./beta/border_box.pcss";
|
22
24
|
@import "./beta/blankslate.pcss";
|
25
|
+
@import "./alpha/overlay.pcss";
|
23
26
|
@import "./beta/breadcrumbs.pcss";
|
24
27
|
@import "./beta/button.pcss";
|
25
28
|
@import "./beta/counter.pcss";
|