@dimailn/vuetify 2.7.2-alpha23 → 2.7.2-alpha25

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 (108) hide show
  1. package/dist/vuetify.js +280 -256
  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/VBadge/VBadge.js +17 -14
  6. package/es5/components/VBadge/VBadge.js.map +1 -1
  7. package/es5/components/VBtn/VBtn.js +16 -16
  8. package/es5/components/VBtn/VBtn.js.map +1 -1
  9. package/es5/components/VColorPicker/VColorPicker.js +18 -31
  10. package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
  11. package/es5/components/VColorPicker/VColorPickerCanvas.js +45 -46
  12. package/es5/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
  13. package/es5/components/VColorPicker/VColorPickerEdit.js +27 -26
  14. package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
  15. package/es5/components/VColorPicker/VColorPickerPreview.js +41 -30
  16. package/es5/components/VColorPicker/VColorPickerPreview.js.map +1 -1
  17. package/es5/components/VColorPicker/VColorPickerSwatches.js +13 -10
  18. package/es5/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
  19. package/es5/components/VDataTable/VDataTable.js +7 -11
  20. package/es5/components/VDataTable/VDataTable.js.map +1 -1
  21. package/es5/components/VInput/VInput.js +24 -6
  22. package/es5/components/VInput/VInput.js.map +1 -1
  23. package/es5/components/VSelect/VSelectList.js +1 -1
  24. package/es5/components/VSelect/VSelectList.js.map +1 -1
  25. package/es5/components/VSlider/VSlider.js +23 -18
  26. package/es5/components/VSlider/VSlider.js.map +1 -1
  27. package/es5/components/VTooltip/VTooltip.js +3 -7
  28. package/es5/components/VTooltip/VTooltip.js.map +1 -1
  29. package/es5/framework.js +1 -1
  30. package/es5/mixins/activatable/index.js +2 -1
  31. package/es5/mixins/activatable/index.js.map +1 -1
  32. package/es5/mixins/bootable/index.js +1 -2
  33. package/es5/mixins/bootable/index.js.map +1 -1
  34. package/es5/mixins/mouse/index.js +10 -5
  35. package/es5/mixins/mouse/index.js.map +1 -1
  36. package/es5/mixins/selectable/index.js +3 -0
  37. package/es5/mixins/selectable/index.js.map +1 -1
  38. package/lib/components/VBadge/VBadge.js +14 -13
  39. package/lib/components/VBadge/VBadge.js.map +1 -1
  40. package/lib/components/VBtn/VBtn.js +18 -19
  41. package/lib/components/VBtn/VBtn.js.map +1 -1
  42. package/lib/components/VColorPicker/VColorPicker.js +29 -37
  43. package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
  44. package/lib/components/VColorPicker/VColorPickerCanvas.js +41 -43
  45. package/lib/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
  46. package/lib/components/VColorPicker/VColorPickerEdit.js +25 -31
  47. package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
  48. package/lib/components/VColorPicker/VColorPickerPreview.js +45 -32
  49. package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
  50. package/lib/components/VColorPicker/VColorPickerSwatches.js +15 -9
  51. package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
  52. package/lib/components/VDataTable/VDataTable.js +3 -4
  53. package/lib/components/VDataTable/VDataTable.js.map +1 -1
  54. package/lib/components/VInput/VInput.js +16 -4
  55. package/lib/components/VInput/VInput.js.map +1 -1
  56. package/lib/components/VSelect/VSelectList.js +2 -1
  57. package/lib/components/VSelect/VSelectList.js.map +1 -1
  58. package/lib/components/VSlider/VSlider.js +26 -21
  59. package/lib/components/VSlider/VSlider.js.map +1 -1
  60. package/lib/components/VTooltip/VTooltip.js +6 -9
  61. package/lib/components/VTooltip/VTooltip.js.map +1 -1
  62. package/lib/framework.js +1 -1
  63. package/lib/mixins/activatable/index.js +2 -1
  64. package/lib/mixins/activatable/index.js.map +1 -1
  65. package/lib/mixins/bootable/index.js +2 -4
  66. package/lib/mixins/bootable/index.js.map +1 -1
  67. package/lib/mixins/mouse/index.js +9 -5
  68. package/lib/mixins/mouse/index.js.map +1 -1
  69. package/lib/mixins/selectable/index.js +4 -0
  70. package/lib/mixins/selectable/index.js.map +1 -1
  71. package/package.json +1 -1
  72. package/src/components/VBadge/VBadge.ts +24 -25
  73. package/src/components/VBadge/__tests__/VBadge.spec.ts +47 -30
  74. package/src/components/VBadge/__tests__/__snapshots__/VBadge.spec.ts.snap +5 -5
  75. package/src/components/VBtn/VBtn.ts +18 -16
  76. package/src/components/VBtn/__tests__/VBtn.spec.ts +257 -242
  77. package/src/components/VBtn/__tests__/__snapshots__/VBtn.spec.ts.snap +13 -73
  78. package/src/components/VColorPicker/VColorPicker.ts +32 -35
  79. package/src/components/VColorPicker/VColorPickerCanvas.ts +44 -37
  80. package/src/components/VColorPicker/VColorPickerEdit.ts +37 -35
  81. package/src/components/VColorPicker/VColorPickerPreview.ts +48 -28
  82. package/src/components/VColorPicker/VColorPickerSwatches.ts +23 -12
  83. package/src/components/VColorPicker/__tests__/VColorPicker.spec.ts +47 -47
  84. package/src/components/VColorPicker/__tests__/VColorPickerCanvas.spec.ts +15 -13
  85. package/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts +52 -50
  86. package/src/components/VColorPicker/__tests__/VColorPickerPreview.spec.ts +101 -30
  87. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +200 -157
  88. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +28 -11
  89. package/src/components/VDataTable/VDataTable.ts +3 -3
  90. package/src/components/VInput/VInput.ts +12 -2
  91. package/src/components/VInput/__tests__/VInput.spec.ts +170 -234
  92. package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +50 -101
  93. package/src/components/VSelect/VSelectList.ts +1 -0
  94. package/src/components/VSkeletonLoader/__tests__/VSkeletonLoader.spec.ts +22 -15
  95. package/src/components/VSkeletonLoader/__tests__/__snapshots__/VSkeletonLoader.spec.ts.snap +60 -60
  96. package/src/components/VSlider/VSlider.ts +43 -27
  97. package/src/components/VSlider/__tests__/VSlider.spec.ts +188 -286
  98. package/src/components/VSlider/__tests__/__snapshots__/VSlider.spec.ts.snap +157 -246
  99. package/src/components/VTabs/__tests__/VTab.spec.ts +3 -3
  100. package/src/components/VTabs/__tests__/VTabsBar.spec.ts +2 -2
  101. package/src/components/VTooltip/VTooltip.ts +20 -20
  102. package/src/components/VTooltip/__tests__/VTooltip.spec.ts +60 -75
  103. package/src/mixins/activatable/index.ts +2 -1
  104. package/src/mixins/bootable/__tests__/bootable.spec.ts +17 -11
  105. package/src/mixins/bootable/index.ts +4 -3
  106. package/src/mixins/mouse/__tests__/mouse.spec.ts +54 -40
  107. package/src/mixins/mouse/index.ts +10 -6
  108. package/src/mixins/selectable/index.ts +4 -0
