@homebound/beam 4.12.0 → 4.12.1

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/index.cjs CHANGED
@@ -29544,6 +29544,7 @@ function FormSectionLayout(props) {
29544
29544
  sections,
29545
29545
  aiMode = false,
29546
29546
  withJumpLinks = false,
29547
+ includeTitleJumpLink = false,
29547
29548
  withRightPane
29548
29549
  } = props;
29549
29550
  const tid = useTestIds(props, "formSectionLayout");
@@ -29551,13 +29552,19 @@ function FormSectionLayout(props) {
29551
29552
  sm: isMobile
29552
29553
  } = useBreakpoint();
29553
29554
  const rightPane = resolveWithRightPaneOptions(withRightPane);
29554
- const jumpLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29555
+ const formSectionLayoutTitleId = "formSectionLayoutTitle";
29556
+ const sectionLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29555
29557
  const id = defaultTestId(section.title);
29556
29558
  return {
29557
29559
  id,
29558
29560
  label: section.title
29559
29561
  };
29560
29562
  });
29563
+ const titleAnchor = withJumpLinks && includeTitleJumpLink;
29564
+ const jumpLinks = [...titleAnchor ? [{
29565
+ id: formSectionLayoutTitleId,
29566
+ label: title
29567
+ }] : [], ...sectionLinks];
29561
29568
  const showRail = withJumpLinks && jumpLinks.length >= 2 && !isMobile;
29562
29569
  const activeId = useActiveJumpLink(showRail ? jumpLinks.map((link) => link.id) : []);
29563
29570
  const content2 = /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { ...(0, import_runtime152.trussProps)({
@@ -29571,7 +29578,16 @@ function FormSectionLayout(props) {
29571
29578
  paddingLeft: "pl3"
29572
29579
  } : {}
29573
29580
  }), children: [
29574
- /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { className: "df fdc g_3", children: [
29581
+ /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { id: titleAnchor ? formSectionLayoutTitleId : void 0, ...(0, import_runtime152.trussProps)({
29582
+ display: "df",
29583
+ flexDirection: "fdc",
29584
+ gap: "g_3",
29585
+ ...titleAnchor ? {
29586
+ scrollMarginTop: ["scrollMarginTop_var", {
29587
+ "--scrollMarginTop": (0, import_runtime152.maybeCssVar)(stickyNavAndHeaderOffset())
29588
+ }]
29589
+ } : {}
29590
+ }), children: [
29575
29591
  /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
29576
29592
  initialFields
29577
29593
  ] }),