@wavelengthusaf/components 1.0.9 → 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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -4
package/dist/index.d.mts
CHANGED
|
@@ -237,6 +237,7 @@ 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[];
|
|
@@ -244,8 +245,9 @@ interface PopUPMenuProps {
|
|
|
244
245
|
width?: string;
|
|
245
246
|
menuDirection?: "top" | "bottom";
|
|
246
247
|
color?: string;
|
|
248
|
+
emailHoverColor?: string | "blue";
|
|
247
249
|
}
|
|
248
|
-
declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color }: PopUPMenuProps): React__default.JSX.Element;
|
|
250
|
+
declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color, emailHoverColor }: PopUPMenuProps): React__default.JSX.Element;
|
|
249
251
|
|
|
250
252
|
interface ConfirmationSnackbarProps {
|
|
251
253
|
show: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -237,6 +237,7 @@ 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[];
|
|
@@ -244,8 +245,9 @@ interface PopUPMenuProps {
|
|
|
244
245
|
width?: string;
|
|
245
246
|
menuDirection?: "top" | "bottom";
|
|
246
247
|
color?: string;
|
|
248
|
+
emailHoverColor?: string | "blue";
|
|
247
249
|
}
|
|
248
|
-
declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color }: PopUPMenuProps): React__default.JSX.Element;
|
|
250
|
+
declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color, emailHoverColor }: PopUPMenuProps): React__default.JSX.Element;
|
|
249
251
|
|
|
250
252
|
interface ConfirmationSnackbarProps {
|
|
251
253
|
show: boolean;
|
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
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
}
|