@wavelengthusaf/components 1.2.5 → 1.2.6
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 +14 -7
- package/dist/index.d.ts +14 -7
- package/dist/index.js +65 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -312,6 +312,7 @@ declare function WavelengthSnackbar(props: ConfirmationSnackbarProps): React__de
|
|
|
312
312
|
interface StandardSnackbarProps {
|
|
313
313
|
type: "success" | "error" | "disabled";
|
|
314
314
|
show: boolean;
|
|
315
|
+
closeIcon: ReactNode | React__default.JSX.Element;
|
|
315
316
|
icon?: ReactNode;
|
|
316
317
|
toggleShow: (on: boolean) => void;
|
|
317
318
|
horryAlign?: "left" | "right" | "center";
|
|
@@ -321,13 +322,19 @@ interface StandardSnackbarProps {
|
|
|
321
322
|
message?: string | ReactNode;
|
|
322
323
|
customVertyAlign?: string;
|
|
323
324
|
}
|
|
324
|
-
declare function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width, message, customVertyAlign, toggleShow }: StandardSnackbarProps): React__default.JSX.Element;
|
|
325
|
+
declare function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width, message, customVertyAlign, toggleShow, closeIcon }: StandardSnackbarProps): React__default.JSX.Element;
|
|
325
326
|
|
|
326
|
-
interface
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
interface Testprops {
|
|
328
|
+
isPopUpOpen: boolean;
|
|
329
|
+
type: "success" | "error" | "disabled";
|
|
330
|
+
icon?: ReactNode;
|
|
331
|
+
width?: string | number;
|
|
332
|
+
message?: string | ReactNode;
|
|
333
|
+
img: React__default.JSX.Element | ReactNode;
|
|
334
|
+
toggleOpen: (value: React__default.SetStateAction<boolean>) => void;
|
|
335
|
+
customVertyAlign?: string;
|
|
330
336
|
}
|
|
331
|
-
declare
|
|
337
|
+
declare const useOutsideClick: (callback: () => void) => React__default.RefObject<HTMLDivElement>;
|
|
338
|
+
declare function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign, width, img }: Testprops): React__default.JSX.Element;
|
|
332
339
|
|
|
333
|
-
export { AceOfSpadesComponent, AppLogo, ArrowIcon, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, NotAvailablePage, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, TestSnackbar, 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 };
|
|
340
|
+
export { AceOfSpadesComponent, AppLogo, ArrowIcon, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, NotAvailablePage, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, TestSnackbar, 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, useOutsideClick, useThemeContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -312,6 +312,7 @@ declare function WavelengthSnackbar(props: ConfirmationSnackbarProps): React__de
|
|
|
312
312
|
interface StandardSnackbarProps {
|
|
313
313
|
type: "success" | "error" | "disabled";
|
|
314
314
|
show: boolean;
|
|
315
|
+
closeIcon: ReactNode | React__default.JSX.Element;
|
|
315
316
|
icon?: ReactNode;
|
|
316
317
|
toggleShow: (on: boolean) => void;
|
|
317
318
|
horryAlign?: "left" | "right" | "center";
|
|
@@ -321,13 +322,19 @@ interface StandardSnackbarProps {
|
|
|
321
322
|
message?: string | ReactNode;
|
|
322
323
|
customVertyAlign?: string;
|
|
323
324
|
}
|
|
324
|
-
declare function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width, message, customVertyAlign, toggleShow }: StandardSnackbarProps): React__default.JSX.Element;
|
|
325
|
+
declare function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width, message, customVertyAlign, toggleShow, closeIcon }: StandardSnackbarProps): React__default.JSX.Element;
|
|
325
326
|
|
|
326
|
-
interface
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
interface Testprops {
|
|
328
|
+
isPopUpOpen: boolean;
|
|
329
|
+
type: "success" | "error" | "disabled";
|
|
330
|
+
icon?: ReactNode;
|
|
331
|
+
width?: string | number;
|
|
332
|
+
message?: string | ReactNode;
|
|
333
|
+
img: React__default.JSX.Element | ReactNode;
|
|
334
|
+
toggleOpen: (value: React__default.SetStateAction<boolean>) => void;
|
|
335
|
+
customVertyAlign?: string;
|
|
330
336
|
}
|
|
331
|
-
declare
|
|
337
|
+
declare const useOutsideClick: (callback: () => void) => React__default.RefObject<HTMLDivElement>;
|
|
338
|
+
declare function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign, width, img }: Testprops): React__default.JSX.Element;
|
|
332
339
|
|
|
333
|
-
export { AceOfSpadesComponent, AppLogo, ArrowIcon, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, NotAvailablePage, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, TestSnackbar, 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 };
|
|
340
|
+
export { AceOfSpadesComponent, AppLogo, ArrowIcon, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, NotAvailablePage, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, TestSnackbar, 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, useOutsideClick, useThemeContext };
|
package/dist/index.js
CHANGED
|
@@ -1341,6 +1341,7 @@ __export(src_exports, {
|
|
|
1341
1341
|
add: () => add,
|
|
1342
1342
|
concat: () => concat,
|
|
1343
1343
|
findBestStringMatch: () => findBestStringMatch,
|
|
1344
|
+
useOutsideClick: () => useOutsideClick,
|
|
1344
1345
|
useThemeContext: () => useThemeContext
|
|
1345
1346
|
});
|
|
1346
1347
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -5034,10 +5035,8 @@ function WavelengthSnackbar(props) {
|
|
|
5034
5035
|
// src/components/snackbars/WavelengthStandardSnackbar.tsx
|
|
5035
5036
|
var import_react35 = __toESM(require("react"));
|
|
5036
5037
|
var import_Snackbar = __toESM(require("@mui/material/Snackbar"));
|
|
5037
|
-
var import_IconButton2 = __toESM(require("@mui/material/IconButton"));
|
|
5038
|
-
var import_Close3 = __toESM(require("@mui/icons-material/Close"));
|
|
5039
5038
|
var import_SnackbarContent = __toESM(require("@mui/material/SnackbarContent"));
|
|
5040
|
-
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow }) {
|
|
5039
|
+
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow, closeIcon }) {
|
|
5041
5040
|
const handleClose = () => {
|
|
5042
5041
|
toggleShow(false);
|
|
5043
5042
|
};
|
|
@@ -5082,7 +5081,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5082
5081
|
}
|
|
5083
5082
|
},
|
|
5084
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")),
|
|
5085
|
-
/* @__PURE__ */ import_react35.default.createElement("div", { style: { gridColumnStart: 6 }
|
|
5084
|
+
/* @__PURE__ */ import_react35.default.createElement("div", { style: { gridColumnStart: 6 }, onClick: handleClose }, closeIcon)
|
|
5086
5085
|
)
|
|
5087
5086
|
}
|
|
5088
5087
|
)
|
|
@@ -5090,18 +5089,69 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5090
5089
|
}
|
|
5091
5090
|
|
|
5092
5091
|
// src/components/snackbars/TestSnackbar.tsx
|
|
5093
|
-
var import_material15 = require("@mui/material");
|
|
5094
5092
|
var import_react36 = __toESM(require("react"));
|
|
5095
|
-
var
|
|
5096
|
-
|
|
5097
|
-
const
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5093
|
+
var import_material15 = require("@mui/material");
|
|
5094
|
+
var useOutsideClick = (callback) => {
|
|
5095
|
+
const ref = (0, import_react36.useRef)(null);
|
|
5096
|
+
(0, import_react36.useEffect)(() => {
|
|
5097
|
+
const handleClickOutside = (event) => {
|
|
5098
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
5099
|
+
callback();
|
|
5100
|
+
}
|
|
5101
|
+
};
|
|
5102
|
+
document.addEventListener("mouseup", handleClickOutside);
|
|
5103
|
+
document.addEventListener("touchend", handleClickOutside);
|
|
5104
|
+
return () => {
|
|
5105
|
+
document.removeEventListener("mouseup", handleClickOutside);
|
|
5106
|
+
document.removeEventListener("touchend", handleClickOutside);
|
|
5107
|
+
};
|
|
5108
|
+
}, [callback]);
|
|
5109
|
+
return ref;
|
|
5110
|
+
};
|
|
5111
|
+
function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign, width: width2, img }) {
|
|
5112
|
+
const ref = useOutsideClick(() => {
|
|
5101
5113
|
toggleOpen(false);
|
|
5102
|
-
};
|
|
5103
|
-
|
|
5104
|
-
|
|
5114
|
+
});
|
|
5115
|
+
let bgColor = "";
|
|
5116
|
+
if (type == "success") {
|
|
5117
|
+
bgColor = "#25ab21";
|
|
5118
|
+
} else if (type == "error") {
|
|
5119
|
+
bgColor = "#FF4646";
|
|
5120
|
+
} else if (type == "disabled") {
|
|
5121
|
+
bgColor = "#737373";
|
|
5122
|
+
}
|
|
5123
|
+
return /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, isPopUpOpen && /* @__PURE__ */ import_react36.default.createElement(
|
|
5124
|
+
import_material15.Box,
|
|
5125
|
+
{
|
|
5126
|
+
sx: { position: "fixed", right: "auto", top: "24px", left: "50%", transform: "translateX(-50%)" },
|
|
5127
|
+
ref,
|
|
5128
|
+
style: {
|
|
5129
|
+
height: "50px",
|
|
5130
|
+
width: width2,
|
|
5131
|
+
backgroundColor: bgColor,
|
|
5132
|
+
borderRadius: "1px",
|
|
5133
|
+
display: "flex",
|
|
5134
|
+
justifyContent: "space-between",
|
|
5135
|
+
alignItems: "center",
|
|
5136
|
+
paddingRight: "20px",
|
|
5137
|
+
paddingLeft: "20px",
|
|
5138
|
+
zIndex: 2800,
|
|
5139
|
+
marginTop: customVertyAlign ? `${customVertyAlign}` : ""
|
|
5140
|
+
}
|
|
5141
|
+
},
|
|
5142
|
+
/* @__PURE__ */ import_react36.default.createElement("div", { style: { backgroundColor: "red" } }),
|
|
5143
|
+
/* @__PURE__ */ import_react36.default.createElement("div", { style: { color: "white", fontSize: "1rem" } }, message),
|
|
5144
|
+
/* @__PURE__ */ import_react36.default.createElement(
|
|
5145
|
+
import_material15.Button,
|
|
5146
|
+
{
|
|
5147
|
+
variant: "text",
|
|
5148
|
+
onClick: () => {
|
|
5149
|
+
toggleOpen(false);
|
|
5150
|
+
}
|
|
5151
|
+
},
|
|
5152
|
+
img
|
|
5153
|
+
)
|
|
5154
|
+
));
|
|
5105
5155
|
}
|
|
5106
5156
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5107
5157
|
0 && (module.exports = {
|
|
@@ -5143,6 +5193,7 @@ function TestSnackbar({ openProp, toggleOpen, Sbduration }) {
|
|
|
5143
5193
|
add,
|
|
5144
5194
|
concat,
|
|
5145
5195
|
findBestStringMatch,
|
|
5196
|
+
useOutsideClick,
|
|
5146
5197
|
useThemeContext
|
|
5147
5198
|
});
|
|
5148
5199
|
/*! Bundled license information:
|