@primer/view-components 0.1.9-rc.c124420c → 0.1.9-rc.ca2fbe65
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/components/primer/alpha/modal_dialog.js +4 -0
- package/app/components/primer/focus_group.js +4 -6
- package/package.json +2 -2
- package/static/info_arch.json +519 -219
|
@@ -31,6 +31,10 @@ function clickHandler(event) {
|
|
|
31
31
|
if (dialog instanceof ModalDialogElement) {
|
|
32
32
|
dialog.openButton = button;
|
|
33
33
|
dialog.show();
|
|
34
|
+
// A buttons default behaviour in some browsers it to send a pointer event
|
|
35
|
+
// If the behaviour is allowed through the dialog will be shown but then
|
|
36
|
+
// quickly hidden- as if it were never shown. This prevents that.
|
|
37
|
+
event.preventDefault();
|
|
34
38
|
return;
|
|
35
39
|
}
|
|
36
40
|
}
|
|
@@ -14,11 +14,11 @@ import '@oddbird/popover-polyfill';
|
|
|
14
14
|
const menuItemSelector = '[role="menuitem"],[role="menuitemcheckbox"],[role="menuitemradio"]';
|
|
15
15
|
const popoverSelector = (() => {
|
|
16
16
|
try {
|
|
17
|
-
document.querySelector(':open');
|
|
18
|
-
return ':open';
|
|
17
|
+
document.querySelector(':popover-open');
|
|
18
|
+
return ':popover-open';
|
|
19
19
|
}
|
|
20
20
|
catch (_a) {
|
|
21
|
-
return '.\\:open';
|
|
21
|
+
return '.\\:popover-open';
|
|
22
22
|
}
|
|
23
23
|
})();
|
|
24
24
|
const getMnemonicFor = (item) => { var _a; return (_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()[0].toLowerCase(); };
|
|
@@ -132,9 +132,7 @@ export default class FocusGroupElement extends HTMLElement {
|
|
|
132
132
|
if ((el === null || el === void 0 ? void 0 : el.popover) === 'auto') {
|
|
133
133
|
el.showPopover();
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
el = (el === null || el === void 0 ? void 0 : el.parentElement) || null;
|
|
137
|
-
}
|
|
135
|
+
el = (el === null || el === void 0 ? void 0 : el.parentElement) || null;
|
|
138
136
|
} while (el);
|
|
139
137
|
}
|
|
140
138
|
focusEl === null || focusEl === void 0 ? void 0 : focusEl.focus();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/view-components",
|
|
3
|
-
"version": "0.1.9-rc.
|
|
3
|
+
"version": "0.1.9-rc.ca2fbe65",
|
|
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@github/relative-time-element": "^4.0.0",
|
|
56
56
|
"@github/tab-container-element": "^3.1.2",
|
|
57
57
|
"@oddbird/popover-polyfill": "^0.1.1",
|
|
58
|
-
"@primer/behaviors": "^1.
|
|
58
|
+
"@primer/behaviors": "^1.3.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@changesets/changelog-github": "^0.4.6",
|