@homebound/beam 3.90.1 → 3.91.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
@@ -34,6 +34,7 @@ __export(index_exports, {
34
34
  Accordion: () => Accordion,
35
35
  AccordionList: () => AccordionList,
36
36
  AiBanner: () => AiBanner,
37
+ AiCard: () => AiCard,
37
38
  AiLoader: () => AiLoader,
38
39
  AiLoadingPanel: () => AiLoadingPanel,
39
40
  AiPanel: () => AiPanel,
@@ -276,6 +277,7 @@ __export(index_exports, {
276
277
  defaultRenderFn: () => defaultRenderFn,
277
278
  defaultStyle: () => defaultStyle,
278
279
  defaultTestId: () => defaultTestId,
280
+ documentScrollBodyMinHeight: () => documentScrollBodyMinHeight,
279
281
  documentScrollChromeLeft: () => documentScrollChromeLeft,
280
282
  documentScrollChromeWidth: () => documentScrollChromeWidth,
281
283
  documentScrollContentLeft: () => documentScrollContentLeft,
@@ -6638,6 +6640,9 @@ function documentScrollContentWidth() {
6638
6640
  function documentScrollRightPaneHeight() {
6639
6641
  return `calc(var(${beamLayoutViewportHeightVar}, 100vh) - ${stickyTableHeaderOffset()})`;
6640
6642
  }
6643
+ function documentScrollBodyMinHeight() {
6644
+ return `calc(var(${beamLayoutViewportHeightVar}, 100vh) - ${stickyNavAndHeaderOffset()} - var(${beamWorkflowLayoutFooterHeightVar}, 0px))`;
6645
+ }
6641
6646
  function documentScrollRightPaneWidth(maxPx) {
6642
6647
  return `min(${maxPx}px, ${documentScrollChromeWidth()})`;
6643
6648
  }
@@ -19401,50 +19406,91 @@ var import_jsx_runtime107 = require("react/jsx-runtime");
19401
19406
  function AiPanel(props) {
19402
19407
  const {
19403
19408
  rounded = false,
19404
- fullWidth = true,
19409
+ padding = "sm",
19405
19410
  children,
19406
19411
  ...others
19407
19412
  } = props;
19408
19413
  const tid = useTestIds(others, "aiPanel");
19409
19414
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { ...(0, import_runtime80.trussProps)({
19410
- width: "w100",
19411
- paddingLeft: "pl3",
19412
- paddingRight: "pr3",
19413
- paddingTop: "pt2",
19414
- paddingBottom: "pb2",
19415
- backgroundImage: "aiBackground",
19416
- ...rounded ? {
19417
- borderRadius: "br12"
19418
- } : {}
19419
- }), ...others, ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { ...(0, import_runtime80.trussProps)({
19420
- display: "df",
19421
- flexDirection: "fdc",
19422
- alignItems: "aifs",
19423
- gap: "gap1",
19424
- width: "w100",
19425
- ...!fullWidth ? {
19426
- width: "wfc",
19427
- marginLeft: "mla",
19428
- marginRight: "mra"
19429
- } : {}
19415
+ ...{
19416
+ width: "w100",
19417
+ backgroundImage: "aiBackground",
19418
+ ...rounded ? {
19419
+ borderRadius: "br12"
19420
+ } : {}
19421
+ },
19422
+ ...aiBackgroundPaddingCss[padding]
19423
+ }), ...others, ...tid, children });
19424
+ }
19425
+ function AiCard(props) {
19426
+ const {
19427
+ fullWidth = true,
19428
+ size = "lg",
19429
+ children,
19430
+ ...others
19431
+ } = props;
19432
+ const {
19433
+ logoHeight,
19434
+ gapCss
19435
+ } = aiCardChrome[size];
19436
+ const tid = useTestIds(others, "aiCard");
19437
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { ...(0, import_runtime80.trussProps)({
19438
+ ...{
19439
+ display: "df",
19440
+ flexDirection: "fdc",
19441
+ alignItems: "aifs",
19442
+ width: "w100",
19443
+ ...!fullWidth ? {
19444
+ width: "wfc",
19445
+ maxWidth: "maxw100",
19446
+ marginLeft: "mla",
19447
+ marginRight: "mra"
19448
+ } : {}
19449
+ },
19450
+ ...gapCss
19430
19451
  }), ...tid.column, children: [
19431
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(BlueprintAiLogo, { height: 3 }),
19452
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(BlueprintAiLogo, { height: logoHeight }),
19432
19453
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { ...(0, import_runtime80.trussProps)({
19433
19454
  display: "df",
19434
19455
  flexDirection: "fdc",
19435
19456
  width: "w100",
19457
+ minWidth: "mw0",
19436
19458
  borderRadius: "br12",
19437
- paddingTop: "pt_12px",
19438
- paddingLeft: "pl2",
19439
- paddingRight: "pr2",
19440
- paddingBottom: "pb2",
19441
19459
  backgroundColor: ["bgColor_var", {
19442
19460
  "--backgroundColor": "var(--b-surface)"
19443
19461
  }],
19444
19462
  boxShadow: "bshBasic"
19445
19463
  }), ...tid.card, children })
19446
- ] }) });
19464
+ ] });
19447
19465
  }
