@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.d.mts CHANGED
@@ -237,14 +237,17 @@ interface menuItemProps {
237
237
  label: string | number;
238
238
  link?: string;
239
239
  end?: boolean;
240
+ email?: string;
240
241
  }
241
242
  interface PopUPMenuProps {
242
243
  menuItems: menuItemProps[];
243
244
  customIcon?: React__default.ReactNode;
244
245
  width?: string;
245
246
  menuDirection?: "top" | "bottom";
247
+ color?: string;
248
+ emailHoverColor?: string | "blue";
246
249
  }
247
- declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection }: PopUPMenuProps): React__default.JSX.Element;
250
+ declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color, emailHoverColor }: PopUPMenuProps): React__default.JSX.Element;
248
251
 
249
252
  interface ConfirmationSnackbarProps {
250
253
  show: boolean;
@@ -255,6 +258,7 @@ interface ConfirmationSnackbarProps {
255
258
  horryAlign?: "left" | "right" | "center";
256
259
  vertyAlign?: "top" | "bottom";
257
260
  durationSb?: number;
261
+ width?: string | number;
258
262
  }
259
263
  declare function WavelengthSnackbar(props: ConfirmationSnackbarProps): React__default.JSX.Element;
260
264
 
package/dist/index.d.ts CHANGED
@@ -237,14 +237,17 @@ interface menuItemProps {
237
237
  label: string | number;
238
238
  link?: string;
239
239
  end?: boolean;
240
+ email?: string;
240
241
  }
241
242
  interface PopUPMenuProps {
242
243
  menuItems: menuItemProps[];
243
244
  customIcon?: React__default.ReactNode;
244
245
  width?: string;
245
246
  menuDirection?: "top" | "bottom";
247
+ color?: string;
248
+ emailHoverColor?: string | "blue";
246
249
  }
247
- declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection }: PopUPMenuProps): React__default.JSX.Element;
250
+ declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color, emailHoverColor }: PopUPMenuProps): React__default.JSX.Element;
248
251
 
249
252
  interface ConfirmationSnackbarProps {
250
253
  show: boolean;
@@ -255,6 +258,7 @@ interface ConfirmationSnackbarProps {
255
258
  horryAlign?: "left" | "right" | "center";
256
259
  vertyAlign?: "top" | "bottom";
257
260
  durationSb?: number;
261
+ width?: string | number;
258
262
  }
259
263
  declare function WavelengthSnackbar(props: ConfirmationSnackbarProps): React__default.JSX.Element;
260
264
 
package/dist/index.js CHANGED
@@ -4438,10 +4438,31 @@ var import_react32 = __toESM(require("react"));
4438
4438
  var import_Menu = __toESM(require("@mui/material/Menu"));
4439
4439
  var import_MenuItem = __toESM(require("@mui/material/MenuItem"));
4440
4440
  var import_Box = __toESM(require("@mui/material/Box"));
4441
+ var import_Slide = __toESM(require("@mui/material/Slide"));
4441
4442
  var import_material12 = require("@mui/material");
4442
4443
  var import_icons_material = require("@mui/icons-material");
4444
+ var import_styled_components = __toESM(require("styled-components"));
4443
4445
  var customStyle = { marginLeft: 16, marginRight: 16, marginTop: 8, marginBottom: 8 };
4444
- function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirection }) {
4446
+ var emailStyle = {
4447
+ marginLeft: 16,
4448
+ marginRight: 16,
4449
+ marginTop: 8,
4450
+ marginBottom: 8
4451
+ };
4452
+ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirection, color: color2, emailHoverColor }) {
4453
+ const NavLink = import_styled_components.default.a``;
4454
+ const Links = (0, import_styled_components.default)(NavLink)`
4455
+ color: inherit;
4456
+ textdecoration: none;
4457
+
4458
+ &:hover,
4459
+ &:focus {
4460
+ color: ${emailHoverColor};
4461
+ }
4462
+ &:active {
4463
+ color: ${emailHoverColor};
4464
+ }
4465
+ `;
4445
4466
  const [anchorEl, setAnchorEl] = import_react32.default.useState(null);
4446
4467
  const open = Boolean(anchorEl);
4447
4468
  let icon;
@@ -4454,7 +4475,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4454
4475
  if (customIcon) {
4455
4476
  icon = customIcon;
4456
4477
  } else {
4457
- icon = /* @__PURE__ */ import_react32.default.createElement(import_icons_material.HelpOutline, { fontSize: "medium" });
4478
+ icon = /* @__PURE__ */ import_react32.default.createElement(import_icons_material.HelpOutline, { fontSize: "medium", sx: { color: color2 } });
4458
4479
  }
4459
4480
  const anchor = menuDirection == "top" || menuDirection == void 0 ? "top" : "bottom";
4460
4481
  const transform = menuDirection == "top" || menuDirection == void 0 ? "bottom" : "top";
@@ -4465,6 +4486,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4465
4486
  sx: { width: width2 },
4466
4487
  onClose: handleClose,
4467
4488
  anchorEl,
4489
+ TransitionComponent: import_Slide.default,
4468
4490
  anchorOrigin: { vertical: anchor, horizontal: "center" },
4469
4491
  transformOrigin: { vertical: transform, horizontal: "center" }
4470
4492
  },
