@vuetify/nightly 4.0.0-dev-20230426.0 → 4.0.0-dev-20230427.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 (370) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/dist/json/attributes.json +218 -194
  3. package/dist/json/importMap.json +12 -12
  4. package/dist/json/tags.json +7 -1
  5. package/dist/json/web-types.json +379 -326
  6. package/dist/vuetify-labs.css +1361 -1362
  7. package/dist/vuetify-labs.d.ts +5791 -8230
  8. package/dist/vuetify-labs.esm.js +1286 -1090
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +1285 -1089
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +29 -30
  13. package/dist/vuetify.d.ts +5991 -7516
  14. package/dist/vuetify.esm.js +1248 -1063
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +1247 -1062
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +743 -738
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/blueprints/index.d.ts +1 -1
  22. package/lib/blueprints/md1.d.ts +1 -1
  23. package/lib/blueprints/md2.d.ts +1 -1
  24. package/lib/blueprints/md3.d.ts +1 -1
  25. package/lib/components/VAlert/VAlert.mjs +6 -4
  26. package/lib/components/VAlert/VAlert.mjs.map +1 -1
  27. package/lib/components/VAlert/index.d.ts +57 -55
  28. package/lib/components/VApp/VApp.mjs +4 -2
  29. package/lib/components/VApp/VApp.mjs.map +1 -1
  30. package/lib/components/VApp/index.d.ts +22 -13
  31. package/lib/components/VAppBar/VAppBar.mjs +3 -3
  32. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  33. package/lib/components/VAppBar/VAppBarNavIcon.mjs +7 -4
  34. package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
  35. package/lib/components/VAppBar/index.d.ts +87 -92
  36. package/lib/components/VAutocomplete/VAutocomplete.mjs +2 -1
  37. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  38. package/lib/components/VAutocomplete/index.d.ts +225 -403
  39. package/lib/components/VAvatar/VAvatar.mjs +4 -2
  40. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  41. package/lib/components/VAvatar/index.d.ts +23 -14
  42. package/lib/components/VBadge/VBadge.mjs +6 -5
  43. package/lib/components/VBadge/VBadge.mjs.map +1 -1
  44. package/lib/components/VBadge/index.d.ts +27 -22
  45. package/lib/components/VBanner/VBanner.mjs +6 -4
  46. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  47. package/lib/components/VBanner/VBannerActions.mjs +5 -2
  48. package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
  49. package/lib/components/VBanner/index.d.ts +92 -66
  50. package/lib/components/VBottomNavigation/VBottomNavigation.mjs +4 -2
  51. package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
  52. package/lib/components/VBottomNavigation/index.d.ts +22 -13
  53. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +35 -18
  54. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  55. package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs +6 -3
  56. package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
  57. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +4 -2
  58. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
  59. package/lib/components/VBreadcrumbs/index.d.ts +134 -93
  60. package/lib/components/VBtn/VBtn.mjs +5 -3
  61. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  62. package/lib/components/VBtn/index.d.ts +33 -36
  63. package/lib/components/VBtnGroup/VBtnGroup.mjs +4 -1
  64. package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
  65. package/lib/components/VBtnGroup/index.d.ts +22 -13
  66. package/lib/components/VBtnToggle/VBtnToggle.mjs +4 -2
  67. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  68. package/lib/components/VBtnToggle/index.d.ts +30 -21
  69. package/lib/components/VCard/VCard.mjs +5 -3
  70. package/lib/components/VCard/VCard.mjs.map +1 -1
  71. package/lib/components/VCard/VCardActions.mjs +7 -4
  72. package/lib/components/VCard/VCardActions.mjs.map +1 -1
  73. package/lib/components/VCard/VCardItem.mjs +5 -2
  74. package/lib/components/VCard/VCardItem.mjs.map +1 -1
  75. package/lib/components/VCard/index.d.ts +250 -141
  76. package/lib/components/VCarousel/VCarousel.mjs +3 -3
  77. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  78. package/lib/components/VCarousel/VCarouselItem.mjs +6 -3
  79. package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
  80. package/lib/components/VCarousel/index.d.ts +78 -141
  81. package/lib/components/VCheckbox/VCheckbox.mjs +3 -2
  82. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  83. package/lib/components/VCheckbox/VCheckboxBtn.mjs +2 -1
  84. package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
  85. package/lib/components/VCheckbox/index.d.ts +69 -103
  86. package/lib/components/VChip/VChip.mjs +7 -8
  87. package/lib/components/VChip/VChip.mjs.map +1 -1
  88. package/lib/components/VChip/index.d.ts +27 -30
  89. package/lib/components/VChipGroup/VChipGroup.mjs +4 -1
  90. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  91. package/lib/components/VChipGroup/index.d.ts +22 -13
  92. package/lib/components/VCode/index.d.ts +30 -17
  93. package/lib/components/VColorPicker/VColorPicker.mjs +3 -3
  94. package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
  95. package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -2
  96. package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
  97. package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -3
  98. package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
  99. package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -3
  100. package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
  101. package/lib/components/VColorPicker/VColorPickerSwatches.mjs +7 -5
  102. package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
  103. package/lib/components/VColorPicker/index.d.ts +34 -1
  104. package/lib/components/VCombobox/VCombobox.mjs +2 -1
  105. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  106. package/lib/components/VCombobox/index.d.ts +225 -403
  107. package/lib/components/VCounter/VCounter.mjs +4 -1
  108. package/lib/components/VCounter/VCounter.mjs.map +1 -1
  109. package/lib/components/VCounter/index.d.ts +22 -145
  110. package/lib/components/VDefaultsProvider/index.d.ts +0 -12
  111. package/lib/components/VDialog/VDialog.mjs +4 -3
  112. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  113. package/lib/components/VDialog/index.d.ts +104 -282
  114. package/lib/components/VDivider/VDivider.mjs +4 -2
  115. package/lib/components/VDivider/VDivider.mjs.map +1 -1
  116. package/lib/components/VDivider/index.d.ts +22 -13
  117. package/lib/components/VExpansionPanel/VExpansionPanel.mjs +4 -2
  118. package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
  119. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +4 -1
  120. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
  121. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +4 -2
  122. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  123. package/lib/components/VExpansionPanel/VExpansionPanels.mjs +4 -1
  124. package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
  125. package/lib/components/VExpansionPanel/index.d.ts +109 -81
  126. package/lib/components/VField/VField.css +0 -1
  127. package/lib/components/VField/VField.mjs +9 -6
  128. package/lib/components/VField/VField.mjs.map +1 -1
  129. package/lib/components/VField/VField.sass +0 -1
  130. package/lib/components/VField/VFieldLabel.mjs +6 -3
  131. package/lib/components/VField/VFieldLabel.mjs.map +1 -1
  132. package/lib/components/VField/index.d.ts +119 -70
  133. package/lib/components/VFileInput/VFileInput.mjs +2 -1
  134. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  135. package/lib/components/VFileInput/index.d.ts +99 -150
  136. package/lib/components/VFooter/VFooter.mjs +4 -2
  137. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  138. package/lib/components/VFooter/index.d.ts +22 -13
  139. package/lib/components/VForm/VForm.mjs +5 -2
  140. package/lib/components/VForm/VForm.mjs.map +1 -1
  141. package/lib/components/VForm/index.d.ts +30 -17
  142. package/lib/components/VGrid/VCol.mjs +4 -1
  143. package/lib/components/VGrid/VCol.mjs.map +1 -1
  144. package/lib/components/VGrid/VContainer.mjs +4 -1
  145. package/lib/components/VGrid/VContainer.mjs.map +1 -1
  146. package/lib/components/VGrid/VRow.mjs +4 -1
  147. package/lib/components/VGrid/VRow.mjs.map +1 -1
  148. package/lib/components/VGrid/index.d.ts +104 -60
  149. package/lib/components/VHover/index.d.ts +20 -44
  150. package/lib/components/VIcon/VIcon.mjs +4 -2
  151. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  152. package/lib/components/VIcon/index.d.ts +23 -26
  153. package/lib/components/VImg/VImg.mjs +5 -3
  154. package/lib/components/VImg/VImg.mjs.map +1 -1
  155. package/lib/components/VImg/index.d.ts +26 -29
  156. package/lib/components/VInput/VInput.mjs +4 -1
  157. package/lib/components/VInput/VInput.mjs.map +1 -1
  158. package/lib/components/VInput/index.d.ts +31 -34
  159. package/lib/components/VItemGroup/VItemGroup.mjs +4 -1
  160. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  161. package/lib/components/VItemGroup/index.d.ts +30 -33
  162. package/lib/components/VKbd/index.d.ts +30 -17
  163. package/lib/components/VLabel/VLabel.mjs +4 -1
  164. package/lib/components/VLabel/VLabel.mjs.map +1 -1
  165. package/lib/components/VLabel/index.d.ts +22 -13
  166. package/lib/components/VLayout/VLayout.mjs +8 -4
  167. package/lib/components/VLayout/VLayout.mjs.map +1 -1
  168. package/lib/components/VLayout/VLayoutItem.mjs +4 -2
  169. package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
  170. package/lib/components/VLayout/index.d.ts +44 -26
  171. package/lib/components/VLazy/VLazy.mjs +4 -2
  172. package/lib/components/VLazy/VLazy.mjs.map +1 -1
  173. package/lib/components/VLazy/index.d.ts +22 -13
  174. package/lib/components/VList/VList.mjs +7 -24
  175. package/lib/components/VList/VList.mjs.map +1 -1
  176. package/lib/components/VList/VListChildren.mjs.map +1 -1
  177. package/lib/components/VList/VListGroup.mjs +5 -2
  178. package/lib/components/VList/VListGroup.mjs.map +1 -1
  179. package/lib/components/VList/VListItem.mjs +4 -2
  180. package/lib/components/VList/VListItem.mjs.map +1 -1
  181. package/lib/components/VList/VListItemAction.mjs +4 -1
  182. package/lib/components/VList/VListItemAction.mjs.map +1 -1
  183. package/lib/components/VList/VListItemMedia.mjs +4 -1
  184. package/lib/components/VList/VListItemMedia.mjs.map +1 -1
  185. package/lib/components/VList/VListSubheader.mjs +5 -3
  186. package/lib/components/VList/VListSubheader.mjs.map +1 -1
  187. package/lib/components/VList/index.d.ts +932 -826
  188. package/lib/components/VLocaleProvider/VLocaleProvider.mjs +5 -2
  189. package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
  190. package/lib/components/VLocaleProvider/index.d.ts +30 -17
  191. package/lib/components/VMain/VMain.mjs +4 -2
  192. package/lib/components/VMain/VMain.mjs.map +1 -1
  193. package/lib/components/VMain/index.d.ts +30 -17
  194. package/lib/components/VMenu/VMenu.mjs +2 -1
  195. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  196. package/lib/components/VMenu/index.d.ts +104 -282
  197. package/lib/components/VMessages/VMessages.mjs +4 -2
  198. package/lib/components/VMessages/VMessages.mjs.map +1 -1
  199. package/lib/components/VMessages/index.d.ts +22 -145
  200. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +4 -2
  201. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  202. package/lib/components/VNavigationDrawer/index.d.ts +26 -29
  203. package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
  204. package/lib/components/VNoSsr/index.d.ts +3 -13
  205. package/lib/components/VOverlay/VOverlay.mjs +5 -3
  206. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  207. package/lib/components/VOverlay/index.d.ts +38 -45
  208. package/lib/components/VPagination/VPagination.mjs +4 -1
  209. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  210. package/lib/components/VPagination/index.d.ts +23 -30
  211. package/lib/components/VParallax/VParallax.mjs +5 -2
  212. package/lib/components/VParallax/VParallax.mjs.map +1 -1
  213. package/lib/components/VParallax/index.d.ts +34 -33
  214. package/lib/components/VProgressCircular/VProgressCircular.mjs +4 -2
  215. package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
  216. package/lib/components/VProgressCircular/index.d.ts +22 -13
  217. package/lib/components/VProgressLinear/VProgressLinear.mjs +6 -4
  218. package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
  219. package/lib/components/VProgressLinear/index.d.ts +42 -45
  220. package/lib/components/VRadio/VRadio.mjs +2 -1
  221. package/lib/components/VRadio/VRadio.mjs.map +1 -1
  222. package/lib/components/VRadio/index.d.ts +27 -38
  223. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -1
  224. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  225. package/lib/components/VRadioGroup/index.d.ts +39 -62
  226. package/lib/components/VRangeSlider/VRangeSlider.mjs +2 -1
  227. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  228. package/lib/components/VRangeSlider/index.d.ts +27 -38
  229. package/lib/components/VRating/VRating.mjs +4 -1
  230. package/lib/components/VRating/VRating.mjs.map +1 -1
  231. package/lib/components/VRating/index.d.ts +23 -18
  232. package/lib/components/VResponsive/VResponsive.mjs +4 -2
  233. package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
  234. package/lib/components/VResponsive/index.d.ts +43 -31
  235. package/lib/components/VSelect/VSelect.mjs +2 -1
  236. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  237. package/lib/components/VSelect/index.d.ts +194 -552
  238. package/lib/components/VSelectionControl/VSelectionControl.mjs +6 -2
  239. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  240. package/lib/components/VSelectionControl/index.d.ts +76 -46
  241. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +4 -1
  242. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  243. package/lib/components/VSelectionControlGroup/index.d.ts +23 -14
  244. package/lib/components/VSheet/VSheet.mjs +4 -2
  245. package/lib/components/VSheet/VSheet.mjs.map +1 -1
  246. package/lib/components/VSheet/index.d.ts +22 -13
  247. package/lib/components/VSlideGroup/VSlideGroup.mjs +6 -3
  248. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  249. package/lib/components/VSlideGroup/index.d.ts +59 -90
  250. package/lib/components/VSlider/VSlider.mjs +2 -1
  251. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  252. package/lib/components/VSlider/VSliderThumb.mjs +6 -4
  253. package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
  254. package/lib/components/VSlider/VSliderTrack.mjs +6 -4
  255. package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
  256. package/lib/components/VSlider/index.d.ts +27 -38
  257. package/lib/components/VSnackbar/VSnackbar.mjs +2 -1
  258. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  259. package/lib/components/VSnackbar/index.d.ts +92 -142
  260. package/lib/components/VSwitch/VSwitch.mjs +2 -1
  261. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  262. package/lib/components/VSwitch/index.d.ts +39 -66
  263. package/lib/components/VSystemBar/VSystemBar.mjs +4 -2
  264. package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
  265. package/lib/components/VSystemBar/index.d.ts +22 -13
  266. package/lib/components/VTable/VTable.mjs +4 -1
  267. package/lib/components/VTable/VTable.mjs.map +1 -1
  268. package/lib/components/VTable/index.d.ts +26 -29
  269. package/lib/components/VTabs/VTab.mjs +2 -2
  270. package/lib/components/VTabs/VTab.mjs.map +1 -1
  271. package/lib/components/VTabs/VTabs.mjs +2 -2
  272. package/lib/components/VTabs/VTabs.mjs.map +1 -1
  273. package/lib/components/VTabs/index.d.ts +45 -27
  274. package/lib/components/VTextField/VTextField.mjs +2 -1
  275. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  276. package/lib/components/VTextField/index.d.ts +208 -269
  277. package/lib/components/VTextarea/VTextarea.mjs +2 -1
  278. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  279. package/lib/components/VTextarea/index.d.ts +79 -122
  280. package/lib/components/VThemeProvider/VThemeProvider.mjs +6 -3
  281. package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
  282. package/lib/components/VThemeProvider/index.d.ts +22 -13
  283. package/lib/components/VTimeline/VTimeline.mjs +5 -3
  284. package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
  285. package/lib/components/VTimeline/VTimelineDivider.mjs +4 -1
  286. package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
  287. package/lib/components/VTimeline/VTimelineItem.mjs +8 -6
  288. package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
  289. package/lib/components/VTimeline/index.d.ts +67 -57
  290. package/lib/components/VToolbar/VToolbar.mjs +4 -2
  291. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  292. package/lib/components/VToolbar/VToolbarItems.mjs +9 -4
  293. package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
  294. package/lib/components/VToolbar/VToolbarTitle.mjs +5 -2
  295. package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
  296. package/lib/components/VToolbar/index.d.ts +74 -71
  297. package/lib/components/VTooltip/VTooltip.mjs +2 -1
  298. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  299. package/lib/components/VTooltip/index.d.ts +104 -150
  300. package/lib/components/VValidation/index.d.ts +0 -12
  301. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +21 -23
  302. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  303. package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +5 -2
  304. package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
  305. package/lib/components/VVirtualScroll/index.d.ts +70 -30
  306. package/lib/components/VWindow/VWindow.mjs +4 -1
  307. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  308. package/lib/components/VWindow/VWindowItem.mjs +4 -1
  309. package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
  310. package/lib/components/VWindow/index.d.ts +61 -79
  311. package/lib/components/index.d.ts +5229 -6754
  312. package/lib/components/transitions/index.d.ts +0 -192
  313. package/lib/composables/component.mjs +11 -0
  314. package/lib/composables/component.mjs.map +1 -0
  315. package/lib/composables/defaults.mjs +51 -5
  316. package/lib/composables/defaults.mjs.map +1 -1
  317. package/lib/composables/icons.mjs +15 -4
  318. package/lib/composables/icons.mjs.map +1 -1
  319. package/lib/composables/index.mjs +1 -1
  320. package/lib/composables/index.mjs.map +1 -1
  321. package/lib/composables/loader.mjs.map +1 -1
  322. package/lib/entry-bundler.mjs +1 -1
  323. package/lib/framework.mjs +2 -2
  324. package/lib/framework.mjs.map +1 -1
  325. package/lib/iconsets/fa-svg.d.ts +1 -1
  326. package/lib/iconsets/fa.d.ts +1 -1
  327. package/lib/iconsets/fa4.d.ts +1 -1
  328. package/lib/iconsets/md.d.ts +1 -1
  329. package/lib/iconsets/mdi-svg.d.ts +1 -1
  330. package/lib/iconsets/mdi.d.ts +1 -1
  331. package/lib/index.d.ts +11 -11
  332. package/lib/labs/VDataTable/VDataTable.mjs +1 -1
  333. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  334. package/lib/labs/VDataTable/VDataTableHeaders.mjs +34 -20
  335. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  336. package/lib/labs/VDataTable/VDataTableRow.mjs +2 -4
  337. package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
  338. package/lib/labs/VDataTable/VDataTableRows.mjs +2 -2
  339. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  340. package/lib/labs/VDataTable/VDataTableServer.mjs +1 -1
  341. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  342. package/lib/labs/VDataTable/index.d.ts +61 -933
  343. package/lib/labs/VInfiniteScroll/index.d.ts +8 -36
  344. package/lib/labs/VSkeletonLoader/index.d.ts +0 -12
  345. package/lib/labs/components.d.ts +115 -1027
  346. package/lib/labs/date/DateAdapter.mjs +2 -0
  347. package/lib/labs/date/DateAdapter.mjs.map +1 -0
  348. package/lib/labs/date/adapters/vuetify.d.ts +52 -0
  349. package/lib/{adapters → labs/date/adapters}/vuetify.mjs +2 -2
  350. package/lib/labs/date/adapters/vuetify.mjs.map +1 -0
  351. package/lib/{composables → labs/date}/date.mjs +3 -3
  352. package/lib/labs/date/date.mjs.map +1 -0
  353. package/lib/labs/date/index.d.ts +40 -0
  354. package/lib/labs/date/index.mjs +2 -0
  355. package/lib/labs/date/index.mjs.map +1 -0
  356. package/lib/labs/index.mjs +3 -2
  357. package/lib/labs/index.mjs.map +1 -1
  358. package/lib/util/createSimpleFunctional.mjs +9 -4
  359. package/lib/util/createSimpleFunctional.mjs.map +1 -1
  360. package/lib/util/defineComponent.mjs +11 -43
  361. package/lib/util/defineComponent.mjs.map +1 -1
  362. package/lib/util/helpers.mjs +28 -2
  363. package/lib/util/helpers.mjs.map +1 -1
  364. package/lib/util/index.mjs +1 -0
  365. package/lib/util/index.mjs.map +1 -1
  366. package/package.json +2 -1
  367. package/lib/adapters/date-adapter.mjs +0 -2
  368. package/lib/adapters/date-adapter.mjs.map +0 -1
  369. package/lib/adapters/vuetify.mjs.map +0 -1
  370. package/lib/composables/date.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DateAdapter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateAdapter.mjs","names":[],"sources":["../../../src/labs/date/DateAdapter.ts"],"sourcesContent":["export interface DateAdapter<Date> {\n date (value?: any): Date | null\n format (date: Date, formatString: string): string\n\n startOfMonth (date: Date): Date\n endOfMonth (date: Date): Date\n startOfYear (date: Date): Date\n endOfYear (date: Date): Date\n\n isAfter (date: Date, comparing: Date): boolean\n isEqual (date: Date, comparing: Date): boolean\n isSameDay (date: Date, comparing: Date): boolean\n isSameMonth (date: Date, comparing: Date): boolean\n isValid (date: any): boolean\n isWithinRange (date: Date, range: [Date, Date]): boolean\n\n addDays (date: Date, amount: number): Date\n addMonths (date: Date, amount: number): Date\n\n getYear (date: Date): number\n setYear (date: Date, year: number): Date\n getDiff (date: Date, comparing: Date | string, unit?: string): number\n getWeek (date: Date): number\n getWeekArray (date: Date): (Date | null)[][]\n getWeekdays (): string[]\n getMonth (date: Date): number\n}\n"],"mappings":""}