@@ -1,43 +1,54 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`VInput.ts should apply attrs to root element 1`] = `
4
+ <div class="v-input theme--light"
5
+ foo="bar"
6
+ >
7
+ <div class="v-input__control">
8
+ <div class="v-input__slot">
9
+ </div>
10
+ <div class="v-messages theme--light">
11
+ <div class="v-messages__wrapper">
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ `;
17
+
3
18
  exports[`VInput.ts should apply theme to label, counter, messages and icons 1`] = `
4
19
  <div class="v-input theme--light">
5
20
  <div class="v-input__prepend-outer">
6
21
  <div class="v-input__icon v-input__icon--prepend">
7
- <i aria-hidden="true"
8
- class="v-icon notranslate material-icons theme--light"
22
+ <span class="v-icon notranslate theme--light"
23
+ aria-hidden="true"
9
24
  >
10
- prepend
11
- </i>
25
+ </span>
12
26
  </div>
13
27
  </div>
14
28
  <div class="v-input__control">
15
29
  <div class="v-input__slot">
16
- <label for="input-68"
17
- class="v-label theme--light"
30
+ <label class="v-label theme--light"
31
+ for="input-50"
32
+ aria-hidden="false"
18
33
  style="left: 0px; position: relative;"
19
34
  >
20
35
  foo
21
36
  </label>
22
37
  </div>
23
38
  <div class="v-messages theme--light">
24
- <span name="message-transition"
25
- tag="div"
26
- class="v-messages__wrapper"
27
- >
39
+ <div class="v-messages__wrapper">
28
40
  <div class="v-messages__message">
29
41
  bar
30
42
  </div>
31
- </span>
43
+ </div>
32
44
  </div>
33
45
  </div>
34
46
  <div class="v-input__append-outer">
35
47
  <div class="v-input__icon v-input__icon--append">
36
- <i aria-hidden="true"
37
- class="v-icon notranslate material-icons theme--light"
48
+ <span class="v-icon notranslate theme--light"
49
+ aria-hidden="true"
38
50
  >
39
- append
40
- </i>
51
+ </span>
41
52
  </div>
42
53
  </div>
43
54
  </div>
@@ -49,11 +60,8 @@ exports[`VInput.ts should be in an error state 1`] = `
49
60
  <div class="v-input__slot">
