@jsenv/navi 0.12.26 → 0.12.27
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 +25 -9
- package/dist/jsenv_navi.js.map +11 -7
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -10678,7 +10678,6 @@ const DEFAULT_DISPLAY_BY_TAG_NAME = {
|
|
|
10678
10678
|
"bdi",
|
|
10679
10679
|
"bdo",
|
|
10680
10680
|
"br",
|
|
10681
|
-
"button",
|
|
10682
10681
|
"cite",
|
|
10683
10682
|
"code",
|
|
10684
10683
|
"dfn",
|
|
@@ -11271,12 +11270,18 @@ const Box = props => {
|
|
|
11271
11270
|
const defaultRef = useRef();
|
|
11272
11271
|
const ref = props.ref || defaultRef;
|
|
11273
11272
|
const TagName = as;
|
|
11273
|
+
const defaultDisplay = getDefaultDisplay(TagName);
|
|
11274
11274
|
let {
|
|
11275
11275
|
box,
|
|
11276
11276
|
inline,
|
|
11277
11277
|
row,
|
|
11278
11278
|
column
|
|
11279
11279
|
} = rest;
|
|
11280
|
+
if (box === "auto" || inline || defaultDisplay === "inline") {
|
|
11281
|
+
if (rest.width !== undefined || rest.height !== undefined) {
|
|
11282
|
+
box = true;
|
|
11283
|
+
}
|
|
11284
|
+
}
|
|
11280
11285
|
if (box) {
|
|
11281
11286
|
if (inline === undefined) {
|
|
11282
11287
|
inline = true;
|
|
@@ -11299,7 +11304,7 @@ const Box = props => {
|
|
|
11299
11304
|
} else if (column) {
|
|
11300
11305
|
layout = "column";
|
|
11301
11306
|
} else {
|
|
11302
|
-
layout =
|
|
11307
|
+
layout = defaultDisplay;
|
|
11303
11308
|
}
|
|
11304
11309
|
const innerClassName = withPropsClassName(baseClassName, className);
|
|
11305
11310
|
const selfForwardedProps = {};
|
|
@@ -13755,6 +13760,11 @@ const Text = props => {
|
|
|
13755
13760
|
...props
|
|
13756
13761
|
});
|
|
13757
13762
|
}
|
|
13763
|
+
if (props.selectRange) {
|
|
13764
|
+
return jsx(TextWithSelectRange, {
|
|
13765
|
+
...props
|
|
13766
|
+
});
|
|
13767
|
+
}
|
|
13758
13768
|
return jsx(TextBasic, {
|
|
13759
13769
|
...props
|
|
13760
13770
|
});
|
|
@@ -13808,20 +13818,27 @@ const TextOverflowPinned = ({
|
|
|
13808
13818
|
setOverflowPinnedElement(null);
|
|
13809
13819
|
return text;
|
|
13810
13820
|
};
|
|
13821
|
+
const TextWithSelectRange = ({
|
|
13822
|
+
selectRange,
|
|
13823
|
+
...props
|
|
13824
|
+
}) => {
|
|
13825
|
+
const defaultRef = useRef();
|
|
13826
|
+
const ref = props.ref || defaultRef;
|
|
13827
|
+
useInitialTextSelection(ref, selectRange);
|
|
13828
|
+
return jsx(Text, {
|
|
13829
|
+
ref: ref,
|
|
13830
|
+
...props
|
|
13831
|
+
});
|
|
13832
|
+
};
|
|
13811
13833
|
const TextBasic = ({
|
|
13812
13834
|
spacing = " ",
|
|
13813
|
-
selectRange,
|
|
13814
13835
|
children,
|
|
13815
13836
|
...rest
|
|
13816
13837
|
}) => {
|
|
13817
|
-
const defaultRef = useRef();
|
|
13818
|
-
const ref = rest.ref || defaultRef;
|
|
13819
|
-
useInitialTextSelection(ref, selectRange);
|
|
13820
13838
|
return jsx(Box, {
|
|
13821
|
-
ref: ref,
|
|
13822
13839
|
as: "span",
|
|
13823
|
-
...rest,
|
|
13824
13840
|
baseClassName: "navi_text",
|
|
13841
|
+
...rest,
|
|
13825
13842
|
children: applySpacingOnTextChildren(children, spacing)
|
|
13826
13843
|
});
|
|
13827
13844
|
};
|
|
@@ -13939,7 +13956,6 @@ const Icon = ({
|
|
|
13939
13956
|
return jsxs(Text, {
|
|
13940
13957
|
...props,
|
|
13941
13958
|
...ariaProps,
|
|
13942
|
-
box: box,
|
|
13943
13959
|
className: withPropsClassName("navi_icon", className),
|
|
13944
13960
|
spacing: "pre",
|
|
13945
13961
|
"data-icon-char": "",
|