vueless 0.0.732 → 0.0.734

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.
@@ -149,6 +149,7 @@ export default function useUI<T>(
149
149
 
150
150
  const commonAttrs: KeyAttrs = {
151
151
  ...(isTopLevelKey ? attrs : {}),
152
+ "data-vl-root": isTopLevelKey || null,
152
153
  "data-vl-child": attrs["data-vl-child"] ? null : true,
153
154
  "vl-component": isDev ? attrs["vl-component"] || componentName || null : null,
154
155
  "vl-key": isDev ? attrs["vl-key"] || configKey || null : null,
@@ -156,11 +157,15 @@ export default function useUI<T>(
156
157
  "vl-child-key": isDev && attrs["vl-component"] ? configKey : null,
157
158
  };
158
159
 
159
- const topLevelClasses = (!attrs["data-vl-child"] && commonAttrs.class) || "";
160
-
161
160
  /* Delete value key to prevent v-model overwrite. */
162
161
  delete commonAttrs.value;
163
162
 
163
+ let topLevelClasses;
164
+
165
+ if (!commonAttrs["data-vl-child"] && !attrs["data-vl-root"]) {
166
+ topLevelClasses = commonAttrs.class || "";
167
+ }
168
+
164
169
  vuelessAttrs.value = {
165
170
  ...commonAttrs,
166
171
  class: cx([...extendsClasses, toValue(classes), topLevelClasses]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.732",
3
+ "version": "0.0.734",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
package/types.ts CHANGED
@@ -310,6 +310,7 @@ export type KeyAttrsWithConfig<T> = {
310
310
  } & KeyAttrs;
311
311
 
312
312
  export interface KeyAttrs extends VueAttrs {
313
+ "data-vl-root"?: boolean | null;
313
314
  "data-vl-child"?: boolean | null;
314
315
  "vl-component"?: string | null;
315
316
  "vl-key"?: string | null;
@@ -28,6 +28,9 @@ if (isSSR) {
28
28
 
29
29
  if (isCSR) {
30
30
  tailwindConfig = Object.values(
31
- import.meta.glob("/tailwind.config.{js,ts}", { eager: true, import: "default" }),
31
+ import.meta.glob(["/tailwind.config.{js,ts}", "/**/tailwind.config.{js,ts}"], {
32
+ eager: true,
33
+ import: "default",
34
+ }),
32
35
  )[0] as Config;
33
36
  }
package/utils/ui.ts CHANGED
@@ -58,7 +58,10 @@ if (isSSR) {
58
58
  if (isCSR) {
59
59
  vuelessConfig =
60
60
  Object.values(
61
- import.meta.glob("/vueless.config.{js,ts}", { eager: true, import: "default" }),
61
+ import.meta.glob(["/vueless.config.{js,ts}", "/**/vueless.config.{js,ts}"], {
62
+ eager: true,
63
+ import: "default",
64
+ }),
62
65
  )[0] || {};
63
66
  }
64
67