vueless 0.0.656 → 0.0.657

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.
@@ -95,7 +95,7 @@ export default function useUI<T>(
95
95
 
96
96
  classes = classes.replaceAll(EXTENDS_PATTERN_REG_EXP, "");
97
97
 
98
- return color ? setColor(classes, color) : classes;
98
+ return color && !getNestedComponent(value) ? setColor(classes, color) : classes;
99
99
  });
100
100
  }
101
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.656",
3
+ "version": "0.0.657",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -3,7 +3,6 @@ export default /*tw*/ {
3
3
  base: "{UButton} font-normal",
4
4
  defaults: {
5
5
  variant: "thirdary",
6
- color: "brand",
7
6
  },
8
7
  },
9
8
  toggleButtonInactive: "{>toggleButton} text-gray-900",
@@ -214,7 +214,9 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
214
214
  const fileContent = await readFile(file, "utf-8");
215
215
  const isDefaultConfig = isDefaultComponentConfig(file, componentName);
216
216
  const componentRegExp = new RegExp(`<${componentName}[^>]+>`, "g");
217
+ const componentExtendExp = new RegExp(`{${componentName}}`, "g");
217
218
  const matchedComponent = fileContent.match(componentRegExp);
219
+ const matchedExtendComponent = fileContent.match(componentExtendExp);
218
220
 
219
221
  if (!isComponentExists) {
220
222
  isComponentExists = Boolean(matchedComponent);
@@ -228,6 +230,14 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
228
230
  });
229
231
  }
230
232
 
233
+ if (matchedExtendComponent) {
234
+ const objectColors = objectColorRegExp.exec(fileContent) || [];
235
+
236
+ objectColors.forEach((color) => {
237
+ if (color) colors.add(color);
238
+ });
239
+ }
240
+
231
241
  /* Collect color from U[Component] */
232
242
  matchedComponent?.forEach((match) => {
233
243
  const [, singleColor] = singleColorRegExp.exec(match) || [];