@jsenv/navi 0.20.3 → 0.20.5

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.
@@ -19267,12 +19267,17 @@ const TextBasic = ({
19267
19267
  };
19268
19268
 
19269
19269
  installImportMetaCss(import.meta);import.meta.css = /* css */`
19270
- .navi_icon {
19271
- display: inline-block;
19272
- box-sizing: border-box;
19273
- max-width: 100%;
19274
- max-height: 100%;
19270
+ @layer navi {
19271
+ /* Ensure data attributes from box.jsx can win to update display */
19272
+ .navi_icon {
19273
+ display: inline-block;
19274
+ box-sizing: border-box;
19275
+ max-width: 100%;
19276
+ max-height: 100%;
19277
+ }
19278
+ }
19275
19279
 
19280
+ .navi_icon {
19276
19281
  &[data-flow-inline] {
19277
19282
  width: 1em;
19278
19283
  height: 1em;
@@ -19370,7 +19375,9 @@ const Icon = ({
19370
19375
  }
19371
19376
  const hasExplicitWidth = width !== undefined;
19372
19377
  const hasExplicitHeight = height !== undefined;
19373
- if (hasExplicitWidth || hasExplicitHeight) {
19378
+ const widthFixed = hasExplicitWidth || hasExplicitHeight && (props.square || props.circle || props.aspectRatio);
19379
+ const heightFixed = hasExplicitHeight || hasExplicitWidth && (props.square || props.circle || props.aspectRatio);
19380
+ if (widthFixed || heightFixed) {
19374
19381
  if (flex === undefined) {
19375
19382
  flex = "x";
19376
19383
  }
@@ -19380,8 +19387,6 @@ const Icon = ({
19380
19387
  const ariaProps = decorative ? {
19381
19388
  "aria-hidden": "true"
19382
19389
  } : {};
19383
- const widthConstrained = hasExplicitWidth || hasExplicitHeight && (props.square || props.circle || props.aspectRatio);
19384
- const heightConstrained = hasExplicitHeight || hasExplicitWidth && (props.square || props.circle || props.aspectRatio);
19385
19390
  if (typeof children === "string") {
19386
19391
  return jsx(Text, {
19387
19392
  ...props,
@@ -19397,8 +19402,8 @@ const Icon = ({
19397
19402
  ...ariaProps,
19398
19403
  flex: flex,
19399
19404
  baseClassName: "navi_icon",
19400
- "data-width-fixed": widthConstrained ? "" : undefined,
19401
- "data-height-fixed": heightConstrained ? "" : undefined,
19405
+ "data-width-fixed": widthFixed ? "" : undefined,
19406
+ "data-height-fixed": heightFixed ? "" : undefined,
19402
19407
  "data-interactive": onClick ? "" : undefined,
19403
19408
  onClick: onClick,
19404
19409
  children: innerChildren
@@ -19411,8 +19416,8 @@ const Icon = ({
19411
19416
  className: withPropsClassName("navi_icon", props.className),
19412
19417
  spacing: "pre",
19413
19418
  "data-icon-char": "",
19414
- "data-width-fixed": widthConstrained ? "" : undefined,
19415
- "data-height-fixed": heightConstrained ? "" : undefined,
19419
+ "data-width-fixed": widthFixed ? "" : undefined,
19420
+ "data-height-fixed": heightFixed ? "" : undefined,
19416
19421
  "data-interactive": onClick ? "" : undefined,
19417
19422
  onClick: onClick,
19418
19423
  children: [jsx("span", {