@middag-io/react 0.26.0 → 0.26.2

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.
@@ -30,6 +30,12 @@ export declare function getStoredAppearance(): Appearance;
30
30
  /**
31
31
  * Apply resolved theme to DOM.
32
32
  * Sets data-theme on all .middag-root elements + class dark on <html> for Tailwind.
33
+ *
34
+ * Also syncs `color-scheme` on <html> so native form controls (text inputs,
35
+ * textareas, native selects, date/number pickers, autofill, scrollbars) render
36
+ * in the matching UA scheme. Without this, switching to dark leaves native
37
+ * widgets in the OS/UA light scheme — light foreground text on a light native
38
+ * background reads as invisible inside forms.
33
39
  */
34
40
  export declare function applyTheme(theme: EffectiveTheme): void;
35
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../../src/base/theme/appearance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CASxE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CAMhD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAOtD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAI1D;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,UAAU,CAK5C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,KAAK,GAAG,KAAK,CAOzC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAK9B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAarE"}
1
+ {"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../../src/base/theme/appearance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CASxE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CAMhD;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAQtD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAI1D;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,UAAU,CAK5C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,KAAK,GAAG,KAAK,CAOzC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAK9B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAarE"}
@@ -7899,7 +7899,7 @@ function sp() {
7899
7899
  return e === "light" || e === "dark" || e === "system" ? e : "system";
7900
7900
  }
7901
7901
  function cp(e) {
7902
- document.documentElement.classList.toggle("dark", e === "dark"), document.querySelectorAll(".middag-root").forEach((t) => {
7902
+ document.documentElement.classList.toggle("dark", e === "dark"), document.documentElement.style.colorScheme = e, document.querySelectorAll(".middag-root").forEach((t) => {
7903
7903
  t.setAttribute("data-theme", e);
7904
7904
  });
7905
7905
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middag-io/react",
3
- "version": "0.26.0",
3
+ "version": "0.26.2",
4
4
  "type": "module",
5
5
  "description": "MIDDAG shared React UI library for Moodle, WordPress and other Inertia hosts",
6
6
  "license": "Apache-2.0",