@nexdom/uimed-vue 2.0.0-beta.46 → 2.0.0-beta.47
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/dist/components.js +6 -4
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -1005,7 +1005,7 @@ function useVuetifyTextColor(color) {
|
|
|
1005
1005
|
//#region src/composables/button/button.ts
|
|
1006
1006
|
const buttonVariantToVuetifyVariant = {
|
|
1007
1007
|
primary: "elevated",
|
|
1008
|
-
secondary: "
|
|
1008
|
+
secondary: "outlined",
|
|
1009
1009
|
ghost: "text"
|
|
1010
1010
|
};
|
|
1011
1011
|
function useButtonVariant(variant) {
|
|
@@ -1034,13 +1034,15 @@ function useButtonType(type, route, blocked) {
|
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
1036
|
/**
|
|
1037
|
-
* Maps the button's color to Vuetify's.
|
|
1038
|
-
* which takes the color's text shade to keep WCAG AA's contrast.
|
|
1037
|
+
* Maps the button's color to Vuetify's. Secondary (outlined) and ghost buttons have no fill, so
|
|
1038
|
+
* their color is the text's, which takes the color's text shade to keep WCAG AA's contrast.
|
|
1039
1039
|
*/
|
|
1040
1040
|
function useButtonColor(color, variant) {
|
|
1041
1041
|
const fillColor = useVuetifyColor(color);
|
|
1042
1042
|
const textColor = useVuetifyTextColor(color);
|
|
1043
|
-
return computed(() =>
|
|
1043
|
+
return computed(() => {
|
|
1044
|
+
return toValue(variant) === "secondary" || toValue(variant) === "ghost" ? textColor.value : fillColor.value;
|
|
1045
|
+
});
|
|
1044
1046
|
}
|
|
1045
1047
|
/**
|
|
1046
1048
|
* The button's `form`, or `undefined` when it has a `route`, even while blocked, since `form`
|