@@ -0,0 +1,52 @@
1
+ interface DateAdapter<Date> {
2
+ date(value?: any): Date | null;
3
+ format(date: Date, formatString: string): string;
4
+ startOfMonth(date: Date): Date;
5
+ endOfMonth(date: Date): Date;
6
+ startOfYear(date: Date): Date;
7
+ endOfYear(date: Date): Date;
8
+ isAfter(date: Date, comparing: Date): boolean;
9
+ isEqual(date: Date, comparing: Date): boolean;
10
+ isSameDay(date: Date, comparing: Date): boolean;
11
+ isSameMonth(date: Date, comparing: Date): boolean;
12
+ isValid(date: any): boolean;
13
+ isWithinRange(date: Date, range: [Date, Date]): boolean;
14
+ addDays(date: Date, amount: number): Date;
15
+ addMonths(date: Date, amount: number): Date;
16
+ getYear(date: Date): number;
17
+ setYear(date: Date, year: number): Date;
18
+ getDiff(date: Date, comparing: Date | string, unit?: string): number;
19
+ getWeek(date: Date): number;
20
+ getWeekArray(date: Date): (Date | null)[][];
21
+ getWeekdays(): string[];
22
+ getMonth(date: Date): number;
23
+ }
24
+
25
+ declare function getWeek(date: Date): number;
26
+ declare class VuetifyDateAdapter implements DateAdapter<Date> {
27
+ locale: string;
28
+ constructor(locale?: string);
29
+ date(value?: any): Date | null;
30
+ addDays(date: Date, amount: number): Date;
31
+ addMonths(date: Date, amount: number): Date;
32
+ getWeekArray(date: Date): (Date | null)[][];
33
+ startOfMonth(date: Date): Date;
34
+ endOfMonth(date: Date): Date;
35
+ format(date: Date, formatString: string): string;
36
+ isEqual(date: Date, comparing: Date): boolean;
37
+ isValid(date: any): boolean;
38
+ isWithinRange(date: Date, range: [Date, Date]): boolean;
39
+ isAfter(date: Date, comparing: Date): boolean;
40
+ isSameDay(date: Date, comparing: Date): boolean;
41
+ isSameMonth(date: Date, comparing: Date): boolean;
42
+ setYear(date: Date, year: number): Date;
43
+ getDiff(date: Date, comparing: Date | string, unit?: string): number;
44
+ getWeek(date: Date): number;
45
+ getWeekdays(): string[];
46
+ getYear(date: Date): number;
47
+ getMonth(date: Date): number;
48
+ startOfYear(date: Date): Date;
49
+ endOfYear(date: Date): Date;
50
+ }
51
+
52
+ export { VuetifyDateAdapter, getWeek };
@@ -1,5 +1,5 @@
1
1
  // Utilities
