vueless 0.0.659 → 0.0.661
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/package.json
CHANGED
package/ui.form-input/UInput.vue
CHANGED
|
@@ -198,8 +198,10 @@ function transformValue(value: string | number, exp: string | RegExp) {
|
|
|
198
198
|
return matches ? matches.join("") : "";
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
useMutationObserver(leftSlotWrapperRef, (mutations) => {
|
|
202
|
-
|
|
201
|
+
useMutationObserver(leftSlotWrapperRef, (mutations) => mutations.forEach(setLabelPosition), {
|
|
202
|
+
childList: true,
|
|
203
|
+
characterData: true,
|
|
204
|
+
subtree: true,
|
|
203
205
|
});
|
|
204
206
|
|
|
205
207
|
function setLabelPosition() {
|
|
@@ -154,8 +154,10 @@ function toggleReadonly(hasReadonly: boolean) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
useMutationObserver(leftSlotWrapperRef, (mutations) => {
|
|
158
|
-
|
|
157
|
+
useMutationObserver(leftSlotWrapperRef, (mutations) => mutations.forEach(setLabelPosition), {
|
|
158
|
+
childList: true,
|
|
159
|
+
characterData: true,
|
|
160
|
+
subtree: true,
|
|
159
161
|
});
|
|
160
162
|
|
|
161
163
|
function setLabelPosition() {
|
|
@@ -222,6 +222,10 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
|
|
|
222
222
|
isComponentExists = Boolean(matchedComponent);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
const propsColors = getPropsColors(fileContent);
|
|
226
|
+
|
|
227
|
+
propsColors.forEach((color) => colors.add(color));
|
|
228
|
+
|
|
225
229
|
if (isDefaultConfig) {
|
|
226
230
|
fileContent.match(objectColorRegExp)?.forEach((colorMatch) => {
|
|
227
231
|
const [, color] = objectColorRegExp.exec(colorMatch) || [];
|
|
@@ -260,6 +264,16 @@ async function findComponentColors(componentName, files, vuelessConfigFiles) {
|
|
|
260
264
|
};
|
|
261
265
|
}
|
|
262
266
|
|
|
267
|
+
function getPropsColors(inputString) {
|
|
268
|
+
const colorsMatch = inputString.match(/colors:\s*\[(.*?)\]/s);
|
|
269
|
+
|
|
270
|
+
if (colorsMatch && colorsMatch[1]) {
|
|
271
|
+
return colorsMatch[1].split(",").map((color) => color.trim().replace(/['"]/g, ""));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return [];
|
|
275
|
+
}
|
|
276
|
+
|
|
263
277
|
function isDefaultComponentConfig(filePath, componentName) {
|
|
264
278
|
const componentDirName = filePath.split(path.sep).at(-2);
|
|
265
279
|
|