@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.
- package/dist/jsenv_navi.js +17 -12
- package/dist/jsenv_navi.js.map +6 -7
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -19267,12 +19267,17 @@ const TextBasic = ({
|
|
|
19267
19267
|
};
|
|
19268
19268
|
|
|
19269
19269
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
19270
|
-
|
|
19271
|
-
display
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
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
|
-
|
|
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":
|
|
19401
|
-
"data-height-fixed":
|
|
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":
|
|
19415
|
-
"data-height-fixed":
|
|
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", {
|