@jsenv/navi 0.26.29 → 0.26.30

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.
@@ -8454,6 +8454,14 @@ const Box = props => {
8454
8454
  const cssVar = styleContext.styleCSSVars[name];
8455
8455
  if (cssVar) {
8456
8456
  addCSSVar(mergedValue, cssVar, stylesTarget);
8457
+ if (name === "borderRadius" && value === "inherit") {
8458
+ // "inherit" cannot be expressed via a CSS variable — a var() reference
8459
+ // never propagates the inherit keyword itself. So when borderRadius="inherit"
8460
+ // we must also set the inline style directly so the element actually
8461
+ // inherits the radius from its parent.
8462
+ styleDeps.push(name, value);
8463
+ stylesTarget[name] = mergedValue;
8464
+ }
8457
8465
  return true;
8458
8466
  }
8459
8467
  styleDeps.push(name, value); // impact box style -> add to deps
@@ -8735,17 +8743,14 @@ const applySeparatorOnChildren = (children, separator) => {
8735
8743
  return childrenWithSeparators;
8736
8744
  };
8737
8745
  const shouldInjectSeparatorBetween = (left, right) => {
8738
- if (isPreactNode$1(left) && left.props?.hidden) {
8746
+ if (isValidElement(left) && left.props?.hidden) {
8739
8747
  return false;
8740
8748
  }
8741
- if (isPreactNode$1(right) && right.props?.hidden) {
8749
+ if (isValidElement(right) && right.props?.hidden) {
8742
8750
  return false;
8743
8751
  }
8744
8752
  return true;
8745
8753
  };
8746
- const isPreactNode$1 = jsxChild => {
8747
- return jsxChild !== null && typeof jsxChild === "object" && jsxChild.type !== undefined;
8748
- };
8749
8754
 
8750
8755
  /**
8751
8756
  * Fix alignment behavior for flex/grid containers that use `height: 100%`.
@@ -21083,12 +21088,9 @@ const markAsOutsideTextFlow = jsxElement => {
21083
21088
  const isMarkedAsOutsideTextFlow = jsxElement => {
21084
21089
  return outsideTextFlowSet.has(jsxElement.type);
21085
21090
  };
21086
- const isPreactNode = jsxChild => {
21087
- return jsxChild !== null && typeof jsxChild === "object" && jsxChild.type !== undefined;
21088
- };
21089
21091
  const shouldInjectSpacingBetween = (left, right) => {
21090
- const leftIsNode = isPreactNode(left);
21091
- const rightIsNode = isPreactNode(right);
21092
+ const leftIsNode = isValidElement(left);
21093
+ const rightIsNode = isValidElement(right);
21092
21094
  // only inject spacing when at least one side is a preact node
21093
21095
  if (!leftIsNode && !rightIsNode) {
21094
21096
  return false;
@@ -21212,7 +21214,6 @@ const TextUI = props => {
21212
21214
  childrenOutsideFlow,
21213
21215
  ...rest
21214
21216
  } = props;
21215
- const parentBoxFlow = useContext(BoxFlowContext);
21216
21217
  const defaultSpace = preventSpaceUnderlines ? FAKE_SPACE : REGULAR_SPACE;
21217
21218
  const resolvedSpacing = spacing ?? defaultSpace;
21218
21219
  const boxProps = {
@@ -21222,7 +21223,7 @@ const TextUI = props => {
21222
21223
  ref,
21223
21224
  "baseClassName": withPropsClassName("navi_text", rest.baseClassName)
21224
21225
  };
21225
- const shouldPreserveSpacing = rest.as === "pre" || rest.flex || rest.grid || isSpacingHandledByFlow(parentBoxFlow);
21226
+ const shouldPreserveSpacing = rest.as === "pre" || rest.flex || rest.grid;
21226
21227
  if (shouldPreserveSpacing) {
21227
21228
  boxProps.spacing = resolvedSpacing;
21228
21229
  } else {
@@ -22677,7 +22678,7 @@ installImportMetaCssBuild(import.meta);const css$A = /* css */`
22677
22678
  border-width: var(--button-border-width);
22678
22679
  border-style: solid;
22679
22680
  border-color: var(--x-button-border-color);
22680
- border-radius: var(--button-border-radius);
22681
+ border-radius: inherit;
22681
22682
  outline-width: var(--x-button-outline-width);
22682
22683
  outline-color: var(--button-outline-color);
22683
22684
  outline-offset: var(--x-button-outline-offset);
@@ -36225,12 +36226,13 @@ const BadgeCount = ({
36225
36226
  if (charCount > MAX_CHAR_AS_CIRCLE) {
36226
36227
  circle = false;
36227
36228
  }
36229
+ const textKey = loading + String(valueDisplayed) + hasOverflow;
36228
36230
  if (circle) {
36229
36231
  return jsx(TextAnchor, {
36230
36232
  childRef: ref,
36231
36233
  textAnchor: textAnchor,
36232
36234
  textSize: props.size,
36233
- textKey: loading + valueDisplayed + hasOverflow,
36235
+ textKey: textKey,
36234
36236
  lineLayout: lineLayout,
36235
36237
  children: jsxs(BadgeCountCircle, {
36236
36238
  ...props,
@@ -36249,7 +36251,7 @@ const BadgeCount = ({
36249
36251
  childRef: ref,
36250
36252
  textAnchor: textAnchor,
36251
36253
  textSize: props.size,
36252
- textKey: loading + valueFormatted + hasOverflow,
36254
+ textKey: textKey,
36253
36255
  lineLayout: lineLayout,
36254
36256
  children: jsxs(BadgeCountEllipse, {
36255
36257
  ...props,