@primer/view-components 0.18.2-rc.ad33c4ad → 0.18.2-rc.c1ed30f0
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/action_menu/action_menu_element.js +4 -0
- package/app/components/primer/alpha/modal_dialog.js +3 -0
- package/app/components/primer/alpha/toggle_switch.js +2 -2
- package/app/components/primer/alpha/tool_tip.js +1 -0
- package/app/components/primer/beta/nav_list.js +2 -0
- package/app/components/primer/dialog_helper.js +1 -0
- package/package.json +3 -3
@@ -265,7 +265,9 @@ _ActionMenuElement_potentiallyDisallowActivation = function _ActionMenuElement_p
|
|
265
265
|
return false;
|
266
266
|
if (item.getAttribute('aria-disabled')) {
|
267
267
|
event.preventDefault();
|
268
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
268
269
|
event.stopPropagation();
|
270
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
269
271
|
event.stopImmediatePropagation();
|
270
272
|
return true;
|
271
273
|
}
|
@@ -294,6 +296,7 @@ _ActionMenuElement_isActivation = function _ActionMenuElement_isActivation(event
|
|
294
296
|
};
|
295
297
|
_ActionMenuElement_handleInvokerActivated = function _ActionMenuElement_handleInvokerActivated(event) {
|
296
298
|
event.preventDefault();
|
299
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
297
300
|
event.stopPropagation();
|
298
301
|
if (__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_isOpen).call(this)) {
|
299
302
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_hide).call(this);
|
@@ -376,6 +379,7 @@ _ActionMenuElement_activateItem = function _ActionMenuElement_activateItem(event
|
|
376
379
|
return;
|
377
380
|
// otherwise, event will not result in activation by default, so we stop it and
|
378
381
|
// simulate a click
|
382
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
379
383
|
event.stopPropagation();
|
380
384
|
const elem = item;
|
381
385
|
elem.click();
|
@@ -26,6 +26,7 @@ function clickHandler(event) {
|
|
26
26
|
// If the user is clicking a valid dialog trigger
|
27
27
|
let dialogId = button === null || button === void 0 ? void 0 : button.getAttribute('data-show-dialog-id');
|
28
28
|
if (dialogId) {
|
29
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
29
30
|
event.stopPropagation();
|
30
31
|
const dialog = document.getElementById(dialogId);
|
31
32
|
if (dialog instanceof ModalDialogElement) {
|
@@ -169,11 +170,13 @@ _ModalDialogElement_focusAbortController = new WeakMap(), _ModalDialogElement_in
|
|
169
170
|
case 'Escape':
|
170
171
|
this.close();
|
171
172
|
event.preventDefault();
|
173
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
172
174
|
event.stopPropagation();
|
173
175
|
break;
|
174
176
|
case 'Enter': {
|
175
177
|
const target = event.target;
|
176
178
|
if (target.getAttribute('data-close-dialog-id') === this.id) {
|
179
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
177
180
|
event.stopPropagation();
|
178
181
|
}
|
179
182
|
break;
|
@@ -134,9 +134,9 @@ let ToggleSwitchElement = class ToggleSwitchElement extends HTMLElement {
|
|
134
134
|
credentials: 'same-origin',
|
135
135
|
method: 'POST',
|
136
136
|
headers: {
|
137
|
-
'Requested-With': 'XMLHttpRequest'
|
137
|
+
'Requested-With': 'XMLHttpRequest',
|
138
138
|
},
|
139
|
-
body
|
139
|
+
body,
|
140
140
|
});
|
141
141
|
}
|
142
142
|
catch (error) {
|
@@ -310,6 +310,7 @@ class ToolTipElement extends HTMLElement {
|
|
310
310
|
const isOpeningOtherPopover = event.type === 'beforetoggle' && event.currentTarget !== this;
|
311
311
|
const shouldHide = isMouseLeaveFromButton || isEscapeKeydown || isMouseDownOnButton || isOpeningOtherPopover;
|
312
312
|
if (showing && isEscapeKeydown) {
|
313
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
313
314
|
event.stopImmediatePropagation();
|
314
315
|
event.preventDefault();
|
315
316
|
}
|
@@ -77,6 +77,7 @@ let NavListElement = class NavListElement extends HTMLElement {
|
|
77
77
|
else {
|
78
78
|
this.expandItem(button);
|
79
79
|
}
|
80
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
80
81
|
e.stopPropagation();
|
81
82
|
}
|
82
83
|
// collapse item
|
@@ -97,6 +98,7 @@ let NavListElement = class NavListElement extends HTMLElement {
|
|
97
98
|
if (this.itemIsExpanded(button) && e.key === 'Escape') {
|
98
99
|
this.collapseItem(button);
|
99
100
|
}
|
101
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
100
102
|
e.stopPropagation();
|
101
103
|
}
|
102
104
|
};
|
@@ -47,6 +47,7 @@ function dialogInvokerButtonHandler(event) {
|
|
47
47
|
if (fixed) {
|
48
48
|
// We need to re-open the dialog as modal, and also ensure no close event listeners
|
49
49
|
// are trying to act on the close
|
50
|
+
/* eslint-disable-next-line no-restricted-syntax */
|
50
51
|
dialog.addEventListener('close', e => e.stopImmediatePropagation(), { once: true });
|
51
52
|
dialog.close();
|
52
53
|
dialog.showModal();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.18.2-rc.
|
3
|
+
"version": "0.18.2-rc.c1ed30f0",
|
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",
|
@@ -80,12 +80,12 @@
|
|
80
80
|
"mocha": "^10.0.0",
|
81
81
|
"playwright": "^1.35.1",
|
82
82
|
"postcss": "^8.4.16",
|
83
|
-
"postcss-cli": "^
|
83
|
+
"postcss-cli": "^11.0.0",
|
84
84
|
"postcss-custom-properties-fallback": "^1.0.2",
|
85
85
|
"postcss-import": "^16.0.0",
|
86
86
|
"postcss-mixins": "^9.0.3",
|
87
87
|
"postcss-preset-env": "^9.3.0",
|
88
|
-
"prettier": "3.2.
|
88
|
+
"prettier": "3.2.5",
|
89
89
|
"rollup": "^2.79.1",
|
90
90
|
"rollup-plugin-terser": "^7.0.2",
|
91
91
|
"stylelint": "^16.1.0",
|