vuetify 2.0.19 → 2.1.0

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 (537) hide show
  1. package/dist/json/attributes.json +208 -16
  2. package/dist/json/tags.json +58 -0
  3. package/dist/vuetify.css +548 -57
  4. package/dist/vuetify.css.map +1 -1
  5. package/dist/vuetify.js +917 -249
  6. package/dist/vuetify.js.map +1 -1
  7. package/dist/vuetify.min.css +2 -2
  8. package/dist/vuetify.min.js +3 -3
  9. package/es5/components/VAlert/VAlert.js +3 -18
  10. package/es5/components/VAlert/VAlert.js.map +1 -1
  11. package/es5/components/VAppBar/VAppBarNavIcon.js +1 -1
  12. package/es5/components/VAppBar/VAppBarNavIcon.js.map +1 -1
  13. package/es5/components/VAutocomplete/VAutocomplete.js +20 -0
  14. package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
  15. package/es5/components/VBtn/VBtn.js +2 -0
  16. package/es5/components/VBtn/VBtn.js.map +1 -1
  17. package/es5/components/VBtnToggle/VBtnToggle.js +16 -3
  18. package/es5/components/VBtnToggle/VBtnToggle.js.map +1 -1
  19. package/es5/components/VCard/VCard.js +4 -2
  20. package/es5/components/VCard/VCard.js.map +1 -1
  21. package/es5/components/VCarousel/VCarousel.js +1 -1
  22. package/es5/components/VCarousel/VCarousel.js.map +1 -1
  23. package/es5/components/VCheckbox/VCheckbox.js +3 -3
  24. package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
  25. package/es5/components/VCheckbox/VSimpleCheckbox.js +3 -3
  26. package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  27. package/es5/components/VChip/VChip.js +2 -2
  28. package/es5/components/VChip/VChip.js.map +1 -1
  29. package/es5/components/VColorPicker/VColorPickerEdit.js +1 -1
  30. package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
  31. package/es5/components/VColorPicker/VColorPickerSwatches.js +1 -1
  32. package/es5/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
  33. package/es5/components/VCombobox/VCombobox.js +16 -0
  34. package/es5/components/VCombobox/VCombobox.js.map +1 -1
  35. package/es5/components/VDataIterator/VDataFooter.js +10 -6
  36. package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
  37. package/es5/components/VDataIterator/VDataIterator.js +3 -0
  38. package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
  39. package/es5/components/VDataTable/VDataTable.js +5 -5
  40. package/es5/components/VDataTable/VDataTable.js.map +1 -1
  41. package/es5/components/VDataTable/mixins/header.js +1 -1
  42. package/es5/components/VDataTable/mixins/header.js.map +1 -1
  43. package/es5/components/VDatePicker/VDatePicker.js +55 -16
  44. package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
  45. package/es5/components/VDatePicker/VDatePickerHeader.js +2 -2
  46. package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
  47. package/es5/components/VDialog/VDialog.js +3 -0
  48. package/es5/components/VDialog/VDialog.js.map +1 -1
  49. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +1 -1
  50. package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  51. package/es5/components/VFileInput/VFileInput.js +1 -1
  52. package/es5/components/VFileInput/VFileInput.js.map +1 -1
  53. package/es5/components/VGrid/VCol.js +8 -1
  54. package/es5/components/VGrid/VCol.js.map +1 -1
  55. package/es5/components/VImg/VImg.js +34 -7
  56. package/es5/components/VImg/VImg.js.map +1 -1
  57. package/es5/components/VInput/VInput.js +6 -1
  58. package/es5/components/VInput/VInput.js.map +1 -1
  59. package/es5/components/VLazy/VLazy.js +90 -0
  60. package/es5/components/VLazy/VLazy.js.map +1 -0
  61. package/es5/components/VLazy/index.js +20 -0
  62. package/es5/components/VLazy/index.js.map +1 -0
  63. package/es5/components/VList/VListGroup.js +2 -2
  64. package/es5/components/VList/VListGroup.js.map +1 -1
  65. package/es5/components/VList/VListItem.js +4 -0
  66. package/es5/components/VList/VListItem.js.map +1 -1
  67. package/es5/components/VMenu/VMenu.js +3 -0
  68. package/es5/components/VMenu/VMenu.js.map +1 -1
  69. package/es5/components/VPagination/VPagination.js +2 -2
  70. package/es5/components/VPagination/VPagination.js.map +1 -1
  71. package/es5/components/VRadioGroup/VRadio.js +2 -2
  72. package/es5/components/VRadioGroup/VRadio.js.map +1 -1
  73. package/es5/components/VRating/VRating.js +3 -3
  74. package/es5/components/VRating/VRating.js.map +1 -1
  75. package/es5/components/VSelect/VSelect.js +1 -2
  76. package/es5/components/VSelect/VSelect.js.map +1 -1
  77. package/es5/components/VSkeletonLoader/VSkeletonLoader.js +193 -0
  78. package/es5/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -0
  79. package/es5/components/VSkeletonLoader/index.js +20 -0
  80. package/es5/components/VSkeletonLoader/index.js.map +1 -0
  81. package/es5/components/VSlideGroup/VSlideGroup.js +2 -2
  82. package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
  83. package/es5/components/VStepper/VStepperStep.js +3 -3
  84. package/es5/components/VStepper/VStepperStep.js.map +1 -1
  85. package/es5/components/VTabs/VTabs.js +2 -2
  86. package/es5/components/VTabs/VTabs.js.map +1 -1
  87. package/es5/components/VTextField/VTextField.js +1 -1
  88. package/es5/components/VTextField/VTextField.js.map +1 -1
  89. package/es5/components/VTimePicker/VTimePicker.js +1 -1
  90. package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
  91. package/es5/components/VTimePicker/VTimePickerTitle.js +1 -1
  92. package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
  93. package/es5/components/VTooltip/VTooltip.js +2 -1
  94. package/es5/components/VTooltip/VTooltip.js.map +1 -1
  95. package/es5/components/VTreeview/VTreeviewNode.js +5 -5
  96. package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
  97. package/es5/components/VWindow/VWindow.js +2 -2
  98. package/es5/components/VWindow/VWindow.js.map +1 -1
  99. package/es5/components/index.js +24 -0
  100. package/es5/components/index.js.map +1 -1
  101. package/es5/directives/index.js +16 -0
  102. package/es5/directives/index.js.map +1 -1
  103. package/es5/directives/intersect/index.js +61 -0
  104. package/es5/directives/intersect/index.js.map +1 -0
  105. package/es5/directives/mutate/index.js +71 -0
  106. package/es5/directives/mutate/index.js.map +1 -0
  107. package/es5/framework.js +1 -1
  108. package/es5/locale/af.js +6 -2
  109. package/es5/locale/af.js.map +1 -1
  110. package/es5/locale/ar.js +6 -2
  111. package/es5/locale/ar.js.map +1 -1
  112. package/es5/locale/ca.js +6 -2
  113. package/es5/locale/ca.js.map +1 -1
  114. package/es5/locale/cs.js +52 -0
  115. package/es5/locale/cs.js.map +1 -0
  116. package/es5/locale/de.js +6 -2
  117. package/es5/locale/de.js.map +1 -1
  118. package/es5/locale/el.js +6 -2
  119. package/es5/locale/el.js.map +1 -1
  120. package/es5/locale/en.js +6 -2
  121. package/es5/locale/en.js.map +1 -1
  122. package/es5/locale/es.js +6 -2
  123. package/es5/locale/es.js.map +1 -1
  124. package/es5/locale/et.js +14 -10
  125. package/es5/locale/et.js.map +1 -1
  126. package/es5/locale/fa.js +6 -2
  127. package/es5/locale/fa.js.map +1 -1
  128. package/es5/locale/fr.js +6 -2
  129. package/es5/locale/fr.js.map +1 -1
  130. package/es5/locale/he.js +6 -2
  131. package/es5/locale/he.js.map +1 -1
  132. package/es5/locale/hr.js +20 -16
  133. package/es5/locale/hr.js.map +1 -1
  134. package/es5/locale/hu.js +6 -2
  135. package/es5/locale/hu.js.map +1 -1
  136. package/es5/locale/id.js +6 -2
  137. package/es5/locale/id.js.map +1 -1
  138. package/es5/locale/index.js +24 -0
  139. package/es5/locale/index.js.map +1 -1
  140. package/es5/locale/it.js +6 -2
  141. package/es5/locale/it.js.map +1 -1
  142. package/es5/locale/ja.js +6 -2
  143. package/es5/locale/ja.js.map +1 -1
  144. package/es5/locale/ko.js +6 -2
  145. package/es5/locale/ko.js.map +1 -1
  146. package/es5/locale/lt.js +52 -0
  147. package/es5/locale/lt.js.map +1 -0
  148. package/es5/locale/lv.js +6 -2
  149. package/es5/locale/lv.js.map +1 -1
  150. package/es5/locale/nl.js +6 -2
  151. package/es5/locale/nl.js.map +1 -1
  152. package/es5/locale/no.js +6 -2
  153. package/es5/locale/no.js.map +1 -1
  154. package/es5/locale/pl.js +6 -2
  155. package/es5/locale/pl.js.map +1 -1
  156. package/es5/locale/pt.js +6 -2
  157. package/es5/locale/pt.js.map +1 -1
  158. package/es5/locale/ro.js +6 -2
  159. package/es5/locale/ro.js.map +1 -1
  160. package/es5/locale/ru.js +6 -2
  161. package/es5/locale/ru.js.map +1 -1
  162. package/es5/locale/sl.js +14 -10
  163. package/es5/locale/sl.js.map +1 -1
  164. package/es5/locale/sr-Cyrl.js +6 -2
  165. package/es5/locale/sr-Cyrl.js.map +1 -1
  166. package/es5/locale/sv.js +52 -0
  167. package/es5/locale/sv.js.map +1 -0
  168. package/es5/locale/th.js +6 -2
  169. package/es5/locale/th.js.map +1 -1
  170. package/es5/locale/tr.js +6 -2
  171. package/es5/locale/tr.js.map +1 -1
  172. package/es5/locale/uk.js +6 -2
  173. package/es5/locale/uk.js.map +1 -1
  174. package/es5/locale/zh-Hans.js +6 -2
  175. package/es5/locale/zh-Hans.js.map +1 -1
  176. package/es5/locale/zh-Hant.js +6 -2
  177. package/es5/locale/zh-Hant.js.map +1 -1
  178. package/es5/mixins/overlayable/index.js +6 -2
  179. package/es5/mixins/overlayable/index.js.map +1 -1
  180. package/es5/services/lang/index.js +7 -2
  181. package/es5/services/lang/index.js.map +1 -1
  182. package/es5/util/helpers.js +5 -5
  183. package/es5/util/helpers.js.map +1 -1
  184. package/lib/components/VAlert/VAlert.js +3 -18
  185. package/lib/components/VAlert/VAlert.js.map +1 -1
  186. package/lib/components/VAppBar/VAppBarNavIcon.js +1 -1
  187. package/lib/components/VAppBar/VAppBarNavIcon.js.map +1 -1
  188. package/lib/components/VAutocomplete/VAutocomplete.js +22 -0
  189. package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
  190. package/lib/components/VBtn/VBtn.js +2 -0
  191. package/lib/components/VBtn/VBtn.js.map +1 -1
  192. package/lib/components/VBtnToggle/VBtnToggle.js +15 -2
  193. package/lib/components/VBtnToggle/VBtnToggle.js.map +1 -1
  194. package/lib/components/VCard/VCard.js +3 -1
  195. package/lib/components/VCard/VCard.js.map +1 -1
  196. package/lib/components/VCarousel/VCarousel.js +1 -1
  197. package/lib/components/VCarousel/VCarousel.js.map +1 -1
  198. package/lib/components/VCheckbox/VCheckbox.js +3 -3
  199. package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
  200. package/lib/components/VCheckbox/VSimpleCheckbox.js +3 -3
  201. package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
  202. package/lib/components/VChip/VChip.js +2 -2
  203. package/lib/components/VChip/VChip.js.map +1 -1
  204. package/lib/components/VColorPicker/VColorPickerEdit.js +1 -1
  205. package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
  206. package/lib/components/VColorPicker/VColorPickerSwatches.js +1 -1
  207. package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
  208. package/lib/components/VCombobox/VCombobox.js +16 -0
  209. package/lib/components/VCombobox/VCombobox.js.map +1 -1
  210. package/lib/components/VDataIterator/VDataFooter.js +10 -6
  211. package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
  212. package/lib/components/VDataIterator/VDataIterator.js +3 -0
  213. package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
  214. package/lib/components/VDataTable/VDataTable.js +5 -5
  215. package/lib/components/VDataTable/VDataTable.js.map +1 -1
  216. package/lib/components/VDataTable/mixins/header.js +1 -1
  217. package/lib/components/VDataTable/mixins/header.js.map +1 -1
  218. package/lib/components/VDatePicker/VDatePicker.js +39 -16
  219. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  220. package/lib/components/VDatePicker/VDatePickerHeader.js +2 -2
  221. package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
  222. package/lib/components/VDialog/VDialog.js +3 -0
  223. package/lib/components/VDialog/VDialog.js.map +1 -1
  224. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +1 -1
  225. package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
  226. package/lib/components/VFileInput/VFileInput.js +1 -1
  227. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  228. package/lib/components/VGrid/VCol.js +7 -1
  229. package/lib/components/VGrid/VCol.js.map +1 -1
  230. package/lib/components/VImg/VImg.js +30 -8
  231. package/lib/components/VImg/VImg.js.map +1 -1
  232. package/lib/components/VInput/VInput.js +5 -0
  233. package/lib/components/VInput/VInput.js.map +1 -1
  234. package/lib/components/VLazy/VLazy.js +76 -0
  235. package/lib/components/VLazy/VLazy.js.map +1 -0
  236. package/lib/components/VLazy/index.js +4 -0
  237. package/lib/components/VLazy/index.js.map +1 -0
  238. package/lib/components/VList/VListGroup.js +2 -2
  239. package/lib/components/VList/VListGroup.js.map +1 -1
  240. package/lib/components/VList/VListItem.js +4 -0
  241. package/lib/components/VList/VListItem.js.map +1 -1
  242. package/lib/components/VMenu/VMenu.js +3 -0
  243. package/lib/components/VMenu/VMenu.js.map +1 -1
  244. package/lib/components/VPagination/VPagination.js +2 -2
  245. package/lib/components/VPagination/VPagination.js.map +1 -1
  246. package/lib/components/VRadioGroup/VRadio.js +2 -2
  247. package/lib/components/VRadioGroup/VRadio.js.map +1 -1
  248. package/lib/components/VRating/VRating.js +3 -3
  249. package/lib/components/VRating/VRating.js.map +1 -1
  250. package/lib/components/VSelect/VSelect.js +1 -2
  251. package/lib/components/VSelect/VSelect.js.map +1 -1
  252. package/lib/components/VSkeletonLoader/VSkeletonLoader.js +170 -0
  253. package/lib/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -0
  254. package/lib/components/VSkeletonLoader/index.js +4 -0
  255. package/lib/components/VSkeletonLoader/index.js.map +1 -0
  256. package/lib/components/VSlideGroup/VSlideGroup.js +2 -2
  257. package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
  258. package/lib/components/VStepper/VStepperStep.js +3 -3
  259. package/lib/components/VStepper/VStepperStep.js.map +1 -1
  260. package/lib/components/VTabs/VTabs.js +2 -2
  261. package/lib/components/VTabs/VTabs.js.map +1 -1
  262. package/lib/components/VTextField/VTextField.js +1 -1
  263. package/lib/components/VTextField/VTextField.js.map +1 -1
  264. package/lib/components/VTimePicker/VTimePicker.js +1 -1
  265. package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
  266. package/lib/components/VTimePicker/VTimePickerTitle.js +1 -1
  267. package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
  268. package/lib/components/VTooltip/VTooltip.js +2 -1
  269. package/lib/components/VTooltip/VTooltip.js.map +1 -1
  270. package/lib/components/VTreeview/VTreeviewNode.js +5 -5
  271. package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
  272. package/lib/components/VWindow/VWindow.js +2 -2
  273. package/lib/components/VWindow/VWindow.js.map +1 -1
  274. package/lib/components/index.js +2 -0
  275. package/lib/components/index.js.map +1 -1
  276. package/lib/directives/index.js +2 -0
  277. package/lib/directives/index.js.map +1 -1
  278. package/lib/directives/intersect/index.js +45 -0
  279. package/lib/directives/intersect/index.js.map +1 -0
  280. package/lib/directives/mutate/index.js +56 -0
  281. package/lib/directives/mutate/index.js.map +1 -0
  282. package/lib/framework.js +1 -1
  283. package/lib/locale/af.js +6 -2
  284. package/lib/locale/af.js.map +1 -1
  285. package/lib/locale/ar.js +6 -2
  286. package/lib/locale/ar.js.map +1 -1
  287. package/lib/locale/ca.js +6 -2
  288. package/lib/locale/ca.js.map +1 -1
  289. package/lib/locale/cs.js +45 -0
  290. package/lib/locale/cs.js.map +1 -0
  291. package/lib/locale/de.js +6 -2
  292. package/lib/locale/de.js.map +1 -1
  293. package/lib/locale/el.js +6 -2
  294. package/lib/locale/el.js.map +1 -1
  295. package/lib/locale/en.js +6 -2
  296. package/lib/locale/en.js.map +1 -1
  297. package/lib/locale/es.js +6 -2
  298. package/lib/locale/es.js.map +1 -1
  299. package/lib/locale/et.js +14 -10
  300. package/lib/locale/et.js.map +1 -1
  301. package/lib/locale/fa.js +6 -2
  302. package/lib/locale/fa.js.map +1 -1
  303. package/lib/locale/fr.js +6 -2
  304. package/lib/locale/fr.js.map +1 -1
  305. package/lib/locale/he.js +6 -2
  306. package/lib/locale/he.js.map +1 -1
  307. package/lib/locale/hr.js +20 -16
  308. package/lib/locale/hr.js.map +1 -1
  309. package/lib/locale/hu.js +6 -2
  310. package/lib/locale/hu.js.map +1 -1
  311. package/lib/locale/id.js +6 -2
  312. package/lib/locale/id.js.map +1 -1
  313. package/lib/locale/index.js +3 -0
  314. package/lib/locale/index.js.map +1 -1
  315. package/lib/locale/it.js +6 -2
  316. package/lib/locale/it.js.map +1 -1
  317. package/lib/locale/ja.js +6 -2
  318. package/lib/locale/ja.js.map +1 -1
  319. package/lib/locale/ko.js +6 -2
  320. package/lib/locale/ko.js.map +1 -1
  321. package/lib/locale/lt.js +45 -0
  322. package/lib/locale/lt.js.map +1 -0
  323. package/lib/locale/lv.js +6 -2
  324. package/lib/locale/lv.js.map +1 -1
  325. package/lib/locale/nl.js +6 -2
  326. package/lib/locale/nl.js.map +1 -1
  327. package/lib/locale/no.js +6 -2
  328. package/lib/locale/no.js.map +1 -1
  329. package/lib/locale/pl.js +6 -2
  330. package/lib/locale/pl.js.map +1 -1
  331. package/lib/locale/pt.js +6 -2
  332. package/lib/locale/pt.js.map +1 -1
  333. package/lib/locale/ro.js +6 -2
  334. package/lib/locale/ro.js.map +1 -1
  335. package/lib/locale/ru.js +6 -2
  336. package/lib/locale/ru.js.map +1 -1
  337. package/lib/locale/sl.js +14 -10
  338. package/lib/locale/sl.js.map +1 -1
  339. package/lib/locale/sr-Cyrl.js +6 -2
  340. package/lib/locale/sr-Cyrl.js.map +1 -1
  341. package/lib/locale/sv.js +45 -0
  342. package/lib/locale/sv.js.map +1 -0
  343. package/lib/locale/th.js +6 -2
  344. package/lib/locale/th.js.map +1 -1
  345. package/lib/locale/tr.js +6 -2
  346. package/lib/locale/tr.js.map +1 -1
  347. package/lib/locale/uk.js +6 -2
  348. package/lib/locale/uk.js.map +1 -1
  349. package/lib/locale/zh-Hans.js +6 -2
  350. package/lib/locale/zh-Hans.js.map +1 -1
  351. package/lib/locale/zh-Hant.js +6 -2
  352. package/lib/locale/zh-Hant.js.map +1 -1
  353. package/lib/mixins/overlayable/index.js +6 -2
  354. package/lib/mixins/overlayable/index.js.map +1 -1
  355. package/lib/services/lang/index.js +6 -2
  356. package/lib/services/lang/index.js.map +1 -1
  357. package/lib/util/helpers.js +3 -4
  358. package/lib/util/helpers.js.map +1 -1
  359. package/package.json +2 -2
  360. package/src/components/VAlert/VAlert.sass +4 -0
  361. package/src/components/VAlert/VAlert.ts +3 -8
  362. package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +2 -2
  363. package/src/components/VAlert/_variables.scss +1 -0
  364. package/src/components/VAppBar/VAppBarNavIcon.ts +1 -1
  365. package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +1 -1
  366. package/src/components/VAutocomplete/VAutocomplete.ts +19 -0
  367. package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +54 -0
  368. package/src/components/VBtn/VBtn.ts +2 -0
  369. package/src/components/VBtn/__tests__/VBtn.spec.ts +20 -0
  370. package/src/components/VBtn/_variables.scss +1 -1
  371. package/src/components/VBtnToggle/VBtnToggle.sass +50 -24
  372. package/src/components/VBtnToggle/VBtnToggle.ts +16 -1
  373. package/src/components/VBtnToggle/__tests__/VBtnToggle.spec.ts +10 -3
  374. package/src/components/VBtnToggle/_variables.scss +7 -0
  375. package/src/components/VCalendar/VCalendarWeekly.sass +3 -0
  376. package/src/components/VCalendar/_variables.scss +1 -1
  377. package/src/components/VCard/VCard.sass +7 -0
  378. package/src/components/VCard/VCard.ts +2 -0
  379. package/src/components/VCard/_variables.scss +2 -0
  380. package/src/components/VCarousel/VCarousel.ts +1 -1
  381. package/src/components/VCheckbox/VCheckbox.ts +3 -3
  382. package/src/components/VCheckbox/VSimpleCheckbox.ts +3 -3
  383. package/src/components/VCheckbox/__tests__/__snapshots__/VCheckbox.spec.ts.snap +1 -1
  384. package/src/components/VChip/VChip.ts +2 -2
  385. package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +1 -1
  386. package/src/components/VChip/_variables.scss +1 -1
  387. package/src/components/VColorPicker/VColorPicker.sass +2 -0
  388. package/src/components/VColorPicker/VColorPickerEdit.sass +2 -1
  389. package/src/components/VColorPicker/VColorPickerEdit.ts +1 -1
  390. package/src/components/VColorPicker/VColorPickerSwatches.ts +1 -1
  391. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +5 -5
  392. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +5 -5
  393. package/src/components/VColorPicker/_variables.scss +1 -0
  394. package/src/components/VCombobox/VCombobox.ts +16 -0
  395. package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +41 -0
  396. package/src/components/VDataIterator/VDataFooter.ts +9 -5
  397. package/src/components/VDataIterator/VDataIterator.ts +1 -0
  398. package/src/components/VDataIterator/__tests__/VDataIterator.spec.ts +3 -0
  399. package/src/components/VDataTable/VDataTable.ts +5 -5
  400. package/src/components/VDataTable/__tests__/VDataTable.spec.ts +71 -0
  401. package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +1408 -446
  402. package/src/components/VDataTable/__tests__/__snapshots__/VDataTableHeader.spec.ts.snap +35 -35
  403. package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +3 -3
  404. package/src/components/VDataTable/mixins/header.ts +2 -1
  405. package/src/components/VDatePicker/VDatePicker.ts +40 -16
  406. package/src/components/VDatePicker/VDatePickerHeader.ts +2 -2
  407. package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +20 -0
  408. package/src/components/VDialog/VDialog.sass +4 -7
  409. package/src/components/VDialog/VDialog.ts +6 -0
  410. package/src/components/VDialog/_variables.scss +1 -1
  411. package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +1 -1
  412. package/src/components/VExpansionPanel/__tests__/__snapshots__/VExpansionPanel.spec.ts.snap +1 -1
  413. package/src/components/VExpansionPanel/_variables.scss +1 -1
  414. package/src/components/VFileInput/VFileInput.sass +4 -0
  415. package/src/components/VFileInput/VFileInput.ts +1 -1
  416. package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +16 -16
  417. package/src/components/VGrid/VCol.ts +6 -0
  418. package/src/components/VGrid/__tests__/VCol.spec.ts +13 -0
  419. package/src/components/VIcon/__tests__/VIcon.spec.ts +11 -11
  420. package/src/components/VImg/VImg.ts +35 -6
  421. package/src/components/VImg/__tests__/VImg.spec.ts +4 -1
  422. package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +23 -46
  423. package/src/components/VInput/VInput.sass +3 -0
  424. package/src/components/VInput/VInput.ts +5 -0
  425. package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +3 -1
  426. package/src/components/VLazy/VLazy.ts +80 -0
  427. package/src/components/VLazy/__tests__/VLazy.spec.ts +78 -0
  428. package/src/components/VLazy/__tests__/__snapshots__/VLazy.spec.ts.snap +14 -0
  429. package/src/components/VLazy/index.ts +4 -0
  430. package/src/components/VList/VList.sass +2 -1
  431. package/src/components/VList/VListGroup.ts +2 -2
  432. package/src/components/VList/VListItem.sass +3 -0
  433. package/src/components/VList/VListItem.ts +4 -0
  434. package/src/components/VList/__tests__/VListItem.spec.ts +10 -0
  435. package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +1 -1
  436. package/src/components/VList/_variables.scss +1 -1
  437. package/src/components/VMenu/VMenu.sass +3 -8
  438. package/src/components/VMenu/VMenu.ts +6 -0
  439. package/src/components/VMenu/_variables.scss +1 -1
  440. package/src/components/VOverflowBtn/VOverflowBtn.sass +4 -0
  441. package/src/components/VOverflowBtn/__tests__/__snapshots__/VOverflowBtn.spec.ts.snap +2 -2
  442. package/src/components/VPagination/VPagination.sass +3 -3
  443. package/src/components/VPagination/VPagination.ts +2 -2
  444. package/src/components/VPagination/_variables.scss +1 -0
  445. package/src/components/VPicker/_variables.scss +1 -1
  446. package/src/components/VProgressLinear/VProgressLinear.sass +1 -1
  447. package/src/components/VProgressLinear/_variables.scss +1 -0
  448. package/src/components/VRadioGroup/VRadio.ts +2 -2
  449. package/src/components/VRadioGroup/__tests__/__snapshots__/VRadio.spec.ts.snap +3 -3
  450. package/src/components/VRating/VRating.ts +3 -3
  451. package/src/components/VSelect/VSelect.sass +17 -0
  452. package/src/components/VSelect/VSelect.ts +1 -2
  453. package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +7 -7
  454. package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +5 -5
  455. package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +1 -1
  456. package/src/components/VSheet/VSheet.sass +0 -11
  457. package/src/components/VSkeletonLoader/VSkeletonLoader.sass +364 -0
  458. package/src/components/VSkeletonLoader/VSkeletonLoader.ts +179 -0
  459. package/src/components/VSkeletonLoader/__tests__/VSkeletonLoader.spec.ts +84 -0
  460. package/src/components/VSkeletonLoader/__tests__/__snapshots__/VSkeletonLoader.spec.ts.snap +994 -0
  461. package/src/components/VSkeletonLoader/_variables.scss +9 -0
  462. package/src/components/VSkeletonLoader/index.ts +4 -0
  463. package/src/components/VSlideGroup/VSlideGroup.ts +2 -2
  464. package/src/components/VSlideGroup/__tests__/__snapshots__/VSlideGroup.spec.ts.snap +4 -4
  465. package/src/components/VSnackbar/VSnackbar.sass +1 -1
  466. package/src/components/VSnackbar/_variables.scss +1 -0
  467. package/src/components/VStepper/VStepper.sass +2 -1
  468. package/src/components/VStepper/VStepperStep.ts +3 -3
  469. package/src/components/VStepper/_variables.scss +1 -0
  470. package/src/components/VTabs/VTabs.ts +2 -2
  471. package/src/components/VTextField/VTextField.sass +55 -13
  472. package/src/components/VTextField/VTextField.ts +1 -1
  473. package/src/components/VTextField/_mixins.sass +18 -0
  474. package/src/components/VTextField/_variables.scss +1 -0
  475. package/src/components/VTimePicker/VTimePicker.ts +2 -2
  476. package/src/components/VTimePicker/VTimePickerTitle.ts +2 -2
  477. package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +5 -0
  478. package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +6 -0
  479. package/src/components/VTimePicker/__tests__/__snapshots__/VTimePickerTitle.spec.ts.snap +8 -8
  480. package/src/components/VTooltip/VTooltip.sass +5 -2
  481. package/src/components/VTooltip/VTooltip.ts +4 -0
  482. package/src/components/VTooltip/_variables.sass +1 -1
  483. package/src/components/VTreeview/VTreeviewNode.ts +5 -5
  484. package/src/components/VTreeview/__tests__/VTreeviewNode.spec.ts +2 -2
  485. package/src/components/VTreeview/__tests__/__snapshots__/VTreeview.spec.ts.snap +1 -1
  486. package/src/components/VWindow/VWindow.ts +2 -2
  487. package/src/components/index.ts +2 -0
  488. package/src/directives/index.ts +2 -0
  489. package/src/directives/intersect/__tests__/intersect.spec.ts +47 -0
  490. package/src/directives/intersect/index.ts +57 -0
  491. package/src/directives/mutate/__tests__/mutate.spec.ts +130 -0
  492. package/src/directives/mutate/index.ts +63 -0
  493. package/src/globals.d.ts +7 -0
  494. package/src/locale/af.ts +5 -1
  495. package/src/locale/ar.ts +5 -1
  496. package/src/locale/ca.ts +5 -1
  497. package/src/locale/cs.ts +44 -0
  498. package/src/locale/de.ts +5 -1
  499. package/src/locale/el.ts +5 -1
  500. package/src/locale/en.ts +5 -1
  501. package/src/locale/es.ts +5 -1
  502. package/src/locale/et.ts +13 -9
  503. package/src/locale/fa.ts +5 -1
  504. package/src/locale/fr.ts +5 -1
  505. package/src/locale/he.ts +5 -1
  506. package/src/locale/hr.ts +20 -16
  507. package/src/locale/hu.ts +5 -1
  508. package/src/locale/id.ts +5 -1
  509. package/src/locale/index.ts +3 -0
  510. package/src/locale/it.ts +5 -1
  511. package/src/locale/ja.ts +5 -1
  512. package/src/locale/ko.ts +5 -1
  513. package/src/locale/lt.ts +44 -0
  514. package/src/locale/lv.ts +5 -1
  515. package/src/locale/nl.ts +5 -1
  516. package/src/locale/no.ts +5 -1
  517. package/src/locale/pl.ts +5 -1
  518. package/src/locale/pt.ts +5 -1
  519. package/src/locale/ro.ts +5 -1
  520. package/src/locale/ru.ts +5 -1
  521. package/src/locale/sl.ts +13 -9
  522. package/src/locale/sr-Cyrl.ts +5 -1
  523. package/src/locale/sv.ts +44 -0
  524. package/src/locale/th.ts +5 -1
  525. package/src/locale/tr.ts +5 -1
  526. package/src/locale/uk.ts +5 -1
  527. package/src/locale/zh-Hans.ts +5 -1
  528. package/src/locale/zh-Hant.ts +5 -1
  529. package/src/mixins/overlayable/index.ts +4 -0
  530. package/src/services/lang/__tests__/lang.spec.ts +8 -0
  531. package/src/services/lang/index.ts +6 -2
  532. package/src/styles/settings/_dark.scss +1 -0
  533. package/src/styles/settings/_light.scss +1 -0
  534. package/src/styles/settings/_variables.scss +4 -3
  535. package/src/util/helpers.ts +3 -5
  536. package/src/components/VBtnToggle/_variables.sass +0 -6
  537. package/src/components/VSheet/_variables.scss +0 -1
