@dimailn/vuetify 2.7.2-alpha2 → 2.7.2-alpha21

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 (328) hide show
  1. package/dist/vuetify.css +45 -45
  2. package/dist/vuetify.css.map +1 -1
  3. package/dist/vuetify.js +490 -349
  4. package/dist/vuetify.js.map +1 -1
  5. package/dist/vuetify.min.css +2 -2
  6. package/dist/vuetify.min.js +2 -2
  7. package/es5/components/VAppBar/VAppBar.js +7 -12
  8. package/es5/components/VAppBar/VAppBar.js.map +1 -1
  9. package/es5/components/VAutocomplete/VAutocomplete.js +10 -7
  10. package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
  11. package/es5/components/VCheckbox/VSimpleCheckbox.js +66 -35
  12. package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  13. package/es5/components/VColorPicker/VColorPicker.js +6 -6
  14. package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
  15. package/es5/components/VData/VData.js +14 -2
  16. package/es5/components/VData/VData.js.map +1 -1
  17. package/es5/components/VDataIterator/VDataIterator.js +4 -3
  18. package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
  19. package/es5/components/VDataTable/VDataTable.js +2 -2
  20. package/es5/components/VDataTable/VDataTable.js.map +1 -1
  21. package/es5/components/VDataTable/VDataTableHeader.js +4 -3
  22. package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
  23. package/es5/components/VDataTable/VDataTableHeaderDesktop.js +4 -2
  24. package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
  25. package/es5/components/VDataTable/VVirtualTable.js +1 -1
  26. package/es5/components/VDataTable/VVirtualTable.js.map +1 -1
  27. package/es5/components/VDataTable/mixins/header.js +1 -1
  28. package/es5/components/VDataTable/mixins/header.js.map +1 -1
  29. package/es5/components/VDatePicker/VDatePicker.js +6 -6
  30. package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
  31. package/es5/components/VDialog/VDialog.js +1 -1
  32. package/es5/components/VDialog/VDialog.js.map +1 -1
  33. package/es5/components/VExpansionPanel/VExpansionPanelContent.js +1 -1
  34. package/es5/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
  35. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +1 -1
  36. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  37. package/es5/components/VForm/VForm.js +8 -8
  38. package/es5/components/VForm/VForm.js.map +1 -1
  39. package/es5/components/VGrid/VCol.js +3 -3
  40. package/es5/components/VGrid/VCol.js.map +1 -1
  41. package/es5/components/VGrid/VContainer.js +3 -1
  42. package/es5/components/VGrid/VContainer.js.map +1 -1
  43. package/es5/components/VImg/VImg.js +1 -1
  44. package/es5/components/VImg/VImg.js.map +1 -1
  45. package/es5/components/VInput/VInput.js +1 -1
  46. package/es5/components/VInput/VInput.js.map +1 -1
  47. package/es5/components/VItemGroup/VItem.js +17 -18
  48. package/es5/components/VItemGroup/VItem.js.map +1 -1
  49. package/es5/components/VItemGroup/VItemGroup.js +1 -1
  50. package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
  51. package/es5/components/VList/VList.js +1 -1
  52. package/es5/components/VList/VList.js.map +1 -1
  53. package/es5/components/VList/VListGroup.js +12 -15
  54. package/es5/components/VList/VListGroup.js.map +1 -1
  55. package/es5/components/VMenu/VMenu.js +1 -1
  56. package/es5/components/VMenu/VMenu.js.map +1 -1
  57. package/es5/components/VOverlay/VOverlay.js +1 -1
  58. package/es5/components/VOverlay/VOverlay.js.map +1 -1
  59. package/es5/components/VRadioGroup/VRadioGroup.js +5 -5
  60. package/es5/components/VRadioGroup/VRadioGroup.js.map +1 -1
  61. package/es5/components/VRangeSlider/VRangeSlider.js +1 -1
  62. package/es5/components/VRangeSlider/VRangeSlider.js.map +1 -1
  63. package/es5/components/VSelect/VSelect.js +3 -5
  64. package/es5/components/VSelect/VSelect.js.map +1 -1
  65. package/es5/components/VSelect/VSelectList.js +7 -5
  66. package/es5/components/VSelect/VSelectList.js.map +1 -1
  67. package/es5/components/VSparkline/VSparkline.js +6 -6
  68. package/es5/components/VSparkline/VSparkline.js.map +1 -1
  69. package/es5/components/VStepper/VStepperContent.js +1 -1
  70. package/es5/components/VStepper/VStepperContent.js.map +1 -1
  71. package/es5/components/VStepper/VStepperStep.js +1 -1
  72. package/es5/components/VStepper/VStepperStep.js.map +1 -1
  73. package/es5/components/VSubheader/VSubheader.js +3 -3
  74. package/es5/components/VSubheader/VSubheader.js.map +1 -1
  75. package/es5/components/VTabs/VTab.js.map +1 -1
  76. package/es5/components/VTabs/VTabs.js +1 -2
  77. package/es5/components/VTabs/VTabs.js.map +1 -1
  78. package/es5/components/VTextField/VTextField.js +5 -2
  79. package/es5/components/VTextField/VTextField.js.map +1 -1
  80. package/es5/components/VToolbar/VToolbar.js +2 -3
  81. package/es5/components/VToolbar/VToolbar.js.map +1 -1
  82. package/es5/components/VTreeview/VTreeviewNode.js +1 -1
  83. package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
  84. package/es5/components/transitions/createTransition.js +9 -4
  85. package/es5/components/transitions/createTransition.js.map +1 -1
  86. package/es5/components/transitions/expand-transition.js +8 -7
  87. package/es5/components/transitions/expand-transition.js.map +1 -1
  88. package/es5/directives/intersect/index.js +20 -7
  89. package/es5/directives/intersect/index.js.map +1 -1
  90. package/es5/directives/mutate/index.js +13 -13
  91. package/es5/directives/mutate/index.js.map +1 -1
  92. package/es5/directives/resize/index.js +8 -8
  93. package/es5/directives/resize/index.js.map +1 -1
  94. package/es5/directives/scroll/index.js +10 -9
  95. package/es5/directives/scroll/index.js.map +1 -1
  96. package/es5/directives/touch/index.js +4 -4
  97. package/es5/directives/touch/index.js.map +1 -1
  98. package/es5/framework.js +1 -1
  99. package/es5/install.js +10 -33
  100. package/es5/install.js.map +1 -1
  101. package/es5/mixins/activatable/index.js +9 -4
  102. package/es5/mixins/activatable/index.js.map +1 -1
  103. package/es5/mixins/applicationable/index.js +4 -4
  104. package/es5/mixins/applicationable/index.js.map +1 -1
  105. package/es5/mixins/binds-attrs/index.js +1 -1
  106. package/es5/mixins/binds-attrs/index.js.map +1 -1
  107. package/es5/mixins/detachable/index.js +5 -6
  108. package/es5/mixins/detachable/index.js.map +1 -1
  109. package/es5/mixins/groupable/index.js +1 -1
  110. package/es5/mixins/groupable/index.js.map +1 -1
  111. package/es5/mixins/intersectable/index.js +2 -2
  112. package/es5/mixins/intersectable/index.js.map +1 -1
  113. package/es5/mixins/menuable/index.js +1 -1
  114. package/es5/mixins/menuable/index.js.map +1 -1
  115. package/es5/mixins/overlayable/index.js +5 -4
  116. package/es5/mixins/overlayable/index.js.map +1 -1
  117. package/es5/mixins/proxyable/index.js +0 -4
  118. package/es5/mixins/proxyable/index.js.map +1 -1
  119. package/es5/mixins/selectable/index.js +2 -5
  120. package/es5/mixins/selectable/index.js.map +1 -1
  121. package/es5/mixins/translatable/index.js +1 -1
  122. package/es5/mixins/translatable/index.js.map +1 -1
  123. package/es5/mixins/validatable/index.js +2 -2
  124. package/es5/mixins/validatable/index.js.map +1 -1
  125. package/es5/services/breakpoint/index.js +3 -1
  126. package/es5/services/breakpoint/index.js.map +1 -1
  127. package/es5/util/helpers.js +44 -0
  128. package/es5/util/helpers.js.map +1 -1
  129. package/es5/util/legacyEventsMixin.js +48 -0
  130. package/es5/util/legacyEventsMixin.js.map +1 -0
  131. package/lib/components/VAppBar/VAppBar.js +7 -11
  132. package/lib/components/VAppBar/VAppBar.js.map +1 -1
  133. package/lib/components/VAutocomplete/VAutocomplete.js +11 -8
  134. package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
  135. package/lib/components/VCheckbox/VSimpleCheckbox.js +72 -36
  136. package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  137. package/lib/components/VColorPicker/VColorPicker.js +6 -6
  138. package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
  139. package/lib/components/VData/VData.js +15 -2
  140. package/lib/components/VData/VData.js.map +1 -1
  141. package/lib/components/VDataIterator/VDataIterator.js +4 -3
  142. package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
  143. package/lib/components/VDataTable/VDataTable.js +2 -2
  144. package/lib/components/VDataTable/VDataTable.js.map +1 -1
  145. package/lib/components/VDataTable/VDataTableHeader.js +4 -3
  146. package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
  147. package/lib/components/VDataTable/VDataTableHeaderDesktop.js +3 -1
  148. package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
  149. package/lib/components/VDataTable/VVirtualTable.js +1 -1
  150. package/lib/components/VDataTable/VVirtualTable.js.map +1 -1
  151. package/lib/components/VDataTable/mixins/header.js +1 -1
  152. package/lib/components/VDataTable/mixins/header.js.map +1 -1
  153. package/lib/components/VDatePicker/VDatePicker.js +6 -6
  154. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  155. package/lib/components/VDialog/VDialog.js +1 -1
  156. package/lib/components/VDialog/VDialog.js.map +1 -1
  157. package/lib/components/VExpansionPanel/VExpansionPanelContent.js +1 -1
  158. package/lib/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
  159. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +1 -1
  160. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  161. package/lib/components/VForm/VForm.js +8 -8
  162. package/lib/components/VForm/VForm.js.map +1 -1
  163. package/lib/components/VGrid/VCol.js +3 -3
  164. package/lib/components/VGrid/VCol.js.map +1 -1
  165. package/lib/components/VGrid/VContainer.js +3 -1
  166. package/lib/components/VGrid/VContainer.js.map +1 -1
  167. package/lib/components/VImg/VImg.js +1 -1
  168. package/lib/components/VImg/VImg.js.map +1 -1
  169. package/lib/components/VInput/VInput.js +1 -1
  170. package/lib/components/VInput/VInput.js.map +1 -1
  171. package/lib/components/VItemGroup/VItem.js +20 -18
  172. package/lib/components/VItemGroup/VItem.js.map +1 -1
  173. package/lib/components/VItemGroup/VItemGroup.js +1 -1
  174. package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
  175. package/lib/components/VList/VList.js +1 -1
  176. package/lib/components/VList/VList.js.map +1 -1
  177. package/lib/components/VList/VListGroup.js +11 -15
  178. package/lib/components/VList/VListGroup.js.map +1 -1
  179. package/lib/components/VMenu/VMenu.js +1 -1
  180. package/lib/components/VMenu/VMenu.js.map +1 -1
  181. package/lib/components/VOverlay/VOverlay.js +1 -1
  182. package/lib/components/VOverlay/VOverlay.js.map +1 -1
  183. package/lib/components/VRadioGroup/VRadioGroup.js +5 -7
  184. package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
  185. package/lib/components/VRangeSlider/VRangeSlider.js +1 -1
  186. package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
  187. package/lib/components/VSelect/VSelect.js +1 -3
  188. package/lib/components/VSelect/VSelect.js.map +1 -1
  189. package/lib/components/VSelect/VSelectList.js +7 -5
  190. package/lib/components/VSelect/VSelectList.js.map +1 -1
  191. package/lib/components/VSparkline/VSparkline.js +6 -6
  192. package/lib/components/VSparkline/VSparkline.js.map +1 -1
  193. package/lib/components/VStepper/VStepperContent.js +1 -1
  194. package/lib/components/VStepper/VStepperContent.js.map +1 -1
  195. package/lib/components/VStepper/VStepperStep.js +1 -1
  196. package/lib/components/VStepper/VStepperStep.js.map +1 -1
  197. package/lib/components/VSubheader/VSubheader.js +2 -3
  198. package/lib/components/VSubheader/VSubheader.js.map +1 -1
  199. package/lib/components/VTabs/VTab.js.map +1 -1
  200. package/lib/components/VTabs/VTabs.js +1 -2
  201. package/lib/components/VTabs/VTabs.js.map +1 -1
  202. package/lib/components/VTextField/VTextField.js +5 -2
  203. package/lib/components/VTextField/VTextField.js.map +1 -1
  204. package/lib/components/VToolbar/VToolbar.js +4 -3
  205. package/lib/components/VToolbar/VToolbar.js.map +1 -1
  206. package/lib/components/VTreeview/VTreeviewNode.js +1 -1
  207. package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
  208. package/lib/components/transitions/createTransition.js +1 -1
  209. package/lib/components/transitions/createTransition.js.map +1 -1
  210. package/lib/components/transitions/expand-transition.js +8 -7
  211. package/lib/components/transitions/expand-transition.js.map +1 -1
  212. package/lib/directives/intersect/index.js +20 -7
  213. package/lib/directives/intersect/index.js.map +1 -1
  214. package/lib/directives/mutate/index.js +13 -13
  215. package/lib/directives/mutate/index.js.map +1 -1
  216. package/lib/directives/resize/index.js +8 -8
  217. package/lib/directives/resize/index.js.map +1 -1
  218. package/lib/directives/scroll/index.js +10 -9
  219. package/lib/directives/scroll/index.js.map +1 -1
  220. package/lib/directives/touch/index.js +4 -4
  221. package/lib/directives/touch/index.js.map +1 -1
  222. package/lib/framework.js +1 -1
  223. package/lib/install.js +5 -28
  224. package/lib/install.js.map +1 -1
  225. package/lib/mixins/activatable/index.js +10 -5
  226. package/lib/mixins/activatable/index.js.map +1 -1
  227. package/lib/mixins/applicationable/index.js +4 -4
  228. package/lib/mixins/applicationable/index.js.map +1 -1
  229. package/lib/mixins/binds-attrs/index.js +1 -1
  230. package/lib/mixins/binds-attrs/index.js.map +1 -1
  231. package/lib/mixins/detachable/index.js +6 -7
  232. package/lib/mixins/detachable/index.js.map +1 -1
  233. package/lib/mixins/groupable/index.js +1 -1
  234. package/lib/mixins/groupable/index.js.map +1 -1
  235. package/lib/mixins/intersectable/index.js +2 -2
  236. package/lib/mixins/intersectable/index.js.map +1 -1
  237. package/lib/mixins/menuable/index.js +1 -1
  238. package/lib/mixins/menuable/index.js.map +1 -1
  239. package/lib/mixins/overlayable/index.js +5 -4
  240. package/lib/mixins/overlayable/index.js.map +1 -1
  241. package/lib/mixins/proxyable/index.js +0 -4
  242. package/lib/mixins/proxyable/index.js.map +1 -1
  243. package/lib/mixins/selectable/index.js +2 -5
  244. package/lib/mixins/selectable/index.js.map +1 -1
  245. package/lib/mixins/translatable/index.js +1 -1
  246. package/lib/mixins/translatable/index.js.map +1 -1
  247. package/lib/mixins/validatable/index.js +2 -2
  248. package/lib/mixins/validatable/index.js.map +1 -1
  249. package/lib/services/breakpoint/index.js +3 -1
  250. package/lib/services/breakpoint/index.js.map +1 -1
  251. package/lib/util/helpers.js +42 -0
  252. package/lib/util/helpers.js.map +1 -1
  253. package/lib/util/legacyEventsMixin.js +37 -0
  254. package/lib/util/legacyEventsMixin.js.map +1 -0
  255. package/package.json +1 -1
  256. package/src/components/VAppBar/VAppBar.ts +11 -13
  257. package/src/components/VAutocomplete/VAutocomplete.ts +13 -6
  258. package/src/components/VBottomSheet/VBottomSheet.sass +1 -1
  259. package/src/components/VCheckbox/VSimpleCheckbox.ts +84 -42
  260. package/src/components/VCheckbox/__tests__/VSimpleCheckbox.spec.ts +46 -13
  261. package/src/components/VColorPicker/VColorPicker.ts +6 -6
  262. package/src/components/VData/VData.ts +12 -1
  263. package/src/components/VDataIterator/VDataIterator.ts +5 -3
  264. package/src/components/VDataTable/VDataTable.ts +2 -2
  265. package/src/components/VDataTable/VDataTableHeader.ts +5 -4
  266. package/src/components/VDataTable/VDataTableHeaderDesktop.ts +1 -1
  267. package/src/components/VDataTable/VVirtualTable.ts +1 -1
  268. package/src/components/VDataTable/mixins/header.ts +6 -6
  269. package/src/components/VDatePicker/VDatePicker.ts +6 -6
  270. package/src/components/VDialog/VDialog.ts +1 -1
  271. package/src/components/VExpansionPanel/VExpansionPanelContent.ts +1 -1
  272. package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +1 -1
  273. package/src/components/VForm/VForm.ts +8 -8
  274. package/src/components/VGrid/VCol.ts +2 -2
  275. package/src/components/VGrid/VContainer.ts +1 -1
  276. package/src/components/VImg/VImg.ts +1 -1
  277. package/src/components/VInput/VInput.ts +1 -1
  278. package/src/components/VItemGroup/VItem.ts +25 -23
  279. package/src/components/VItemGroup/VItemGroup.ts +3 -3
  280. package/src/components/VList/VList.ts +1 -1
  281. package/src/components/VList/VListGroup.ts +14 -14
  282. package/src/components/VMenu/VMenu.sass +2 -2
  283. package/src/components/VMenu/VMenu.ts +1 -0
  284. package/src/components/VOverlay/VOverlay.ts +1 -1
  285. package/src/components/VRadioGroup/VRadioGroup.ts +8 -9
  286. package/src/components/VRangeSlider/VRangeSlider.ts +1 -1
  287. package/src/components/VSelect/VSelect.ts +6 -5
  288. package/src/components/VSelect/VSelectList.ts +5 -5
  289. package/src/components/VSnackbar/VSnackbar.sass +2 -2
  290. package/src/components/VSparkline/VSparkline.ts +6 -6
  291. package/src/components/VStepper/VStepperContent.ts +1 -1
  292. package/src/components/VStepper/VStepperStep.ts +1 -1
  293. package/src/components/VSubheader/VSubheader.ts +2 -2
  294. package/src/components/VTabs/VTab.ts +1 -1
  295. package/src/components/VTabs/VTabs.ts +1 -2
  296. package/src/components/VTabs/__tests__/VTab.spec.ts +48 -37
  297. package/src/components/VTabs/__tests__/VTabs.spec.ts +134 -79
  298. package/src/components/VTabs/__tests__/VTabsBar.spec.ts +67 -26
  299. package/src/components/VTabs/__tests__/VTabsSlider.spec.ts +7 -6
  300. package/src/components/VTabs/__tests__/__snapshots__/VTabs.spec.ts.snap +1 -3
  301. package/src/components/VTextField/VTextField.ts +4 -3
  302. package/src/components/VToolbar/VToolbar.ts +4 -5
  303. package/src/components/VTreeview/VTreeviewNode.ts +1 -1
  304. package/src/components/transitions/createTransition.ts +1 -2
  305. package/src/components/transitions/expand-transition.ts +9 -7
  306. package/src/directives/intersect/index.ts +81 -42
  307. package/src/directives/mutate/index.ts +58 -49
  308. package/src/directives/resize/index.ts +33 -14
  309. package/src/directives/scroll/index.ts +36 -20
  310. package/src/directives/touch/index.ts +37 -27
  311. package/src/install.ts +10 -32
  312. package/src/mixins/activatable/index.ts +8 -4
  313. package/src/mixins/applicationable/index.ts +4 -4
  314. package/src/mixins/binds-attrs/index.ts +1 -1
  315. package/src/mixins/detachable/index.ts +7 -6
  316. package/src/mixins/groupable/index.ts +1 -1
  317. package/src/mixins/intersectable/index.ts +2 -2
  318. package/src/mixins/menuable/index.ts +1 -1
  319. package/src/mixins/overlayable/index.ts +4 -5
  320. package/src/mixins/proxyable/index.ts +0 -5
  321. package/src/mixins/selectable/index.ts +3 -7
  322. package/src/mixins/translatable/index.ts +1 -1
  323. package/src/mixins/validatable/index.ts +2 -2
  324. package/src/services/breakpoint/index.ts +5 -0
  325. package/src/styles/generic/_transitions.scss +38 -38
  326. package/src/util/__tests__/helpers.spec.ts +62 -1
  327. package/src/util/helpers.ts +42 -1
  328. package/src/util/legacyEventsMixin.ts +34 -0