50
61
  </div>
51
62
  <div class="v-messages theme--light error--text">
52
- <span name="message-transition"
53
- tag="div"
54
- class="v-messages__wrapper"
55
- >
56
- </span>
63
+ <div class="v-messages__wrapper">
64
+ </div>
57
65
  </div>
58
66
  </div>
59
67
  </div>
@@ -67,14 +75,11 @@ exports[`VInput.ts should be in an error state 2`] = `
67
75
  <div class="v-messages theme--light error--text"
68
76
  role="alert"
69
77
  >
70
- <span name="message-transition"
71
- tag="div"
72
- class="v-messages__wrapper"
73
- >
74
- <div class="v-messages__message">
78
+ <div class="v-messages__wrapper">
79
+ <div class="v-messages__message message-transition-enter-from message-transition-enter-active">
75
80
  required
76
81
  </div>
77
- </span>
82
+ </div>
78
83
  </div>
79
84
  </div>
80
85
  </div>
@@ -84,22 +89,18 @@ exports[`VInput.ts should generate an icon and match snapshot 1`] = `
84
89
  <div class="v-input theme--light">
85
90
  <div class="v-input__prepend-outer">
86
91
  <div class="v-input__icon v-input__icon--prepend">
87
- <i aria-hidden="true"
88
- class="v-icon notranslate material-icons theme--light"
92
+ <span class="v-icon notranslate theme--light"
93
+ aria-hidden="true"
89
94
  >
90
- list
91
- </i>
95
+ </span>
92
96
  </div>
93
97
  </div>
94
98
  <div class="v-input__control">
95
99
  <div class="v-input__slot">
96
100
  </div>
97
101
  <div class="v-messages theme--light">
98
- <span name="message-transition"
99
- tag="div"
100
- class="v-messages__wrapper"
101
- >
102
- </span>
102
+ <div class="v-messages__wrapper">
103
+ </div>
103
104
  </div>
104
105
  </div>
105
106
  </div>
