@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 +25 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +25 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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
|
|
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`
|