@jsenv/navi 0.22.2 → 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.
@@ -6661,9 +6661,10 @@ const STYLE_PROP_NAME_SET = new Set(Object.keys(All_PROPS));
6661
6661
  const COPIED_ON_VISUAL_CHILD_PROP_SET = new Set([
6662
6662
  ...FLOW_PROP_NAME_SET,
6663
6663
  "expand",
6664
- "shrink",
6665
6664
  "expandX",
6666
6665
  "expandY",
6666
+ "shrink",
6667
+ "align",
6667
6668
  "alignX",
6668
6669
  "alignY",
6669
6670
  ]);
@@ -20641,11 +20642,12 @@ installImportMetaCssBuild(import.meta);const css$7 = /* css */`
20641
20642
  * @param {import("ignore:preact").RefObject} childRef — ref on the child element to reposition
20642
20643
  */
20643
20644
  const TextAnchor = ({
20645
+ childRef,
20644
20646
  children,
20645
20647
  textAnchor = "char-bottom",
20646
- childRef,
20647
- lineLayout,
20648
- size
20648
+ textKey,
20649
+ textSize,
20650
+ lineLayout
20649
20651
  }) => {
20650
20652
  import.meta.css = [css$7, "@jsenv/navi/src/text/text_anchor.jsx"];
20651
20653
  const anchorRef = useRef();
@@ -20678,7 +20680,7 @@ const TextAnchor = ({
20678
20680
  childEl.style.marginTop = "";
20679
20681
  childEl.style.marginBottom = "";
20680
20682
  }
20681
- }, [size, textAnchor, lineLayout?.size, lineLayout?.verticalAlign]);
20683
+ }, [textAnchor, textKey, textSize, lineLayout?.size, lineLayout?.verticalAlign]);
20682
20684
  return jsxs(Fragment, {
20683
20685
  children: [children, jsx("span", {
20684
20686
  ref: anchorRef,
@@ -20873,10 +20875,10 @@ const Icon = ({
20873
20875
  });
20874
20876
  }
20875
20877
  return jsx(TextAnchor, {
20878
+ childRef: textRef,
20876
20879
  textAnchor: textAnchor,
20880
+ textSize: props.size,
20877
20881
  lineLayout: lineLayout,
20878
- childRef: textRef,
20879
- size: props.size,
20880
20882
  children: jsxs(Text, {
20881
20883
  ...props,
20882
20884
  ...ariaProps,
@@ -21432,7 +21434,10 @@ installImportMetaCssBuild(import.meta);const css$5 = /* css */`
21432
21434
  --button-outline-color: var(--navi-focus-outline-color);
21433
21435
  --button-loader-color: var(--navi-loader-color);
21434
21436
  --button-border-color: light-dark(#767676, #8e8e93);
21435
- --button-background-color: light-dark(#f3f4f6, #2d3748);
21437
+ --button-background-color: var(
21438
+ --button-background,
21439
+ light-dark(#f3f4f6, #2d3748)
21440
+ );
21436
21441
  --button-color: currentColor;
21437
21442
  --button-cursor: pointer;
21438
21443
 
@@ -30682,10 +30687,11 @@ const BadgeCount = ({
30682
30687
  }
30683
30688
  if (circle) {
30684
30689
  return jsx(TextAnchor, {
30690
+ childRef: ref,
30685
30691
  textAnchor: textAnchor,
30692
+ textSize: props.size,
30693
+ textKey: loading + valueDisplayed + hasOverflow,
30686
30694
  lineLayout: lineLayout,
30687
- childRef: ref,
30688
- size: props.size,
30689
30695
  children: jsxs(BadgeCountCircle, {
30690
30696
  ...props,
30691
30697
  loading: loading,
@@ -30700,10 +30706,11 @@ const BadgeCount = ({
30700
30706
  lang
30701
30707
  }) : valueDisplayed;
30702
30708
  return jsx(TextAnchor, {
30709
+ childRef: ref,
30703
30710
  textAnchor: textAnchor,
30711
+ textSize: props.size,
30712
+ textKey: loading + valueFormatted + hasOverflow,
30704
30713
  lineLayout: lineLayout,
30705
- childRef: ref,
30706
- size: props.size,
30707
30714
  children: jsxs(BadgeCountEllipse, {
30708
30715
  ...props,
30709
30716
  loading: loading,
@@ -30752,9 +30759,7 @@ const BadgeCountEllipse = ({
30752
30759
  spacing: "pre",
30753
30760
  children: loading ? jsx(Icon, {
30754
30761
  children: jsx(LoadingDots, {})
30755
- }) : jsx(Fragment, {
30756
- children: children
30757
- })
30762
+ }) : children
30758
30763
  });
30759
30764
  };
30760
30765
  const BadgeCountCircle = ({
@@ -30782,11 +30787,9 @@ const BadgeCountCircle = ({
30782
30787
  spacing: "pre",
30783
30788
  children: loading ? jsx(Icon, {
30784
30789
  children: jsx(LoadingDots, {})
30785
- }) : jsx(Fragment, {
30786
- children: jsx("span", {
30787
- className: "navi_badge_count_text",
30788
- children: children
30789
- })
30790
+ }) : jsx("span", {
30791
+ className: "navi_badge_count_text",
30792
+ children: children
30790
30793
  })
30791
30794
  });
30792
30795
  };