@wavelengthusaf/components 2.7.2 → 2.7.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/README.md +19 -9
- package/dist/cjs/index.cjs +68 -43
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +4 -3
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +74 -49
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.cts
CHANGED
|
@@ -270,13 +270,14 @@ interface WavelengthTitleBarProps {
|
|
|
270
270
|
declare function WavelengthTitleBar({ titleText, subtitleText, textColor, textShadow }: WavelengthTitleBarProps): react_jsx_runtime.JSX.Element;
|
|
271
271
|
|
|
272
272
|
interface WavelengthBannerProps {
|
|
273
|
-
|
|
274
|
-
control?: ("cui" | "sci" | "fouo" | "nf" | "propin" | "frd" | "gbr s" | "si" | "si-g" | "tk" | "relido" | "rd" | "rd-n" | "rel" | "fvey" | "hcs" | string)[];
|
|
273
|
+
headerText?: string;
|
|
275
274
|
headerColor?: string;
|
|
276
275
|
textColor?: string;
|
|
276
|
+
opacity?: string | number;
|
|
277
|
+
zIndex?: string | number;
|
|
277
278
|
id?: string;
|
|
278
279
|
}
|
|
279
|
-
declare function WavelengthBanner({
|
|
280
|
+
declare function WavelengthBanner({ headerText, headerColor, textColor, opacity, zIndex, id }: WavelengthBannerProps): react_jsx_runtime.JSX.Element;
|
|
280
281
|
|
|
281
282
|
interface AppLogoProps {
|
|
282
283
|
width?: number;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -270,13 +270,14 @@ interface WavelengthTitleBarProps {
|
|
|
270
270
|
declare function WavelengthTitleBar({ titleText, subtitleText, textColor, textShadow }: WavelengthTitleBarProps): react_jsx_runtime.JSX.Element;
|
|
271
271
|
|
|
272
272
|
interface WavelengthBannerProps {
|
|
273
|
-
|
|
274
|
-
control?: ("cui" | "sci" | "fouo" | "nf" | "propin" | "frd" | "gbr s" | "si" | "si-g" | "tk" | "relido" | "rd" | "rd-n" | "rel" | "fvey" | "hcs" | string)[];
|
|
273
|
+
headerText?: string;
|
|
275
274
|
headerColor?: string;
|
|
276
275
|
textColor?: string;
|
|
276
|
+
opacity?: string | number;
|
|
277
|
+
zIndex?: string | number;
|
|
277
278
|
id?: string;
|
|
278
279
|
}
|
|
279
|
-
declare function WavelengthBanner({
|
|
280
|
+
declare function WavelengthBanner({ headerText, headerColor, textColor, opacity, zIndex, id }: WavelengthBannerProps): react_jsx_runtime.JSX.Element;
|
|
280
281
|
|
|
281
282
|
interface AppLogoProps {
|
|
282
283
|
width?: number;
|
package/dist/esm/index.js
CHANGED
|
@@ -4988,51 +4988,76 @@ function WavelengthTitleBar2({ titleText, subtitleText, textColor, textShadow })
|
|
|
4988
4988
|
}
|
|
4989
4989
|
|
|
4990
4990
|
// src/components/headers/WavelengthTitleBar/WavelengthBanner.tsx
|
|
4991
|
-
import {
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
textColor = textColor ? textColor : "white";
|
|
4998
|
-
}
|
|
4999
|
-
headerColor = headerColor ? headerColor : "#007a33";
|
|
5000
|
-
textColor = textColor ? textColor : "white";
|
|
5001
|
-
} else if (classification === "controlled" || classification === "controlled unclassified information" || classification === "cui" || classification === "u") {
|
|
5002
|
-
headerColor = headerColor ? headerColor : "#502b85";
|
|
5003
|
-
textColor = textColor ? textColor : "white";
|
|
5004
|
-
} else if (classification === "confidential" || classification === "c") {
|
|
5005
|
-
headerColor = headerColor ? headerColor : "#0033a0";
|
|
5006
|
-
textColor = textColor ? textColor : "white";
|
|
5007
|
-
} else if (classification === "secret" || classification === "s") {
|
|
5008
|
-
headerColor = headerColor ? headerColor : "#c8102e";
|
|
5009
|
-
textColor = textColor ? textColor : "white";
|
|
5010
|
-
} else if (classification === "top secret" || classification === "ts") {
|
|
5011
|
-
if (control && control.includes("sci")) {
|
|
5012
|
-
headerColor = headerColor ? headerColor : "#fce83a";
|
|
5013
|
-
textColor = textColor ? textColor : "black";
|
|
5014
|
-
}
|
|
5015
|
-
headerColor = headerColor ? headerColor : "#ff8c00";
|
|
5016
|
-
textColor = textColor ? textColor : "black";
|
|
5017
|
-
} else if (classification === "" || classification === null || classification === void 0) {
|
|
5018
|
-
classification = "CLASSIFICATION//CONTROL";
|
|
5019
|
-
headerColor = palette2.primary;
|
|
5020
|
-
textColor = palette2.secondary;
|
|
5021
|
-
} else {
|
|
5022
|
-
headerColor = headerColor ? headerColor : palette2.primary;
|
|
5023
|
-
textColor = textColor ? textColor : palette2.secondary;
|
|
4991
|
+
import { useEffect as useEffect2, useRef as useRef3 } from "react";
|
|
4992
|
+
|
|
4993
|
+
// src/web-components/wavelength-banner.tsx
|
|
4994
|
+
var WavelengthBanner = class extends HTMLElement {
|
|
4995
|
+
static get observedAttributes() {
|
|
4996
|
+
return ["header-text", "header-color", "text-color", "opacity", "z-index", "id"];
|
|
5024
4997
|
}
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
4998
|
+
constructor() {
|
|
4999
|
+
super();
|
|
5000
|
+
const shadow = this.attachShadow({ mode: "open" });
|
|
5001
|
+
const style3 = document.createElement("style");
|
|
5002
|
+
style3.textContent = `
|
|
5003
|
+
:host {
|
|
5004
|
+
display: block;
|
|
5005
|
+
width: 100%;
|
|
5006
|
+
}
|
|
5007
|
+
|
|
5008
|
+
.banner {
|
|
5009
|
+
width: 100%;
|
|
5010
|
+
text-align: center;
|
|
5011
|
+
font-weight: normal;
|
|
5012
|
+
font-family: sans-serif;
|
|
5013
|
+
font-size: 1rem;
|
|
5014
|
+
}
|
|
5015
|
+
`;
|
|
5016
|
+
this.container = document.createElement("div");
|
|
5017
|
+
this.container.classList.add("banner");
|
|
5018
|
+
this.textElement = document.createElement("p");
|
|
5019
|
+
this.container.appendChild(this.textElement);
|
|
5020
|
+
shadow.appendChild(style3);
|
|
5021
|
+
shadow.appendChild(this.container);
|
|
5034
5022
|
}
|
|
5035
|
-
|
|
5023
|
+
connectedCallback() {
|
|
5024
|
+
this.updateAttributes();
|
|
5025
|
+
}
|
|
5026
|
+
attributeChangedCallback() {
|
|
5027
|
+
this.updateAttributes();
|
|
5028
|
+
}
|
|
5029
|
+
updateAttributes() {
|
|
5030
|
+
const headerText = this.getAttribute("header-text") || "CLASSIFICATION//CONTROL";
|
|
5031
|
+
const headerColor = this.getAttribute("header-color") || "#4373aa";
|
|
5032
|
+
const textColor = this.getAttribute("text-color") || "#ffffff";
|
|
5033
|
+
const opacity = this.getAttribute("opacity") || "1";
|
|
5034
|
+
const zIndex = this.getAttribute("z-index") || "10";
|
|
5035
|
+
const id = this.getAttribute("id");
|
|
5036
|
+
this.container.style.backgroundColor = headerColor;
|
|
5037
|
+
this.container.style.opacity = opacity;
|
|
5038
|
+
this.container.style.zIndex = zIndex;
|
|
5039
|
+
if (id) this.container.id = id;
|
|
5040
|
+
this.textElement.textContent = headerText.toUpperCase();
|
|
5041
|
+
this.textElement.style.color = textColor;
|
|
5042
|
+
}
|
|
5043
|
+
};
|
|
5044
|
+
customElements.define("wavelength-banner", WavelengthBanner);
|
|
5045
|
+
|
|
5046
|
+
// src/components/headers/WavelengthTitleBar/WavelengthBanner.tsx
|
|
5047
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
5048
|
+
function WavelengthBanner2({ headerText = "CLASSIFICATION//CONTROL", headerColor = "#000000", textColor = "#FFFFFF", opacity = 1, zIndex = 10, id }) {
|
|
5049
|
+
const ref = useRef3(null);
|
|
5050
|
+
useEffect2(() => {
|
|
5051
|
+
if (ref.current) {
|
|
5052
|
+
ref.current.setAttribute("header-text", headerText);
|
|
5053
|
+
ref.current.setAttribute("header-color", headerColor);
|
|
5054
|
+
ref.current.setAttribute("text-color", textColor);
|
|
5055
|
+
ref.current.setAttribute("opacity", String(opacity));
|
|
5056
|
+
ref.current.setAttribute("z-index", String(zIndex));
|
|
5057
|
+
if (id) ref.current.setAttribute("id", id);
|
|
5058
|
+
}
|
|
5059
|
+
}, [headerText, headerColor, textColor, opacity, zIndex, id]);
|
|
5060
|
+
return /* @__PURE__ */ jsx20("wavelength-banner", { ref });
|
|
5036
5061
|
}
|
|
5037
5062
|
|
|
5038
5063
|
// src/components/CSFD/ManyPlanes.tsx
|
|
@@ -5553,11 +5578,11 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
5553
5578
|
// src/components/snackbars/TestSnackbar.tsx
|
|
5554
5579
|
import Box6 from "@mui/material/Box";
|
|
5555
5580
|
import Button5 from "@mui/material/Button";
|
|
5556
|
-
import { useEffect as
|
|
5581
|
+
import { useEffect as useEffect3, useRef as useRef4 } from "react";
|
|
5557
5582
|
import { Fragment as Fragment12, jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5558
5583
|
var useOutsideClick = (callback) => {
|
|
5559
|
-
const ref =
|
|
5560
|
-
|
|
5584
|
+
const ref = useRef4(null);
|
|
5585
|
+
useEffect3(() => {
|
|
5561
5586
|
const handleClickOutside = (event) => {
|
|
5562
5587
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
5563
5588
|
callback();
|
|
@@ -5709,7 +5734,7 @@ var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight,
|
|
|
5709
5734
|
};
|
|
5710
5735
|
|
|
5711
5736
|
// src/components/carousels/sliderCarousel.tsx
|
|
5712
|
-
import { useState as useState5, useEffect as
|
|
5737
|
+
import { useState as useState5, useEffect as useEffect5 } from "react";
|
|
5713
5738
|
import Grid6 from "@mui/material/Grid";
|
|
5714
5739
|
import Card2 from "@mui/material/Card";
|
|
5715
5740
|
import CardContent2 from "@mui/material/CardContent";
|
|
@@ -5720,7 +5745,7 @@ var delay = 2500;
|
|
|
5720
5745
|
var SliderCardCarousel = ({ items, cardHeight, cardWidth, contHeight, contWidth }) => {
|
|
5721
5746
|
const [index, setIndex] = useState5(0);
|
|
5722
5747
|
const [isHovered, setIsHovered] = useState5(false);
|
|
5723
|
-
|
|
5748
|
+
useEffect5(() => {
|
|
5724
5749
|
setTimeout(() => setIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1), delay);
|
|
5725
5750
|
return () => {
|
|
5726
5751
|
};
|
|
@@ -6235,7 +6260,7 @@ export {
|
|
|
6235
6260
|
TestSnackbar,
|
|
6236
6261
|
WavelengthAppTheme,
|
|
6237
6262
|
WavelengthAutocomplete,
|
|
6238
|
-
WavelengthBanner,
|
|
6263
|
+
WavelengthBanner2 as WavelengthBanner,
|
|
6239
6264
|
WavelengthBox,
|
|
6240
6265
|
WavelengthButton,
|
|
6241
6266
|
WavelengthCommentDisplay,
|