@jsenv/navi 0.12.25 → 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.
@@ -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",
@@ -11092,7 +11091,8 @@ const initPseudoStyles = (
11092
11091
  for (const pseudoClass of pseudoClasses) {
11093
11092
  const pseudoClassDefinition = PSEUDO_CLASSES[pseudoClass];
11094
11093
  if (!pseudoClassDefinition) {
11095
- throw new Error(`Unknown pseudo class: ${pseudoClass}`);
11094
+ console.warn(`Unknown pseudo class: ${pseudoClass}`);
11095
+ continue;
11096
11096
  }
11097
11097
  const { setup } = pseudoClassDefinition;
11098
11098
  if (setup) {
@@ -11270,12 +11270,18 @@ const Box = props => {
11270
11270
  const defaultRef = useRef();
11271
11271
  const ref = props.ref || defaultRef;
11272
11272
  const TagName = as;
11273
+ const defaultDisplay = getDefaultDisplay(TagName);
11273
11274
  let {
11274
11275
  box,
11275
11276
  inline,
11276
11277
  row,
11277
11278
  column
11278
11279
  } = rest;
11280
+ if (box === "auto" || inline || defaultDisplay === "inline") {
11281
+ if (rest.width !== undefined || rest.height !== undefined) {
11282
+ box = true;
11283
+ }
11284
+ }
11279
11285
  if (box) {
11280
11286
  if (inline === undefined) {
11281
11287
  inline = true;
@@ -11298,7 +11304,7 @@ const Box = props => {
11298
11304
  } else if (column) {
11299
11305
  layout = "column";
11300
11306
  } else {
11301
- layout = getDefaultDisplay(TagName);
11307
+ layout = defaultDisplay;
11302
11308
  }
11303
11309
  const innerClassName = withPropsClassName(baseClassName, className);
11304
11310
  const selfForwardedProps = {};
@@ -13754,6 +13760,11 @@ const Text = props => {
13754
13760
  ...props
13755
13761
  });
13756
13762
  }
13763
+ if (props.selectRange) {
13764
+ return jsx(TextWithSelectRange, {
13765
+ ...props
13766
+ });
13767
+ }
13757
13768
  return jsx(TextBasic, {
13758
13769
  ...props
13759
13770
  });
@@ -13807,20 +13818,27 @@ const TextOverflowPinned = ({
13807
13818
  setOverflowPinnedElement(null);
13808
13819
  return text;
13809
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
+ };
13810
13833
  const TextBasic = ({
13811
13834
  spacing = " ",
13812
- selectRange,
13813
13835
  children,
13814
13836
  ...rest
13815
13837
  }) => {
13816
- const defaultRef = useRef();
13817
- const ref = rest.ref || defaultRef;
13818
- useInitialTextSelection(ref, selectRange);
13819
13838
  return jsx(Box, {
13820
- ref: ref,
13821
13839
  as: "span",
13822
- ...rest,
13823
13840
  baseClassName: "navi_text",
13841
+ ...rest,
13824
13842
  children: applySpacingOnTextChildren(children, spacing)
13825
13843
  });
13826
13844
  };
@@ -13938,7 +13956,6 @@ const Icon = ({
13938
13956
  return jsxs(Text, {
13939
13957
  ...props,
13940
13958
  ...ariaProps,
13941
- box: box,
13942
13959
  className: withPropsClassName("navi_icon", className),
13943
13960
  spacing: "pre",
13944
13961
  "data-icon-char": "",
@@ -22249,7 +22266,7 @@ const DialogLayout = ({
22249
22266
  }) => {
22250
22267
  return jsx(Box, {
22251
22268
  baseClassName: "navi_dialog_layout",
22252
- CSSVars: DialogLayoutStyleCSSVars,
22269
+ styleCSSVars: DialogLayoutStyleCSSVars,
22253
22270
  visualSelector: ".navi_dialog_content",
22254
22271
  ...props,
22255
22272
  children: jsx(Box, {