@wavelengthusaf/components 1.3.0 → 1.3.1
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/LICENSE +21 -0
- package/dist/index.d.mts +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +85 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1354,7 +1354,7 @@ function getPalette() {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
|
|
1356
1356
|
// src/components/buttons/WavelengthButton/WavelengthButton.tsx
|
|
1357
|
-
function WavelengthButton({ id, variant, colorOne, colorTwo, margin: margin2, padding: padding2, autoFocus, disabled, onClick, children, borderRadius: borderRadius2 }) {
|
|
1357
|
+
function WavelengthButton({ id, variant, colorOne, colorTwo, margin: margin2, padding: padding2, autoFocus, disabled, onClick, children, borderRadius: borderRadius2, mySx }) {
|
|
1358
1358
|
const palette2 = getPalette();
|
|
1359
1359
|
const WLContainedButton = {
|
|
1360
1360
|
margin: { margin: margin2 },
|
|
@@ -1402,6 +1402,9 @@ function WavelengthButton({ id, variant, colorOne, colorTwo, margin: margin2, pa
|
|
|
1402
1402
|
if (variant === "outlined") {
|
|
1403
1403
|
return /* @__PURE__ */ React.createElement(Button, { variant: "outlined", id, autoFocus, disabled, onClick, sx: WLOutlinedButton }, children);
|
|
1404
1404
|
}
|
|
1405
|
+
if (variant === "custom") {
|
|
1406
|
+
return /* @__PURE__ */ React.createElement(Button, { id, autoFocus, disabled, onClick, sx: mySx }, children);
|
|
1407
|
+
}
|
|
1405
1408
|
return /* @__PURE__ */ React.createElement(Button, { variant: "text", id, autoFocus, disabled, onClick, sx: WLTextButton }, children);
|
|
1406
1409
|
}
|
|
1407
1410
|
|
|
@@ -2989,7 +2992,7 @@ function WavelengthFileDownloader({ fileLoc, fileURL, fileName, button }) {
|
|
|
2989
2992
|
// src/components/containers/WavelengthBox/WavelengthBox.tsx
|
|
2990
2993
|
import React5 from "react";
|
|
2991
2994
|
import Grid from "@mui/material/Grid";
|
|
2992
|
-
function WavelengthBox({ width: width2, height: height2, children }) {
|
|
2995
|
+
function WavelengthBox({ width: width2, height: height2, children, borderBottomRadius, borderTopRadius }) {
|
|
2993
2996
|
const palette2 = getPalette();
|
|
2994
2997
|
return (
|
|
2995
2998
|
// <div
|
|
@@ -3013,7 +3016,10 @@ function WavelengthBox({ width: width2, height: height2, children }) {
|
|
|
3013
3016
|
sx: {
|
|
3014
3017
|
width: { width: width2 },
|
|
3015
3018
|
height: { height: height2 },
|
|
3016
|
-
|
|
3019
|
+
borderTopLeftRadius: borderTopRadius,
|
|
3020
|
+
borderTopRightRadius: borderTopRadius,
|
|
3021
|
+
borderBottomLeftRadius: borderBottomRadius,
|
|
3022
|
+
borderBottomRightRadius: borderBottomRadius,
|
|
3017
3023
|
borderColor: "#70714B",
|
|
3018
3024
|
bgcolor: palette2.primary,
|
|
3019
3025
|
border: "1px solid grey"
|
|
@@ -5015,8 +5021,64 @@ function WavelengthPopUpMenu({ menuItems, customIcon = false, width: width2, men
|
|
|
5015
5021
|
));
|
|
5016
5022
|
}
|
|
5017
5023
|
|
|
5018
|
-
// src/components/
|
|
5024
|
+
// src/components/modals/WavelengthDropdown.tsx
|
|
5019
5025
|
import React33 from "react";
|
|
5026
|
+
import { Menu as MuiMenu } from "@mui/material";
|
|
5027
|
+
import { MenuItem as MuiMenuItem, styled as styled5 } from "@mui/material";
|
|
5028
|
+
import Grow from "@mui/material/Grow";
|
|
5029
|
+
function WavelengthDropdown({ id, width: width2, options, borderColor: borderColor2, backgroundColor: backgroundColor2, anchor, handleClose, button, mySx, hoverColor }) {
|
|
5030
|
+
const open = Boolean(anchor);
|
|
5031
|
+
const MenuItem2 = styled5(MuiMenuItem)({
|
|
5032
|
+
"&.MuiMenuItem-root": {
|
|
5033
|
+
"&.Mui-selected": {
|
|
5034
|
+
backgroundColor: `${backgroundColor2}`
|
|
5035
|
+
},
|
|
5036
|
+
"&:hover": {
|
|
5037
|
+
backgroundColor: `${hoverColor}`
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
});
|
|
5041
|
+
const MyMenu = styled5(MuiMenu)({
|
|
5042
|
+
"& .MuiMenu-paper": {
|
|
5043
|
+
borderBottomLeftRadius: "8px",
|
|
5044
|
+
borderBottomRightRadius: "8px",
|
|
5045
|
+
borderTopRightRadius: "0px",
|
|
5046
|
+
borderTopLeftRadius: "0px",
|
|
5047
|
+
backgroundColor: `${backgroundColor2}`
|
|
5048
|
+
},
|
|
5049
|
+
"& .MuiMenu-list": {
|
|
5050
|
+
width: width2,
|
|
5051
|
+
borderLeft: `1px solid ${borderColor2}`,
|
|
5052
|
+
borderRight: `1px solid ${borderColor2}`,
|
|
5053
|
+
borderBottom: `1px solid ${borderColor2}`,
|
|
5054
|
+
paddingTop: "6px",
|
|
5055
|
+
paddingBottom: "6px"
|
|
5056
|
+
}
|
|
5057
|
+
});
|
|
5058
|
+
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", null, button), /* @__PURE__ */ React33.createElement(
|
|
5059
|
+
MyMenu,
|
|
5060
|
+
{
|
|
5061
|
+
id,
|
|
5062
|
+
sx: mySx,
|
|
5063
|
+
anchorEl: anchor,
|
|
5064
|
+
open,
|
|
5065
|
+
onClose: handleClose,
|
|
5066
|
+
MenuListProps: {
|
|
5067
|
+
"aria-labelledby": "basic-button"
|
|
5068
|
+
},
|
|
5069
|
+
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
5070
|
+
transformOrigin: { vertical: "top", horizontal: "center" },
|
|
5071
|
+
TransitionComponent: Grow
|
|
5072
|
+
},
|
|
5073
|
+
options.map((item, index) => {
|
|
5074
|
+
return /* @__PURE__ */ React33.createElement(MenuItem2, { key: index, onClick: item.onClick }, item.option);
|
|
5075
|
+
})
|
|
5076
|
+
));
|
|
5077
|
+
}
|
|
5078
|
+
var WavelengthDropdownStyled = styled5(WavelengthDropdown)``;
|
|
5079
|
+
|
|
5080
|
+
// src/components/snackbars/WavelengthSnackbar.tsx
|
|
5081
|
+
import React34 from "react";
|
|
5020
5082
|
import Snackbar from "@mui/material/Snackbar";
|
|
5021
5083
|
import SnackbarContent from "@mui/material/SnackbarContent";
|
|
5022
5084
|
function WavelengthSnackbar(props) {
|
|
@@ -5026,7 +5088,7 @@ function WavelengthSnackbar(props) {
|
|
|
5026
5088
|
};
|
|
5027
5089
|
const palette2 = getPalette();
|
|
5028
5090
|
const durationMs = props.durationSb ? props.durationSb * 1e3 : 4e3;
|
|
5029
|
-
return /* @__PURE__ */
|
|
5091
|
+
return /* @__PURE__ */ React34.createElement(
|
|
5030
5092
|
Snackbar,
|
|
5031
5093
|
{
|
|
5032
5094
|
open: show,
|
|
@@ -5037,7 +5099,7 @@ function WavelengthSnackbar(props) {
|
|
|
5037
5099
|
horizontal: props.horryAlign ? props.horryAlign : "center"
|
|
5038
5100
|
}
|
|
5039
5101
|
},
|
|
5040
|
-
/* @__PURE__ */
|
|
5102
|
+
/* @__PURE__ */ React34.createElement(
|
|
5041
5103
|
SnackbarContent,
|
|
5042
5104
|
{
|
|
5043
5105
|
style: {
|
|
@@ -5046,15 +5108,15 @@ function WavelengthSnackbar(props) {
|
|
|
5046
5108
|
display: "flex",
|
|
5047
5109
|
width: props.width
|
|
5048
5110
|
},
|
|
5049
|
-
message: /* @__PURE__ */
|
|
5050
|
-
action: /* @__PURE__ */
|
|
5111
|
+
message: /* @__PURE__ */ React34.createElement("div", null, /* @__PURE__ */ React34.createElement("span", null, props.icon), /* @__PURE__ */ React34.createElement("span", { id: "snackbar" }, props.message ? props.message : "Insert Message Here")),
|
|
5112
|
+
action: /* @__PURE__ */ React34.createElement("div", { style: { display: "flex", justifyContent: "center" }, onClick: handleClose }, props.closeIcon)
|
|
5051
5113
|
}
|
|
5052
5114
|
)
|
|
5053
5115
|
);
|
|
5054
5116
|
}
|
|
5055
5117
|
|
|
5056
5118
|
// src/components/snackbars/WavelengthStandardSnackbar.tsx
|
|
5057
|
-
import
|
|
5119
|
+
import React35 from "react";
|
|
5058
5120
|
import Snackbar2 from "@mui/material/Snackbar";
|
|
5059
5121
|
import SnackbarContent2 from "@mui/material/SnackbarContent";
|
|
5060
5122
|
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow, closeIcon }) {
|
|
@@ -5071,7 +5133,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5071
5133
|
bgColor = "#737373";
|
|
5072
5134
|
}
|
|
5073
5135
|
const sIcon = icon ? icon : "";
|
|
5074
|
-
return /* @__PURE__ */
|
|
5136
|
+
return /* @__PURE__ */ React35.createElement(
|
|
5075
5137
|
Snackbar2,
|
|
5076
5138
|
{
|
|
5077
5139
|
sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
|
|
@@ -5083,7 +5145,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5083
5145
|
horizontal: horryAlign ? horryAlign : "center"
|
|
5084
5146
|
}
|
|
5085
5147
|
},
|
|
5086
|
-
/* @__PURE__ */
|
|
5148
|
+
/* @__PURE__ */ React35.createElement(
|
|
5087
5149
|
SnackbarContent2,
|
|
5088
5150
|
{
|
|
5089
5151
|
style: {
|
|
@@ -5092,7 +5154,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5092
5154
|
//color: props.textColor ? props.textColor : palette.secondary,
|
|
5093
5155
|
},
|
|
5094
5156
|
sx: { paddingTop: "0px", paddingBottom: "0px" },
|
|
5095
|
-
message: /* @__PURE__ */
|
|
5157
|
+
message: /* @__PURE__ */ React35.createElement(
|
|
5096
5158
|
"div",
|
|
5097
5159
|
{
|
|
5098
5160
|
style: {
|
|
@@ -5101,8 +5163,8 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5101
5163
|
width: width2
|
|
5102
5164
|
}
|
|
5103
5165
|
},
|
|
5104
|
-
/* @__PURE__ */
|
|
5105
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ React35.createElement("div", { style: { marginTop: 4, gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, id: "snackbar" }, /* @__PURE__ */ React35.createElement("div", null, sIcon), /* @__PURE__ */ React35.createElement("div", { style: { fontSize: "1rem", marginLeft: "10px" } }, message ? message : "Insert Message Here")),
|
|
5167
|
+
/* @__PURE__ */ React35.createElement("div", { style: { gridColumnStart: 6 }, onClick: handleClose }, closeIcon)
|
|
5106
5168
|
)
|
|
5107
5169
|
}
|
|
5108
5170
|
)
|
|
@@ -5112,7 +5174,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5112
5174
|
// src/components/snackbars/TestSnackbar.tsx
|
|
5113
5175
|
import Box5 from "@mui/material/Box";
|
|
5114
5176
|
import Button5 from "@mui/material/Button";
|
|
5115
|
-
import
|
|
5177
|
+
import React36, { useEffect, useRef as useRef2 } from "react";
|
|
5116
5178
|
var useOutsideClick = (callback) => {
|
|
5117
5179
|
const ref = useRef2(null);
|
|
5118
5180
|
useEffect(() => {
|
|
@@ -5142,7 +5204,7 @@ function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign
|
|
|
5142
5204
|
} else if (type == "disabled") {
|
|
5143
5205
|
bgColor = "#737373";
|
|
5144
5206
|
}
|
|
5145
|
-
return /* @__PURE__ */
|
|
5207
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, isPopUpOpen && /* @__PURE__ */ React36.createElement(
|
|
5146
5208
|
Box5,
|
|
5147
5209
|
{
|
|
5148
5210
|
sx: { position: "fixed", right: "auto", top: "24px", left: "50%", transform: "translateX(-50%)" },
|
|
@@ -5161,9 +5223,9 @@ function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign
|
|
|
5161
5223
|
marginTop: customVertyAlign ? `${customVertyAlign}` : ""
|
|
5162
5224
|
}
|
|
5163
5225
|
},
|
|
5164
|
-
/* @__PURE__ */
|
|
5165
|
-
/* @__PURE__ */
|
|
5166
|
-
/* @__PURE__ */
|
|
5226
|
+
/* @__PURE__ */ React36.createElement("div", { style: { backgroundColor: "red" } }),
|
|
5227
|
+
/* @__PURE__ */ React36.createElement("div", { style: { color: "white", fontSize: "1rem" } }, message),
|
|
5228
|
+
/* @__PURE__ */ React36.createElement(
|
|
5167
5229
|
Button5,
|
|
5168
5230
|
{
|
|
5169
5231
|
variant: "text",
|
|
@@ -5200,6 +5262,7 @@ export {
|
|
|
5200
5262
|
WavelengthConfirmationModal,
|
|
5201
5263
|
WavelengthContentModal,
|
|
5202
5264
|
WavelengthContentPlaceholder,
|
|
5265
|
+
WavelengthDropdown,
|
|
5203
5266
|
WavelengthDropdownButton,
|
|
5204
5267
|
WavelengthExampleComponent,
|
|
5205
5268
|
WavelengthFileDownloader,
|