@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 CHANGED
@@ -14,44 +14,54 @@ npm install @wavelengthusaf/components
14
14
 
15
15
  ## Release Notes
16
16
 
17
+ ### 2.7.3
18
+
19
+ - 4/8/2025
20
+ - Updated `WavelengthBanner` with various tweaks; added several props
21
+
22
+ ### 2.7.2
23
+
24
+ - 4/4/2025
25
+ - Updated `WavelengthTitleBar` to be a standard `<div>` instead of an svg. Also added several props for further customization.
26
+
17
27
  ### 2.7.1
18
28
 
19
29
  - 4/1/2025
20
- - Updated WavelengthTextField component to have another variant.
30
+ - Updated `WavelengthTextField` component to have another variant.
21
31
 
22
32
  ### 2.7.0
23
33
 
24
34
  - 3/24/2025
25
- - Added a Comment Component
35
+ - Added the `WavelengthCommentDisplay` component
26
36
 
27
37
  ### 2.6.0
28
38
 
29
- - Added a new component, WavelengthProgressBar
39
+ - Added a new component, `WavelengthProgressBar`
30
40
 
31
41
  ### 2.5.1
32
42
 
33
43
  - 03/12/2025
34
- - Added shrink prop to text field component
44
+ - Added shrink prop to `WavelengthTextField` component
35
45
  - Changed message prop in the snackbar component to be a react or jsx element
36
46
 
37
47
  ### 2.5.0
38
48
 
39
49
  - 03/06/2025
40
- - Added a new component, WavelengthDragAndDrop
41
- - Updated WavelengthTextField component to take in a prop called type
50
+ - Added a new component, `WavelengthDragAndDrop`
51
+ - Updated `WavelengthTextField` component to take in a prop called type
42
52
 
43
53
  ### 2.4.0
44
54
 
45
55
  - 03/03/2025
46
- - Added 2 new components, WavelengthStyledButton, and WavelengthTextField
56
+ - Added 2 new components, `WavelengthStyledButton`, and `WavelengthTextField`
47
57
  - Updated the confirmation modal to include more props making it more customizable
48
58
  - Updated documentation to reflect these changes
49
59
 
50
60
  ### 2.3.5
51
61
 
52
- - Updated WavelengthDropdown by adding default values to some of the props
62
+ - Updated `WavelengthDropdown` by adding default values to some of the props
53
63
  - Fixed bugs related to WavelengthSearchbar, no longer 2 closing icons for some configurations
54
- - Updated WavelengthPopupMenu , each list item can have a hover color for text, also fixed underlining of link type issue
64
+ - Updated `WavelengthPopupMenu`, each list item can have a hover color for text, also fixed underlining of link type issue
55
65
  - Standard Snackbar is not aligned properly, the Snackbars with icons are also aligned properly
56
66
 
57
67
  ### 2.3.4
@@ -4989,50 +4989,75 @@ function WavelengthTitleBar2({ titleText, subtitleText, textColor, textShadow })
4989
4989
 
4990
4990
  // src/components/headers/WavelengthTitleBar/WavelengthBanner.tsx
4991
4991
 
4992
- function WavelengthBanner({ classification, control, headerColor, textColor, id }) {
4993
- const palette2 = getPalette();
4994
- if (classification === "unclassified") {
4995
- if (control && control.includes("cui")) {
4996
- headerColor = headerColor ? headerColor : "#502b85";
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;
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
- if (control && control.length === 0) {
5026
- classification = `${classification}`;
5027
- } else if (control && control.length === 1) {
5028
- classification = `${classification}//${control[0]}`;
5029
- } else if (control) {
5030
- classification = `${classification}//${control[0]}`;
5031
- for (let i = 1; i < control.length; i++) {
5032
- classification = `${classification}/${control[i]}`;
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
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { width: "100%", backgroundColor: headerColor }, id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { width: "100%", color: textColor, textAlign: "center" }, children: classification.toUpperCase() }) });
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
+
5048
+ function WavelengthBanner2({ headerText = "CLASSIFICATION//CONTROL", headerColor = "#000000", textColor = "#FFFFFF", opacity = 1, zIndex = 10, id }) {
5049
+ const ref = _react.useRef.call(void 0, null);
5050
+ _react.useEffect.call(void 0, () => {
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__ */ _jsxruntime.jsx.call(void 0, "wavelength-banner", { ref });
5036
5061
  }
5037
5062
 
5038
5063
  // src/components/CSFD/ManyPlanes.tsx
@@ -6268,7 +6293,7 @@ function WavelengthTextField(props) {
6268
6293
 
6269
6294
 
6270
6295
 
6271
- exports.AppLogo = AppLogo; exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.DefaultCarousel = DefaultCarousel; exports.DefaultIcon = DefaultIcon; exports.DefaultPagination = DefaultPagination; exports.ManyPlanesComponent = ManyPlanesComponent; exports.NotAvailablePage = NotAvailablePage; exports.SearchTextField = SearchTextField; exports.SliderCardCarousel = SliderCardCarousel; exports.TestSnackbar = TestSnackbar; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
6296
+ exports.AppLogo = AppLogo; exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.DefaultCarousel = DefaultCarousel; exports.DefaultIcon = DefaultIcon; exports.DefaultPagination = DefaultPagination; exports.ManyPlanesComponent = ManyPlanesComponent; exports.NotAvailablePage = NotAvailablePage; exports.SearchTextField = SearchTextField; exports.SliderCardCarousel = SliderCardCarousel; exports.TestSnackbar = TestSnackbar; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
6272
6297
  /*! Bundled license information:
6273
6298
 
6274
6299
  react-is/cjs/react-is.production.min.js: