@vuetify/nightly 3.7.4-master.2024-11-06 → 3.7.4-next.2024-11-06

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 (393) hide show
  1. package/dist/json/attributes.json +3555 -3555
  2. package/dist/json/importMap-labs.json +24 -24
  3. package/dist/json/importMap.json +146 -146
  4. package/dist/json/web-types.json +6429 -6429
  5. package/dist/vuetify-labs.css +25717 -27430
  6. package/dist/vuetify-labs.d.ts +2966 -13801
  7. package/dist/vuetify-labs.esm.js +14 -8
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +14 -8
  10. package/dist/vuetify-labs.min.css +3 -4
  11. package/dist/vuetify.css +22734 -24450
  12. package/dist/vuetify.d.ts +3119 -12303
  13. package/dist/vuetify.esm.js +14 -8
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +14 -8
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +3 -4
  18. package/dist/vuetify.min.js +6 -6
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAlert/VAlert.css +207 -215
  21. package/lib/components/VAlert/VAlert.mjs +1 -1
  22. package/lib/components/VAlert/index.d.mts +8 -86
  23. package/lib/components/VApp/VApp.css +16 -15
  24. package/lib/components/VApp/index.d.mts +4 -20
  25. package/lib/components/VAppBar/VAppBar.css +14 -12
  26. package/lib/components/VAppBar/VAppBar.mjs +1 -1
  27. package/lib/components/VAppBar/VAppBarNavIcon.mjs +1 -1
  28. package/lib/components/VAppBar/VAppBarTitle.mjs +1 -1
  29. package/lib/components/VAppBar/index.d.mts +12 -148
  30. package/lib/components/VAutocomplete/VAutocomplete.css +86 -85
  31. package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
  32. package/lib/components/VAutocomplete/index.d.mts +201 -1360
  33. package/lib/components/VAvatar/VAvatar.css +108 -106
  34. package/lib/components/VAvatar/index.d.mts +4 -31
  35. package/lib/components/VBadge/VBadge.css +73 -73
  36. package/lib/components/VBadge/VBadge.mjs +1 -1
  37. package/lib/components/VBadge/index.d.mts +4 -41
  38. package/lib/components/VBanner/VBanner.css +161 -166
  39. package/lib/components/VBanner/VBanner.mjs +1 -1
  40. package/lib/components/VBanner/index.d.mts +12 -88
  41. package/lib/components/VBottomNavigation/VBottomNavigation.css +64 -63
  42. package/lib/components/VBottomNavigation/index.d.mts +4 -32
  43. package/lib/components/VBottomSheet/VBottomSheet.css +34 -31
  44. package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -1
  45. package/lib/components/VBottomSheet/index.d.mts +4 -88
  46. package/lib/components/VBreadcrumbs/VBreadcrumbs.css +54 -57
  47. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +1 -1
  48. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +1 -1
  49. package/lib/components/VBreadcrumbs/index.d.mts +12 -65
  50. package/lib/components/VBtn/VBtn.css +385 -408
  51. package/lib/components/VBtn/VBtn.mjs +1 -1
  52. package/lib/components/VBtn/VBtn.sass +4 -4
  53. package/lib/components/VBtn/index.d.mts +4 -72
  54. package/lib/components/VBtnGroup/VBtnGroup.css +63 -64
  55. package/lib/components/VBtnGroup/VBtnGroup.mjs +1 -1
  56. package/lib/components/VBtnGroup/index.d.mts +4 -28
  57. package/lib/components/VBtnToggle/VBtnToggle.css +16 -14
  58. package/lib/components/VBtnToggle/VBtnToggle.mjs +1 -1
  59. package/lib/components/VBtnToggle/index.d.mts +4 -24
  60. package/lib/components/VCard/VCard.css +294 -302
  61. package/lib/components/VCard/VCard.mjs +1 -1
  62. package/lib/components/VCard/VCardItem.mjs +1 -1
  63. package/lib/components/VCard/VCardSubtitle.mjs +1 -1
  64. package/lib/components/VCard/VCardText.mjs +1 -1
  65. package/lib/components/VCard/index.d.mts +24 -190
  66. package/lib/components/VCarousel/VCarousel.css +63 -65
  67. package/lib/components/VCarousel/VCarousel.mjs +1 -1
  68. package/lib/components/VCarousel/VCarousel.sass +1 -1
  69. package/lib/components/VCarousel/VCarouselItem.mjs +1 -1
  70. package/lib/components/VCarousel/index.d.mts +8 -86
  71. package/lib/components/VCheckbox/VCheckbox.css +7 -5
  72. package/lib/components/VCheckbox/VCheckbox.mjs +1 -1
  73. package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -1
  74. package/lib/components/VCheckbox/index.d.mts +8 -90
  75. package/lib/components/VChip/VChip.css +378 -411
  76. package/lib/components/VChip/VChip.mjs +1 -1
  77. package/lib/components/VChip/index.d.mts +4 -105
  78. package/lib/components/VChipGroup/VChipGroup.css +19 -18
  79. package/lib/components/VChipGroup/VChipGroup.mjs +1 -1
  80. package/lib/components/VChipGroup/index.d.mts +4 -28
  81. package/lib/components/VCode/VCode.css +10 -8
  82. package/lib/components/VCode/index.d.mts +4 -18
  83. package/lib/components/VColorPicker/VColorPicker.css +22 -22
  84. package/lib/components/VColorPicker/VColorPicker.mjs +1 -1
  85. package/lib/components/VColorPicker/VColorPickerCanvas.css +24 -22
  86. package/lib/components/VColorPicker/VColorPickerEdit.css +29 -28
  87. package/lib/components/VColorPicker/VColorPickerPreview.css +69 -67
  88. package/lib/components/VColorPicker/VColorPickerPreview.sass +4 -2
  89. package/lib/components/VColorPicker/VColorPickerSwatches.css +34 -34
  90. package/lib/components/VColorPicker/index.d.mts +4 -68
  91. package/lib/components/VCombobox/VCombobox.css +86 -85
  92. package/lib/components/VCombobox/VCombobox.mjs +1 -1
  93. package/lib/components/VCombobox/index.d.mts +201 -1360
  94. package/lib/components/VConfirmEdit/VConfirmEdit.mjs +1 -1
  95. package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +1 -1
  96. package/lib/components/VConfirmEdit/index.d.mts +6 -13
  97. package/lib/components/VCounter/VCounter.css +7 -5
  98. package/lib/components/VCounter/VCounter.mjs +1 -1
  99. package/lib/components/VCounter/index.d.mts +9 -31
  100. package/lib/components/VDataIterator/index.d.mts +12 -56
  101. package/lib/components/VDataTable/VDataTable.css +189 -186
  102. package/lib/components/VDataTable/VDataTable.mjs +1 -1
  103. package/lib/components/VDataTable/VDataTable.sass +20 -10
  104. package/lib/components/VDataTable/VDataTableFooter.css +33 -31
  105. package/lib/components/VDataTable/VDataTableFooter.mjs +1 -1
  106. package/lib/components/VDataTable/VDataTableGroupHeaderRow.mjs +1 -1
  107. package/lib/components/VDataTable/VDataTableHeaders.mjs +1 -1
  108. package/lib/components/VDataTable/VDataTableRow.mjs +1 -1
  109. package/lib/components/VDataTable/VDataTableRows.mjs +1 -1
  110. package/lib/components/VDataTable/VDataTableServer.mjs +1 -1
  111. package/lib/components/VDataTable/VDataTableVirtual.mjs +1 -1
  112. package/lib/components/VDataTable/index.d.mts +36 -388
  113. package/lib/components/VDatePicker/VDatePicker.css +8 -6
  114. package/lib/components/VDatePicker/VDatePicker.mjs +1 -1
  115. package/lib/components/VDatePicker/VDatePickerControls.css +54 -56
  116. package/lib/components/VDatePicker/VDatePickerHeader.css +56 -60
  117. package/lib/components/VDatePicker/VDatePickerMonth.css +51 -55
  118. package/lib/components/VDatePicker/VDatePickerMonth.mjs +1 -1
  119. package/lib/components/VDatePicker/VDatePickerMonths.css +20 -19
  120. package/lib/components/VDatePicker/VDatePickerMonths.mjs +1 -1
  121. package/lib/components/VDatePicker/VDatePickerYears.css +16 -15
  122. package/lib/components/VDatePicker/VDatePickerYears.mjs +1 -1
  123. package/lib/components/VDatePicker/index.d.mts +24 -276
  124. package/lib/components/VDefaultsProvider/index.d.mts +4 -20
  125. package/lib/components/VDialog/VDialog.css +95 -95
  126. package/lib/components/VDialog/VDialog.mjs +1 -1
  127. package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +1 -1
  128. package/lib/components/VDialog/index.d.mts +143 -389
  129. package/lib/components/VDivider/VDivider.css +52 -52
  130. package/lib/components/VDivider/index.d.mts +4 -24
  131. package/lib/components/VEmptyState/VEmptyState.css +62 -67
  132. package/lib/components/VEmptyState/VEmptyState.mjs +1 -1
  133. package/lib/components/VEmptyState/index.d.mts +4 -66
  134. package/lib/components/VExpansionPanel/VExpansionPanel.css +203 -209
  135. package/lib/components/VExpansionPanel/VExpansionPanel.sass +27 -25
  136. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +1 -1
  137. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +1 -1
  138. package/lib/components/VExpansionPanel/index.d.mts +16 -152
  139. package/lib/components/VFab/VFab.css +74 -69
  140. package/lib/components/VFab/VFab.mjs +1 -1
  141. package/lib/components/VFab/VFab.sass +5 -4
  142. package/lib/components/VFab/index.d.mts +9 -78
  143. package/lib/components/VField/VField.css +539 -579
  144. package/lib/components/VField/VField.mjs +1 -1
  145. package/lib/components/VField/VFieldLabel.mjs +1 -1
  146. package/lib/components/VField/index.d.mts +11 -59
  147. package/lib/components/VFileInput/VFileInput.css +31 -29
  148. package/lib/components/VFileInput/VFileInput.mjs +1 -1
  149. package/lib/components/VFileInput/index.d.mts +71 -256
  150. package/lib/components/VFooter/VFooter.css +38 -36
  151. package/lib/components/VFooter/VFooter.mjs +1 -1
  152. package/lib/components/VFooter/index.d.mts +4 -29
  153. package/lib/components/VForm/index.d.mts +267 -175
  154. package/lib/components/VGrid/VContainer.mjs +1 -1
  155. package/lib/components/VGrid/VGrid.css +565 -592
  156. package/lib/components/VGrid/index.d.mts +16 -118
  157. package/lib/components/VHover/index.d.mts +4 -33
  158. package/lib/components/VIcon/VIcon.css +51 -52
  159. package/lib/components/VIcon/index.d.mts +17 -75
  160. package/lib/components/VImg/VImg.css +50 -51
  161. package/lib/components/VImg/VImg.mjs +1 -1
  162. package/lib/components/VImg/index.d.mts +19 -74
  163. package/lib/components/VInfiniteScroll/VInfiniteScroll.css +36 -37
  164. package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs +1 -1
  165. package/lib/components/VInfiniteScroll/index.d.mts +4 -46
  166. package/lib/components/VInput/VInput.css +131 -142
  167. package/lib/components/VInput/VInput.mjs +1 -1
  168. package/lib/components/VInput/index.d.mts +4 -37
  169. package/lib/components/VItemGroup/VItemGroup.css +7 -5
  170. package/lib/components/VItemGroup/index.d.mts +8 -65
  171. package/lib/components/VKbd/VKbd.css +13 -11
  172. package/lib/components/VKbd/index.d.mts +4 -18
  173. package/lib/components/VLabel/VLabel.css +16 -15
  174. package/lib/components/VLabel/index.d.mts +4 -20
  175. package/lib/components/VLayout/VLayout.css +10 -8
  176. package/lib/components/VLayout/VLayoutItem.css +8 -7
  177. package/lib/components/VLayout/index.d.mts +8 -48
  178. package/lib/components/VLazy/VLazy.mjs +1 -1
  179. package/lib/components/VLazy/index.d.mts +4 -31
  180. package/lib/components/VList/VList.css +104 -108
  181. package/lib/components/VList/VList.mjs +1 -1
  182. package/lib/components/VList/VList.sass +1 -1
  183. package/lib/components/VList/VListChildren.mjs +1 -1
  184. package/lib/components/VList/VListGroup.mjs +1 -1
  185. package/lib/components/VList/VListItem.css +440 -452
  186. package/lib/components/VList/VListItem.mjs +1 -1
  187. package/lib/components/VList/VListItem.sass +2 -1
  188. package/lib/components/VList/VListItemAction.mjs +1 -1
  189. package/lib/components/VList/VListItemMedia.mjs +1 -1
  190. package/lib/components/VList/VListItemSubtitle.mjs +1 -1
  191. package/lib/components/VList/index.d.mts +48 -291
  192. package/lib/components/VLocaleProvider/VLocaleProvider.css +4 -2
  193. package/lib/components/VLocaleProvider/index.d.mts +4 -21
  194. package/lib/components/VMain/VMain.css +32 -30
  195. package/lib/components/VMain/index.d.mts +4 -25
  196. package/lib/components/VMenu/VMenu.css +21 -19
  197. package/lib/components/VMenu/VMenu.mjs +1 -1
  198. package/lib/components/VMenu/index.d.mts +155 -397
  199. package/lib/components/VMessages/VMessages.css +17 -15
  200. package/lib/components/VMessages/index.d.mts +4 -27
  201. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +106 -108
  202. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -1
  203. package/lib/components/VNavigationDrawer/index.d.mts +7 -62
  204. package/lib/components/VOtpInput/VOtpInput.css +56 -58
  205. package/lib/components/VOtpInput/VOtpInput.mjs +1 -1
  206. package/lib/components/VOtpInput/index.d.mts +7 -52
  207. package/lib/components/VOverlay/VOverlay.css +60 -63
  208. package/lib/components/VOverlay/VOverlay.mjs +1 -1
  209. package/lib/components/VOverlay/VOverlay.sass +14 -13
  210. package/lib/components/VOverlay/index.d.mts +19 -101
  211. package/lib/components/VPagination/VPagination.css +10 -8
  212. package/lib/components/VPagination/VPagination.mjs +1 -1
  213. package/lib/components/VPagination/index.d.mts +4 -64
  214. package/lib/components/VParallax/VParallax.css +8 -6
  215. package/lib/components/VParallax/VParallax.mjs +1 -1
  216. package/lib/components/VParallax/index.d.mts +4 -27
  217. package/lib/components/VProgressCircular/VProgressCircular.css +95 -101
  218. package/lib/components/VProgressCircular/index.d.mts +4 -34
  219. package/lib/components/VProgressLinear/VProgressLinear.css +209 -222
  220. package/lib/components/VProgressLinear/index.d.mts +4 -54
  221. package/lib/components/VRadio/VRadio.mjs +1 -1
  222. package/lib/components/VRadio/index.d.mts +4 -68
  223. package/lib/components/VRadioGroup/VRadioGroup.css +14 -12
  224. package/lib/components/VRadioGroup/VRadioGroup.mjs +1 -1
  225. package/lib/components/VRadioGroup/index.d.mts +4 -48
  226. package/lib/components/VRangeSlider/VRangeSlider.mjs +1 -1
  227. package/lib/components/VRangeSlider/index.d.mts +4 -107
  228. package/lib/components/VRating/VRating.css +52 -53
  229. package/lib/components/VRating/VRating.mjs +1 -1
  230. package/lib/components/VRating/index.d.mts +4 -42
  231. package/lib/components/VResponsive/VResponsive.css +25 -26
  232. package/lib/components/VResponsive/index.d.mts +4 -29
  233. package/lib/components/VSelect/VSelect.css +54 -52
  234. package/lib/components/VSelect/VSelect.mjs +1 -1
  235. package/lib/components/VSelect/index.d.mts +200 -1352
  236. package/lib/components/VSelectionControl/VSelectionControl.css +100 -102
  237. package/lib/components/VSelectionControl/VSelectionControl.mjs +1 -1
  238. package/lib/components/VSelectionControl/index.d.mts +10 -37
  239. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +10 -8
  240. package/lib/components/VSelectionControlGroup/index.d.mts +4 -26
  241. package/lib/components/VSheet/VSheet.css +38 -36
  242. package/lib/components/VSheet/VSheet.mjs +1 -1
  243. package/lib/components/VSheet/index.d.mts +4 -32
  244. package/lib/components/VSkeletonLoader/VSkeletonLoader.css +225 -224
  245. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +1 -1
  246. package/lib/components/VSkeletonLoader/index.d.mts +4 -28
  247. package/lib/components/VSlideGroup/VSlideGroup.css +53 -55
  248. package/lib/components/VSlideGroup/index.d.mts +14 -70
  249. package/lib/components/VSlider/VSlider.css +53 -57
  250. package/lib/components/VSlider/VSlider.mjs +1 -1
  251. package/lib/components/VSlider/VSliderThumb.css +142 -153
  252. package/lib/components/VSlider/VSliderThumb.mjs +1 -1
  253. package/lib/components/VSlider/VSliderTrack.css +155 -174
  254. package/lib/components/VSlider/index.d.mts +4 -106
  255. package/lib/components/VSnackbar/VSnackbar.css +140 -140
  256. package/lib/components/VSnackbar/VSnackbar.mjs +1 -1
  257. package/lib/components/VSnackbar/index.d.mts +152 -398
  258. package/lib/components/VSparkline/VBarline.mjs +1 -2
  259. package/lib/components/VSparkline/VBarline.mjs.map +1 -1
  260. package/lib/components/VSparkline/VSparkline.mjs +1 -1
  261. package/lib/components/VSparkline/VTrendline.mjs +1 -2
  262. package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
  263. package/lib/components/VSparkline/index.d.mts +4 -49
  264. package/lib/components/VSpeedDial/VSpeedDial.css +43 -41
  265. package/lib/components/VSpeedDial/VSpeedDial.mjs +1 -1
  266. package/lib/components/VSpeedDial/index.d.mts +4 -85
  267. package/lib/components/VStepper/VStepper.css +55 -56
  268. package/lib/components/VStepper/VStepper.mjs +1 -1
  269. package/lib/components/VStepper/VStepperItem.css +112 -115
  270. package/lib/components/VStepper/VStepperItem.mjs +1 -1
  271. package/lib/components/VStepper/VStepperWindow.mjs +1 -1
  272. package/lib/components/VStepper/VStepperWindowItem.mjs +1 -1
  273. package/lib/components/VStepper/index.d.mts +24 -250
  274. package/lib/components/VSwitch/VSwitch.css +129 -139
  275. package/lib/components/VSwitch/VSwitch.mjs +1 -1
  276. package/lib/components/VSwitch/index.d.mts +4 -59
  277. package/lib/components/VSystemBar/VSystemBar.css +45 -43
  278. package/lib/components/VSystemBar/VSystemBar.mjs +1 -1
  279. package/lib/components/VSystemBar/index.d.mts +4 -28
  280. package/lib/components/VTable/VTable.css +140 -141
  281. package/lib/components/VTable/VTable.sass +4 -2
  282. package/lib/components/VTable/index.d.mts +4 -33
  283. package/lib/components/VTabs/VTab.css +30 -29
  284. package/lib/components/VTabs/VTab.mjs +1 -1
  285. package/lib/components/VTabs/VTabs.css +59 -65
  286. package/lib/components/VTabs/VTabs.mjs +1 -1
  287. package/lib/components/VTabs/VTabsWindow.mjs +1 -1
  288. package/lib/components/VTabs/VTabsWindowItem.mjs +1 -1
  289. package/lib/components/VTabs/index.d.mts +98 -394
  290. package/lib/components/VTextField/VTextField.css +65 -68
  291. package/lib/components/VTextField/VTextField.mjs +1 -1
  292. package/lib/components/VTextField/index.d.mts +152 -374
  293. package/lib/components/VTextarea/VTextarea.css +47 -39
  294. package/lib/components/VTextarea/VTextarea.mjs +1 -1
  295. package/lib/components/VTextarea/VTextarea.sass +4 -2
  296. package/lib/components/VTextarea/index.d.mts +71 -244
  297. package/lib/components/VThemeProvider/VThemeProvider.css +5 -3
  298. package/lib/components/VThemeProvider/index.d.mts +4 -20
  299. package/lib/components/VTimeline/VTimeline.css +379 -418
  300. package/lib/components/VTimeline/VTimeline.mjs +1 -1
  301. package/lib/components/VTimeline/VTimelineDivider.mjs +1 -1
  302. package/lib/components/VTimeline/VTimelineItem.mjs +1 -1
  303. package/lib/components/VTimeline/index.d.mts +8 -75
  304. package/lib/components/VToolbar/VToolbar.css +136 -143
  305. package/lib/components/VToolbar/VToolbar.mjs +1 -1
  306. package/lib/components/VToolbar/index.d.mts +12 -90
  307. package/lib/components/VTooltip/VTooltip.css +25 -21
  308. package/lib/components/VTooltip/VTooltip.mjs +1 -1
  309. package/lib/components/VTooltip/VTooltip.sass +8 -6
  310. package/lib/components/VTooltip/index.d.mts +147 -386
  311. package/lib/components/VValidation/index.d.mts +10 -24
  312. package/lib/components/VVirtualScroll/VVirtualScroll.css +11 -9
  313. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +1 -1
  314. package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +1 -1
  315. package/lib/components/VVirtualScroll/index.d.mts +4 -15
  316. package/lib/components/VWindow/VWindow.css +73 -70
  317. package/lib/components/VWindow/VWindow.mjs +1 -1
  318. package/lib/components/VWindow/VWindowItem.mjs +1 -1
  319. package/lib/components/VWindow/index.d.mts +8 -47
  320. package/lib/components/index.d.mts +2950 -12134
  321. package/lib/components/transitions/dialog-transition.mjs +1 -2
  322. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  323. package/lib/components/transitions/index.d.mts +64 -309
  324. package/lib/composables/icons.mjs +1 -1
  325. package/lib/composables/theme.mjs +4 -4
  326. package/lib/composables/theme.mjs.map +1 -1
  327. package/lib/composables/variant.mjs +1 -1
  328. package/lib/composables/virtual.mjs +1 -1
  329. package/lib/composables/virtual.mjs.map +1 -1
  330. package/lib/directives/ripple/VRipple.css +38 -36
  331. package/lib/entry-bundler.mjs +1 -1
  332. package/lib/entry-bundler.mjs.map +1 -1
  333. package/lib/framework.mjs +1 -1
  334. package/lib/framework.mjs.map +1 -1
  335. package/lib/index.d.mts +51 -51
  336. package/lib/labs/VCalendar/VCalendar.css +219 -225
  337. package/lib/labs/VCalendar/VCalendar.mjs +1 -1
  338. package/lib/labs/VCalendar/VCalendarDay.css +33 -32
  339. package/lib/labs/VCalendar/VCalendarDay.mjs +1 -1
  340. package/lib/labs/VCalendar/VCalendarHeader.css +13 -13
  341. package/lib/labs/VCalendar/VCalendarInterval.css +43 -42
  342. package/lib/labs/VCalendar/VCalendarIntervalEvent.css +7 -5
  343. package/lib/labs/VCalendar/VCalendarMonthDay.css +61 -58
  344. package/lib/labs/VCalendar/VCalendarMonthDay.sass +3 -2
  345. package/lib/labs/VCalendar/index.d.mts +24 -211
  346. package/lib/labs/VDateInput/VDateInput.mjs +1 -1
  347. package/lib/labs/VDateInput/index.d.mts +4 -115
  348. package/lib/labs/VNumberInput/VNumberInput.css +40 -38
  349. package/lib/labs/VNumberInput/VNumberInput.mjs +1 -1
  350. package/lib/labs/VNumberInput/index.d.mts +577 -1280
  351. package/lib/labs/VPicker/VPicker.css +53 -57
  352. package/lib/labs/VPicker/VPicker.mjs +1 -1
  353. package/lib/labs/VPicker/index.d.mts +8 -63
  354. package/lib/labs/VPullToRefresh/index.d.mts +4 -35
  355. package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs +1 -1
  356. package/lib/labs/VSnackbarQueue/index.d.mts +156 -453
  357. package/lib/labs/VStepperVertical/VStepperVertical.mjs +1 -1
  358. package/lib/labs/VStepperVertical/VStepperVerticalActions.mjs +1 -1
  359. package/lib/labs/VStepperVertical/VStepperVerticalItem.mjs +1 -1
  360. package/lib/labs/VStepperVertical/index.d.mts +12 -227
  361. package/lib/labs/VTimePicker/VTimePicker.css +9 -7
  362. package/lib/labs/VTimePicker/VTimePicker.mjs +1 -1
  363. package/lib/labs/VTimePicker/VTimePickerClock.css +126 -129
  364. package/lib/labs/VTimePicker/VTimePickerControls.css +102 -103
  365. package/lib/labs/VTimePicker/VTimePickerControls.mjs +1 -1
  366. package/lib/labs/VTimePicker/index.d.mts +12 -122
  367. package/lib/labs/VTreeview/VTreeview.mjs +1 -1
  368. package/lib/labs/VTreeview/VTreeviewChildren.mjs +1 -1
  369. package/lib/labs/VTreeview/VTreeviewGroup.mjs +1 -1
  370. package/lib/labs/VTreeview/VTreeviewItem.css +17 -15
  371. package/lib/labs/VTreeview/VTreeviewItem.mjs +1 -1
  372. package/lib/labs/VTreeview/VTreeviewItem.sass +2 -1
  373. package/lib/labs/VTreeview/index.d.mts +18 -205
  374. package/lib/labs/components.d.mts +1015 -2912
  375. package/lib/styles/elements/_global.sass +1 -1
  376. package/lib/styles/generic/_colors.scss +3 -3
  377. package/lib/styles/generic/_layers.scss +13 -1
  378. package/lib/styles/generic/_transitions.scss +32 -32
  379. package/lib/styles/main.css +14667 -16140
  380. package/lib/styles/settings/_utilities.scss +0 -5
  381. package/lib/styles/settings/_variables.scss +1 -2
  382. package/lib/styles/tools/_border.sass +4 -4
  383. package/lib/styles/tools/_display.sass +0 -10
  384. package/lib/styles/tools/_elevation.sass +2 -2
  385. package/lib/styles/tools/_index.sass +0 -2
  386. package/lib/styles/tools/_layer.scss +4 -2
  387. package/lib/styles/tools/_position.sass +2 -2
  388. package/lib/styles/tools/_rounded.sass +2 -2
  389. package/lib/styles/tools/_utilities.sass +1 -5
  390. package/lib/styles/utilities/_elevation.scss +1 -1
  391. package/package.json +5 -4
  392. package/lib/styles/tools/_bootable.sass +0 -3
  393. package/lib/styles/tools/_radius.sass +0 -10
