@mixtint/primer-view-components 0.72.0 → 0.73.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/components/primer/open_project/danger_dialog_form_helper.d.ts +4 -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 +19 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_list.css +14 -0
- package/app/components/primer/alpha/action_list.css.json +3 -0
- package/app/components/primer/alpha/select_panel_element.js +1 -2
- package/app/components/primer/open_project/danger_dialog_form_helper.d.ts +4 -0
- package/app/components/primer/open_project/danger_dialog_form_helper.js +19 -3
- package/app/components/primer/open_project/page_header.css +1 -1
- package/app/components/primer/open_project/sub_header.css +1 -0
- package/package.json +2 -2
- package/static/classes.json +6 -0
- package/static/constants.json +3 -1
- package/static/info_arch.json +32 -6
- package/static/previews.json +32 -6
- package/app/assets/images/loading_indicator.svg +0 -1
|
@@ -506,6 +506,20 @@ nav-list {
|
|
|
506
506
|
color: var(--fgColor-muted);
|
|
507
507
|
align-self: flex-start;
|
|
508
508
|
}
|
|
509
|
+
.ActionList-sectionDividerHeader {
|
|
510
|
+
display: flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
gap: var(--base-size-8);
|
|
513
|
+
}
|
|
514
|
+
.ActionList-sectionDividerHeader .ActionList-sectionDivider-title {
|
|
515
|
+
align-self: baseline;
|
|
516
|
+
}
|
|
517
|
+
.ActionList-sectionDivider-trailingVisual {
|
|
518
|
+
display: inline-flex;
|
|
519
|
+
align-items: center;
|
|
520
|
+
margin-inline-start: auto;
|
|
521
|
+
flex-shrink: 0;
|
|
522
|
+
}
|
|
509
523
|
.ActionList-sectionDivider--filled {
|
|
510
524
|
/* stylelint-disable-next-line primer/spacing */
|
|
511
525
|
margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));
|
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
".ActionList-sectionDivider:not(:empty)",
|
|
111
111
|
".ActionList-sectionDivider:empty",
|
|
112
112
|
".ActionList-sectionDivider .ActionList-sectionDivider-title",
|
|
113
|
+
".ActionList-sectionDividerHeader",
|
|
114
|
+
".ActionList-sectionDividerHeader .ActionList-sectionDivider-title",
|
|
115
|
+
".ActionList-sectionDivider-trailingVisual",
|
|
113
116
|
".ActionList-sectionDivider--filled",
|
|
114
117
|
".ActionList-sectionDivider--filled:empty",
|
|
115
118
|
".ActionList-sectionDivider--filled:first-child"
|
|
@@ -539,9 +539,8 @@ _SelectPanelElement_handleIncludeFragmentEvent = function _SelectPanelElement_ha
|
|
|
539
539
|
// check if the errorElement is visible in the dom
|
|
540
540
|
if (errorElement && !errorElement.hasAttribute('hidden')) {
|
|
541
541
|
this.liveRegion.announceFromElement(errorElement, { politeness: 'assertive' });
|
|
542
|
-
return;
|
|
543
542
|
}
|
|
544
|
-
|
|
543
|
+
throw new Error(event.detail.error);
|
|
545
544
|
}
|
|
546
545
|
}
|
|
547
546
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { LiveRegionElement } from '@primer/live-region-element';
|
|
1
2
|
declare class DangerDialogFormHelperElement extends HTMLElement {
|
|
2
3
|
#private;
|
|
3
4
|
checkbox: HTMLInputElement | undefined;
|
|
5
|
+
liveRegion: LiveRegionElement;
|
|
6
|
+
confirmationLiveMessageChecked: string;
|
|
7
|
+
confirmationLiveMessageUnchecked: string;
|
|
4
8
|
get form(): HTMLFormElement | null;
|
|
5
9
|
get submitButton(): HTMLInputElement | HTMLButtonElement;
|
|
6
10
|
connectedCallback(): void;
|
|
@@ -10,12 +10,14 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _DangerDialogFormHelperElement_instances, _DangerDialogFormHelperElement_reset;
|
|
13
|
-
import { controller, target } from '@github/catalyst';
|
|
13
|
+
import { controller, target, attr } from '@github/catalyst';
|
|
14
14
|
const SUBMIT_BUTTON_SELECTOR = 'input[type=submit],button[type=submit],button[data-submit-dialog-id]';
|
|
15
15
|
let DangerDialogFormHelperElement = class DangerDialogFormHelperElement extends HTMLElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
18
|
_DangerDialogFormHelperElement_instances.add(this);
|
|
19
|
+
this.confirmationLiveMessageChecked = '';
|
|
20
|
+
this.confirmationLiveMessageUnchecked = '';
|
|
19
21
|
}
|
|
20
22
|
get form() {
|
|
21
23
|
return this.querySelector('form');
|
|
@@ -33,8 +35,13 @@ let DangerDialogFormHelperElement = class DangerDialogFormHelperElement extends
|
|
|
33
35
|
__classPrivateFieldGet(this, _DangerDialogFormHelperElement_instances, "m", _DangerDialogFormHelperElement_reset).call(this);
|
|
34
36
|
}
|
|
35
37
|
toggle() {
|
|
36
|
-
if (this.checkbox)
|
|
37
|
-
|
|
38
|
+
if (!this.checkbox || !this.submitButton)
|
|
39
|
+
return;
|
|
40
|
+
const enabled = this.checkbox.checked;
|
|
41
|
+
this.submitButton.disabled = !enabled;
|
|
42
|
+
if (this.liveRegion) {
|
|
43
|
+
const message = enabled ? this.confirmationLiveMessageChecked : this.confirmationLiveMessageUnchecked;
|
|
44
|
+
this.liveRegion.announce(message, { politeness: 'assertive' });
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
47
|
};
|
|
@@ -45,6 +52,15 @@ _DangerDialogFormHelperElement_reset = function _DangerDialogFormHelperElement_r
|
|
|
45
52
|
__decorate([
|
|
46
53
|
target
|
|
47
54
|
], DangerDialogFormHelperElement.prototype, "checkbox", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
target
|
|
57
|
+
], DangerDialogFormHelperElement.prototype, "liveRegion", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
attr
|
|
60
|
+
], DangerDialogFormHelperElement.prototype, "confirmationLiveMessageChecked", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
attr
|
|
63
|
+
], DangerDialogFormHelperElement.prototype, "confirmationLiveMessageUnchecked", void 0);
|
|
48
64
|
DangerDialogFormHelperElement = __decorate([
|
|
49
65
|
controller
|
|
50
66
|
], DangerDialogFormHelperElement);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mixtint/primer-view-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"postcss": "^8.4.16",
|
|
88
88
|
"postcss-cli": "^11.0.0",
|
|
89
89
|
"postcss-import": "^16.0.0",
|
|
90
|
-
"postcss-mixins": "^
|
|
90
|
+
"postcss-mixins": "^12.1.2",
|
|
91
91
|
"postcss-preset-env": "^10.0.2",
|
|
92
92
|
"prettier": "^3.3.2",
|
|
93
93
|
"rollup": "^2.79.1",
|
package/static/classes.json
CHANGED
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
"ActionList-sectionDivider--filled": [
|
|
27
27
|
"Primer::Alpha::ActionList"
|
|
28
28
|
],
|
|
29
|
+
"ActionList-sectionDivider-trailingVisual": [
|
|
30
|
+
"Primer::Alpha::ActionList"
|
|
31
|
+
],
|
|
32
|
+
"ActionList-sectionDividerHeader": [
|
|
33
|
+
"Primer::Alpha::ActionList"
|
|
34
|
+
],
|
|
29
35
|
"ActionListContent": [
|
|
30
36
|
"Primer::Alpha::ActionList"
|
|
31
37
|
],
|
package/static/constants.json
CHANGED
|
@@ -1770,7 +1770,9 @@
|
|
|
1770
1770
|
},
|
|
1771
1771
|
"DEFAULT_INCLUDE_SUB_ITEMS_CHECK_BOX_ARGUMENTS": {
|
|
1772
1772
|
"label": "Include sub-items",
|
|
1773
|
-
"name": "include_sub_items"
|
|
1773
|
+
"name": "include_sub_items",
|
|
1774
|
+
"checked": false,
|
|
1775
|
+
"hidden": false
|
|
1774
1776
|
},
|
|
1775
1777
|
"DEFAULT_NO_RESULTS_NODE_ARGUMENTS": {
|
|
1776
1778
|
"label": "No results"
|
package/static/info_arch.json
CHANGED
|
@@ -19149,9 +19149,9 @@
|
|
|
19149
19149
|
}
|
|
19150
19150
|
},
|
|
19151
19151
|
{
|
|
19152
|
-
"preview_path": "primer/open_project/danger_dialog/
|
|
19153
|
-
"name": "
|
|
19154
|
-
"snapshot": "
|
|
19152
|
+
"preview_path": "primer/open_project/danger_dialog/playground",
|
|
19153
|
+
"name": "playground",
|
|
19154
|
+
"snapshot": "false",
|
|
19155
19155
|
"skip_rules": {
|
|
19156
19156
|
"wont_fix": [
|
|
19157
19157
|
"region"
|
|
@@ -19162,9 +19162,9 @@
|
|
|
19162
19162
|
}
|
|
19163
19163
|
},
|
|
19164
19164
|
{
|
|
19165
|
-
"preview_path": "primer/open_project/danger_dialog/
|
|
19166
|
-
"name": "
|
|
19167
|
-
"snapshot": "
|
|
19165
|
+
"preview_path": "primer/open_project/danger_dialog/with_confirmation_check_box",
|
|
19166
|
+
"name": "with_confirmation_check_box",
|
|
19167
|
+
"snapshot": "interactive",
|
|
19168
19168
|
"skip_rules": {
|
|
19169
19169
|
"wont_fix": [
|
|
19170
19170
|
"region"
|
|
@@ -19760,6 +19760,32 @@
|
|
|
19760
19760
|
"color-contrast"
|
|
19761
19761
|
]
|
|
19762
19762
|
}
|
|
19763
|
+
},
|
|
19764
|
+
{
|
|
19765
|
+
"preview_path": "primer/open_project/filterable_tree_view/hide_checkbox",
|
|
19766
|
+
"name": "hide_checkbox",
|
|
19767
|
+
"snapshot": "false",
|
|
19768
|
+
"skip_rules": {
|
|
19769
|
+
"wont_fix": [
|
|
19770
|
+
"region"
|
|
19771
|
+
],
|
|
19772
|
+
"will_fix": [
|
|
19773
|
+
"color-contrast"
|
|
19774
|
+
]
|
|
19775
|
+
}
|
|
19776
|
+
},
|
|
19777
|
+
{
|
|
19778
|
+
"preview_path": "primer/open_project/filterable_tree_view/hide_segmented_control",
|
|
19779
|
+
"name": "hide_segmented_control",
|
|
19780
|
+
"snapshot": "false",
|
|
19781
|
+
"skip_rules": {
|
|
19782
|
+
"wont_fix": [
|
|
19783
|
+
"region"
|
|
19784
|
+
],
|
|
19785
|
+
"will_fix": [
|
|
19786
|
+
"color-contrast"
|
|
19787
|
+
]
|
|
19788
|
+
}
|
|
19763
19789
|
}
|
|
19764
19790
|
],
|
|
19765
19791
|
"subcomponents": []
|
package/static/previews.json
CHANGED
|
@@ -3326,9 +3326,9 @@
|
|
|
3326
3326
|
}
|
|
3327
3327
|
},
|
|
3328
3328
|
{
|
|
3329
|
-
"preview_path": "primer/open_project/danger_dialog/
|
|
3330
|
-
"name": "
|
|
3331
|
-
"snapshot": "
|
|
3329
|
+
"preview_path": "primer/open_project/danger_dialog/playground",
|
|
3330
|
+
"name": "playground",
|
|
3331
|
+
"snapshot": "false",
|
|
3332
3332
|
"skip_rules": {
|
|
3333
3333
|
"wont_fix": [
|
|
3334
3334
|
"region"
|
|
@@ -3339,9 +3339,9 @@
|
|
|
3339
3339
|
}
|
|
3340
3340
|
},
|
|
3341
3341
|
{
|
|
3342
|
-
"preview_path": "primer/open_project/danger_dialog/
|
|
3343
|
-
"name": "
|
|
3344
|
-
"snapshot": "
|
|
3342
|
+
"preview_path": "primer/open_project/danger_dialog/with_confirmation_check_box",
|
|
3343
|
+
"name": "with_confirmation_check_box",
|
|
3344
|
+
"snapshot": "interactive",
|
|
3345
3345
|
"skip_rules": {
|
|
3346
3346
|
"wont_fix": [
|
|
3347
3347
|
"region"
|
|
@@ -4311,6 +4311,32 @@
|
|
|
4311
4311
|
"color-contrast"
|
|
4312
4312
|
]
|
|
4313
4313
|
}
|
|
4314
|
+
},
|
|
4315
|
+
{
|
|
4316
|
+
"preview_path": "primer/open_project/filterable_tree_view/hide_checkbox",
|
|
4317
|
+
"name": "hide_checkbox",
|
|
4318
|
+
"snapshot": "false",
|
|
4319
|
+
"skip_rules": {
|
|
4320
|
+
"wont_fix": [
|
|
4321
|
+
"region"
|
|
4322
|
+
],
|
|
4323
|
+
"will_fix": [
|
|
4324
|
+
"color-contrast"
|
|
4325
|
+
]
|
|
4326
|
+
}
|
|
4327
|
+
},
|
|
4328
|
+
{
|
|
4329
|
+
"preview_path": "primer/open_project/filterable_tree_view/hide_segmented_control",
|
|
4330
|
+
"name": "hide_segmented_control",
|
|
4331
|
+
"snapshot": "false",
|
|
4332
|
+
"skip_rules": {
|
|
4333
|
+
"wont_fix": [
|
|
4334
|
+
"region"
|
|
4335
|
+
],
|
|
4336
|
+
"will_fix": [
|
|
4337
|
+
"color-contrast"
|
|
4338
|
+
]
|
|
4339
|
+
}
|
|
4314
4340
|
}
|
|
4315
4341
|
]
|
|
4316
4342
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg"><g><rect x="-16" y="-16" width="32" height="32" fill="none" stroke="#a3eea8" stroke-width="4" rx="10" transform="translate(32 32)"><animate attributeName="stroke-width" attributeType="XML" dur="4s" repeatCount="indefinite" values="0;4;0;0" keyTimes="0;0.35;0.6;1" keySplines="0.42 0 0.58 1;0.42 0 0.58 1;0.42 0 0.58 1" calcMode="spline"/><animateTransform attributeName="transform" additive="sum" attributeType="XML" type="scale" dur="4s" repeatCount="indefinite" values="0.5;0.5;1.6;0.5" keyTimes="0;0.35;0.6;1" keySplines="0.42 0 0.58 1;0.42 0 0.58 1;0.42 0 0.58 1" calcMode="spline"/></rect><rect x="-16" y="-16" width="32" height="32" fill="#35c53f" rx="5" transform="translate(32 32)"><animateTransform attributeName="transform" additive="sum" attributeType="XML" type="scale" dur="4s" repeatCount="indefinite" values="1;1.3;1.1;1" keyTimes="0;0.5;0.6;1" keySplines="0.42 0 0.58 1;0.42 0 0.58 1;0.42 0 0.58 1" calcMode="spline"/></rect><animateTransform attributeName="transform" attributeType="XML" additive="sum" type="rotate" dur="4s" repeatCount="indefinite" values="45 32 32;1080 32 32;945 32 32" keyTimes="0;0.6;1" keySplines="0.42 0 0.58 1;0.42 0 0.58 1" calcMode="spline"/></g></svg>
|