@wavelengthusaf/components 1.3.0 → 1.3.2
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/README.md +4 -0
- package/dist/index.d.mts +30 -4
- package/dist/index.d.ts +30 -4
- package/dist/index.js +131 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +128 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Keenan Ray
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@ npm install @wavelengthusaf/components
|
|
|
14
14
|
|
|
15
15
|
## Release Notes
|
|
16
16
|
|
|
17
|
+
## 1.3.1
|
|
18
|
+
|
|
19
|
+
-Updated WavelengthBox Component, and Wavelength Button Component. Created new Dropdown Component called Wavelength Dropdown.
|
|
20
|
+
|
|
17
21
|
## 1.3.0
|
|
18
22
|
|
|
19
23
|
- Updated Footer and Snackbar component, added a basic File Download component.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
4
|
import { TextFieldVariants } from '@mui/material/TextField';
|
|
5
|
+
import { SxProps as SxProps$1, Theme as Theme$1 } from '@mui/material';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Helper Functions
|
|
@@ -20,7 +22,7 @@ declare function concat(a: string, b: string): string;
|
|
|
20
22
|
|
|
21
23
|
interface OutlinedButtonProps {
|
|
22
24
|
id?: string;
|
|
23
|
-
variant: "outlined" | "contained" | "text";
|
|
25
|
+
variant: "outlined" | "contained" | "text" | "custom";
|
|
24
26
|
colorOne?: string;
|
|
25
27
|
colorTwo?: string;
|
|
26
28
|
onClick?: any;
|
|
@@ -31,8 +33,9 @@ interface OutlinedButtonProps {
|
|
|
31
33
|
children?: ReactNode;
|
|
32
34
|
data_test?: string;
|
|
33
35
|
borderRadius?: string;
|
|
36
|
+
mySx?: SxProps<Theme> | undefined;
|
|
34
37
|
}
|
|
35
|
-
declare function WavelengthButton({ id, variant, colorOne, colorTwo, margin, padding, autoFocus, disabled, onClick, children, borderRadius }: OutlinedButtonProps): React__default.JSX.Element;
|
|
38
|
+
declare function WavelengthButton({ id, variant, colorOne, colorTwo, margin, padding, autoFocus, disabled, onClick, children, borderRadius, mySx }: OutlinedButtonProps): React__default.JSX.Element;
|
|
36
39
|
|
|
37
40
|
interface ButtonProps {
|
|
38
41
|
onClick?: any;
|
|
@@ -85,8 +88,10 @@ interface WavelengthBoxProps {
|
|
|
85
88
|
width?: number;
|
|
86
89
|
height?: number;
|
|
87
90
|
children: ReactNode;
|
|
91
|
+
borderTopRadius?: string;
|
|
92
|
+
borderBottomRadius?: string;
|
|
88
93
|
}
|
|
89
|
-
declare function WavelengthBox({ width, height, children }: WavelengthBoxProps): React__default.JSX.Element;
|
|
94
|
+
declare function WavelengthBox({ width, height, children, borderBottomRadius, borderTopRadius }: WavelengthBoxProps): React__default.JSX.Element;
|
|
90
95
|
|
|
91
96
|
interface WavelengthContentPlaceholderProps {
|
|
92
97
|
type?: "circle" | "rectangle";
|
|
@@ -319,6 +324,27 @@ interface PopUPMenuProps {
|
|
|
319
324
|
}
|
|
320
325
|
declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color, emailHoverColor }: PopUPMenuProps): React__default.JSX.Element;
|
|
321
326
|
|
|
327
|
+
interface DropdownProps {
|
|
328
|
+
id?: string;
|
|
329
|
+
palette: "brewery" | "custom";
|
|
330
|
+
width: string;
|
|
331
|
+
options: menuOptions[];
|
|
332
|
+
buttonSx?: SxProps$1<Theme$1> | undefined;
|
|
333
|
+
menuSx?: MenuSxProps;
|
|
334
|
+
buttonText: string | ReactNode;
|
|
335
|
+
}
|
|
336
|
+
interface menuOptions {
|
|
337
|
+
option: React__default.ReactNode;
|
|
338
|
+
onClick?: React__default.MouseEventHandler<HTMLLIElement> | undefined;
|
|
339
|
+
}
|
|
340
|
+
interface MenuSxProps {
|
|
341
|
+
backgroundColor?: string;
|
|
342
|
+
borderColor?: string;
|
|
343
|
+
hoverColor?: string;
|
|
344
|
+
width?: string;
|
|
345
|
+
}
|
|
346
|
+
declare function WavelengthDropdown({ id, options, buttonSx, width, buttonText, menuSx, palette }: DropdownProps): React__default.JSX.Element;
|
|
347
|
+
|
|
322
348
|
interface ConfirmationSnackbarProps {
|
|
323
349
|
show: boolean;
|
|
324
350
|
setShow: (show: boolean) => void;
|
|
@@ -362,4 +388,4 @@ interface Testprops {
|
|
|
362
388
|
declare const useOutsideClick: (callback: () => void) => React__default.RefObject<HTMLDivElement>;
|
|
363
389
|
declare function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign, width, img }: Testprops): React__default.JSX.Element;
|
|
364
390
|
|
|
365
|
-
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, WavelengthFileDownloader, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthSearch, WavelengthSideBar, WavelengthSnackbar, WavelengthSpinningLogo, WavelengthSpinningOuterCircle, WavelengthStandardSnackbar, WavelengthTitleBar, add, concat, findBestStringMatch, type menuItemProps, useOutsideClick, useThemeContext };
|
|
391
|
+
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, WavelengthDropdown, WavelengthDropdownButton, WavelengthExampleComponent, WavelengthFileDownloader, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthSearch, WavelengthSideBar, WavelengthSnackbar, WavelengthSpinningLogo, WavelengthSpinningOuterCircle, WavelengthStandardSnackbar, WavelengthTitleBar, add, concat, findBestStringMatch, type menuItemProps, useOutsideClick, useThemeContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
4
|
import { TextFieldVariants } from '@mui/material/TextField';
|
|
5
|
+
import { SxProps as SxProps$1, Theme as Theme$1 } from '@mui/material';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Helper Functions
|
|
@@ -20,7 +22,7 @@ declare function concat(a: string, b: string): string;
|
|
|
20
22
|
|
|
21
23
|
interface OutlinedButtonProps {
|
|
22
24
|
id?: string;
|
|
23
|
-
variant: "outlined" | "contained" | "text";
|
|
25
|
+
variant: "outlined" | "contained" | "text" | "custom";
|
|
24
26
|
colorOne?: string;
|
|
25
27
|
colorTwo?: string;
|
|
26
28
|
onClick?: any;
|
|
@@ -31,8 +33,9 @@ interface OutlinedButtonProps {
|
|
|
31
33
|
children?: ReactNode;
|
|
32
34
|
data_test?: string;
|
|
33
35
|
borderRadius?: string;
|
|
36
|
+
mySx?: SxProps<Theme> | undefined;
|
|
34
37
|
}
|
|
35
|
-
declare function WavelengthButton({ id, variant, colorOne, colorTwo, margin, padding, autoFocus, disabled, onClick, children, borderRadius }: OutlinedButtonProps): React__default.JSX.Element;
|
|
38
|
+
declare function WavelengthButton({ id, variant, colorOne, colorTwo, margin, padding, autoFocus, disabled, onClick, children, borderRadius, mySx }: OutlinedButtonProps): React__default.JSX.Element;
|
|
36
39
|
|
|
37
40
|
interface ButtonProps {
|
|
38
41
|
onClick?: any;
|
|
@@ -85,8 +88,10 @@ interface WavelengthBoxProps {
|
|
|
85
88
|
width?: number;
|
|
86
89
|
height?: number;
|
|
87
90
|
children: ReactNode;
|
|
91
|
+
borderTopRadius?: string;
|
|
92
|
+
borderBottomRadius?: string;
|
|
88
93
|
}
|
|
89
|
-
declare function WavelengthBox({ width, height, children }: WavelengthBoxProps): React__default.JSX.Element;
|
|
94
|
+
declare function WavelengthBox({ width, height, children, borderBottomRadius, borderTopRadius }: WavelengthBoxProps): React__default.JSX.Element;
|
|
90
95
|
|
|
91
96
|
interface WavelengthContentPlaceholderProps {
|
|
92
97
|
type?: "circle" | "rectangle";
|
|
@@ -319,6 +324,27 @@ interface PopUPMenuProps {
|
|
|
319
324
|
}
|
|
320
325
|
declare function WavelengthPopUpMenu({ menuItems, customIcon, width, menuDirection, color, emailHoverColor }: PopUPMenuProps): React__default.JSX.Element;
|
|
321
326
|
|
|
327
|
+
interface DropdownProps {
|
|
328
|
+
id?: string;
|
|
329
|
+
palette: "brewery" | "custom";
|
|
330
|
+
width: string;
|
|
331
|
+
options: menuOptions[];
|
|
332
|
+
buttonSx?: SxProps$1<Theme$1> | undefined;
|
|
333
|
+
menuSx?: MenuSxProps;
|
|
334
|
+
buttonText: string | ReactNode;
|
|
335
|
+
}
|
|
336
|
+
interface menuOptions {
|
|
337
|
+
option: React__default.ReactNode;
|
|
338
|
+
onClick?: React__default.MouseEventHandler<HTMLLIElement> | undefined;
|
|
339
|
+
}
|
|
340
|
+
interface MenuSxProps {
|
|
341
|
+
backgroundColor?: string;
|
|
342
|
+
borderColor?: string;
|
|
343
|
+
hoverColor?: string;
|
|
344
|
+
width?: string;
|
|
345
|
+
}
|
|
346
|
+
declare function WavelengthDropdown({ id, options, buttonSx, width, buttonText, menuSx, palette }: DropdownProps): React__default.JSX.Element;
|
|
347
|
+
|
|
322
348
|
interface ConfirmationSnackbarProps {
|
|
323
349
|
show: boolean;
|
|
324
350
|
setShow: (show: boolean) => void;
|
|
@@ -362,4 +388,4 @@ interface Testprops {
|
|
|
362
388
|
declare const useOutsideClick: (callback: () => void) => React__default.RefObject<HTMLDivElement>;
|
|
363
389
|
declare function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign, width, img }: Testprops): React__default.JSX.Element;
|
|
364
390
|
|
|
365
|
-
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, WavelengthFileDownloader, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthSearch, WavelengthSideBar, WavelengthSnackbar, WavelengthSpinningLogo, WavelengthSpinningOuterCircle, WavelengthStandardSnackbar, WavelengthTitleBar, add, concat, findBestStringMatch, type menuItemProps, useOutsideClick, useThemeContext };
|
|
391
|
+
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, WavelengthDropdown, WavelengthDropdownButton, WavelengthExampleComponent, WavelengthFileDownloader, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthPopUpMenu, WavelengthSearch, WavelengthSideBar, WavelengthSnackbar, WavelengthSpinningLogo, WavelengthSpinningOuterCircle, WavelengthStandardSnackbar, WavelengthTitleBar, add, concat, findBestStringMatch, type menuItemProps, useOutsideClick, useThemeContext };
|
package/dist/index.js
CHANGED
|
@@ -1327,6 +1327,7 @@ __export(src_exports, {
|
|
|
1327
1327
|
WavelengthConfirmationModal: () => WavelengthConfirmationModal,
|
|
1328
1328
|
WavelengthContentModal: () => WavelengthContentModal,
|
|
1329
1329
|
WavelengthContentPlaceholder: () => WavelengthContentPlaceholder,
|
|
1330
|
+
WavelengthDropdown: () => WavelengthDropdown,
|
|
1330
1331
|
WavelengthDropdownButton: () => WavelengthDropdownButton,
|
|
1331
1332
|
WavelengthExampleComponent: () => WavelengthExampleComponent,
|
|
1332
1333
|
WavelengthFileDownloader: () => WavelengthFileDownloader,
|
|
@@ -1409,7 +1410,7 @@ function getPalette() {
|
|
|
1409
1410
|
}
|
|
1410
1411
|
|
|
1411
1412
|
// src/components/buttons/WavelengthButton/WavelengthButton.tsx
|
|
1412
|
-
function WavelengthButton({ id, variant, colorOne, colorTwo, margin: margin2, padding: padding2, autoFocus, disabled, onClick, children, borderRadius: borderRadius2 }) {
|
|
1413
|
+
function WavelengthButton({ id, variant, colorOne, colorTwo, margin: margin2, padding: padding2, autoFocus, disabled, onClick, children, borderRadius: borderRadius2, mySx }) {
|
|
1413
1414
|
const palette2 = getPalette();
|
|
1414
1415
|
const WLContainedButton = {
|
|
1415
1416
|
margin: { margin: margin2 },
|
|
@@ -1457,6 +1458,9 @@ function WavelengthButton({ id, variant, colorOne, colorTwo, margin: margin2, pa
|
|
|
1457
1458
|
if (variant === "outlined") {
|
|
1458
1459
|
return /* @__PURE__ */ import_react2.default.createElement(import_Button.default, { variant: "outlined", id, autoFocus, disabled, onClick, sx: WLOutlinedButton }, children);
|
|
1459
1460
|
}
|
|
1461
|
+
if (variant === "custom") {
|
|
1462
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_Button.default, { id, autoFocus, disabled, onClick, sx: mySx }, children);
|
|
1463
|
+
}
|
|
1460
1464
|
return /* @__PURE__ */ import_react2.default.createElement(import_Button.default, { variant: "text", id, autoFocus, disabled, onClick, sx: WLTextButton }, children);
|
|
1461
1465
|
}
|
|
1462
1466
|
|
|
@@ -3044,7 +3048,7 @@ function WavelengthFileDownloader({ fileLoc, fileURL, fileName, button }) {
|
|
|
3044
3048
|
// src/components/containers/WavelengthBox/WavelengthBox.tsx
|
|
3045
3049
|
var import_react8 = __toESM(require("react"));
|
|
3046
3050
|
var import_Grid = __toESM(require("@mui/material/Grid"));
|
|
3047
|
-
function WavelengthBox({ width: width2, height: height2, children }) {
|
|
3051
|
+
function WavelengthBox({ width: width2, height: height2, children, borderBottomRadius, borderTopRadius }) {
|
|
3048
3052
|
const palette2 = getPalette();
|
|
3049
3053
|
return (
|
|
3050
3054
|
// <div
|
|
@@ -3068,7 +3072,10 @@ function WavelengthBox({ width: width2, height: height2, children }) {
|
|
|
3068
3072
|
sx: {
|
|
3069
3073
|
width: { width: width2 },
|
|
3070
3074
|
height: { height: height2 },
|
|
3071
|
-
|
|
3075
|
+
borderTopLeftRadius: borderTopRadius,
|
|
3076
|
+
borderTopRightRadius: borderTopRadius,
|
|
3077
|
+
borderBottomLeftRadius: borderBottomRadius,
|
|
3078
|
+
borderBottomRightRadius: borderBottomRadius,
|
|
3072
3079
|
borderColor: "#70714B",
|
|
3073
3080
|
bgcolor: palette2.primary,
|
|
3074
3081
|
border: "1px solid grey"
|
|
@@ -5070,8 +5077,110 @@ function WavelengthPopUpMenu({ menuItems, customIcon = false, width: width2, men
|
|
|
5070
5077
|
));
|
|
5071
5078
|
}
|
|
5072
5079
|
|
|
5073
|
-
// src/components/
|
|
5080
|
+
// src/components/modals/WavelengthDropdown.tsx
|
|
5074
5081
|
var import_react37 = __toESM(require("react"));
|
|
5082
|
+
var import_material = require("@mui/material");
|
|
5083
|
+
var import_material2 = require("@mui/material");
|
|
5084
|
+
var import_Grow = __toESM(require("@mui/material/Grow"));
|
|
5085
|
+
function WavelengthDropdown({ id, options, buttonSx, width: width2, buttonText, menuSx, palette: palette2 }) {
|
|
5086
|
+
const [anchorEl, setAnchorEl] = import_react37.default.useState(null);
|
|
5087
|
+
const open = Boolean(anchorEl);
|
|
5088
|
+
const handleClick = (event) => {
|
|
5089
|
+
setAnchorEl(event.currentTarget);
|
|
5090
|
+
};
|
|
5091
|
+
const handleClose = () => {
|
|
5092
|
+
setAnchorEl(null);
|
|
5093
|
+
};
|
|
5094
|
+
const breweryStyleButton = {
|
|
5095
|
+
backgroundColor: "#d16a2f",
|
|
5096
|
+
color: "white",
|
|
5097
|
+
padding: "12px 16px",
|
|
5098
|
+
width: width2,
|
|
5099
|
+
fontSize: "18px",
|
|
5100
|
+
minWidth: "min-content",
|
|
5101
|
+
borderTopRightRadius: "8px",
|
|
5102
|
+
borderTopLeftRadius: "8px",
|
|
5103
|
+
"&:hover": {
|
|
5104
|
+
backgroundColor: "rgba(228, 119, 57, 1)"
|
|
5105
|
+
}
|
|
5106
|
+
};
|
|
5107
|
+
const breweryDropDownStyle = {
|
|
5108
|
+
backgroundColor: "#FCFAF8",
|
|
5109
|
+
borderColor: "#d16a2f",
|
|
5110
|
+
hoverColor: "rgba(209, 106, 47, 0.1)",
|
|
5111
|
+
width: width2
|
|
5112
|
+
};
|
|
5113
|
+
const defaultDropdownSx = {
|
|
5114
|
+
backgroundColor: "white",
|
|
5115
|
+
borderColor: "blue",
|
|
5116
|
+
hoverColor: "#d4d4e3",
|
|
5117
|
+
width: width2
|
|
5118
|
+
};
|
|
5119
|
+
const defaultsx = menuSx ? __spreadValues(__spreadValues({}, defaultDropdownSx), menuSx) : defaultDropdownSx;
|
|
5120
|
+
let myButtonSx;
|
|
5121
|
+
let myMenusx;
|
|
5122
|
+
if (palette2 === "brewery") {
|
|
5123
|
+
myButtonSx = __spreadValues(__spreadValues({}, breweryStyleButton), buttonSx);
|
|
5124
|
+
myMenusx = __spreadValues(__spreadValues({}, breweryDropDownStyle), menuSx);
|
|
5125
|
+
} else {
|
|
5126
|
+
myButtonSx = buttonSx;
|
|
5127
|
+
myMenusx = defaultsx;
|
|
5128
|
+
}
|
|
5129
|
+
const MenuItem2 = (0, import_material2.styled)(import_material2.MenuItem)({
|
|
5130
|
+
"&.MuiMenuItem-root": {
|
|
5131
|
+
"&.Mui-selected": {
|
|
5132
|
+
backgroundColor: `${myMenusx.backgroundColor}`
|
|
5133
|
+
},
|
|
5134
|
+
"&:hover": {
|
|
5135
|
+
backgroundColor: `${myMenusx.hoverColor}`
|
|
5136
|
+
}
|
|
5137
|
+
}
|
|
5138
|
+
});
|
|
5139
|
+
const MyMenu = (0, import_material2.styled)(import_material.Menu)({
|
|
5140
|
+
top: "-7px",
|
|
5141
|
+
left: "0px",
|
|
5142
|
+
boxSizing: "border-box",
|
|
5143
|
+
"& .MuiMenu-paper": {
|
|
5144
|
+
borderBottomLeftRadius: "8px",
|
|
5145
|
+
borderBottomRightRadius: "8px",
|
|
5146
|
+
borderTopRightRadius: "0px",
|
|
5147
|
+
borderTopLeftRadius: "0px",
|
|
5148
|
+
width: myMenusx.width,
|
|
5149
|
+
backgroundColor: `${myMenusx.backgroundColor}`
|
|
5150
|
+
},
|
|
5151
|
+
"& .MuiMenu-list": {
|
|
5152
|
+
// paddingTop: "6px",
|
|
5153
|
+
// paddingBottom: "6px",
|
|
5154
|
+
borderBottomLeftRadius: "8px",
|
|
5155
|
+
borderBottomRightRadius: "8px",
|
|
5156
|
+
borderLeft: `1px solid ${myMenusx.borderColor}`,
|
|
5157
|
+
borderRight: `1px solid ${myMenusx.borderColor}`,
|
|
5158
|
+
borderBottom: `1px solid ${myMenusx.borderColor}`
|
|
5159
|
+
}
|
|
5160
|
+
});
|
|
5161
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_react37.default.Fragment, null, /* @__PURE__ */ import_react37.default.createElement(WavelengthButton, { variant: "custom", mySx: myButtonSx, onClick: handleClick }, buttonText), /* @__PURE__ */ import_react37.default.createElement(
|
|
5162
|
+
MyMenu,
|
|
5163
|
+
{
|
|
5164
|
+
id,
|
|
5165
|
+
anchorEl,
|
|
5166
|
+
open,
|
|
5167
|
+
onClose: handleClose,
|
|
5168
|
+
MenuListProps: {
|
|
5169
|
+
"aria-labelledby": "basic-button"
|
|
5170
|
+
},
|
|
5171
|
+
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
5172
|
+
transformOrigin: { vertical: "top", horizontal: "center" },
|
|
5173
|
+
TransitionComponent: import_Grow.default
|
|
5174
|
+
},
|
|
5175
|
+
options.map((item, index) => {
|
|
5176
|
+
return /* @__PURE__ */ import_react37.default.createElement(MenuItem2, { key: index, onClick: item.onClick }, item.option);
|
|
5177
|
+
})
|
|
5178
|
+
));
|
|
5179
|
+
}
|
|
5180
|
+
var WavelengthDropdownStyled = (0, import_material2.styled)(WavelengthDropdown)``;
|
|
5181
|
+
|
|
5182
|
+
// src/components/snackbars/WavelengthSnackbar.tsx
|
|
5183
|
+
var import_react38 = __toESM(require("react"));
|
|
5075
5184
|
var import_Snackbar = __toESM(require("@mui/material/Snackbar"));
|
|
5076
5185
|
var import_SnackbarContent = __toESM(require("@mui/material/SnackbarContent"));
|
|
5077
5186
|
function WavelengthSnackbar(props) {
|
|
@@ -5081,7 +5190,7 @@ function WavelengthSnackbar(props) {
|
|
|
5081
5190
|
};
|
|
5082
5191
|
const palette2 = getPalette();
|
|
5083
5192
|
const durationMs = props.durationSb ? props.durationSb * 1e3 : 4e3;
|
|
5084
|
-
return /* @__PURE__ */
|
|
5193
|
+
return /* @__PURE__ */ import_react38.default.createElement(
|
|
5085
5194
|
import_Snackbar.default,
|
|
5086
5195
|
{
|
|
5087
5196
|
open: show,
|
|
@@ -5092,7 +5201,7 @@ function WavelengthSnackbar(props) {
|
|
|
5092
5201
|
horizontal: props.horryAlign ? props.horryAlign : "center"
|
|
5093
5202
|
}
|
|
5094
5203
|
},
|
|
5095
|
-
/* @__PURE__ */
|
|
5204
|
+
/* @__PURE__ */ import_react38.default.createElement(
|
|
5096
5205
|
import_SnackbarContent.default,
|
|
5097
5206
|
{
|
|
5098
5207
|
style: {
|
|
@@ -5101,15 +5210,15 @@ function WavelengthSnackbar(props) {
|
|
|
5101
5210
|
display: "flex",
|
|
5102
5211
|
width: props.width
|
|
5103
5212
|
},
|
|
5104
|
-
message: /* @__PURE__ */
|
|
5105
|
-
action: /* @__PURE__ */
|
|
5213
|
+
message: /* @__PURE__ */ import_react38.default.createElement("div", null, /* @__PURE__ */ import_react38.default.createElement("span", null, props.icon), /* @__PURE__ */ import_react38.default.createElement("span", { id: "snackbar" }, props.message ? props.message : "Insert Message Here")),
|
|
5214
|
+
action: /* @__PURE__ */ import_react38.default.createElement("div", { style: { display: "flex", justifyContent: "center" }, onClick: handleClose }, props.closeIcon)
|
|
5106
5215
|
}
|
|
5107
5216
|
)
|
|
5108
5217
|
);
|
|
5109
5218
|
}
|
|
5110
5219
|
|
|
5111
5220
|
// src/components/snackbars/WavelengthStandardSnackbar.tsx
|
|
5112
|
-
var
|
|
5221
|
+
var import_react39 = __toESM(require("react"));
|
|
5113
5222
|
var import_Snackbar2 = __toESM(require("@mui/material/Snackbar"));
|
|
5114
5223
|
var import_SnackbarContent2 = __toESM(require("@mui/material/SnackbarContent"));
|
|
5115
5224
|
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow, closeIcon }) {
|
|
@@ -5126,7 +5235,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5126
5235
|
bgColor = "#737373";
|
|
5127
5236
|
}
|
|
5128
5237
|
const sIcon = icon ? icon : "";
|
|
5129
|
-
return /* @__PURE__ */
|
|
5238
|
+
return /* @__PURE__ */ import_react39.default.createElement(
|
|
5130
5239
|
import_Snackbar2.default,
|
|
5131
5240
|
{
|
|
5132
5241
|
sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
|
|
@@ -5138,7 +5247,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5138
5247
|
horizontal: horryAlign ? horryAlign : "center"
|
|
5139
5248
|
}
|
|
5140
5249
|
},
|
|
5141
|
-
/* @__PURE__ */
|
|
5250
|
+
/* @__PURE__ */ import_react39.default.createElement(
|
|
5142
5251
|
import_SnackbarContent2.default,
|
|
5143
5252
|
{
|
|
5144
5253
|
style: {
|
|
@@ -5147,7 +5256,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5147
5256
|
//color: props.textColor ? props.textColor : palette.secondary,
|
|
5148
5257
|
},
|
|
5149
5258
|
sx: { paddingTop: "0px", paddingBottom: "0px" },
|
|
5150
|
-
message: /* @__PURE__ */
|
|
5259
|
+
message: /* @__PURE__ */ import_react39.default.createElement(
|
|
5151
5260
|
"div",
|
|
5152
5261
|
{
|
|
5153
5262
|
style: {
|
|
@@ -5156,8 +5265,8 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5156
5265
|
width: width2
|
|
5157
5266
|
}
|
|
5158
5267
|
},
|
|
5159
|
-
/* @__PURE__ */
|
|
5160
|
-
/* @__PURE__ */
|
|
5268
|
+
/* @__PURE__ */ import_react39.default.createElement("div", { style: { marginTop: 4, gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, id: "snackbar" }, /* @__PURE__ */ import_react39.default.createElement("div", null, sIcon), /* @__PURE__ */ import_react39.default.createElement("div", { style: { fontSize: "1rem", marginLeft: "10px" } }, message ? message : "Insert Message Here")),
|
|
5269
|
+
/* @__PURE__ */ import_react39.default.createElement("div", { style: { gridColumnStart: 6 }, onClick: handleClose }, closeIcon)
|
|
5161
5270
|
)
|
|
5162
5271
|
}
|
|
5163
5272
|
)
|
|
@@ -5167,10 +5276,10 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5167
5276
|
// src/components/snackbars/TestSnackbar.tsx
|
|
5168
5277
|
var import_Box5 = __toESM(require("@mui/material/Box"));
|
|
5169
5278
|
var import_Button5 = __toESM(require("@mui/material/Button"));
|
|
5170
|
-
var
|
|
5279
|
+
var import_react40 = __toESM(require("react"));
|
|
5171
5280
|
var useOutsideClick = (callback) => {
|
|
5172
|
-
const ref = (0,
|
|
5173
|
-
(0,
|
|
5281
|
+
const ref = (0, import_react40.useRef)(null);
|
|
5282
|
+
(0, import_react40.useEffect)(() => {
|
|
5174
5283
|
const handleClickOutside = (event) => {
|
|
5175
5284
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
5176
5285
|
callback();
|
|
@@ -5197,7 +5306,7 @@ function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign
|
|
|
5197
5306
|
} else if (type == "disabled") {
|
|
5198
5307
|
bgColor = "#737373";
|
|
5199
5308
|
}
|
|
5200
|
-
return /* @__PURE__ */
|
|
5309
|
+
return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, isPopUpOpen && /* @__PURE__ */ import_react40.default.createElement(
|
|
5201
5310
|
import_Box5.default,
|
|
5202
5311
|
{
|
|
5203
5312
|
sx: { position: "fixed", right: "auto", top: "24px", left: "50%", transform: "translateX(-50%)" },
|
|
@@ -5216,9 +5325,9 @@ function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign
|
|
|
5216
5325
|
marginTop: customVertyAlign ? `${customVertyAlign}` : ""
|
|
5217
5326
|
}
|
|
5218
5327
|
},
|
|
5219
|
-
/* @__PURE__ */
|
|
5220
|
-
/* @__PURE__ */
|
|
5221
|
-
/* @__PURE__ */
|
|
5328
|
+
/* @__PURE__ */ import_react40.default.createElement("div", { style: { backgroundColor: "red" } }),
|
|
5329
|
+
/* @__PURE__ */ import_react40.default.createElement("div", { style: { color: "white", fontSize: "1rem" } }, message),
|
|
5330
|
+
/* @__PURE__ */ import_react40.default.createElement(
|
|
5222
5331
|
import_Button5.default,
|
|
5223
5332
|
{
|
|
5224
5333
|
variant: "text",
|
|
@@ -5256,6 +5365,7 @@ function TestSnackbar({ isPopUpOpen, toggleOpen, type, message, customVertyAlign
|
|
|
5256
5365
|
WavelengthConfirmationModal,
|
|
5257
5366
|
WavelengthContentModal,
|
|
5258
5367
|
WavelengthContentPlaceholder,
|
|
5368
|
+
WavelengthDropdown,
|
|
5259
5369
|
WavelengthDropdownButton,
|
|
5260
5370
|
WavelengthExampleComponent,
|
|
5261
5371
|
WavelengthFileDownloader,
|