@wavelengthusaf/components 1.0.8 → 1.0.10

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.mjs CHANGED
@@ -4399,10 +4399,31 @@ import React28 from "react";
4399
4399
  import Menu from "@mui/material/Menu";
4400
4400
  import MenuItem from "@mui/material/MenuItem";
4401
4401
  import Box3 from "@mui/material/Box";
4402
+ import Slide from "@mui/material/Slide";
4402
4403
  import { Divider as Divider2, IconButton as IconButton3 } from "@mui/material";
4403
4404
  import { HelpOutline } from "@mui/icons-material";
4405
+ import styled4 from "styled-components";
4404
4406
  var customStyle = { marginLeft: 16, marginRight: 16, marginTop: 8, marginBottom: 8 };
4405
- function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirection }) {
4407
+ var emailStyle = {
4408
+ marginLeft: 16,
4409
+ marginRight: 16,
4410
+ marginTop: 8,
4411
+ marginBottom: 8
4412
+ };
4413
+ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirection, color: color2, emailHoverColor }) {
4414
+ const NavLink = styled4.a``;
4415
+ const Links = styled4(NavLink)`
4416
+ color: inherit;
4417
+ textdecoration: none;
4418
+
4419
+ &:hover,
4420
+ &:focus {
4421
+ color: ${emailHoverColor};
4422
+ }
4423
+ &:active {
4424
+ color: ${emailHoverColor};
4425
+ }
4426
+ `;
4406
4427
  const [anchorEl, setAnchorEl] = React28.useState(null);
4407
4428
  const open = Boolean(anchorEl);
4408
4429
  let icon;
@@ -4415,7 +4436,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4415
4436
  if (customIcon) {
4416
4437
  icon = customIcon;
4417
4438
  } else {
4418
- icon = /* @__PURE__ */ React28.createElement(HelpOutline, { fontSize: "medium" });
4439
+ icon = /* @__PURE__ */ React28.createElement(HelpOutline, { fontSize: "medium", sx: { color: color2 } });
4419
4440
  }
4420
4441
  const anchor = menuDirection == "top" || menuDirection == void 0 ? "top" : "bottom";
4421
4442
  const transform = menuDirection == "top" || menuDirection == void 0 ? "bottom" : "top";
@@ -4426,6 +4447,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4426
4447
  sx: { width: width2 },
4427
4448
  onClose: handleClose,
4428
4449
  anchorEl,
4450
+ TransitionComponent: Slide,
4429
4451
  anchorOrigin: { vertical: anchor, horizontal: "center" },
4430
4452
  transformOrigin: { vertical: transform, horizontal: "center" }
4431
4453
  },
@@ -4443,7 +4465,11 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4443
4465
  if (items.link) {
4444
4466
  return /* @__PURE__ */ React28.createElement(Box3, { key: index }, /* @__PURE__ */ React28.createElement(MenuItem, null, /* @__PURE__ */ React28.createElement("a", { style: { textDecoration: "!important", color: "inherit" }, href: items.link }, items.label)), /* @__PURE__ */ React28.createElement(Divider2, null));
4445
4467
  } else {
4446
- return /* @__PURE__ */ React28.createElement(Box3, { key: index }, /* @__PURE__ */ React28.createElement("p", { style: customStyle }, items.label), /* @__PURE__ */ React28.createElement(Divider2, null));
4468
+ if (items.email) {
4469
+ return /* @__PURE__ */ React28.createElement(Box3, { key: index }, /* @__PURE__ */ React28.createElement(Links, { href: items.email, style: emailStyle }, items.label), /* @__PURE__ */ React28.createElement(Divider2, null));
4470
+ } else {
4471
+ return /* @__PURE__ */ React28.createElement(Box3, { key: index }, /* @__PURE__ */ React28.createElement("p", { style: customStyle }, items.label), /* @__PURE__ */ React28.createElement(Divider2, null));
4472
+ }
4447
4473
  }
4448
4474
  }
4449
4475
  } else if (items.end == void 0 || items.end == false || items.end == null) {
@@ -4459,7 +4485,11 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4459
4485
  if (items.link) {
4460
4486
  return /* @__PURE__ */ React28.createElement(MenuItem, { key: index }, items.label);
4461
4487
  } else {
4462
- return /* @__PURE__ */ React28.createElement("p", { key: index, style: customStyle }, items.label);
4488
+ if (items.email) {
4489
+ return /* @__PURE__ */ React28.createElement(Links, { key: index, style: emailStyle, href: items.email }, items.label);
4490
+ } else {
4491
+ return /* @__PURE__ */ React28.createElement("p", { key: index, style: customStyle }, items.label);
4492
+ }
4463
4493
  }
4464
4494
  }
4465
4495
  }
@@ -4468,8 +4498,9 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4468
4498
  }
4469
4499
 
4470
4500
  // src/components/snackbars/WavelengthSnackbar.tsx
4471
- import { Snackbar, SnackbarContent } from "@mui/material";
4501
+ import { IconButton as IconButton4, Snackbar, SnackbarContent } from "@mui/material";
4472
4502
  import React29 from "react";
4503
+ import CloseIcon2 from "@mui/icons-material/Close";
4473
4504
  function WavelengthSnackbar(props) {
4474
4505
  const { show, setShow } = props;
4475
4506
  const handleClose = () => {
@@ -4494,10 +4525,12 @@ function WavelengthSnackbar(props) {
4494
4525
  style: {
4495
4526
  backgroundColor: props.snackBarColor ? props.snackBarColor : palette2.primary,
4496
4527
  color: props.textColor ? props.textColor : palette2.secondary,
4497
- display: "block",
4498
- textAlign: "center"
4528
+ display: "flex",
4529
+ textAlign: "center",
4530
+ width: props.width
4499
4531
  },
4500
- message: /* @__PURE__ */ React29.createElement("span", { id: "snackbar" }, props.message ? props.message : "Insert Message Here")
4532
+ message: /* @__PURE__ */ React29.createElement("span", { id: "snackbar" }, props.message ? props.message : "Insert Message Here"),
4533
+ action: /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(IconButton4, { size: "small", "aria-label": "close", color: "inherit", onClick: handleClose }, /* @__PURE__ */ React29.createElement(CloseIcon2, { fontSize: "small" })))
4501
4534
  }
4502
4535
  )
4503
4536
  );