@xiaou66/u-styles 0.0.1 → 0.0.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.
package/dist/index.es.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { n as darkTheme, r as primitives, t as lightTheme } from "./light-BLV23cx0.mjs";
2
- import { t as applyTheme } from "./runtime-k8PUQFIG.mjs";
2
+ import { t as applyTheme } from "./runtime-BEbyNSBV.mjs";
3
3
  export { applyTheme, darkTheme, lightTheme, primitives };
@@ -1,9 +1,9 @@
1
1
  function applyTheme(e, t = {}) {
2
2
  let n = t.target ?? document.documentElement;
3
3
  if (e === "dark") {
4
- n.setAttribute("theme-mode", "dark");
4
+ n.setAttribute("theme-mode", "dark"), n.classList.add("dark");
5
5
  return;
6
6
  }
7
- n.removeAttribute("theme-mode");
7
+ n.removeAttribute("theme-mode"), n.classList.remove("dark");
8
8
  }
9
9
  export { applyTheme as t };
@@ -1,2 +1,2 @@
1
- import { t as applyTheme } from "./runtime-k8PUQFIG.mjs";
1
+ import { t as applyTheme } from "./runtime-BEbyNSBV.mjs";
2
2
  export { applyTheme };
package/dist/theme.css CHANGED
@@ -208,7 +208,7 @@
208
208
  --u-text-color-tips: var(--u-text-tips);
209
209
  }
210
210
 
211
- html[theme-mode="dark"] {
211
+ html[theme-mode="dark"], html.dark {
212
212
  --blue-1: 232, 247, 255;
213
213
  --blue-2: 195, 231, 254;
214
214
  --blue-3: 159, 212, 253;
package/dist/theme.less CHANGED
@@ -208,7 +208,7 @@
208
208
  --u-text-color-tips: var(--u-text-tips);
209
209
  }
210
210
 
211
- html[theme-mode="dark"] {
211
+ html[theme-mode="dark"], html.dark {
212
212
  --blue-1: 232, 247, 255;
213
213
  --blue-2: 195, 231, 254;
214
214
  --blue-3: 159, 212, 253;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaou66/u-styles",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Shared style tokens (TS-first) and theme assets",
5
5
  "main": "./dist/index.es.js",
6
6
  "module": "./dist/index.es.js",