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