@homebound/beam 3.31.1 → 3.32.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
@@ -4894,7 +4894,14 @@ var Icons = {
4894
4894
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 4.929L11.293 5.636L12.707 7.05L13.414 6.343C14.583 5.176 16.486 5.174 17.657 6.343C18.826 7.513 18.826 9.416 17.657 10.586L15.535 12.707C14.402 13.84 12.426 13.84 11.293 12.707L10.586 12L9.172 13.414L9.879 14.121C10.822 15.065 12.078 15.586 13.414 15.586C14.75 15.586 16.006 15.065 16.949 14.121L19.071 12C21.019 10.051 21.019 6.878 19.071 4.929C17.121 2.979 13.948 2.98 12 4.929Z" })
4895
4895
  ] }),
4896
4896
  // FIXME: This is not an "official" design approved icon. It should be replaced
4897
- unlink: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { "fill-rule": "evenodd", d: "M5.63603897,5.63603897 L11.289,11.289 L13.4213562,9.15728753 C13.8138529,8.76479084 14.4502158,8.76479084 14.8427125,9.15728753 C15.2352092,9.54978421 15.2352092,10.1861471 14.8427125,10.5786438 L12.71,12.71 L18.363961,18.363961 C18.7544853,18.7544853 18.7544853,19.3876503 18.363961,19.7781746 C17.9734367,20.1686989 17.3402718,20.1686989 16.9497475,19.7781746 L14.139,16.968 L10.5786438,20.5281374 C8.61616033,22.4906209 5.43434601,22.4906209 3.47186258,20.5281374 C1.56102344,18.6172983 1.5107382,15.5504592 3.32100685,13.5787779 L3.47186258,13.4213562 L7.032,9.861 L4.22182541,7.05025253 C3.83130112,6.65972824 3.83130112,6.02656326 4.22182541,5.63603897 C4.6123497,5.24551468 5.24551468,5.24551468 5.63603897,5.63603897 Z M8.453,11.282 L4.89321881,14.8427125 C3.71572875,16.0202025 3.71572875,17.9292911 4.89321881,19.1067812 C6.02865566,20.242218 7.84436716,20.2827693 9.02839505,19.2284351 L9.15728753,19.1067812 L12.717,15.546 L11.296,14.125 L10.5786438,14.8427125 C10.1861471,15.2352092 9.54978421,15.2352092 9.15728753,14.8427125 C8.76479084,14.4502158 8.76479084,13.8138529 9.15728753,13.4213562 L9.875,12.704 L8.453,11.282 Z M20.5281374,3.47186258 C22.4906209,5.43434601 22.4906209,8.61616033 20.5281374,10.5786438 L17.6854249,13.4213562 C17.2929283,13.8138529 16.6565654,13.8138529 16.2640687,13.4213562 C15.871572,13.0288596 15.871572,12.3924967 16.2640687,12 L19.1067812,9.15728753 C20.2842712,7.97979746 20.2842712,6.07070887 19.1067812,4.89321881 C17.9292911,3.71572875 16.0202025,3.71572875 14.8427125,4.89321881 L12,7.73593129 C11.6075033,8.12842798 10.9711404,8.12842798 10.5786438,7.73593129 C10.1861471,7.3434346 10.1861471,6.70707174 10.5786438,6.31457505 L13.4213562,3.47186258 C15.3838397,1.50937914 18.565654,1.50937914 20.5281374,3.47186258 Z M12.7071068,9.87867966 L11.2928932,11.2928932 L12.7071068,12.7071068 L14.1213203,11.2928932 L12.7071068,9.87867966 Z" }) }),
4897
+ unlink: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
4898
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8.465 11.293C9.598 10.16 11.574 10.16 12.707 11.293L13.414 12L14.828 10.586L14.121 9.879C13.178 8.935 11.922 8.414 10.586 8.414C9.25 8.414 7.994 8.935 7.051 9.879L4.929 12C2.981 13.949 2.981 17.122 4.929 19.071C5.904 20.046 7.184 20.533 8.464 20.533C9.745 20.533 11.026 20.046 12 19.071L12.707 18.364L11.293 16.95L10.586 17.657C9.416 18.824 7.513 18.826 6.343 17.657C5.174 16.487 5.174 14.584 6.343 13.414L8.465 11.293Z" }),
4899
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 4.92898L11.293 5.63598L12.707 7.04998L13.414 6.34298C14.583 5.17598 16.486 5.17398 17.657 6.34298C18.826 7.51298 18.826 9.41598 17.657 10.586L15.535 12.707C14.402 13.84 12.426 13.84 11.293 12.707L10.586 12L9.172 13.414L9.879 14.121C10.822 15.065 12.078 15.586 13.414 15.586C14.75 15.586 16.006 15.065 16.949 14.121L19.071 12C21.019 10.051 21.019 6.87798 19.071 4.92898C17.121 2.97898 13.948 2.97998 12 4.92898Z" }),
4900
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1 7L5 7V9L1 9L1 7Z" }),
4901
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M23.5 17H19.5V15H23.5V17Z" }),
4902
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M15 23V19H17V23H15Z" }),
4903
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 1V5H7V1H9Z" })
4904
+ ] }),
4898
4905
  linkExternal: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