19466
+ var aiBackgroundPaddingCss = {
19467
+ lg: {
19468
+ paddingTop: "pt3",
19469
+ paddingBottom: "pb3",
19470
+ paddingRight: "pr3",
19471
+ paddingLeft: "pl3"
19472
+ },
19473
+ sm: {
19474
+ paddingLeft: "pl3",
19475
+ paddingRight: "pr3",
19476
+ paddingTop: "pt2",
19477
+ paddingBottom: "pb2"
19478
+ }
19479
+ };
19480
+ var aiCardChrome = {
19481
+ lg: {
19482
+ logoHeight: 3,
19483
+ gapCss: {
19484
+ gap: "gap2"
19485
+ }
19486
+ },
19487
+ sm: {
19488
+ logoHeight: 2,
19489
+ gapCss: {
19490
+ gap: "gap_4px"
19491
+ }
19492
+ }
19493
+ };
19448
19494
 
19449
19495
  // src/components/AiBanner.tsx
19450
19496
  var import_runtime81 = require("@homebound/truss/runtime");
@@ -19457,7 +19503,7 @@ function AiBanner(props) {
19457
19503
  secondaryAction
19458
19504
  } = props;
19459
19505
  const tid = useTestIds(props, "aiBanner");
19460
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AiPanel, { ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "df aic jcsb gap2 w100 fww", children: [
19506
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AiPanel, { padding: "sm", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(AiCard, { size: "sm", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "df aic jcsb gap2 w100 fww pt_12px pb2 pl2 pr2", children: [
19461
19507
  /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "df fdc gap_4px fg1 fb_0 mw_240px", children: [
19462
19508
  /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "fw6 fz_14px lh_20px purple700 aiBoldBg bgcl_text WebkitBackgroundClip_text wktfc_transparent", ...tid.title, children: title }),
19463
19509
  message && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { ...(0, import_runtime81.trussProps)({
@@ -19473,7 +19519,7 @@ function AiBanner(props) {
19473
19519
  secondaryAction && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Button, { ...secondaryAction, variant: "quaternary" }),
19474
19520
  primaryAction && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Button, { ...primaryAction, variant: "ai" })
19475
19521
  ] })
19476
- ] }) });
19522
+ ] }) }) });
19477
19523
  }
19478
19524
 
19479
19525
  // src/components/AiLoader.tsx
@@ -19535,7 +19581,7 @@ function AiLoadingPanel(props) {
19535
19581
  return (
19536
19582
  // `status` rather than `alert` so assistive tech waits for a pause instead of interrupting, and
19537
19583
  // `aria-busy` so it knows the surrounding content is still settling.
19538
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AiPanel, { role: "status", "aria-busy": true, ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "df fdc aic gap1 w100 pl1 pr1", children: [
19584
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AiPanel, { role: "status", "aria-busy": true, padding: "lg", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AiCard, { size: "lg", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "df fdc aic gap1 w100 pt2 pb2 pl3 pr3", children: [
19539
19585
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AiLoader, {}),
19540
19586
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "fw6 fz_18px lh_28px purple700 aiBoldBg bgcl_text WebkitBackgroundClip_text wktfc_transparent", ...tid.title, children: title }),
19541
19587
  /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { ...(0, import_runtime83.trussProps)({
@@ -19547,7 +19593,7 @@ function AiLoadingPanel(props) {
19547
19593
  }],
19548
19594
  textAlign: "tac"
19549
19595
  }), ...tid.message, children: message })
19550
- ] }) })
19596
+ ] }) }) })
19551
19597
  );
