@wavelengthusaf/components 1.2.2 → 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 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -17
- 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,33 +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
|
-
console.log(props.show);
|
|
5041
|
-
const show = props.show;
|
|
5042
|
-
const setShow = props.setShow;
|
|
5039
|
+
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow }) {
|
|
5043
5040
|
const handleClose = () => {
|
|
5044
|
-
|
|
5041
|
+
toggleShow(false);
|
|
5045
5042
|
};
|
|
5046
|
-
const durationMs =
|
|
5043
|
+
const durationMs = durationSb ? durationSb * 1e3 : 4e3;
|
|
5047
5044
|
let bgColor = "";
|
|
5048
|
-
if (
|
|
5045
|
+
if (type == "success") {
|
|
5049
5046
|
bgColor = "#25ab21";
|
|
5050
|
-
} else if (
|
|
5047
|
+
} else if (type == "error") {
|
|
5051
5048
|
bgColor = "#FF4646";
|
|
5052
|
-
} else if (
|
|
5049
|
+
} else if (type == "disabled") {
|
|
5053
5050
|
bgColor = "#737373";
|
|
5054
5051
|
}
|
|
5055
|
-
const sIcon =
|
|
5052
|
+
const sIcon = icon ? icon : "";
|
|
5056
5053
|
return /* @__PURE__ */ import_react35.default.createElement(
|
|
5057
5054
|
import_Snackbar.default,
|
|
5058
5055
|
{
|
|
5059
|
-
sx: { marginTop:
|
|
5056
|
+
sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
|
|
5060
5057
|
open: show,
|
|
5061
5058
|
onClose: handleClose,
|
|
5062
5059
|
autoHideDuration: durationMs,
|
|
5063
5060
|
anchorOrigin: {
|
|
5064
|
-
vertical:
|
|
5065
|
-
horizontal:
|
|
5061
|
+
vertical: vertyAlign ? vertyAlign : "top",
|
|
5062
|
+
horizontal: horryAlign ? horryAlign : "center"
|
|
5066
5063
|
}
|
|
5067
5064
|
},
|
|
5068
5065
|
/* @__PURE__ */ import_react35.default.createElement(
|
|
@@ -5080,16 +5077,16 @@ var WavelengthStandardSnackbar = (props) => {
|
|
|
5080
5077
|
style: {
|
|
5081
5078
|
display: "grid",
|
|
5082
5079
|
gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr",
|
|
5083
|
-
width:
|
|
5080
|
+
width: width2
|
|
5084
5081
|
}
|
|
5085
5082
|
},
|
|
5086
|
-
/* @__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" } },
|
|
5087
|
-
/* @__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" })))
|
|
5088
5085
|
)
|
|
5089
5086
|
}
|
|
5090
5087
|
)
|
|
5091
5088
|
);
|
|
5092
|
-
}
|
|
5089
|
+
}
|
|
5093
5090
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5094
5091
|
0 && (module.exports = {
|
|
5095
5092
|
AceOfSpadesComponent,
|