vueless 0.0.697 → 0.0.698

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 +8 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.697",
3
+ "version": "0.0.698",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
package/utils/theme.ts CHANGED
@@ -170,13 +170,6 @@ export function setTheme(config: Config = {}) {
170
170
  vuelessConfig.ringOffsetColorLight ??
171
171
  DEFAULT_RING_OFFSET_COLOR_LIGHT;
172
172
 
173
- isCSR && localStorage.setItem("brand", brand);
174
- isCSR && localStorage.setItem("gray", gray);
175
-
176
- if (brand === GRAYSCALE_COLOR) {
177
- brand = gray;
178
- }
179
-
180
173
  const colors: Colors = merge(
181
174
  TAILWIND_COLORS as Colors,
182
175
  tailwindConfig?.theme?.extend?.colors || {},
@@ -191,7 +184,7 @@ export function setTheme(config: Config = {}) {
191
184
  // eslint-disable-next-line no-console
192
185
  console.warn(`The brand color '${brand}' is missing in your palette.`);
193
186
 
194
- brand = DEFAULT_GRAY_COLOR;
187
+ brand = DEFAULT_BRAND_COLOR;
195
188
  }
196
189
 
197
190
  if (!isGrayColor) {
@@ -201,6 +194,9 @@ export function setTheme(config: Config = {}) {
201
194
  gray = DEFAULT_GRAY_COLOR;
202
195
  }
203
196
 
197
+ isCSR && localStorage.setItem("brand", brand);
198
+ isCSR && localStorage.setItem("gray", gray);
199
+
204
200
  return setRootCSSVariables({
205
201
  colors,
206
202
  brand,
@@ -240,6 +236,10 @@ function getRoundings(sm?: number, md?: number, lg?: number) {
240
236
  }
241
237
 
242
238
  function setRootCSSVariables(options: RootCSSVariableOptions) {
239
+ if (options.brand === GRAYSCALE_COLOR) {
240
+ options.brand = options.gray;
241
+ }
242
+
243
243
  const {
244
244
  colors,
245
245
  brand,