vueless 0.0.333 → 0.0.334
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 +1 -1
- package/utils/utilUI.js +18 -5
- package/web-types.json +1 -1
package/package.json
CHANGED
package/utils/utilUI.js
CHANGED
|
@@ -56,17 +56,30 @@ const twMerge = extendTailwindMerge(
|
|
|
56
56
|
);
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
Export cva (class variance authority) methods:
|
|
60
|
+
* extended with tailwind-merge
|
|
61
|
+
* remove all Vueless nested component names ({U...} strings) from class list string.
|
|
62
|
+
Learn more here: https://beta.cva.style
|
|
63
63
|
*/
|
|
64
|
-
export const {
|
|
64
|
+
export const {
|
|
65
|
+
cx,
|
|
66
|
+
compose,
|
|
67
|
+
cva: classVarianceAuthority,
|
|
68
|
+
} = defineConfig({
|
|
65
69
|
hooks: {
|
|
66
70
|
onComplete: (classNames) => twMerge(classNames).replace(NESTED_COMPONENT_REG_EXP, ""),
|
|
67
71
|
},
|
|
68
72
|
});
|
|
69
73
|
|
|
74
|
+
/* This allows skipping some CVA config keys in vueless config. */
|
|
75
|
+
export const cva = ({ base = "", variants = {}, compoundVariants = [], defaultVariants = {} }) =>
|
|
76
|
+
classVarianceAuthority({
|
|
77
|
+
base,
|
|
78
|
+
variants,
|
|
79
|
+
compoundVariants,
|
|
80
|
+
defaultVariants,
|
|
81
|
+
});
|
|
82
|
+
|
|
70
83
|
/**
|
|
71
84
|
Return default values for component props, icons, etc..
|
|
72
85
|
@param { Object } defaultConfig
|