4899
4906
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M13 3L16.293 6.293L9.29297 13.293L10.707 14.707L17.707 7.707L21 11V3H13Z" }),
4900
4907
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19 19H5V5H12L10 3H5C3.897 3 3 3.897 3 5V19C3 20.103 3.897 21 5 21H19C20.103 21 21 20.103 21 19V14L19 12V19Z" })
@@ -22298,10 +22305,11 @@ function EnvironmentBanner(props) {
22298
22305
  const {
22299
22306
  env,
22300
22307
  impersonating,
22308
+ showProdWarning = false,
22301
22309
  ...others
22302
22310
  } = props;
22303
22311
  const tid = useTestIds(others, "environmentBanner");
22304
- if (!shouldShowEnvironmentBanner(env, impersonating)) {
22312
+ if (!shouldShowEnvironmentBanner(env, impersonating, showProdWarning)) {
22305
22313
  return null;
22306
22314
  }
22307
22315
  const {
@@ -22309,7 +22317,7 @@ function EnvironmentBanner(props) {
22309
22317
  badgeLabel,
22310
22318
  message,
22311
22319
  tooltip
22312
- } = getEnvironmentBannerConfig(env, impersonating);
22320
+ } = getEnvironmentBannerConfig(env, impersonating, showProdWarning);
22313
22321
  const bgColorVar = maybeCssVar(bgColor);
22314
22322
  return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("div", { ...(0, import_runtime90.trussProps)({
22315
22323
  flexShrink: "fs0",
@@ -22352,7 +22360,7 @@ function EnvironmentBanner(props) {
22352
22360
  ] })
22353
22361
  ] }),
22354
22362
  impersonating != null && /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("span", { className: "df aic gap2 fw6 fz_12px lh_16px white fs0", ...tid.impersonating, children: [
22355
- env !== "prod" && /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("span", { children: [
22363
+ (env !== "prod" || showProdWarning) && /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("span", { children: [
22356
22364
  /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("span", { className: "dn mdandup_dib", children: "Impersonating \xA0" }),
22357
22365
  impersonating.name
22358
22366
  ] }),
@@ -22361,10 +22369,10 @@ function EnvironmentBanner(props) {
22361
22369
  ] })
22362
22370
  ] });
22363
22371
  }
22364
- function shouldShowEnvironmentBanner(env, impersonating) {
22365
- return env === "dev" || env === "qa" || env === "local-prod" || env === "prod" && isDefined(impersonating);
22372
+ function shouldShowEnvironmentBanner(env, impersonating, showProdWarning) {
22373
+ return env === "dev" || env === "qa" || env === "local-prod" || env === "prod" && (isDefined(impersonating) || showProdWarning);
22366
22374
  }
22367
- function getEnvironmentBannerConfig(env, impersonating) {
22375
+ function getEnvironmentBannerConfig(env, impersonating, showProdWarning) {
22368
22376
  switch (env) {
22369
22377
  case "dev":
22370
22378
  return {
@@ -22380,9 +22388,16 @@ function getEnvironmentBannerConfig(env, impersonating) {
22380
22388
  message: "You are in the QA Environment",
22381
22389
  tooltip: "You are in the QA Environment. Any changes here will not be reflected in live production data."
22382
22390
  };
22383
- // Prod env banner should only be displayed when impersonating
22391
+ // Prod banner shows when impersonating or when `showProdWarning` is set. The prod warning takes precedence:
22392
+ // it reuses the red local-prod fill for "live prod data" urgency, while impersonation (if any) still shows
22393
+ // on the right. Impersonation alone keeps its own prod fill and copy.
22384
22394
  case "prod":
22385
- return {
22395
+ return showProdWarning ? {
22396
+ bgColor: "--b-env-brand-local-prod" /* EnvBrandLocalProd */,
22397
+ badgeLabel: "PROD",
22398
+ message: "You are in the Production Environment",
22399
+ tooltip: "You are in the Production Environment. Any changes here WILL be reflected in live production data."
22400
+ } : {
22386
22401
  bgColor: "--b-env-brand-prod" /* EnvBrandProd */,
22387
22402
  badgeLabel: "PROD",
22388
22403
  message: `You are impersonating ${impersonating?.name}`,
@@ -24605,7 +24620,7 @@ function EnvironmentBannerLayout(props) {
24605
24620
  children
24606
24621
  } = props;
24607
24622
  const tid = useTestIds(props, "environmentBannerLayout");
24608
- const showBanner = environmentBanner != null && shouldShowEnvironmentBanner(environmentBanner.env, environmentBanner.impersonating);
24623
+ const showBanner = environmentBanner != null && shouldShowEnvironmentBanner(environmentBanner.env, environmentBanner.impersonating, environmentBanner.showProdWarning ?? false);
24609
24624
  const bannerHeightPx = showBanner ? environmentBannerSizePx : 0;
24610
24625
  const style = {
24611
24626
  [beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`