@dimailn/vuetify 2.7.2-alpha22 → 2.7.2-alpha24
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/vuetify.js +92 -59
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VBadge/VBadge.js +17 -14
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VForm/VForm.js +44 -30
- package/es5/components/VForm/VForm.js.map +1 -1
- package/es5/components/VInput/VInput.js +4 -0
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +1 -1
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/activatable/index.js +2 -1
- package/es5/mixins/activatable/index.js.map +1 -1
- package/es5/mixins/bootable/index.js +1 -2
- package/es5/mixins/bootable/index.js.map +1 -1
- package/es5/mixins/mouse/index.js +10 -5
- package/es5/mixins/mouse/index.js.map +1 -1
- package/es5/mixins/selectable/index.js +3 -0
- package/es5/mixins/selectable/index.js.map +1 -1
- package/es5/mixins/validatable/index.js +8 -5
- package/es5/mixins/validatable/index.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +14 -13
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VForm/VForm.js +40 -26
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VInput/VInput.js +4 -0
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +2 -1
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/activatable/index.js +2 -1
- package/lib/mixins/activatable/index.js.map +1 -1
- package/lib/mixins/bootable/index.js +2 -4
- package/lib/mixins/bootable/index.js.map +1 -1
- package/lib/mixins/mouse/index.js +9 -5
- package/lib/mixins/mouse/index.js.map +1 -1
- package/lib/mixins/selectable/index.js +4 -0
- package/lib/mixins/selectable/index.js.map +1 -1
- package/lib/mixins/validatable/index.js +8 -4
- package/lib/mixins/validatable/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VBadge/VBadge.ts +24 -25
- package/src/components/VBadge/__tests__/VBadge.spec.ts +47 -30
- package/src/components/VBadge/__tests__/__snapshots__/VBadge.spec.ts.snap +5 -5
- package/src/components/VForm/VForm.ts +61 -35
- package/src/components/VForm/__tests__/VForm.spec.ts +100 -80
- package/src/components/VInput/VInput.ts +4 -0
- package/src/components/VSelect/VSelectList.ts +1 -0
- package/src/mixins/activatable/index.ts +2 -1
- package/src/mixins/bootable/__tests__/bootable.spec.ts +17 -11
- package/src/mixins/bootable/index.ts +4 -3
- package/src/mixins/mouse/__tests__/mouse.spec.ts +54 -40
- package/src/mixins/mouse/index.ts +10 -6
- package/src/mixins/selectable/index.ts +4 -0
- package/src/mixins/validatable/__tests__/validatable.spec.ts +194 -158
- package/src/mixins/validatable/index.ts +16 -18
|
@@ -6,22 +6,19 @@ import { inject as RegistrableInject } from '../registrable'
|
|
|
6
6
|
// Utilities
|
|
7
7
|
import { deepEqual } from '../../util/helpers'
|
|
8
8
|
import { consoleError } from '../../util/console'
|
|
9
|
-
import
|
|
9
|
+
import { defineComponent, PropType } from 'vue'
|
|
10
10
|
|
|
11
11
|
// Types
|
|
12
|
-
import { PropValidator } from 'vue/types/options'
|
|
13
12
|
import { InputMessage, InputValidationRules } from 'vuetify/types'
|
|
14
13
|
|
|
15
|
-
const baseMixins = mixins(
|
|
16
|
-
Colorable,
|
|
17
|
-
RegistrableInject<'form', any>('form'),
|
|
18
|
-
Themeable,
|
|
19
|
-
)
|
|
20
|
-
|
|
21
14
|
/* @vue/component */
|
|
22
|
-
export default
|
|
15
|
+
export default defineComponent({
|
|
23
16
|
name: 'validatable',
|
|
24
17
|
|
|
18
|
+
extends: RegistrableInject<'form', any>('form'),
|
|
19
|
+
|
|
20
|
+
mixins: [Colorable, Themeable],
|
|
21
|
+
|
|
25
22
|
props: {
|
|
26
23
|
disabled: {
|
|
27
24
|
type: Boolean,
|
|
@@ -33,26 +30,26 @@ export default baseMixins.extend({
|
|
|
33
30
|
default: 1,
|
|
34
31
|
},
|
|
35
32
|
errorMessages: {
|
|
36
|
-
type: [String, Array]
|
|
33
|
+
type: [String, Array] as PropType<InputMessage | null>,
|
|
37
34
|
default: () => [],
|
|
38
|
-
}
|
|
35
|
+
},
|
|
39
36
|
messages: {
|
|
40
|
-
type: [String, Array]
|
|
37
|
+
type: [String, Array] as PropType<InputMessage | null>,
|
|
41
38
|
default: () => [],
|
|
42
|
-
}
|
|
39
|
+
},
|
|
43
40
|
readonly: {
|
|
44
41
|
type: Boolean,
|
|
45
42
|
default: null,
|
|
46
43
|
},
|
|
47
44
|
rules: {
|
|
48
|
-
type: Array
|
|
45
|
+
type: Array as PropType<InputValidationRules>,
|
|
49
46
|
default: () => [],
|
|
50
|
-
}
|
|
47
|
+
},
|
|
51
48
|
success: Boolean,
|
|
52
49
|
successMessages: {
|
|
53
|
-
type: [String, Array]
|
|
50
|
+
type: [String, Array] as PropType<InputMessage | null>,
|
|
54
51
|
default: () => [],
|
|
55
|
-
}
|
|
52
|
+
},
|
|
56
53
|
validateOnBlur: Boolean,
|
|
57
54
|
modelValue: { required: false },
|
|
58
55
|
},
|
|
@@ -65,7 +62,7 @@ export default baseMixins.extend({
|
|
|
65
62
|
hasInput: false,
|
|
66
63
|
isFocused: false,
|
|
67
64
|
isResetting: false,
|
|
68
|
-
lazyValue: this.
|
|
65
|
+
lazyValue: this.modelValue ?? null,
|
|
69
66
|
valid: false,
|
|
70
67
|
}
|
|
71
68
|
},
|
|
@@ -128,6 +125,7 @@ export default baseMixins.extend({
|
|
|
128
125
|
this.lazyValue = val
|
|
129
126
|
|
|
130
127
|
this.$emit('input', val)
|
|
128
|
+
this.$emit('update:modelValue', val)
|
|
131
129
|
},
|
|
132
130
|
},
|
|
133
131
|
isDisabled (): boolean {
|