@mixtint/primer-view-components 0.86.1 → 0.88.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 +8 -12
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_menu/action_menu_element.js +14 -5
- package/app/components/primer/alpha/dropdown.css +8 -12
- package/app/components/primer/alpha/select_panel_element.js +11 -1
- package/app/components/primer/alpha/tree_view/tree_view.js +27 -11
- package/app/components/primer/open_project/avatar_fallback.js +1 -1
- package/app/components/primer/open_project/border_box/collapsible_header.js +1 -1
- package/app/components/primer/open_project/collapsible_section.js +1 -1
- package/app/components/primer/open_project/danger_dialog_form_helper.js +1 -1
- package/app/components/primer/open_project/filterable_tree_view.js +2 -1
- package/app/components/primer/open_project/page_header_element.js +1 -1
- package/app/components/primer/open_project/sub_header_element.js +4 -3
- package/app/components/primer/open_project/zen_mode_button.js +1 -1
- package/package.json +4 -4
- package/static/arguments.json +13 -4
- package/static/audited_at.json +1 -0
- package/static/constants.json +6 -0
- package/static/info_arch.json +53 -11
- package/static/previews.json +29 -16
- package/static/statuses.json +1 -0
|
@@ -469,6 +469,7 @@ _ActionMenuElement_handleItemActivated = function _ActionMenuElement_handleItemA
|
|
|
469
469
|
else {
|
|
470
470
|
// multi-select mode allows unchecking a checked item
|
|
471
471
|
item.setAttribute('aria-checked', `${checked}`);
|
|
472
|
+
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_setDynamicLabel).call(this);
|
|
472
473
|
}
|
|
473
474
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_updateInput).call(this);
|
|
474
475
|
this.dispatchEvent(new CustomEvent('itemActivated', {
|
|
@@ -498,21 +499,29 @@ _ActionMenuElement_isOpen = function _ActionMenuElement_isOpen() {
|
|
|
498
499
|
return this.popoverElement?.matches(':popover-open');
|
|
499
500
|
};
|
|
500
501
|
_ActionMenuElement_setDynamicLabel = function _ActionMenuElement_setDynamicLabel() {
|
|
501
|
-
if (this.selectVariant !== 'single')
|
|
502
|
-
return;
|
|
503
502
|
if (!this.dynamicLabel)
|
|
504
503
|
return;
|
|
505
504
|
const invokerLabel = this.invokerLabel;
|
|
506
505
|
if (!invokerLabel)
|
|
507
506
|
return;
|
|
508
507
|
__classPrivateFieldSet(this, _ActionMenuElement_originalLabel, __classPrivateFieldGet(this, _ActionMenuElement_originalLabel, "f") || (invokerLabel.textContent || ''), "f");
|
|
509
|
-
|
|
508
|
+
let itemLabel;
|
|
509
|
+
if (this.selectVariant === 'single') {
|
|
510
|
+
itemLabel = this.querySelector('[aria-checked=true] .ActionListItem-label')?.textContent?.trim();
|
|
511
|
+
}
|
|
512
|
+
else if (this.selectVariant === 'multiple') {
|
|
513
|
+
itemLabel = Array.from(this.querySelectorAll(`[aria-checked=true] .ActionListItem-label`))
|
|
514
|
+
.map(label => (label.textContent || '').trim())
|
|
515
|
+
.filter(Boolean)
|
|
516
|
+
.join(', ');
|
|
517
|
+
}
|
|
518
|
+
itemLabel || (itemLabel = __classPrivateFieldGet(this, _ActionMenuElement_originalLabel, "f"));
|
|
510
519
|
if (itemLabel && this.dynamicLabel) {
|
|
511
520
|
const prefixSpan = document.createElement('span');
|
|
512
521
|
prefixSpan.classList.add('color-fg-muted');
|
|
513
522
|
const contentSpan = document.createElement('span');
|
|
514
|
-
prefixSpan.textContent = this.dynamicLabelPrefix;
|
|
515
|
-
contentSpan.textContent = itemLabel
|
|
523
|
+
prefixSpan.textContent = this.dynamicLabelPrefix ? `${this.dynamicLabelPrefix} ` : '';
|
|
524
|
+
contentSpan.textContent = itemLabel;
|
|
516
525
|
invokerLabel.replaceChildren(prefixSpan, contentSpan);
|
|
517
526
|
}
|
|
518
527
|
else {
|
|
@@ -26,9 +26,7 @@
|
|
|
26
26
|
left: 0;
|
|
27
27
|
z-index: 100;
|
|
28
28
|
width: 160px;
|
|
29
|
-
/* stylelint-disable-next-line primer/spacing */
|
|
30
29
|
padding-top: var(--control-small-paddingBlock);
|
|
31
|
-
/* stylelint-disable-next-line primer/spacing */
|
|
32
30
|
padding-bottom: var(--control-small-paddingBlock);
|
|
33
31
|
margin-top: var(--base-size-2);
|
|
34
32
|
list-style: none;
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
background-clip: padding-box;
|
|
37
35
|
border: var(--borderWidth-thin) solid var(--borderColor-default);
|
|
38
36
|
border-radius: var(--borderRadius-medium);
|
|
39
|
-
box-shadow: var(--shadow-floating-
|
|
37
|
+
box-shadow: var(--shadow-floating-small);
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
.dropdown-menu::before,.dropdown-menu::after {
|
|
@@ -73,7 +71,6 @@
|
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
.dropdown-menu-no-overflow .dropdown-item {
|
|
76
|
-
/* stylelint-disable-next-line primer/spacing */
|
|
77
74
|
padding: var(--control-small-paddingBlock) var(--control-medium-paddingInline-spacious);
|
|
78
75
|
overflow: visible;
|
|
79
76
|
text-overflow: inherit;
|
|
@@ -83,7 +80,6 @@
|
|
|
83
80
|
|
|
84
81
|
.dropdown-item {
|
|
85
82
|
display: block;
|
|
86
|
-
/* stylelint-disable-next-line primer/spacing */
|
|
87
83
|
padding: var(--control-small-paddingBlock) var(--control-medium-paddingInline-condensed) var(--control-small-paddingBlock) var(--control-medium-paddingInline-spacious);
|
|
88
84
|
overflow: hidden;
|
|
89
85
|
color: var(--fgColor-default);
|
|
@@ -127,13 +123,11 @@
|
|
|
127
123
|
.dropdown-divider {
|
|
128
124
|
display: block;
|
|
129
125
|
height: 0;
|
|
130
|
-
/* stylelint-disable-next-line primer/spacing */
|
|
131
126
|
margin: var(--stack-gap-condensed) 0;
|
|
132
127
|
border-top: var(--borderWidth-thin) solid var(--borderColor-default);
|
|
133
128
|
}
|
|
134
129
|
|
|
135
130
|
.dropdown-header {
|
|
136
|
-
/* stylelint-disable-next-line primer/spacing */
|
|
137
131
|
padding: var(--control-small-paddingBlock) var(--control-medium-paddingInline-spacious);
|
|
138
132
|
font-size: var(--text-body-size-small);
|
|
139
133
|
color: var(--fgColor-muted);
|
|
@@ -168,7 +162,8 @@
|
|
|
168
162
|
}
|
|
169
163
|
|
|
170
164
|
.dropdown-menu-w::after {
|
|
171
|
-
|
|
165
|
+
/* stylelint-disable-next-line primer/spacing */
|
|
166
|
+
top: calc(var(--base-size-12) - var(--borderWidth-thin));
|
|
172
167
|
/* stylelint-disable-next-line primer/spacing */
|
|
173
168
|
right: -14px;
|
|
174
169
|
left: auto;
|
|
@@ -195,7 +190,8 @@
|
|
|
195
190
|
}
|
|
196
191
|
|
|
197
192
|
.dropdown-menu-e::after {
|
|
198
|
-
|
|
193
|
+
/* stylelint-disable-next-line primer/spacing */
|
|
194
|
+
top: calc(var(--base-size-12) - var(--borderWidth-thin));
|
|
199
195
|
/* stylelint-disable-next-line primer/spacing */
|
|
200
196
|
left: -14px;
|
|
201
197
|
border-color: transparent;
|
|
@@ -232,7 +228,7 @@
|
|
|
232
228
|
/* stylelint-disable-next-line primer/spacing */
|
|
233
229
|
bottom: -7px;
|
|
234
230
|
/* stylelint-disable-next-line primer/spacing */
|
|
235
|
-
left:
|
|
231
|
+
left: calc(var(--base-size-8) + var(--borderWidth-thin));
|
|
236
232
|
/* stylelint-disable-next-line primer/borders, primer/colors */
|
|
237
233
|
border-top: 7px solid var(--overlay-bgColor);
|
|
238
234
|
/* stylelint-disable-next-line primer/borders */
|
|
@@ -278,7 +274,7 @@
|
|
|
278
274
|
/* stylelint-disable-next-line primer/spacing */
|
|
279
275
|
top: -14px;
|
|
280
276
|
/* stylelint-disable-next-line primer/spacing */
|
|
281
|
-
right:
|
|
277
|
+
right: calc(var(--base-size-8) + var(--borderWidth-thin));
|
|
282
278
|
left: auto;
|
|
283
279
|
}
|
|
284
280
|
|
|
@@ -292,5 +288,5 @@
|
|
|
292
288
|
/* stylelint-disable-next-line primer/spacing */
|
|
293
289
|
top: -14px;
|
|
294
290
|
/* stylelint-disable-next-line primer/spacing */
|
|
295
|
-
left:
|
|
291
|
+
left: calc(var(--base-size-8) + var(--borderWidth-thin));
|
|
296
292
|
}
|
|
@@ -866,6 +866,7 @@ _SelectPanelElement_handleItemActivated = function _SelectPanelElement_handleIte
|
|
|
866
866
|
else {
|
|
867
867
|
__classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_removeSelectedItem).call(this, item);
|
|
868
868
|
}
|
|
869
|
+
__classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_setDynamicLabel).call(this);
|
|
869
870
|
}
|
|
870
871
|
__classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_updateInput).call(this);
|
|
871
872
|
__classPrivateFieldGet(this, _SelectPanelElement_instances, "m", _SelectPanelElement_updateTabIndices).call(this);
|
|
@@ -885,7 +886,16 @@ _SelectPanelElement_setDynamicLabel = function _SelectPanelElement_setDynamicLab
|
|
|
885
886
|
if (!invokerLabel)
|
|
886
887
|
return;
|
|
887
888
|
__classPrivateFieldSet(this, _SelectPanelElement_originalLabel, __classPrivateFieldGet(this, _SelectPanelElement_originalLabel, "f") || (invokerLabel.textContent || ''), "f");
|
|
888
|
-
|
|
889
|
+
let itemLabel;
|
|
890
|
+
if (this.selectVariant === 'single') {
|
|
891
|
+
itemLabel = this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent;
|
|
892
|
+
}
|
|
893
|
+
else if (this.selectVariant === 'multiple') {
|
|
894
|
+
itemLabel = Array.from(this.querySelectorAll(`[${this.ariaSelectionType}=true] .ActionListItem-label`))
|
|
895
|
+
.map(label => label.textContent?.trim() ?? '')
|
|
896
|
+
.join(', ');
|
|
897
|
+
}
|
|
898
|
+
itemLabel || (itemLabel = __classPrivateFieldGet(this, _SelectPanelElement_originalLabel, "f"));
|
|
889
899
|
if (itemLabel) {
|
|
890
900
|
const prefixSpan = document.createElement('span');
|
|
891
901
|
prefixSpan.classList.add('color-fg-muted');
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
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
16
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
17
|
};
|
|
18
|
-
var _TreeViewElement_instances, _TreeViewElement_abortController, _TreeViewElement_autoExpandFrom, _TreeViewElement_eventIsActivation, _TreeViewElement_nodeForEvent, _TreeViewElement_handleNodeEvent, _TreeViewElement_eventIsCheckboxToggle, _TreeViewElement_handleCheckboxToggle, _TreeViewElement_eventIsSingleSelection, _TreeViewElement_handleNodeActivated, _TreeViewElement_handleNodeFocused, _TreeViewElement_handleNodeKeyboardEvent;
|
|
18
|
+
var _TreeViewElement_instances, _TreeViewElement_abortController, _TreeViewElement_autoExpandFrom, _TreeViewElement_eventIsActivation, _TreeViewElement_nodeForEvent, _TreeViewElement_handleNodeEvent, _TreeViewElement_eventIsCheckboxToggle, _TreeViewElement_handleCheckboxToggle, _TreeViewElement_eventIsSingleSelection, _TreeViewElement_handleNodeActivated, _TreeViewElement_handleNodeFocused, _TreeViewElement_handleNodeKeyboardEvent, _TreeViewElement_checkNodeOnly;
|
|
19
19
|
import { controller, target } from '@github/catalyst';
|
|
20
20
|
import { useRovingTabIndex } from './tree_view_roving_tab_index';
|
|
21
21
|
let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
@@ -97,8 +97,8 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
97
97
|
// behavior for these element types is user- or browser-defined
|
|
98
98
|
if (!(node instanceof HTMLDivElement))
|
|
99
99
|
return;
|
|
100
|
-
const
|
|
101
|
-
const nodeInfo = this.infoFromNode(node,
|
|
100
|
+
const newCheckedValue = this.getNodeCheckedValue(node) === 'true' ? 'false' : 'true';
|
|
101
|
+
const nodeInfo = this.infoFromNode(node, newCheckedValue);
|
|
102
102
|
const checkSuccess = this.dispatchEvent(new CustomEvent('treeViewBeforeNodeChecked', {
|
|
103
103
|
bubbles: true,
|
|
104
104
|
cancelable: true,
|
|
@@ -106,11 +106,11 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
106
106
|
}));
|
|
107
107
|
if (!checkSuccess)
|
|
108
108
|
return;
|
|
109
|
-
if (
|
|
109
|
+
if (newCheckedValue === 'false') {
|
|
110
110
|
this.setNodeCheckedValue(node, 'false');
|
|
111
111
|
}
|
|
112
112
|
else {
|
|
113
|
-
this.
|
|
113
|
+
__classPrivateFieldGet(this, _TreeViewElement_instances, "m", _TreeViewElement_checkNodeOnly).call(this, node);
|
|
114
114
|
}
|
|
115
115
|
this.dispatchEvent(new CustomEvent('treeViewNodeChecked', {
|
|
116
116
|
bubbles: true,
|
|
@@ -142,7 +142,7 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
142
142
|
return this.querySelector('[aria-current=true]');
|
|
143
143
|
}
|
|
144
144
|
get activeNodes() {
|
|
145
|
-
return
|
|
145
|
+
return this.querySelectorAll('[aria-checked="true"]');
|
|
146
146
|
}
|
|
147
147
|
expandAtPath(path) {
|
|
148
148
|
const node = this.subTreeAtPath(path);
|
|
@@ -175,10 +175,10 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
175
175
|
this.setNodeCheckedValue(node, 'false');
|
|
176
176
|
}
|
|
177
177
|
checkOnlyAtPath(path) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
this.
|
|
178
|
+
const node = this.nodeAtPath(path);
|
|
179
|
+
if (!node)
|
|
180
|
+
return;
|
|
181
|
+
__classPrivateFieldGet(this, _TreeViewElement_instances, "m", _TreeViewElement_checkNodeOnly).call(this, node);
|
|
182
182
|
}
|
|
183
183
|
toggleCheckedAtPath(path) {
|
|
184
184
|
const node = this.nodeAtPath(path);
|
|
@@ -286,6 +286,9 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
286
286
|
const payload = {
|
|
287
287
|
path: this.getNodePath(node),
|
|
288
288
|
};
|
|
289
|
+
const nodeId = node.getAttribute('data-node-id');
|
|
290
|
+
if (nodeId)
|
|
291
|
+
payload.nodeId = nodeId;
|
|
289
292
|
const inputValue = this.getFormInputValueForNode(node);
|
|
290
293
|
if (inputValue)
|
|
291
294
|
payload.value = inputValue;
|
|
@@ -424,7 +427,12 @@ _TreeViewElement_handleNodeKeyboardEvent = function _TreeViewElement_handleNodeK
|
|
|
424
427
|
}
|
|
425
428
|
else if (this.selectVariant(node) === 'single') {
|
|
426
429
|
event.preventDefault();
|
|
427
|
-
|
|
430
|
+
if (this.getNodeCheckedValue(node) === 'true') {
|
|
431
|
+
this.setNodeCheckedValue(node, 'false');
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
__classPrivateFieldGet(this, _TreeViewElement_instances, "m", _TreeViewElement_checkNodeOnly).call(this, node);
|
|
435
|
+
}
|
|
428
436
|
}
|
|
429
437
|
else if (node instanceof HTMLAnchorElement) {
|
|
430
438
|
// simulate click on space
|
|
@@ -433,6 +441,14 @@ _TreeViewElement_handleNodeKeyboardEvent = function _TreeViewElement_handleNodeK
|
|
|
433
441
|
break;
|
|
434
442
|
}
|
|
435
443
|
};
|
|
444
|
+
_TreeViewElement_checkNodeOnly = function _TreeViewElement_checkNodeOnly(node) {
|
|
445
|
+
for (const el of this.activeNodes) {
|
|
446
|
+
if (el === node)
|
|
447
|
+
continue;
|
|
448
|
+
this.setNodeCheckedValue(el, 'false');
|
|
449
|
+
}
|
|
450
|
+
this.setNodeCheckedValue(node, 'true');
|
|
451
|
+
};
|
|
436
452
|
__decorate([
|
|
437
453
|
target
|
|
438
454
|
], TreeViewElement.prototype, "formInputContainer", void 0);
|
|
@@ -62,7 +62,7 @@ __decorate([
|
|
|
62
62
|
attr
|
|
63
63
|
], DangerDialogFormHelperElement.prototype, "confirmationLiveMessageUnchecked", void 0);
|
|
64
64
|
DangerDialogFormHelperElement = __decorate([
|
|
65
|
-
controller
|
|
65
|
+
controller('danger-dialog-form-helper')
|
|
66
66
|
], DangerDialogFormHelperElement);
|
|
67
67
|
if (!window.customElements.get('danger-dialog-form-helper')) {
|
|
68
68
|
window.DangerDialogFormHelperElement = DangerDialogFormHelperElement;
|
|
@@ -224,6 +224,7 @@ _FilterableTreeViewElement_updateCheckedNodeIds = function _FilterableTreeViewEl
|
|
|
224
224
|
}
|
|
225
225
|
__classPrivateFieldGet(this, _FilterableTreeViewElement_checkedNodeIds, "f").set(nodeId, nodeInfo.checkedValue);
|
|
226
226
|
const payload = { path: nodeInfo.path };
|
|
227
|
+
payload.nodeId = nodeId;
|
|
227
228
|
const dataValue = node.getAttribute('data-value');
|
|
228
229
|
if (dataValue)
|
|
229
230
|
payload.value = dataValue;
|
|
@@ -689,7 +690,7 @@ __decorate([
|
|
|
689
690
|
target
|
|
690
691
|
], FilterableTreeViewElement.prototype, "includeSubItemsCheckBox", void 0);
|
|
691
692
|
FilterableTreeViewElement = __decorate([
|
|
692
|
-
controller
|
|
693
|
+
controller('filterable-tree-view')
|
|
693
694
|
], FilterableTreeViewElement);
|
|
694
695
|
export { FilterableTreeViewElement };
|
|
695
696
|
if (!window.customElements.get('filterable-tree-view')) {
|
|
@@ -15,7 +15,7 @@ let PageHeaderElement = class PageHeaderElement extends HTMLElement {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
PageHeaderElement = __decorate([
|
|
18
|
-
controller
|
|
18
|
+
controller('page-header')
|
|
19
19
|
], PageHeaderElement);
|
|
20
20
|
if (!window.customElements.get('page-header')) {
|
|
21
21
|
window.PageHeaderElement = PageHeaderElement;
|
|
@@ -24,9 +24,10 @@ let SubHeaderElement = class SubHeaderElement extends HTMLElement {
|
|
|
24
24
|
}
|
|
25
25
|
expandFilterInput() {
|
|
26
26
|
for (const item of this.shownItemsOnExpandedFilter) {
|
|
27
|
-
item.classList.remove('d-none');
|
|
27
|
+
item.classList.remove('d-none', 'd-sm-none');
|
|
28
28
|
}
|
|
29
29
|
for (const item of this.filterExpandButton) {
|
|
30
|
+
item.classList.remove('d-inline-flex', 'd-sm-inline-flex');
|
|
30
31
|
item.classList.add('d-none');
|
|
31
32
|
}
|
|
32
33
|
this.classList.add('SubHeader--expandedSearch');
|
|
@@ -37,7 +38,7 @@ let SubHeaderElement = class SubHeaderElement extends HTMLElement {
|
|
|
37
38
|
item.classList.remove('d-none');
|
|
38
39
|
}
|
|
39
40
|
for (const item of this.shownItemsOnExpandedFilter) {
|
|
40
|
-
item.classList.add('d-none');
|
|
41
|
+
item.classList.add('d-none', 'd-sm-none');
|
|
41
42
|
}
|
|
42
43
|
this.classList.remove('SubHeader--expandedSearch');
|
|
43
44
|
}
|
|
@@ -68,7 +69,7 @@ __decorate([
|
|
|
68
69
|
targets
|
|
69
70
|
], SubHeaderElement.prototype, "filterExpandButton", void 0);
|
|
70
71
|
SubHeaderElement = __decorate([
|
|
71
|
-
controller
|
|
72
|
+
controller('sub-header')
|
|
72
73
|
], SubHeaderElement);
|
|
73
74
|
if (!window.customElements.get('sub-header')) {
|
|
74
75
|
window.SubHeaderElement = SubHeaderElement;
|
|
@@ -56,7 +56,7 @@ __decorate([
|
|
|
56
56
|
target
|
|
57
57
|
], ZenModeButtonElement.prototype, "button", void 0);
|
|
58
58
|
ZenModeButtonElement = __decorate([
|
|
59
|
-
controller
|
|
59
|
+
controller('zen-mode-button')
|
|
60
60
|
], ZenModeButtonElement);
|
|
61
61
|
if (!window.customElements.get('zen-mode-button')) {
|
|
62
62
|
window.ZenModeButtonElement = ZenModeButtonElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mixtint/primer-view-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@changesets/cli": "^2.31.0",
|
|
69
69
|
"@github/axe-github": "^0.8.1",
|
|
70
70
|
"@github/browserslist-config": "^1.0.0",
|
|
71
|
-
"@github/markdownlint-github": "^0.8.
|
|
71
|
+
"@github/markdownlint-github": "^0.8.1",
|
|
72
72
|
"@github/prettier-config": "0.0.6",
|
|
73
73
|
"@playwright/test": "^1.60.0",
|
|
74
74
|
"@primer/css": "22.1.1",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@primer/stylelint-config": "^13.6.0",
|
|
77
77
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
78
78
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
79
|
-
"axe-core": "^4.
|
|
79
|
+
"axe-core": "^4.12.0",
|
|
80
80
|
"chokidar-cli": "^3.0.0",
|
|
81
81
|
"css-what": "^7.0.0",
|
|
82
82
|
"cssnano": "^7.1.9",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"stylelint-actions-formatters": "^16.3.1",
|
|
98
98
|
"tslib": "^2.8.1",
|
|
99
99
|
"typescript": "^5.9.3",
|
|
100
|
-
"vite": "^8.0.
|
|
100
|
+
"vite": "^8.0.16",
|
|
101
101
|
"vite-plugin-ruby": "^5.2.2"
|
|
102
102
|
},
|
|
103
103
|
"prettier": "@github/prettier-config",
|
package/static/arguments.json
CHANGED
|
@@ -6188,25 +6188,25 @@
|
|
|
6188
6188
|
{
|
|
6189
6189
|
"name": "filter_input_arguments",
|
|
6190
6190
|
"type": "Hash",
|
|
6191
|
-
"default": "`
|
|
6191
|
+
"default": "`{}`",
|
|
6192
6192
|
"description": "Arguments that will be passed to the [TextField](/components/alpha/textfield) component."
|
|
6193
6193
|
},
|
|
6194
6194
|
{
|
|
6195
6195
|
"name": "filter_mode_control_arguments",
|
|
6196
6196
|
"type": "Hash",
|
|
6197
|
-
"default": "`
|
|
6197
|
+
"default": "`{}`",
|
|
6198
6198
|
"description": "Arguments that will be passed to the [SegmentedControl](/components/alpha/segmentedcontrol) component."
|
|
6199
6199
|
},
|
|
6200
6200
|
{
|
|
6201
6201
|
"name": "include_sub_items_check_box_arguments",
|
|
6202
6202
|
"type": "Hash",
|
|
6203
|
-
"default": "`
|
|
6203
|
+
"default": "`{}`",
|
|
6204
6204
|
"description": "Arguments that will be passed to the [CheckBox](/components/alpha/checkbox) component."
|
|
6205
6205
|
},
|
|
6206
6206
|
{
|
|
6207
6207
|
"name": "no_results_node_arguments",
|
|
6208
6208
|
"type": "Hash",
|
|
6209
|
-
"default": "`
|
|
6209
|
+
"default": "`{}`",
|
|
6210
6210
|
"description": "Arguments that will be passed to a [TreeView::LeafNode](/components/alpha/treeviewleafnode) component that appears when no items match the filter criteria."
|
|
6211
6211
|
}
|
|
6212
6212
|
]
|
|
@@ -6599,6 +6599,15 @@
|
|
|
6599
6599
|
}
|
|
6600
6600
|
]
|
|
6601
6601
|
},
|
|
6602
|
+
{
|
|
6603
|
+
"component": "OpenProject::SubHeader::QuickAction",
|
|
6604
|
+
"status": "open_project",
|
|
6605
|
+
"a11y_reviewed": false,
|
|
6606
|
+
"short_name": "OpenProjectSubHeaderQuickAction",
|
|
6607
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header/quick_action_component.rb",
|
|
6608
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/quick_action/default/",
|
|
6609
|
+
"parameters": []
|
|
6610
|
+
},
|
|
6602
6611
|
{
|
|
6603
6612
|
"component": "OpenProject::SubHeader::SegmentedControl",
|
|
6604
6613
|
"status": "open_project",
|
package/static/audited_at.json
CHANGED
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
"Primer::OpenProject::SubHeader::Button": "",
|
|
174
174
|
"Primer::OpenProject::SubHeader::ButtonGroup": "",
|
|
175
175
|
"Primer::OpenProject::SubHeader::Menu": "",
|
|
176
|
+
"Primer::OpenProject::SubHeader::QuickActionComponent": "",
|
|
176
177
|
"Primer::OpenProject::SubHeader::SegmentedControl": "2023-02-01",
|
|
177
178
|
"Primer::OpenProject::ZenModeButton": "",
|
|
178
179
|
"Primer::Tooltip": "",
|
package/static/constants.json
CHANGED
|
@@ -1984,16 +1984,19 @@
|
|
|
1984
1984
|
"Button": "Primer::OpenProject::SubHeader::Button",
|
|
1985
1985
|
"ButtonGroup": "Primer::OpenProject::SubHeader::ButtonGroup",
|
|
1986
1986
|
"DESKTOP_ACTIONS_DISPLAY": [
|
|
1987
|
+
"none",
|
|
1987
1988
|
"none",
|
|
1988
1989
|
"flex"
|
|
1989
1990
|
],
|
|
1990
1991
|
"FILTER_EXPAND_BUTTON_TARGET_SELECTOR": "sub-header.filterExpandButton",
|
|
1991
1992
|
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::GeneratedSlotMethods",
|
|
1992
1993
|
"MOBILE_ACTIONS_DISPLAY": [
|
|
1994
|
+
"flex",
|
|
1993
1995
|
"flex",
|
|
1994
1996
|
"none"
|
|
1995
1997
|
],
|
|
1996
1998
|
"Menu": "Primer::OpenProject::SubHeader::Menu",
|
|
1999
|
+
"QuickActionComponent": "Primer::OpenProject::SubHeader::QuickActionComponent",
|
|
1997
2000
|
"SHOWN_FILTER_TARGET_SELECTOR": "sub-header.shownItemsOnExpandedFilter",
|
|
1998
2001
|
"SegmentedControl": "Primer::OpenProject::SubHeader::SegmentedControl"
|
|
1999
2002
|
},
|
|
@@ -2006,6 +2009,9 @@
|
|
|
2006
2009
|
"Primer::OpenProject::SubHeader::Menu": {
|
|
2007
2010
|
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::Menu::GeneratedSlotMethods"
|
|
2008
2011
|
},
|
|
2012
|
+
"Primer::OpenProject::SubHeader::QuickActionComponent": {
|
|
2013
|
+
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::QuickActionComponent::GeneratedSlotMethods"
|
|
2014
|
+
},
|
|
2009
2015
|
"Primer::OpenProject::SubHeader::SegmentedControl": {
|
|
2010
2016
|
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::SegmentedControl::GeneratedSlotMethods"
|
|
2011
2017
|
},
|
package/static/info_arch.json
CHANGED
|
@@ -4270,7 +4270,7 @@
|
|
|
4270
4270
|
{
|
|
4271
4271
|
"preview_path": "primer/alpha/dropdown/direction_e",
|
|
4272
4272
|
"name": "direction_e",
|
|
4273
|
-
"snapshot": "
|
|
4273
|
+
"snapshot": "interactive",
|
|
4274
4274
|
"skip_rules": {
|
|
4275
4275
|
"wont_fix": [
|
|
4276
4276
|
"region"
|
|
@@ -4283,7 +4283,7 @@
|
|
|
4283
4283
|
{
|
|
4284
4284
|
"preview_path": "primer/alpha/dropdown/direction_ne",
|
|
4285
4285
|
"name": "direction_ne",
|
|
4286
|
-
"snapshot": "
|
|
4286
|
+
"snapshot": "interactive",
|
|
4287
4287
|
"skip_rules": {
|
|
4288
4288
|
"wont_fix": [
|
|
4289
4289
|
"region"
|
|
@@ -4296,7 +4296,7 @@
|
|
|
4296
4296
|
{
|
|
4297
4297
|
"preview_path": "primer/alpha/dropdown/direction_s",
|
|
4298
4298
|
"name": "direction_s",
|
|
4299
|
-
"snapshot": "
|
|
4299
|
+
"snapshot": "interactive",
|
|
4300
4300
|
"skip_rules": {
|
|
4301
4301
|
"wont_fix": [
|
|
4302
4302
|
"region"
|
|
@@ -4309,7 +4309,7 @@
|
|
|
4309
4309
|
{
|
|
4310
4310
|
"preview_path": "primer/alpha/dropdown/direction_se",
|
|
4311
4311
|
"name": "direction_se",
|
|
4312
|
-
"snapshot": "
|
|
4312
|
+
"snapshot": "interactive",
|
|
4313
4313
|
"skip_rules": {
|
|
4314
4314
|
"wont_fix": [
|
|
4315
4315
|
"region"
|
|
@@ -4322,7 +4322,7 @@
|
|
|
4322
4322
|
{
|
|
4323
4323
|
"preview_path": "primer/alpha/dropdown/direction_sw",
|
|
4324
4324
|
"name": "direction_sw",
|
|
4325
|
-
"snapshot": "
|
|
4325
|
+
"snapshot": "interactive",
|
|
4326
4326
|
"skip_rules": {
|
|
4327
4327
|
"wont_fix": [
|
|
4328
4328
|
"region"
|
|
@@ -4335,7 +4335,7 @@
|
|
|
4335
4335
|
{
|
|
4336
4336
|
"preview_path": "primer/alpha/dropdown/direction_w",
|
|
4337
4337
|
"name": "direction_w",
|
|
4338
|
-
"snapshot": "
|
|
4338
|
+
"snapshot": "interactive",
|
|
4339
4339
|
"skip_rules": {
|
|
4340
4340
|
"wont_fix": [
|
|
4341
4341
|
"region"
|
|
@@ -20383,25 +20383,25 @@
|
|
|
20383
20383
|
{
|
|
20384
20384
|
"name": "filter_input_arguments",
|
|
20385
20385
|
"type": "Hash",
|
|
20386
|
-
"default": "`
|
|
20386
|
+
"default": "`{}`",
|
|
20387
20387
|
"description": "Arguments that will be passed to the {{#link_to_component}}Primer::Alpha::TextField{{/link_to_component}} component."
|
|
20388
20388
|
},
|
|
20389
20389
|
{
|
|
20390
20390
|
"name": "filter_mode_control_arguments",
|
|
20391
20391
|
"type": "Hash",
|
|
20392
|
-
"default": "`
|
|
20392
|
+
"default": "`{}`",
|
|
20393
20393
|
"description": "Arguments that will be passed to the {{#link_to_component}}Primer::Alpha::SegmentedControl{{/link_to_component}} component."
|
|
20394
20394
|
},
|
|
20395
20395
|
{
|
|
20396
20396
|
"name": "include_sub_items_check_box_arguments",
|
|
20397
20397
|
"type": "Hash",
|
|
20398
|
-
"default": "`
|
|
20398
|
+
"default": "`{}`",
|
|
20399
20399
|
"description": "Arguments that will be passed to the {{#link_to_component}}Primer::Alpha::CheckBox{{/link_to_component}} component."
|
|
20400
20400
|
},
|
|
20401
20401
|
{
|
|
20402
20402
|
"name": "no_results_node_arguments",
|
|
20403
20403
|
"type": "Hash",
|
|
20404
|
-
"default": "`
|
|
20404
|
+
"default": "`{}`",
|
|
20405
20405
|
"description": "Arguments that will be passed to a {{#link_to_component}}Primer::Alpha::TreeView::LeafNode{{/link_to_component}} component that appears when no items match the filter criteria."
|
|
20406
20406
|
}
|
|
20407
20407
|
],
|
|
@@ -21067,6 +21067,19 @@
|
|
|
21067
21067
|
"color-contrast"
|
|
21068
21068
|
]
|
|
21069
21069
|
}
|
|
21070
|
+
},
|
|
21071
|
+
{
|
|
21072
|
+
"preview_path": "primer/open_project/input_group/with_error_message",
|
|
21073
|
+
"name": "with_error_message",
|
|
21074
|
+
"snapshot": "true",
|
|
21075
|
+
"skip_rules": {
|
|
21076
|
+
"wont_fix": [
|
|
21077
|
+
"region"
|
|
21078
|
+
],
|
|
21079
|
+
"will_fix": [
|
|
21080
|
+
"color-contrast"
|
|
21081
|
+
]
|
|
21082
|
+
}
|
|
21070
21083
|
}
|
|
21071
21084
|
],
|
|
21072
21085
|
"subcomponents": []
|
|
@@ -21800,9 +21813,19 @@
|
|
|
21800
21813
|
"description": "A button or custom content that will render on the left-hand side of the component, next to the filter input.\n\nTo render a button, call the `with_filter_button` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}.\n\nTo render custom content, call the `with_filter_component` method and pass a block that returns HTML.",
|
|
21801
21814
|
"parameters": []
|
|
21802
21815
|
},
|
|
21816
|
+
{
|
|
21817
|
+
"name": "quick_sort",
|
|
21818
|
+
"description": "A slot for a generic sorting component. Will be rendered next to the search input",
|
|
21819
|
+
"parameters": []
|
|
21820
|
+
},
|
|
21821
|
+
{
|
|
21822
|
+
"name": "quick_group",
|
|
21823
|
+
"description": "A slot for a generic sorting component. Will be rendered next to the sorting button",
|
|
21824
|
+
"parameters": []
|
|
21825
|
+
},
|
|
21803
21826
|
{
|
|
21804
21827
|
"name": "quick_filters",
|
|
21805
|
-
"description": "Quick filters shown in the left pane next to the search bar (0–5 items).\nHidden on
|
|
21828
|
+
"description": "Quick filters shown in the left pane next to the search bar (0–5 items total across all types).\nHidden on smaller screens when more than one `quick_filter` is provided. Requires `filter_button` when using more than one `quick_filter`.\nSupports ActionMenus, Buttons, IconButtons, SelectPanels, and SegmentedControls inside the block.",
|
|
21806
21829
|
"parameters": []
|
|
21807
21830
|
},
|
|
21808
21831
|
{
|
|
@@ -22107,6 +22130,25 @@
|
|
|
22107
22130
|
"previews": [],
|
|
22108
22131
|
"subcomponents": []
|
|
22109
22132
|
},
|
|
22133
|
+
{
|
|
22134
|
+
"fully_qualified_name": "Primer::OpenProject::SubHeader::QuickActionComponent",
|
|
22135
|
+
"description": "Thin wrapper for quick filter slots that defers BaseComponent construction to render time,\nallowing system arguments (e.g. display) to be mutated in before_render.\nDo not use standalone",
|
|
22136
|
+
"accessibility_docs": null,
|
|
22137
|
+
"is_form_component": false,
|
|
22138
|
+
"is_published": true,
|
|
22139
|
+
"requires_js": false,
|
|
22140
|
+
"component": "OpenProject::SubHeader::QuickAction",
|
|
22141
|
+
"status": "open_project",
|
|
22142
|
+
"a11y_reviewed": false,
|
|
22143
|
+
"short_name": "OpenProjectSubHeaderQuickAction",
|
|
22144
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header/quick_action_component.rb",
|
|
22145
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/quick_action/default/",
|
|
22146
|
+
"parameters": [],
|
|
22147
|
+
"slots": [],
|
|
22148
|
+
"methods": [],
|
|
22149
|
+
"previews": [],
|
|
22150
|
+
"subcomponents": []
|
|
22151
|
+
},
|
|
22110
22152
|
{
|
|
22111
22153
|
"fully_qualified_name": "Primer::OpenProject::SubHeader::SegmentedControl",
|
|
22112
22154
|
"description": "A Helper class to create SegmentedControls inside the SubHeader action slot\nDo not use standalone",
|