vuetify 2.3.11 → 2.3.15
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/json/attributes.json +29 -17
- package/dist/json/tags.json +8 -0
- package/dist/json/web-types.json +217 -78
- package/dist/vuetify.css +17 -11
- package/dist/vuetify.css.map +1 -1
- package/dist/vuetify.js +215 -177
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAutocomplete/VAutocomplete.js +4 -2
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VCalendar/VCalendar.js +1 -1
- package/es5/components/VCalendar/VCalendar.js.map +1 -1
- package/es5/components/VCalendar/util/events.js.map +1 -1
- package/es5/components/VCalendar/util/timestamp.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerEdit.js +36 -42
- package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/es5/components/VCombobox/VCombobox.js +3 -1
- package/es5/components/VCombobox/VCombobox.js.map +1 -1
- package/es5/components/VData/VData.js +1 -2
- package/es5/components/VData/VData.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +1 -1
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +1 -3
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VIcon/VIcon.js +11 -4
- package/es5/components/VIcon/VIcon.js.map +1 -1
- package/es5/components/VList/VListItem.js +1 -1
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +4 -4
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +6 -7
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +50 -45
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +2 -2
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +1 -2
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +18 -6
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +3 -3
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/components/transitions/expand-transition.js.map +1 -1
- package/es5/directives/click-outside/index.js +1 -7
- package/es5/directives/click-outside/index.js.map +1 -1
- package/es5/directives/ripple/index.js +3 -3
- package/es5/directives/ripple/index.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/install.js +1 -1
- package/es5/install.js.map +1 -1
- package/es5/locale/ca.js +1 -1
- package/es5/locale/ca.js.map +1 -1
- package/es5/locale/fr.js +2 -2
- package/es5/locale/fr.js.map +1 -1
- package/es5/locale/it.js +3 -3
- package/es5/locale/it.js.map +1 -1
- package/es5/locale/th.js +17 -17
- package/es5/locale/th.js.map +1 -1
- package/es5/mixins/groupable/index.js +1 -1
- package/es5/mixins/groupable/index.js.map +1 -1
- package/es5/mixins/proxyable/index.js +1 -1
- package/es5/mixins/proxyable/index.js.map +1 -1
- package/es5/mixins/themeable/index.js +9 -10
- package/es5/mixins/themeable/index.js.map +1 -1
- package/es5/mixins/toggleable/index.js +1 -1
- package/es5/mixins/toggleable/index.js.map +1 -1
- package/es5/services/goto/index.js +0 -1
- package/es5/services/goto/index.js.map +1 -1
- package/es5/services/icons/presets/mdi.js +1 -1
- package/es5/services/icons/presets/mdi.js.map +1 -1
- package/es5/services/theme/index.js +3 -2
- package/es5/services/theme/index.js.map +1 -1
- package/es5/util/helpers.js +3 -3
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +4 -2
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VCalendar/VCalendar.js +1 -1
- package/lib/components/VCalendar/VCalendar.js.map +1 -1
- package/lib/components/VCalendar/util/events.js.map +1 -1
- package/lib/components/VCalendar/util/timestamp.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js +31 -37
- package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +3 -1
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VData/VData.js +1 -2
- package/lib/components/VData/VData.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +1 -1
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +1 -3
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VIcon/VIcon.js +11 -4
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VList/VListItem.js +1 -1
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +4 -4
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +6 -7
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +6 -6
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +2 -2
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +1 -2
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +8 -6
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +3 -3
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/transitions/expand-transition.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -7
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/directives/ripple/index.js +3 -3
- package/lib/directives/ripple/index.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/install.js +4 -1
- package/lib/install.js.map +1 -1
- package/lib/locale/ca.js +1 -1
- package/lib/locale/ca.js.map +1 -1
- package/lib/locale/fr.js +2 -2
- package/lib/locale/fr.js.map +1 -1
- package/lib/locale/it.js +3 -3
- package/lib/locale/it.js.map +1 -1
- package/lib/locale/th.js +17 -17
- package/lib/locale/th.js.map +1 -1
- package/lib/mixins/groupable/index.js +1 -1
- package/lib/mixins/groupable/index.js.map +1 -1
- package/lib/mixins/proxyable/index.js +1 -1
- package/lib/mixins/proxyable/index.js.map +1 -1
- package/lib/mixins/themeable/index.js +9 -9
- package/lib/mixins/themeable/index.js.map +1 -1
- package/lib/mixins/toggleable/index.js +1 -1
- package/lib/mixins/toggleable/index.js.map +1 -1
- package/lib/services/goto/index.js +0 -1
- package/lib/services/goto/index.js.map +1 -1
- package/lib/services/icons/presets/mdi.js +1 -1
- package/lib/services/icons/presets/mdi.js.map +1 -1
- package/lib/services/theme/index.js +3 -2
- package/lib/services/theme/index.js.map +1 -1
- package/lib/util/helpers.js +3 -3
- package/lib/util/helpers.js.map +1 -1
- package/package.json +10 -11
- package/src/components/VAppBar/__tests__/VAppBar.spec.ts +1 -1
- package/src/components/VAutocomplete/VAutocomplete.ts +2 -2
- package/src/components/VAutocomplete/__tests__/VAutocomplete2.spec.ts +1 -1
- package/src/components/VBanner/__tests__/VBanner.spec.ts +4 -4
- package/src/components/VCalendar/VCalendar.ts +1 -1
- package/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +4 -5
- package/src/components/VCalendar/util/__tests__/events.spec.ts +1 -1
- package/src/components/VCalendar/util/__tests__/timestamp.spec.ts +6 -6
- package/src/components/VCalendar/util/events.ts +1 -1
- package/src/components/VCalendar/util/timestamp.ts +2 -2
- package/src/components/VColorPicker/VColorPickerEdit.ts +35 -38
- package/src/components/VColorPicker/__tests__/VColorPicker.spec.ts +2 -11
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +0 -154
- package/src/components/VCombobox/VCombobox.ts +1 -1
- package/src/components/VData/VData.ts +1 -3
- package/src/components/VDataIterator/VDataIterator.ts +1 -1
- package/src/components/VDataTable/VDataTable.sass +18 -11
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +1 -1
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +2 -0
- package/src/components/VDataTable/__tests__/VDataTableHeader.spec.ts +1 -1
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +1 -1
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +238 -0
- package/src/components/VDatePicker/VDatePicker.ts +4 -3
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +7 -5
- package/src/components/VDialog/__tests__/VDialog.spec.ts +4 -0
- package/src/components/VExpansionPanel/__tests__/VExpansionPanel.spec.ts +4 -4
- package/src/components/VForm/__tests__/VForm.spec.ts +12 -62
- package/src/components/VGrid/__tests__/VCol.spec.ts +2 -2
- package/src/components/VHover/__tests__/VHover.spec.ts +7 -13
- package/src/components/VIcon/VIcon.sass +6 -1
- package/src/components/VIcon/VIcon.ts +10 -4
- package/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap +6 -9
- package/src/components/VList/VListItem.ts +2 -2
- package/src/components/VMenu/VMenu.ts +5 -5
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +7 -9
- package/src/components/VNavigationDrawer/__tests__/VNavigationDrawer.spec.ts +34 -22
- package/src/components/VOverflowBtn/VOverflowBtn.ts +1 -1
- package/src/components/VProgressCircular/_variables.scss +1 -1
- package/src/components/VProgressLinear/VProgressLinear.sass +0 -2
- package/src/components/VProgressLinear/__tests__/VProgressLinear.spec.ts +1 -0
- package/src/components/VProgressLinear/__tests__/__snapshots__/VProgressLinear.spec.ts.snap +1 -1
- package/src/components/VRadioGroup/__tests__/VRadio.spec.ts +0 -15
- package/src/components/VRadioGroup/__tests__/__snapshots__/VRadio.spec.ts.snap +3 -3
- package/src/components/VRating/__tests__/VRating.spec.ts +1 -1
- package/src/components/VSelect/VSelect.ts +5 -4
- package/src/components/VSelect/VSelectList.ts +1 -1
- package/src/components/VSelect/__tests__/VSelect.spec.ts +5 -0
- package/src/components/VSelect/__tests__/VSelect2.spec.ts +4 -0
- package/src/components/VSelect/__tests__/VSelect3.spec.ts +47 -24
- package/src/components/VSelect/__tests__/VSelect4.spec.ts +4 -0
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +280 -0
- package/src/components/VSlideGroup/__tests__/VSlideGroup.spec.ts +1 -1
- package/src/components/VSlider/VSlider.ts +1 -3
- package/src/components/VSnackbar/__tests__/VSnackbar.spec.ts +0 -15
- package/src/components/VTabs/VTabs.sass +1 -2
- package/src/components/VTextField/VTextField.ts +9 -6
- package/src/components/VTextField/__tests__/VTextField.spec.ts +1 -0
- package/src/components/VTextarea/__tests__/VTextarea.spec.ts +1 -1
- package/src/components/VTreeview/__tests__/VTreeview.spec.ts +23 -19
- package/src/components/VVirtualScroll/__tests__/VVirtualScroll.spec.ts +1 -1
- package/src/components/VWindow/VWindow.ts +2 -2
- package/src/components/VWindow/__tests__/VWindow.spec.ts +1 -1
- package/src/components/transitions/expand-transition.ts +4 -4
- package/src/directives/click-outside/index.ts +0 -9
- package/src/directives/intersect/__tests__/intersect.spec.ts +2 -2
- package/src/directives/ripple/__tests__/ripple.spec.ts +4 -4
- package/src/directives/ripple/index.ts +3 -3
- package/src/directives/touch/__tests__/touch.spec.ts +1 -1
- package/src/install.ts +4 -1
- package/src/locale/ca.ts +1 -1
- package/src/locale/fr.ts +2 -2
- package/src/locale/it.ts +3 -3
- package/src/locale/th.ts +17 -17
- package/src/mixins/activatable/__tests__/activatable.spec.ts +1 -1
- package/src/mixins/detachable/__tests__/detachable.spec.ts +0 -26
- package/src/mixins/groupable/index.ts +1 -2
- package/src/mixins/proxyable/index.ts +1 -2
- package/src/mixins/scrollable/__tests__/scrollable.spec.ts +1 -1
- package/src/mixins/themeable/index.ts +11 -12
- package/src/mixins/toggleable/index.ts +1 -2
- package/src/mixins/validatable/__tests__/validatable.spec.ts +1 -1
- package/src/services/application/__tests__/application.spec.ts +1 -1
- package/src/services/goto/__tests__/goto.spec.ts +1 -1
- package/src/services/goto/index.ts +0 -1
- package/src/services/icons/__tests__/__snapshots__/icons.spec.ts.snap +1 -1
- package/src/services/icons/presets/mdi.ts +1 -1
- package/src/services/theme/__tests__/theme.spec.ts +2 -2
- package/src/services/theme/index.ts +2 -2
- package/src/styles/settings/_dark.scss +14 -11
- package/src/util/__tests__/helpers.spec.ts +1 -1
- package/src/util/helpers.ts +7 -3
- package/types/index.d.ts +1 -0
- package/types/services/icons.d.ts +3 -0
- package/src/mixins/groupable/__tests__/groupable.spec.ts +0 -5
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Wrapper,
|
|
8
8
|
} from '@vue/test-utils'
|
|
9
9
|
|
|
10
|
+
// eslint-disable-next-line max-statements
|
|
10
11
|
describe('VSelect.ts', () => {
|
|
11
12
|
type Instance = InstanceType<typeof VSelect>
|
|
12
13
|
let mountFunction: (options?: object) => Wrapper<Instance>
|
|
@@ -35,6 +36,10 @@ describe('VSelect.ts', () => {
|
|
|
35
36
|
}
|
|
36
37
|
})
|
|
37
38
|
|
|
39
|
+
afterEach(() => {
|
|
40
|
+
document.body.removeChild(el)
|
|
41
|
+
})
|
|
42
|
+
|
|
38
43
|
it('should select an item !multiple', async () => {
|
|
39
44
|
const wrapper = mountFunction()
|
|
40
45
|
|
|
@@ -349,40 +354,58 @@ describe('VSelect.ts', () => {
|
|
|
349
354
|
})
|
|
350
355
|
|
|
351
356
|
// Inspired by https://github.com/vuetifyjs/vuetify/pull/1425 - Thanks @kevmo314
|
|
352
|
-
it('should open the select when
|
|
353
|
-
const wrapper = mountFunction(
|
|
357
|
+
it('should open the select when enter is pressed', async () => {
|
|
358
|
+
const wrapper = mountFunction({
|
|
359
|
+
propsData: {
|
|
360
|
+
items: ['foo', 'bar'],
|
|
361
|
+
},
|
|
362
|
+
})
|
|
354
363
|
|
|
355
|
-
wrapper.
|
|
356
|
-
wrapper.
|
|
364
|
+
wrapper.find('input').trigger('keydown.enter')
|
|
365
|
+
await wrapper.vm.$nextTick()
|
|
357
366
|
|
|
358
|
-
expect(
|
|
367
|
+
expect(document.body.querySelector('[data-app="true"]')).toMatchSnapshot()
|
|
368
|
+
})
|
|
359
369
|
|
|
360
|
-
|
|
361
|
-
wrapper
|
|
362
|
-
|
|
370
|
+
it('should open the select when space is pressed', async () => {
|
|
371
|
+
const wrapper = mountFunction({
|
|
372
|
+
propsData: {
|
|
373
|
+
items: ['foo', 'bar'],
|
|
374
|
+
},
|
|
375
|
+
})
|
|
363
376
|
|
|
364
|
-
|
|
377
|
+
wrapper.find('input').trigger('keydown.space')
|
|
378
|
+
await wrapper.vm.$nextTick()
|
|
365
379
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
wrapper.vm.hasMouseDown = true
|
|
369
|
-
wrapper.find('.v-input__slot').trigger('mouseup')
|
|
380
|
+
expect(document.body.querySelector('[data-app="true"]')).toMatchSnapshot()
|
|
381
|
+
})
|
|
370
382
|
|
|
371
|
-
|
|
383
|
+
it('should open the select is multiple and key up is pressed', async () => {
|
|
384
|
+
const wrapper = mountFunction({
|
|
385
|
+
propsData: {
|
|
386
|
+
multiple: true,
|
|
387
|
+
items: ['foo', 'bar'],
|
|
388
|
+
},
|
|
389
|
+
})
|
|
372
390
|
|
|
373
|
-
wrapper.
|
|
374
|
-
wrapper.
|
|
375
|
-
wrapper.vm.hasMouseDown = true
|
|
376
|
-
wrapper.find('.v-input__slot').trigger('mouseup')
|
|
391
|
+
wrapper.find('input').trigger('keydown.up')
|
|
392
|
+
await wrapper.vm.$nextTick()
|
|
377
393
|
|
|
378
|
-
expect(
|
|
394
|
+
expect(document.body.querySelector('[data-app="true"]')).toMatchSnapshot()
|
|
395
|
+
})
|
|
379
396
|
|
|
380
|
-
|
|
381
|
-
wrapper
|
|
382
|
-
|
|
383
|
-
|
|
397
|
+
it('should open the select is multiple and key down is pressed', async () => {
|
|
398
|
+
const wrapper = mountFunction({
|
|
399
|
+
propsData: {
|
|
400
|
+
multiple: true,
|
|
401
|
+
items: ['foo', 'bar'],
|
|
402
|
+
},
|
|
403
|
+
})
|
|
384
404
|
|
|
385
|
-
|
|
405
|
+
wrapper.find('input').trigger('keydown.down')
|
|
406
|
+
await wrapper.vm.$nextTick()
|
|
407
|
+
|
|
408
|
+
expect(document.body.querySelector('[data-app="true"]')).toMatchSnapshot()
|
|
386
409
|
})
|
|
387
410
|
|
|
388
411
|
it('should return full items if using auto prop', async () => {
|
|
@@ -49,3 +49,283 @@ exports[`VSelect.ts should add color to selected index 1`] = `
|
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
`;
|
|
52
|
+
|
|
53
|
+
exports[`VSelect.ts should open the select is multiple and key down is pressed 1`] = `
|
|
54
|
+
<div
|
|
55
|
+
data-app="true"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
class="v-menu__content theme--light menuable__content__active "
|
|
59
|
+
style="max-height: 304px; min-width: 0px; max-width: auto; top: 12px; left: 0px; transform-origin: top left; z-index: 8; display: none;"
|
|
60
|
+
>
|
|
61
|
+
<div
|
|
62
|
+
class="v-list v-select-list v-sheet theme--light theme--light"
|
|
63
|
+
id="list-106"
|
|
64
|
+
role="listbox"
|
|
65
|
+
tabindex="-1"
|
|
66
|
+
>
|
|
67
|
+
<div
|
|
68
|
+
aria-selected="false"
|
|
69
|
+
class="v-list-item v-list-item--link theme--light"
|
|
70
|
+
id="list-item-113-0"
|
|
71
|
+
role="option"
|
|
72
|
+
tabindex="0"
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
class="v-list-item__action"
|
|
76
|
+
>
|
|
77
|
+
<div
|
|
78
|
+
class="v-simple-checkbox"
|
|
79
|
+
>
|
|
80
|
+
<div
|
|
81
|
+
class="v-input--selection-controls__ripple primary--text"
|
|
82
|
+
/>
|
|
83
|
+
<i
|
|
84
|
+
aria-hidden="true"
|
|
85
|
+
class="v-icon notranslate material-icons theme--light"
|
|
86
|
+
>
|
|
87
|
+
$checkboxOff
|
|
88
|
+
</i>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
<div
|
|
92
|
+
class="v-list-item__content"
|
|
93
|
+
>
|
|
94
|
+
<div
|
|
95
|
+
class="v-list-item__title"
|
|
96
|
+
>
|
|
97
|
+
foo
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
<div
|
|
102
|
+
aria-selected="false"
|
|
103
|
+
class="v-list-item v-list-item--link theme--light"
|
|
104
|
+
id="list-item-113-1"
|
|
105
|
+
role="option"
|
|
106
|
+
tabindex="0"
|
|
107
|
+
>
|
|
108
|
+
<div
|
|
109
|
+
class="v-list-item__action"
|
|
110
|
+
>
|
|
111
|
+
<div
|
|
112
|
+
class="v-simple-checkbox"
|
|
113
|
+
>
|
|
114
|
+
<div
|
|
115
|
+
class="v-input--selection-controls__ripple primary--text"
|
|
116
|
+
/>
|
|
117
|
+
<i
|
|
118
|
+
aria-hidden="true"
|
|
119
|
+
class="v-icon notranslate material-icons theme--light"
|
|
120
|
+
>
|
|
121
|
+
$checkboxOff
|
|
122
|
+
</i>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div
|
|
126
|
+
class="v-list-item__content"
|
|
127
|
+
>
|
|
128
|
+
<div
|
|
129
|
+
class="v-list-item__title"
|
|
130
|
+
>
|
|
131
|
+
bar
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
exports[`VSelect.ts should open the select is multiple and key up is pressed 1`] = `
|
|
141
|
+
<div
|
|
142
|
+
data-app="true"
|
|
143
|
+
>
|
|
144
|
+
<div
|
|
145
|
+
class="v-menu__content theme--light menuable__content__active "
|
|
146
|
+
style="max-height: 304px; min-width: 0px; max-width: auto; top: 12px; left: 0px; transform-origin: top left; z-index: 8; display: none;"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
class="v-list v-select-list v-sheet theme--light theme--light"
|
|
150
|
+
id="list-92"
|
|
151
|
+
role="listbox"
|
|
152
|
+
tabindex="-1"
|
|
153
|
+
>
|
|
154
|
+
<div
|
|
155
|
+
aria-selected="false"
|
|
156
|
+
class="v-list-item v-list-item--link theme--light"
|
|
157
|
+
id="list-item-99-0"
|
|
158
|
+
role="option"
|
|
159
|
+
tabindex="0"
|
|
160
|
+
>
|
|
161
|
+
<div
|
|
162
|
+
class="v-list-item__action"
|
|
163
|
+
>
|
|
164
|
+
<div
|
|
165
|
+
class="v-simple-checkbox"
|
|
166
|
+
>
|
|
167
|
+
<div
|
|
168
|
+
class="v-input--selection-controls__ripple primary--text"
|
|
169
|
+
/>
|
|
170
|
+
<i
|
|
171
|
+
aria-hidden="true"
|
|
172
|
+
class="v-icon notranslate material-icons theme--light"
|
|
173
|
+
>
|
|
174
|
+
$checkboxOff
|
|
175
|
+
</i>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<div
|
|
179
|
+
class="v-list-item__content"
|
|
180
|
+
>
|
|
181
|
+
<div
|
|
182
|
+
class="v-list-item__title"
|
|
183
|
+
>
|
|
184
|
+
foo
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
<div
|
|
189
|
+
aria-selected="false"
|
|
190
|
+
class="v-list-item v-list-item--link theme--light"
|
|
191
|
+
id="list-item-99-1"
|
|
192
|
+
role="option"
|
|
193
|
+
tabindex="0"
|
|
194
|
+
>
|
|
195
|
+
<div
|
|
196
|
+
class="v-list-item__action"
|
|
197
|
+
>
|
|
198
|
+
<div
|
|
199
|
+
class="v-simple-checkbox"
|
|
200
|
+
>
|
|
201
|
+
<div
|
|
202
|
+
class="v-input--selection-controls__ripple primary--text"
|
|
203
|
+
/>
|
|
204
|
+
<i
|
|
205
|
+
aria-hidden="true"
|
|
206
|
+
class="v-icon notranslate material-icons theme--light"
|
|
207
|
+
>
|
|
208
|
+
$checkboxOff
|
|
209
|
+
</i>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<div
|
|
213
|
+
class="v-list-item__content"
|
|
214
|
+
>
|
|
215
|
+
<div
|
|
216
|
+
class="v-list-item__title"
|
|
217
|
+
>
|
|
218
|
+
bar
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
`;
|
|
226
|
+
|
|
227
|
+
exports[`VSelect.ts should open the select when enter is pressed 1`] = `
|
|
228
|
+
<div
|
|
229
|
+
data-app="true"
|
|
230
|
+
>
|
|
231
|
+
<div
|
|
232
|
+
class="v-menu__content theme--light menuable__content__active "
|
|
233
|
+
style="max-height: 304px; min-width: 0px; max-width: auto; top: 12px; left: 0px; transform-origin: top left; z-index: 8; display: none;"
|
|
234
|
+
>
|
|
235
|
+
<div
|
|
236
|
+
class="v-list v-select-list v-sheet theme--light theme--light"
|
|
237
|
+
id="list-68"
|
|
238
|
+
role="listbox"
|
|
239
|
+
tabindex="-1"
|
|
240
|
+
>
|
|
241
|
+
<div
|
|
242
|
+
aria-selected="false"
|
|
243
|
+
class="v-list-item v-list-item--link theme--light"
|
|
244
|
+
id="list-item-75-0"
|
|
245
|
+
role="option"
|
|
246
|
+
tabindex="0"
|
|
247
|
+
>
|
|
248
|
+
<div
|
|
249
|
+
class="v-list-item__content"
|
|
250
|
+
>
|
|
251
|
+
<div
|
|
252
|
+
class="v-list-item__title"
|
|
253
|
+
>
|
|
254
|
+
foo
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
<div
|
|
259
|
+
aria-selected="false"
|
|
260
|
+
class="v-list-item v-list-item--link theme--light"
|
|
261
|
+
id="list-item-75-1"
|
|
262
|
+
role="option"
|
|
263
|
+
tabindex="0"
|
|
264
|
+
>
|
|
265
|
+
<div
|
|
266
|
+
class="v-list-item__content"
|
|
267
|
+
>
|
|
268
|
+
<div
|
|
269
|
+
class="v-list-item__title"
|
|
270
|
+
>
|
|
271
|
+
bar
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
`;
|
|
279
|
+
|
|
280
|
+
exports[`VSelect.ts should open the select when space is pressed 1`] = `
|
|
281
|
+
<div
|
|
282
|
+
data-app="true"
|
|
283
|
+
>
|
|
284
|
+
<div
|
|
285
|
+
class="v-menu__content theme--light menuable__content__active "
|
|
286
|
+
style="max-height: 304px; min-width: 0px; max-width: auto; top: 12px; left: 0px; transform-origin: top left; z-index: 8; display: none;"
|
|
287
|
+
>
|
|
288
|
+
<div
|
|
289
|
+
class="v-list v-select-list v-sheet theme--light theme--light"
|
|
290
|
+
id="list-80"
|
|
291
|
+
role="listbox"
|
|
292
|
+
tabindex="-1"
|
|
293
|
+
>
|
|
294
|
+
<div
|
|
295
|
+
aria-selected="false"
|
|
296
|
+
class="v-list-item v-list-item--link theme--light"
|
|
297
|
+
id="list-item-87-0"
|
|
298
|
+
role="option"
|
|
299
|
+
tabindex="0"
|
|
300
|
+
>
|
|
301
|
+
<div
|
|
302
|
+
class="v-list-item__content"
|
|
303
|
+
>
|
|
304
|
+
<div
|
|
305
|
+
class="v-list-item__title"
|
|
306
|
+
>
|
|
307
|
+
foo
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
<div
|
|
312
|
+
aria-selected="false"
|
|
313
|
+
class="v-list-item v-list-item--link theme--light"
|
|
314
|
+
id="list-item-87-1"
|
|
315
|
+
role="option"
|
|
316
|
+
tabindex="0"
|
|
317
|
+
>
|
|
318
|
+
<div
|
|
319
|
+
class="v-list-item__content"
|
|
320
|
+
>
|
|
321
|
+
<div
|
|
322
|
+
class="v-list-item__title"
|
|
323
|
+
>
|
|
324
|
+
bar
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
`;
|
|
@@ -210,7 +210,7 @@ describe('VSlideGroup.ts', () => {
|
|
|
210
210
|
expect(fn).toHaveBeenCalled()
|
|
211
211
|
})
|
|
212
212
|
|
|
213
|
-
it('
|
|
213
|
+
it('should scroll from affix click', async () => {
|
|
214
214
|
const onClick = jest.fn()
|
|
215
215
|
const scrollTo = jest.fn()
|
|
216
216
|
const setWidths = jest.fn()
|
|
@@ -139,9 +139,7 @@ export default mixins<options &
|
|
|
139
139
|
return this.step > 0 ? parseFloat(this.step) : 0
|
|
140
140
|
},
|
|
141
141
|
inputWidth (): number {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return value
|
|
142
|
+
return (this.roundValue(this.internalValue) - this.minValue) / (this.maxValue - this.minValue) * 100
|
|
145
143
|
},
|
|
146
144
|
trackFillStyles (): Partial<CSSStyleDeclaration> {
|
|
147
145
|
const startDir = this.vertical ? 'bottom' : 'left'
|
|
@@ -103,21 +103,6 @@ describe('VSnackbar.ts', () => {
|
|
|
103
103
|
expect(genTransition.mock.calls.length > 0).toBe(!expected)
|
|
104
104
|
})
|
|
105
105
|
|
|
106
|
-
it.each([
|
|
107
|
-
[undefined, false],
|
|
108
|
-
[false, false],
|
|
109
|
-
[true, true],
|
|
110
|
-
])('should conditionally invoke setTimeout method using %s', (value, expected) => {
|
|
111
|
-
const setTimeout = jest.fn()
|
|
112
|
-
|
|
113
|
-
mountFunction({
|
|
114
|
-
propsData: { value },
|
|
115
|
-
methods: { setTimeout },
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
expect(setTimeout.mock.calls.length > 0).toBe(expected)
|
|
119
|
-
})
|
|
120
|
-
|
|
121
106
|
it.each([
|
|
122
107
|
[undefined, true],
|
|
123
108
|
[100, true],
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
|
|
66
66
|
.v-tab
|
|
67
67
|
align-items: center
|
|
68
|
+
cursor: pointer
|
|
68
69
|
display: flex
|
|
69
70
|
flex: 0 1 auto
|
|
70
71
|
font-size: $tab-font-size
|
|
@@ -99,8 +100,6 @@
|
|
|
99
100
|
top: 0
|
|
100
101
|
transition: $primary-transition
|
|
101
102
|
|
|
102
|
-
&:not(.v-tab-disabled)
|
|
103
|
-
cursor: pointer
|
|
104
103
|
|
|
105
104
|
.v-tabs-slider
|
|
106
105
|
background-color: currentColor
|
|
@@ -131,7 +131,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
131
131
|
if (typeof this.counterValue === 'function') {
|
|
132
132
|
return this.counterValue(this.internalValue)
|
|
133
133
|
}
|
|
134
|
-
return (this.internalValue || '').
|
|
134
|
+
return [...(this.internalValue || '')].length
|
|
135
135
|
},
|
|
136
136
|
hasCounter (): boolean {
|
|
137
137
|
return this.counter !== false && this.counter != null
|
|
@@ -196,7 +196,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
196
196
|
},
|
|
197
197
|
|
|
198
198
|
watch: {
|
|
199
|
-
labelValue: 'setLabelWidth',
|
|
199
|
+
// labelValue: 'setLabelWidth', // moved to mounted, see #11533
|
|
200
200
|
outlined: 'setLabelWidth',
|
|
201
201
|
label () {
|
|
202
202
|
this.$nextTick(this.setLabelWidth)
|
|
@@ -228,6 +228,9 @@ export default baseMixins.extend<options>().extend({
|
|
|
228
228
|
},
|
|
229
229
|
|
|
230
230
|
mounted () {
|
|
231
|
+
// #11533
|
|
232
|
+
this.$watch(() => this.labelValue, this.setLabelWidth)
|
|
233
|
+
|
|
231
234
|
this.autofocus && this.tryAutofocus()
|
|
232
235
|
|
|
233
236
|
requestAnimationFrame(() => (this.isBooted = true))
|
|
@@ -275,8 +278,8 @@ export default baseMixins.extend<options>().extend({
|
|
|
275
278
|
genIconSlot () {
|
|
276
279
|
const slot = []
|
|
277
280
|
|
|
278
|
-
if (this.$slots
|
|
279
|
-
slot.push(this.$slots
|
|
281
|
+
if (this.$slots.append) {
|
|
282
|
+
slot.push(this.$slots.append as VNode[])
|
|
280
283
|
} else if (this.appendIcon) {
|
|
281
284
|
slot.push(this.genIcon('append'))
|
|
282
285
|
}
|
|
@@ -362,7 +365,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
362
365
|
genLegend () {
|
|
363
366
|
const width = !this.singleLine && (this.labelValue || this.isDirty) ? this.labelWidth : 0
|
|
364
367
|
const span = this.$createElement('span', {
|
|
365
|
-
domProps: { innerHTML: '' },
|
|
368
|
+
domProps: { innerHTML: '​' },
|
|
366
369
|
})
|
|
367
370
|
|
|
368
371
|
return this.$createElement('legend', {
|
|
@@ -373,7 +376,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
373
376
|
},
|
|
374
377
|
genInput () {
|
|
375
378
|
const listeners = Object.assign({}, this.listeners$)
|
|
376
|
-
delete listeners
|
|
379
|
+
delete listeners.change // Change should not be bound externally
|
|
377
380
|
|
|
378
381
|
return this.$createElement('input', {
|
|
379
382
|
style: {},
|
|
@@ -330,6 +330,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
330
330
|
const change = jest.fn()
|
|
331
331
|
let value = 'test'
|
|
332
332
|
const component = {
|
|
333
|
+
// eslint-disable-next-line sonarjs/no-identical-functions
|
|
333
334
|
render (h) {
|
|
334
335
|
return h(VTextField, {
|
|
335
336
|
on: {
|
|
@@ -37,7 +37,7 @@ describe('VTextarea.ts', () => {
|
|
|
37
37
|
|
|
38
38
|
// TODO: switch to e2e, jest doesn't do inline styles
|
|
39
39
|
expect(wrapper.html()).toMatchSnapshot()
|
|
40
|
-
expect(el.element.style.getPropertyValue('height')
|
|
40
|
+
expect(el.element.style.getPropertyValue('height')).not.toHaveLength(0)
|
|
41
41
|
})
|
|
42
42
|
|
|
43
43
|
it('should watch lazy value', async () => {
|
|
@@ -136,8 +136,8 @@ describe('VTreeView.ts', () => { // eslint-disable-line max-statements
|
|
|
136
136
|
await wrapper.vm.$nextTick()
|
|
137
137
|
|
|
138
138
|
expect(wrapper.html()).toMatchSnapshot()
|
|
139
|
-
expect(
|
|
140
|
-
expect(
|
|
139
|
+
expect(`[Vue warn]: Error in created hook: "TypeError: Cannot set property 'vnode' of undefined"`).toHaveBeenWarned()
|
|
140
|
+
expect(`TypeError: Cannot set property 'vnode' of undefined`).toHaveBeenWarned()
|
|
141
141
|
})
|
|
142
142
|
|
|
143
143
|
it('should load children when selecting, but not render', async () => {
|
|
@@ -394,7 +394,7 @@ describe('VTreeView.ts', () => { // eslint-disable-line max-statements
|
|
|
394
394
|
|
|
395
395
|
await wrapper.vm.$nextTick()
|
|
396
396
|
|
|
397
|
-
expect(wrapper.vm.nodes
|
|
397
|
+
expect(wrapper.vm.nodes.Foobar).toBeTruthy()
|
|
398
398
|
|
|
399
399
|
wrapper.setProps({ value: ['Foobar'] })
|
|
400
400
|
|
|
@@ -492,26 +492,30 @@ describe('VTreeView.ts', () => { // eslint-disable-line max-statements
|
|
|
492
492
|
|
|
493
493
|
expect(wrapper.html()).toMatchSnapshot()
|
|
494
494
|
|
|
495
|
-
wrapper.setProps({
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
495
|
+
wrapper.setProps({
|
|
496
|
+
items: [
|
|
497
|
+
{
|
|
498
|
+
id: 1,
|
|
499
|
+
name: 'one',
|
|
500
|
+
},
|
|
501
|
+
],
|
|
502
|
+
})
|
|
501
503
|
|
|
502
504
|
await wrapper.vm.$nextTick()
|
|
503
505
|
expect(wrapper.html()).toMatchSnapshot()
|
|
504
506
|
|
|
505
|
-
wrapper.setProps({
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
507
|
+
wrapper.setProps({
|
|
508
|
+
items: [
|
|
509
|
+
{
|
|
510
|
+
id: 1,
|
|
511
|
+
name: 'one',
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
id: 3,
|
|
515
|
+
name: 'three',
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
})
|
|
515
519
|
|
|
516
520
|
await wrapper.vm.$nextTick()
|
|
517
521
|
expect(wrapper.html()).toMatchSnapshot()
|
|
@@ -12,7 +12,7 @@ describe('VVirtualScroll.ts', () => {
|
|
|
12
12
|
let mountFunction: (options?: object) => Wrapper<Instance>
|
|
13
13
|
let propsData: Object
|
|
14
14
|
let mock: jest.SpyInstance
|
|
15
|
-
const elementHeight
|
|
15
|
+
const elementHeight = 100
|
|
16
16
|
|
|
17
17
|
beforeEach(() => {
|
|
18
18
|
mountFunction = (options = {}) => {
|
|
@@ -18,14 +18,14 @@ import { BaseItemGroup } from '../VItemGroup/VItemGroup'
|
|
|
18
18
|
export default BaseItemGroup.extend({
|
|
19
19
|
name: 'v-window',
|
|
20
20
|
|
|
21
|
+
directives: { Touch },
|
|
22
|
+
|
|
21
23
|
provide (): object {
|
|
22
24
|
return {
|
|
23
25
|
windowGroup: this,
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
28
|
|
|
27
|
-
directives: { Touch },
|
|
28
|
-
|
|
29
29
|
props: {
|
|
30
30
|
activeClass: {
|
|
31
31
|
type: String,
|
|
@@ -30,7 +30,7 @@ describe('VWindow.ts', () => {
|
|
|
30
30
|
}
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
it('
|
|
33
|
+
it('should return the correct transition', async () => {
|
|
34
34
|
const wrapper = mountFunction()
|
|
35
35
|
// Force booted
|
|
36
36
|
wrapper.setData({ isBooted: true })
|
|
@@ -2,7 +2,7 @@ import { upperFirst } from '../../util/helpers'
|
|
|
2
2
|
|
|
3
3
|
interface HTMLExpandElement extends HTMLElement {
|
|
4
4
|
_parent?: (Node & ParentNode & HTMLElement) | null
|
|
5
|
-
_initialStyle
|
|
5
|
+
_initialStyle?: {
|
|
6
6
|
transition: string
|
|
7
7
|
overflow: string
|
|
8
8
|
height?: string | null
|
|
@@ -25,7 +25,7 @@ export default function (expandedParentClass = '', x = false) {
|
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
enter (el: HTMLExpandElement) {
|
|
28
|
-
const initialStyle = el._initialStyle
|
|
28
|
+
const initialStyle = el._initialStyle!
|
|
29
29
|
|
|
30
30
|
el.style.setProperty('transition', 'none', 'important')
|
|
31
31
|
// Hide overflow to account for collapsed margins in the calculated height
|
|
@@ -76,8 +76,8 @@ export default function (expandedParentClass = '', x = false) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
function resetStyles (el: HTMLExpandElement) {
|
|
79
|
-
const size = el._initialStyle[sizeProperty]
|
|
80
|
-
el.style.overflow = el._initialStyle
|
|
79
|
+
const size = el._initialStyle![sizeProperty]
|
|
80
|
+
el.style.overflow = el._initialStyle!.overflow
|
|
81
81
|
if (size != null) el.style[sizeProperty] = size
|
|
82
82
|
delete el._initialStyle
|
|
83
83
|
}
|
|
@@ -25,15 +25,6 @@ function directive (e: PointerEvent, el: HTMLElement, binding: ClickOutsideDirec
|
|
|
25
25
|
// with non-toggleable components
|
|
26
26
|
if (!e || isActive(e) === false) return
|
|
27
27
|
|
|
28
|
-
// If click was triggered programmaticaly (domEl.click()) then
|
|
29
|
-
// it shouldn't be treated as click-outside
|
|
30
|
-
// Chrome/Firefox support isTrusted property
|
|
31
|
-
// IE/Edge support pointerType property (empty if not triggered
|
|
32
|
-
// by pointing device)
|
|
33
|
-
if (('isTrusted' in e && !e.isTrusted) ||
|
|
34
|
-
('pointerType' in e && !e.pointerType)
|
|
35
|
-
) return
|
|
36
|
-
|
|
37
28
|
// Check if additional elements were passed to be included in check
|
|
38
29
|
// (click must be outside all included elements, if any)
|
|
39
30
|
const elements = ((typeof binding.value === 'object' && binding.value.include) || (() => []))()
|