fansunited-frontend-components 0.0.31-RC1 → 0.0.31-RC2
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/components.js +16 -8
- package/package.json +1 -1
package/components.js
CHANGED
|
@@ -41741,18 +41741,22 @@ const rQ = (e) => {
|
|
|
41741
41741
|
o(!1);
|
|
41742
41742
|
};
|
|
41743
41743
|
}, []), mt.useEffect(() => {
|
|
41744
|
-
if (!s.current || !t) return;
|
|
41744
|
+
if (!s.current || !t || !d.current) return;
|
|
41745
41745
|
const C = (p == null ? void 0 : p.mode) || "light", v = mv(p);
|
|
41746
41746
|
u.current && s.current.contains(u.current) && s.current.removeChild(u.current);
|
|
41747
41747
|
const I = document.createElement("style");
|
|
41748
41748
|
I.setAttribute("data-joy-theme", C);
|
|
41749
41749
|
const b = aQ(v, C);
|
|
41750
41750
|
return I.textContent = `
|
|
41751
|
-
|
|
41752
|
-
|
|
41751
|
+
/* Apply CSS variables to the root element with data-joy-color-scheme */
|
|
41752
|
+
[data-joy-color-scheme="${C}"] {
|
|
41753
41753
|
${b}
|
|
41754
|
+
color-scheme: ${C};
|
|
41755
|
+
}
|
|
41754
41756
|
|
|
41755
|
-
|
|
41757
|
+
/* Fallback: also apply to :host for any styles that reference it */
|
|
41758
|
+
:host {
|
|
41759
|
+
${b}
|
|
41756
41760
|
color-scheme: ${C};
|
|
41757
41761
|
}
|
|
41758
41762
|
|
|
@@ -86382,18 +86386,22 @@ const Qne = (e) => {
|
|
|
86382
86386
|
n(!1);
|
|
86383
86387
|
};
|
|
86384
86388
|
}, []), mt.useEffect(() => {
|
|
86385
|
-
if (!d.current || !o) return;
|
|
86389
|
+
if (!d.current || !o || !c.current) return;
|
|
86386
86390
|
const C = (f == null ? void 0 : f.mode) || "light", v = D1(f);
|
|
86387
86391
|
A.current && d.current.contains(A.current) && d.current.removeChild(A.current);
|
|
86388
86392
|
const I = document.createElement("style");
|
|
86389
86393
|
I.setAttribute("data-joy-theme", C);
|
|
86390
86394
|
const b = Vne(v, C);
|
|
86391
86395
|
return I.textContent = `
|
|
86392
|
-
|
|
86393
|
-
|
|
86396
|
+
/* Apply CSS variables to the root element with data-joy-color-scheme */
|
|
86397
|
+
[data-joy-color-scheme="${C}"] {
|
|
86394
86398
|
${b}
|
|
86399
|
+
color-scheme: ${C};
|
|
86400
|
+
}
|
|
86395
86401
|
|
|
86396
|
-
|
|
86402
|
+
/* Fallback: also apply to :host for any styles that reference it */
|
|
86403
|
+
:host {
|
|
86404
|
+
${b}
|
|
86397
86405
|
color-scheme: ${C};
|
|
86398
86406
|
}
|
|
86399
86407
|
|