@primer/view-components 0.4.0-rc.26cca393 → 0.4.0-rc.5f73084c
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/app/components/primer/alpha/action_bar_element.d.ts +16 -0
- package/app/assets/javascripts/app/components/primer/primer.d.ts +1 -0
- 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 +1 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_bar.css +1 -0
- package/app/components/primer/alpha/action_bar.css.json +17 -0
- package/app/components/primer/alpha/action_bar_element.d.ts +16 -0
- package/app/components/primer/alpha/action_bar_element.js +172 -0
- package/app/components/primer/alpha/tool_tip.js +15 -8
- package/app/components/primer/beta/link.css +1 -1
- package/app/components/primer/primer.d.ts +1 -0
- package/app/components/primer/primer.js +1 -0
- package/package.json +2 -2
- package/static/arguments.json +51 -7
- package/static/audited_at.json +3 -0
- package/static/classes.json +21 -0
- package/static/constants.json +20 -6
- package/static/info_arch.json +516 -326
- package/static/previews.json +101 -2
- package/static/statuses.json +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ActionBar{display:flex!important;flex-grow:1;flex-shrink:1;justify-content:flex-end;min-width:calc(var(--control-medium-size,2rem)*3);overflow:hidden;position:relative}.ActionBar,.ActionBar-item-container{align-items:center;box-sizing:initial}.ActionBar-item-container{display:flex;flex-grow:0;flex-shrink:0}.ActionBar-item{flex-shrink:0;position:relative}.ActionBar-more-menu{flex-shrink:0}.ActionBar--small{min-width:calc(var(--control-small-size,1.75rem)*3)}.ActionBar--large{min-width:calc(var(--control-large-size,2.5rem)*3)}.ActionBar-divider{border-left:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--color-border-subtle);height:calc(var(--control-medium-size,2rem)/2);margin:0 var(--controlStack-medium-gap-condensed,.5rem)}.ActionBar--small .ActionBar-divider{margin:0 var(--controlStack-small-gap-condensed,.5rem)}.ActionBar--large .ActionBar-divider{margin:0 var(--controlStack-large-gap-condensed,.5rem)}@media (pointer:coarse){.ActionBar .ActionBar-item-container{gap:calc(var(--control-minTarget-coarse,2.75rem) - var(--control-medium-size,2rem))}.ActionBar--small .ActionBar-item-container{gap:calc(var(--control-minTarget-coarse,2.75rem) - var(--control-small-size,1.75rem))}.ActionBar--large .ActionBar-item-container{gap:calc(var(--control-minTarget-coarse,2.75rem) - var(--control-large-size,2.5rem))}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "alpha/action_bar",
|
|
3
|
+
"selectors": [
|
|
4
|
+
".ActionBar",
|
|
5
|
+
".ActionBar-item-container",
|
|
6
|
+
".ActionBar-item",
|
|
7
|
+
".ActionBar-more-menu",
|
|
8
|
+
".ActionBar--small",
|
|
9
|
+
".ActionBar--large",
|
|
10
|
+
".ActionBar-divider",
|
|
11
|
+
".ActionBar--small .ActionBar-divider",
|
|
12
|
+
".ActionBar--large .ActionBar-divider",
|
|
13
|
+
".ActionBar .ActionBar-item-container",
|
|
14
|
+
".ActionBar--small .ActionBar-item-container",
|
|
15
|
+
".ActionBar--large .ActionBar-item-container"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare class ActionBarElement extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
items: HTMLElement[];
|
|
4
|
+
itemContainer: HTMLElement;
|
|
5
|
+
moreMenu: HTMLElement;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
menuItemClick(event: Event): void;
|
|
9
|
+
update(rect?: DOMRect): void;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
ActionBarElement: typeof ActionBarElement;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
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");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15
|
+
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");
|
|
16
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
|
+
};
|
|
18
|
+
var _ActionBarElement_instances, _ActionBarElement_initialBarWidth, _ActionBarElement_previousBarWidth, _ActionBarElement_focusZoneAbortController, _ActionBarElement_itemGap, _ActionBarElement_availableSpace, _ActionBarElement_menuSpace, _ActionBarElement_shrink, _ActionBarElement_grow, _ActionBarElement_showItem, _ActionBarElement_hideItem, _ActionBarElement_menuItems_get;
|
|
19
|
+
import { controller, targets, target } from '@github/catalyst';
|
|
20
|
+
import { focusZone, FocusKeys } from '@primer/behaviors';
|
|
21
|
+
const instersectionObserver = new IntersectionObserver(entries => {
|
|
22
|
+
for (const entry of entries) {
|
|
23
|
+
const action = entry.target;
|
|
24
|
+
if (entry.isIntersecting && action instanceof ActionBarElement) {
|
|
25
|
+
action.update();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const resizeObserver = new ResizeObserver(entries => {
|
|
30
|
+
for (const entry of entries) {
|
|
31
|
+
const action = entry.target;
|
|
32
|
+
if (action instanceof ActionBarElement) {
|
|
33
|
+
action.update(entry.contentRect);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
let ActionBarElement = class ActionBarElement extends HTMLElement {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
_ActionBarElement_instances.add(this);
|
|
41
|
+
_ActionBarElement_initialBarWidth.set(this, void 0);
|
|
42
|
+
_ActionBarElement_previousBarWidth.set(this, void 0);
|
|
43
|
+
_ActionBarElement_focusZoneAbortController.set(this, null);
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
var _a, _b, _c, _d;
|
|
47
|
+
__classPrivateFieldSet(this, _ActionBarElement_previousBarWidth, (_a = this.offsetWidth) !== null && _a !== void 0 ? _a : Infinity, "f");
|
|
48
|
+
__classPrivateFieldSet(this, _ActionBarElement_initialBarWidth, (_b = this.itemContainer.offsetWidth) !== null && _b !== void 0 ? _b : Infinity, "f");
|
|
49
|
+
// Calculate the width of all the items before hiding anything
|
|
50
|
+
for (const item of this.items) {
|
|
51
|
+
const width = item.getBoundingClientRect().width;
|
|
52
|
+
const marginLeft = parseInt((_c = window.getComputedStyle(item)) === null || _c === void 0 ? void 0 : _c.marginLeft, 10);
|
|
53
|
+
const marginRight = parseInt((_d = window.getComputedStyle(item)) === null || _d === void 0 ? void 0 : _d.marginRight, 10);
|
|
54
|
+
item.setAttribute('data-offset-width', `${width + marginLeft + marginRight}`);
|
|
55
|
+
}
|
|
56
|
+
resizeObserver.observe(this);
|
|
57
|
+
instersectionObserver.observe(this);
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
this.style.overflow = 'visible';
|
|
60
|
+
this.update();
|
|
61
|
+
}, 20); // Wait for the items to be rendered, making this really short to avoid a flash of unstyled content
|
|
62
|
+
}
|
|
63
|
+
disconnectedCallback() {
|
|
64
|
+
resizeObserver.unobserve(this);
|
|
65
|
+
instersectionObserver.unobserve(this);
|
|
66
|
+
}
|
|
67
|
+
menuItemClick(event) {
|
|
68
|
+
var _a;
|
|
69
|
+
const currentTarget = event.currentTarget;
|
|
70
|
+
const id = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.getAttribute('data-for');
|
|
71
|
+
if (id) {
|
|
72
|
+
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.click();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
update(rect = this.getBoundingClientRect()) {
|
|
76
|
+
// Only recalculate if the bar width changed
|
|
77
|
+
if (rect.width <= __classPrivateFieldGet(this, _ActionBarElement_previousBarWidth, "f") || __classPrivateFieldGet(this, _ActionBarElement_previousBarWidth, "f") === 0) {
|
|
78
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_shrink).call(this);
|
|
79
|
+
}
|
|
80
|
+
else if (rect.width > __classPrivateFieldGet(this, _ActionBarElement_previousBarWidth, "f")) {
|
|
81
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_grow).call(this);
|
|
82
|
+
}
|
|
83
|
+
__classPrivateFieldSet(this, _ActionBarElement_previousBarWidth, rect.width, "f");
|
|
84
|
+
if (rect.width <= __classPrivateFieldGet(this, _ActionBarElement_initialBarWidth, "f")) {
|
|
85
|
+
this.style.justifyContent = 'space-between';
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.style.justifyContent = 'flex-end';
|
|
89
|
+
}
|
|
90
|
+
if (__classPrivateFieldGet(this, _ActionBarElement_focusZoneAbortController, "f")) {
|
|
91
|
+
__classPrivateFieldGet(this, _ActionBarElement_focusZoneAbortController, "f").abort();
|
|
92
|
+
}
|
|
93
|
+
__classPrivateFieldSet(this, _ActionBarElement_focusZoneAbortController, focusZone(this.itemContainer, {
|
|
94
|
+
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
95
|
+
focusOutBehavior: 'wrap',
|
|
96
|
+
focusableElementFilter: element => {
|
|
97
|
+
return !element.closest('.ActionBar-item[hidden]');
|
|
98
|
+
}
|
|
99
|
+
}), "f");
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
_ActionBarElement_initialBarWidth = new WeakMap(), _ActionBarElement_previousBarWidth = new WeakMap(), _ActionBarElement_focusZoneAbortController = new WeakMap(), _ActionBarElement_instances = new WeakSet(), _ActionBarElement_itemGap = function _ActionBarElement_itemGap() {
|
|
103
|
+
var _a;
|
|
104
|
+
return parseInt((_a = window.getComputedStyle(this.itemContainer)) === null || _a === void 0 ? void 0 : _a.columnGap, 10) || 0;
|
|
105
|
+
}, _ActionBarElement_availableSpace = function _ActionBarElement_availableSpace() {
|
|
106
|
+
// Get the offset of the item container from the container edge
|
|
107
|
+
return this.offsetWidth - this.itemContainer.offsetWidth;
|
|
108
|
+
}, _ActionBarElement_menuSpace = function _ActionBarElement_menuSpace() {
|
|
109
|
+
if (this.moreMenu.hidden) {
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
return this.moreMenu.offsetWidth + __classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_itemGap).call(this);
|
|
113
|
+
}, _ActionBarElement_shrink = function _ActionBarElement_shrink() {
|
|
114
|
+
if (this.items[0].hidden) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
let index = this.items.length - 1;
|
|
118
|
+
for (const item of this.items.reverse()) {
|
|
119
|
+
if (!item.hidden && __classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_availableSpace).call(this) < __classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_menuSpace).call(this)) {
|
|
120
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_hideItem).call(this, index);
|
|
121
|
+
}
|
|
122
|
+
else if (__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_availableSpace).call(this) >= __classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_menuSpace).call(this)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
index--;
|
|
126
|
+
}
|
|
127
|
+
}, _ActionBarElement_grow = function _ActionBarElement_grow() {
|
|
128
|
+
// If last item is visible, there is no need to grow
|
|
129
|
+
if (!this.items[this.items.length - 1].hidden) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
let index = 0;
|
|
133
|
+
for (const item of this.items) {
|
|
134
|
+
if (item.hidden) {
|
|
135
|
+
const offsetWidth = Number(item.getAttribute('data-offset-width'));
|
|
136
|
+
if (__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_availableSpace).call(this) >= __classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_menuSpace).call(this) + offsetWidth || index === this.items.length - 1) {
|
|
137
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_showItem).call(this, index);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
index++;
|
|
144
|
+
}
|
|
145
|
+
if (!this.items[this.items.length - 1].hidden) {
|
|
146
|
+
this.moreMenu.hidden = true;
|
|
147
|
+
}
|
|
148
|
+
}, _ActionBarElement_showItem = function _ActionBarElement_showItem(index) {
|
|
149
|
+
this.items[index].hidden = false;
|
|
150
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "a", _ActionBarElement_menuItems_get)[index].hidden = true;
|
|
151
|
+
}, _ActionBarElement_hideItem = function _ActionBarElement_hideItem(index) {
|
|
152
|
+
this.items[index].hidden = true;
|
|
153
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "a", _ActionBarElement_menuItems_get)[index].hidden = false;
|
|
154
|
+
if (this.moreMenu.hidden) {
|
|
155
|
+
this.moreMenu.hidden = false;
|
|
156
|
+
}
|
|
157
|
+
}, _ActionBarElement_menuItems_get = function _ActionBarElement_menuItems_get() {
|
|
158
|
+
return this.moreMenu.querySelectorAll('[role="menu"] > li');
|
|
159
|
+
};
|
|
160
|
+
__decorate([
|
|
161
|
+
targets
|
|
162
|
+
], ActionBarElement.prototype, "items", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
target
|
|
165
|
+
], ActionBarElement.prototype, "itemContainer", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
target
|
|
168
|
+
], ActionBarElement.prototype, "moreMenu", void 0);
|
|
169
|
+
ActionBarElement = __decorate([
|
|
170
|
+
controller
|
|
171
|
+
], ActionBarElement);
|
|
172
|
+
window.ActionBarElement = ActionBarElement;
|
|
@@ -25,11 +25,21 @@ const DIRECTION_CLASSES = [
|
|
|
25
25
|
'tooltip-nw',
|
|
26
26
|
'tooltip-sw'
|
|
27
27
|
];
|
|
28
|
-
function
|
|
28
|
+
function closeOpenTooltips(except) {
|
|
29
29
|
for (const tooltip of openTooltips) {
|
|
30
|
-
tooltip
|
|
30
|
+
if (tooltip === except)
|
|
31
|
+
continue;
|
|
32
|
+
if (tooltip.matches(':popover-open')) {
|
|
33
|
+
tooltip.hidePopover();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
openTooltips.delete(tooltip);
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
39
|
}
|
|
40
|
+
function focusOutListener() {
|
|
41
|
+
closeOpenTooltips();
|
|
42
|
+
}
|
|
33
43
|
const tooltips = new Set();
|
|
34
44
|
const openTooltips = new Set();
|
|
35
45
|
class ToolTipElement extends HTMLElement {
|
|
@@ -197,10 +207,10 @@ class ToolTipElement extends HTMLElement {
|
|
|
197
207
|
}
|
|
198
208
|
/* @deprecated */
|
|
199
209
|
set hiddenFromView(value) {
|
|
200
|
-
if (value) {
|
|
210
|
+
if (value && this.matches(':popover-open')) {
|
|
201
211
|
this.hidePopover();
|
|
202
212
|
}
|
|
203
|
-
else {
|
|
213
|
+
else if (!value && !this.matches(':popover-open')) {
|
|
204
214
|
this.showPopover();
|
|
205
215
|
}
|
|
206
216
|
}
|
|
@@ -287,10 +297,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
|
|
|
287
297
|
if (isOpen) {
|
|
288
298
|
openTooltips.add(this);
|
|
289
299
|
this.classList.remove(TOOLTIP_SR_ONLY_CLASS);
|
|
290
|
-
|
|
291
|
-
if (tooltip !== this)
|
|
292
|
-
tooltip.hidePopover();
|
|
293
|
-
}
|
|
300
|
+
closeOpenTooltips(this);
|
|
294
301
|
__classPrivateFieldGet(this, _ToolTipElement_instances, "m", _ToolTipElement_updatePosition).call(this);
|
|
295
302
|
}
|
|
296
303
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Link{color:var(--color-accent-fg)}.Link:hover{cursor:pointer
|
|
1
|
+
.Link{color:var(--color-accent-fg)}.Link:hover{cursor:pointer}.Link:focus,.Link:hover{text-decoration:underline}.Link:focus,.Link:focus-visible{outline-offset:0}.Link--primary{color:var(--color-fg-default)!important}.Link--primary:hover{color:var(--color-accent-fg)!important}.Link--secondary{color:var(--color-fg-muted)!important}.Link--secondary:hover{color:var(--color-accent-fg)!important}.Link--muted{color:var(--color-fg-muted)!important}.Link--muted:hover{text-decoration:none}.Link--muted:hover,.Link--onHover:hover{color:var(--color-accent-fg)!important}.Link--onHover:hover{cursor:pointer;text-decoration:underline}.Link--muted:hover [class*=color-fg],.Link--primary:hover [class*=color-fg],.Link--secondary:hover [class*=color-fg]{color:inherit!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/view-components",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.5f73084c",
|
|
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",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"postcss-mixins": "^9.0.3",
|
|
87
87
|
"postcss-preset-env": "^7.8.0",
|
|
88
88
|
"prettier": "2.7.1",
|
|
89
|
-
"primer-changesets-cli": "2.
|
|
89
|
+
"primer-changesets-cli": "2.2.0",
|
|
90
90
|
"rollup": "^2.77.1",
|
|
91
91
|
"rollup-plugin-terser": "^7.0.2",
|
|
92
92
|
"stylelint": "^14.13.0",
|
package/static/arguments.json
CHANGED
|
@@ -1,4 +1,54 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"component": "ActionBar",
|
|
4
|
+
"status": "alpha",
|
|
5
|
+
"a11y_reviewed": false,
|
|
6
|
+
"short_name": "ActionBar",
|
|
7
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar.rb",
|
|
8
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/default/",
|
|
9
|
+
"parameters": [
|
|
10
|
+
{
|
|
11
|
+
"name": "size",
|
|
12
|
+
"type": "Symbol",
|
|
13
|
+
"default": "`:medium`",
|
|
14
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "overflow_menu",
|
|
18
|
+
"type": "Boolean",
|
|
19
|
+
"default": "`true`",
|
|
20
|
+
"description": "Whether to render the overflow menu."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "system_arguments",
|
|
24
|
+
"type": "Hash",
|
|
25
|
+
"default": "N/A",
|
|
26
|
+
"description": "[System arguments](/system-arguments)"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"component": "ActionBar::Divider",
|
|
32
|
+
"status": "alpha",
|
|
33
|
+
"a11y_reviewed": false,
|
|
34
|
+
"short_name": "ActionBarDivider",
|
|
35
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/divider.rb",
|
|
36
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/divider/default/",
|
|
37
|
+
"parameters": [
|
|
38
|
+
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"component": "ActionBar::Item",
|
|
43
|
+
"status": "alpha",
|
|
44
|
+
"a11y_reviewed": false,
|
|
45
|
+
"short_name": "ActionBarItem",
|
|
46
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_bar/item.rb",
|
|
47
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_bar/item/default/",
|
|
48
|
+
"parameters": [
|
|
49
|
+
|
|
50
|
+
]
|
|
51
|
+
},
|
|
2
52
|
{
|
|
3
53
|
"component": "ActionList",
|
|
4
54
|
"status": "alpha",
|
|
@@ -3582,17 +3632,11 @@
|
|
|
3582
3632
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/link.rb",
|
|
3583
3633
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/link/default/",
|
|
3584
3634
|
"parameters": [
|
|
3585
|
-
{
|
|
3586
|
-
"name": "tag",
|
|
3587
|
-
"type": "String",
|
|
3588
|
-
"default": "`:a`",
|
|
3589
|
-
"description": "One of `:a` or `:span`."
|
|
3590
|
-
},
|
|
3591
3635
|
{
|
|
3592
3636
|
"name": "href",
|
|
3593
3637
|
"type": "String",
|
|
3594
3638
|
"default": "`nil`",
|
|
3595
|
-
"description": "URL to be used for the Link. Required
|
|
3639
|
+
"description": "URL to be used for the Link. Required. If the requirements are not met an error will be raised in non production environments. In production, an empty link element will be rendered."
|
|
3596
3640
|
},
|
|
3597
3641
|
{
|
|
3598
3642
|
"name": "scheme",
|
package/static/audited_at.json
CHANGED
package/static/classes.json
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
+
"ActionBar": [
|
|
3
|
+
"Primer::Alpha::ActionBar"
|
|
4
|
+
],
|
|
5
|
+
"ActionBar--large": [
|
|
6
|
+
"Primer::Alpha::ActionBar"
|
|
7
|
+
],
|
|
8
|
+
"ActionBar--small": [
|
|
9
|
+
"Primer::Alpha::ActionBar"
|
|
10
|
+
],
|
|
11
|
+
"ActionBar-divider": [
|
|
12
|
+
"Primer::Alpha::ActionBar"
|
|
13
|
+
],
|
|
14
|
+
"ActionBar-item": [
|
|
15
|
+
"Primer::Alpha::ActionBar"
|
|
16
|
+
],
|
|
17
|
+
"ActionBar-item-container": [
|
|
18
|
+
"Primer::Alpha::ActionBar"
|
|
19
|
+
],
|
|
20
|
+
"ActionBar-more-menu": [
|
|
21
|
+
"Primer::Alpha::ActionBar"
|
|
22
|
+
],
|
|
2
23
|
"ActionList-sectionDivider": [
|
|
3
24
|
"Primer::Alpha::ActionList"
|
|
4
25
|
],
|
package/static/constants.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Primer::Alpha::ActionBar": {
|
|
3
|
+
"DEFAULT_SIZE": "medium",
|
|
4
|
+
"Divider": "Primer::Alpha::ActionBar::Divider",
|
|
5
|
+
"Item": "Primer::Alpha::ActionBar::Item",
|
|
6
|
+
"SIZE_MAPPINGS": {
|
|
7
|
+
"medium": null,
|
|
8
|
+
"small": "ActionBar--small",
|
|
9
|
+
"large": "ActionBar--large"
|
|
10
|
+
},
|
|
11
|
+
"SIZE_OPTIONS": [
|
|
12
|
+
"medium",
|
|
13
|
+
"small",
|
|
14
|
+
"large"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"Primer::Alpha::ActionBar::Divider": {
|
|
18
|
+
},
|
|
19
|
+
"Primer::Alpha::ActionBar::Item": {
|
|
20
|
+
},
|
|
2
21
|
"Primer::Alpha::ActionList": {
|
|
3
22
|
"DEFAULT_MENU_ITEM_ROLE": "menuitem",
|
|
4
23
|
"DEFAULT_ROLE": "list",
|
|
@@ -929,16 +948,11 @@
|
|
|
929
948
|
},
|
|
930
949
|
"Primer::Beta::Link": {
|
|
931
950
|
"DEFAULT_SCHEME": "default",
|
|
932
|
-
"DEFAULT_TAG": "a",
|
|
933
951
|
"SCHEME_MAPPINGS": {
|
|
934
952
|
"default": "",
|
|
935
953
|
"primary": "Link--primary",
|
|
936
954
|
"secondary": "Link--secondary"
|
|
937
|
-
}
|
|
938
|
-
"TAG_OPTIONS": [
|
|
939
|
-
"a",
|
|
940
|
-
"span"
|
|
941
|
-
]
|
|
955
|
+
}
|
|
942
956
|
},
|
|
943
957
|
"Primer::Beta::Markdown": {
|
|
944
958
|
"DEFAULT_TAG": "div",
|