@jsenv/navi 0.11.17 → 0.11.18
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/dist/jsenv_navi.js +11 -5
- package/dist/jsenv_navi.js.map +6 -4
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -11766,6 +11766,7 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11766
11766
|
blankTargetIcon,
|
|
11767
11767
|
anchorIcon,
|
|
11768
11768
|
icon,
|
|
11769
|
+
pointerDefaultWhenCurrent,
|
|
11769
11770
|
...rest
|
|
11770
11771
|
} = props;
|
|
11771
11772
|
const innerRef = useRef();
|
|
@@ -11775,16 +11776,21 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11775
11776
|
useConstraints(innerRef, constraints);
|
|
11776
11777
|
const shouldDimColor = readOnly || disabled;
|
|
11777
11778
|
useDimColorWhen(innerRef, shouldDimColor);
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
layout: true,
|
|
11781
|
-
typo: true
|
|
11782
|
-
});
|
|
11779
|
+
// subscribe to document url to re-render and re-compute getLinkTargetInfo
|
|
11780
|
+
useDocumentUrl();
|
|
11783
11781
|
const {
|
|
11784
11782
|
targetIsSameSite,
|
|
11785
11783
|
targetIsAnchor,
|
|
11786
11784
|
targetIsCurrent
|
|
11787
11785
|
} = getLinkTargetInfo(href);
|
|
11786
|
+
const innerClassName = withPropsClassName("navi_link", className);
|
|
11787
|
+
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
11788
|
+
base: {
|
|
11789
|
+
pointer: pointerDefaultWhenCurrent && targetIsCurrent ? "default" : undefined
|
|
11790
|
+
},
|
|
11791
|
+
layout: true,
|
|
11792
|
+
typo: true
|
|
11793
|
+
});
|
|
11788
11794
|
const innerTarget = target === undefined ? targetIsSameSite ? "_self" : "_blank" : target;
|
|
11789
11795
|
const innerRel = rel === undefined ? targetIsSameSite ? undefined : "noopener noreferrer" : rel;
|
|
11790
11796
|
let innerIcon;
|