@@ -1,4 +1,4 @@
1
- import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
1
+ import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  // Icons
3
3
  import { aliases, mdi } from "../iconsets/mdi.mjs"; // Utilities
4
4
  import { computed, inject, unref } from 'vue';
@@ -159,15 +159,15 @@ export function createTheme(options) {
159
159
  const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
160
160
  for (const key of colors) {
161
161
  if (/^on-[a-z]/.test(key)) {
162
- createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
162
+ createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key}))`]);
163
163
  } else {
164
- createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]);
165
- createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
164
+ createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key}))`, `color: rgb(var(--v-theme-on-${key}))`]);
165
+ createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key}))`]);
166
166
  createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`]);
167
167
  }
168
168
  }
169
169
  lines.push(...bgLines, ...fgLines);
170
- return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
170
+ return '@layer vuetify.theme {\n' + lines.map(v => ` ${v}`).join('') + '\n}';
171
171
  });
172
172
  function getHead() {
173
173
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"theme.mjs","names":["computed","inject","provide","ref","watch","watchEffect","createRange","darken","getCurrentInstance","getForeground","getLuma","IN_BROWSER","lighten","mergeDeep","parseColor","propsFactory","RGBtoHex","ThemeSymbol","Symbol","for","makeThemeProps","theme","String","genDefaults","defaultTheme","variations","colors","themes","light","dark","background","surface","primary","secondary","error","info","success","warning","variables","parseThemeOptions","options","arguments","length","undefined","defaults","isDisabled","key","Object","entries","createTheme","parsedOptions","name","computedThemes","acc","original","value","color","variation","fn","amount","keys","test","onColor","colorVal","current","styles","lines","createCssClass","genCssVariables","themeName","bgLines","fgLines","Set","values","flatMap","push","map","str","i","join","getHead","style","children","id","nonce","cspNonce","install","app","head","_context","provides","usehead","entry","patch","addHeadObjs","updateDOM","styleEl","document","getElementById","updateStyles","immediate","el","createElement","type","setAttribute","appendChild","innerHTML","themeClasses","global","provideTheme","props","Error","newTheme","useTheme","selector","content","line","lightOverlay","darkOverlay","rgb","r","g","b","startsWith"],"sources":["../../src/composables/theme.ts"],"sourcesContent":["// Utilities\nimport {\n computed,\n inject,\n provide,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n createRange,\n darken,\n getCurrentInstance,\n getForeground,\n getLuma,\n IN_BROWSER,\n lighten,\n mergeDeep,\n parseColor,\n propsFactory,\n RGBtoHex,\n} from '@/util'\n\n// Types\nimport type { VueHeadClient } from '@unhead/vue'\nimport type { HeadClient } from '@vueuse/head'\nimport type { App, DeepReadonly, InjectionKey, Ref } from 'vue'\n\ntype DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T\n\nexport type ThemeOptions = false | {\n cspNonce?: string\n defaultTheme?: string\n variations?: false | VariationsOptions\n themes?: Record<string, ThemeDefinition>\n}\nexport type ThemeDefinition = DeepPartial<InternalThemeDefinition>\n\ninterface InternalThemeOptions {\n cspNonce?: string\n isDisabled: boolean\n defaultTheme: string\n variations: false | VariationsOptions\n themes: Record<string, InternalThemeDefinition>\n}\n\ninterface VariationsOptions {\n colors: string[]\n lighten: number\n darken: number\n}\n\ninterface InternalThemeDefinition {\n dark: boolean\n colors: Colors\n variables: Record<string, string | number>\n}\n\nexport interface Colors extends BaseColors, OnColors {\n [key: string]: string\n}\n\ninterface BaseColors {\n background: string\n surface: string\n primary: string\n secondary: string\n success: string\n warning: string\n error: string\n info: string\n}\n\ninterface OnColors {\n 'on-background': string\n 'on-surface': string\n 'on-primary': string\n 'on-secondary': string\n 'on-success': string\n 'on-warning': string\n 'on-error': string\n 'on-info': string\n}\n\nexport interface ThemeInstance {\n readonly isDisabled: boolean\n readonly themes: Ref<Record<string, InternalThemeDefinition>>\n\n readonly name: Readonly<Ref<string>>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>\n\n readonly themeClasses: Readonly<Ref<string | undefined>>\n readonly styles: Readonly<Ref<string>>\n\n readonly global: {\n readonly name: Ref<string>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n }\n}\n\nexport const ThemeSymbol: InjectionKey<ThemeInstance> = Symbol.for('vuetify:theme')\n\nexport const makeThemeProps = propsFactory({\n theme: String,\n}, 'theme')\n\nfunction genDefaults () {\n return {\n defaultTheme: 'light',\n variations: { colors: [], lighten: 0, darken: 0 },\n themes: {\n light: {\n dark: false,\n colors: {\n background: '#FFFFFF',\n surface: '#FFFFFF',\n 'surface-bright': '#FFFFFF',\n 'surface-light': '#EEEEEE',\n 'surface-variant': '#424242',\n 'on-surface-variant': '#EEEEEE',\n primary: '#1867C0',\n 'primary-darken-1': '#1F5592',\n secondary: '#48A9A6',\n 'secondary-darken-1': '#018786',\n error: '#B00020',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#000000',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 0.87,\n 'medium-emphasis-opacity': 0.60,\n 'disabled-opacity': 0.38,\n 'idle-opacity': 0.04,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.12,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#F5F5F5',\n 'theme-on-code': '#000000',\n },\n },\n dark: {\n dark: true,\n colors: {\n background: '#121212',\n surface: '#212121',\n 'surface-bright': '#ccbfd6',\n 'surface-light': '#424242',\n 'surface-variant': '#a3a3a3',\n 'on-surface-variant': '#424242',\n primary: '#2196F3',\n 'primary-darken-1': '#277CC1',\n secondary: '#54B6B2',\n 'secondary-darken-1': '#48A9A6',\n error: '#CF6679',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#FFFFFF',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 1,\n 'medium-emphasis-opacity': 0.70,\n 'disabled-opacity': 0.50,\n 'idle-opacity': 0.10,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.16,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#343434',\n 'theme-on-code': '#CCCCCC',\n },\n },\n },\n }\n}\n\nfunction parseThemeOptions (options: ThemeOptions = genDefaults()): InternalThemeOptions {\n const defaults = genDefaults()\n\n if (!options) return { ...defaults, isDisabled: true } as any\n\n const themes: Record<string, InternalThemeDefinition> = {}\n for (const [key, theme] of Object.entries(options.themes ?? {})) {\n const defaultTheme = theme.dark || key === 'dark'\n ? defaults.themes?.dark\n : defaults.themes?.light\n themes[key] = mergeDeep(defaultTheme, theme) as InternalThemeDefinition\n }\n\n return mergeDeep(\n defaults,\n { ...options, themes },\n ) as InternalThemeOptions\n}\n\n// Composables\nexport function createTheme (options?: ThemeOptions): ThemeInstance & { install: (app: App) => void } {\n const parsedOptions = parseThemeOptions(options)\n const name = ref(parsedOptions.defaultTheme)\n const themes = ref(parsedOptions.themes)\n\n const computedThemes = computed(() => {\n const acc: Record<string, InternalThemeDefinition> = {}\n for (const [name, original] of Object.entries(themes.value)) {\n const theme: InternalThemeDefinition = acc[name] = {\n ...original,\n colors: {\n ...original.colors,\n },\n }\n\n if (parsedOptions.variations) {\n for (const name of parsedOptions.variations.colors) {\n const color = theme.colors[name]\n\n if (!color) continue\n\n for (const variation of (['lighten', 'darken'] as const)) {\n const fn = variation === 'lighten' ? lighten : darken\n for (const amount of createRange(parsedOptions.variations[variation], 1)) {\n theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount))\n }\n }\n }\n }\n\n for (const color of Object.keys(theme.colors)) {\n if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue\n\n const onColor = `on-${color}` as keyof OnColors\n const colorVal = parseColor(theme.colors[color]!)\n\n theme.colors[onColor] = getForeground(colorVal)\n }\n }\n\n return acc\n })\n const current = computed(() => computedThemes.value[name.value])\n\n const styles = computed(() => {\n const lines: string[] = []\n\n if (current.value?.dark) {\n createCssClass(lines, ':root', ['color-scheme: dark'])\n }\n\n createCssClass(lines, ':root', genCssVariables(current.value))\n\n for (const [themeName, theme] of Object.entries(computedThemes.value)) {\n createCssClass(lines, `.v-theme--${themeName}`, [\n `color-scheme: ${theme.dark ? 'dark' : 'normal'}`,\n ...genCssVariables(theme),\n ])\n }\n\n const bgLines: string[] = []\n const fgLines: string[] = []\n\n const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)))\n for (const key of colors) {\n if (/^on-[a-z]/.test(key)) {\n createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`])\n } else {\n createCssClass(bgLines, `.bg-${key}`, [\n `--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`,\n `background-color: rgb(var(--v-theme-${key})) !important`,\n `color: rgb(var(--v-theme-on-${key})) !important`,\n ])\n createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`])\n createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`])\n }\n }\n\n lines.push(...bgLines, ...fgLines)\n\n return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('')\n })\n\n function getHead () {\n return {\n style: [{\n children: styles.value,\n id: 'vuetify-theme-stylesheet',\n nonce: parsedOptions.cspNonce || false as never,\n }],\n }\n }\n\n function install (app: App) {\n if (parsedOptions.isDisabled) return\n\n const head = app._context.provides.usehead as HeadClient & VueHeadClient<any> | undefined\n if (head) {\n if (head.push) {\n const entry = head.push(getHead)\n if (IN_BROWSER) {\n watch(styles, () => { entry.patch(getHead) })\n }\n } else {\n if (IN_BROWSER) {\n head.addHeadObjs(computed(getHead))\n watchEffect(() => head.updateDOM())\n } else {\n head.addHeadObjs(getHead())\n }\n }\n } else {\n let styleEl = IN_BROWSER\n ? document.getElementById('vuetify-theme-stylesheet')\n : null\n\n if (IN_BROWSER) {\n watch(styles, updateStyles, { immediate: true })\n } else {\n updateStyles()\n }\n\n function updateStyles () {\n if (typeof document !== 'undefined' && !styleEl) {\n const el = document.createElement('style')\n el.type = 'text/css'\n el.id = 'vuetify-theme-stylesheet'\n if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce)\n\n styleEl = el\n document.head.appendChild(styleEl)\n }\n\n if (styleEl) styleEl.innerHTML = styles.value\n }\n }\n }\n\n const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`)\n\n return {\n install,\n isDisabled: parsedOptions.isDisabled,\n name,\n themes,\n current,\n computedThemes,\n themeClasses,\n styles,\n global: {\n name,\n current,\n },\n }\n}\n\nexport function provideTheme (props: { theme?: string }) {\n getCurrentInstance('provideTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n const name = computed<string>(() => {\n return props.theme ?? theme.name.value\n })\n const current = computed(() => theme.themes.value[name.value])\n\n const themeClasses = computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`)\n\n const newTheme: ThemeInstance = {\n ...theme,\n name,\n current,\n themeClasses,\n }\n\n provide(ThemeSymbol, newTheme)\n\n return newTheme\n}\n\nexport function useTheme () {\n getCurrentInstance('useTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n return theme\n}\n\nfunction createCssClass (lines: string[], selector: string, content: string[]) {\n lines.push(\n `${selector} {\\n`,\n ...content.map(line => ` ${line};\\n`),\n '}\\n',\n )\n}\n\nfunction genCssVariables (theme: InternalThemeDefinition) {\n const lightOverlay = theme.dark ? 2 : 1\n const darkOverlay = theme.dark ? 1 : 2\n\n const variables: string[] = []\n for (const [key, value] of Object.entries(theme.colors)) {\n const rgb = parseColor(value)\n variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`)\n if (!key.startsWith('on-')) {\n variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`)\n }\n }\n\n for (const [key, value] of Object.entries(theme.variables)) {\n const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined\n const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined\n variables.push(`--v-${key}: ${rgb ?? value}`)\n }\n\n return variables\n}\n"],"mappings":"AAAA;AACA,SACEA,QAAQ,EACRC,MAAM,EACNC,OAAO,EACPC,GAAG,EACHC,KAAK,EACLC,WAAW,QACN,KAAK;AAAA,SAEVC,WAAW,EACXC,MAAM,EACNC,kBAAkB,EAClBC,aAAa,EACbC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,QAAQ,6BAGV;AA8EA,OAAO,MAAMC,WAAwC,GAAGC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AAEnF,OAAO,MAAMC,cAAc,GAAGL,YAAY,CAAC;EACzCM,KAAK,EAAEC;AACT,CAAC,EAAE,OAAO,CAAC;AAEX,SAASC,WAAWA,CAAA,EAAI;EACtB,OAAO;IACLC,YAAY,EAAE,OAAO;IACrBC,UAAU,EAAE;MAAEC,MAAM,EAAE,EAAE;MAAEd,OAAO,EAAE,CAAC;MAAEL,MAAM,EAAE;IAAE,CAAC;IACjDoB,MAAM,EAAE;MACNC,KAAK,EAAE;QACLC,IAAI,EAAE,KAAK;QACXH,MAAM,EAAE;UACNI,UAAU,EAAE,SAAS;UACrBC,OAAO,EAAE,SAAS;UAClB,gBAAgB,EAAE,SAAS;UAC3B,eAAe,EAAE,SAAS;UAC1B,iBAAiB,EAAE,SAAS;UAC5B,oBAAoB,EAAE,SAAS;UAC/BC,OAAO,EAAE,SAAS;UAClB,kBAAkB,EAAE,SAAS;UAC7BC,SAAS,EAAE,SAAS;UACpB,oBAAoB,EAAE,SAAS;UAC/BC,KAAK,EAAE,SAAS;UAChBC,IAAI,EAAE,SAAS;UACfC,OAAO,EAAE,SAAS;UAClBC,OAAO,EAAE;QACX,CAAC;QACDC,SAAS,EAAE;UACT,cAAc,EAAE,SAAS;UACzB,gBAAgB,EAAE,IAAI;UACtB,uBAAuB,EAAE,IAAI;UAC7B,yBAAyB,E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KjE,KAAK,CAACkE,CAAC,EAAE,GAAG/E,SAAS;IACpEL,SAAS,CAACqC,IAAI,CAAC,OAAO7B,GAAG,KAAKyE,GAAG,IAAIhE,KAAK,EAAE,CAAC;EAC/C;EAEA,OAAOjB,SAAS;AAClB","ignoreList":[]}
1
+ {"version":3,"file":"theme.mjs","names":["computed","inject","provide","ref","watch","watchEffect","createRange","darken","getCurrentInstance","getForeground","getLuma","IN_BROWSER","lighten","mergeDeep","parseColor","propsFactory","RGBtoHex","ThemeSymbol","Symbol","for","makeThemeProps","theme","String","genDefaults","defaultTheme","variations","colors","themes","light","dark","background","surface","primary","secondary","error","info","success","warning","variables","parseThemeOptions","options","arguments","length","undefined","defaults","isDisabled","key","Object","entries","createTheme","parsedOptions","name","computedThemes","acc","original","value","color","variation","fn","amount","keys","test","onColor","colorVal","current","styles","lines","createCssClass","genCssVariables","themeName","bgLines","fgLines","Set","values","flatMap","push","map","v","join","getHead","style","children","id","nonce","cspNonce","install","app","head","_context","provides","usehead","entry","patch","addHeadObjs","updateDOM","styleEl","document","getElementById","updateStyles","immediate","el","createElement","type","setAttribute","appendChild","innerHTML","themeClasses","global","provideTheme","props","Error","newTheme","useTheme","selector","content","line","lightOverlay","darkOverlay","rgb","r","g","b","startsWith"],"sources":["../../src/composables/theme.ts"],"sourcesContent":["// Utilities\nimport {\n computed,\n inject,\n provide,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n createRange,\n darken,\n getCurrentInstance,\n getForeground,\n getLuma,\n IN_BROWSER,\n lighten,\n mergeDeep,\n parseColor,\n propsFactory,\n RGBtoHex,\n} from '@/util'\n\n// Types\nimport type { VueHeadClient } from '@unhead/vue'\nimport type { HeadClient } from '@vueuse/head'\nimport type { App, DeepReadonly, InjectionKey, Ref } from 'vue'\n\ntype DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T\n\nexport type ThemeOptions = false | {\n cspNonce?: string\n defaultTheme?: string\n variations?: false | VariationsOptions\n themes?: Record<string, ThemeDefinition>\n}\nexport type ThemeDefinition = DeepPartial<InternalThemeDefinition>\n\ninterface InternalThemeOptions {\n cspNonce?: string\n isDisabled: boolean\n defaultTheme: string\n variations: false | VariationsOptions\n themes: Record<string, InternalThemeDefinition>\n}\n\ninterface VariationsOptions {\n colors: string[]\n lighten: number\n darken: number\n}\n\ninterface InternalThemeDefinition {\n dark: boolean\n colors: Colors\n variables: Record<string, string | number>\n}\n\nexport interface Colors extends BaseColors, OnColors {\n [key: string]: string\n}\n\ninterface BaseColors {\n background: string\n surface: string\n primary: string\n secondary: string\n success: string\n warning: string\n error: string\n info: string\n}\n\ninterface OnColors {\n 'on-background': string\n 'on-surface': string\n 'on-primary': string\n 'on-secondary': string\n 'on-success': string\n 'on-warning': string\n 'on-error': string\n 'on-info': string\n}\n\nexport interface ThemeInstance {\n readonly isDisabled: boolean\n readonly themes: Ref<Record<string, InternalThemeDefinition>>\n\n readonly name: Readonly<Ref<string>>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>\n\n readonly themeClasses: Readonly<Ref<string | undefined>>\n readonly styles: Readonly<Ref<string>>\n\n readonly global: {\n readonly name: Ref<string>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n }\n}\n\nexport const ThemeSymbol: InjectionKey<ThemeInstance> = Symbol.for('vuetify:theme')\n\nexport const makeThemeProps = propsFactory({\n theme: String,\n}, 'theme')\n\nfunction genDefaults () {\n return {\n defaultTheme: 'light',\n variations: { colors: [], lighten: 0, darken: 0 },\n themes: {\n light: {\n dark: false,\n colors: {\n background: '#FFFFFF',\n surface: '#FFFFFF',\n 'surface-bright': '#FFFFFF',\n 'surface-light': '#EEEEEE',\n 'surface-variant': '#424242',\n 'on-surface-variant': '#EEEEEE',\n primary: '#1867C0',\n 'primary-darken-1': '#1F5592',\n secondary: '#48A9A6',\n 'secondary-darken-1': '#018786',\n error: '#B00020',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#000000',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 0.87,\n 'medium-emphasis-opacity': 0.60,\n 'disabled-opacity': 0.38,\n 'idle-opacity': 0.04,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.12,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#F5F5F5',\n 'theme-on-code': '#000000',\n },\n },\n dark: {\n dark: true,\n colors: {\n background: '#121212',\n surface: '#212121',\n 'surface-bright': '#ccbfd6',\n 'surface-light': '#424242',\n 'surface-variant': '#a3a3a3',\n 'on-surface-variant': '#424242',\n primary: '#2196F3',\n 'primary-darken-1': '#277CC1',\n secondary: '#54B6B2',\n 'secondary-darken-1': '#48A9A6',\n error: '#CF6679',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#FFFFFF',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 1,\n 'medium-emphasis-opacity': 0.70,\n 'disabled-opacity': 0.50,\n 'idle-opacity': 0.10,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.16,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#343434',\n 'theme-on-code': '#CCCCCC',\n },\n },\n },\n }\n}\n\nfunction parseThemeOptions (options: ThemeOptions = genDefaults()): InternalThemeOptions {\n const defaults = genDefaults()\n\n if (!options) return { ...defaults, isDisabled: true } as any\n\n const themes: Record<string, InternalThemeDefinition> = {}\n for (const [key, theme] of Object.entries(options.themes ?? {})) {\n const defaultTheme = theme.dark || key === 'dark'\n ? defaults.themes?.dark\n : defaults.themes?.light\n themes[key] = mergeDeep(defaultTheme, theme) as InternalThemeDefinition\n }\n\n return mergeDeep(\n defaults,\n { ...options, themes },\n ) as InternalThemeOptions\n}\n\n// Composables\nexport function createTheme (options?: ThemeOptions): ThemeInstance & { install: (app: App) => void } {\n const parsedOptions = parseThemeOptions(options)\n const name = ref(parsedOptions.defaultTheme)\n const themes = ref(parsedOptions.themes)\n\n const computedThemes = computed(() => {\n const acc: Record<string, InternalThemeDefinition> = {}\n for (const [name, original] of Object.entries(themes.value)) {\n const theme: InternalThemeDefinition = acc[name] = {\n ...original,\n colors: {\n ...original.colors,\n },\n }\n\n if (parsedOptions.variations) {\n for (const name of parsedOptions.variations.colors) {\n const color = theme.colors[name]\n\n if (!color) continue\n\n for (const variation of (['lighten', 'darken'] as const)) {\n const fn = variation === 'lighten' ? lighten : darken\n for (const amount of createRange(parsedOptions.variations[variation], 1)) {\n theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount))\n }\n }\n }\n }\n\n for (const color of Object.keys(theme.colors)) {\n if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue\n\n const onColor = `on-${color}` as keyof OnColors\n const colorVal = parseColor(theme.colors[color]!)\n\n theme.colors[onColor] = getForeground(colorVal)\n }\n }\n\n return acc\n })\n const current = computed(() => computedThemes.value[name.value])\n\n const styles = computed(() => {\n const lines: string[] = []\n\n if (current.value?.dark) {\n createCssClass(lines, ':root', ['color-scheme: dark'])\n }\n\n createCssClass(lines, ':root', genCssVariables(current.value))\n\n for (const [themeName, theme] of Object.entries(computedThemes.value)) {\n createCssClass(lines, `.v-theme--${themeName}`, [\n `color-scheme: ${theme.dark ? 'dark' : 'normal'}`,\n ...genCssVariables(theme),\n ])\n }\n\n const bgLines: string[] = []\n const fgLines: string[] = []\n\n const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)))\n for (const key of colors) {\n if (/^on-[a-z]/.test(key)) {\n createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key}))`])\n } else {\n createCssClass(bgLines, `.bg-${key}`, [\n `--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`,\n `background-color: rgb(var(--v-theme-${key}))`,\n `color: rgb(var(--v-theme-on-${key}))`,\n ])\n createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key}))`])\n createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`])\n }\n }\n\n lines.push(...bgLines, ...fgLines)\n\n return '@layer vuetify.theme {\\n' + lines.map(v => ` ${v}`).join('') + '\\n}'\n })\n\n function getHead () {\n return {\n style: [{\n children: styles.value,\n id: 'vuetify-theme-stylesheet',\n nonce: parsedOptions.cspNonce || false as never,\n }],\n }\n }\n\n function install (app: App) {\n if (parsedOptions.isDisabled) return\n\n const head = app._context.provides.usehead as HeadClient & VueHeadClient<any> | undefined\n if (head) {\n if (head.push) {\n const entry = head.push(getHead)\n if (IN_BROWSER) {\n watch(styles, () => { entry.patch(getHead) })\n }\n } else {\n if (IN_BROWSER) {\n head.addHeadObjs(computed(getHead))\n watchEffect(() => head.updateDOM())\n } else {\n head.addHeadObjs(getHead())\n }\n }\n } else {\n let styleEl = IN_BROWSER\n ? document.getElementById('vuetify-theme-stylesheet')\n : null\n\n if (IN_BROWSER) {\n watch(styles, updateStyles, { immediate: true })\n } else {\n updateStyles()\n }\n\n function updateStyles () {\n if (typeof document !== 'undefined' && !styleEl) {\n const el = document.createElement('style')\n el.type = 'text/css'\n el.id = 'vuetify-theme-stylesheet'\n if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce)\n\n styleEl = el\n document.head.appendChild(styleEl)\n }\n\n if (styleEl) styleEl.innerHTML = styles.value\n }\n }\n }\n\n const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`)\n\n return {\n install,\n isDisabled: parsedOptions.isDisabled,\n name,\n themes,\n current,\n computedThemes,\n themeClasses,\n styles,\n global: {\n name,\n current,\n },\n }\n}\n\nexport function provideTheme (props: { theme?: string }) {\n getCurrentInstance('provideTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n const name = computed<string>(() => {\n return props.theme ?? theme.name.value\n })\n const current = computed(() => theme.themes.value[name.value])\n\n const themeClasses = computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`)\n\n const newTheme: ThemeInstance = {\n ...theme,\n name,\n current,\n themeClasses,\n }\n\n provide(ThemeSymbol, newTheme)\n\n return newTheme\n}\n\nexport function useTheme () {\n getCurrentInstance('useTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n return theme\n}\n\nfunction createCssClass (lines: string[], selector: string, content: string[]) {\n lines.push(\n `${selector} {\\n`,\n ...content.map(line => ` ${line};\\n`),\n '}\\n',\n )\n}\n\nfunction genCssVariables (theme: InternalThemeDefinition) {\n const lightOverlay = theme.dark ? 2 : 1\n const darkOverlay = theme.dark ? 1 : 2\n\n const variables: string[] = []\n for (const [key, value] of Object.entries(theme.colors)) {\n const rgb = parseColor(value)\n variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`)\n if (!key.startsWith('on-')) {\n variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`)\n }\n }\n\n for (const [key, value] of Object.entries(theme.variables)) {\n const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined\n const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined\n variables.push(`--v-${key}: ${rgb ?? value}`)\n }\n\n return variables\n}\n"],"mappings":"AAAA;AACA,SACEA,QAAQ,EACRC,MAAM,EACNC,OAAO,EACPC,GAAG,EACHC,KAAK,EACLC,WAAW,QACN,KAAK;AAAA,SAEVC,WAAW,EACXC,MAAM,EACNC,kBAAkB,EAClBC,aAAa,EACbC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,SAAS,EACT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tC,MAAMS,SAAmB,GAAG,EAAE;EAC9B,KAAK,MAAM,CAACQ,GAAG,EAAES,KAAK,CAAC,IAAIR,MAAM,CAACC,OAAO,CAAC3B,KAAK,CAACK,MAAM,CAAC,EAAE;IACvD,MAAM4F,GAAG,GAAGxG,UAAU,CAACyC,KAAK,CAAC;IAC7BjB,SAAS,CAACqC,IAAI,CAAC,aAAa7B,GAAG,KAAKwE,GAAG,CAACC,CAAC,IAAID,GAAG,CAACE,CAAC,IAAIF,GAAG,CAACG,CAAC,EAAE,CAAC;IAC9D,IAAI,CAAC3E,GAAG,CAAC4E,UAAU,CAAC,KAAK,CAAC,EAAE;MAC1BpF,SAAS,CAACqC,IAAI,CAAC,aAAa7B,GAAG,wBAAwBpC,OAAO,CAAC6C,KAAK,CAAC,GAAG,IAAI,GAAG6D,YAAY,GAAGC,WAAW,EAAE,CAAC;IAC9G;EACF;EAEA,KAAK,MAAM,CAACvE,GAAG,EAAES,KAAK,CAAC,IAAIR,MAAM,CAACC,OAAO,CAAC3B,KAAK,CAACiB,SAAS,CAAC,EAAE;IAC1D,MAAMkB,KAAK,GAAG,OAAOD,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACmE,UAAU,CAAC,GAAG,CAAC,GAAG5G,UAAU,CAACyC,KAAK,CAAC,GAAGZ,SAAS;IAChG,MAAM2E,GAAG,GAAG9D,KAAK,GAAG,GAAGA,KAAK,CAAC+D,CAAC,KAAK/D,KAAK,CAACgE,CAAC,KAAKhE,KAAK,CAACiE,CAAC,EAAE,GAAG9E,SAAS;IACpEL,SAAS,CAACqC,IAAI,CAAC,OAAO7B,GAAG,KAAKwE,GAAG,IAAI/D,KAAK,EAAE,CAAC;EAC/C;EAEA,OAAOjB,SAAS;AAClB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
1
+ import { Fragment as _Fragment, createVNode as _createVNode } from "vue";
2
2
  // Composables
3
3
  import { useColor } from "./color.mjs"; // Utilities
4
4
  import { computed, unref } from 'vue';
@@ -202,7 +202,7 @@ export function useVirtual(props, items) {
202
202
  updateOffsets.immediate();
203
203
  calculateVisibleItems();
204
204
  }, {
205
- deep: true
205
+ deep: 1
206
206
  });
