@dimailn/vuetify 2.7.2-alpha21 → 2.7.2-alpha22

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 (67) hide show
  1. package/dist/vuetify.js +89 -40
  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/VOverlay/VOverlay.js +2 -3
  6. package/es5/components/VOverlay/VOverlay.js.map +1 -1
  7. package/es5/components/VProgressCircular/VProgressCircular.js +5 -3
  8. package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
  9. package/es5/components/VProgressLinear/VProgressLinear.js +41 -19
  10. package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
  11. package/es5/components/VTabs/VTabsBar.js.map +1 -1
  12. package/es5/components/VVirtualScroll/VVirtualScroll.js +15 -16
  13. package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  14. package/es5/components/VWindow/VWindow.js +13 -5
  15. package/es5/components/VWindow/VWindow.js.map +1 -1
  16. package/es5/components/VWindow/VWindowItem.js +9 -5
  17. package/es5/components/VWindow/VWindowItem.js.map +1 -1
  18. package/es5/framework.js +1 -1
  19. package/es5/mixins/overlayable/index.js.map +1 -1
  20. package/lib/components/VOverlay/VOverlay.js +1 -2
  21. package/lib/components/VOverlay/VOverlay.js.map +1 -1
  22. package/lib/components/VProgressCircular/VProgressCircular.js +5 -3
  23. package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
  24. package/lib/components/VProgressLinear/VProgressLinear.js +35 -17
  25. package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
  26. package/lib/components/VTabs/VTabsBar.js.map +1 -1
  27. package/lib/components/VVirtualScroll/VVirtualScroll.js +8 -11
  28. package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
  29. package/lib/components/VWindow/VWindow.js +7 -3
  30. package/lib/components/VWindow/VWindow.js.map +1 -1
  31. package/lib/components/VWindow/VWindowItem.js +3 -1
  32. package/lib/components/VWindow/VWindowItem.js.map +1 -1
  33. package/lib/framework.js +1 -1
  34. package/lib/mixins/overlayable/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/components/VAvatar/__tests__/VAvatar.spec.ts +72 -10
  37. package/src/components/VOverlay/VOverlay.ts +1 -1
  38. package/src/components/VOverlay/__tests__/VOverlay.spec.ts +6 -6
  39. package/src/components/VProgressCircular/VProgressCircular.ts +6 -5
  40. package/src/components/VProgressCircular/__tests__/VProgressCircular.spec.ts +28 -21
  41. package/src/components/VProgressCircular/__tests__/__snapshots__/VProgressCircular.spec.ts.snap +62 -62
  42. package/src/components/VProgressLinear/VProgressLinear.ts +42 -22
  43. package/src/components/VProgressLinear/__tests__/VProgressLinear.spec.ts +378 -71
  44. package/src/components/VProgressLinear/__tests__/__snapshots__/VProgressLinear.spec.ts.snap +53 -79
  45. package/src/components/VSheet/__tests__/VSheet.spec.ts +5 -5
  46. package/src/components/VTabs/VTabsBar.ts +7 -5
  47. package/src/components/VVirtualScroll/VVirtualScroll.ts +14 -13
  48. package/src/components/VVirtualScroll/__tests__/VVirtualScroll.spec.ts +26 -19
  49. package/src/components/VWindow/VWindow.ts +9 -5
  50. package/src/components/VWindow/VWindowItem.ts +3 -1
  51. package/src/components/VWindow/__tests__/VWindow.spec.ts +226 -185
  52. package/src/components/VWindow/__tests__/VWindowItem.spec.ts +162 -132
  53. package/src/mixins/applicationable/__tests__/applicationable.spec.ts +31 -27
  54. package/src/mixins/colorable/__tests__/colorable.spec.ts +9 -6
  55. package/src/mixins/elevatable/__tests__/elevatable.spec.ts +14 -13
  56. package/src/mixins/intersectable/__tests__/intersectable.spec.ts +35 -29
  57. package/src/mixins/menuable/__tests__/menuable.spec.ts +76 -33
  58. package/src/mixins/mobile/__tests__/mobile.spec.ts +9 -6
  59. package/src/mixins/overlayable/__tests__/overlayable.spec.ts +32 -24
  60. package/src/mixins/overlayable/index.ts +1 -1
  61. package/src/mixins/proxyable/__tests__/proxyable.spec.ts +18 -17
  62. package/src/mixins/registrable/__tests__/registrable.spec.ts +31 -0
  63. package/src/mixins/rippleable/__tests__/rippleable.spec.ts +10 -9
  64. package/src/mixins/roundable/__tests__/roundable.spec.ts +7 -5
  65. package/src/mixins/routable/__tests__/routable.spec.ts +60 -52
  66. package/src/mixins/scrollable/__tests__/scrollable.spec.ts +56 -27
  67. package/src/mixins/selectable/__tests__/selectable.spec.ts +22 -9
