@jsenv/navi 0.22.3 → 0.22.4
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 +17 -18
- package/dist/jsenv_navi.js.map +8 -6
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -20642,11 +20642,12 @@ installImportMetaCssBuild(import.meta);const css$7 = /* css */`
|
|
|
20642
20642
|
* @param {import("ignore:preact").RefObject} childRef — ref on the child element to reposition
|
|
20643
20643
|
*/
|
|
20644
20644
|
const TextAnchor = ({
|
|
20645
|
+
childRef,
|
|
20645
20646
|
children,
|
|
20646
20647
|
textAnchor = "char-bottom",
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20648
|
+
textKey,
|
|
20649
|
+
textSize,
|
|
20650
|
+
lineLayout
|
|
20650
20651
|
}) => {
|
|
20651
20652
|
import.meta.css = [css$7, "@jsenv/navi/src/text/text_anchor.jsx"];
|
|
20652
20653
|
const anchorRef = useRef();
|
|
@@ -20679,7 +20680,7 @@ const TextAnchor = ({
|
|
|
20679
20680
|
childEl.style.marginTop = "";
|
|
20680
20681
|
childEl.style.marginBottom = "";
|
|
20681
20682
|
}
|
|
20682
|
-
}, [
|
|
20683
|
+
}, [textAnchor, textKey, textSize, lineLayout?.size, lineLayout?.verticalAlign]);
|
|
20683
20684
|
return jsxs(Fragment, {
|
|
20684
20685
|
children: [children, jsx("span", {
|
|
20685
20686
|
ref: anchorRef,
|
|
@@ -20874,10 +20875,10 @@ const Icon = ({
|
|
|
20874
20875
|
});
|
|
20875
20876
|
}
|
|
20876
20877
|
return jsx(TextAnchor, {
|
|
20878
|
+
childRef: textRef,
|
|
20877
20879
|
textAnchor: textAnchor,
|
|
20880
|
+
textSize: props.size,
|
|
20878
20881
|
lineLayout: lineLayout,
|
|
20879
|
-
childRef: textRef,
|
|
20880
|
-
size: props.size,
|
|
20881
20882
|
children: jsxs(Text, {
|
|
20882
20883
|
...props,
|
|
20883
20884
|
...ariaProps,
|
|
@@ -30686,10 +30687,11 @@ const BadgeCount = ({
|
|
|
30686
30687
|
}
|
|
30687
30688
|
if (circle) {
|
|
30688
30689
|
return jsx(TextAnchor, {
|
|
30690
|
+
childRef: ref,
|
|
30689
30691
|
textAnchor: textAnchor,
|
|
30692
|
+
textSize: props.size,
|
|
30693
|
+
textKey: loading + valueDisplayed + hasOverflow,
|
|
30690
30694
|
lineLayout: lineLayout,
|
|
30691
|
-
childRef: ref,
|
|
30692
|
-
size: props.size,
|
|
30693
30695
|
children: jsxs(BadgeCountCircle, {
|
|
30694
30696
|
...props,
|
|
30695
30697
|
loading: loading,
|
|
@@ -30704,10 +30706,11 @@ const BadgeCount = ({
|
|
|
30704
30706
|
lang
|
|
30705
30707
|
}) : valueDisplayed;
|
|
30706
30708
|
return jsx(TextAnchor, {
|
|
30709
|
+
childRef: ref,
|
|
30707
30710
|
textAnchor: textAnchor,
|
|
30711
|
+
textSize: props.size,
|
|
30712
|
+
textKey: loading + valueFormatted + hasOverflow,
|
|
30708
30713
|
lineLayout: lineLayout,
|
|
30709
|
-
childRef: ref,
|
|
30710
|
-
size: props.size,
|
|
30711
30714
|
children: jsxs(BadgeCountEllipse, {
|
|
30712
30715
|
...props,
|
|
30713
30716
|
loading: loading,
|
|
@@ -30756,9 +30759,7 @@ const BadgeCountEllipse = ({
|
|
|
30756
30759
|
spacing: "pre",
|
|
30757
30760
|
children: loading ? jsx(Icon, {
|
|
30758
30761
|
children: jsx(LoadingDots, {})
|
|
30759
|
-
}) :
|
|
30760
|
-
children: children
|
|
30761
|
-
})
|
|
30762
|
+
}) : children
|
|
30762
30763
|
});
|
|
30763
30764
|
};
|
|
30764
30765
|
const BadgeCountCircle = ({
|
|
@@ -30786,11 +30787,9 @@ const BadgeCountCircle = ({
|
|
|
30786
30787
|
spacing: "pre",
|
|
30787
30788
|
children: loading ? jsx(Icon, {
|
|
30788
30789
|
children: jsx(LoadingDots, {})
|
|
30789
|
-
}) : jsx(
|
|
30790
|
-
|
|
30791
|
-
|
|
30792
|
-
children: children
|
|
30793
|
-
})
|
|
30790
|
+
}) : jsx("span", {
|
|
30791
|
+
className: "navi_badge_count_text",
|
|
30792
|
+
children: children
|
|
30794
30793
|
})
|
|
30795
30794
|
});
|
|
30796
30795
|
};
|