207
207
  return {
208
208
  calculateVisibleItems,
@@ -1 +1 @@
1
- {"version":3,"file":"virtual.mjs","names":["useDisplay","useResizeObserver","computed","nextTick","onScopeDispose","ref","shallowRef","watch","watchEffect","clamp","debounce","IN_BROWSER","propsFactory","UP","DOWN","BUFFER_PX","makeVirtualProps","itemHeight","type","Number","String","default","height","useVirtual","props","items","display","value","parseFloat","first","last","Math","ceil","parseInt","paddingTop","paddingBottom","containerRef","markerRef","markerOffset","resizeRef","contentRect","viewportHeight","document","documentElement","hasInitialRender","sizes","Array","from","length","offsets","updateTime","targetScrollIndex","getSize","index","updateOffsets","start","performance","now","i","max","unwatch","v","offsetTop","immediate","calculateVisibleItems","window","requestAnimationFrame","scrollToIndex","clear","handleItemResize","prevHeight","prevMinHeight","min","calculateOffset","calculateIndex","scrollTop","binaryClosest","lastScrollTop","scrollVelocity","lastScrollTime","val","oldVal","handleScroll","scrollTime","scrollDeltaT","sign","handleScrollend","raf","cancelAnimationFrame","_calculateVisibleItems","direction","startPx","endPx","end","topOverflow","bottomOverflow","bufferOverflow","offset","computedItems","slice","map","item","raw","deep","arr","high","low","mid","target"],"sources":["../../src/composables/virtual.ts"],"sourcesContent":["// Composables\nimport { useDisplay } from '@/composables/display'\nimport { useResizeObserver } from '@/composables/resizeObserver'\n\n// Utilities\nimport { computed, nextTick, onScopeDispose, ref, shallowRef, watch, watchEffect } from 'vue'\nimport { clamp, debounce, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\n\nconst UP = -1\nconst DOWN = 1\n\n/** Determines how large each batch of items should be */\nconst BUFFER_PX = 100\n\ntype VirtualProps = {\n itemHeight?: number | string\n height?: number | string\n}\n\nexport const makeVirtualProps = propsFactory({\n itemHeight: {\n type: [Number, String],\n default: null,\n },\n height: [Number, String],\n}, 'virtual')\n\nexport function useVirtual <T> (props: VirtualProps, items: Ref<readonly T[]>) {\n const display = useDisplay()\n\n const itemHeight = shallowRef(0)\n watchEffect(() => {\n itemHeight.value = parseFloat(props.itemHeight || 0)\n })\n\n const first = shallowRef(0)\n const last = shallowRef(Math.ceil(\n // Assume 16px items filling the entire screen height if\n // not provided. This is probably incorrect but it minimises\n // the chance of ending up with empty space at the bottom.\n // The default value is set here to avoid poisoning getSize()\n (parseInt(props.height!) || display.height.value) / (itemHeight.value || 16)\n ) || 1)\n const paddingTop = shallowRef(0)\n const paddingBottom = shallowRef(0)\n\n /** The scrollable element */\n const containerRef = ref<HTMLElement>()\n /** An element marking the top of the scrollable area,\n * used to add an offset if there's padding or other elements above the virtual list */\n const markerRef = ref<HTMLElement>()\n /** markerRef's offsetTop, lazily evaluated */\n let markerOffset = 0\n\n const { resizeRef, contentRect } = useResizeObserver()\n watchEffect(() => {\n resizeRef.value = containerRef.value\n })\n const viewportHeight = computed(() => {\n return containerRef.value === document.documentElement\n ? display.height.value\n : contentRect.value?.height || parseInt(props.height!) || 0\n })\n /** All static elements have been rendered and we have an assumed item height */\n const hasInitialRender = computed(() => {\n return !!(containerRef.value && markerRef.value && viewportHeight.value && itemHeight.value)\n })\n\n let sizes = Array.from<number | null>({ length: items.value.length })\n let offsets = Array.from<number>({ length: items.value.length })\n const updateTime = shallowRef(0)\n let targetScrollIndex = -1\n\n function getSize (index: number) {\n return sizes[index] || itemHeight.value\n }\n\n const updateOffsets = debounce(() => {\n const start = performance.now()\n offsets[0] = 0\n const length = items.value.length\n for (let i = 1; i <= length - 1; i++) {\n offsets[i] = (offsets[i - 1] || 0) + getSize(i - 1)\n }\n updateTime.value = Math.max(updateTime.value, performance.now() - start)\n }, updateTime)\n\n const unwatch = watch(hasInitialRender, v => {\n if (!v) return\n // First render is complete, update offsets and visible\n // items in case our assumed item height was incorrect\n\n unwatch()\n markerOffset = markerRef.value!.offsetTop\n updateOffsets.immediate()\n calculateVisibleItems()\n\n if (!~targetScrollIndex) return\n\n nextTick(() => {\n IN_BROWSER && window.requestAnimationFrame(() => {\n scrollToIndex(targetScrollIndex)\n targetScrollIndex = -1\n })\n })\n })\n\n onScopeDispose(() => {\n updateOffsets.clear()\n })\n\n function handleItemResize (index: number, height: number) {\n const prevHeight = sizes[index]\n const prevMinHeight = itemHeight.value\n\n itemHeight.value = prevMinHeight ? Math.min(itemHeight.value, height) : height\n\n if (prevHeight !== height || prevMinHeight !== itemHeight.value) {\n sizes[index] = height\n updateOffsets()\n }\n }\n\n function calculateOffset (index: number) {\n index = clamp(index, 0, items.value.length - 1)\n return offsets[index] || 0\n }\n\n function calculateIndex (scrollTop: number) {\n return binaryClosest(offsets, scrollTop)\n }\n\n let lastScrollTop = 0\n let scrollVelocity = 0\n let lastScrollTime = 0\n\n watch(viewportHeight, (val, oldVal) => {\n if (oldVal) {\n calculateVisibleItems()\n if (val < oldVal) {\n requestAnimationFrame(() => {\n scrollVelocity = 0\n calculateVisibleItems()\n })\n }\n }\n })\n\n function handleScroll () {\n if (!containerRef.value || !markerRef.value) return\n\n const scrollTop = containerRef.value.scrollTop\n const scrollTime = performance.now()\n const scrollDeltaT = scrollTime - lastScrollTime\n\n if (scrollDeltaT > 500) {\n scrollVelocity = Math.sign(scrollTop - lastScrollTop)\n\n // Not super important, only update at the\n // start of a scroll sequence to avoid reflows\n markerOffset = markerRef.value.offsetTop\n } else {\n scrollVelocity = scrollTop - lastScrollTop\n }\n\n lastScrollTop = scrollTop\n lastScrollTime = scrollTime\n\n calculateVisibleItems()\n }\n function handleScrollend () {\n if (!containerRef.value || !markerRef.value) return\n\n scrollVelocity = 0\n lastScrollTime = 0\n\n calculateVisibleItems()\n }\n\n let raf = -1\n function calculateVisibleItems () {\n cancelAnimationFrame(raf)\n raf = requestAnimationFrame(_calculateVisibleItems)\n }\n function _calculateVisibleItems () {\n if (!containerRef.value || !viewportHeight.value) return\n const scrollTop = lastScrollTop - markerOffset\n const direction = Math.sign(scrollVelocity)\n\n const startPx = Math.max(0, scrollTop - BUFFER_PX)\n const start = clamp(calculateIndex(startPx), 0, items.value.length)\n\n const endPx = scrollTop + viewportHeight.value + BUFFER_PX\n const end = clamp(calculateIndex(endPx) + 1, start + 1, items.value.length)\n\n if (\n // Only update the side we're scrolling towards,\n // the other side will be updated incidentally\n (direction !== UP || start < first.value) &&\n (direction !== DOWN || end > last.value)\n ) {\n const topOverflow = calculateOffset(first.value) - calculateOffset(start)\n const bottomOverflow = calculateOffset(end) - calculateOffset(last.value)\n const bufferOverflow = Math.max(topOverflow, bottomOverflow)\n\n if (bufferOverflow > BUFFER_PX) {\n first.value = start\n last.value = end\n } else {\n // Only update the side that's reached its limit if there's still buffer left\n if (start <= 0) first.value = start\n if (end >= items.value.length) last.value = end\n }\n }\n\n paddingTop.value = calculateOffset(first.value)\n paddingBottom.value = calculateOffset(items.value.length) - calculateOffset(last.value)\n }\n\n function scrollToIndex (index: number) {\n const offset = calculateOffset(index)\n if (!containerRef.value || (index && !offset)) {\n targetScrollIndex = index\n } else {\n containerRef.value.scrollTop = offset\n }\n }\n\n const computedItems = computed(() => {\n return items.value.slice(first.value, last.value).map((item, index) => ({\n raw: item,\n index: index + first.value,\n }))\n })\n\n watch(items, () => {\n sizes = Array.from({ length: items.value.length })\n offsets = Array.from({ length: items.value.length })\n updateOffsets.immediate()\n calculateVisibleItems()\n }, { deep: true })\n\n return {\n calculateVisibleItems,\n containerRef,\n markerRef,\n computedItems,\n paddingTop,\n paddingBottom,\n scrollToIndex,\n handleScroll,\n handleScrollend,\n handleItemResize,\n }\n}\n\n// https://gist.github.com/robertleeplummerjr/1cc657191d34ecd0a324\nfunction binaryClosest (arr: ArrayLike<number>, val: number) {\n let high = arr.length - 1\n let low = 0\n let mid = 0\n let item = null\n let target = -1\n\n if (arr[high]! < val) {\n return high\n }\n\n while (low <= high) {\n mid = (low + high) >> 1\n item = arr[mid]!\n\n if (item > val) {\n high = mid - 1\n } else if (item < val) {\n target = mid\n low = mid + 1\n } else if (item === val) {\n return mid\n } else {\n return low\n }\n }\n\n return target\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU;AAAA,SACVC,iBAAiB,gCAE1B;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACpFC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,YAAY,6BAElD;AAGA,MAAMC,EAAE,GAAG,CAAC,CAAC;AACb,MAAMC,IAAI,GAAG,CAAC;;AAEd;AACA,MAAMC,SAAS,GAAG,GAAG;AAOrB,OAAO,MAAMC,gBAAgB,GAAGJ,YAAY,CAAC;EAC3CK,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE,CAACH,MAAM,EAAEC,MAAM;AACzB,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,SAASG,UAAUA,CAAMC,KAAmB,EAAEC,KAAwB,EAAE;EAC7E,MAAMC,OAAO,GAAG1B,UAAU,CAAC,CAAC;EAE5B,MAAMiB,UAAU,GAAGX,UAAU,CAAC,CAAC,CAAC;EAChCE,WAAW,CAAC,MAAM;IAChBS,UAAU,CAACU,KAAK,GAAGC,UAAU,CAACJ,KAAK,CAACP,UAAU,IAAI,CAAC,CAAC;EACtD,CAAC,CAAC;EAEF,MAAMY,KAAK,GAAGvB,UAAU,CAAC,CAAC,CAAC;EAC3B,MAAMwB,IAAI,GAAGxB,UAAU,CAACyB,IAAI,CAACC,IAAI;EAC/B;EACA;EACA;EACA;EACA,CAACC,QAAQ,CAACT,KAAK,CAACF,MAAO,CAAC,IAAII,OAAO,CAACJ,MAAM,CAACK,KAAK,KAAKV,UAAU,CAACU,KAAK,IAAI,EAAE,CAC7E,CAAC,IAAI,CAAC,CAAC;EACP,MAAM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;IACZI,eAAe;IACfjB;EACF,CAAC;AACH;;AAEA;AACA,SAASO,aAAaA,CAAE4B,GAAsB,EAAExB,GAAW,EAAE;EAC3D,IAAIyB,IAAI,GAAGD,GAAG,CAACxD,MAAM,GAAG,CAAC;EACzB,IAAI0D,GAAG,GAAG,CAAC;EACX,IAAIC,GAAG,GAAG,CAAC;EACX,IAAIN,IAAI,GAAG,IAAI;EACf,IAAIO,MAAM,GAAG,CAAC,CAAC;EAEf,IAAIJ,GAAG,CAACC,IAAI,CAAC,GAAIzB,GAAG,EAAE;IACpB,OAAOyB,IAAI;EACb;EAEA,OAAOC,GAAG,IAAID,IAAI,EAAE;IAClBE,GAAG,GAAID,GAAG,GAAGD,IAAI,IAAK,CAAC;IACvBJ,IAAI,GAAGG,GAAG,CAACG,GAAG,CAAE;IAEhB,IAAIN,IAAI,GAAGrB,GAAG,EAAE;MACdyB,IAAI,GAAGE,GAAG,GAAG,CAAC;IAChB,CAAC,MAAM,IAAIN,IAAI,GAAGrB,GAAG,EAAE;MACrB4B,MAAM,GAAGD,GAAG;MACZD,GAAG,GAAGC,GAAG,GAAG,CAAC;IACf,CAAC,MAAM,IAAIN,IAAI,KAAKrB,GAAG,EAAE;MACvB,OAAO2B,GAAG;IACZ,CAAC,MAAM;MACL,OAAOD,GAAG;IACZ;EACF;EAEA,OAAOE,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"file":"virtual.mjs","names":["useDisplay","useResizeObserver","computed","nextTick","onScopeDispose","ref","shallowRef","watch","watchEffect","clamp","debounce","IN_BROWSER","propsFactory","UP","DOWN","BUFFER_PX","makeVirtualProps","itemHeight","type","Number","String","default","height","useVirtual","props","items","display","value","parseFloat","first","last","Math","ceil","parseInt","paddingTop","paddingBottom","containerRef","markerRef","markerOffset","resizeRef","contentRect","viewportHeight","document","documentElement","hasInitialRender","sizes","Array","from","length","offsets","updateTime","targetScrollIndex","getSize","index","updateOffsets","start","performance","now","i","max","unwatch","v","offsetTop","immediate","calculateVisibleItems","window","requestAnimationFrame","scrollToIndex","clear","handleItemResize","prevHeight","prevMinHeight","min","calculateOffset","calculateIndex","scrollTop","binaryClosest","lastScrollTop","scrollVelocity","lastScrollTime","val","oldVal","handleScroll","scrollTime","scrollDeltaT","sign","handleScrollend","raf","cancelAnimationFrame","_calculateVisibleItems","direction","startPx","endPx","end","topOverflow","bottomOverflow","bufferOverflow","offset","computedItems","slice","map","item","raw","deep","arr","high","low","mid","target"],"sources":["../../src/composables/virtual.ts"],"sourcesContent":["// Composables\nimport { useDisplay } from '@/composables/display'\nimport { useResizeObserver } from '@/composables/resizeObserver'\n\n// Utilities\nimport { computed, nextTick, onScopeDispose, ref, shallowRef, watch, watchEffect } from 'vue'\nimport { clamp, debounce, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\n\nconst UP = -1\nconst DOWN = 1\n\n/** Determines how large each batch of items should be */\nconst BUFFER_PX = 100\n\ntype VirtualProps = {\n itemHeight?: number | string\n height?: number | string\n}\n\nexport const makeVirtualProps = propsFactory({\n itemHeight: {\n type: [Number, String],\n default: null,\n },\n height: [Number, String],\n}, 'virtual')\n\nexport function useVirtual <T> (props: VirtualProps, items: Ref<readonly T[]>) {\n const display = useDisplay()\n\n const itemHeight = shallowRef(0)\n watchEffect(() => {\n itemHeight.value = parseFloat(props.itemHeight || 0)\n })\n\n const first = shallowRef(0)\n const last = shallowRef(Math.ceil(\n // Assume 16px items filling the entire screen height if\n // not provided. This is probably incorrect but it minimises\n // the chance of ending up with empty space at the bottom.\n // The default value is set here to avoid poisoning getSize()\n (parseInt(props.height!) || display.height.value) / (itemHeight.value || 16)\n ) || 1)\n const paddingTop = shallowRef(0)\n const paddingBottom = shallowRef(0)\n\n /** The scrollable element */\n const containerRef = ref<HTMLElement>()\n /** An element marking the top of the scrollable area,\n * used to add an offset if there's padding or other elements above the virtual list */\n const markerRef = ref<HTMLElement>()\n /** markerRef's offsetTop, lazily evaluated */\n let markerOffset = 0\n\n const { resizeRef, contentRect } = useResizeObserver()\n watchEffect(() => {\n resizeRef.value = containerRef.value\n })\n const viewportHeight = computed(() => {\n return containerRef.value === document.documentElement\n ? display.height.value\n : contentRect.value?.height || parseInt(props.height!) || 0\n })\n /** All static elements have been rendered and we have an assumed item height */\n const hasInitialRender = computed(() => {\n return !!(containerRef.value && markerRef.value && viewportHeight.value && itemHeight.value)\n })\n\n let sizes = Array.from<number | null>({ length: items.value.length })\n let offsets = Array.from<number>({ length: items.value.length })\n const updateTime = shallowRef(0)\n let targetScrollIndex = -1\n\n function getSize (index: number) {\n return sizes[index] || itemHeight.value\n }\n\n const updateOffsets = debounce(() => {\n const start = performance.now()\n offsets[0] = 0\n const length = items.value.length\n for (let i = 1; i <= length - 1; i++) {\n offsets[i] = (offsets[i - 1] || 0) + getSize(i - 1)\n }\n updateTime.value = Math.max(updateTime.value, performance.now() - start)\n }, updateTime)\n\n const unwatch = watch(hasInitialRender, v => {\n if (!v) return\n // First render is complete, update offsets and visible\n // items in case our assumed item height was incorrect\n\n unwatch()\n markerOffset = markerRef.value!.offsetTop\n updateOffsets.immediate()\n calculateVisibleItems()\n\n if (!~targetScrollIndex) return\n\n nextTick(() => {\n IN_BROWSER && window.requestAnimationFrame(() => {\n scrollToIndex(targetScrollIndex)\n targetScrollIndex = -1\n })\n })\n })\n\n onScopeDispose(() => {\n updateOffsets.clear()\n })\n\n function handleItemResize (index: number, height: number) {\n const prevHeight = sizes[index]\n const prevMinHeight = itemHeight.value\n\n itemHeight.value = prevMinHeight ? Math.min(itemHeight.value, height) : height\n\n if (prevHeight !== height || prevMinHeight !== itemHeight.value) {\n sizes[index] = height\n updateOffsets()\n }\n }\n\n function calculateOffset (index: number) {\n index = clamp(index, 0, items.value.length - 1)\n return offsets[index] || 0\n }\n\n function calculateIndex (scrollTop: number) {\n return binaryClosest(offsets, scrollTop)\n }\n\n let lastScrollTop = 0\n let scrollVelocity = 0\n let lastScrollTime = 0\n\n watch(viewportHeight, (val, oldVal) => {\n if (oldVal) {\n calculateVisibleItems()\n if (val < oldVal) {\n requestAnimationFrame(() => {\n scrollVelocity = 0\n calculateVisibleItems()\n })\n }\n }\n })\n\n function handleScroll () {\n if (!containerRef.value || !markerRef.value) return\n\n const scrollTop = containerRef.value.scrollTop\n const scrollTime = performance.now()\n const scrollDeltaT = scrollTime - lastScrollTime\n\n if (scrollDeltaT > 500) {\n scrollVelocity = Math.sign(scrollTop - lastScrollTop)\n\n // Not super important, only update at the\n // start of a scroll sequence to avoid reflows\n markerOffset = markerRef.value.offsetTop\n } else {\n scrollVelocity = scrollTop - lastScrollTop\n }\n\n lastScrollTop = scrollTop\n lastScrollTime = scrollTime\n\n calculateVisibleItems()\n }\n function handleScrollend () {\n if (!containerRef.value || !markerRef.value) return\n\n scrollVelocity = 0\n lastScrollTime = 0\n\n calculateVisibleItems()\n }\n\n let raf = -1\n function calculateVisibleItems () {\n cancelAnimationFrame(raf)\n raf = requestAnimationFrame(_calculateVisibleItems)\n }\n function _calculateVisibleItems () {\n if (!containerRef.value || !viewportHeight.value) return\n const scrollTop = lastScrollTop - markerOffset\n const direction = Math.sign(scrollVelocity)\n\n const startPx = Math.max(0, scrollTop - BUFFER_PX)\n const start = clamp(calculateIndex(startPx), 0, items.value.length)\n\n const endPx = scrollTop + viewportHeight.value + BUFFER_PX\n const end = clamp(calculateIndex(endPx) + 1, start + 1, items.value.length)\n\n if (\n // Only update the side we're scrolling towards,\n // the other side will be updated incidentally\n (direction !== UP || start < first.value) &&\n (direction !== DOWN || end > last.value)\n ) {\n const topOverflow = calculateOffset(first.value) - calculateOffset(start)\n const bottomOverflow = calculateOffset(end) - calculateOffset(last.value)\n const bufferOverflow = Math.max(topOverflow, bottomOverflow)\n\n if (bufferOverflow > BUFFER_PX) {\n first.value = start\n last.value = end\n } else {\n // Only update the side that's reached its limit if there's still buffer left\n if (start <= 0) first.value = start\n if (end >= items.value.length) last.value = end\n }\n }\n\n paddingTop.value = calculateOffset(first.value)\n paddingBottom.value = calculateOffset(items.value.length) - calculateOffset(last.value)\n }\n\n function scrollToIndex (index: number) {\n const offset = calculateOffset(index)\n if (!containerRef.value || (index && !offset)) {\n targetScrollIndex = index\n } else {\n containerRef.value.scrollTop = offset\n }\n }\n\n const computedItems = computed(() => {\n return items.value.slice(first.value, last.value).map((item, index) => ({\n raw: item,\n index: index + first.value,\n }))\n })\n\n watch(items, () => {\n sizes = Array.from({ length: items.value.length })\n offsets = Array.from({ length: items.value.length })\n updateOffsets.immediate()\n calculateVisibleItems()\n }, { deep: 1 })\n\n return {\n calculateVisibleItems,\n containerRef,\n markerRef,\n computedItems,\n paddingTop,\n paddingBottom,\n scrollToIndex,\n handleScroll,\n handleScrollend,\n handleItemResize,\n }\n}\n\n// https://gist.github.com/robertleeplummerjr/1cc657191d34ecd0a324\nfunction binaryClosest (arr: ArrayLike<number>, val: number) {\n let high = arr.length - 1\n let low = 0\n let mid = 0\n let item = null\n let target = -1\n\n if (arr[high]! < val) {\n return high\n }\n\n while (low <= high) {\n mid = (low + high) >> 1\n item = arr[mid]!\n\n if (item > val) {\n high = mid - 1\n } else if (item < val) {\n target = mid\n low = mid + 1\n } else if (item === val) {\n return mid\n } else {\n return low\n }\n }\n\n return target\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU;AAAA,SACVC,iBAAiB,gCAE1B;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACpFC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,YAAY,6BAElD;AAGA,MAAMC,EAAE,GAAG,CAAC,CAAC;AACb,MAAMC,IAAI,GAAG,CAAC;;AAEd;AACA,MAAMC,SAAS,GAAG,GAAG;AAOrB,OAAO,MAAMC,gBAAgB,GAAGJ,YAAY,CAAC;EAC3CK,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE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,GAAG,GAAG,CAAC;IAChB,CAAC,MAAM,IAAIN,IAAI,GAAGrB,GAAG,EAAE;MACrB4B,MAAM,GAAGD,GAAG;MACZD,GAAG,GAAGC,GAAG,GAAG,CAAC;IACf,CAAC,MAAM,IAAIN,IAAI,KAAKrB,GAAG,EAAE;MACvB,OAAO2B,GAAG;IACZ,CAAC,MAAM;MACL,OAAOD,GAAG;IACZ;EACF;EAEA,OAAOE,MAAM;AACf","ignoreList":[]}
@@ -1,37 +1,39 @@
1
- .v-ripple__container {
2
- color: inherit;
3
- border-radius: inherit;
4
- position: absolute;
5
- width: 100%;
6
- height: 100%;
7
- left: 0;
8
- top: 0;
9
- overflow: hidden;
10
- z-index: 0;
11
- pointer-events: none;
12
- contain: strict;
13
- }
14
- .v-ripple__animation {
15
- color: inherit;
16
- position: absolute;
17
- top: 0;
18
- left: 0;
19
- border-radius: 50%;
20
- background: currentColor;
21
- opacity: 0;
22
- pointer-events: none;
23
- overflow: hidden;
24
- will-change: transform, opacity;
25
- }
26
- .v-ripple__animation--enter {
27
- transition: none;
28
- opacity: 0;
29
- }
30
- .v-ripple__animation--in {
31
- transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1), opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
32
- opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
33
- }
34
- .v-ripple__animation--out {
35
- transition: opacity 0.3s cubic-bezier(0, 0, 0.2, 1);
36
- opacity: 0;
1
+ @layer vuetify.components {
2
+ .v-ripple__container {
3
+ color: inherit;
4
+ border-radius: inherit;
5
+ position: absolute;
6
+ width: 100%;
7
+ height: 100%;
8
+ left: 0;
9
+ top: 0;
10
+ overflow: hidden;
11
+ z-index: 0;
12
+ pointer-events: none;
13
+ contain: strict;
14
+ }
15
+ .v-ripple__animation {
16
+ color: inherit;
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ border-radius: 50%;
21
+ background: currentColor;
22
+ opacity: 0;
23
+ pointer-events: none;
24
+ overflow: hidden;
25
+ will-change: transform, opacity;
26
+ }
27
+ .v-ripple__animation--enter {
28
+ transition: none;
29
+ opacity: 0;
30
+ }
31
+ .v-ripple__animation--in {
32
+ transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1), opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
33
+ opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
34
+ }
35
+ .v-ripple__animation--out {
36
+ transition: opacity 0.3s cubic-bezier(0, 0, 0.2, 1);
37
+ opacity: 0;
38
+ }
37
39
  }
@@ -16,7 +16,7 @@ export const createVuetify = function () {
16
16
  ...options
17
17
  });
18
18
  };