@@ -111,20 +112,16 @@ exports[`VInput.ts should generate an icon and match snapshot 2`] = `
111
112
  <div class="v-input__slot">
112
113
  </div>
113
114
  <div class="v-messages theme--light">
114
- <span name="message-transition"
115
- tag="div"
116
- class="v-messages__wrapper"
117
- >
118
- </span>
115
+ <div class="v-messages__wrapper">
116
+ </div>
119
117
  </div>
120
118
  </div>
121
119
  <div class="v-input__append-outer">
122
120
  <div class="v-input__icon v-input__icon--append">
123
- <i aria-hidden="true"
124
- class="v-icon notranslate material-icons theme--light"
121
+ <span class="v-icon notranslate theme--light"
122
+ aria-hidden="true"
125
123
  >
126
- list
127
- </i>
124
+ </span>
128
125
  </div>
129
126
  </div>
130
127
  </div>
@@ -136,11 +133,8 @@ exports[`VInput.ts should generate append and prepend slots 1`] = `
136
133
  <div class="v-input__slot">
137
134
  </div>
138
135
  <div class="v-messages theme--light">
139
- <span name="message-transition"
140
- tag="div"
141
- class="v-messages__wrapper"
142
- >
143
- </span>
136
+ <div class="v-messages__wrapper">
137
+ </div>
144
138
  </div>
145
139
  </div>
146
140
  <div class="v-input__append-outer">
@@ -162,27 +156,8 @@ exports[`VInput.ts should generate append and prepend slots 2`] = `
162
156
  <div class="v-input__slot">
163
157
  </div>
164
158
  <div class="v-messages theme--light">
165
- <span name="message-transition"
166
- tag="div"
167
- class="v-messages__wrapper"
168
- >
169
- </span>
170
- </div>
171
- </div>
172
- </div>
173
- `;
174
-
175
- exports[`VInput.ts should not apply attrs to element 1`] = `
176
- <div class="v-input theme--light">
177
- <div class="v-input__control">
178
- <div class="v-input__slot">
179
- </div>
180
- <div class="v-messages theme--light">
181
- <span name="message-transition"
182
- tag="div"
183
- class="v-messages__wrapper"
184
- >
185
- </span>
159
+ <div class="v-messages__wrapper">
160
+ </div>
186
161
  </div>
187
162
  </div>
188
163
  </div>
@@ -201,43 +176,17 @@ exports[`VInput.ts should render a label 1`] = `
201
176
  <div class="v-input theme--light">
202
177
  <div class="v-input__control">
203
178
  <div class="v-input__slot">
204
- <label for="input-59"
205
- class="v-label theme--light"
179
+ <label class="v-label theme--light"
180
+ for="input-45"
181
+ aria-hidden="false"
206
182
  style="left: 0px; position: relative;"
207
183
  >
208
184
  foo
209
185
  </label>
210
186
  </div>
211
187
  <div class="v-messages theme--light">
212
- <span name="message-transition"
213
- tag="div"
214
- class="v-messages__wrapper"
215
- >
216
- </span>
217
- </div>
218
- </div>
219
- </div>
220
- `;
221
-
222
- exports[`VInput.ts should render a label 2`] = `
223
- <div class="v-input theme--light">
224
- <div class="v-input__control">
225
- <div class="v-input__slot">
226
- <label for="input-63"
227
- class="v-label theme--light"
228
- style="left: 0px; position: relative;"
229
- >
230
- <div>
231
- foo
232
- </div>
233
- </label>
234
- </div>
235
- <div class="v-messages theme--light">
236
- <span name="message-transition"
237
- tag="div"
238
- class="v-messages__wrapper"
239
- >
240
- </span>
188
+ <div class="v-messages__wrapper">
189
+ </div>
241
190
  </div>
242
191
  </div>
243
192
  </div>
@@ -176,6 +176,7 @@ export default mixins(Colorable, Themeable).extend({
176
176
  attrs: {
177
177
  ...tile.attrs,
178
178
  ...tile.props,
179
+ ...tile.on
179
180
  },
180
181
  on: tile.on,
181
182
  })
@@ -4,21 +4,26 @@ import VSkeletonLoader, { HTMLSkeletonLoaderElement } from '../VSkeletonLoader'
4
4
  // Utilities