@@ -1,13 +1,17 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`VProgressLinear.ts should render component and match snapshot 1`] = `
4
- <div role="progressbar"
3
+ exports[`VProgressLinear.ts should render a stream component 1`] = `
4
+ <div class="v-progress-linear theme--light"
5
+ role="progressbar"
5
6
  aria-valuemin="0"
6
7
  aria-valuemax="100"
7
8
  aria-valuenow="33"
8
- class="v-progress-linear theme--light"
9
9
  style="height: 4px;"
10
10
  >
11
+ <div class="v-progress-linear__stream primary--text"
12
+ style="width: 0%;"
13
+ >
14
+ </div>
11
15
  <div class="v-progress-linear__background primary"
12
16
  style="opacity: 0.3; left: 33%; width: 67%;"
13
17
  >
@@ -21,16 +25,16 @@ exports[`VProgressLinear.ts should render component and match snapshot 1`] = `
21
25
  </div>
22
26
  `;
23
27
 
24
- exports[`VProgressLinear.ts should render component in RTL mode 1`] = `
25
- <div role="progressbar"
28
+ exports[`VProgressLinear.ts should render component and match snapshot 1`] = `
29
+ <div class="v-progress-linear theme--light"
30
+ role="progressbar"
26
31
  aria-valuemin="0"
27
32
  aria-valuemax="100"
28
33
  aria-valuenow="33"
29
- class="v-progress-linear v-progress-linear--reverse theme--light"
30
34
  style="height: 4px;"
31
35
  >
32
36
  <div class="v-progress-linear__background primary"
33
- style="opacity: 0.3; right: 33%; width: 67%;"
37
+ style="opacity: 0.3; left: 33%; width: 67%;"
34
38
  >
35
39
  </div>
36
40
  <div class="v-progress-linear__buffer">
@@ -42,21 +46,19 @@ exports[`VProgressLinear.ts should render component in RTL mode 1`] = `
42
46
  </div>
43
47
  `;
44
48
 
45
- exports[`VProgressLinear.ts should render component with buffer value and match snapshot 1`] = `
46
- <div role="progressbar"
49
+ exports[`VProgressLinear.ts should render component in RTL mode 1`] = `
50
+ <div class="v-progress-linear v-progress-linear--reverse theme--light"
51
+ role="progressbar"
47
52
  aria-valuemin="0"
48
- aria-valuemax="80"
53
+ aria-valuemax="100"
49
54
  aria-valuenow="33"
50
- class="v-progress-linear theme--light"
51
55
  style="height: 4px;"
52
56
  >
53
57
  <div class="v-progress-linear__background primary"
54
- style="opacity: 0.3; left: 33%; width: 47%;"
58
+ style="opacity: 0.3; right: 33%; width: 67%;"
55
59
  >
56
60
  </div>
57
- <div class="v-progress-linear__buffer"
58
- style="width: 80%;"
59
- >
61
+ <div class="v-progress-linear__buffer">
60
62
  </div>
61
63
  <div class="v-progress-linear__determinate primary"
62
64
  style="width: 33%;"
