@homebound/beam 4.12.0 → 4.13.0

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
@@ -15344,10 +15344,11 @@ var import_jsx_runtime62 = require("react/jsx-runtime");
15344
15344
  function AiLoadingPanel(props) {
15345
15345
  const {
15346
15346
  title = "Importing Details...",
15347
- message = defaultMessage,
15348
- omitBg = false
15347
+ omitBg = false,
15348
+ progressText
15349
15349
  } = props;
15350
15350
  const tid = useTestIds(props, "aiLoadingPanel");
15351
+ const message = props.message ?? `${progressText === void 0 ? "This process can take a few minutes. " : ""}Feel free to keep working in another tab. Once imported, you may edit or add to content before saving.`;
15351
15352
  const card = (
15352
15353
  // `status` rather than `alert` so assistive tech waits for a pause instead of interrupting, and
15353
15354
  // `aria-busy` so it knows the surrounding content is still settling.
@@ -15362,12 +15363,31 @@ function AiLoadingPanel(props) {
15362
15363
  "--color": "var(--b-on-surface)"
15363
15364
  }],
15364
15365
  textAlign: "tac"
15365
- }), ...tid.message, children: message })
15366
+ }), ...tid.message, children: message }),
15367
+ progressText !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { ...(0, import_runtime51.trussProps)({
15368
+ width: "w100",
15369
+ display: "df",
15370
+ alignItems: "aic",
15371
+ justifyContent: "jcc",
15372
+ gap: "g_1",
15373
+ marginTop: "mt1",
15374
+ paddingTop: "pt2",
15375
+ borderTopStyle: "bts_solid",
15376
+ borderTopWidth: "btw_1px",
15377
+ borderColor: ["bc_var", {
15378
+ "--borderColor": "var(--b-surface-separator)"
15379
+ }],
15380
+ fontWeight: "fw4",
15381
+ fontSize: "fz_12px",
15382
+ lineHeight: "lh_16px"
15383
+ }), children: [
15384
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { icon: "time", inc: 2 }),
15385
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { ...tid.progressText, children: progressText })
15386
+ ] })
15366
15387
  ] }) })
15367
15388
  );
15368
15389
  return omitBg ? card : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(AiPanel, { padding: "lg", ...tid, children: card });
15369
15390
  }
15370
- var defaultMessage = "This process can take a few minutes. Feel free to keep working in another tab. Once imported, you may edit or add to content before saving.";
15371
15391
 
15372
15392
  // src/components/AiSlimBanner.tsx
15373
15393
  var import_jsx_runtime63 = require("react/jsx-runtime");
@@ -29544,6 +29564,7 @@ function FormSectionLayout(props) {
29544
29564
  sections,
29545
29565
  aiMode = false,
29546
29566
  withJumpLinks = false,
29567
+ includeTitleJumpLink = false,
29547
29568
  withRightPane
29548
29569
  } = props;
29549
29570
  const tid = useTestIds(props, "formSectionLayout");
@@ -29551,13 +29572,19 @@ function FormSectionLayout(props) {
29551
29572
  sm: isMobile
29552
29573
  } = useBreakpoint();
29553
29574
  const rightPane = resolveWithRightPaneOptions(withRightPane);
29554
- const jumpLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29575
+ const formSectionLayoutTitleId = "formSectionLayoutTitle";
29576
+ const sectionLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29555
29577
  const id = defaultTestId(section.title);
29556
29578
  return {
29557
29579
  id,
29558
29580
  label: section.title
29559
29581
  };
29560
29582
  });
29583
+ const titleAnchor = withJumpLinks && includeTitleJumpLink;
29584
+ const jumpLinks = [...titleAnchor ? [{
29585
+ id: formSectionLayoutTitleId,
29586
+ label: title
29587
+ }] : [], ...sectionLinks];
29561
29588
  const showRail = withJumpLinks && jumpLinks.length >= 2 && !isMobile;
29562
29589
  const activeId = useActiveJumpLink(showRail ? jumpLinks.map((link) => link.id) : []);
29563
29590
  const content2 = /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { ...(0, import_runtime152.trussProps)({
@@ -29571,7 +29598,16 @@ function FormSectionLayout(props) {
29571
29598
  paddingLeft: "pl3"
29572
29599
  } : {}
29573
29600
  }), children: [
29574
- /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { className: "df fdc g_3", children: [
29601
+ /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { id: titleAnchor ? formSectionLayoutTitleId : void 0, ...(0, import_runtime152.trussProps)({
29602
+ display: "df",
29603
+ flexDirection: "fdc",
29604
+ gap: "g_3",
29605
+ ...titleAnchor ? {
29606
+ scrollMarginTop: ["scrollMarginTop_var", {
29607
+ "--scrollMarginTop": (0, import_runtime152.maybeCssVar)(stickyNavAndHeaderOffset())
29608
+ }]
29609
+ } : {}
29610
+ }), children: [
29575
29611
  /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
29576
29612
  initialFields
29577
29613
  ] }),