@@ -4482,7 +4504,11 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4482
4504
  if (items.link) {
4483
4505
  return /* @__PURE__ */ import_react32.default.createElement(import_Box.default, { key: index }, /* @__PURE__ */ import_react32.default.createElement(import_MenuItem.default, null, /* @__PURE__ */ import_react32.default.createElement("a", { style: { textDecoration: "!important", color: "inherit" }, href: items.link }, items.label)), /* @__PURE__ */ import_react32.default.createElement(import_material12.Divider, null));
4484
4506
  } else {
4485
- return /* @__PURE__ */ import_react32.default.createElement(import_Box.default, { key: index }, /* @__PURE__ */ import_react32.default.createElement("p", { style: customStyle }, items.label), /* @__PURE__ */ import_react32.default.createElement(import_material12.Divider, null));
4507
+ if (items.email) {
4508
+ return /* @__PURE__ */ import_react32.default.createElement(import_Box.default, { key: index }, /* @__PURE__ */ import_react32.default.createElement(Links, { href: items.email, style: emailStyle }, items.label), /* @__PURE__ */ import_react32.default.createElement(import_material12.Divider, null));
4509
+ } else {
4510
+ return /* @__PURE__ */ import_react32.default.createElement(import_Box.default, { key: index }, /* @__PURE__ */ import_react32.default.createElement("p", { style: customStyle }, items.label), /* @__PURE__ */ import_react32.default.createElement(import_material12.Divider, null));
4511
+ }
4486
4512
  }
4487
4513
  }
4488
4514
  } else if (items.end == void 0 || items.end == false || items.end == null) {
@@ -4498,7 +4524,11 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4498
4524
  if (items.link) {
4499
4525
  return /* @__PURE__ */ import_react32.default.createElement(import_MenuItem.default, { key: index }, items.label);
4500
4526
  } else {
4501
- return /* @__PURE__ */ import_react32.default.createElement("p", { key: index, style: customStyle }, items.label);
4527
+ if (items.email) {
4528
+ return /* @__PURE__ */ import_react32.default.createElement(Links, { key: index, style: emailStyle, href: items.email }, items.label);
4529
+ } else {
4530
+ return /* @__PURE__ */ import_react32.default.createElement("p", { key: index, style: customStyle }, items.label);
4531
+ }
4502
4532
  }
4503
4533
  }
4504
4534
  }
@@ -4509,6 +4539,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon, width: width2, menuDirecti
4509
4539
  // src/components/snackbars/WavelengthSnackbar.tsx
4510
4540
  var import_material13 = require("@mui/material");
4511
4541
  var import_react33 = __toESM(require("react"));
4542
+ var import_Close2 = __toESM(require("@mui/icons-material/Close"));
4512
4543
  function WavelengthSnackbar(props) {
4513
4544
  const { show, setShow } = props;
4514
4545
  const handleClose = () => {
@@ -4533,10 +4564,12 @@ function WavelengthSnackbar(props) {
4533
4564
  style: {
4534
4565
  backgroundColor: props.snackBarColor ? props.snackBarColor : palette2.primary,
4535
4566
  color: props.textColor ? props.textColor : palette2.secondary,
4536
- display: "block",
4537
- textAlign: "center"
4567
+ display: "flex",
4568
+ textAlign: "center",
4569
+ width: props.width
4538
4570
  },
4539
- message: /* @__PURE__ */ import_react33.default.createElement("span", { id: "snackbar" }, props.message ? props.message : "Insert Message Here")
4571
+ message: /* @__PURE__ */ import_react33.default.createElement("span", { id: "snackbar" }, props.message ? props.message : "Insert Message Here"),
4572
+ action: /* @__PURE__ */ import_react33.default.createElement(import_react33.default.Fragment, null, /* @__PURE__ */ import_react33.default.createElement(import_material13.IconButton, { size: "small", "aria-label": "close", color: "inherit", onClick: handleClose }, /* @__PURE__ */ import_react33.default.createElement(import_Close2.default, { fontSize: "small" })))
4540
4573
  }
4541
4574
  )
4542
4575
  );