2
- import { createRange } from "../util/index.mjs"; // Types
2
+ import { createRange } from "../../../util/index.mjs"; // Types
3
3
  function getWeekArray(date) {
4
4
  let currentWeek = [];
5
5
  const weeks = [];
@@ -327,7 +327,7 @@ function setYear(date, year) {
327
327
  d.setFullYear(year);
328
328
  return d;
329
329
  }
330
- export default class VuetifyDateAdapter {
330
+ export class VuetifyDateAdapter {
331
331
  constructor() {
332
332
  let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';
333
333
  this.locale = locale;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vuetify.mjs","names":["createRange","getWeekArray","date","currentWeek","weeks","firstDayOfMonth","startOfMonth","lastDayOfMonth","endOfMonth","i","getDay","push","getDate","day","Date","getFullYear","getMonth","length","value","parsed","parse","isNaN","firstDay","AD","AE","AF","AG","AI","AL","AM","AN","AR","AS","AT","AU","AX","AZ","BA","BD","BE","BG","BH","BM","BN","BR","BS","BT","BW","BY","BZ","CA","CH","CL","CM","CN","CO","CR","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ES","ET","FI","FJ","FO","FR","GB","GE","GF","GP","GR","GT","GU","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KR","KW","KZ","LA","LB","LI","LK","LT","LU","LV","LY","MC","MD","ME","MH","MK","MM","MN","MO","MQ","MT","MV","MX","MY","MZ","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RE","RO","RS","RU","SA","SD","SE","SG","SI","SK","SM","SV","SY","TH","TJ","TM","TR","TT","TW","UA","UM","US","UY","UZ","VA","VE","VI","VN","WS","XK","YE","ZA","ZW","sundayJanuarySecond2000","getWeekdays","locale","daysFromSunday","slice","toUpperCase","map","weekday","setDate","Intl","DateTimeFormat","format","formatString","options","month","year","timeZone","timeZoneName","addDays","amount","d","addMonths","setMonth","getYear","startOfYear","endOfYear","getMondayOfFirstWeekOfYear","getWeek","d1w1","tv","diffTime","Math","abs","getTime","diffDays","ceil","floor","isWithinRange","range","isAfter","isBefore","isValid","comparing","isEqual","isSameDay","isSameMonth","getDiff","unit","c","setYear","setFullYear","VuetifyDateAdapter","constructor","arguments","undefined"],"sources":["../../../../src/labs/date/adapters/vuetify.ts"],"sourcesContent":["// Utilities\nimport { createRange } from '@/util'\n\n// Types\nimport type { DateAdapter } from '../DateAdapter'\n\nfunction getWeekArray (date: Date) {\n let currentWeek = []\n const weeks = []\n const firstDayOfMonth = startOfMonth(date)\n const lastDayOfMonth = endOfMonth(date)\n\n for (let i = 0; i < firstDayOfMonth.getDay(); i++) {\n currentWeek.push(null)\n }\n\n for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {\n const day = new Date(date.getFullYear(), date.getMonth(), i)\n\n // Add the day to the current week\n currentWeek.push(day)\n\n // If the current week has 7 days, add it to the weeks array and start a new week\n if (currentWeek.length === 7) {\n weeks.push(currentWeek)\n currentWeek = []\n }\n }\n\n for (let i = currentWeek.length; i < 7; i++) {\n currentWeek.push(null)\n }\n\n weeks.push(currentWeek)\n\n return weeks\n}\n\nfunction startOfMonth (date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), 1)\n}\n\nfunction endOfMonth (date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0)\n}\n\nfunction date (value?: any): Date | null {\n if (value == null) return null\n\n if (value instanceof Date) return value\n\n if (typeof value === 'string') {\n const parsed = Date.parse(value)\n\n if (!isNaN(parsed)) return new Date(parsed)\n }\n\n return null\n}\n\nconst firstDay: Record<string, number> = {\n '001': 1,\n AD: 1,\n AE: 6,\n AF: 6,\n AG: 0,\n AI: 1,\n AL: 1,\n AM: 1,\n AN: 1,\n AR: 1,\n AS: 0,\n AT: 1,\n AU: 0,\n AX: 1,\n AZ: 1,\n BA: 1,\n BD: 0,\n BE: 1,\n BG: 1,\n BH: 6,\n BM: 1,\n BN: 1,\n BR: 0,\n BS: 0,\n BT: 0,\n BW: 0,\n BY: 1,\n BZ: 0,\n CA: 0,\n CH: 1,\n CL: 1,\n CM: 1,\n CN: 0,\n CO: 0,\n CR: 1,\n CY: 1,\n CZ: 1,\n DE: 1,\n DJ: 6,\n DK: 1,\n DM: 0,\n DO: 0,\n DZ: 6,\n EC: 1,\n EE: 1,\n EG: 6,\n ES: 1,\n ET: 0,\n FI: 1,\n FJ: 1,\n FO: 1,\n FR: 1,\n GB: 1,\n 'GB-alt-variant': 0,\n GE: 1,\n GF: 1,\n GP: 1,\n GR: 1,\n GT: 0,\n GU: 0,\n HK: 0,\n HN: 0,\n HR: 1,\n HU: 1,\n ID: 0,\n IE: 1,\n IL: 0,\n IN: 0,\n IQ: 6,\n IR: 6,\n IS: 1,\n IT: 1,\n JM: 0,\n JO: 6,\n JP: 0,\n KE: 0,\n KG: 1,\n KH: 0,\n KR: 0,\n KW: 6,\n KZ: 1,\n LA: 0,\n LB: 1,\n LI: 1,\n LK: 1,\n LT: 1,\n LU: 1,\n LV: 1,\n LY: 6,\n MC: 1,\n MD: 1,\n ME: 1,\n MH: 0,\n MK: 1,\n MM: 0,\n MN: 1,\n MO: 0,\n MQ: 1,\n MT: 0,\n MV: 5,\n MX: 0,\n MY: 1,\n MZ: 0,\n NI: 0,\n NL: 1,\n NO: 1,\n NP: 0,\n NZ: 1,\n OM: 6,\n PA: 0,\n PE: 0,\n PH: 0,\n PK: 0,\n PL: 1,\n PR: 0,\n PT: 0,\n PY: 0,\n QA: 6,\n RE: 1,\n RO: 1,\n RS: 1,\n RU: 1,\n SA: 0,\n SD: 6,\n SE: 1,\n SG: 0,\n SI: 1,\n SK: 1,\n SM: 1,\n SV: 0,\n SY: 6,\n TH: 0,\n TJ: 1,\n TM: 1,\n TR: 1,\n TT: 0,\n TW: 0,\n UA: 1,\n UM: 0,\n US: 0,\n UY: 1,\n UZ: 1,\n VA: 1,\n VE: 0,\n VI: 0,\n VN: 1,\n WS: 0,\n XK: 1,\n YE: 0,\n ZA: 0,\n ZW: 0,\n}\n\nconst sundayJanuarySecond2000 = new Date(2000, 0, 2)\n\nfunction getWeekdays (locale: string) {\n const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()]\n\n return createRange(7).map(i => {\n const weekday = new Date(sundayJanuarySecond2000)\n weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i)\n return new Intl.DateTimeFormat(locale, { weekday: 'long' }).format(weekday)\n })\n}\n\nfunction format (value: Date, formatString: string, locale: string): string {\n const date = new Date(value)\n\n let options: Intl.DateTimeFormatOptions = {}\n switch (formatString) {\n case 'fullDateWithWeekday':\n options = { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }\n break\n case 'normalDateWithWeekday':\n options = { weekday: 'short', day: 'numeric', month: 'short', year: 'numeric' }\n break\n case 'keyboardDate':\n options = {}\n break\n case 'monthAndDate':\n options = { month: 'long', day: 'numeric' }\n break\n case 'monthAndYear':\n options = { month: 'long', year: 'numeric' }\n break\n default:\n options = { timeZone: 'UTC', timeZoneName: 'short' }\n }\n\n return new Intl.DateTimeFormat(locale, options).format(date)\n}\n\nfunction addDays (date: Date, amount: number) {\n const d = new Date(date)\n d.setDate(d.getDate() + amount)\n return d\n}\n\nfunction addMonths (date: Date, amount: number) {\n const d = new Date(date)\n d.setMonth(d.getMonth() + amount)\n return d\n}\n\nfunction getYear (date: Date) {\n return date.getFullYear()\n}\n\nfunction getMonth (date: Date) {\n return date.getMonth()\n}\n\nfunction startOfYear (date: Date) {\n return new Date(date.getFullYear(), 0, 1)\n}\nfunction endOfYear (date: Date) {\n return new Date(date.getFullYear(), 11, 31)\n}\n\nfunction getMondayOfFirstWeekOfYear (year: number) {\n return new Date(year, 0, 1)\n}\n\n// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024\nexport function getWeek (date: Date) {\n let year = date.getFullYear()\n let d1w1 = getMondayOfFirstWeekOfYear(year)\n\n if (date < d1w1) {\n year = year - 1\n d1w1 = getMondayOfFirstWeekOfYear(year)\n } else {\n const tv = getMondayOfFirstWeekOfYear(year + 1)\n if (date >= tv) {\n year = year + 1\n d1w1 = tv\n }\n }\n\n const diffTime = Math.abs(date.getTime() - d1w1.getTime())\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))\n\n return Math.floor(diffDays / 7) + 1\n}\n\nfunction isWithinRange (date: Date, range: [Date, Date]) {\n return isAfter(date, range[0]) && isBefore(date, range[1])\n}\n\nfunction isValid (date: any) {\n const d = new Date(date)\n\n return d instanceof Date && !isNaN(d.getTime())\n}\n\nfunction isAfter (date: Date, comparing: Date) {\n return date.getTime() > comparing.getTime()\n}\n\nfunction isBefore (date: Date, comparing: Date) {\n return date.getTime() < comparing.getTime()\n}\n\nfunction isEqual (date: Date, comparing: Date) {\n return date.getTime() === comparing.getTime()\n}\n\nfunction isSameDay (date: Date, comparing: Date) {\n return date.getDate() === comparing.getDate() &&\n date.getMonth() === comparing.getMonth() &&\n date.getFullYear() === comparing.getFullYear()\n}\n\nfunction isSameMonth (date: Date, comparing: Date) {\n return date.getMonth() === comparing.getMonth() &&\n date.getFullYear() === comparing.getFullYear()\n}\n\nfunction getDiff (date: Date, comparing: Date | string, unit?: string) {\n const d = new Date(date)\n const c = new Date(comparing)\n\n if (unit === 'month') {\n return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12\n }\n\n return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24))\n}\n\nfunction setYear (date: Date, year: number) {\n const d = new Date(date)\n d.setFullYear(year)\n return d\n}\n\nexport class VuetifyDateAdapter implements DateAdapter<Date> {\n constructor (public locale: string = 'en') {}\n\n date (value?: any) {\n return date(value)\n }\n\n addDays (date: Date, amount: number) {\n return addDays(date, amount)\n }\n\n addMonths (date: Date, amount: number) {\n return addMonths(date, amount)\n }\n\n getWeekArray (date: Date) {\n return getWeekArray(date)\n }\n\n startOfMonth (date: Date) {\n return startOfMonth(date)\n }\n\n endOfMonth (date: Date) {\n return endOfMonth(date)\n }\n\n format (date: Date, formatString: string) {\n return format(date, formatString, this.locale)\n }\n\n isEqual (date: Date, comparing: Date) {\n return isEqual(date, comparing)\n }\n\n isValid (date: any) {\n return isValid(date)\n }\n\n isWithinRange (date: Date, range: [Date, Date]) {\n return isWithinRange(date, range)\n }\n\n isAfter (date: Date, comparing: Date) {\n return isAfter(date, comparing)\n }\n\n isSameDay (date: Date, comparing: Date) {\n return isSameDay(date, comparing)\n }\n\n isSameMonth (date: Date, comparing: Date) {\n return isSameMonth(date, comparing)\n }\n\n setYear (date: Date, year: number) {\n return setYear(date, year)\n }\n\n getDiff (date: Date, comparing: Date | string, unit?: string) {\n return getDiff(date, comparing, unit)\n }\n\n getWeek (date: Date) {\n return getWeek(date)\n }\n\n getWeekdays () {\n return getWeekdays(this.locale)\n }\n\n getYear (date: Date) {\n return getYear(date)\n }\n\n getMonth (date: Date) {\n return getMonth(date)\n }\n\n startOfYear (date: Date) {\n return startOfYear(date)\n }\n\n endOfYear (date: Date) {\n return endOfYear(date)\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,WAAW,mCAEpB;AAGA,SAASC,YAAYA,CAAEC,IAAU,EAAE;EACjC,IAAIC,WAAW,GAAG,EAAE;EACpB,MAAMC,KAAK,GAAG,EAAE;EAChB,MAAMC,eAAe,GAAGC,YAAY,CAACJ,IAAI,CAAC;EAC1C,MAAMK,cAAc,GAAGC,UAAU,CAACN,IAAI,CAAC;EAEvC,KAAK,IAAIO,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,eAAe,CAACK,MAAM,EAAE,EAAED,CAAC,EAAE,EAAE;IACjDN,WAAW,CAACQ,IAAI,CAAC,IAAI,CAAC;EACxB;EAEA,KAAK,IAAIF,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIF,cAAc,CAACK,OAAO,EAAE,EAAEH,CAAC,EAAE,EAAE;IAClD,MAAMI,GAAG,GAAG,IAAIC,IAAI,CAACZ,IAAI,CAACa,WAAW,EAAE,EAAEb,IAAI,CAACc,QAAQ,EAAE,EAAEP,CAAC,CAAC;;IAE5D;IACAN,WAAW,CAACQ,IAAI,CAACE,GAAG,CAAC;;IAErB;IACA,IAAIV,WAAW,CAACc,MAAM,KAAK,CAAC,EAAE;MAC5Bb,KAAK,CAACO,IAAI,CAACR,WAAW,CAAC;MACvBA,WAAW,GAAG,EAAE;IAClB;EACF;EAEA,KAAK,IAAIM,CAAC,GAAGN,WAAW,CAACc,MAAM,EAAER,CAAC,GAAG,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC3CN,WAAW,CAACQ,IAAI,CAAC,IAAI,CAAC;EACxB;EAEAP,KAAK,CAACO,IAAI,CAACR,WAAW,CAAC;EAEvB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AEoN,SAAe,EAAE;IACtC,OAAOE,SAAS,CAACtN,IAAI,EAAEoN,SAAS,CAAC;EACnC;EAEAG,WAAWA,CAAEvN,IAAU,EAAEoN,SAAe,EAAE;IACxC,OAAOG,WAAW,CAACvN,IAAI,EAAEoN,SAAS,CAAC;EACrC;EAEAO,OAAOA,CAAE3N,IAAU,EAAEyL,IAAY,EAAE;IACjC,OAAOkC,OAAO,CAAC3N,IAAI,EAAEyL,IAAI,CAAC;EAC5B;EAEA+B,OAAOA,CAAExN,IAAU,EAAEoN,SAAwB,EAAEK,IAAa,EAAE;IAC5D,OAAOD,OAAO,CAACxN,IAAI,EAAEoN,SAAS,EAAEK,IAAI,CAAC;EACvC;EAEApB,OAAOA,CAAErM,IAAU,EAAE;IACnB,OAAOqM,OAAO,CAACrM,IAAI,CAAC;EACtB;EAEA2K,WAAWA,CAAA,EAAI;IACb,OAAOA,WAAW,CAAC,IAAI,CAACC,MAAM,CAAC;EACjC;EAEAqB,OAAOA,CAAEjM,IAAU,EAAE;IACnB,OAAOiM,OAAO,CAACjM,IAAI,CAAC;EACtB;EAEAc,QAAQA,CAAEd,IAAU,EAAE;IACpB,OAAOc,QAAQ,CAACd,IAAI,CAAC;EACvB;EAEAkM,WAAWA,CAAElM,IAAU,EAAE;IACvB,OAAOkM,WAAW,CAAClM,IAAI,CAAC;EAC1B;EAEAmM,SAASA,CAAEnM,IAAU,EAAE;IACrB,OAAOmM,SAAS,CAACnM,IAAI,CAAC;EACxB;AACF"}
@@ -1,8 +1,8 @@
1
1
  // Composables
2
- import { useLocale } from "./locale.mjs"; // Utilities
2
+ import { useLocale } from "../../composables/locale.mjs"; // Utilities
3
3
  import { inject, watch } from 'vue';
4
- import { propsFactory } from "../util/index.mjs"; // Adapters
5
- import VuetifyDateAdapter from "../adapters/vuetify.mjs"; // Types
4
+ import { propsFactory } from "../../util/index.mjs"; // Adapters
5
+ import { VuetifyDateAdapter } from "./adapters/vuetify.mjs"; // Types
6
6
  export const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
7
7
  export function createDate(options) {
8
8
  return options ?? {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.mjs","names":["useLocale","inject","watch","propsFactory","VuetifyDateAdapter","DateAdapterSymbol","Symbol","for","createDate","options","adapter","makeDateProps","displayDate","type","Object","default","Date","hideAdjacentMonths","Boolean","modelValue","useDate","props","date","locale","Error","instance","current","value","val","immediate"],"sources":["../../../src/labs/date/date.ts"],"sourcesContent":["// Composables\nimport { useLocale } from '@/composables/locale'\n\n// Utilities\nimport { inject, watch } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Adapters\nimport { VuetifyDateAdapter } from './adapters/vuetify'\n\n// Types\nimport type { DateAdapter } from './DateAdapter'\nimport type { InjectionKey, PropType } from 'vue'\n\nexport interface DateInstance extends DateAdapter<Date> {\n locale: string\n}\n\nexport type DateOptions = {\n adapter: { new(locale: string): DateInstance }\n}\n\nexport const DateAdapterSymbol: InjectionKey<DateOptions> = Symbol.for('vuetify:date-adapter')\n\nexport interface DateProps {\n displayDate: Date\n hideAdjacentMonths: boolean\n modelValue: any[]\n}\n\nexport function createDate (options?: DateOptions) {\n return options ?? { adapter: VuetifyDateAdapter }\n}\n\n// TODO: revisit this after it starts being implemented\nexport const makeDateProps = propsFactory({\n displayDate: {\n type: Object as PropType<Date>,\n default: new Date(),\n },\n hideAdjacentMonths: Boolean,\n modelValue: {\n type: null as unknown as PropType<any[]>,\n default: () => [],\n },\n}, 'date')\n\nexport function useDate (props: DateProps) {\n const date = inject(DateAdapterSymbol)\n const locale = useLocale()\n\n if (!date) throw new Error('[Vuetify] Could not find injected date')\n\n // eslint-disable-next-line new-cap\n const instance = new date.adapter(locale.current.value)\n\n watch(locale.current, val => {\n instance.locale = val\n }, { immediate: true })\n\n return instance\n}\n"],"mappings":"AAAA;AAAA,SACSA,SAAS,wCAElB;AACA,SAASC,MAAM,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC1BC,YAAY,gCAErB;AAAA,SACSC,kBAAkB,kCAE3B;AAYA,OAAO,MAAMC,iBAA4C,GAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAQ9F,OAAO,SAASC,UAAUA,CAAEC,OAAqB,EAAE;EACjD,OAAOA,OAAO,IAAI;IAAEC,OAAO,EAAEN;EAAmB,CAAC;AACnD;;AAEA;AACA,OAAO,MAAMO,aAAa,GAAGR,YAAY,CAAC;EACxCS,WAAW,EAAE;IACXC,IAAI,EAAEC,MAAwB;IAC9BC,OAAO,EAAE,IAAIC,IAAI;EACnB,CAAC;EACDC,kBAAkB,EAAEC,OAAO;EAC3BC,UAAU,EAAE;IACVN,IAAI,EAAE,IAAkC;IACxCE,OAAO,EAAEA,CAAA,KAAM;EACjB;AACF,CAAC,EAAE,MAAM,CAAC;AAEV,OAAO,SAASK,OAAOA,CAAEC,KAAgB,EAAE;EACzC,MAAMC,IAAI,GAAGrB,MAAM,CAACI,iBAAiB,CAAC;EACtC,MAAMkB,MAAM,GAAGvB,SAAS,EAAE;EAE1B,IAAI,CAACsB,IAAI,EAAE,MAAM,IAAIE,KAAK,CAAC,wCAAwC,CAAC;;EAEpE;EACA,MAAMC,QAAQ,GAAG,IAAIH,IAAI,CAACZ,OAAO,CAACa,MAAM,CAACG,OAAO,CAACC,KAAK,CAAC;EAEvDzB,KAAK,CAACqB,MAAM,CAACG,OAAO,EAAEE,GAAG,IAAI;IAC3BH,QAAQ,CAACF,MAAM,GAAGK,GAAG;EACvB,CAAC,EAAE;IAAEC,SAAS,EAAE;EAAK,CAAC,CAAC;EAEvB,OAAOJ,QAAQ;AACjB"}
@@ -0,0 +1,40 @@
1
+ interface DateAdapter<Date> {
2
+ date(value?: any): Date | null;
3
+ format(date: Date, formatString: string): string;
4
+ startOfMonth(date: Date): Date;
5
+ endOfMonth(date: Date): Date;
6
+ startOfYear(date: Date): Date;
7
+ endOfYear(date: Date): Date;
8
+ isAfter(date: Date, comparing: Date): boolean;
9
+ isEqual(date: Date, comparing: Date): boolean;
10
+ isSameDay(date: Date, comparing: Date): boolean;
11
+ isSameMonth(date: Date, comparing: Date): boolean;
12
+ isValid(date: any): boolean;
13
+ isWithinRange(date: Date, range: [Date, Date]): boolean;
14
+ addDays(date: Date, amount: number): Date;
15
+ addMonths(date: Date, amount: number): Date;
16
+ getYear(date: Date): number;
17
+ setYear(date: Date, year: number): Date;
18
+ getDiff(date: Date, comparing: Date | string, unit?: string): number;
19
+ getWeek(date: Date): number;
20
+ getWeekArray(date: Date): (Date | null)[][];
21
+ getWeekdays(): string[];
22
+ getMonth(date: Date): number;
23
+ }
24
+
25
+ interface DateInstance extends DateAdapter<Date> {
26
+ locale: string;
27
+ }
28
+ type DateOptions = {
29
+ adapter: {
30
+ new (locale: string): DateInstance;
31
+ };
32
+ };
33
+ interface DateProps {
34
+ displayDate: Date;
35
+ hideAdjacentMonths: boolean;
36
+ modelValue: any[];
37
+ }
38
+ declare function useDate(props: DateProps): DateInstance;
39
+
40
+ export { DateAdapter, DateInstance, DateOptions, useDate };
@@ -0,0 +1,2 @@
1
+ export { useDate } from "./date.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["useDate"],"sources":["../../../src/labs/date/index.ts"],"sourcesContent":["export { useDate } from './date'\n\nexport type { DateAdapter } from './DateAdapter'\nexport type { DateOptions, DateInstance } from './date'\n"],"mappings":"SAASA,OAAO"}
@@ -1,3 +1,4 @@
1
- import * as components from "./components.mjs";
2
- export { components };
1
+ import * as _components from "./components.mjs";
2
+ export { _components as components };
3
+ export * from "./date/index.mjs";
3
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["components"],"sources":["../../src/labs/index.ts"],"sourcesContent":["import * as components from './components'\n\nexport {\n components,\n}\n"],"mappings":"OAAO,KAAKA,UAAU;AAEtB,SACEA,UAAU"}
1
+ {"version":3,"file":"index.mjs","names":["components"],"sources":["../../src/labs/index.ts"],"sourcesContent":["export * as components from './components'\n\nexport * from './date'\n"],"mappings":";wBAAYA,UAAU;AAAA"}
@@ -1,3 +1,4 @@
1
+ import { makeComponentProps } from "../composables/component.mjs";
1
2
  import { camelize, capitalize, h } from 'vue';
2
3
  import { genericComponent } from "./defineComponent.mjs";
3
4
  export function createSimpleFunctional(klass) {
@@ -9,15 +10,19 @@ export function createSimpleFunctional(klass) {
9
10
  tag: {
10
11
  type: String,
11
12
  default: tag
12
- }
13
+ },
14
+ ...makeComponentProps()
13
15
  },
14
16
  setup(props, _ref) {
15
17
  let {
16
18
  slots
17
19
  } = _ref;
18
- return () => h(props.tag, {
19
- class: klass
20
- }, slots.default?.());
20
+ return () => {
21
+ return h(props.tag, {
22
+ class: [klass, props.class],
23
+ style: props.style
24
+ }, slots.default?.());
25
+ };
21
26
  }
22
27
  });
23
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createSimpleFunctional.mjs","names":["camelize","capitalize","h","genericComponent","createSimpleFunctional","klass","tag","arguments","length","undefined","name","replace","props","type","String","default","setup","_ref","slots","class"],"sources":["../../src/util/createSimpleFunctional.ts"],"sourcesContent":["import { camelize, capitalize, h } from 'vue'\nimport { genericComponent } from './defineComponent'\n\nexport function createSimpleFunctional (\n klass: string,\n tag = 'div',\n name?: string\n) {\n return genericComponent()({\n name: name ?? capitalize(camelize(klass.replace(/__/g, '-'))),\n\n props: {\n tag: {\n type: String,\n default: tag,\n },\n },\n\n setup (props, { slots }) {\n return () => h(props.tag, {\n class: klass,\n }, slots.default?.())\n },\n })\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,UAAU,EAAEC,CAAC,QAAQ,KAAK;AAAA,SACpCC,gBAAgB;AAEzB,OAAO,SAASC,sBAAsBA,CACpCC,KAAa,EAGb;EAAA,IAFAC,GAAG,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IACXG,IAAa,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEb,OAAON,gBAAgB,EAAE,CAAC;IACxBO,IAAI,EAAEA,IAAI,IAAIT,UAAU,CAACD,QAAQ,CAACK,KAAK,CAACM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAE7DC,KAAK,EAAE;MACLN,GAAG,EAAE;QACHO,IAAI,EAAEC,MAAM;QACZC,OAAO,EAAET;MACX;IACF,CAAC;IAEDU,KAAKA,CAAEJ,KAAK,EAAAK,IAAA,EAAa;MAAA,IAAX;QAAEC;MAAM,CAAC,GAAAD,IAAA;MACrB,OAAO,MAAMf,CAAC,CAACU,KAAK,CAACN,GAAG,EAAE;QACxBa,KAAK,EAAEd;MACT,CAAC,EAAEa,KAAK,CAACH,OAAO,IAAI,CAAC;IACvB;EACF,CAAC,CAAC;AACJ"}
1
+ {"version":3,"file":"createSimpleFunctional.mjs","names":["makeComponentProps","camelize","capitalize","h","genericComponent","createSimpleFunctional","klass","tag","arguments","length","undefined","name","replace","props","type","String","default","setup","_ref","slots","class","style"],"sources":["../../src/util/createSimpleFunctional.ts"],"sourcesContent":["import { makeComponentProps } from '@/composables/component'\nimport { camelize, capitalize, h } from 'vue'\nimport { genericComponent } from './defineComponent'\n\nexport function createSimpleFunctional (\n klass: string,\n tag = 'div',\n name?: string\n) {\n return genericComponent()({\n name: name ?? capitalize(camelize(klass.replace(/__/g, '-'))),\n\n props: {\n tag: {\n type: String,\n default: tag,\n },\n\n ...makeComponentProps(),\n },\n\n setup (props, { slots }) {\n return () => {\n return h(props.tag, {\n class: [klass, props.class],\n style: props.style,\n }, slots.default?.())\n }\n },\n })\n}\n"],"mappings":"SAASA,kBAAkB;AAC3B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,CAAC,QAAQ,KAAK;AAAA,SACpCC,gBAAgB;AAEzB,OAAO,SAASC,sBAAsBA,CACpCC,KAAa,EAGb;EAAA,IAFAC,GAAG,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IACXG,IAAa,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEb,OAAON,gBAAgB,EAAE,CAAC;IACxBO,IAAI,EAAEA,IAAI,IAAIT,UAAU,CAACD,QAAQ,CAACK,KAAK,CAACM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAE7DC,KAAK,EAAE;MACLN,GAAG,EAAE;QACHO,IAAI,EAAEC,MAAM;QACZC,OAAO,EAAET;MACX,CAAC;MAED,GAAGP,kBAAkB;IACvB,CAAC;IAEDiB,KAAKA,CAAEJ,KAAK,EAAAK,IAAA,EAAa;MAAA,IAAX;QAAEC;MAAM,CAAC,GAAAD,IAAA;MACrB,OAAO,MAAM;QACX,OAAOf,CAAC,CAACU,KAAK,CAACN,GAAG,EAAE;UAClBa,KAAK,EAAE,CAACd,KAAK,EAAEO,KAAK,CAACO,KAAK,CAAC;UAC3BC,KAAK,EAAER,KAAK,CAACQ;QACf,CAAC,EAAEF,KAAK,CAACH,OAAO,IAAI,CAAC;MACvB,CAAC;IACH;EACF,CAAC,CAAC;AACJ"}
@@ -1,19 +1,10 @@
1
1
  // Utils
2
- import { defineComponent as _defineComponent,
3
- // eslint-disable-line no-restricted-imports
4
- computed, getCurrentInstance, shallowRef, watchEffect } from 'vue';
2
+ import { defineComponent as _defineComponent // eslint-disable-line no-restricted-imports
3
+ } from 'vue';
5
4
  import { consoleWarn } from "./console.mjs";
6
- import { mergeDeep, pick, toKebabCase } from "./helpers.mjs";
7
- import { injectSelf } from "./injectSelf.mjs";
5
+ import { pick, toKebabCase } from "./helpers.mjs";
8
6
  import { propsFactory } from "./propsFactory.mjs";
9
- import { DefaultsSymbol, provideDefaults, useDefaults } from "../composables/defaults.mjs";
10
- import { useToggleScope } from "../composables/toggleScope.mjs"; // Types
11
- function propIsDefined(vnode, prop) {
12
- return typeof vnode.props?.[prop] !== 'undefined' || typeof vnode.props?.[toKebabCase(prop)] !== 'undefined';
13
- }
14
-
15
- // No props
16
-
7
+ import { injectDefaults, useDefaults } from "../composables/defaults.mjs"; // Types
17
8
  // Implementation
18
9
  export function defineComponent(options) {
19
10
  options._setup = options._setup ?? options.setup;
@@ -25,43 +16,20 @@ export function defineComponent(options) {
25
16
  options.props = propsFactory(options.props ?? {}, toKebabCase(options.name))();
26
17
  const propKeys = Object.keys(options.props);
27
18
  options.filterProps = function filterProps(props) {
28
- return pick(props, propKeys);
19
+ return pick(props, propKeys, ['class', 'style']);
29
20
  };
30
21
  options.props._as = String;
31
22
  options.setup = function setup(props, ctx) {
32
- const defaults = useDefaults();
23
+ const defaults = injectDefaults();
33
24
 
34
25
  // Skip props proxy if defaults are not provided
35
26
  if (!defaults.value) return options._setup(props, ctx);
36
- const vm = getCurrentInstance();
37
- const componentDefaults = computed(() => defaults.value[props._as ?? options.name]);
38
- const _props = new Proxy(props, {
39
- get(target, prop) {
40
- const propValue = Reflect.get(target, prop);
41
- if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) {
42
- return componentDefaults.value?.[prop] ?? defaults.value.global?.[prop] ?? propValue;
43
- }
44
- return propValue;
45
- }
46
- });
47
- const _subcomponentDefaults = shallowRef();
48
- watchEffect(() => {
49
- if (componentDefaults.value) {
50
- const subComponents = Object.entries(componentDefaults.value).filter(_ref => {
51
- let [key] = _ref;
52
- return key.startsWith(key[0].toUpperCase());
53
- });
54
- if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents);
55
- }
56
- });
27
+ const {
28
+ props: _props,
29
+ provideSubDefaults
30
+ } = useDefaults(props, props._as ?? options.name, defaults);
57
31
  const setupBindings = options._setup(_props, ctx);
58
-
59
- // If subcomponent defaults are provided, override any
60
- // subcomponents provided by the component's setup function.
61
- // This uses injectSelf so must be done after the original setup to work.
62
- useToggleScope(_subcomponentDefaults, () => {
63
- provideDefaults(mergeDeep(injectSelf(DefaultsSymbol)?.value ?? {}, _subcomponentDefaults.value));
64
- });
32
+ provideSubDefaults();
65
33
  return setupBindings;
66
34
  };
67
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"defineComponent.mjs","names":["defineComponent","_defineComponent","computed","getCurrentInstance","shallowRef","watchEffect","consoleWarn","mergeDeep","pick","toKebabCase","injectSelf","propsFactory","DefaultsSymbol","provideDefaults","useDefaults","useToggleScope","propIsDefined","vnode","prop","props","options","_setup","setup","name","propKeys","Object","keys","filterProps","_as","String","ctx","defaults","value","vm","componentDefaults","_props","Proxy","get","target","propValue","Reflect","global","_subcomponentDefaults","subComponents","entries","filter","_ref","key","startsWith","toUpperCase","length","fromEntries","setupBindings","genericComponent","exposeDefaults","arguments","undefined","defineFunctionalComponent","render"],"sources":["../../src/util/defineComponent.tsx"],"sourcesContent":["// Utils\nimport {\n defineComponent as _defineComponent, // eslint-disable-line no-restricted-imports\n computed,\n getCurrentInstance,\n shallowRef,\n watchEffect,\n} from 'vue'\nimport { consoleWarn } from '@/util/console'\nimport { mergeDeep, pick, toKebabCase } from '@/util/helpers'\nimport { injectSelf } from '@/util/injectSelf'\nimport { propsFactory } from '@/util/propsFactory'\nimport { DefaultsSymbol, provideDefaults, useDefaults } from '@/composables/defaults'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Types\nimport type {\n AllowedComponentProps,\n ComponentCustomProps,\n ComponentObjectPropsOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ComponentPropsOptions,\n ComputedOptions,\n DefineComponent,\n EmitsOptions,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n MethodOptions,\n ObjectEmitsOptions,\n VNode,\n VNodeChild,\n VNodeProps,\n} from 'vue'\n\nfunction propIsDefined (vnode: VNode, prop: string) {\n return typeof vnode.props?.[prop] !== 'undefined' ||\n typeof vnode.props?.[toKebabCase(prop)] !== 'undefined'\n}\n\n// No props\nexport function defineComponent<\n Props = {},\n RawBindings = {},\n D = {},\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string\n>(\n options: ComponentOptionsWithoutProps<\n Props,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II\n >\n): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>\n\n// Object Props\nexport function defineComponent<\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II\n >\n): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & FilterPropsOptions<PropsOptions>\n\n// Implementation\nexport function defineComponent (options: ComponentOptions) {\n options._setup = options._setup ?? options.setup\n\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value')\n\n return options\n }\n\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, toKebabCase(options.name))()\n const propKeys = Object.keys(options.props)\n options.filterProps = function filterProps (props: Record<string, any>) {\n return pick(props, propKeys)\n }\n\n options.props._as = String\n options.setup = function setup (props: Record<string, any>, ctx) {\n const defaults = useDefaults()\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx)\n\n const vm = getCurrentInstance()!\n const componentDefaults = computed(() => defaults.value![props._as ?? options.name!])\n const _props = new Proxy(props, {\n get (target, prop) {\n const propValue = Reflect.get(target, prop)\n if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) {\n return componentDefaults.value?.[prop] ?? defaults.value!.global?.[prop] ?? propValue\n }\n return propValue\n },\n })\n\n const _subcomponentDefaults = shallowRef()\n watchEffect(() => {\n if (componentDefaults.value) {\n const subComponents = Object.entries(componentDefaults.value).filter(([key]) => key.startsWith(key[0].toUpperCase()))\n if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents)\n }\n })\n\n const setupBindings = options._setup(_props, ctx)\n\n // If subcomponent defaults are provided, override any\n // subcomponents provided by the component's setup function.\n // This uses injectSelf so must be done after the original setup to work.\n useToggleScope(_subcomponentDefaults, () => {\n provideDefaults(mergeDeep(\n injectSelf(DefaultsSymbol)?.value ?? {},\n _subcomponentDefaults.value\n ))\n })\n\n return setupBindings\n }\n }\n\n return options\n}\n\ntype ToListeners<T extends string | number | symbol> = { [K in T]: K extends `on${infer U}` ? Uncapitalize<U> : K }[T]\n\nexport type SlotsToProps<T extends Record<string, any>> = T extends Record<string, Slot> ? ({\n $children?: (\n | VNodeChild\n | (keyof T extends 'default' ? T['default'] : {})\n | { [K in keyof T]?: T[K] }\n )\n $slots?: { [K in keyof T]?: T[K] }\n 'v-slots'?: { [K in keyof T]?: T[K] | false }\n} & {\n [K in keyof T as `v-slot:${K & string}`]?: T[K] | false\n}) : T extends Record<string, any[]> ? SlotsToProps<MakeSlots<T>> : never\n\ntype Slot<T extends any[] = any[]> = (...args: T) => VNodeChild\nexport type MakeSlots<T extends Record<string, any[]>> = {\n [K in keyof T]: Slot<T[K]>\n}\n\nexport type GenericSlot = SlotsToProps<{ default: [] }>\n\ntype DefineComponentWithGenericProps<T extends (new () => {\n $props?: Record<string, any>\n})> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I = InstanceType<T>,\n Base = DefineComponent<\n I extends Record<'$props', any>\n ? Omit<PropsOptions, keyof I['$props']>\n : PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E extends any[] ? E : I extends Record<'$props', any> ? Omit<E, ToListeners<keyof I['$props']>> : E,\n EE\n >\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>\n) => Base & T & FilterPropsOptions<PropsOptions>\n\ntype DefineComponentWithSlots<Slots extends Record<string, any[]> | Record<string, Slot>> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>\n) => DefineComponent<\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots>,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n PublicProps,\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<PropsOptions>\n> & FilterPropsOptions<PropsOptions>\n\n// No argument - simple default slot\nexport function genericComponent (exposeDefaults?: boolean): DefineComponentWithSlots<{ default: [] }>\n\n// Generic constructor argument - generic props and slots\nexport function genericComponent<T extends (new () => {\n $props?: Record<string, any>\n})> (exposeDefaults?: boolean): DefineComponentWithGenericProps<T>\n\n// Slots argument - simple slots\nexport function genericComponent<\n Slots extends Record<string, any[]> | Record<string, Slot>\n> (exposeDefaults?: boolean): DefineComponentWithSlots<Slots>\n\n// Implementation\nexport function genericComponent (exposeDefaults = true) {\n return (options: any) => ((exposeDefaults ? defineComponent : _defineComponent) as any)(options)\n}\n\nexport function defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n> (props: PropsOptions, render: T): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n render.props = props as any\n return render as any\n}\n\ntype EmitsToProps<T extends EmitsOptions> = T extends string[]\n ? {\n [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string &\n `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}`\n ? T[Uncapitalize<C>] extends null\n ? (...args: any[]) => any\n : (\n ...args: T[Uncapitalize<C>] extends (...args: infer P) => any\n ? P\n : never\n ) => any\n : never\n }\n : {}\n\ntype PublicProps =\n & VNodeProps\n & AllowedComponentProps\n & ComponentCustomProps\n\n// Adds a filterProps method to the component options\nexport interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {\n filterProps<\n T extends Partial<Props>,\n U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>\n > (props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>]\n}\n"],"mappings":"AAAA;AACA,SACEA,eAAe,IAAIC,gBAAgB;AAAE;AACrCC,QAAQ,EACRC,kBAAkB,EAClBC,UAAU,EACVC,WAAW,QACN,KAAK;AAAA,SACHC,WAAW;AAAA,SACXC,SAAS,EAAEC,IAAI,EAAEC,WAAW;AAAA,SAC5BC,UAAU;AAAA,SACVC,YAAY;AAAA,SACZC,cAAc,EAAEC,eAAe,EAAEC,WAAW;AAAA,SAC5CC,cAAc,0CAEvB;AAuBA,SAASC,aAAaA,CAAEC,KAAY,EAAEC,IAAY,EAAE;EAClD,OAAO,OAAOD,KAAK,CAACE,KAAK,GAAGD,IAAI,CAAC,KAAK,WAAW,IAC/C,OAAOD,KAAK,CAACE,KAAK,GAAGV,WAAW,CAACS,IAAI,CAAC,CAAC,KAAK,WAAW;A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AAAC,SAAA,CAAAL,MAAA,QAAAK,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAG,IAAI;EACrD,OAAQnC,OAAY,IAAK,CAAEkC,cAAc,GAAGtD,eAAe,GAAGC,gBAAgB,EAAUmB,OAAO,CAAC;AAClG;AAEA,OAAO,SAASqC,yBAAyBA,CAKtCtC,KAAmB,EAAEuC,MAAS,EAAwE;EACvGA,MAAM,CAACvC,KAAK,GAAGA,KAAY;EAC3B,OAAOuC,MAAM;AACf"}
1
+ {"version":3,"file":"defineComponent.mjs","names":["defineComponent","_defineComponent","consoleWarn","pick","toKebabCase","propsFactory","injectDefaults","useDefaults","options","_setup","setup","name","props","propKeys","Object","keys","filterProps","_as","String","ctx","defaults","value","_props","provideSubDefaults","setupBindings","genericComponent","exposeDefaults","arguments","length","undefined","defineFunctionalComponent","render"],"sources":["../../src/util/defineComponent.tsx"],"sourcesContent":["// Utils\nimport {\n defineComponent as _defineComponent, // eslint-disable-line no-restricted-imports\n} from 'vue'\nimport { consoleWarn } from '@/util/console'\nimport { pick, toKebabCase } from '@/util/helpers'\nimport { propsFactory } from '@/util/propsFactory'\nimport { injectDefaults, useDefaults } from '@/composables/defaults'\n\n// Types\nimport type {\n AllowedComponentProps,\n ComponentCustomProps,\n ComponentObjectPropsOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ComponentPropsOptions,\n ComputedOptions,\n DefineComponent,\n EmitsOptions,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n MethodOptions,\n ObjectEmitsOptions,\n VNodeChild,\n VNodeProps,\n} from 'vue'\n\n// No props\nexport function defineComponent<\n Props = {},\n RawBindings = {},\n D = {},\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string\n>(\n options: ComponentOptionsWithoutProps<\n Props,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II\n >\n): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>\n\n// Object Props\nexport function defineComponent<\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II\n >\n): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & FilterPropsOptions<PropsOptions>\n\n// Implementation\nexport function defineComponent (options: ComponentOptions) {\n options._setup = options._setup ?? options.setup\n\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value')\n\n return options\n }\n\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, toKebabCase(options.name))()\n const propKeys = Object.keys(options.props)\n options.filterProps = function filterProps (props: Record<string, any>) {\n return pick(props, propKeys, ['class', 'style'])\n }\n\n options.props._as = String\n options.setup = function setup (props: Record<string, any>, ctx) {\n const defaults = injectDefaults()\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx)\n\n const { props: _props, provideSubDefaults } = useDefaults(props, props._as ?? options.name, defaults)\n\n const setupBindings = options._setup(_props, ctx)\n\n provideSubDefaults()\n\n return setupBindings\n }\n }\n\n return options\n}\n\ntype ToListeners<T extends string | number | symbol> = { [K in T]: K extends `on${infer U}` ? Uncapitalize<U> : K }[T]\n\nexport type SlotsToProps<\n U extends Record<string, any[]> | Record<string, Slot>,\n T = U extends Record<string, any[]> ? MakeSlots<U> : U\n> = {\n $children?: (\n | VNodeChild\n | (T extends { default: infer V } ? V : {})\n | { [K in keyof T]?: T[K] }\n )\n 'v-slots'?: { [K in keyof T]?: T[K] | false }\n} & {\n [K in keyof T as `v-slot:${K & string}`]?: T[K] | false\n}\n\ntype Slot<T extends any[] = any[]> = (...args: T) => VNodeChild\nexport type MakeSlots<T extends Record<string, any[]> | Record<string, Slot>> = {\n [K in keyof T]: T[K] extends any[] ? Slot<T[K]> : T[K]\n}\n\nexport type GenericProps<Props, Slots extends Record<string, any[]>> = {\n $props: Props & SlotsToProps<Slots>\n $slots: MakeSlots<Slots>\n}\n\ntype DefineComponentWithGenericProps<T extends (new (props: Record<string, any>) => {\n $props?: Record<string, any>\n})> = <\n PropsOptions extends Readonly<ComponentObjectPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I = InstanceType<T>,\n Base = DefineComponent<\n I extends Record<'$props', any>\n ? Omit<PropsOptions, keyof I['$props']>\n : PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E extends any[] ? E : I extends Record<'$props', any> ? Omit<E, ToListeners<keyof I['$props']>> : E,\n EE\n >\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>\n) => Base & T & FilterPropsOptions<PropsOptions>\n\ntype DefineComponentWithSlots<Slots extends Record<string, any[]> | Record<string, Slot>> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>\n) => DefineComponent<\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots>,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n PublicProps,\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<PropsOptions>\n> & FilterPropsOptions<PropsOptions>\n\n// No argument - simple default slot\nexport function genericComponent (exposeDefaults?: boolean): DefineComponentWithSlots<{ default: [] }>\n\n// Generic constructor argument - generic props and slots\nexport function genericComponent<T extends (new (props: Record<string, any>) => {\n $props?: Record<string, any>\n})> (exposeDefaults?: boolean): DefineComponentWithGenericProps<T>\n\n// Slots argument - simple slots\nexport function genericComponent<\n Slots extends Record<string, any[]> | Record<string, Slot>\n> (exposeDefaults?: boolean): DefineComponentWithSlots<Slots>\n\n// Implementation\nexport function genericComponent (exposeDefaults = true) {\n return (options: any) => ((exposeDefaults ? defineComponent : _defineComponent) as any)(options)\n}\n\nexport function defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n> (props: PropsOptions, render: T): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n render.props = props as any\n return render as any\n}\n\ntype EmitsToProps<T extends EmitsOptions> = T extends string[]\n ? {\n [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string &\n `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}`\n ? T[Uncapitalize<C>] extends null\n ? (...args: any[]) => any\n : (\n ...args: T[Uncapitalize<C>] extends (...args: infer P) => any\n ? P\n : never\n ) => any\n : never\n }\n : {}\n\ntype PublicProps =\n & VNodeProps\n & AllowedComponentProps\n & ComponentCustomProps\n\n// Adds a filterProps method to the component options\nexport interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {\n filterProps<\n T extends Partial<Props>,\n U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>\n > (props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>]\n}\n"],"mappings":"AAAA;AACA,SACEA,eAAe,IAAIC,gBAAgB,CAAE;AAAA,OAChC,KAAK;AAAA,SACHC,WAAW;AAAA,SACXC,IAAI,EAAEC,WAAW;AAAA,SACjBC,YAAY;AAAA,SACZC,cAAc,EAAEC,WAAW,uCAEpC;AAgFA;AACA,OAAO,SAASP,eAAeA,CAAEQ,OAAyB,EAAE;EAC1DA,OAAO,CAACC,MAAM,GAAGD,OAAO,CAACC,MAAM,IAAID,OAAO,CAACE,KAAK;EAEhD,IAAI,CAACF,OAAO,CAACG,IAAI,EAAE;IACjBT,WAAW,CAAC,kFAAkF,CAAC;IAE/F,OAAOM,OAAO;EAChB;EAEA,IAAIA,OAAO,CAACC,MAAM,EAAE;IAClBD,OAAO,CAACI,KAAK,GAAGP,YAAY,CAACG,OAAO,CAACI,KAAK,IAAI,CAAC,CAAC,EAAER,WAAW,CAACI,OAAO,CAACG,IAAI,CAAC,CAAC,EAAE;IAC9E,MAAME,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACP,OAAO,CAACI,KAAK,CAAC;IAC3CJ,OAAO,CAACQ,WAAW,GAAG,SAASA,WAAWA,CAAEJ,KAA0B,EAAE;MACtE,OAAOT,IAAI,CAACS,KAAK,EAAEC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAEDL,OAAO,CAACI,KAAK,CAACK,GAAG,GAAGC,MAAM;IAC1BV,OAAO,CAACE,KAAK,GAAG,SAASA,KAAKA,CAAEE,KAA0B,EAAEO,GAAG,EAAE;MAC/D,MAAMC,QAAQ,GAAGd,cAAc,EAAE;;MAEjC;MACA,IAAI,CAACc,QAAQ,CAACC,KAAK,EAAE,OAAOb,OAAO,CAACC,MAAM,CAACG,KAAK,EAAEO,GAAG,CAAC;MAEtD,MAAM;QAAEP,KAAK,EAAEU,MAAM;QAAEC;MAAmB,CAAC,GAAGhB,WAAW,CAACK,KAAK,EAAEA,KAAK,CAACK,GAAG,IAAIT,OAAO,CAACG,IAAI,EAAES,QAAQ,CAAC;MAErG,MAAMI,aAAa,GAAGhB,OAAO,CAACC,MAAM,CAACa,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,EAAE;MAEpB,OAAOC,aAAa;IACtB,CAAC;EACH;EAEA,OAAOhB,OAAO;AAChB;AAkGA;AACA,OAAO,SAASiB,gBAAgBA,CAAA,EAAyB;EAAA,IAAvBC,cAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EACrD,OAAQnB,OAAY,IAAK,CAAEkB,cAAc,GAAG1B,eAAe,GAAGC,gBAAgB,EAAUO,OAAO,CAAC;AAClG;AAEA,OAAO,SAASsB,yBAAyBA,CAKtClB,KAAmB,EAAEmB,MAAS,EAAwE;EACvGA,MAAM,CAACnB,KAAK,GAAGA,KAAY;EAC3B,OAAOmB,MAAM;AACf"}
@@ -133,11 +133,11 @@ export const keyValues = Object.freeze({
133
133
  export function keys(o) {
134
134
  return Object.keys(o);
135
135
  }
136
- export function pick(obj, paths) {
136
+ export function pick(obj, paths, exclude) {
137
137
  const found = Object.create(null);
138
138
  const rest = Object.create(null);
139
139
  for (const key in obj) {
140
- if (paths.some(path => path instanceof RegExp ? path.test(key) : path === key)) {
140
+ if (paths.some(path => path instanceof RegExp ? path.test(key) : path === key) && !exclude?.some(path => path === key)) {
141
141
  found[key] = obj[key];
142
142
  } else {
143
143
  rest[key] = obj[key];
@@ -429,4 +429,30 @@ export function callEvent(handler) {
429
429
  handler(...args);
430
430
  }
431
431
  }
432
+ export function focusableChildren(el) {
433
+ const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex="-1"]):not([disabled])`).join(', ');
434
+ return [...el.querySelectorAll(targets)];
435
+ }
436
+ export function focusChild(el, location) {
437
+ const focusable = focusableChildren(el);
438
+ const idx = focusable.indexOf(document.activeElement);
439
+ if (!location) {
440
+ if (!el.contains(document.activeElement)) {
441
+ focusable[0]?.focus();
442
+ }
443
+ } else if (location === 'first') {
444
+ focusable[0]?.focus();
445
+ } else if (location === 'last') {
446
+ focusable.at(-1)?.focus();
447
+ } else {
448
+ let _el;
449
+ let idxx = idx;
450
+ const inc = location === 'next' ? 1 : -1;
451
+ do {
452
+ idxx += inc;
453
+ _el = focusable[idxx];
454
+ } while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
455
+ if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');
456
+ }
457
+ }
432
458
  //# sourceMappingURL=helpers.mjs.map