@jsenv/navi 0.29.394 → 0.29.396
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/README.md +59 -23
- package/dist/dev/jsenv_navi.js +30 -6
- package/dist/dev/jsenv_navi.js.map +3 -3
- package/dist/jsenv_navi.js +30 -6
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -6592,10 +6592,6 @@ const css$13 = /* css */ `
|
|
|
6592
6592
|
border: none;
|
|
6593
6593
|
outline: none; /* programmatic focus may land here briefly before being redirected to close button */
|
|
6594
6594
|
opacity: 0;
|
|
6595
|
-
/* opacity only: the placement lives in the translate property, which
|
|
6596
|
-
applyNewPosition (visible_rect.js) owns and animates itself through the
|
|
6597
|
-
Web Animations API, same mechanism Popover/Dialog use. */
|
|
6598
|
-
transition: opacity 0.2s ease-in-out;
|
|
6599
6595
|
cursor: initial; /* Do not inherit element cursor, inside the element but should use regular cursor */
|
|
6600
6596
|
pointer-events: auto; /* Must be interactive to be closabled (overrid list item pointer-events none for instance) */
|
|
6601
6597
|
overflow: visible;
|
|
@@ -6604,6 +6600,15 @@ const css$13 = /* css */ `
|
|
|
6604
6600
|
position: absolute;
|
|
6605
6601
|
}
|
|
6606
6602
|
|
|
6603
|
+
/* Armed after the first placement: the first show answers a tap or a
|
|
6604
|
+
click and appears at once, the fade is for the anchor scrolling out of
|
|
6605
|
+
view and back. Opacity only: the placement lives in the translate
|
|
6606
|
+
property, which applyNewPosition (visible_rect.js) owns and animates
|
|
6607
|
+
itself through the Web Animations API, same mechanism Popover/Dialog use. */
|
|
6608
|
+
&[data-placed] {
|
|
6609
|
+
transition: opacity 0.12s ease-out;
|
|
6610
|
+
}
|
|
6611
|
+
|
|
6607
6612
|
&[data-status="success"] {
|
|
6608
6613
|
--x-callout-status-color: var(--callout-success-color);
|
|
6609
6614
|
}
|
|
@@ -8031,6 +8036,13 @@ const positionCallout = (
|
|
|
8031
8036
|
calloutFrameElement.innerHTML = generateSvgWithoutArrow(width, height);
|
|
8032
8037
|
calloutElement.style.opacity = 1;
|
|
8033
8038
|
}
|
|
8039
|
+
if (!calloutElement.hasAttribute("data-placed")) {
|
|
8040
|
+
// Style flush between the first opacity write and arming the
|
|
8041
|
+
// transition, so that first write lands unanimated in the same frame.
|
|
8042
|
+
// eslint-disable-next-line no-unused-expressions
|
|
8043
|
+
getComputedStyle(calloutElement).opacity;
|
|
8044
|
+
calloutElement.setAttribute("data-placed", "");
|
|
8045
|
+
}
|
|
8034
8046
|
applyNewPosition(calloutElement, position);
|
|
8035
8047
|
},
|
|
8036
8048
|
);
|
|
@@ -40992,7 +41004,15 @@ const useControlProps = (props, {
|
|
|
40992
41004
|
if (actsOnMouseDown) {
|
|
40993
41005
|
return {
|
|
40994
41006
|
name: "mousedown",
|
|
40995
|
-
allowed: () => onButtonInteractionAllowed(e)
|
|
41007
|
+
allowed: () => onButtonInteractionAllowed(e),
|
|
41008
|
+
// The press is answered here, refusal included: the click it
|
|
41009
|
+
// leaves behind would otherwise follow the href of a
|
|
41010
|
+
// <Button route>. Not asked about again — a second refusal
|
|
41011
|
+
// reads as "got it" and dismisses the callout just shown.
|
|
41012
|
+
prevented: () => {
|
|
41013
|
+
const clickSuppressionIsOver = suppressClickAfterGesture();
|
|
41014
|
+
clickSuppressionIsOver();
|
|
41015
|
+
}
|
|
40996
41016
|
};
|
|
40997
41017
|
}
|
|
40998
41018
|
return null;
|
|
@@ -41003,7 +41023,11 @@ const useControlProps = (props, {
|
|
|
41003
41023
|
}
|
|
41004
41024
|
return {
|
|
41005
41025
|
name: "click",
|
|
41006
|
-
allowed: () => onButtonInteractionAllowed(e)
|
|
41026
|
+
allowed: () => onButtonInteractionAllowed(e),
|
|
41027
|
+
// A refused press keeps nothing of the click's default: the href
|
|
41028
|
+
// of a <Button route> (rendered as <a>), a form submit, a
|
|
41029
|
+
// popovertarget.
|
|
41030
|
+
prevented: () => e.preventDefault()
|
|
41007
41031
|
};
|
|
41008
41032
|
}
|
|
41009
41033
|
};
|