@@ -0,0 +1,364 @@
1
+ // Imports
2
+ @import '../../styles/styles.sass'
3
+ @import './_variables.scss'
4
+
5
+ // Theme
6
+ +theme(v-skeleton-loader) using ($material)
7
+ .v-skeleton-loader__bone::after
8
+ background: map-get($material, 'skeleton')
9
+
10
+ .v-skeleton-loader__avatar,
11
+ .v-skeleton-loader__button,
12
+ .v-skeleton-loader__chip,
13
+ .v-skeleton-loader__divider,
14
+ .v-skeleton-loader__heading,
15
+ .v-skeleton-loader__image,
16
+ .v-skeleton-loader__text
17
+ background: map-get($material, 'dividers')
18
+
19
+ .v-skeleton-loader__actions,
20
+ .v-skeleton-loader__article,
21
+ .v-skeleton-loader__card-heading,
22
+ .v-skeleton-loader__card-text,
23
+ .v-skeleton-loader__date-picker,
24
+ .v-skeleton-loader__list-item,
25
+ .v-skeleton-loader__list-item-avatar,
26
+ .v-skeleton-loader__list-item-text,
27
+ .v-skeleton-loader__list-item-two-line,
28
+ .v-skeleton-loader__list-item-avatar-two-line,
29
+ .v-skeleton-loader__list-item-three-line,
30
+ .v-skeleton-loader__list-item-avatar-three-line,
31
+ .v-skeleton-loader__table-heading,
32
+ .v-skeleton-loader__table-thead,
33
+ .v-skeleton-loader__table-tbody,
34
+ .v-skeleton-loader__table-tfoot
35
+ background: map-get($material, 'cards')
36
+
37
+ .v-skeleton-loader
38
+ border-radius: $skeleton-loader-border-radius
39
+ position: relative
40
+ vertical-align: top
41
+
42
+ &__actions
43
+ padding: 16px 16px 8px
44
+ text-align: right
45
+
46
+ .v-skeleton-loader__button
47
+ display: inline-block
48
+
49
+ &:first-child
50
+ +ltr()
51
+ margin-right: 12px
52
+
53
+ +rtl()
54
+ margin-left: 12px
55
+
56
+
57
+ .v-skeleton-loader__list-item,
58
+ .v-skeleton-loader__list-item-avatar,
59
+ .v-skeleton-loader__list-item-text,
60
+ .v-skeleton-loader__list-item-two-line,
61
+ .v-skeleton-loader__list-item-avatar-two-line,
62
+ .v-skeleton-loader__list-item-three-line,
63
+ .v-skeleton-loader__list-item-avatar-three-line
64
+ border-radius: $skeleton-loader-border-radius
65
+
66
+ .v-skeleton-loader__actions,
67
+ .v-skeleton-loader__article,
68
+ .v-skeleton-loader__card,
69
+ .v-skeleton-loader__card-avatar,
70
+ .v-skeleton-loader__card-heading,
71
+ .v-skeleton-loader__card-text,
72
+ .v-skeleton-loader__date-picker,
73
+ .v-skeleton-loader__date-picker-options,
74
+ .v-skeleton-loader__date-picker-days,
75
+ .v-skeleton-loader__list-item,
76
+ .v-skeleton-loader__list-item-avatar,
77
+ .v-skeleton-loader__list-item-text,
78
+ .v-skeleton-loader__list-item-two-line,
79
+ .v-skeleton-loader__list-item-avatar-two-line,
80
+ .v-skeleton-loader__list-item-three-line,
81
+ .v-skeleton-loader__list-item-avatar-three-line,
82
+ .v-skeleton-loader__paragraph,
83
+ .v-skeleton-loader__sentences,
84
+ .v-skeleton-loader__table,
85
+ .v-skeleton-loader__table-cell,
86
+ .v-skeleton-loader__table-heading,
87
+ .v-skeleton-loader__table-thead,
88
+ .v-skeleton-loader__table-tbody,
89
+ .v-skeleton-loader__table-tfoot,
90
+ .v-skeleton-loader__table-row,
91
+ .v-skeleton-loader__table-row-divider
92
+ &::after
93
+ display: none
94
+
95
+ &__article
96
+ .v-skeleton-loader__heading
97
+ +ltr()
98
+ margin: 16px 0 8px 16px
99
+
100
+ +rtl()
101
+ margin: 16px 8px 0 16px
102
+
103
+ .v-skeleton-loader__paragraph
104
+ padding: 16px
105
+
106
+ &__avatar
107
+ border-radius: 50%
108
+ height: 48px
109
+ width: 48px
110
+
111
+ &__bone
112
+ overflow: hidden
113
+ position: relative
114
+
115
+ &::after
116
+ animation: $skeleton-loader-loading-animation
117
+ content: ''
118
+ height: 100%
119
+ left: 0
120
+ position: absolute
121
+ right: 0
122
+ top: 0
123
+ transform: $skeleton-loader-loading-transform
124
+ z-index: 1
125
+
126
+ &__button
127
+ border-radius: $skeleton-loader-button-border-radius
128
+ height: 36px
129
+ width: 64px
130
+
131
+ &__card-heading
132
+ .v-skeleton-loader__heading
133
+ margin: 16px
134
+
135
+ &__card-text
136
+ padding: 16px
137
+
138
+ &__chip
139
+ border-radius: $skeleton-loader-chip-border-radius
140
+ height: 32px
141
+ width: 96px
142
+
143
+ &__date-picker
144
+ border-radius: $skeleton-loader-date-picker-border-radius
145
+
146
+ .v-skeleton-loader__list-item:first-child
147
+ .v-skeleton-loader__text
148
+ max-width: 88px
149
+ width: 20%
150
+
151
+ .v-skeleton-loader__heading
152
+ max-width: 256px
153
+ width: 40%
154
+
155
+ &__date-picker-days
156
+ display: flex
157
+ flex-wrap: wrap
158
+ padding: 0 12px
159
+ margin: 0 auto
160
+
161
+ .v-skeleton-loader__avatar
162
+ border-radius: $skeleton-loader-border-radius
163
+ flex: 1 1 auto
164
+ margin: 4px
165
+ height: 40px
166
+ width: 40px
167
+
168
+ &__date-picker-options
169
+ align-items: center
170
+ display: flex
171
+ padding: 16px
172
+
173
+ .v-skeleton-loader__avatar
174
+ height: 40px
175
+ width: 40px
176
+
177
+ &:nth-child(2)
178
+ margin-left: auto
179
+
180
+ +ltr()
181
+ margin-right: 8px
182
+
183
+ +rtl()
184
+ margin-left: 8px
185
+
186
+ .v-skeleton-loader__text.v-skeleton-loader__bone:first-child
187
+ margin-bottom: 0px
188
+ max-width: 50%
189
+ width: 456px
190
+
191
+ &__divider
192
+ border-radius: $skeleton-loader-divider-border-radius
193
+ height: 2px
194
+
195
+ &__heading
196
+ border-radius: $skeleton-loader-heading-border-radius
197
+ height: 24px
198
+ width: 45%
199
+
200
+ &__image
201
+ height: 200px
202
+
203
+ &:not(:first-child):not(:last-child)
204
+ border-radius: 0
205
+
206
+ &__list-item
207
+ height: 48px
208
+
209
+ &__list-item-three-line
210
+ flex-wrap: wrap
211
+
212
+ > *
213
+ flex: 1 0 100%
214
+ width: 100%
215
+
216
+ &__list-item-avatar,
217
+ &__list-item-avatar-two-line,
218
+ &__list-item-avatar-three-line
219
+ .v-skeleton-loader__avatar
220
+ height: 40px
221
+ width: 40px
222
+
223
+ &__list-item-avatar
224
+ height: 56px
225
+
226
+ &__list-item-two-line,
227
+ &__list-item-avatar-two-line
228
+ height: 72px
229
+
230
+ &__list-item-three-line,
231
+ &__list-item-avatar-three-line
232
+ height: 88px
233
+
234
+ &__list-item-avatar-three-line
235
+ .v-skeleton-loader__avatar
236
+ align-self: flex-start
237
+
238
+ &__list-item,
239
+ &__list-item-avatar,
240
+ &__list-item-two-line,
241
+ &__list-item-three-line,
242
+ &__list-item-avatar-two-line,
243
+ &__list-item-avatar-three-line
244
+ align-content: center
245
+ align-items: center
246
+ display: flex
247
+ flex-wrap: wrap
248
+ padding: 0 16px
249
+
250
+ .v-skeleton-loader__avatar
251
+ +ltr()
252
+ margin-right: 16px
253
+
254
+ +rtl()
255
+ margin-left: 16px
256
+
257
+ .v-skeleton-loader__text:last-child,
258
+ .v-skeleton-loader__text:only-child
259
+ margin-bottom: 0
260
+
261
+ &__paragraph,
262
+ &__sentences
263
+ flex: 1 0 auto
264
+
265
+ &__paragraph
266
+ &:not(:last-child)
267
+ margin-bottom: 6px
268
+
269
+ .v-skeleton-loader__text:nth-child(1)
270
+ max-width: 100%
271
+
272
+ .v-skeleton-loader__text:nth-child(2)
273
+ max-width: 50%
274
+
275
+ .v-skeleton-loader__text:nth-child(3)
276
+ max-width: 70%
277
+
278
+ &__sentences
279
+ .v-skeleton-loader__text:nth-child(2)
280
+ max-width: 70%
281
+
282
+ &:not(:last-child)
283
+ margin-bottom: 6px
284
+
285
+ &__table-heading
286
+ align-items: center
287
+ display: flex
288
+ justify-content: space-between
289
+ padding: 16px
290
+
291
+ .v-skeleton-loader__heading
292
+ max-width: 15%
293
+
294
+ .v-skeleton-loader__text
295
+ max-width: 40%
296
+
297
+ &__table-thead
298
+ display: flex
299
+ justify-content: space-between
300
+ padding: 16px
301
+
302
+ .v-skeleton-loader__heading
303
+ max-width: 5%
304
+
305
+ &__table-tbody
306
+ padding: 16px 16px 0
307
+
308
+ &__table-tfoot
309
+ align-items: center
310
+ display: flex
311
+ justify-content: flex-end
312
+ padding: 16px
313
+
314
+ > *
315
+ margin-left: 8px
316
+
317
+ .v-skeleton-loader__avatar
318
+ height: 40px
319
+ width: 40px
320
+
321
+ .v-skeleton-loader__text
322
+ margin-bottom: 0
323
+
324
+ &:nth-child(1)
325
+ max-width: 128px
326
+
327
+ &:nth-child(2)
328
+ max-width: 64px
329
+
330
+ &__table-row
331
+ display: flex
332
+ justify-content: space-between
333
+
334
+ &__table-cell
335
+ align-items: center
336
+ display: flex
337
+ height: 48px
338
+ width: 88px
339
+
340
+ .v-skeleton-loader__text
341
+ margin-bottom: 0
342
+
343
+ &__text
344
+ border-radius: $skeleton-loader-text-border-radius
345
+ flex: 1 0 auto
346
+ height: 12px
347
+ margin-bottom: 6px
348
+
349
+ &--boilerplate
350
+ .v-skeleton-loader__bone:after
351
+ display: none
352
+
353
+ &--is-loading
354
+ overflow: hidden
355
+
356
+ &--tile
357
+ border-radius: 0
358
+
359
+ .v-skeleton-loader__bone
360
+ border-radius: 0
361
+
362
+ @keyframes loading
363
+ 100%
364
+ transform: translateX(100%)
@@ -0,0 +1,179 @@
1
+ // Styles
2
+ import './VSkeletonLoader.sass'
3
+
4
+ // Mixins
5
+ import Elevatable from '../../mixins/elevatable'
6
+ import Measurable from '../../mixins/measurable'
7
+ import Themeable from '../../mixins/themeable'
8
+
9
+ // Utilities
10
+ import mixins from '../../util/mixins'
11
+
12
+ // Types
13
+ import { VNode } from 'vue'
14
+ import { getSlot } from '../../util/helpers'
15
+
16
+ /* @vue/component */
17
+ export default mixins(
18
+ Elevatable,
19
+ Measurable,
20
+ Themeable,
21
+ ).extend({
22
+ name: 'VSkeletonLoader',
23
+
24
+ props: {
25
+ boilerplate: Boolean,
26
+ loading: Boolean,
27
+ tile: Boolean,
28
+ transition: String,
29
+ type: String,
30
+ types: {
31
+ type: Object,
32
+ default: () => ({}),
33
+ },
34
+ },
35
+
36
+ computed: {
37
+ attrs (): object {
38
+ if (!this.isLoading) return this.$attrs
39
+
40
+ return !this.boilerplate ? {
41
+ 'aria-busy': true,
42
+ 'aria-live': 'polite',
43
+ role: 'alert',
44
+ ...this.$attrs,
45
+ } : {}
46
+ },
47
+ classes (): object {
48
+ return {
49
+ 'v-skeleton-loader--boilerplate': this.boilerplate,
50
+ 'v-skeleton-loader--is-loading': this.isLoading,
51
+ 'v-skeleton-loader--tile': this.tile,
52
+ ...this.themeClasses,
53
+ ...this.elevationClasses,
54
+ }
55
+ },
56
+ isLoading (): boolean {
57
+ return Boolean(
58
+ !getSlot(this) ||
59
+ this.loading
60
+ )
61
+ },
62
+ rootTypes (): Record<string, string> {
63
+ return {
64
+ actions: 'button@2',
65
+ article: 'heading, paragraph',
66
+ avatar: 'avatar',
67
+ button: 'button',
68
+ card: 'image, card-heading',
69
+ 'card-avatar': 'image, list-item-avatar',
70
+ 'card-heading': 'heading',
71
+ chip: 'chip',
72
+ 'date-picker': 'list-item, card-heading, divider, date-picker-options, date-picker-days, actions',
73
+ 'date-picker-options': 'text, avatar@2',
74
+ 'date-picker-days': 'avatar@28',
75
+ heading: 'heading',
76
+ image: 'image',
77
+ 'list-item': 'text',
78
+ 'list-item-avatar': 'avatar, text',
79
+ 'list-item-two-line': 'sentences',
80
+ 'list-item-avatar-two-line': 'avatar, sentences',
81
+ 'list-item-three-line': 'paragraph',
82
+ 'list-item-avatar-three-line': 'avatar, paragraph',
83
+ paragraph: 'text@3',
84
+ sentences: 'text@2',
85
+ table: 'table-heading, table-thead, table-tbody, table-tfoot',
86
+ 'table-heading': 'heading, text',
87
+ 'table-thead': 'heading@6',
88
+ 'table-tbody': 'table-row-divider@6',
89
+ 'table-row-divider': 'table-row, divider',
90
+ 'table-row': 'table-cell@6',
91
+ 'table-cell': 'text',
92
+ 'table-tfoot': 'text@2, avatar@2',
93
+ text: 'text',
94
+ ...this.types,
95
+ }
96
+ },
97
+ },
98
+
99
+ methods: {
100
+ genBone (text: string, children: VNode[]) {
101
+ return this.$createElement('div', {
102
+ staticClass: `v-skeleton-loader__${text} v-skeleton-loader__bone`,
103
+ }, children)
104
+ },
105
+ genBones (bone: string): VNode[] {
106
+ // e.g. 'text@3'
107
+ const [type, length] = bone.split('@') as [string, number]
108
+ const generator = () => this.genStructure(type)
109
+
110
+ // Generate a length array based upon
111
+ // value after @ in the bone string
112
+ return Array.from({ length }).map(generator)
113
+ },
114
+ // Fix type when this is merged
115
+ // https://github.com/microsoft/TypeScript/pull/33050
116
+ genStructure (type?: string): any {
117
+ let children = []
118
+ type = type || this.type || ''
119
+ const bone = this.rootTypes[type] || ''
120
+
121
+ // End of recursion, do nothing
122
+ /* eslint-disable-next-line no-empty, brace-style */
123
+ if (type === bone) {}
124
+ // Array of values - e.g. 'heading, paragraph, text@2'
125
+ else if (type.indexOf(',') > -1) return this.mapBones(type)
126
+ // Array of values - e.g. 'paragraph@4'
127
+ else if (type.indexOf('@') > -1) return this.genBones(type)
128
+ // Array of values - e.g. 'card@2'
129
+ else if (bone.indexOf(',') > -1) children = this.mapBones(bone)
130
+ // Array of values - e.g. 'list-item@2'
131
+ else if (bone.indexOf('@') > -1) children = this.genBones(bone)
132
+ // Single value - e.g. 'card-heading'
133
+ else if (bone) children.push(this.genStructure(bone))
134
+
135
+ return [this.genBone(type, children)]
136
+ },
137
+ genSkeleton () {
138
+ const children = []
139
+ const slot = getSlot(this)
140
+
141
+ if (!this.isLoading) children.push(slot)
142
+ else children.push(this.genStructure())
143
+
144
+ /* istanbul ignore else */
145
+ if (!this.transition) return children
146
+
147
+ /* istanbul ignore next */
148
+ return this.$createElement('transition', {
149
+ props: {
150
+ name: this.transition,
151
+ },
152
+ // Only show transition when
153
+ // content has been loaded
154
+ on: {
155
+ enter: (el: HTMLElement) => {
156
+ if (this.isLoading) el.style.transition = 'none'
157
+ },
158
+ beforeLeave: (el: HTMLElement) => {
159
+ el.style.display = 'none'
160
+ },
161
+ },
162
+ }, children)
163
+ },
164
+ mapBones (bones: string) {
165
+ // Remove spaces and return array of structures
166
+ return bones.replace(/\s/g, '').split(',').map(this.genStructure)
167
+ },
168
+ },
169
+
170
+ render (h): VNode {
171
+ return h('div', {
172
+ staticClass: 'v-skeleton-loader',
173
+ attrs: this.attrs,
174
+ on: this.$listeners,
175
+ class: this.classes,
176
+ style: this.isLoading ? this.measurableStyles : undefined,
177
+ }, [this.genSkeleton()])
178
+ },
179
+ })
@@ -0,0 +1,84 @@
1
+ // Components
2
+ import VSkeletonLoader from '../VSkeletonLoader'
3
+
4
+ // Utilities
5
+ import {
6
+ mount,
7
+ MountOptions,
8
+ Wrapper,
9
+ } from '@vue/test-utils'
10
+
11
+ describe('VSkeletonLoader.ts', () => {
12
+ type Instance = InstanceType<typeof VSkeletonLoader>
13
+ let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
14
+
15
+ beforeEach(() => {
16
+ mountFunction = (options = {}) => {
17
+ return mount(VSkeletonLoader, {
18
+ ...options,
19
+ })
20
+ }
21
+ })
22
+
23
+ it('should generate an array of elements based upon @ value', () => {
24
+ const wrapper = mountFunction()
25
+
26
+ expect(wrapper.vm.genBones('text@4')).toHaveLength(4)
27
+ expect(wrapper.vm.genBones('text@2')).toHaveLength(2)
28
+ })
29
+
30
+ it('should generate a skeleton recursive tree', () => {
31
+ const wrapper = mountFunction()
32
+
33
+ for (const key in wrapper.vm.rootTypes) {
34
+ const type = wrapper.vm.rootTypes[key]
35
+
36
+ const iteration = mountFunction({ propsData: { type } })
37
+
38
+ expect(iteration.html()).toMatchSnapshot()
39
+ }
40
+ })
41
+
42
+ it('should dynamically render content', () => {
43
+ const wrapper = mountFunction({
44
+ slots: {
45
+ default: '<div>foobar</div>',
46
+ },
47
+ })
48
+
49
+ expect(wrapper.html()).toMatchSnapshot()
50
+
51
+ wrapper.setProps({ loading: true })
52
+
53
+ expect(wrapper.html()).toMatchSnapshot()
54
+ })
55
+
56
+ it('should have the correct a11y attributes when loading', () => {
57
+ const wrapper = mountFunction({
58
+ propsData: { loading: true },
59
+ slots: {
60
+ // Add a default slot to allow
61
+ // toggling the loading prop
62
+ default: '<div>foobar</div>',
63
+ },
64
+ })
65
+
66
+ expect(wrapper.element.getAttribute('aria-busy')).toBe('true')
67
+ expect(wrapper.element.getAttribute('aria-live')).toBe('polite')
68
+ expect(wrapper.element.getAttribute('role')).toBe('alert')
69
+
70
+ wrapper.setProps({ loading: false })
71
+
72
+ expect(wrapper.element.getAttribute('aria-busy')).toBeNull()
73
+ expect(wrapper.element.getAttribute('aria-live')).toBeNull()
74
+ expect(wrapper.element.getAttribute('role')).toBeNull()
75
+ })
76
+
77
+ it('should not render aria attributes when using boilerplate', () => {
78
+ const wrapper = mountFunction({
79
+ propsData: { boilerplate: true },
80
+ })
81
+
82
+ expect(wrapper.vm.attrs).toEqual({})
83
+ })
84
+ })