@jsenv/navi 0.12.13 → 0.12.14

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.
@@ -10074,6 +10074,44 @@ const renderActionableComponent = (props, {
10074
10074
  });
10075
10075
  };
10076
10076
 
10077
+ /**
10078
+ * Merges a component's base className with className received from props.
10079
+ *
10080
+ * ```jsx
10081
+ * const MyButton = ({ className, children }) => (
10082
+ * <button className={withPropsClassName("btn", className)}>
10083
+ * {children}
10084
+ * </button>
10085
+ * );
10086
+ *
10087
+ * // Usage:
10088
+ * <MyButton className="primary large" /> // Results in "btn primary large"
10089
+ * <MyButton /> // Results in "btn"
10090
+ * ```
10091
+ *
10092
+ * @param {string} baseClassName - The component's base CSS class name
10093
+ * @param {string} [classNameFromProps] - Additional className from props (optional)
10094
+ * @returns {string} The merged className string
10095
+ */
10096
+ const withPropsClassName = (baseClassName, classNameFromProps) => {
10097
+ if (!classNameFromProps) {
10098
+ return baseClassName;
10099
+ }
10100
+
10101
+ // Trim and normalize whitespace from the props className
10102
+ const trimmedPropsClassName = classNameFromProps.trim();
10103
+ if (!trimmedPropsClassName) {
10104
+ return baseClassName;
10105
+ }
10106
+
10107
+ // Normalize multiple spaces to single spaces and combine
10108
+ const normalizedPropsClassName = trimmedPropsClassName.replace(/\s+/g, " ");
10109
+ if (!baseClassName) {
10110
+ return normalizedPropsClassName;
10111
+ }
10112
+ return `${baseClassName} ${normalizedPropsClassName}`;
10113
+ };
10114
+
10077
10115
  /**
10078
10116
  * Processes component props to extract and generate styles for layout, spacing, alignment, expansion, and typography.
10079
10117
  * Returns remaining props and styled objects based on configuration.
@@ -10429,13 +10467,7 @@ const CONTENT_PROPS = {
10429
10467
  }
10430
10468
  return { justifyContent: value };
10431
10469
  }
10432
- if (layout === "inline-block" || layout === "table-cell") {
10433
- if (value === "start") {
10434
- return undefined; // this is the default
10435
- }
10436
- return { textAlign: value };
10437
- }
10438
- return undefined;
10470
+ return { textAlign: value };
10439
10471
  },
10440
10472
  contentAlignY: (value, { layout }) => {
10441
10473
  if (layout === "row" || layout === "inline-row") {
@@ -10452,13 +10484,7 @@ const CONTENT_PROPS = {
10452
10484
  }
10453
10485
  return { alignItems: value };
10454
10486
  }
10455
- if (layout === "inline-block" || layout === "table-cell") {
10456
- if (value === "start") {
10457
- return undefined;
10458
- }
10459
- return { verticalAlign: value };
10460
- }
10461
- return undefined;
10487
+ return { verticalAlign: value };
10462
10488
  },
10463
10489
  contentSpacing: (value, { layout }) => {
10464
10490
  if (
@@ -11138,44 +11164,6 @@ const updateStyle = (element, style) => {
11138
11164
  return;
11139
11165
  };
11140
11166
 
11141
- /**
11142
- * Merges a component's base className with className received from props.
11143
- *
11144
- * ```jsx
11145
- * const MyButton = ({ className, children }) => (
11146
- * <button className={withPropsClassName("btn", className)}>
11147
- * {children}
11148
- * </button>
11149
- * );
11150
- *
11151
- * // Usage:
11152
- * <MyButton className="primary large" /> // Results in "btn primary large"
11153
- * <MyButton /> // Results in "btn"
11154
- * ```
11155
- *
11156
- * @param {string} baseClassName - The component's base CSS class name
11157
- * @param {string} [classNameFromProps] - Additional className from props (optional)
11158
- * @returns {string} The merged className string
11159
- */
11160
- const withPropsClassName = (baseClassName, classNameFromProps) => {
11161
- if (!classNameFromProps) {
11162
- return baseClassName;
11163
- }
11164
-
11165
- // Trim and normalize whitespace from the props className
11166
- const trimmedPropsClassName = classNameFromProps.trim();
11167
- if (!trimmedPropsClassName) {
11168
- return baseClassName;
11169
- }
11170
-
11171
- // Normalize multiple spaces to single spaces and combine
11172
- const normalizedPropsClassName = trimmedPropsClassName.replace(/\s+/g, " ");
11173
- if (!baseClassName) {
11174
- return normalizedPropsClassName;
11175
- }
11176
- return `${baseClassName} ${normalizedPropsClassName}`;
11177
- };
11178
-
11179
11167
  installImportMetaCss(import.meta);import.meta.css = /* css */`
11180
11168
  [data-layout-inline] {
11181
11169
  display: inline;
@@ -13485,12 +13473,121 @@ const useAutoFocus = (
13485
13473
  }, []);
13486
13474
  };
13487
13475
 
13476
+ const useInitialTextSelection = (ref, textSelection) => {
13477
+ const deps = [];
13478
+ if (Array.isArray(textSelection)) {
13479
+ deps.push(...textSelection);
13480
+ } else {
13481
+ deps.push(textSelection);
13482
+ }
13483
+ useLayoutEffect(() => {
13484
+ const el = ref.current;
13485
+ if (!el || !textSelection) {
13486
+ return;
13487
+ }
13488
+ const range = document.createRange();
13489
+ const selection = window.getSelection();
13490
+ if (Array.isArray(textSelection)) {
13491
+ if (textSelection.length === 2) {
13492
+ const [start, end] = textSelection;
13493
+ if (typeof start === "number" && typeof end === "number") {
13494
+ // Format: [0, 10] - character indices
13495
+ selectByCharacterIndices(el, range, start, end);
13496
+ } else if (typeof start === "string" && typeof end === "string") {
13497
+ // Format: ["Click on the", "button to return"] - text strings
13498
+ selectByTextStrings(el, range, start, end);
13499
+ }
13500
+ }
13501
+ } else if (typeof textSelection === "string") {
13502
+ // Format: "some text" - select the entire string occurrence
13503
+ selectSingleTextString(el, range, textSelection);
13504
+ }
13505
+ selection.removeAllRanges();
13506
+ selection.addRange(range);
13507
+ }, deps);
13508
+ };
13509
+ const selectByCharacterIndices = (element, range, startIndex, endIndex) => {
13510
+ const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
13511
+ let currentIndex = 0;
13512
+ let startNode = null;
13513
+ let startOffset = 0;
13514
+ let endNode = null;
13515
+ let endOffset = 0;
13516
+ while (walker.nextNode()) {
13517
+ const textContent = walker.currentNode.textContent;
13518
+ const nodeLength = textContent.length;
13519
+
13520
+ // Check if start position is in this text node
13521
+ if (!startNode && currentIndex + nodeLength > startIndex) {
13522
+ startNode = walker.currentNode;
13523
+ startOffset = startIndex - currentIndex;
13524
+ }
13525
+
13526
+ // Check if end position is in this text node
13527
+ if (currentIndex + nodeLength >= endIndex) {
13528
+ endNode = walker.currentNode;
13529
+ endOffset = endIndex - currentIndex;
13530
+ break;
13531
+ }
13532
+ currentIndex += nodeLength;
13533
+ }
13534
+ if (startNode && endNode) {
13535
+ range.setStart(startNode, startOffset);
13536
+ range.setEnd(endNode, endOffset);
13537
+ }
13538
+ };
13539
+ const selectSingleTextString = (element, range, text) => {
13540
+ const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
13541
+ while (walker.nextNode()) {
13542
+ const textContent = walker.currentNode.textContent;
13543
+ const index = textContent.indexOf(text);
13544
+ if (index !== -1) {
13545
+ range.setStart(walker.currentNode, index);
13546
+ range.setEnd(walker.currentNode, index + text.length);
13547
+ return;
13548
+ }
13549
+ }
13550
+ };
13551
+ const selectByTextStrings = (element, range, startText, endText) => {
13552
+ const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
13553
+ let startNode = null;
13554
+ let endNode = null;
13555
+ let foundStart = false;
13556
+ while (walker.nextNode()) {
13557
+ const textContent = walker.currentNode.textContent;
13558
+ if (!foundStart && textContent.includes(startText)) {
13559
+ startNode = walker.currentNode;
13560
+ foundStart = true;
13561
+ }
13562
+ if (foundStart && textContent.includes(endText)) {
13563
+ endNode = walker.currentNode;
13564
+ break;
13565
+ }
13566
+ }
13567
+ if (startNode && endNode) {
13568
+ const startOffset = startNode.textContent.indexOf(startText);
13569
+ const endOffset = endNode.textContent.indexOf(endText) + endText.length;
13570
+ range.setStart(startNode, startOffset);
13571
+ range.setEnd(endNode, endOffset);
13572
+ }
13573
+ };
13574
+
13488
13575
  installImportMetaCss(import.meta);import.meta.css = /* css */`
