vueless 0.0.677 → 0.0.678

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/package.json +1 -1
  2. package/utils/theme.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.677",
3
+ "version": "0.0.678",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
package/utils/theme.ts CHANGED
@@ -100,11 +100,11 @@ export function setColorMode(colorMode: `${ColorMode}`) {
100
100
  }
101
101
 
102
102
  export function getSelectedBrandColor() {
103
- return localStorage.getItem("brand") || undefined;
103
+ return (isCSR && localStorage.getItem("brand")) || undefined;
104
104
  }
105
105
 
106
106
  export function getSelectedGrayColor() {
107
- return localStorage.getItem("gray") || undefined;
107
+ return (isCSR && localStorage.getItem("gray")) || undefined;
108
108
  }
109
109
 
110
110
  export function setTheme(config: Config = {}) {
@@ -138,8 +138,8 @@ export function setTheme(config: Config = {}) {
138
138
  const defaultGrayShade = isDarkMode ? 400 : 600;
139
139
  const defaultRingOffsetColor = isDarkMode ? ringOffsetColorDark : ringOffsetColorLight;
140
140
 
141
- localStorage.setItem("brand", brand);
142
- localStorage.setItem("gray", gray);
141
+ isCSR && localStorage.setItem("brand", brand);
142
+ isCSR && localStorage.setItem("gray", gray);
143
143
 
144
144
  if (gray === COOL_COLOR) {
145
145
  gray = GRAY_COLOR;