19552
19598
  }
19553
19599
  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.";
@@ -21751,6 +21797,7 @@ function ContentHeader(props) {
21751
21797
  actions,
21752
21798
  withAutoSave,
21753
21799
  level = 2,
21800
+ aiMode = false,
21754
21801
  startAdornment,
21755
21802
  xss
21756
21803
  } = props;
@@ -21759,6 +21806,16 @@ function ContentHeader(props) {
21759
21806
  tag: Heading,
21760
21807
  css: headingCss
21761
21808
  } = headingByLevel[level];
21809
+ const titleCss = aiMode ? {
21810
+ ...headingCss,
21811
+ ...{
21812
+ color: "purple700",
21813
+ backgroundImage: "aiBoldBg",
21814
+ backgroundClip: "bgcl_text",
21815
+ WebkitBackgroundClip: "WebkitBackgroundClip_text",
21816
+ WebkitTextFillColor: "wktfc_transparent"
21817
+ }
21818
+ } : headingCss;
21762
21819
  if (!title && !description && !actions && !withAutoSave) {
21763
21820
  return null;
21764
21821
  }
@@ -21788,7 +21845,7 @@ function ContentHeader(props) {
21788
21845
  /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "df aic jcsb mw0", children: [
21789
21846
  title ? /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "df aic gap1 mw0", children: [
21790
21847
  startAdornment,
21791
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Heading, { ...(0, import_runtime95.trussProps)(headingCss), ...tid.title, children: title })
21848
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Heading, { ...(0, import_runtime95.trussProps)(titleCss), ...tid.title, children: title })
21792
21849
  ] }) : descriptionEl,
21793
21850
  (withAutoSave || actions) && /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "df gap1 fs0", ...tid.actions, children: [
21794
21851
  withAutoSave && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(AutoSaveIndicator, {}),
@@ -28019,6 +28076,7 @@ function EnvironmentBannerLayout(props) {
28019
28076
  }
28020
28077
 
28021
28078
  // src/layouts/FormSectionLayout/FormSectionLayout.tsx
28079
+ var import_runtime143 = require("@homebound/truss/runtime");
28022
28080
  var import_jsx_runtime225 = require("react/jsx-runtime");
28023
28081
  function FormSectionLayout(props) {
28024
28082
  const {
@@ -28027,21 +28085,33 @@ function FormSectionLayout(props) {
28027
28085
  actions,
28028
28086
  withAutoSave,
28029
28087
  initialFields,
28030
- sections
28088
+ sections,
28089
+ aiMode = false
28031
28090
  } = props;
28032
28091
  const tid = useTestIds(props, "formSectionLayout");
28033
- return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(CenteredLayout, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)("div", { className: "df fdc gap8 pt4", children: [
28092
+ const content = /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)("div", { ...(0, import_runtime143.trussProps)({
28093
+ display: "df",
28094
+ flexDirection: "fdc",
28095
+ gap: "gap8",
28096
+ ...aiMode ? {
28097
+ paddingTop: "pt3",
28098
+ paddingBottom: "pb3",
28099
+ paddingRight: "pr3",
28100
+ paddingLeft: "pl3"
28101
+ } : {}
28102
+ }), children: [
28034
28103
  /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)("div", { className: "df fdc gap3", children: [
28035
- /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2 }),
28104
+ /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
28036
28105
  initialFields
28037
28106
  ] }),
28038
28107
  sections && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(FormSection, { ...section }, defaultTestId(section.title) || i)) })
28039
- ] }) });
28108
+ ] });
28109
+ return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(CenteredLayout, { size: "sm", children: aiMode ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(AiCard, { size: "lg", ...tid, children: content }) : content });
28040
28110
  }
28041
28111
 
28042
28112
  // src/layouts/NavbarLayout/NavbarLayout.tsx
28043
28113
  var import_react160 = require("react");
28044
- var import_runtime143 = require("@homebound/truss/runtime");
28114
+ var import_runtime144 = require("@homebound/truss/runtime");
28045
28115
 
28046
28116
  // src/layouts/useAutoHideOnScroll.ts