5
5
  import {
6
6
  mount,
7
- MountOptions,
8
- Wrapper,
7
+ enableAutoUnmount,
8
+ VueWrapper,
9
9
  } from '@vue/test-utils'
10
+ import { nextTick } from 'vue'
10
11
 
11
12
  describe('VSkeletonLoader.ts', () => {
12
13
  type Instance = InstanceType<typeof VSkeletonLoader>
13
- let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
14
+ let mountFunction: (options?: any) => VueWrapper
15
+
16
+ enableAutoUnmount(afterEach)
14
17
 
15
18
  beforeEach(() => {
16
19
  mountFunction = (options = {}) => {
17
20
  return mount(VSkeletonLoader, {
18
- mocks: {
19
- $vuetify: {
20
- lang: {
21
- t: (v: string) => v,
21
+ global: {
22
+ mocks: {
23
+ $vuetify: {
24
+ lang: {
25
+ t: (v: string) => v,
26
+ },
22
27
  },
23
28
  },
24
29
  },
@@ -40,13 +45,13 @@ describe('VSkeletonLoader.ts', () => {
40
45
  for (const key in wrapper.vm.rootTypes) {
41
46
  const type = wrapper.vm.rootTypes[key]
42
47
 
43
- const iteration = mountFunction({ propsData: { type } })
48
+ const iteration = mountFunction({ props: { type } })
44
49
 
45
50
  expect(iteration.html()).toMatchSnapshot()
46
51
  }
47
52
  })
48
53
 
49
- it('should dynamically render content', () => {
54
+ it('should dynamically render content', async () => {
50
55
  const wrapper = mountFunction({
51
56
  slots: {
52
57
  default: '<div>foobar</div>',
@@ -55,14 +60,15 @@ describe('VSkeletonLoader.ts', () => {
55
60
 
56
61
  expect(wrapper.html()).toMatchSnapshot()
57
62
 
58
- wrapper.setProps({ loading: true })
63
+ await wrapper.setProps({ loading: true })
64
+ await nextTick()
59
65
 
60
66
  expect(wrapper.html()).toMatchSnapshot()
61
67
  })
62
68
 
63
- it('should have the correct a11y attributes when loading', () => {
69
+ it('should have the correct a11y attributes when loading', async () => {
64
70
  const wrapper = mountFunction({
65
- propsData: { loading: true },
71
+ props: { loading: true },
66
72
  slots: {
67
73
  // Add a default slot to allow
68
74
  // toggling the loading prop
@@ -74,7 +80,8 @@ describe('VSkeletonLoader.ts', () => {
74
80
  expect(wrapper.element.getAttribute('aria-live')).toBe('polite')
75
81
  expect(wrapper.element.getAttribute('role')).toBe('alert')
76
82
 
77
- wrapper.setProps({ loading: false })
83
+ await wrapper.setProps({ loading: false })
84
+ await nextTick()
78
85
 
79
86
  expect(wrapper.element.getAttribute('aria-busy')).toBeNull()
80
87
  expect(wrapper.element.getAttribute('aria-live')).toBeNull()
@@ -83,7 +90,7 @@ describe('VSkeletonLoader.ts', () => {
83
90
 
84
91
  it('should not render aria attributes when using boilerplate', () => {
85
92
  const wrapper = mountFunction({
86
- propsData: { boilerplate: true },
93
+ props: { boilerplate: true },
87
94
  })
88
95
 
89
96
  expect(wrapper.vm.attrs).toEqual({})
@@ -94,7 +101,7 @@ describe('VSkeletonLoader.ts', () => {
94
101
  it('should remove transition when loading content', () => {
95
102
  const el = document.createElement('div') as HTMLSkeletonLoaderElement
96
103
  const wrapper = mountFunction({
97
- propsData: { loading: true },
104
+ props: { loading: true },
98
105
  })
99
106
 
100
107
  wrapper.vm.onBeforeEnter(el)