@wavelengthusaf/components 2.9.2 → 2.9.3
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/README.md +10 -1
- package/dist/cjs/index.cjs +105 -75
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +7 -2
- package/dist/esm/index.d.ts +7 -2
- package/dist/esm/index.js +106 -76
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.cts
CHANGED
|
@@ -294,14 +294,19 @@ interface WavelengthAlertProps {
|
|
|
294
294
|
id?: string;
|
|
295
295
|
height?: string;
|
|
296
296
|
width?: string;
|
|
297
|
+
variant?: "caveman" | "basic" | "civilized";
|
|
297
298
|
backgroundColor?: string;
|
|
298
|
-
|
|
299
|
+
alertType?: string;
|
|
299
300
|
alertDescription?: string;
|
|
300
301
|
datatestid?: string;
|
|
301
302
|
viewed?: boolean;
|
|
303
|
+
timeStamp?: string;
|
|
304
|
+
appName?: string;
|
|
305
|
+
url?: string;
|
|
306
|
+
initiator?: string;
|
|
302
307
|
onClose?: () => void;
|
|
303
308
|
}
|
|
304
|
-
declare function WavelengthAlert({ viewed, width, height, backgroundColor,
|
|
309
|
+
declare function WavelengthAlert({ viewed, width, height, backgroundColor, appName, alertType, alertDescription, datatestid, variant, timeStamp, url, initiator, id, onClose, }: WavelengthAlertProps): react_jsx_runtime.JSX.Element;
|
|
305
310
|
|
|
306
311
|
interface WavelengthFooterProps {
|
|
307
312
|
text?: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -294,14 +294,19 @@ interface WavelengthAlertProps {
|
|
|
294
294
|
id?: string;
|
|
295
295
|
height?: string;
|
|
296
296
|
width?: string;
|
|
297
|
+
variant?: "caveman" | "basic" | "civilized";
|
|
297
298
|
backgroundColor?: string;
|
|
298
|
-
|
|
299
|
+
alertType?: string;
|
|
299
300
|
alertDescription?: string;
|
|
300
301
|
datatestid?: string;
|
|
301
302
|
viewed?: boolean;
|
|
303
|
+
timeStamp?: string;
|
|
304
|
+
appName?: string;
|
|
305
|
+
url?: string;
|
|
306
|
+
initiator?: string;
|
|
302
307
|
onClose?: () => void;
|
|
303
308
|
}
|
|
304
|
-
declare function WavelengthAlert({ viewed, width, height, backgroundColor,
|
|
309
|
+
declare function WavelengthAlert({ viewed, width, height, backgroundColor, appName, alertType, alertDescription, datatestid, variant, timeStamp, url, initiator, id, onClose, }: WavelengthAlertProps): react_jsx_runtime.JSX.Element;
|
|
305
310
|
|
|
306
311
|
interface WavelengthFooterProps {
|
|
307
312
|
text?: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -5407,93 +5407,123 @@ function WavelengthAccessAlert({
|
|
|
5407
5407
|
|
|
5408
5408
|
// src/components/PageComponents/WavelengthAlert.tsx
|
|
5409
5409
|
import Close from "@mui/icons-material/Close";
|
|
5410
|
-
import { IconButton as IconButton3 } from "@mui/material";
|
|
5410
|
+
import { IconButton as IconButton3, SvgIcon } from "@mui/material";
|
|
5411
5411
|
import NotificationsIcon from "@mui/icons-material/Notifications";
|
|
5412
5412
|
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5413
5413
|
function WavelengthAlert({
|
|
5414
5414
|
viewed,
|
|
5415
5415
|
width: width2 = "320px",
|
|
5416
|
-
height: height2
|
|
5417
|
-
backgroundColor: backgroundColor2 = "
|
|
5418
|
-
|
|
5416
|
+
height: height2,
|
|
5417
|
+
backgroundColor: backgroundColor2 = "#FBFBFB",
|
|
5418
|
+
appName,
|
|
5419
|
+
alertType = "Access Requested",
|
|
5419
5420
|
alertDescription = "Keenan Ray has requested to be added as a User to your App",
|
|
5420
5421
|
datatestid,
|
|
5422
|
+
variant,
|
|
5423
|
+
timeStamp,
|
|
5424
|
+
url,
|
|
5425
|
+
initiator,
|
|
5421
5426
|
id,
|
|
5422
5427
|
onClose
|
|
5423
5428
|
}) {
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5429
|
+
const viewedStyles = viewed ? {
|
|
5430
|
+
backgroundColor: "#DFDCDC",
|
|
5431
|
+
border: "1px solid #A0A2A3",
|
|
5432
|
+
iconColor: "#A0A2A3"
|
|
5433
|
+
} : {
|
|
5434
|
+
backgroundColor: backgroundColor2,
|
|
5435
|
+
border: "1px solid rgba(2, 136, 209, 1)",
|
|
5436
|
+
iconColor: "rgba(2, 136, 209, 1)"
|
|
5437
|
+
};
|
|
5438
|
+
const baseContainerStyle = {
|
|
5439
|
+
width: width2,
|
|
5440
|
+
height: height2 || "fit-content",
|
|
5441
|
+
backgroundColor: viewedStyles.backgroundColor,
|
|
5442
|
+
fontFamily: "Roboto, sans-serif",
|
|
5443
|
+
border: viewedStyles.border,
|
|
5444
|
+
borderRadius: "4px",
|
|
5445
|
+
display: "flex",
|
|
5446
|
+
flexDirection: "row",
|
|
5447
|
+
boxSizing: "border-box",
|
|
5448
|
+
alignItems: "flex-start",
|
|
5449
|
+
padding: "12px 16px 10px 16px",
|
|
5450
|
+
color: "#1E4620",
|
|
5451
|
+
position: variant === "civilized" ? "relative" : void 0
|
|
5452
|
+
};
|
|
5453
|
+
const iconStyle = {
|
|
5454
|
+
width: "24px",
|
|
5455
|
+
padding: "0px",
|
|
5456
|
+
color: viewedStyles.iconColor
|
|
5457
|
+
};
|
|
5458
|
+
if (variant === "caveman") {
|
|
5459
|
+
return /* @__PURE__ */ jsxs15("div", { role: "alert", id, "data-testid": datatestid, style: baseContainerStyle, children: [
|
|
5460
|
+
/* @__PURE__ */ jsx20(NotificationsIcon, { sx: iconStyle }),
|
|
5461
|
+
/* @__PURE__ */ jsxs15("a", { href: url, style: { display: "flex", flexDirection: "column", gap: "4px", width: "250px", marginLeft: "12px", textDecoration: "none", color: baseContainerStyle.color }, children: [
|
|
5462
|
+
/* @__PURE__ */ jsx20("label", { style: { fontSize: "1rem", lineHeight: "150%", letterSpacing: "0.15px", fontWeight: 550 }, children: timeStamp }),
|
|
5463
|
+
/* @__PURE__ */ jsx20(
|
|
5464
|
+
"div",
|
|
5465
|
+
{
|
|
5466
|
+
style: {
|
|
5467
|
+
fontSize: ".875rem",
|
|
5468
|
+
fontWeight: 400,
|
|
5469
|
+
lineHeight: "143%",
|
|
5470
|
+
display: "-webkit-box",
|
|
5471
|
+
WebkitLineClamp: 2,
|
|
5472
|
+
WebkitBoxOrient: "vertical",
|
|
5473
|
+
overflow: "hidden",
|
|
5474
|
+
textOverflow: "ellipsis"
|
|
5475
|
+
},
|
|
5476
|
+
children: alertType
|
|
5477
|
+
}
|
|
5478
|
+
)
|
|
5479
|
+
] }),
|
|
5480
|
+
onClose && /* @__PURE__ */ jsx20(IconButton3, { sx: { padding: "0px", width: "20px" }, onClick: onClose, children: /* @__PURE__ */ jsx20(Close, {}) })
|
|
5481
|
+
] });
|
|
5482
|
+
} else if (variant === "basic") {
|
|
5483
|
+
return /* @__PURE__ */ jsxs15("div", { role: "alert", id, "data-testid": datatestid, style: baseContainerStyle, children: [
|
|
5484
|
+
/* @__PURE__ */ jsx20(NotificationsIcon, { sx: iconStyle }),
|
|
5485
|
+
/* @__PURE__ */ jsxs15("a", { href: url, style: { display: "flex", flexDirection: "column", gap: "4px", width: "250px", marginLeft: "12px", textDecoration: "none", color: baseContainerStyle.color }, children: [
|
|
5486
|
+
/* @__PURE__ */ jsx20("label", { style: { fontSize: "14px", lineHeight: "150%", letterSpacing: "0.15px", fontWeight: 500 }, children: timeStamp }),
|
|
5487
|
+
/* @__PURE__ */ jsx20("div", { style: { fontSize: "16px", fontWeight: 550, lineHeight: "24px" }, children: alertType }),
|
|
5488
|
+
/* @__PURE__ */ jsxs15("div", { style: { fontSize: "14px", lineHeight: "20px", fontWeight: 400 }, children: [
|
|
5489
|
+
"App: ",
|
|
5490
|
+
appName
|
|
5491
|
+
] })
|
|
5492
|
+
] }),
|
|
5493
|
+
onClose && /* @__PURE__ */ jsx20(IconButton3, { sx: { padding: "0px", width: "20px" }, onClick: onClose, children: /* @__PURE__ */ jsx20(Close, {}) })
|
|
5494
|
+
] });
|
|
5461
5495
|
} else {
|
|
5462
|
-
return /* @__PURE__ */ jsxs15(
|
|
5463
|
-
|
|
5464
|
-
{
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
"
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
onClose && /* @__PURE__ */ jsx20(IconButton3, { sx: { padding: "0px", width: "20px" }, onClick: onClose, children: /* @__PURE__ */ jsx20(Close, {}) })
|
|
5494
|
-
]
|
|
5495
|
-
}
|
|
5496
|
-
);
|
|
5496
|
+
return /* @__PURE__ */ jsxs15("div", { role: "alert", id, "data-testid": datatestid, style: baseContainerStyle, children: [
|
|
5497
|
+
/* @__PURE__ */ jsx20(NotificationsIcon, { sx: iconStyle }),
|
|
5498
|
+
/* @__PURE__ */ jsxs15("a", { href: url, style: { display: "flex", flexDirection: "column", gap: "7px", width: "250px", marginLeft: "12px", textDecoration: "none", color: baseContainerStyle.color }, children: [
|
|
5499
|
+
/* @__PURE__ */ jsx20("label", { style: { fontSize: "16px", lineHeight: "24px", letterSpacing: "0.15px", fontWeight: 550 }, children: alertType }),
|
|
5500
|
+
/* @__PURE__ */ jsx20("div", { style: { fontSize: "14px", fontWeight: 400, lineHeight: "20px", letterSpacing: "0.25px", width: "200px" }, children: alertDescription }),
|
|
5501
|
+
/* @__PURE__ */ jsxs15("div", { style: { fontSize: "14px", lineHeight: "20px", fontWeight: 400 }, children: [
|
|
5502
|
+
/* @__PURE__ */ jsx20("span", { style: { fontWeight: 550 }, children: "Initiator: " }),
|
|
5503
|
+
" ",
|
|
5504
|
+
initiator
|
|
5505
|
+
] })
|
|
5506
|
+
] }),
|
|
5507
|
+
/* @__PURE__ */ jsxs15(
|
|
5508
|
+
"div",
|
|
5509
|
+
{
|
|
5510
|
+
style: {
|
|
5511
|
+
textAlign: "center",
|
|
5512
|
+
display: "flex",
|
|
5513
|
+
flexDirection: "column",
|
|
5514
|
+
position: "absolute",
|
|
5515
|
+
right: "15px",
|
|
5516
|
+
bottom: "12px"
|
|
5517
|
+
},
|
|
5518
|
+
className: "icon-btn-container",
|
|
5519
|
+
children: [
|
|
5520
|
+
/* @__PURE__ */ jsx20(IconButton3, { sx: { padding: "3px" }, onClick: onClose, children: /* @__PURE__ */ jsx20(SvgIcon, { children: /* @__PURE__ */ jsx20("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "#4E4E4F", children: /* @__PURE__ */ jsx20("path", { d: "M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z" }) }) }) }),
|
|
5521
|
+
/* @__PURE__ */ jsx20("div", { style: { fontSize: "11px" }, children: "Dismiss" })
|
|
5522
|
+
]
|
|
5523
|
+
}
|
|
5524
|
+
),
|
|
5525
|
+
/* @__PURE__ */ jsx20("div", { style: { top: "6px", right: "15px", position: "absolute", fontSize: "11px", color: "#797979" }, children: timeStamp })
|
|
5526
|
+
] });
|
|
5497
5527
|
}
|
|
5498
5528
|
}
|
|
5499
5529
|
|