@primer/view-components 0.15.0-rc.d9ea70e9 → 0.15.0-rc.ef1c6ef7
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.
@@ -43,7 +43,7 @@ const DIRECTION_CLASSES = [
|
|
43
43
|
'tooltip-ne',
|
44
44
|
'tooltip-se',
|
45
45
|
'tooltip-nw',
|
46
|
-
'tooltip-sw'
|
46
|
+
'tooltip-sw'
|
47
47
|
];
|
48
48
|
function closeOpenTooltips(except) {
|
49
49
|
for (const tooltip of openTooltips) {
|
@@ -270,11 +270,11 @@ class ToolTipElement extends HTMLElement {
|
|
270
270
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
271
271
|
// @ts-ignore popoverTargetElement is not in the type definition
|
272
272
|
(_b = this.control.popoverTargetElement) === null || _b === void 0 ? void 0 : _b.addEventListener('beforetoggle', this, {
|
273
|
-
signal
|
273
|
+
signal
|
274
274
|
});
|
275
275
|
this.ownerDocument.addEventListener('focusout', focusOutListener);
|
276
276
|
this.ownerDocument.addEventListener('focusin', focusInListener);
|
277
|
-
this.ownerDocument.addEventListener('keydown', this, { signal
|
277
|
+
this.ownerDocument.addEventListener('keydown', this, { signal });
|
278
278
|
}
|
279
279
|
disconnectedCallback() {
|
280
280
|
var _a;
|
@@ -296,10 +296,6 @@ class ToolTipElement extends HTMLElement {
|
|
296
296
|
const isMouseDownOnButton = event.type === 'mousedown' && event.currentTarget === this.control;
|
297
297
|
const isOpeningOtherPopover = event.type === 'beforetoggle' && event.currentTarget !== this;
|
298
298
|
const shouldHide = isMouseLeaveFromButton || isEscapeKeydown || isMouseDownOnButton || isOpeningOtherPopover;
|
299
|
-
if (showing && isEscapeKeydown) {
|
300
|
-
event.stopImmediatePropagation();
|
301
|
-
event.preventDefault();
|
302
|
-
}
|
303
299
|
await Promise.resolve();
|
304
300
|
if (!showing && shouldShow && !isPopoverOpen(this)) {
|
305
301
|
__classPrivateFieldSet(this, _ToolTipElement_showReason, event.type === 'mouseenter' ? 'mouse' : 'focus', "f");
|
@@ -413,7 +409,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
|
|
413
409
|
const position = getAnchoredPosition(this, this.control, {
|
414
410
|
side: __classPrivateFieldGet(this, _ToolTipElement_side, "f"),
|
415
411
|
align: __classPrivateFieldGet(this, _ToolTipElement_align, "f"),
|
416
|
-
anchorOffset: TOOLTIP_OFFSET
|
412
|
+
anchorOffset: TOOLTIP_OFFSET
|
417
413
|
});
|
418
414
|
const anchorSide = position.anchorSide;
|
419
415
|
const align = position.anchorAlign;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.15.0-rc.
|
3
|
+
"version": "0.15.0-rc.ef1c6ef7",
|
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",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
"@github/include-fragment-element": "^6.1.1",
|
52
52
|
"@github/relative-time-element": "^4.0.0",
|
53
53
|
"@github/tab-container-element": "^3.1.2",
|
54
|
-
"@oddbird/popover-polyfill": "^0.3.
|
54
|
+
"@oddbird/popover-polyfill": "^0.3.2",
|
55
55
|
"@primer/behaviors": "^1.3.4"
|
56
56
|
},
|
57
57
|
"devDependencies": {
|