@@ -65,20 +67,20 @@ exports[`VProgressLinear.ts should render component with buffer value and match
65
67
  </div>
66
68
  `;
67
69
 
68
- exports[`VProgressLinear.ts should render component with buffer value and match snapshot 2`] = `
69
- <div role="progressbar"
70
+ exports[`VProgressLinear.ts should render component with buffer value and match snapshot 1`] = `
71
+ <div class="v-progress-linear theme--light"
72
+ role="progressbar"
70
73
  aria-valuemin="0"
71
- aria-valuemax="0"
74
+ aria-valuemax="80"
72
75
  aria-valuenow="33"
73
- class="v-progress-linear theme--light"
74
76
  style="height: 4px;"
75
77
  >
76
78
  <div class="v-progress-linear__background primary"
77
- style="opacity: 0.3; left: 33%; width: 0%;"
79
+ style="opacity: 0.3; left: 33%; width: 47%;"
78
80
  >
79
81
  </div>
80
82
  <div class="v-progress-linear__buffer"
81
- style="width: 0%;"
83
+ style="width: 80%;"
82
84
  >
83
85
  </div>
84
86
  <div class="v-progress-linear__determinate primary"
@@ -89,11 +91,11 @@ exports[`VProgressLinear.ts should render component with buffer value and match
89
91
  `;
90
92
 
91
93
  exports[`VProgressLinear.ts should render component with buffer value and value > buffer value and match snapshot 1`] = `
92
- <div role="progressbar"
94
+ <div class="v-progress-linear theme--light"
95
+ role="progressbar"
93
96
  aria-valuemin="0"
94
97
  aria-valuemax="80"
95
98
  aria-valuenow="90"
96
- class="v-progress-linear theme--light"
97
99
  style="height: 4px;"
98
100
  >
99
101
  <div class="v-progress-linear__background primary"
@@ -112,11 +114,11 @@ exports[`VProgressLinear.ts should render component with buffer value and value
112
114
  `;
113
115
 
114
116
  exports[`VProgressLinear.ts should render component with color and background color and match snapshot 1`] = `
115
- <div role="progressbar"
117
+ <div class="v-progress-linear theme--light"
118
+ role="progressbar"
116
119
  aria-valuemin="0"
117
120
  aria-valuemax="100"
118
121
  aria-valuenow="33"
119
- class="v-progress-linear theme--light"
120
122
  style="height: 4px;"
121
123
  >
122
124
  <div class="v-progress-linear__background blue"
@@ -125,7 +127,7 @@ exports[`VProgressLinear.ts should render component with color and background co
125
127
  </div>
126
128
  <div class="v-progress-linear__buffer">
127
129
  </div>
128
- <div class="v-progress-linear__determinate orange"
130
+ <div class="v-progress-linear__determinate red"
129
131
  style="width: 33%;"
130
132
  >
131
133
  </div>
@@ -133,11 +135,11 @@ exports[`VProgressLinear.ts should render component with color and background co
133
135
  `;
134
136
 
135
137
  exports[`VProgressLinear.ts should render component with color and background color and opacity and match snapshot 1`] = `
136
- <div role="progressbar"
138
+ <div class="v-progress-linear theme--light"
139
+ role="progressbar"
137
140
  aria-valuemin="0"
138
141
  aria-valuemax="100"
139
142
  aria-valuenow="33"
140
- class="v-progress-linear theme--light"
141
143
  style="height: 4px;"
142
144
  >
143
145
  <div class="v-progress-linear__background blue"
@@ -146,7 +148,7 @@ exports[`VProgressLinear.ts should render component with color and background co
146
148
  </div>
147
149
  <div class="v-progress-linear__buffer">
148
150
  </div>
149
- <div class="v-progress-linear__determinate orange"
151
+ <div class="v-progress-linear__determinate red"
150
152
  style="width: 33%;"
151
153
  >
152
154
  </div>
@@ -154,20 +156,20 @@ exports[`VProgressLinear.ts should render component with color and background co
154
156
  `;
155
157
 
156
158
  exports[`VProgressLinear.ts should render component with color and background opacity and match snapshot 1`] = `
157
- <div role="progressbar"
159
+ <div class="v-progress-linear theme--light"
160
+ role="progressbar"
158
161
  aria-valuemin="0"
159
162
  aria-valuemax="100"
160
163
  aria-valuenow="33"
161
- class="v-progress-linear theme--light"
162
164
  style="height: 4px;"
163
165
  >
164
- <div class="v-progress-linear__background orange"
166
+ <div class="v-progress-linear__background red"
165
167
  style="opacity: 0.5; left: 33%; width: 67%;"
166
168
  >
167
169
  </div>
168
170
  <div class="v-progress-linear__buffer">
169
171
  </div>
170
- <div class="v-progress-linear__determinate orange"
172
+ <div class="v-progress-linear__determinate red"
171
173
  style="width: 33%;"
172
174
  >
173
175
  </div>
@@ -175,20 +177,20 @@ exports[`VProgressLinear.ts should render component with color and background op
175
177
  `;
176
178
 
177
179
  exports[`VProgressLinear.ts should render component with color and match snapshot 1`] = `
178
- <div role="progressbar"
180
+ <div class="v-progress-linear theme--light"
181
+ role="progressbar"
179
182
  aria-valuemin="0"
180
183
  aria-valuemax="100"
181
184
  aria-valuenow="33"
182
- class="v-progress-linear theme--light"
183
185
  style="height: 4px;"
184
186
  >
185
- <div class="v-progress-linear__background orange"
187
+ <div class="v-progress-linear__background red"
186
188
  style="opacity: 0.3; left: 33%; width: 67%;"
187
189
  >
188
190
  </div>
189
191
  <div class="v-progress-linear__buffer">
190
192
  </div>
191
- <div class="v-progress-linear__determinate orange"
193
+ <div class="v-progress-linear__determinate red"
192
194
  style="width: 33%;"
193
195
  >
194
196
  </div>
@@ -196,60 +198,32 @@ exports[`VProgressLinear.ts should render component with color and match snapsho
196
198
  `;
197
199
 
198
200
  exports[`VProgressLinear.ts should render component with css color and match snapshot 1`] = `
199
- <div role="progressbar"
201
+ <div class="v-progress-linear theme--light"
202
+ role="progressbar"
200
203
  aria-valuemin="0"
201
204
  aria-valuemax="100"
202
205
  aria-valuenow="33"
203
- class="v-progress-linear theme--light"
204
206
  style="height: 4px;"
205
207
  >
206
208
  <div class="v-progress-linear__background"
207
- style="opacity: 0.3; left: 33%; width: 67%; background-color: rgb(51, 102, 153); border-color: #336699;"
209
+ style="opacity: 0.3; left: 33%; width: 67%; background-color: rgb(255, 0, 0); border-color: #ff0000;"
208
210
  >
209
211
  </div>
210
212
  <div class="v-progress-linear__buffer">
211
213
  </div>
212
214
  <div class="v-progress-linear__determinate"
213
- style="width: 33%; background-color: rgb(51, 102, 153); border-color: #336699;"
215
+ style="width: 33%; background-color: rgb(255, 0, 0); border-color: #ff0000;"
214
216
  >
215
217
  </div>
216
218
  </div>
217
219
  `;
218
220
 
219
- exports[`VProgressLinear.ts should render default slot content 1`] = `
220
- <div role="progressbar"
221
- aria-valuemin="0"
222
- aria-valuemax="80"
223
- aria-valuenow="90"
224
- class="v-progress-linear theme--light"
225
- style="height: 4px;"
226
- >
227
- <div class="v-progress-linear__background primary"
228
- style="opacity: 0.3; left: 90%; width: 0%;"
229
- >
230
- </div>
231
- <div class="v-progress-linear__buffer"
232
- style="width: 80%;"
233
- >
234
- </div>
235
- <div class="v-progress-linear__determinate primary"
236
- style="width: 90%;"
237
- >
238
- </div>
239
- <div class="v-progress-linear__content">
240
- <div class="foobar">
241
- content
242
- </div>
243
- </div>
244
- </div>
245
- `;
246
-
247
221
  exports[`VProgressLinear.ts should render inactive component and match snapshot 1`] = `
248
- <div role="progressbar"
222
+ <div class="v-progress-linear theme--light"
223
+ role="progressbar"
249
224
  aria-valuemin="0"
250
225
  aria-valuemax="100"
251
226
  aria-valuenow="33"
252
- class="v-progress-linear theme--light"
253
227
  style="height: 0px;"
254
228
  >
255
229
  <div class="v-progress-linear__background primary"
@@ -268,10 +242,10 @@ exports[`VProgressLinear.ts should render inactive component and match snapshot
268
242
  `;
269
243
 
270
244
  exports[`VProgressLinear.ts should render indeterminate progress and match snapshot 1`] = `
271
- <div role="progressbar"
245
+ <div class="v-progress-linear theme--light"
246
+ role="progressbar"
272
247
  aria-valuemin="0"
273
248
  aria-valuemax="100"
274
- class="v-progress-linear theme--light"
275
249
  style="height: 4px;"
276
250
  >
277
251
  <div class="v-progress-linear__background primary"
@@ -290,10 +264,10 @@ exports[`VProgressLinear.ts should render indeterminate progress and match snaps
290
264
  `;
291
265
 
292
266
  exports[`VProgressLinear.ts should render indeterminate progress with query prop and match snapshot 1`] = `
293
- <div role="progressbar"
267
+ <div class="v-progress-linear v-progress-linear--query theme--light"
268
+ role="progressbar"
294
269
  aria-valuemin="0"
295
270
  aria-valuemax="100"
296
- class="v-progress-linear v-progress-linear--query theme--light"
297
271
  style="height: 4px;"
298
272
  >
299
273
  <div class="v-progress-linear__background primary"
@@ -312,11 +286,11 @@ exports[`VProgressLinear.ts should render indeterminate progress with query prop
312
286
  `;
313
287
 
314
288
  exports[`VProgressLinear.ts should render reverse component in RTL mode 1`] = `
315
- <div role="progressbar"
289
+ <div class="v-progress-linear theme--light"
290
+ role="progressbar"
316
291
  aria-valuemin="0"
317
292
  aria-valuemax="100"
318
293
  aria-valuenow="33"
319
- class="v-progress-linear theme--light"
320
294
  style="height: 4px;"
321
295
  >
322
296
  <div class="v-progress-linear__background primary"
@@ -333,11 +307,11 @@ exports[`VProgressLinear.ts should render reverse component in RTL mode 1`] = `
333
307
  `;
334
308
 
335
309
  exports[`VProgressLinear.ts should render reversed component 1`] = `
336
- <div role="progressbar"
310
+ <div class="v-progress-linear v-progress-linear--reverse theme--light"
311
+ role="progressbar"
337
312
  aria-valuemin="0"
338
313
  aria-valuemax="100"
339
314
  aria-valuenow="33"
340
- class="v-progress-linear v-progress-linear--reverse theme--light"
341
315
  style="height: 4px;"
342
316
  >
343
317
  <div class="v-progress-linear__background primary"
@@ -1,5 +1,5 @@
1
1
  // Libraries
2
- import Vue from 'vue'
2
+ import { defineComponent } from 'vue'
3
3
 
4
4
  // Components
5
5
  import VSheet from '../VSheet'
@@ -7,11 +7,11 @@ import VSheet from '../VSheet'
7
7
  // Utilities
8
8
  import {
9
9
  shallowMount,
10
- Wrapper,
10
+ VueWrapper,
11
11
  } from '@vue/test-utils'
12
12
 
13
13
  describe('VSheet.ts', () => {
14
- let mountFunction: (options?: object) => Wrapper<Vue>
14
+ let mountFunction: (options?: Record<string, any>) => VueWrapper<any>
15
15
 
16
16
  beforeEach(() => {
17
17
  mountFunction = (options = {}) => {
@@ -27,7 +27,7 @@ describe('VSheet.ts', () => {
27
27
 
28
28
  it('should render a colored paper', () => {
29
29
  const wrapper = mountFunction({
30
- propsData: {
30
+ props: {
31
31
  color: 'blue lighten-1',
32
32
  },
33
33
  })
@@ -38,7 +38,7 @@ describe('VSheet.ts', () => {
38
38
 
39
39
  it('should render a tile paper', () => {
40
40
  const wrapper = mountFunction({
41
- propsData: {
41
+ props: {
42
42
  tile: true,
43
43
  },
44
44
  })
@@ -1,4 +1,4 @@
1
- import {h} from 'vue'
1
+ import { h, VNode } from 'vue'
2
2
  // Extensions
3
3
  import { BaseSlideGroup } from '../VSlideGroup/VSlideGroup'
4
4
 
@@ -13,8 +13,7 @@ import SSRBootable from '../../mixins/ssr-bootable'
13
13
  import mixins from '../../util/mixins'
14
14
 
15
15
  // Types
16
- import { Route } from 'vue-router'
17
- import { VNode } from 'vue'
16
+ import { RouteLocationNormalized } from 'vue-router'
18
17
 
19
18
  type VTabInstance = InstanceType<typeof VTab>
20
19
 
@@ -64,11 +63,14 @@ export default mixins(
64
63
 
65
64
  return render
66
65
  },
67
- onRouteChange (val: Route, oldVal: Route) {
66
+ onRouteChange (
67
+ val: RouteLocationNormalized,
68
+ oldVal: RouteLocationNormalized
69
+ ) {
68
70
  /* istanbul ignore next */
69
71
  if (this.mandatory) return
70
72
 
71
- const items = this.items as unknown as VTabInstance[]
73
+ const items = (this.items as unknown) as VTabInstance[]
72
74
  const newPath = val.path
73
75
  const oldPath = oldVal.path
74
76
 
@@ -1,4 +1,4 @@
1
- import {h} from 'vue'
1
+ import {h, withDirectives} from 'vue'
2
2
  // Styles
3
3
  import './VVirtualScroll.sass'
4
4
 
@@ -16,7 +16,6 @@ import {
16
16
 
17
17
  // Types
18
18
  import { VNode, defineComponent } from 'vue'
19
- import { PropValidator } from 'vue/types/options'
20
19
 
21
20
  export default defineComponent({
22
21
  name: 'v-virtual-scroll',
@@ -37,7 +36,7 @@ export default defineComponent({
37
36
  items: {
38
37
  type: Array,
39
38
  default: () => [],
40
- } as PropValidator<any[]>,
39
+ },
41
40
  },
42
41
 
43
42
  data: () => ({
@@ -111,15 +110,17 @@ export default defineComponent({
111
110
  },
112
111
  }, this.getChildren())
113
112
 
114
- return h('div', {
115
- class: 'v-virtual-scroll',
116
- style: this.measurableStyles,
117
- directives: [{
118
- name: 'scroll',
119
- modifiers: { self: true },
120
- value: this.onScroll,
121
- }],
122
- on: this.$listeners,
123
- }, [content])
113
+ return withDirectives(
114
+ h('div', {
115
+ class: 'v-virtual-scroll',
116
+ style: this.measurableStyles,
117
+ ...(this as any).$listeners,
118
+ }, {
119
+ default: () => [content]
120
+ }),
121
+ [
122
+ [Scroll, this.onScroll, '', { self: true }]
123
+ ]
124
+ )
124
125
  },
125
126
  })
@@ -3,25 +3,27 @@ import VVirtualScroll from '../VVirtualScroll'
3
3
 
4
4
  // Utilities
5
5
  import {
6
- shallowMount,
7
- Wrapper,
6
+ mount,
7
+ VueWrapper,
8
+ enableAutoUnmount,
8
9
  } from '@vue/test-utils'
10
+ import { h } from 'vue'
9
11
 
10
12
  describe('VVirtualScroll.ts', () => {
11
13
  type Instance = InstanceType<typeof VVirtualScroll>
12
- let mountFunction: (options?: object) => Wrapper<Instance>
14
+ let mountFunction: (options?: object) => VueWrapper<Instance>
13
15
  let propsData: Object
14
16
  let mock: jest.SpyInstance
15
17
  const elementHeight = 100
16
18
 
19
+ enableAutoUnmount(afterEach)
20
+
17
21
  beforeEach(() => {
18
22
  mountFunction = (options = {}) => {
19
- return shallowMount(VVirtualScroll, {
23
+ return mount(VVirtualScroll, {
20
24
  ...options,
21
- scopedSlots: {
22
- default ({ item }) {
23
- return h('div', { class: 'item' }, item)
24
- },
25
+ slots: {
26
+ default: ({ item }: { item: any }) => h('div', { class: 'item' }, item),
25
27
  },
26
28
  })
27
29
  }
@@ -41,7 +43,7 @@ describe('VVirtualScroll.ts', () => {
41
43
 
42
44
  it('should render component with scopedSlot and match snapshot', async () => {
43
45
  const wrapper = mountFunction({
44
- propsData,
46
+ props: propsData,
45
47
  })
46
48
 
47
49
  await wrapper.vm.$nextTick()
@@ -50,28 +52,29 @@ describe('VVirtualScroll.ts', () => {
50
52
 
51
53
  it('should set height of scrollable element', () => {
52
54
  const wrapper = mountFunction({
53
- propsData,
55
+ props: propsData,
54
56
  })
55
57
 
56
58
  const scrollable = wrapper.find('.v-virtual-scroll__container')
57
- expect(scrollable.element.style.height).toEqual('150px')
59
+ expect((scrollable.element as HTMLElement).style.height).toEqual('150px')
58
60
  })
59
61
 
60
- it('should render not more than 5 hidden items and match snapshot', () => {
62
+ it('should render not more than 5 hidden items and match snapshot', async () => {
61
63
  const wrapper = mountFunction({
62
- propsData: {
64
+ props: {
63
65
  height: elementHeight,
64
66
  items: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
65
67
  itemHeight: 50,
66
68
  },
67
69
  })
68
70
 
71
+ await wrapper.vm.$nextTick()
69
72
  expect(wrapper.html()).toMatchSnapshot()
70
73
  })
71
74
 
72
- it('should render right items on scroll and match snapshot', () => {
75
+ it('should render right items on scroll and match snapshot', async () => {
73
76
  const wrapper = mountFunction({
74
- propsData: {
77
+ props: {
75
78
  height: elementHeight,
76
79
  items: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
77
80
  itemHeight: 50,
@@ -79,7 +82,7 @@ describe('VVirtualScroll.ts', () => {
79
82
  })
80
83
 
81
84
  wrapper.vm.scrollTop = 500
82
- wrapper.trigger('scroll')
85
+ await wrapper.trigger('scroll')
83
86
 
84
87
  expect(wrapper.html()).toMatchSnapshot()
85
88
  })
@@ -88,11 +91,15 @@ describe('VVirtualScroll.ts', () => {
88
91
  const helpers = require('../../../util/helpers')
89
92
  const spy = jest.spyOn(helpers, 'getSlot')
90
93
  const wrapper = mountFunction({
91
- propsData,
92
- computed: { firstToRender: () => 2 },
94
+ props: propsData,
95
+ global: {
96
+ mocks: {
97
+ firstToRender: 2,
98
+ },
99
+ },
93
100
  })
94
101
 
95
- wrapper.setData({ first: 2 })
102
+ wrapper.vm.first = 2
96
103
 
97
104
  wrapper.vm.genChild(0, 1)
98
105
 
@@ -158,11 +158,15 @@ export default defineComponent({
158
158
  }) ?? [h(VBtn, {
159
159
  icon: true,
160
160
  ...attrs,
161
- }, [
162
- h(VIcon, {
163
- large: true,
164
- }, icon),
165
- ])]
161
+ }, {
162
+ default: () => [
163
+ h(VIcon, {
164
+ large: true,
165
+ }, {
166
+ default: () => icon
167
+ }),
168
+ ]
169
+ })]
166
170
 
167
171
  return h('div', {
168
172
  class: `v-window__${direction}`,
@@ -151,6 +151,8 @@ export default baseMixins.extend({
151
151
 
152
152
  // Enter handler for height transition.
153
153
  onEnter: this.onEnter,
154
- }, this.showLazyContent(() => [this.genWindowItem()]))
154
+ }, {
155
+ default: () => this.showLazyContent(() => [this.genWindowItem()])
156
+ })
155
157
  },
156
158
  })