-
+
+
diff --git a/src/components/VvButtonGroup/index.ts b/src/components/VvButtonGroup/index.ts
index 02ed2fa6..dc22926c 100644
--- a/src/components/VvButtonGroup/index.ts
+++ b/src/components/VvButtonGroup/index.ts
@@ -4,6 +4,7 @@ export const VvButtonGroupProps = {
...ModifiersProps,
...DisabledProps,
...UnselectableProps,
+ legendLabel: { type: String },
/**
* String or String[] of css classes (modifiers) that will be provided to each button'
*/
diff --git a/src/components/VvCheckbox/VvCheckbox.vue b/src/components/VvCheckbox/VvCheckbox.vue
index 755fba0d..085fb246 100644
--- a/src/components/VvCheckbox/VvCheckbox.vue
+++ b/src/components/VvCheckbox/VvCheckbox.vue
@@ -90,12 +90,9 @@
if (isBinary.value) {
modelValue.value = newValue ? props.value : props.uncheckedValue
} else if (Array.isArray(modelValue.value) || isInGroup.value) {
+ const currentValue = modelValue.value ?? []
const toReturn = new Set(
- Array.isArray(modelValue.value)
- ? modelValue.value
- : modelValue.value !== undefined
- ? [modelValue.value]
- : [],
+ Array.isArray(currentValue) ? currentValue : [currentValue],
)
if (newValue) {
toReturn.add(props.value)
diff --git a/src/components/VvCombobox/VvCombobox.vue b/src/components/VvCombobox/VvCombobox.vue
index f38e7f48..8b2458b1 100644
--- a/src/components/VvCombobox/VvCombobox.vue
+++ b/src/components/VvCombobox/VvCombobox.vue
@@ -247,7 +247,7 @@
const hasValue = computed(() => {
return selectedOptions.value
- .map((option) => getOptionLabel(option))
+ .map((option: string | Option) => getOptionLabel(option))
.join(props.separator)
})
@@ -434,6 +434,7 @@
v-bind="aria"
class="vv-select__input"
role="combobox"
+ :aria-controls="hasDropdownId"
:aria-expanded="expanded"
:aria-labelledby="hasLabelId"
:aria-describedby="
diff --git a/src/components/VvInputText/VvInputText.vue b/src/components/VvInputText/VvInputText.vue
index d0ac60bf..8d951038 100644
--- a/src/components/VvInputText/VvInputText.vue
+++ b/src/components/VvInputText/VvInputText.vue
@@ -67,6 +67,7 @@
)
// mask
+ const NEGATIVE_ZERO_REGEX = /^-0?[.,]?[0*]?$/
const maskReady = ref(false)
const { el, mask, typed, masked, unmasked } = useIMask(
computed(
@@ -83,7 +84,7 @@
}
emit('update:masked', masked.value)
if (type.value === INPUT_TYPES.NUMBER) {
- if (masked.value === '') {
+ if (/^-$|^$/.test(unmasked.value)) {
if (
localModelValue.value === null ||
localModelValue.value === undefined
@@ -93,6 +94,10 @@
localModelValue.value = undefined
return
}
+ if (NEGATIVE_ZERO_REGEX.test(unmasked.value)) {
+ localModelValue.value = 0
+ return
+ }
if (typeof typed.value !== 'number') {
localModelValue.value = Number(typed.value)
return
@@ -170,6 +175,13 @@
typed.value = new Date(newValue)
return
}
+ if (
+ type.value === INPUT_TYPES.NUMBER &&
+ NEGATIVE_ZERO_REGEX.test(unmasked.value) &&
+ newValue === 0
+ ) {
+ return
+ }
typed.value = newValue
unmasked.value = `${typed.value}`
}
@@ -432,12 +444,11 @@
type === INPUT_TYPES.NUMBER
) {
let max = props.max
- if(type === INPUT_TYPES.DATE && !max) {
+ if (type === INPUT_TYPES.DATE && !max) {
max = '9999-12-31'
}
toReturn.step = props.step
- toReturn.max =
- max !== undefined ? String(max) : undefined
+ toReturn.max = max !== undefined ? String(max) : undefined
toReturn.min =
props.min !== undefined ? String(props.min) : undefined
}
diff --git a/src/components/VvNav/VvNav.vue b/src/components/VvNav/VvNav.vue
index 877f312f..390aeb9c 100644
--- a/src/components/VvNav/VvNav.vue
+++ b/src/components/VvNav/VvNav.vue
@@ -24,12 +24,7 @@