@wavelengthusaf/components 1.2.1 → 1.2.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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -313,7 +313,7 @@ interface StandardSnackbarProps {
|
|
|
313
313
|
type: "success" | "error" | "disabled";
|
|
314
314
|
show: boolean;
|
|
315
315
|
icon?: ReactNode;
|
|
316
|
-
|
|
316
|
+
toggleShow: (on: boolean) => void;
|
|
317
317
|
horryAlign?: "left" | "right" | "center";
|
|
318
318
|
vertyAlign?: "top" | "bottom";
|
|
319
319
|
durationSb?: number;
|
|
@@ -321,6 +321,6 @@ interface StandardSnackbarProps {
|
|
|
321
321
|
message?: string | ReactNode;
|
|
322
322
|
customVertyAlign?: string;
|
|
323
323
|
}
|
|
324
|
-
declare
|
|
324
|
+
declare function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width, message, customVertyAlign, toggleShow }: StandardSnackbarProps): React__default.JSX.Element;
|
|
325
325
|
|
|
326
326
|
export { AceOfSpadesComponent, AppLogo, ArrowIcon, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, NotAvailablePage, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, type ThemeProperties, WavelengthAppTheme, WavelengthAutocomplete, WavelengthBannerHeader, WavelengthBox, WavelengthButton, WavelengthConfirmationModal, WavelengthContentModal, WavelengthContentPlaceholder, WavelengthDropdownButton, WavelengthExampleComponent, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthSearch, WavelengthSideBar, WavelengthSnackbar, WavelengthStandardSnackbar, WavelengthTitleBar, add, concat, findBestStringMatch, type menuItemProps, useThemeContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -313,7 +313,7 @@ interface StandardSnackbarProps {
|
|
|
313
313
|
type: "success" | "error" | "disabled";
|
|
314
314
|
show: boolean;
|
|
315
315
|
icon?: ReactNode;
|
|
316
|
-
|
|
316
|
+
toggleShow: (on: boolean) => void;
|
|
317
317
|
horryAlign?: "left" | "right" | "center";
|
|
318
318
|
vertyAlign?: "top" | "bottom";
|
|
319
319
|
durationSb?: number;
|
|
@@ -321,6 +321,6 @@ interface StandardSnackbarProps {
|
|
|
321
321
|
message?: string | ReactNode;
|
|
322
322
|
customVertyAlign?: string;
|
|
323
323
|
}
|
|
324
|
-
declare
|
|
324
|
+
declare function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width, message, customVertyAlign, toggleShow }: StandardSnackbarProps): React__default.JSX.Element;
|
|
325
325
|
|
|
326
326
|
export { AceOfSpadesComponent, AppLogo, ArrowIcon, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, NotAvailablePage, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, type ThemeProperties, WavelengthAppTheme, WavelengthAutocomplete, WavelengthBannerHeader, WavelengthBox, WavelengthButton, WavelengthConfirmationModal, WavelengthContentModal, WavelengthContentPlaceholder, WavelengthDropdownButton, WavelengthExampleComponent, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthSearch, WavelengthSideBar, WavelengthSnackbar, WavelengthStandardSnackbar, WavelengthTitleBar, add, concat, findBestStringMatch, type menuItemProps, useThemeContext };
|
package/dist/index.js
CHANGED
|
@@ -5036,32 +5036,30 @@ var import_Snackbar = __toESM(require("@mui/material/Snackbar"));
|
|
|
5036
5036
|
var import_IconButton2 = __toESM(require("@mui/material/IconButton"));
|
|
5037
5037
|
var import_Close3 = __toESM(require("@mui/icons-material/Close"));
|
|
5038
5038
|
var import_SnackbarContent = __toESM(require("@mui/material/SnackbarContent"));
|
|
5039
|
-
|
|
5040
|
-
let show = props.show;
|
|
5041
|
-
const setShow = props.setShow;
|
|
5039
|
+
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow }) {
|
|
5042
5040
|
const handleClose = () => {
|
|
5043
|
-
|
|
5041
|
+
toggleShow(false);
|
|
5044
5042
|
};
|
|
5045
|
-
const durationMs =
|
|
5043
|
+
const durationMs = durationSb ? durationSb * 1e3 : 4e3;
|
|
5046
5044
|
let bgColor = "";
|
|
5047
|
-
if (
|
|
5045
|
+
if (type == "success") {
|
|
5048
5046
|
bgColor = "#25ab21";
|
|
5049
|
-
} else if (
|
|
5047
|
+
} else if (type == "error") {
|
|
5050
5048
|
bgColor = "#FF4646";
|
|
5051
|
-
} else if (
|
|
5049
|
+
} else if (type == "disabled") {
|
|
5052
5050
|
bgColor = "#737373";
|
|
5053
5051
|
}
|
|
5054
|
-
const sIcon =
|
|
5052
|
+
const sIcon = icon ? icon : "";
|
|
5055
5053
|
return /* @__PURE__ */ import_react35.default.createElement(
|
|
5056
5054
|
import_Snackbar.default,
|
|
5057
5055
|
{
|
|
5058
|
-
sx: { marginTop:
|
|
5056
|
+
sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
|
|
5059
5057
|
open: show,
|
|
5060
5058
|
onClose: handleClose,
|
|
5061
5059
|
autoHideDuration: durationMs,
|
|
5062
5060
|
anchorOrigin: {
|
|
5063
|
-
vertical:
|
|
5064
|
-
horizontal:
|
|
5061
|
+
vertical: vertyAlign ? vertyAlign : "top",
|
|
5062
|
+
horizontal: horryAlign ? horryAlign : "center"
|
|
5065
5063
|
}
|
|
5066
5064
|
},
|
|
5067
5065
|
/* @__PURE__ */ import_react35.default.createElement(
|
|
@@ -5079,16 +5077,16 @@ var WavelengthStandardSnackbar = (props) => {
|
|
|
5079
5077
|
style: {
|
|
5080
5078
|
display: "grid",
|
|
5081
5079
|
gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr",
|
|
5082
|
-
width:
|
|
5080
|
+
width: width2
|
|
5083
5081
|
}
|
|
5084
5082
|
},
|
|
5085
|
-
/* @__PURE__ */ import_react35.default.createElement("div", { style: { marginTop: 4, gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, id: "snackbar" }, /* @__PURE__ */ import_react35.default.createElement("div", null, sIcon), /* @__PURE__ */ import_react35.default.createElement("div", { style: { fontSize: "1rem", marginLeft: "10px" } },
|
|
5086
|
-
/* @__PURE__ */ import_react35.default.createElement("div", { style: { gridColumnStart: 6 } }, " ", /* @__PURE__ */ import_react35.default.createElement(import_IconButton2.default, { size: "small", "aria-label": "close", color: "inherit"
|
|
5083
|
+
/* @__PURE__ */ import_react35.default.createElement("div", { style: { marginTop: 4, gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, id: "snackbar" }, /* @__PURE__ */ import_react35.default.createElement("div", null, sIcon), /* @__PURE__ */ import_react35.default.createElement("div", { style: { fontSize: "1rem", marginLeft: "10px" } }, message ? message : "Insert Message Here")),
|
|
5084
|
+
/* @__PURE__ */ import_react35.default.createElement("div", { style: { gridColumnStart: 6 } }, " ", /* @__PURE__ */ import_react35.default.createElement(import_IconButton2.default, { size: "small", "aria-label": "close", color: "inherit" }, /* @__PURE__ */ import_react35.default.createElement(import_Close3.default, { fontSize: "small" })))
|
|
5087
5085
|
)
|
|
5088
5086
|
}
|
|
5089
5087
|
)
|
|
5090
5088
|
);
|
|
5091
|
-
}
|
|
5089
|
+
}
|
|
5092
5090
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5093
5091
|
0 && (module.exports = {
|
|
5094
5092
|
AceOfSpadesComponent,
|