@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 CHANGED
@@ -313,7 +313,7 @@ interface StandardSnackbarProps {
313
313
  type: "success" | "error" | "disabled";
314
314
  show: boolean;
315
315
  icon?: ReactNode;
316
- setShow: (show: boolean) => void;
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 const WavelengthStandardSnackbar: (props: StandardSnackbarProps) => React__default.JSX.Element;
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
- setShow: (show: boolean) => void;
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 const WavelengthStandardSnackbar: (props: StandardSnackbarProps) => React__default.JSX.Element;
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
- var WavelengthStandardSnackbar = (props) => {
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
- setShow(false);
5041
+ toggleShow(false);
5045
5042
  };
5046
- const durationMs = props.durationSb ? props.durationSb * 1e3 : 4e3;
5043
+ const durationMs = durationSb ? durationSb * 1e3 : 4e3;
5047
5044
  let bgColor = "";
5048
- if (props.type == "success") {
5045
+ if (type == "success") {
5049
5046
  bgColor = "#25ab21";
5050
- } else if (props.type == "error") {
5047
+ } else if (type == "error") {
5051
5048
  bgColor = "#FF4646";
5052
- } else if (props.type == "disabled") {
5049
+ } else if (type == "disabled") {
5053
5050
  bgColor = "#737373";
5054
5051
  }
5055
- const sIcon = props.icon ? props.icon : "";
5052
+ const sIcon = icon ? icon : "";
5056
5053
  return /* @__PURE__ */ import_react35.default.createElement(
5057
5054
  import_Snackbar.default,
5058
5055
  {
5059
- sx: { marginTop: props.customVertyAlign ? `${props.customVertyAlign}` : "", zIndex: 1400 },
5056
+ sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
5060
5057
  open: show,
5061
5058
  onClose: handleClose,
5062
5059
  autoHideDuration: durationMs,
5063
5060
  anchorOrigin: {
5064
- vertical: props.vertyAlign ? props.vertyAlign : "top",
5065
- horizontal: props.horryAlign ? props.horryAlign : "center"
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: props.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" } }, props.message ? props.message : "Insert Message Here")),
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", onClick: handleClose }, /* @__PURE__ */ import_react35.default.createElement(import_Close3.default, { fontSize: "small" })))
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,