@primer/view-components 0.17.0 → 0.17.1-rc.78cfde33
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.
@@ -26,6 +26,7 @@ function dialogInvokerButtonHandler(event) {
|
|
26
26
|
// If the behaviour is allowed through the dialog will be shown but then
|
27
27
|
// quickly hidden- as if it were never shown. This prevents that.
|
28
28
|
event.preventDefault();
|
29
|
+
event.stopPropagation();
|
29
30
|
}
|
30
31
|
}
|
31
32
|
dialogId = button.getAttribute('data-close-dialog-id') || button.getAttribute('data-submit-dialog-id');
|
@@ -46,7 +47,7 @@ export class DialogHelperElement extends HTMLElement {
|
|
46
47
|
}
|
47
48
|
connectedCallback() {
|
48
49
|
const { signal } = (__classPrivateFieldSet(this, _DialogHelperElement_abortController, new AbortController(), "f"));
|
49
|
-
document.addEventListener('click', dialogInvokerButtonHandler);
|
50
|
+
document.addEventListener('click', dialogInvokerButtonHandler, true);
|
50
51
|
document.addEventListener('click', this, { signal });
|
51
52
|
this.ownerDocument.body.style.setProperty('--dialog-scrollgutter', `${window.innerWidth - this.ownerDocument.body.clientWidth}px`);
|
52
53
|
new MutationObserver(records => {
|
@@ -66,7 +67,9 @@ export class DialogHelperElement extends HTMLElement {
|
|
66
67
|
const dialog = this.dialog;
|
67
68
|
if (!(dialog === null || dialog === void 0 ? void 0 : dialog.open))
|
68
69
|
return;
|
69
|
-
if
|
70
|
+
// if the target is inside the dialog, but is not the dialog itself, leave
|
71
|
+
// the dialog open
|
72
|
+
if ((target === null || target === void 0 ? void 0 : target.closest('dialog')) === dialog && target !== dialog)
|
70
73
|
return;
|
71
74
|
const rect = dialog.getBoundingClientRect();
|
72
75
|
const clickWasInsideDialog = rect.top <= event.clientY &&
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.17.
|
3
|
+
"version": "0.17.1-rc.78cfde33",
|
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",
|
@@ -82,10 +82,10 @@
|
|
82
82
|
"postcss": "^8.4.16",
|
83
83
|
"postcss-cli": "^10.1.0",
|
84
84
|
"postcss-custom-properties-fallback": "^1.0.2",
|
85
|
-
"postcss-import": "^
|
85
|
+
"postcss-import": "^16.0.0",
|
86
86
|
"postcss-mixins": "^9.0.3",
|
87
87
|
"postcss-preset-env": "^9.3.0",
|
88
|
-
"prettier": "3.
|
88
|
+
"prettier": "3.2.4",
|
89
89
|
"rollup": "^2.79.1",
|
90
90
|
"rollup-plugin-terser": "^7.0.2",
|
91
91
|
"stylelint": "^16.1.0",
|