@dimailn/vuetify 2.7.2-alpha21 → 2.7.2-alpha23

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.
Files changed (79) hide show
  1. package/dist/vuetify.js +141 -72
  2. package/dist/vuetify.js.map +1 -1
  3. package/dist/vuetify.min.css +1 -1
  4. package/dist/vuetify.min.js +2 -2
  5. package/es5/components/VForm/VForm.js +44 -30
  6. package/es5/components/VForm/VForm.js.map +1 -1
  7. package/es5/components/VOverlay/VOverlay.js +2 -3
  8. package/es5/components/VOverlay/VOverlay.js.map +1 -1
  9. package/es5/components/VProgressCircular/VProgressCircular.js +5 -3
  10. package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
  11. package/es5/components/VProgressLinear/VProgressLinear.js +41 -19
  12. package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
  13. package/es5/components/VTabs/VTabsBar.js.map +1 -1
  14. package/es5/components/VVirtualScroll/VVirtualScroll.js +15 -16
  15. package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  16. package/es5/components/VWindow/VWindow.js +13 -5
  17. package/es5/components/VWindow/VWindow.js.map +1 -1
  18. package/es5/components/VWindow/VWindowItem.js +9 -5
  19. package/es5/components/VWindow/VWindowItem.js.map +1 -1
  20. package/es5/framework.js +1 -1
  21. package/es5/mixins/overlayable/index.js.map +1 -1
  22. package/es5/mixins/validatable/index.js +8 -5
  23. package/es5/mixins/validatable/index.js.map +1 -1
  24. package/lib/components/VForm/VForm.js +40 -26
  25. package/lib/components/VForm/VForm.js.map +1 -1
  26. package/lib/components/VOverlay/VOverlay.js +1 -2
  27. package/lib/components/VOverlay/VOverlay.js.map +1 -1
  28. package/lib/components/VProgressCircular/VProgressCircular.js +5 -3
  29. package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
  30. package/lib/components/VProgressLinear/VProgressLinear.js +35 -17
  31. package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
  32. package/lib/components/VTabs/VTabsBar.js.map +1 -1
  33. package/lib/components/VVirtualScroll/VVirtualScroll.js +8 -11
  34. package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  35. package/lib/components/VWindow/VWindow.js +7 -3
  36. package/lib/components/VWindow/VWindow.js.map +1 -1
  37. package/lib/components/VWindow/VWindowItem.js +3 -1
  38. package/lib/components/VWindow/VWindowItem.js.map +1 -1
  39. package/lib/framework.js +1 -1
  40. package/lib/mixins/overlayable/index.js.map +1 -1
  41. package/lib/mixins/validatable/index.js +8 -4
  42. package/lib/mixins/validatable/index.js.map +1 -1
  43. package/package.json +1 -1
  44. package/src/components/VAvatar/__tests__/VAvatar.spec.ts +72 -10
  45. package/src/components/VForm/VForm.ts +61 -35
  46. package/src/components/VForm/__tests__/VForm.spec.ts +100 -80
  47. package/src/components/VOverlay/VOverlay.ts +1 -1
  48. package/src/components/VOverlay/__tests__/VOverlay.spec.ts +6 -6
  49. package/src/components/VProgressCircular/VProgressCircular.ts +6 -5
  50. package/src/components/VProgressCircular/__tests__/VProgressCircular.spec.ts +28 -21
  51. package/src/components/VProgressCircular/__tests__/__snapshots__/VProgressCircular.spec.ts.snap +62 -62
  52. package/src/components/VProgressLinear/VProgressLinear.ts +42 -22
  53. package/src/components/VProgressLinear/__tests__/VProgressLinear.spec.ts +378 -71
  54. package/src/components/VProgressLinear/__tests__/__snapshots__/VProgressLinear.spec.ts.snap +53 -79
  55. package/src/components/VSheet/__tests__/VSheet.spec.ts +5 -5
  56. package/src/components/VTabs/VTabsBar.ts +7 -5
  57. package/src/components/VVirtualScroll/VVirtualScroll.ts +14 -13
  58. package/src/components/VVirtualScroll/__tests__/VVirtualScroll.spec.ts +26 -19
  59. package/src/components/VWindow/VWindow.ts +9 -5
  60. package/src/components/VWindow/VWindowItem.ts +3 -1
  61. package/src/components/VWindow/__tests__/VWindow.spec.ts +226 -185
  62. package/src/components/VWindow/__tests__/VWindowItem.spec.ts +162 -132
  63. package/src/mixins/applicationable/__tests__/applicationable.spec.ts +31 -27
  64. package/src/mixins/colorable/__tests__/colorable.spec.ts +9 -6
  65. package/src/mixins/elevatable/__tests__/elevatable.spec.ts +14 -13
  66. package/src/mixins/intersectable/__tests__/intersectable.spec.ts +35 -29
  67. package/src/mixins/menuable/__tests__/menuable.spec.ts +76 -33
  68. package/src/mixins/mobile/__tests__/mobile.spec.ts +9 -6
  69. package/src/mixins/overlayable/__tests__/overlayable.spec.ts +32 -24
  70. package/src/mixins/overlayable/index.ts +1 -1
  71. package/src/mixins/proxyable/__tests__/proxyable.spec.ts +18 -17
  72. package/src/mixins/registrable/__tests__/registrable.spec.ts +31 -0
  73. package/src/mixins/rippleable/__tests__/rippleable.spec.ts +10 -9
  74. package/src/mixins/roundable/__tests__/roundable.spec.ts +7 -5
  75. package/src/mixins/routable/__tests__/routable.spec.ts +60 -52
  76. package/src/mixins/scrollable/__tests__/scrollable.spec.ts +56 -27
  77. package/src/mixins/selectable/__tests__/selectable.spec.ts +22 -9
  78. package/src/mixins/validatable/__tests__/validatable.spec.ts +194 -158
  79. 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 mixins from '../../util/mixins'
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 baseMixins.extend({
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
- } as PropValidator<InputMessage | null>,
35
+ },
39
36
  messages: {
40
- type: [String, Array],
37
+ type: [String, Array] as PropType<InputMessage | null>,
41
38
  default: () => [],
42
- } as PropValidator<InputMessage | null>,
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
- } as PropValidator<InputValidationRules>,
47
+ },
51
48
  success: Boolean,
52
49
  successMessages: {
53
- type: [String, Array],
50
+ type: [String, Array] as PropType<InputMessage | null>,
54
51
  default: () => [],
55
- } as PropValidator<InputMessage | null>,
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.value,
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 {