@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.d.cts CHANGED
@@ -10965,10 +10965,12 @@ type FormSectionLayoutProps = {
10965
10965
  /** When true, wraps in {@link AiCard} and applies AI title styling. */
10966
10966
  aiMode?: boolean;
10967
10967
  /**
10968
- * When true, show a JumpLinks rail from section titles (needs 2+ includable sections; hidden on `sm`).
10968
+ * When true, show a JumpLinks rail from section titles (needs 2+ includable links; hidden on `sm`).
10969
10969
  * Default false — opt in for FocusedForm / Stepper form steps that want the rail.
10970
10970
  */
10971
10971
  withJumpLinks?: boolean;
10972
+ /** When true with `withJumpLinks`, prepend the form `title` as the first rail link. */
10973
+ includeTitleJumpLink?: boolean;
10972
10974
  /**
10973
10975
  * Opt into the document-scroll detail pane (`useRightPane`).
10974
10976
  * Hosts JumpLinks + form — do not also set `withRightPane` on the inner `CenteredLayout`.
package/dist/index.d.ts CHANGED
@@ -10965,10 +10965,12 @@ type FormSectionLayoutProps = {
10965
10965
  /** When true, wraps in {@link AiCard} and applies AI title styling. */
10966
10966
  aiMode?: boolean;
10967
10967
  /**
10968
- * When true, show a JumpLinks rail from section titles (needs 2+ includable sections; hidden on `sm`).
10968
+ * When true, show a JumpLinks rail from section titles (needs 2+ includable links; hidden on `sm`).
10969
10969
  * Default false — opt in for FocusedForm / Stepper form steps that want the rail.
10970
10970
  */
10971
10971
  withJumpLinks?: boolean;
10972
+ /** When true with `withJumpLinks`, prepend the form `title` as the first rail link. */
10973
+ includeTitleJumpLink?: boolean;
10972
10974
  /**
10973
10975
  * Opt into the document-scroll detail pane (`useRightPane`).
10974
10976
  * Hosts JumpLinks + form — do not also set `withRightPane` on the inner `CenteredLayout`.
package/dist/index.js CHANGED
@@ -29081,6 +29081,7 @@ function FormSectionLayout(props) {
29081
29081
  sections,
29082
29082
  aiMode = false,
29083
29083
  withJumpLinks = false,
29084
+ includeTitleJumpLink = false,
29084
29085
  withRightPane
29085
29086
  } = props;
29086
29087
  const tid = useTestIds(props, "formSectionLayout");
@@ -29088,13 +29089,19 @@ function FormSectionLayout(props) {
29088
29089
  sm: isMobile
29089
29090
  } = useBreakpoint();
29090
29091
  const rightPane = resolveWithRightPaneOptions(withRightPane);
29091
- const jumpLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29092
+ const formSectionLayoutTitleId = "formSectionLayoutTitle";
29093
+ const sectionLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29092
29094
  const id = defaultTestId(section.title);
29093
29095
  return {
29094
29096
  id,
29095
29097
  label: section.title
29096
29098
  };
29097
29099
  });
29100
+ const titleAnchor = withJumpLinks && includeTitleJumpLink;
29101
+ const jumpLinks = [...titleAnchor ? [{
29102
+ id: formSectionLayoutTitleId,
29103
+ label: title
29104
+ }] : [], ...sectionLinks];
29098
29105
  const showRail = withJumpLinks && jumpLinks.length >= 2 && !isMobile;
29099
29106
  const activeId = useActiveJumpLink(showRail ? jumpLinks.map((link) => link.id) : []);
29100
29107
  const content2 = /* @__PURE__ */ jsxs123("div", { ...trussProps134({
@@ -29108,7 +29115,16 @@ function FormSectionLayout(props) {
29108
29115
  paddingLeft: "pl3"
29109
29116
  } : {}
29110
29117
  }), children: [
29111
- /* @__PURE__ */ jsxs123("div", { className: "df fdc g_3", children: [
29118
+ /* @__PURE__ */ jsxs123("div", { id: titleAnchor ? formSectionLayoutTitleId : void 0, ...trussProps134({
29119
+ display: "df",
29120
+ flexDirection: "fdc",
29121
+ gap: "g_3",
29122
+ ...titleAnchor ? {
29123
+ scrollMarginTop: ["scrollMarginTop_var", {
29124
+ "--scrollMarginTop": maybeCssVar67(stickyNavAndHeaderOffset())
29125
+ }]
29126
+ } : {}
29127
+ }), children: [
29112
29128
  /* @__PURE__ */ jsx230(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
29113
29129
  initialFields
29114
29130
  ] }),