19
- export const version = "3.7.4-master.2024-11-06";
19
+ export const version = "3.7.4-next.2024-11-06";
20
20
  createVuetify.version = version;
21
21
  export { blueprints, components, directives };
22
22
  export * from "./composables/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"entry-bundler.mjs","names":["blueprints","components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as blueprints from './blueprints'\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n blueprints,\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,4BAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACET,UAAU,EACVC,UAAU,EACVC,UAAU;AACX","ignoreList":[]}
1
+ {"version":3,"file":"entry-bundler.mjs","names":["blueprints","components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as blueprints from './blueprints'\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n blueprints,\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,0BAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACET,UAAU,EACVC,UAAU,EACVC,UAAU;AACX","ignoreList":[]}
package/lib/framework.mjs CHANGED
@@ -97,7 +97,7 @@ export function createVuetify() {
97
97
  goTo
98
98
  };
99
99
  }
100
- export const version = "3.7.4-master.2024-11-06";
100
+ export const version = "3.7.4-next.2024-11-06";
101
101
  createVuetify.version = version;
102
102
 
103
103
  // Vue's inject() can only be used in setup
@@ -1 +1 @@
1
- {"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","DateOptionsSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createGoTo","GoToSymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","goTo","install","app","key","directive","component","name","aliasName","provide","instance","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol, DateOptionsSymbol } from '@/composables/date/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createGoTo, GoToSymbol } from '@/composables/goto'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { GoToOptions } from '@/composables/goto'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance, DateModule } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n goTo?: GoToOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n const goTo = createGoTo(options.goTo, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateOptionsSymbol, date.options)\n app.provide(DateAdapterSymbol, date.instance)\n app.provide(GoToSymbol, goTo)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n goTo,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB;AAAA,SAChDC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,UAAU,EAAEC,UAAU;AAAA,SACtBC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA6BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGH,OA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AEtD,aAAa,CAAC;cACzC6B,KAAK,EAAEwB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAE9C,WAAW,CAAC;cACrCsB,KAAK,EAAEuB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAElD,UAAU,CAAC;cACpC2B,MAAM,EAAEsB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEhD,YAAY,CAAC;cACvC0B,IAAI,EAAEqB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAE3D,iBAAiB;YAC3C,CAAC,CAAC;UACJ;QACF;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLuC,OAAO;IACPR,QAAQ;IACRC,OAAO;IACPE,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC;EACF,CAAC;AACH;AAEA,OAAO,MAAMsB,OAAO,4BAAsB;AAC1CxC,aAAa,CAACwC,OAAO,GAAGA,OAAO;;AAE/B;AACA,SAASF,MAAMA,CAAiCjB,GAA+B,EAAE;EAC/E,MAAMW,EAAE,GAAG,IAAI,CAACS,CAAC;EAEjB,MAAMC,QAAQ,GAAGV,EAAE,CAACW,MAAM,EAAED,QAAQ,IAAIV,EAAE,CAACY,KAAK,CAACC,UAAU,EAAEH,QAAQ;EAErE,IAAIA,QAAQ,IAAKrB,GAAG,IAAYqB,QAAQ,EAAE;IACxC,OAAOA,QAAQ,CAAErB,GAAG,CAAY;EAClC;AACF","ignoreList":[]}
1
+ {"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","DateOptionsSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createGoTo","GoToSymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","goTo","install","app","key","directive","component","name","aliasName","provide","instance","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol, DateOptionsSymbol } from '@/composables/date/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createGoTo, GoToSymbol } from '@/composables/goto'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { GoToOptions } from '@/composables/goto'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance, DateModule } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n goTo?: GoToOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n const goTo = createGoTo(options.goTo, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateOptionsSymbol, date.options)\n app.provide(DateAdapterSymbol, date.instance)\n app.provide(GoToSymbol, goTo)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n goTo,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB;AAAA,SAChDC,cAAc,E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