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.
Files changed (2) hide show
  1. package/components.js +16 -8
  2. 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
- :host {
41752
- /* Inject MUI Joy CSS variables into shadow root */
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
- /* Set color scheme attribute for proper theme application */
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
- :host {
86393
- /* Inject MUI Joy CSS variables into shadow root */
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
- /* Set color scheme attribute for proper theme application */
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-frontend-components",
3
- "version": "0.0.31-RC1",
3
+ "version": "0.0.31-RC2",
4
4
  "description": "Various user centric components for Fans United features",
5
5
  "main": "components.js",
6
6
  "types": "components.d.ts",