@wavelengthusaf/components 3.3.10 → 3.3.11
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 +4 -0
- package/dist/cjs/index.cjs +50 -52
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +27 -29
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.cts
CHANGED
|
@@ -318,9 +318,9 @@ interface WavelengthTitleBarProps {
|
|
|
318
318
|
titleText?: string;
|
|
319
319
|
subtitleText?: string;
|
|
320
320
|
textColor?: string;
|
|
321
|
-
|
|
321
|
+
shadowColor?: string;
|
|
322
322
|
}
|
|
323
|
-
declare function WavelengthTitleBar({ titleText, subtitleText, textColor,
|
|
323
|
+
declare function WavelengthTitleBar({ titleText, subtitleText, textColor, shadowColor }: WavelengthTitleBarProps): react_jsx_runtime.JSX.Element;
|
|
324
324
|
|
|
325
325
|
interface WavelengthBannerProps {
|
|
326
326
|
bannerText?: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -318,9 +318,9 @@ interface WavelengthTitleBarProps {
|
|
|
318
318
|
titleText?: string;
|
|
319
319
|
subtitleText?: string;
|
|
320
320
|
textColor?: string;
|
|
321
|
-
|
|
321
|
+
shadowColor?: string;
|
|
322
322
|
}
|
|
323
|
-
declare function WavelengthTitleBar({ titleText, subtitleText, textColor,
|
|
323
|
+
declare function WavelengthTitleBar({ titleText, subtitleText, textColor, shadowColor }: WavelengthTitleBarProps): react_jsx_runtime.JSX.Element;
|
|
324
324
|
|
|
325
325
|
interface WavelengthBannerProps {
|
|
326
326
|
bannerText?: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -2304,6 +2304,7 @@ var WavelengthTitleBar = class extends HTMLElement {
|
|
|
2304
2304
|
subtitle.classList.add("subtitle");
|
|
2305
2305
|
subtitle.textContent = this.getAttribute("subtitle-text") || "Default Subtitle";
|
|
2306
2306
|
const textColor = this.getAttribute("text-color") || "#34649b";
|
|
2307
|
+
const shadowColor = this.getAttribute("shadow-color");
|
|
2307
2308
|
const style3 = document.createElement("style");
|
|
2308
2309
|
style3.textContent = `
|
|
2309
2310
|
:host {
|
|
@@ -2316,7 +2317,7 @@ var WavelengthTitleBar = class extends HTMLElement {
|
|
|
2316
2317
|
.title {
|
|
2317
2318
|
font-family: "Goldman", sans-serif;
|
|
2318
2319
|
font-size: 3.75rem;
|
|
2319
|
-
text-shadow: 0.313rem 0.313rem 0.375rem
|
|
2320
|
+
${shadowColor ? `text-shadow: 0.313rem 0.313rem 0.375rem ${shadowColor};` : ""}
|
|
2320
2321
|
-webkit-text-stroke: 1px black;
|
|
2321
2322
|
letter-spacing: 0.07em;
|
|
2322
2323
|
user-select: none;
|
|
@@ -2346,35 +2347,32 @@ var WavelengthTitleBar = class extends HTMLElement {
|
|
|
2346
2347
|
}
|
|
2347
2348
|
}
|
|
2348
2349
|
static get observedAttributes() {
|
|
2349
|
-
return ["title-text", "subtitle-text", "text-color", "
|
|
2350
|
+
return ["title-text", "subtitle-text", "text-color", "shadow-color"];
|
|
2350
2351
|
}
|
|
2351
2352
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
2352
|
-
if (oldValue
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
if (subtitleElement)
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
titleElement.style.color = newValue;
|
|
2368
|
-
}
|
|
2369
|
-
if (subtitleElement) {
|
|
2370
|
-
subtitleElement.style.color = newValue;
|
|
2371
|
-
}
|
|
2372
|
-
} else if (name === "has-shadow") {
|
|
2373
|
-
const titleElement = this.shadowRoot?.querySelector(".title");
|
|
2353
|
+
if (oldValue === newValue) return;
|
|
2354
|
+
const titleElement = this.shadowRoot?.querySelector(".title");
|
|
2355
|
+
const subtitleElement = this.shadowRoot?.querySelector(".subtitle");
|
|
2356
|
+
switch (name) {
|
|
2357
|
+
case "title-text":
|
|
2358
|
+
if (titleElement) titleElement.textContent = newValue;
|
|
2359
|
+
break;
|
|
2360
|
+
case "subtitle-text":
|
|
2361
|
+
if (subtitleElement) subtitleElement.textContent = newValue;
|
|
2362
|
+
break;
|
|
2363
|
+
case "text-color":
|
|
2364
|
+
if (titleElement) titleElement.style.color = newValue;
|
|
2365
|
+
if (subtitleElement) subtitleElement.style.color = newValue;
|
|
2366
|
+
break;
|
|
2367
|
+
case "shadow-color":
|
|
2374
2368
|
if (titleElement) {
|
|
2375
|
-
|
|
2369
|
+
if (newValue) {
|
|
2370
|
+
titleElement.style.textShadow = `0.313rem 0.313rem 0.375rem ${newValue}`;
|
|
2371
|
+
} else {
|
|
2372
|
+
titleElement.style.textShadow = "";
|
|
2373
|
+
}
|
|
2376
2374
|
}
|
|
2377
|
-
|
|
2375
|
+
break;
|
|
2378
2376
|
}
|
|
2379
2377
|
}
|
|
2380
2378
|
};
|
|
@@ -6338,16 +6336,16 @@ function WavelengthFooter({ text, textColor }) {
|
|
|
6338
6336
|
// src/components/headers/WavelengthTitleBar/WavelengthTitleBar.tsx
|
|
6339
6337
|
import { useEffect as useEffect3, useRef as useRef4 } from "react";
|
|
6340
6338
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
6341
|
-
function WavelengthTitleBar2({ titleText, subtitleText, textColor,
|
|
6339
|
+
function WavelengthTitleBar2({ titleText, subtitleText, textColor, shadowColor }) {
|
|
6342
6340
|
const ref = useRef4(null);
|
|
6343
6341
|
useEffect3(() => {
|
|
6344
6342
|
if (ref.current) {
|
|
6345
6343
|
ref.current.setAttribute("title-text", titleText || "Default Title");
|
|
6346
6344
|
ref.current.setAttribute("subtitle-text", subtitleText || "Default Subtitle");
|
|
6347
6345
|
ref.current.setAttribute("text-color", textColor || "#34649b");
|
|
6348
|
-
ref.current.setAttribute("
|
|
6346
|
+
ref.current.setAttribute("shadow-color", shadowColor || "");
|
|
6349
6347
|
}
|
|
6350
|
-
}, [titleText, subtitleText, textColor,
|
|
6348
|
+
}, [titleText, subtitleText, textColor, shadowColor]);
|
|
6351
6349
|
return /* @__PURE__ */ jsx22("wavelength-title-bar", { ref });
|
|
6352
6350
|
}
|
|
6353
6351
|
|