13576
+ *[data-navi-space] {
13577
+ /* user-select: none; */
13578
+ }
13579
+
13489
13580
  .navi_text {
13490
13581
  position: relative;
13491
13582
  color: inherit;
13492
13583
  }
13493
13584
 
13585
+ .navi_text_overflow {
13586
+ flex-wrap: wrap;
13587
+ text-overflow: ellipsis;
13588
+ overflow: hidden;
13589
+ }
13590
+
13494
13591
  .navi_text_overflow_wrapper {
13495
13592
  display: flex;
13496
13593
  width: 0;
@@ -13504,6 +13601,59 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
13504
13601
  overflow: hidden;
13505
13602
  }
13506
13603
  `;
13604
+ const INSERTED_SPACE = jsx("span", {
13605
+ "data-navi-space": "",
13606
+ children: " "
13607
+ });
13608
+ const applyContentSpacingOnTextChildren = (children, contentSpacing) => {
13609
+ if (contentSpacing === "pre") {
13610
+ return children;
13611
+ }
13612
+ if (!children) {
13613
+ return children;
13614
+ }
13615
+ const childArray = toChildArray(children);
13616
+ const childCount = childArray.length;
13617
+ if (childCount <= 1) {
13618
+ return children;
13619
+ }
13620
+
13621
+ // Helper function to check if a value ends with whitespace
13622
+ const endsWithWhitespace = value => {
13623
+ if (typeof value === "string") {
13624
+ return /\s$/.test(value);
13625
+ }
13626
+ return false;
13627
+ };
13628
+
13629
+ // Helper function to check if a value starts with whitespace
13630
+ const startsWithWhitespace = value => {
13631
+ if (typeof value === "string") {
13632
+ return /^\s/.test(value);
13633
+ }
13634
+ return false;
13635
+ };
13636
+ const separator = contentSpacing === undefined || contentSpacing === " " ? INSERTED_SPACE : contentSpacing;
13637
+ const childrenWithGap = [];
13638
+ let i = 0;
13639
+ while (true) {
13640
+ const child = childArray[i];
13641
+ childrenWithGap.push(child);
13642
+ i++;
13643
+ if (i === childCount) {
13644
+ break;
13645
+ }
13646
+
13647
+ // Check if we should skip adding contentSpacing
13648
+ const currentChild = childArray[i - 1];
13649
+ const nextChild = childArray[i];
13650
+ const shouldSkipSpacing = endsWithWhitespace(currentChild) || startsWithWhitespace(nextChild);
13651
+ if (!shouldSkipSpacing) {
13652
+ childrenWithGap.push(separator);
13653
+ }
13654
+ }
13655
+ return childrenWithGap;
13656
+ };
13507
13657
  const OverflowPinnedElementContext = createContext(null);
13508
13658
  const Text = props => {
13509
13659
  const {
@@ -13525,8 +13675,6 @@ const Text = props => {
13525
13675
  });
13526
13676
  };
13527
13677
  const TextOverflow = ({
13528
- as = "div",
13529
- contentSpacing = " ",
13530
13678
  noWrap,
13531
13679
  pre = !noWrap,
13532
13680
  children,
@@ -13534,21 +13682,20 @@ const TextOverflow = ({
13534
13682
  }) => {
13535
13683
  const [OverflowPinnedElement, setOverflowPinnedElement] = useState(null);
13536
13684
  return jsx(Text, {
13537
- ...rest,
13538
- as: as,
13539
- box: true,
13540
- expandX: true,
13685
+ as: "div",
13541
13686
  pre: pre,
13542
13687
  nowWrap: noWrap,
13688
+ ...rest,
13689
+ className: "navi_text_overflow",
13690
+ expandX: true,
13543
13691
  contentSpacing: "pre",
13544
- style: "text-overflow: ellipsis; overflow: hidden; flex-wrap: wrap;",
13545
13692
  children: jsxs("span", {
13546
13693
  className: "navi_text_overflow_wrapper",
13547
- children: [jsx("span", {
13548
- className: "navi_text_overflow_text",
13549
- children: jsx(OverflowPinnedElementContext.Provider, {
13550
- value: setOverflowPinnedElement,
13551
- children: applyContentSpacingOnTextChildren(children, contentSpacing)
13694
+ children: [jsx(OverflowPinnedElementContext.Provider, {
13695
+ value: setOverflowPinnedElement,
13696
+ children: jsx(Text, {
13697
+ className: "navi_text_overflow_text",
13698
+ children: children
13552
13699
  })
13553
13700
  }), OverflowPinnedElement]
13554
13701
  })
@@ -13574,80 +13721,22 @@ const TextOverflowPinned = ({
13574
13721
  return text;
13575
13722
  };
13576
13723
  const TextBasic = ({
13577
- as = "span",
13578
13724
  contentSpacing = " ",
13725
+ selectRange,
13579
13726
  children,
13580
13727
  ...rest
13581
13728
  }) => {
13582
- const text = jsx(Box, {
13583
- ...rest,
13584
- baseClassName: "navi_text",
13585
- as: as,
13586
- children: applyContentSpacingOnTextChildren(children, contentSpacing)
13587
- });
13588
- return text;
13589
- };
13590
- const Paragraph = ({
13591
- contentSpacing = " ",
13592
- marginTop = "md",
13593
- children,
13594
- ...rest
13595
- }) => {
13729
+ const defaultRef = useRef();
13730
+ const ref = rest.ref || defaultRef;
13731
+ useInitialTextSelection(ref, selectRange);
13596
13732
  return jsx(Box, {
13733
+ ref: ref,
13734
+ as: "span",
13597
13735
  ...rest,
13598
- as: "p",
13599
- marginTop: marginTop,
13736
+ baseClassName: "navi_text",
13600
13737
  children: applyContentSpacingOnTextChildren(children, contentSpacing)
13601
13738
  });
13602
13739
  };
13603
- const applyContentSpacingOnTextChildren = (children, contentSpacing) => {
13604
- if (contentSpacing === "pre") {
13605
- return children;
13606
- }
13607
- if (!children) {
13608
- return children;
13609
- }
13610
- const childArray = toChildArray(children);
13611
- const childCount = childArray.length;
13612
- if (childCount <= 1) {
13613
- return children;
13614
- }
13615
-
13616
- // Helper function to check if a value ends with whitespace
13617
- const endsWithWhitespace = value => {
13618
- if (typeof value === "string") {
13619
- return /\s$/.test(value);
13620
- }
13621
- return false;
13622
- };
13623
-
13624
- // Helper function to check if a value starts with whitespace
13625
- const startsWithWhitespace = value => {
13626
- if (typeof value === "string") {
13627
- return /^\s/.test(value);
13628
- }
13629
- return false;
13630
- };
13631
- const childrenWithGap = [];
13632
- let i = 0;
13633
- while (true) {
13634
- const child = childArray[i];
13635
- childrenWithGap.push(child);
13636
- i++;
13637
- if (i === childCount) {
13638
- break;
13639
- }
13640
-
13641
- // Check if we should skip adding contentSpacing
13642
- const currentChild = childArray[i - 1];
13643
- const nextChild = childArray[i];
13644
- const shouldSkipSpacing = endsWithWhitespace(currentChild) || startsWithWhitespace(nextChild);
13645
- if (!shouldSkipSpacing) {
13646
- childrenWithGap.push(contentSpacing);
13647
- }
13648
- }
13649
- return childrenWithGap;
13650
- };
13651
13740
 
13652
13741
  installImportMetaCss(import.meta);import.meta.css = /* css */`
13653
13742
  .navi_icon {
@@ -13657,6 +13746,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
13657
13746
 
13658
13747
  .navi_icon_char_slot {
13659
13748
  opacity: 0;
13749
+ cursor: default;
13750
+ user-select: none;
13660
13751
  }
13661
13752
  .navi_icon_foreground {
13662
13753
  position: absolute;
@@ -13741,6 +13832,7 @@ const Icon = ({
13741
13832
  ...ariaProps,
13742
13833
  box: box,
13743
13834
  className: withPropsClassName("navi_icon", className),
13835
+ contentSpacing: "pre",
13744
13836
  "data-icon-char": "",
13745
13837
  "data-width": width,
13746
13838
  "data-height": height,
@@ -13751,6 +13843,7 @@ const Icon = ({
13751
13843
  }), jsx("span", {
13752
13844
  className: "navi_icon_foreground",
13753
13845
  children: jsx(Text, {
13846
+ contentSpacing: "pre",
13754
13847
  children: innerChildren
13755
13848
  })
13756
13849
  })]
@@ -13898,7 +13991,7 @@ const LinkPlain = props => {
13898
13991
  blankTargetIcon,
13899
13992
  anchorIcon,
13900
13993
  icon,
13901
- contentSpacing = " ",
13994
+ contentSpacing,
13902
13995
  children,
13903
13996
  ...rest
13904
13997
  } = props;
@@ -13950,7 +14043,8 @@ const LinkPlain = props => {
13950
14043
  rel: innerRel,
13951
14044
  target: innerTarget === "_self" ? undefined : target,
13952
14045
  "aria-busy": loading,
13953
- inert: disabled
14046
+ inert: disabled,
14047
+ contentSpacing: "pre"
13954
14048
  // Visual
13955
14049
  ,
13956
14050
  baseClassName: "navi_link",
@@ -16661,7 +16755,10 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
16661
16755
  }
16662
16756
  .navi_button_content {
16663
16757
  position: relative;
16758
+ display: inherit;
16664
16759
  box-sizing: border-box;
16760
+ width: 100%;
16761
+ height: 100%;
16665
16762
  padding-top: var(
16666
16763
  --button-padding-top,
16667
16764
  var(--button-padding-y, var(--button-padding, 1px))
@@ -16678,6 +16775,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
16678
16775
  --button-padding-left,
16679
16776
  var(--button-padding-x, var(--button-padding, 6px))
16680
16777
  );
16778
+ align-items: inherit;
16779
+ justify-content: inherit;
16681
16780
  color: var(--x-button-color);
16682
16781
  background-color: var(--x-button-background-color);
16683
16782
  border-width: var(--x-button-outer-width);
@@ -16824,7 +16923,6 @@ const ButtonBasic = props => {
16824
16923
  autoFocus,
16825
16924
  // visual
16826
16925
  discrete,
16827
- contentSpacing = " ",
16828
16926
  children,
16829
16927
  ...rest
16830
16928
  } = props;
@@ -16835,13 +16933,11 @@ const ButtonBasic = props => {
16835
16933
  const innerLoading = loading || contextLoading && contextLoadingElement === ref.current;
16836
16934
  const innerReadOnly = readOnly || contextReadOnly || innerLoading;
16837
16935
  const innerDisabled = disabled || contextDisabled;
16838
- const innerChildren = applyContentSpacingOnTextChildren(children, contentSpacing);
16839
16936
  const renderButtonContent = buttonProps => {
16840
- return jsxs(Box, {
16937
+ return jsxs(Text, {
16841
16938
  ...buttonProps,
16842
- as: "span",
16843
16939
  className: "navi_button_content",
16844
- children: [innerChildren, jsx("span", {
16940
+ children: [children, jsx("span", {
16845
16941
  className: "navi_button_shadow"
16846
16942
  })]
16847
16943
  });
@@ -21338,10 +21434,6 @@ const useSignalSync = (value, initialValue = value) => {
21338
21434
  return signal;
21339
21435
  };
21340
21436
 
21341
- const FontSizedSvg = () => {};
21342
-
21343
- const IconAndText = () => {};
21344
-
21345
21437
  installImportMetaCss(import.meta);import.meta.css = /* css */`
21346
21438
  .svg_mask_content * {
21347
21439
  fill: black !important;
@@ -21435,11 +21527,11 @@ const useContrastingColor = (ref) => {
21435
21527
 
21436
21528
  installImportMetaCss(import.meta);import.meta.css = /* css */`
21437
21529
  @layer navi {
21438
- .navi_badge {
21530
+ .navi_badge_count {
21439
21531
  --border-radius: 1em;
21440
21532
  }
21441
21533
  }
21442
- .navi_badge {
21534
+ .navi_badge_count {
21443
21535
  display: inline-block;
21444
21536
  box-sizing: border-box;
21445
21537
  min-width: 1.5em;
@@ -21495,34 +21587,21 @@ const BadgeCount = ({
21495
21587
  return jsx(Text, {
21496
21588
  ...props,
21497
21589
  ref: ref,
21498
- className: "navi_badge",
21590
+ className: "navi_badge_count",
21499
21591
  bold: bold,
21500
21592
  managedByCSSVars: BadgeManagedByCSSVars,
21593
+ contentSpacing: "pre",
21501
21594
  children: displayValue
21502
21595
  });
21503
21596
  };
21504
21597
 
21505
- const Code = ({
21506
- contentSpacing = " ",
21507
- children,
21508
- ...rest
21509
- }) => {
21510
- return jsx(Box, {
21511
- ...rest,
21512
- as: "code",
21513
- children: applyContentSpacingOnTextChildren(children, contentSpacing)
21514
- });
21515
- };
21516
-
21517
- const Image = props => {
21518
- return jsx(Box, {
21598
+ const Code = props => {
21599
+ return jsx(Text, {
21519
21600
  ...props,
21520
- as: "img"
21601
+ as: "code"
21521
21602
  });
21522
21603
  };
21523
21604
 
21524
- const LinkWithIcon = () => {};
21525
-
21526
21605
  installImportMetaCss(import.meta);import.meta.css = /* css */`
21527
21606
  @layer navi {
21528
21607
  .navi_message_box {
@@ -21615,19 +21694,19 @@ const MessageBoxReportTitleChildContext = createContext();
21615
21694
  const MessageBox = ({
21616
21695
  level = "info",
21617
21696
  padding = "sm",
21618
- contentSpacing = " ",
21619
21697
  leftStripe,
21620
21698
  children,
21699
+ contentSpacing,
21621
21700
  ...rest
21622
21701
  }) => {
21623
21702
  const [hasTitleChild, setHasTitleChild] = useState(false);
21624
21703
  const innerLeftStripe = leftStripe === undefined ? hasTitleChild : leftStripe;
21625
- return jsx(Box, {
21704
+ return jsx(Text, {
21626
21705
  as: "div",
21627
21706
  role: level === "info" ? "status" : "alert",
21628
21707
  "data-left-stripe": innerLeftStripe ? "" : undefined,
21629
21708
  ...rest,
21630
- baseClassName: "navi_message_box",
21709
+ className: withPropsClassName("navi_message_box", rest.className),
21631
21710
  padding: padding,
21632
21711
  pseudoClasses: MessageBoxPseudoClasses,
21633
21712
  basePseudoState: {
@@ -21646,38 +21725,46 @@ const MessageBox = ({
21646
21725
  });
21647
21726
  };
21648
21727
 
21649
- const Svg = props => {
21650
- return jsx(Box, {
21728
+ const Paragraph = props => {
21729
+ return jsx(Text, {
21730
+ marginTop: "md",
21651
21731
  ...props,
21652
- as: "svg"
21732
+ as: "p",
21733
+ ...props
21653
21734
  });
21654
21735
  };
21655
21736
 
21656
- const Title = ({
21657
- as,
21658
- bold = true,
21659
- contentSpacing = " ",
21660
- color,
21661
- children,
21662
- marginTop,
21663
- marginBottom,
21664
- ...rest
21665
- }) => {
21737
+ const Title = props => {
21666
21738
  const messageBoxLevel = useContext(MessageBoxLevelContext);
21667
21739
  const reportTitleToMessageBox = useContext(MessageBoxReportTitleChildContext);
21668
- const innerColor = color === undefined ? messageBoxLevel ? `var(--x-color)` : undefined : color;
21669
- const innerAs = as === undefined ? messageBoxLevel ? "h4" : "h1" : as;
21670
21740
  reportTitleToMessageBox?.(true);
21671
- const innerMarginTop = marginTop === undefined ? messageBoxLevel ? "0" : undefined : marginTop;
21672
- const innerMarginBottom = marginBottom === undefined ? messageBoxLevel ? "8px" : undefined : marginBottom;
21741
+ return jsx(Text, {
21742
+ bold: true,
21743
+ as: messageBoxLevel ? "h4" : "h1",
21744
+ marginTop: messageBoxLevel ? "0" : undefined,
21745
+ marginBottom: messageBoxLevel ? "sm" : undefined,
21746
+ color: messageBoxLevel ? `var(--x-color)` : undefined,
21747
+ ...props
21748
+ });
21749
+ };
21750
+
21751
+ const FontSizedSvg = () => {};
21752
+
21753
+ const IconAndText = () => {};
21754
+
21755
+ const LinkWithIcon = () => {};
21756
+
21757
+ const Image = props => {
21673
21758
  return jsx(Box, {
21674
- ...rest,
21675
- as: innerAs,
21676
- bold: bold,
21677
- color: innerColor,
21678
- marginTop: innerMarginTop,
21679
- marginBottom: innerMarginBottom,
21680
- children: applyContentSpacingOnTextChildren(children, contentSpacing)
21759
+ ...props,
21760
+ as: "img"
21761
+ });
21762
+ };
21763
+
21764
+ const Svg = props => {
21765
+ return jsx(Box, {
21766
+ ...props,
21767
+ as: "svg"
21681
21768
  });
21682
21769
  };
21683
21770