vueless 0.0.733 → 0.0.735
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/composables/useUI.ts +17 -4
- package/package.json +1 -1
- package/types.ts +1 -0
package/composables/useUI.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
STRATEGY_TYPE,
|
|
7
7
|
CVA_CONFIG_KEY,
|
|
8
8
|
SYSTEM_CONFIG_KEY,
|
|
9
|
-
DEFAULT_BASE_CLASSES,
|
|
9
|
+
// DEFAULT_BASE_CLASSES,
|
|
10
10
|
EXTENDS_PATTERN_REG_EXP,
|
|
11
11
|
NESTED_COMPONENT_PATTERN_REG_EXP,
|
|
12
12
|
} from "../constants.js";
|
|
@@ -90,7 +90,9 @@ export default function useUI<T>(
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
if (key === (topLevelClassKey || firstClassKey)) {
|
|
93
|
-
classes = cx([
|
|
93
|
+
classes = cx([classes]);
|
|
94
|
+
// TODO: It will be fixed soon
|
|
95
|
+
//classes = cx([DEFAULT_BASE_CLASSES, vuelessConfig.baseClasses, classes]);
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
classes = classes.replaceAll(EXTENDS_PATTERN_REG_EXP, "");
|
|
@@ -149,6 +151,7 @@ export default function useUI<T>(
|
|
|
149
151
|
|
|
150
152
|
const commonAttrs: KeyAttrs = {
|
|
151
153
|
...(isTopLevelKey ? attrs : {}),
|
|
154
|
+
"data-vl-root": isTopLevelKey || null,
|
|
152
155
|
"data-vl-child": attrs["data-vl-child"] ? null : true,
|
|
153
156
|
"vl-component": isDev ? attrs["vl-component"] || componentName || null : null,
|
|
154
157
|
"vl-key": isDev ? attrs["vl-key"] || configKey || null : null,
|
|
@@ -156,11 +159,21 @@ export default function useUI<T>(
|
|
|
156
159
|
"vl-child-key": isDev && attrs["vl-component"] ? configKey : null,
|
|
157
160
|
};
|
|
158
161
|
|
|
159
|
-
const topLevelClasses = (!attrs["data-vl-child"] && commonAttrs.class) || "";
|
|
160
|
-
|
|
161
162
|
/* Delete value key to prevent v-model overwrite. */
|
|
162
163
|
delete commonAttrs.value;
|
|
163
164
|
|
|
165
|
+
let topLevelClasses;
|
|
166
|
+
|
|
167
|
+
if (!commonAttrs["data-vl-child"] && !attrs["data-vl-root"]) {
|
|
168
|
+
topLevelClasses = commonAttrs.class || "";
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// console.log(configKey, isTopLevelKey, commonAttrs["data-vl-child"], attrs["data-vl-root"]);
|
|
172
|
+
|
|
173
|
+
if (isTopLevelKey) {
|
|
174
|
+
topLevelClasses = attrs.class;
|
|
175
|
+
}
|
|
176
|
+
|
|
164
177
|
vuelessAttrs.value = {
|
|
165
178
|
...commonAttrs,
|
|
166
179
|
class: cx([...extendsClasses, toValue(classes), topLevelClasses]),
|
package/package.json
CHANGED
package/types.ts
CHANGED