28047
28117
  var import_react157 = require("react");
@@ -28191,10 +28261,10 @@ function NavbarLayout(props) {
28191
28261
  position: "sticky",
28192
28262
  left: "left0",
28193
28263
  zIndex: ["z_var", {
28194
- "--zIndex": (0, import_runtime143.maybeCssVar)(zIndices.navbar)
28264
+ "--zIndex": (0, import_runtime144.maybeCssVar)(zIndices.navbar)
28195
28265
  }],
28196
28266
  width: ["w_var", {
28197
- "--width": (0, import_runtime143.maybeCssVar)(__maybeInc30(innerWidth))
28267
+ "--width": (0, import_runtime144.maybeCssVar)(__maybeInc30(innerWidth))
28198
28268
  }]
28199
28269
  }
28200
28270
  ) : (
@@ -28203,10 +28273,10 @@ function NavbarLayout(props) {
28203
28273
  position: "fixed",
28204
28274
  left: "left0",
28205
28275
  zIndex: ["z_var", {
28206
- "--zIndex": (0, import_runtime143.maybeCssVar)(zIndices.navbar)
28276
+ "--zIndex": (0, import_runtime144.maybeCssVar)(zIndices.navbar)
28207
28277
  }],
28208
28278
  width: ["w_var", {
28209
- "--width": (0, import_runtime143.maybeCssVar)(__maybeInc30(innerWidth))
28279
+ "--width": (0, import_runtime144.maybeCssVar)(__maybeInc30(innerWidth))
28210
28280
  }],
28211
28281
  transition: "transitionTop"
28212
28282
  }
@@ -28216,18 +28286,18 @@ function NavbarLayout(props) {
28216
28286
  top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
28217
28287
  } : void 0;
28218
28288
  const navbarEl = (0, import_react160.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(Navbar, { ...navbar }), [navbar]);
28219
- return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(MobileSubNavProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { ...(0, import_runtime143.mergeProps)(void 0, cssVars, {
28289
+ return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(MobileSubNavProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)("div", { ...(0, import_runtime144.mergeProps)(void 0, cssVars, {
28220
28290
  display: "df",
28221
28291
  flexDirection: "fdc",
28222
28292
  width: "wfc",
28223
28293
  minWidth: "mw100"
28224
28294
  }), ...tid, children: [
28225
- /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { ref: spacerRef, ...(0, import_runtime143.mergeProps)(void 0, {
28295
+ /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { ref: spacerRef, ...(0, import_runtime144.mergeProps)(void 0, {
28226
28296
  height: navHeight
28227
28297
  }, {
28228
28298
  flexShrink: "fs0",
28229
28299
  width: "w100"
28230
- }), children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime143.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
28300
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { ref: navMetricsRef, ...(0, import_runtime144.mergeProps)(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
28231
28301
  /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
28232
28302
  ] }) }) }) });
28233
28303
  }
@@ -28236,7 +28306,7 @@ function NavbarLayout(props) {
28236
28306
  var import_react161 = require("react");
28237
28307
 
28238
28308
  // src/components/Headers/BaseHeader.tsx
28239
- var import_runtime144 = require("@homebound/truss/runtime");
28309
+ var import_runtime145 = require("@homebound/truss/runtime");
28240
28310
  var import_jsx_runtime228 = require("react/jsx-runtime");
28241
28311
  function BaseHeader(props) {
28242
28312
  const {
@@ -28249,7 +28319,7 @@ function BaseHeader(props) {
28249
28319
  } = props;
28250
28320
  const tid = useTestIds(otherProps, "header");
28251
28321
  useDocumentTitle(title, documentTitleSuffix);
28252
- return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("header", { ...tid, ...(0, import_runtime144.trussProps)({
28322
+ return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("header", { ...tid, ...(0, import_runtime145.trussProps)({
28253
28323
  display: "df",
28254
28324
  flexDirection: "fdc",
28255
28325
  paddingTop: "pt3",
@@ -28263,7 +28333,7 @@ function BaseHeader(props) {
28263
28333
  "--backgroundColor": "var(--b-surface)"
28264
28334
  }]
28265
28335
  }), children: [
28266
- /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("div", { ...(0, import_runtime144.trussProps)({
28336
+ /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("div", { ...(0, import_runtime145.trussProps)({
28267
28337
  ...{
28268
28338
  display: "df",
28269
28339
  justifyContent: "jcsb",
@@ -28279,7 +28349,7 @@ function BaseHeader(props) {
28279
28349
  }), children: [
28280
28350
  /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)("div", { className: "mw0", children: [
28281
28351
  breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(Breadcrumbs, { ...breadcrumbs }),
28282
- /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("h1", { ...tid.title, ...(0, import_runtime144.trussProps)({
28352
+ /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("h1", { ...tid.title, ...(0, import_runtime145.trussProps)({
28283
28353
  fontWeight: "fw6",
28284
28354
  fontSize: "fz_20px",
28285
28355
  lineHeight: "lh_28px",
@@ -28295,7 +28365,7 @@ function BaseHeader(props) {
28295
28365
  }
28296
28366
 
28297
28367
  // src/components/Headers/PageHeader.tsx
28298
- var import_runtime145 = require("@homebound/truss/runtime");
28368
+ var import_runtime146 = require("@homebound/truss/runtime");
28299
28369
  var import_jsx_runtime229 = require("react/jsx-runtime");
28300
28370
  function PageHeader2(props) {
28301
28371
  const {
@@ -28303,7 +28373,7 @@ function PageHeader2(props) {
28303
28373
  ...otherProps
28304
28374
  } = props;
28305
28375
  const tid = useTestIds(otherProps, "header");
28306
- return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)("div", { ...(0, import_runtime145.trussProps)(pageContentPaddingX), children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(Tabs, { ...tabs, ...tid.tabs }) }) });
28376
+ return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)("div", { ...(0, import_runtime146.trussProps)(pageContentPaddingX), children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(Tabs, { ...tabs, ...tid.tabs }) }) });
28307
28377
  }
28308
28378
 
28309
28379
  // src/layouts/useBannerAndNavbarHeight.ts
@@ -28312,7 +28382,7 @@ function useBannerAndNavbarHeight() {
28312
28382
  }
28313
28383
 
28314
28384
  // src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
28315
- var import_runtime146 = require("@homebound/truss/runtime");
28385
+ var import_runtime147 = require("@homebound/truss/runtime");
28316
28386
  var import_jsx_runtime230 = require("react/jsx-runtime");
28317
28387
  var __maybeInc31 = (inc) => {
28318
28388
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
@@ -28344,24 +28414,24 @@ function PageHeaderLayout(props) {
28344
28414
  const innerCss = autoHideState === "static" ? {
28345
28415
  position: "sticky",
28346
28416
  left: ["left_var", {
28347
- "--left": (0, import_runtime146.maybeCssVar)(__maybeInc31(headerLeft))
28417
+ "--left": (0, import_runtime147.maybeCssVar)(__maybeInc31(headerLeft))
28348
28418
  }],
28349
28419
  width: ["w_var", {
28350
- "--width": (0, import_runtime146.maybeCssVar)(__maybeInc31(headerWidth))
28420
+ "--width": (0, import_runtime147.maybeCssVar)(__maybeInc31(headerWidth))
28351
28421
  }],
28352
28422
  zIndex: ["z_var", {
28353
- "--zIndex": (0, import_runtime146.maybeCssVar)(zIndices.pageStickyHeader)
28423
+ "--zIndex": (0, import_runtime147.maybeCssVar)(zIndices.pageStickyHeader)
28354
28424
  }]
28355
28425
  } : {
28356
28426
  position: "fixed",
28357
28427
  left: ["left_var", {
28358
- "--left": (0, import_runtime146.maybeCssVar)(__maybeInc31(headerLeft))
28428
+ "--left": (0, import_runtime147.maybeCssVar)(__maybeInc31(headerLeft))
28359
28429
  }],
28360
28430
  width: ["w_var", {
28361
- "--width": (0, import_runtime146.maybeCssVar)(__maybeInc31(headerWidth))
28431
+ "--width": (0, import_runtime147.maybeCssVar)(__maybeInc31(headerWidth))
28362
28432
  }],
28363
28433
  zIndex: ["z_var", {
28364
- "--zIndex": (0, import_runtime146.maybeCssVar)(zIndices.pageStickyHeader)
28434
+ "--zIndex": (0, import_runtime147.maybeCssVar)(zIndices.pageStickyHeader)
28365
28435
  }],
28366
28436
  transition: "transitionTop"
28367
28437
  };
@@ -28369,17 +28439,17 @@ function PageHeaderLayout(props) {
28369
28439
  top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
28370
28440
  } : void 0;
28371
28441
  const pageHeaderEl = (0, import_react161.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(PageHeader2, { ...pageHeader }), [pageHeader]);
28372
- return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { ...(0, import_runtime146.mergeProps)(void 0, cssVars, {
28442
+ return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)("div", { ...(0, import_runtime147.mergeProps)(void 0, cssVars, {
28373
28443
  display: "df",
28374
28444
  flexDirection: "fdc",
28375
28445
  width: "w100"
28376
28446
  }), ...tid, children: [
28377
- /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { ref: spacerRef, ...(0, import_runtime146.mergeProps)(void 0, {
28447
+ /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { ref: spacerRef, ...(0, import_runtime147.mergeProps)(void 0, {
28378
28448
  height: headerHeight
28379
28449
  }, {
28380
28450
  flexShrink: "fs0",
28381
28451
  width: "w100"
28382
- }), children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime146.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
28452
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime147.mergeProps)(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
28383
28453
  /* @__PURE__ */ (0, import_jsx_runtime230.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
28384
28454
  ] }) });
28385
28455
  }
@@ -28453,20 +28523,22 @@ function WorkflowActions(props) {
28453
28523
  completeLabel,
28454
28524
  onComplete,
28455
28525
  onContinue,
28456
- primaryDisabled
28526
+ primaryDisabled,
28527
+ aiMode = false
28457
28528
  } = props;
28529
+ const primaryVariant = aiMode ? "ai" : "primary";
28458
28530
  return /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)("div", { className: "df aic jcsb sm_w100", children: [
28459
28531
  /* @__PURE__ */ (0, import_jsx_runtime233.jsx)("div", { className: "df aic", children: !isFirstStep && isMobile && /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
28460
28532
  /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)("div", { className: "df aic gap1", children: [
28461
28533
  /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
28462
28534
  onSaveAndExit && /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
28463
- isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button, { label: completeLabel, variant: "primary", onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button, { label: "Continue", variant: "primary", onClick: onContinue, disabled: primaryDisabled })
28535
+ isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Button, { label: "Continue", variant: primaryVariant, onClick: onContinue, disabled: primaryDisabled })
28464
28536
  ] })
28465
28537
  ] });
28466
28538
  }
28467
28539
 
28468
28540
  // src/layouts/WorkflowLayout/WorkflowLayout.tsx
28469
- var import_runtime147 = require("@homebound/truss/runtime");
28541
+ var import_runtime148 = require("@homebound/truss/runtime");
28470
28542
  var import_jsx_runtime234 = require("react/jsx-runtime");
28471
28543
  var __maybeInc32 = (inc) => {
28472
28544
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
@@ -28480,6 +28552,7 @@ function WorkflowLayout(props) {
28480
28552
  onComplete,
28481
28553
  onSaveAndExit,
28482
28554
  isDirty,
28555
+ aiMode = false,
28483
28556
  ...headerProps
28484
28557
  } = props;
28485
28558
  const stepTabs = steps.map((step) => ({
@@ -28509,7 +28582,7 @@ function WorkflowLayout(props) {
28509
28582
  const isFirstStep = currentIndex <= 0;
28510
28583
  const isLastStep = currentIndex === stepTabs.length - 1;
28511
28584
  const activeStep = stepTabs[currentIndex];
28512
- const buttons = /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(stepTabs[currentIndex - 1].value), onCancel: onCancelClick, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !activeStep?.isValid, onContinue: async () => {
28585
+ const buttons = /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(stepTabs[currentIndex - 1].value), onCancel: onCancelClick, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !activeStep?.isValid, aiMode, onContinue: async () => {
28513
28586
  const onContinue = activeStep?.onContinue;
28514
28587
  if (onContinue) {
28515
28588
  const allowed = await onContinue();
@@ -28544,43 +28617,58 @@ function WorkflowLayout(props) {
28544
28617
  }
28545
28618
  );
28546
28619
  return /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(DocumentScrollLayoutProvider, { children: [
28547
- /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)("div", { ...(0, import_runtime147.mergeProps)(void 0, cssVars, {
28620
+ /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)("div", { ...(0, import_runtime148.mergeProps)(void 0, cssVars, {
28548
28621
  display: "df",
28549
28622
  flexDirection: "fdc",
28550
28623
  width: "w100"
28551
28624
  }), ...tid, children: [
28552
- /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime147.trussProps)({
28625
+ /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ref: headerMetricsRef, ...(0, import_runtime148.trussProps)({
28553
28626
  position: "sticky",
28554
28627
  left: "left0",
28555
28628
  width: ["w_var", {
28556
- "--width": (0, import_runtime147.maybeCssVar)(__maybeInc32(headerWidth))
28629
+ "--width": (0, import_runtime148.maybeCssVar)(__maybeInc32(headerWidth))
28557
28630
  }],
28558
28631
  zIndex: ["z_var", {
28559
- "--zIndex": (0, import_runtime147.maybeCssVar)(zIndices.pageStickyHeader)
28632
+ "--zIndex": (0, import_runtime148.maybeCssVar)(zIndices.pageStickyHeader)
28560
28633
  }],
28561
28634
  top: ["top_var", {
28562
- "--top": (0, import_runtime147.maybeCssVar)(__maybeInc32(outerTop))
28635
+ "--top": (0, import_runtime148.maybeCssVar)(__maybeInc32(outerTop))
28563
28636
  }]
28564
28637
  }), ...tid.header, children: headerEl }),
28565
- /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children: activeStep?.content }),
28566
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ...(0, import_runtime147.trussProps)({
28638
+ /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ...(0, import_runtime148.trussProps)({
28639
+ ...{
28640
+ display: "df",
28641
+ flexDirection: "fdc",
28642
+ flexGrow: "fg1",
28643
+ minHeight: "mh0",
28644
+ width: "w100",
28645
+ paddingTop: "pt4 mdandup_pt6"
28646
+ },
28647
+ ...aiMode && {
28648
+ backgroundImage: "aiBackground",
28649
+ minHeight: ["mh_var", {
28650
+ "--minHeight": (0, import_runtime148.maybeCssVar)(documentScrollBodyMinHeight())
28651
+ }]
28652
+ }
28653
+ }), ...tid.body, children: activeStep?.content }),
28654
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ...(0, import_runtime148.trussProps)({
28567
28655
  flexShrink: "fs0",
28568
28656
  width: "w100",
28569
28657
  height: ["h_var", {
28570
28658
  "--height": `${mobileFooterHeightPx}px`
28571
28659
  }]
28572
- }), children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ...(0, import_runtime147.trussProps)({
28660
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ...(0, import_runtime148.trussProps)({
28573
28661
  ...{
28574
28662
  position: "fixed",
28575
28663
  bottom: "bottom0",
28576
28664
  width: ["w_var", {
28577
- "--width": (0, import_runtime147.maybeCssVar)(__maybeInc32(headerWidth))
28665
+ "--width": (0, import_runtime148.maybeCssVar)(__maybeInc32(headerWidth))
28578
28666
  }],
28579
28667
  height: ["h_var", {
28580
28668
  "--height": `${mobileFooterHeightPx}px`
28581
28669
  }],
28582
28670
  zIndex: ["z_var", {
28583
- "--zIndex": (0, import_runtime147.maybeCssVar)(zIndices.pageStickyFooter)
28671
+ "--zIndex": (0, import_runtime148.maybeCssVar)(zIndices.pageStickyFooter)
28584
28672
  }],
28585
28673
  display: "df",
28586
28674
  alignItems: "aic",
@@ -28614,6 +28702,7 @@ function getInitialStep(steps, defaultStep) {
28614
28702
  Accordion,
28615
28703
  AccordionList,
28616
28704
  AiBanner,
28705
+ AiCard,
28617
28706
  AiLoader,
28618
28707
  AiLoadingPanel,
28619
28708
  AiPanel,
@@ -28856,6 +28945,7 @@ function getInitialStep(steps, defaultStep) {
28856
28945
  defaultRenderFn,
28857
28946
  defaultStyle,
28858
28947
  defaultTestId,
28948
+ documentScrollBodyMinHeight,
28859
28949
  documentScrollChromeLeft,
28860
28950
  documentScrollChromeWidth,
28861
28951
  documentScrollContentLeft,