@@ -7,10 +7,9 @@ import { factory as GroupableFactory } from '../../mixins/groupable'
7
7
  // Utilities
8
8
  import mixins from '../../util/mixins'
9
9
  import { consoleWarn } from '../../util/console'
10
+ import { defineComponent, mergeProps } from "vue"
10
11
 
11
- // Types
12
- import {defineComponent} from 'vue'
13
- import { VNode, ScopedSlotChildren } from 'vue/types/vnode'
12
+ import type { VNode } from 'vue'
14
13
 
15
14
  /* @vue/component */
16
15
  export const BaseItem = defineComponent({
@@ -32,42 +31,45 @@ export const BaseItem = defineComponent({
32
31
  },
33
32
  },
34
33
 
35
- render (): VNode {
34
+ render (): VNode | null {
36
35
  if (!this.$slots.default) {
37
36
  consoleWarn('v-item is missing a default scopedSlot', this)
38
-
39
- return null as any
37
+ return null
40
38
  }
41
39
 
42
- let element: VNode | ScopedSlotChildren
40
+ const slotContent = this.$slots.default({
41
+ active: this.isActive,
42
+ toggle: this.toggle,
43
+ })
43
44
 
44
- /* istanbul ignore else */
45
- if (this.$slots.default) {
46
- element = this.$slots.default({
47
- active: this.isActive,
48
- toggle: this.toggle,
49
- })
45
+ if (!slotContent || slotContent.length === 0) {
46
+ consoleWarn('v-item slot returned empty content', this)
47
+ return null
50
48
  }
51
49
 
52
- if (Array.isArray(element) && element.length === 1) {
53
- element = element[0]
54
- }
50
+ let element = slotContent[0]
55
51
 
56
- if (!element || Array.isArray(element) || !element.tag) {
57
- consoleWarn('v-item should only contain a single element', this)
52
+ if (!element) {
53
+ consoleWarn('v-item should contain at least one element', this)
54
+ return null
55
+ }
58
56
 
59
- return element as any
57
+ if (!element.type) {
58
+ consoleWarn('v-item should only contain valid VNode elements', this)
59
+ return element
60
60
  }
61
61
 
62
- element.data = this._b(element.data || {}, element.tag!, {
62
+ element.props = mergeProps(element.props || {}, {
63
63
  class: {
64
64
  [this.activeClass]: this.isActive,
65
- 'v-item--disabled': this.disabled,
66
- },
65
+ "v-item--disabled": this.disabled
66
+ }
67
67
  })
68
68
 
69
69
  if (this.disabled) {
70
- element.data.attrs = { ...element.data.attrs, tabindex: -1 }
70
+ element.props = mergeProps(element.props || {}, {
71
+ tabindex: -1
72
+ })
71
73
  }
72
74
 
73
75
  return element
@@ -52,8 +52,8 @@ export const BaseItemGroup = mixins(
52
52
  // As long as a value is defined, show it
53
53
  // Otherwise, check if multiple
54
54
  // to determine which default to provide
55
- internalLazyValue: this.value !== undefined
56
- ? this.value
55
+ internalLazyValue: this.modelValue !== undefined
56
+ ? this.modelValue
57
57
  : this.multiple ? [] : undefined,
58
58
  items: [] as GroupableInstance[],
59
59
  }
@@ -102,7 +102,7 @@ export const BaseItemGroup = mixins(
102
102
 
103
103
  watch: {
104
104
  internalValue: 'updateItemsState',
105
- items: 'updateItemsState',
105
+ items: 'updateItemsState'
106
106
  },
107
107
 
108
108
  created () {
@@ -75,7 +75,7 @@ export default defineComponent({
75
75
  this.groups.push(content)
76
76
  },
77
77
  unregister (content: VListGroupInstance) {
78
- const index = this.groups.findIndex(g => g._uid === content._uid)
78
+ const index = this.groups.findIndex(g => g.$.uid === content.$.uid)
79
79
 
80
80
  if (index > -1) this.groups.splice(index, 1)
81
81
  },
@@ -1,4 +1,4 @@
1
- import {h, withDirectives} from 'vue'
1
+ import {h, withDirectives, vShow} from 'vue'
2
2
  // Styles
3
3
  import './VListGroup.sass'
4
4
 
@@ -91,7 +91,7 @@ export default baseMixins.extend({
91
91
  isActive (val: boolean) {
92
92
  /* istanbul ignore else */
93
93
  if (!this.subGroup && val) {
94
- this.list && this.list.listClick(this._uid)
94
+ this.list && this.list.listClick(this.$.uid)
95
95
  }
96
96
  },
97
97
  $route: 'onRouteChange',
@@ -102,13 +102,13 @@ export default baseMixins.extend({
102
102
 
103
103
  if (this.group &&
104
104
  this.$route &&
105
- this.value == null
105
+ this.modelValue == null
106
106
  ) {
107
107
  this.isActive = this.matchRoute(this.$route.path)
108
108
  }
109
109
  },
110
110
 
111
- beforeDestroy () {
111
+ beforeUnmount () {
112
112
  this.list && this.list.unregister(this)
113
113
  },
114
114
 
@@ -157,14 +157,15 @@ export default baseMixins.extend({
157
157
  ])
158
158
  },
159
159
  genItems (): VNode[] {
160
+ const directives = [[
161
+ vShow,
162
+ this.isActive
163
+ ]]
164
+
160
165
  return this.showLazyContent(() => [
161
- h('div', {
166
+ withDirectives(h('div', {
162
167
  class: 'v-list-group__items',
163
- directives: [{
164
- name: 'show',
165
- value: this.isActive,
166
- }],
167
- }, getSlot(this)),
168
+ }, getSlot(this)), directives)
168
169
  ])
169
170
  },
170
171
  genPrependIcon (): VNode | null {
@@ -189,13 +190,13 @@ export default baseMixins.extend({
189
190
 
190
191
  /* istanbul ignore else */
191
192
  if (isActive && this.isActive !== isActive) {
192
- this.list && this.list.listClick(this._uid)
193
+ this.list && this.list.listClick(this.$.uid)
193
194
  }
194
195
 
195
196
  this.isActive = isActive
196
197
  },
197
198
  toggle (uid: number) {
198
- const isActive = this._uid === uid
199
+ const isActive = this.$.uid === uid
199
200
 
200
201
  if (isActive) this.isBooted = true
201
202
  this.$nextTick(() => (this.isActive = isActive))
@@ -207,8 +208,7 @@ export default baseMixins.extend({
207
208
 
208
209
  render (): VNode {
209
210
  return h('div', this.setTextColor(this.isActive && this.color, {
210
- class: 'v-list-group',
211
- class: this.classes,
211
+ class: ['v-list-group', this.classes]
212
212
  }), [
213
213
  this.genHeader(),
214
214
  h(VExpandTransition, this.genItems()),
@@ -36,7 +36,7 @@
36
36
  max-width: none
37
37
 
38
38
  &-transition
39
- &-enter
39
+ &-enter-from
40
40
  .v-list-item
41
41
  min-width: 0
42
42
  pointer-events: none
@@ -48,7 +48,7 @@
48
48
  &-leave-to
49
49
  pointer-events: none
50
50
 
51
- &-enter,
51
+ &-enter-from,
52
52
  &-leave-to
53
53
  opacity: 0
54
54
 
@@ -282,6 +282,7 @@ export default baseMixins.extend({
282
282
  return this.isActive &&
283
283
  !this._isDestroyed &&
284
284
  this.closeOnClick &&
285
+ this.$refs.content &&
285
286
  !this.$refs.content.contains(target)
286
287
  },
287
288
  genActivatorAttributes () {
@@ -36,7 +36,7 @@ export default mixins(
36
36
  type: [Number, String],
37
37
  default: 0.46,
38
38
  },
39
- value: {
39
+ modelValue: {
40
40
  default: true,
41
41
  },
42
42
  zIndex: {
@@ -6,14 +6,16 @@ import './VRadioGroup.sass'
6
6
  import VInput from '../VInput'
7
7
  import { BaseItemGroup } from '../VItemGroup/VItemGroup'
8
8
 
9
- // Types
9
+ // Utilities
10
+ import { mergeProps, h } from 'vue'
10
11
  import mixins from '../../util/mixins'
11
- import { PropType } from 'vue'
12
- import {h} from 'vue'
12
+
13
+ // Types
14
+ import type { PropType } from 'vue'
13
15
 
14
16
  const baseMixins = mixins(
17
+ VInput,
15
18
  BaseItemGroup,
16
- VInput
17
19
  )
18
20
 
19
21
  /* @vue/component */
@@ -40,7 +42,7 @@ export default baseMixins.extend({
40
42
  // If no value set on VRadio
41
43
  // will match valueComparator
42
44
  // force default to null
43
- value: null as unknown as PropType<any>,
45
+ modelValue: null as unknown as PropType<any>,
44
46
  },
45
47
 
46
48
  computed: {
@@ -88,10 +90,7 @@ export default baseMixins.extend({
88
90
  render () {
89
91
  const vnode = VInput.render.call(this)
90
92
 
91
- vnode.props = {
92
- ...vnode.props,
93
- ...this.attrs$
94
- }
93
+ vnode.props = mergeProps(vnode.props, this.attrs$);
95
94
 
96
95
  return vnode
97
96
  },
@@ -100,7 +100,7 @@ export default defineComponent({
100
100
  input.data = input.data || {}
101
101
  input.data.attrs = input.data.attrs || {}
102
102
  input.data.attrs.value = this.internalValue[i]
103
- input.data.attrs.id = `input-${i ? 'max' : 'min'}-${this._uid}`
103
+ input.data.attrs.id = `input-${i ? 'max' : 'min'}-${this.$.uid}`
104
104
 
105
105
  return input
106
106
  })
@@ -494,15 +494,16 @@ export default baseMixins.extend({
494
494
  }
495
495
  },
496
496
  genListWithSlot (): VNode {
497
- const slots = ['prepend-item', 'no-data', 'append-item']
497
+ const slots = Object.fromEntries(['prepend-item', 'no-data', 'append-item']
498
498
  .filter(slotName => this.$slots[slotName])
499
- .map(slotName => h('template', {
500
- slot: slotName,
501
- }, this.$slots[slotName]))
499
+ .map(slotName => [
500
+ slotName,
501
+ this.$slots[slotName]
502
+ ]
503
+ ))
502
504
  // Requires destructuring due to Vue
503
505
  // modifying the `on` property when passed
504
506
  // as a referenced object
505
-
506
507
  return h(VSelectList, {
507
508
  ...this.listData,
508
509
  }, {...slots,item: this.$slots.item})
@@ -90,7 +90,7 @@ export default mixins(Colorable, Themeable).extend({
90
90
  return h(VListItemAction, [
91
91
  h(VSimpleCheckbox, {
92
92
  color: this.color,
93
- value: inputValue,
93
+ modelValue: inputValue,
94
94
  ripple: false,
95
95
  onInput: () => this.$emit('select', item)
96
96
  }),
@@ -147,7 +147,7 @@ export default mixins(Colorable, Themeable).extend({
147
147
  // Default behavior in list does not
148
148
  // contain aria-selected by default
149
149
  'aria-selected': String(value),
150
- id: `list-item-${this._uid}-${index}`,
150
+ id: `list-item-${this.$.uid}-${index}`,
151
151
  role: 'option',
152
152
  onMousedown: (e: Event) => {
153
153
  // Prevent onBlur from being called
@@ -226,11 +226,11 @@ export default mixins(Colorable, Themeable).extend({
226
226
  else children.push(this.genTile({ item, index }))
227
227
  }
228
228
 
229
- children.length || children.push(this.$slots['no-data'] || this.staticNoDataTile)
229
+ children.length || children.push(this.$slots['no-data']?.() || this.staticNoDataTile)
230
230
 
231
- this.$slots['prepend-item'] && children.unshift(this.$slots['prepend-item'])
231
+ this.$slots['prepend-item'] && children.unshift(this.$slots['prepend-item']())
232
232
 
233
- this.$slots['append-item'] && children.push(this.$slots['append-item'])
233
+ this.$slots['append-item'] && children.push(this.$slots['append-item']())
234
234
 
235
235
  return h(VList, {
236
236
  class: ['v-select-list', this.themeClasses],
@@ -132,11 +132,11 @@
132
132
  margin-bottom: $snackbar-vertical-action-margin-bottom
133
133
 
134
134
  .v-snack-transition
135
- &-enter
135
+ &-enter-from
136
136
  &.v-snack__wrapper
137
137
  transform: scale($snackbar-transition-wrapper-transform)
138
138
 
139
- &-enter,
139
+ &-enter-from,
140
140
  &-leave-to
141
141
  &.v-snack__wrapper
142
142
  opacity: 0
@@ -284,7 +284,7 @@ export default mixins<options &
284
284
  return h('defs', [
285
285
  h('linearGradient', {
286
286
  attrs: {
287
- id: this._uid,
287
+ id: this.$.uid,
288
288
  gradientUnits: 'userSpaceOnUse',
289
289
  x1: gradientDirection === 'left' ? '100%' : '0',
290
290
  y1: gradientDirection === 'top' ? '100%' : '0',
@@ -310,8 +310,8 @@ export default mixins<options &
310
310
  return h('path', {
311
311
  attrs: {
312
312
  d: genPath(points, this._radius, this.fill, this.parsedHeight),
313
- fill: this.fill ? `url(#${this._uid})` : 'none',
314
- stroke: this.fill ? 'none' : `url(#${this._uid})`,
313
+ fill: this.fill ? `url(#${this.$.uid})` : 'none',
314
+ stroke: this.fill ? 'none' : `url(#${this.$.uid})`,
315
315
  },
316
316
  ref: 'path',
317
317
  })
@@ -347,12 +347,12 @@ export default mixins<options &
347
347
  },
348
348
  }, [
349
349
  this.genGradient(),
350
- this.genClipPath(bars, offsetX, this._lineWidth, 'sparkline-bar-' + this._uid),
350
+ this.genClipPath(bars, offsetX, this._lineWidth, 'sparkline-bar-' + this.$.uid),
351
351
  this.hasLabels ? this.genLabels(offsetX) : undefined as never,
352
352
  h('g', {
353
353
  attrs: {
354
- 'clip-path': `url(#sparkline-bar-${this._uid}-clip)`,
355
- fill: `url(#${this._uid})`,
354
+ 'clip-path': `url(#sparkline-bar-${this.$.uid}-clip)`,
355
+ fill: `url(#${this.$.uid})`,
356
356
  },
357
357
  }, [
358
358
  h('rect', {
@@ -99,7 +99,7 @@ export default baseMixins.extend({
99
99
  this.stepper && this.stepper.register(this)
100
100
  },
101
101
 
102
- beforeDestroy () {
102
+ beforeUnmount () {
103
103
  this.$refs.wrapper.removeEventListener(
104
104
  'transitionend',
105
105
  this.onTransition,
@@ -87,7 +87,7 @@ export default baseMixins.extend({
87
87
  this.stepper && this.stepper.register(this)
88
88
  },
89
89
 
90
- beforeDestroy () {
90
+ beforeUnmount () {
91
91
  this.stepper && this.stepper.unregister(this)
92
92
  },
93
93
 
@@ -22,11 +22,11 @@ export default mixins(
22
22
 
23
23
  render (): VNode {
24
24
  return h('div', {
25
+ ...this.$attrs,
25
26
  class: ['v-subheader', {
26
27
  'v-subheader--inset': this.inset,
27
28
  ...this.themeClasses,
28
- }],
29
- ...this.$attrs,
29
+ }, this.$attrs.class],
30
30
  ...this.$listeners
31
31
  }, getSlot(this))
32
32
  },
@@ -115,7 +115,7 @@ export default baseMixins.extend({
115
115
  let { tag, data, directives } = this.generateRouteLink()
116
116
 
117
117
  data = {
118
- ...data
118
+ ...data,
119
119
  'aria-selected': String(this.isActive),
120
120
  role: 'tab',
121
121
  tabindex: this.disabled ? -1 : 0,
@@ -204,7 +204,7 @@ export default baseMixins.extend({
204
204
  nextIcon: this.nextIcon,
205
205
  prevIcon: this.prevIcon,
206
206
  showArrows: this.showArrows,
207
- value: this.internalValue,
207
+ modelValue: this.internalValue,
208
208
  'onCall:slider': this.callSlider,
209
209
  'onUpdate:modelValue': (val: any) => {
210
210
  this.internalValue = val
@@ -232,7 +232,6 @@ export default baseMixins.extend({
232
232
  return h(VTabsItems, {
233
233
  modelValue: this.internalValue,
234
234
  'onUpdate:modelValue': (val: any) => {
235
- console.log(val)
236
235
  this.internalValue = val
237
236
  }
238
237
  }, item)
@@ -5,15 +5,12 @@ import VTab from '../VTab'
5
5
  import {
6
6
  mount,
7
7
  RouterLinkStub,
8
- Wrapper,
8
+ VueWrapper,
9
9
  } from '@vue/test-utils'
10
10
 
11
- // Types
12
- import { ExtractVue } from './../../../util/mixins'
13
-
14
11
  describe('VTab.ts', () => {
15
- type Instance = ExtractVue<typeof VTab>
16
- let mountFunction: (options?: object) => Wrapper<Instance>
12
+ type Instance = InstanceType<typeof VTab>
13
+ let mountFunction: (options?: object) => VueWrapper<Instance>
17
14
 
18
15
  beforeEach(() => {
19
16
  mountFunction = (options = {}) => {
@@ -23,28 +20,33 @@ describe('VTab.ts', () => {
23
20
  }
24
21
  })
25
22
 
26
- it('should have the correct value', () => {
23
+ it('should have the correct value', async () => {
27
24
  const wrapper = mountFunction({
28
- propsData: {
25
+ props: {
29
26
  href: '#foo',
30
27
  },
31
- mocks: {
32
- $route: { path: '/' },
33
- $router: {
34
- resolve: to => {
35
- let href
36
- if (to.path) href = to.path
37
-
38
- return { href }
28
+ global: {
29
+ mocks: {
30
+ $route: { path: '/' },
31
+ $router: {
32
+ resolve: (to: any) => {
33
+ let href
34
+ if (to.path) href = to.path
35
+
36
+ return { href }
37
+ },
39
38
  },
40
39
  },
40
+ stubs: {
41
+ 'router-link': RouterLinkStub,
42
+ },
41
43
  },
42
44
  })
43
45
 
44
46
  expect(wrapper.vm.value).toBe('foo')
45
- wrapper.setProps({ href: null, to: '/foo' })
47
+ await wrapper.setProps({ href: null, to: '/foo' })
46
48
  expect(wrapper.vm.value).toBe('/foo')
47
- wrapper.setProps({ to: { path: 'bar' } })
49
+ await wrapper.setProps({ to: { path: 'bar' } })
48
50
  expect(wrapper.vm.value).toBe('bar')
49
51
  })
50
52
 
@@ -52,19 +54,23 @@ describe('VTab.ts', () => {
52
54
  it('should react to route change', async () => {
53
55
  const toggle = jest.fn()
54
56
  const wrapper = mountFunction({
55
- propsData: {
57
+ props: {
56
58
  activeClass: 'bar',
57
59
  to: 'foo',
58
60
  },
59
- methods: { toggle },
60
- mocks: {
61
- $route: { path: '/' },
62
- },
63
- stubs: {
64
- RouterLink: RouterLinkStub,
61
+ global: {
62
+ mocks: {
63
+ $route: { path: '/' },
64
+ },
65
+ stubs: {
66
+ 'router-link': RouterLinkStub,
67
+ },
65
68
  },
66
69
  })
67
70
 
71
+ // Mock the toggle method
72
+ wrapper.vm.toggle = toggle
73
+
68
74
  // Mock route change being called
69
75
  wrapper.vm.onRouteChange()
70
76
  await wrapper.vm.$nextTick()
@@ -73,15 +79,19 @@ describe('VTab.ts', () => {
73
79
 
74
80
  // explicitly mock class added
75
81
  // by vue router
76
- ;(wrapper.vm.$refs.link as any)._vnode.data = {
77
- class: { 'bar v-tab--active': true },
82
+ if (wrapper.vm.$refs.link) {
83
+ ;(wrapper.vm.$refs.link as any)._vnode = {
84
+ data: {
85
+ class: { 'bar v-tab--active': true },
86
+ }
87
+ }
78
88
  }
79
89
  ;(wrapper.vm as any).$route.path = '/foo'
80
90
 
81
91
  wrapper.vm.onRouteChange()
82
92
  await wrapper.vm.$nextTick()
83
93
 
84
- wrapper.setProps({ to: undefined })
94
+ await wrapper.setProps({ to: undefined })
85
95
 
86
96
  wrapper.vm.onRouteChange()
87
97
  await wrapper.vm.$nextTick()
@@ -89,26 +99,27 @@ describe('VTab.ts', () => {
89
99
  expect(toggle).toHaveBeenCalledTimes(1)
90
100
  })
91
101
 
92
- it('should respond to clicks and mousedown.enter', () => {
102
+ it('should respond to clicks and mousedown.enter', async () => {
93
103
  const event = { preventDefault: jest.fn() }
94
104
  const toggle = jest.fn()
95
- const wrapper = mountFunction({
96
- methods: { toggle },
97
- })
105
+ const wrapper = mountFunction()
106
+
107
+ // Mock the toggle method
108
+ wrapper.vm.toggle = toggle
98
109
 
99
- wrapper.trigger('click', event)
110
+ await wrapper.trigger('click', event)
100
111
 
101
112
  expect(event.preventDefault).not.toHaveBeenCalled()
102
113
  expect(toggle).toHaveBeenCalled()
103
114
 
104
- wrapper.setProps({ href: '#foo' })
115
+ await wrapper.setProps({ href: '#foo' })
105
116
 
106
- wrapper.trigger('click', event)
117
+ await wrapper.trigger('click', event)
107
118
 
108
119
  expect(event.preventDefault).toHaveBeenCalled()
109
120
 
110
- wrapper.trigger('keydown.enter', event)
111
- wrapper.trigger('keydown.space', event)
121
+ await wrapper.trigger('keydown.enter', event)
122
+ await wrapper.trigger('keydown.space', event)
112
123
 
113
124
  expect(event.preventDefault).toHaveBeenCalledTimes(2)
114
125
  expect(toggle).toHaveBeenCalledTimes(3)