@vuetify/nightly 3.7.4-next.2024-11-06 → 3.7.5-dev.2024-12-16

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 (262) hide show
  1. package/dist/json/attributes.json +2853 -2845
  2. package/dist/json/importMap-labs.json +20 -20
  3. package/dist/json/importMap.json +150 -150
  4. package/dist/json/tags.json +2 -0
  5. package/dist/json/web-types.json +5324 -5306
  6. package/dist/vuetify-labs.css +25135 -23418
  7. package/dist/vuetify-labs.d.ts +202 -196
  8. package/dist/vuetify-labs.esm.js +107 -106
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +106 -105
  11. package/dist/vuetify-labs.min.css +4 -3
  12. package/dist/vuetify.css +23838 -22118
  13. package/dist/vuetify.d.ts +191 -185
  14. package/dist/vuetify.esm.js +96 -96
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +95 -95
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +4 -3
  19. package/dist/vuetify.min.js +884 -889
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAlert/VAlert.css +215 -207
  22. package/lib/components/VApp/VApp.css +15 -16
  23. package/lib/components/VAppBar/VAppBar.css +12 -14
  24. package/lib/components/VAppBar/index.d.mts +6 -6
  25. package/lib/components/VAutocomplete/VAutocomplete.css +85 -86
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs +4 -4
  27. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  28. package/lib/components/VAutocomplete/index.d.mts +22 -22
  29. package/lib/components/VAvatar/VAvatar.css +106 -108
  30. package/lib/components/VBadge/VBadge.css +77 -73
  31. package/lib/components/VBadge/VBadge.sass +4 -0
  32. package/lib/components/VBanner/VBanner.css +166 -161
  33. package/lib/components/VBottomNavigation/VBottomNavigation.css +63 -64
  34. package/lib/components/VBottomSheet/VBottomSheet.css +31 -34
  35. package/lib/components/VBreadcrumbs/VBreadcrumbs.css +57 -54
  36. package/lib/components/VBtn/VBtn.css +408 -385
  37. package/lib/components/VBtn/VBtn.sass +4 -4
  38. package/lib/components/VBtn/index.d.mts +7 -7
  39. package/lib/components/VBtnGroup/VBtnGroup.css +64 -63
  40. package/lib/components/VBtnToggle/VBtnToggle.css +14 -16
  41. package/lib/components/VBtnToggle/index.d.mts +9 -9
  42. package/lib/components/VCard/VCard.css +302 -294
  43. package/lib/components/VCarousel/VCarousel.css +65 -63
  44. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  45. package/lib/components/VCarousel/VCarousel.sass +1 -1
  46. package/lib/components/VCarousel/index.d.mts +9 -9
  47. package/lib/components/VCheckbox/VCheckbox.css +5 -7
  48. package/lib/components/VCheckbox/VCheckbox.mjs +3 -3
  49. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  50. package/lib/components/VChip/VChip.css +411 -378
  51. package/lib/components/VChip/VChip.mjs +18 -10
  52. package/lib/components/VChip/VChip.mjs.map +1 -1
  53. package/lib/components/VChip/index.d.mts +13 -8
  54. package/lib/components/VChipGroup/VChipGroup.css +18 -19
  55. package/lib/components/VChipGroup/VChipGroup.mjs +2 -0
  56. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  57. package/lib/components/VChipGroup/index.d.mts +20 -15
  58. package/lib/components/VCode/VCode.css +8 -10
  59. package/lib/components/VColorPicker/VColorPicker.css +22 -22
  60. package/lib/components/VColorPicker/VColorPickerCanvas.css +22 -24
  61. package/lib/components/VColorPicker/VColorPickerEdit.css +28 -29
  62. package/lib/components/VColorPicker/VColorPickerPreview.css +67 -69
  63. package/lib/components/VColorPicker/VColorPickerPreview.sass +2 -4
  64. package/lib/components/VColorPicker/VColorPickerSwatches.css +34 -34
  65. package/lib/components/VCombobox/VCombobox.css +85 -86
  66. package/lib/components/VCombobox/VCombobox.mjs +4 -4
  67. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  68. package/lib/components/VCombobox/index.d.mts +22 -22
  69. package/lib/components/VConfirmEdit/VConfirmEdit.mjs +9 -7
  70. package/lib/components/VConfirmEdit/VConfirmEdit.mjs.map +1 -1
  71. package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +1 -1
  72. package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs.map +1 -1
  73. package/lib/components/VConfirmEdit/index.d.mts +3 -7
  74. package/lib/components/VCounter/VCounter.css +5 -7
  75. package/lib/components/VDataTable/VDataTable.css +186 -189
  76. package/lib/components/VDataTable/VDataTable.sass +10 -20
  77. package/lib/components/VDataTable/VDataTableFooter.css +31 -33
  78. package/lib/components/VDatePicker/VDatePicker.css +6 -8
  79. package/lib/components/VDatePicker/VDatePickerControls.css +56 -54
  80. package/lib/components/VDatePicker/VDatePickerHeader.css +60 -56
  81. package/lib/components/VDatePicker/VDatePickerHeader.mjs +2 -1
  82. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
  83. package/lib/components/VDatePicker/VDatePickerMonth.css +55 -51
  84. package/lib/components/VDatePicker/VDatePickerMonths.css +19 -20
  85. package/lib/components/VDatePicker/VDatePickerYears.css +15 -16
  86. package/lib/components/VDatePicker/index.d.mts +5 -5
  87. package/lib/components/VDialog/VDialog.css +95 -95
  88. package/lib/components/VDivider/VDivider.css +52 -52
  89. package/lib/components/VEmptyState/VEmptyState.css +67 -62
  90. package/lib/components/VExpansionPanel/VExpansionPanel.css +209 -203
  91. package/lib/components/VExpansionPanel/VExpansionPanel.sass +25 -27
  92. package/lib/components/VExpansionPanel/index.d.mts +7 -7
  93. package/lib/components/VFab/VFab.css +69 -74
  94. package/lib/components/VFab/VFab.sass +4 -5
  95. package/lib/components/VFab/index.d.mts +6 -6
  96. package/lib/components/VField/VField.css +579 -539
  97. package/lib/components/VField/VField.mjs +5 -4
  98. package/lib/components/VField/VField.mjs.map +1 -1
  99. package/lib/components/VFileInput/VFileInput.css +29 -31
  100. package/lib/components/VFooter/VFooter.css +36 -38
  101. package/lib/components/VGrid/VGrid.css +592 -565
  102. package/lib/components/VIcon/VIcon.css +52 -51
  103. package/lib/components/VImg/VImg.css +51 -50
  104. package/lib/components/VInfiniteScroll/VInfiniteScroll.css +37 -36
  105. package/lib/components/VInput/VInput.css +142 -131
  106. package/lib/components/VInput/VInput.mjs +3 -3
  107. package/lib/components/VInput/VInput.mjs.map +1 -1
  108. package/lib/components/VItemGroup/VItemGroup.css +5 -7
  109. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  110. package/lib/components/VItemGroup/index.d.mts +9 -9
  111. package/lib/components/VKbd/VKbd.css +11 -13
  112. package/lib/components/VLabel/VLabel.css +15 -16
  113. package/lib/components/VLayout/VLayout.css +8 -10
  114. package/lib/components/VLayout/VLayoutItem.css +7 -8
  115. package/lib/components/VList/VList.css +108 -104
  116. package/lib/components/VList/VList.mjs +3 -2
  117. package/lib/components/VList/VList.mjs.map +1 -1
  118. package/lib/components/VList/VList.sass +1 -1
  119. package/lib/components/VList/VListItem.css +452 -440
  120. package/lib/components/VList/VListItem.mjs +3 -2
  121. package/lib/components/VList/VListItem.mjs.map +1 -1
  122. package/lib/components/VList/VListItem.sass +1 -2
  123. package/lib/components/VList/index.d.mts +10 -10
  124. package/lib/components/VLocaleProvider/VLocaleProvider.css +2 -4
  125. package/lib/components/VMain/VMain.css +30 -32
  126. package/lib/components/VMenu/VMenu.css +19 -21
  127. package/lib/components/VMenu/VMenu.mjs +3 -3
  128. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  129. package/lib/components/VMenu/index.d.mts +6 -6
  130. package/lib/components/VMessages/VMessages.css +15 -17
  131. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +108 -106
  132. package/lib/components/VOtpInput/VOtpInput.css +58 -56
  133. package/lib/components/VOverlay/VOverlay.css +63 -60
  134. package/lib/components/VOverlay/VOverlay.sass +13 -14
  135. package/lib/components/VPagination/VPagination.css +8 -10
  136. package/lib/components/VParallax/VParallax.css +6 -8
  137. package/lib/components/VProgressCircular/VProgressCircular.css +101 -95
  138. package/lib/components/VProgressLinear/VProgressLinear.css +222 -209
  139. package/lib/components/VRadioGroup/VRadioGroup.css +12 -14
  140. package/lib/components/VRadioGroup/VRadioGroup.mjs +3 -3
  141. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  142. package/lib/components/VRating/VRating.css +53 -52
  143. package/lib/components/VRating/VRating.mjs +4 -3
  144. package/lib/components/VRating/VRating.mjs.map +1 -1
  145. package/lib/components/VResponsive/VResponsive.css +26 -25
  146. package/lib/components/VSelect/VSelect.css +52 -54
  147. package/lib/components/VSelect/VSelect.mjs +3 -3
  148. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  149. package/lib/components/VSelect/index.d.mts +22 -22
  150. package/lib/components/VSelectionControl/VSelectionControl.css +102 -100
  151. package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -3
  152. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  153. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +8 -10
  154. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +3 -3
  155. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  156. package/lib/components/VSheet/VSheet.css +36 -38
  157. package/lib/components/VSkeletonLoader/VSkeletonLoader.css +224 -225
  158. package/lib/components/VSlideGroup/VSlideGroup.css +55 -53
  159. package/lib/components/VSlideGroup/index.d.mts +10 -10
  160. package/lib/components/VSlider/VSlider.css +57 -53
  161. package/lib/components/VSlider/VSliderThumb.css +153 -142
  162. package/lib/components/VSlider/VSliderTrack.css +174 -155
  163. package/lib/components/VSnackbar/VSnackbar.css +140 -140
  164. package/lib/components/VSparkline/VBarline.mjs +3 -3
  165. package/lib/components/VSparkline/VBarline.mjs.map +1 -1
  166. package/lib/components/VSparkline/VTrendline.mjs +3 -3
  167. package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
  168. package/lib/components/VSpeedDial/VSpeedDial.css +41 -43
  169. package/lib/components/VStepper/VStepper.css +56 -55
  170. package/lib/components/VStepper/VStepper.mjs +5 -4
  171. package/lib/components/VStepper/VStepper.mjs.map +1 -1
  172. package/lib/components/VStepper/VStepperItem.css +115 -112
  173. package/lib/components/VStepper/VStepperItem.mjs +5 -4
  174. package/lib/components/VStepper/VStepperItem.mjs.map +1 -1
  175. package/lib/components/VStepper/index.d.mts +51 -45
  176. package/lib/components/VSwitch/VSwitch.css +139 -129
  177. package/lib/components/VSwitch/VSwitch.mjs +3 -3
  178. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  179. package/lib/components/VSystemBar/VSystemBar.css +43 -45
  180. package/lib/components/VTable/VTable.css +141 -140
  181. package/lib/components/VTable/VTable.sass +2 -4
  182. package/lib/components/VTabs/VTab.css +29 -30
  183. package/lib/components/VTabs/VTabs.css +65 -59
  184. package/lib/components/VTabs/index.d.mts +7 -7
  185. package/lib/components/VTextField/VTextField.css +68 -65
  186. package/lib/components/VTextarea/VTextarea.css +39 -47
  187. package/lib/components/VTextarea/VTextarea.sass +2 -4
  188. package/lib/components/VThemeProvider/VThemeProvider.css +3 -5
  189. package/lib/components/VTimeline/VTimeline.css +418 -379
  190. package/lib/components/VToolbar/VToolbar.css +143 -136
  191. package/lib/components/VTooltip/VTooltip.css +21 -25
  192. package/lib/components/VTooltip/VTooltip.mjs +3 -3
  193. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  194. package/lib/components/VTooltip/VTooltip.sass +6 -8
  195. package/lib/components/VVirtualScroll/VVirtualScroll.css +9 -11
  196. package/lib/components/VWindow/VWindow.css +70 -73
  197. package/lib/components/VWindow/index.d.mts +7 -7
  198. package/lib/components/index.d.mts +138 -132
  199. package/lib/composables/form.mjs +7 -2
  200. package/lib/composables/form.mjs.map +1 -1
  201. package/lib/composables/group.mjs +3 -3
  202. package/lib/composables/group.mjs.map +1 -1
  203. package/lib/composables/layout.mjs +3 -3
  204. package/lib/composables/layout.mjs.map +1 -1
  205. package/lib/composables/nested/nested.mjs +2 -2
  206. package/lib/composables/nested/nested.mjs.map +1 -1
  207. package/lib/composables/theme.mjs +4 -4
  208. package/lib/composables/theme.mjs.map +1 -1
  209. package/lib/composables/validation.mjs +13 -15
  210. package/lib/composables/validation.mjs.map +1 -1
  211. package/lib/directives/ripple/VRipple.css +36 -38
  212. package/lib/entry-bundler.mjs +1 -1
  213. package/lib/entry-bundler.mjs.map +1 -1
  214. package/lib/framework.mjs +2 -3
  215. package/lib/framework.mjs.map +1 -1
  216. package/lib/index.d.mts +53 -53
  217. package/lib/labs/VCalendar/VCalendar.css +225 -219
  218. package/lib/labs/VCalendar/VCalendarDay.css +32 -33
  219. package/lib/labs/VCalendar/VCalendarHeader.css +13 -13
  220. package/lib/labs/VCalendar/VCalendarInterval.css +42 -43
  221. package/lib/labs/VCalendar/VCalendarIntervalEvent.css +5 -7
  222. package/lib/labs/VCalendar/VCalendarMonthDay.css +58 -61
  223. package/lib/labs/VCalendar/VCalendarMonthDay.sass +2 -3
  224. package/lib/labs/VDateInput/VDateInput.mjs +1 -1
  225. package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
  226. package/lib/labs/VNumberInput/VNumberInput.css +38 -40
  227. package/lib/labs/VNumberInput/VNumberInput.mjs +7 -5
  228. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
  229. package/lib/labs/VPicker/VPicker.css +57 -53
  230. package/lib/labs/VStepperVertical/index.d.mts +44 -44
  231. package/lib/labs/VTimePicker/VTimePicker.css +7 -9
  232. package/lib/labs/VTimePicker/VTimePickerClock.css +129 -126
  233. package/lib/labs/VTimePicker/VTimePickerControls.css +103 -102
  234. package/lib/labs/VTreeview/VTreeviewItem.css +15 -17
  235. package/lib/labs/VTreeview/VTreeviewItem.mjs +3 -4
  236. package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
  237. package/lib/labs/VTreeview/VTreeviewItem.sass +1 -2
  238. package/lib/labs/VTreeview/index.d.mts +20 -20
  239. package/lib/labs/components.d.mts +64 -64
  240. package/lib/locale/fr.mjs +1 -1
  241. package/lib/locale/fr.mjs.map +1 -1
  242. package/lib/styles/elements/_global.sass +1 -1
  243. package/lib/styles/generic/_colors.scss +3 -3
  244. package/lib/styles/generic/_layers.scss +1 -13
  245. package/lib/styles/generic/_transitions.scss +32 -32
  246. package/lib/styles/main.css +16139 -14666
  247. package/lib/styles/settings/_utilities.scss +5 -0
  248. package/lib/styles/settings/_variables.scss +2 -1
  249. package/lib/styles/tools/_bootable.sass +3 -0
  250. package/lib/styles/tools/_border.sass +4 -4
  251. package/lib/styles/tools/_display.sass +10 -0
  252. package/lib/styles/tools/_elevation.sass +2 -2
  253. package/lib/styles/tools/_index.sass +2 -0
  254. package/lib/styles/tools/_layer.scss +2 -4
  255. package/lib/styles/tools/_position.sass +2 -2
  256. package/lib/styles/tools/_radius.sass +10 -0
  257. package/lib/styles/tools/_rounded.sass +2 -2
  258. package/lib/styles/tools/_utilities.sass +5 -1
  259. package/lib/styles/utilities/_elevation.scss +1 -1
  260. package/lib/util/getCurrentInstance.mjs +1 -15
  261. package/lib/util/getCurrentInstance.mjs.map +1 -1
  262. package/package.json +1 -1
@@ -1,64 +1,61 @@
1
- @layer vuetify.components {
2
- .v-calendar-month__day {
3
- position: relative;
4
- display: flex;
5
- flex-direction: column;
6
- min-width: 0;
7
- min-height: 150px;
8
- border-right: thin solid #e0e0e0;
9
- border-bottom: thin solid #e0e0e0;
10
- flex: 1 1 auto;
11
- border-inline-end: thin solid #e0e0e0;
12
- }
13
- .v-calendar-weekly__day {
14
- width: 0;
15
- overflow: hidden;
16
- user-select: none;
17
- position: relative;
18
- padding: 0px 0px 0px 0px;
19
- min-width: 0;
20
- min-height: 150px;
21
- border-right: thin solid #e0e0e0;
22
- border-bottom: thin solid #e0e0e0;
23
- flex: 1 1 auto;
24
- border-inline-end: thin solid #e0e0e0;
25
- text-align: center;
26
- }
27
- .v-calendar-weekly__day.v-present .v-calendar-weekly__day-month {
28
- color: currentColor;
29
- }
30
- .v-calendar-weekly__day-label {
31
- text-decoration: none;
32
- user-select: none;
33
- cursor: pointer;
34
- box-shadow: none;
35
- text-align: center;
36
- }
37
- .v-calendar-weekly__day-label .v-btn {
38
- font-size: 12px;
39
- }
1
+ .v-calendar-month__day {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ min-width: 0;
6
+ min-height: 150px;
7
+ border-right: thin solid #e0e0e0;
8
+ border-bottom: thin solid #e0e0e0;
9
+ flex: 1 1 auto;
10
+ border-inline-end: thin solid #e0e0e0;
40
11
  }
41
- @layer vuetify.overrides {
42
- .v-calendar-weekly__day-label .v-btn {
43
- text-transform: none;
44
- }
12
+
13
+ .v-calendar-weekly__day {
14
+ flex: 1;
15
+ width: 0;
16
+ overflow: hidden;
17
+ user-select: none;
18
+ position: relative;
19
+ padding: 0px 0px 0px 0px;
20
+ min-width: 0;
21
+ min-height: 150px;
22
+ border-right: thin solid #e0e0e0;
23
+ border-bottom: thin solid #e0e0e0;
24
+ flex: 1 1 auto;
25
+ border-inline-end: thin solid #e0e0e0;
26
+ text-align: center;
45
27
  }
46
- @layer vuetify.components {
47
- .v-calendar-weekly__day-label .v-btn.v-calendar-weekly__day-label__today {
48
- background: rgba(var(--v-theme-surface-variant), var(--v-medium-emphasis-opacity));
49
- color: rgb(var(--v-theme-on-surface-variant));
50
- }
51
- .v-calendar-weekly__day-month {
52
- position: absolute;
53
- text-decoration: none;
54
- user-select: none;
55
- box-shadow: none;
56
- top: 0;
57
- left: 36px;
58
- height: 32px;
59
- line-height: 32px;
60
- }
61
- .v-calendar-weekly__day-alldayevents-container {
62
- min-height: 24px;
63
- }
28
+ .v-calendar-weekly__day.v-present .v-calendar-weekly__day-month {
29
+ color: currentColor;
30
+ }
31
+
32
+ .v-calendar-weekly__day-label {
33
+ text-decoration: none;
34
+ user-select: none;
35
+ cursor: pointer;
36
+ box-shadow: none;
37
+ text-align: center;
38
+ }
39
+ .v-calendar-weekly__day-label .v-btn {
40
+ font-size: 12px;
41
+ text-transform: none !important;
42
+ }
43
+ .v-calendar-weekly__day-label .v-btn.v-calendar-weekly__day-label__today {
44
+ background: rgba(var(--v-theme-surface-variant), var(--v-medium-emphasis-opacity));
45
+ color: rgb(var(--v-theme-on-surface-variant));
46
+ }
47
+
48
+ .v-calendar-weekly__day-month {
49
+ position: absolute;
50
+ text-decoration: none;
51
+ user-select: none;
52
+ box-shadow: none;
53
+ top: 0;
54
+ left: 36px;
55
+ height: 32px;
56
+ line-height: 32px;
57
+ }
58
+
59
+ .v-calendar-weekly__day-alldayevents-container {
60
+ min-height: 24px;
64
61
  }
@@ -17,6 +17,7 @@
17
17
  border-inline-end: $calendar-line-width solid $calendar-line-color
18
18
 
19
19
  .v-calendar-weekly__day
20
+ flex: 1
20
21
  width: 0
21
22
  overflow: hidden
22
23
  user-select: none
@@ -46,9 +47,7 @@
46
47
 
47
48
  .v-btn
48
49
  font-size: $calendar-weekly-day-label-font-size
49
-
50
- @include tools.layer('overrides')
51
- text-transform: none
50
+ text-transform: none !important
52
51
 
53
52
  &.v-calendar-weekly__day-label__today
54
53
  background: rgba(var(--v-theme-surface-variant), var(--v-medium-emphasis-opacity))
@@ -120,7 +120,7 @@ export const VDateInput = genericComponent()({
120
120
  },
121
121
  "onMousedown": e => e.preventDefault()
122
122
  }), {
123
- actions: !props.hideActions ? () => actions : undefined
123
+ actions: !props.hideActions ? actions : undefined
124
124
  });
125
125
  }
126
126
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","placeholder","prependIcon","weeksInMonth","hideHeader","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","menu","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","date","onClick","preventDefault","stopPropagation","onSave","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","default","$event","_ref2","actions","proxyModel"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nexport interface VDateInputSlots {\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n weeksInMonth: 'dynamic' as const,\n hideHeader: true,\n }), ['active']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null)\n const menu = shallowRef(false)\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = adapter.date(target.value)\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n >\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n >\n {{\n default: ({ actions, model: proxyModel }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => actions : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </VTextField>\n )\n })\n },\n})\n\nexport type VDateInput = Inst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ps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","placeholder","prependIcon","weeksInMonth","hideHeader","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","menu","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","date","onClick","preventDefault","stopPropagation","onSave","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","default","$event","_ref2","actions","proxyModel"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nexport interface VDateInputSlots {\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n weeksInMonth: 'dynamic' as const,\n hideHeader: true,\n }), ['active']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null)\n const menu = shallowRef(false)\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = adapter.date(target.value)\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n >\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n >\n {{\n default: ({ actions, model: proxyModel }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? actions : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </VTextField>\n )\n })\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAKA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,WAAW,EAAEC,OAAO;EAEpB,GAAGb,cAAc,CAAC,CAAC;EACnB,GAAGR,qBAAqB,CAAC,CAAC;EAC1B,GAAGK,mBAAmB,CAAC;IACrBiB,WAAW,EAAE,YAAY;IACzBC,WAAW,EAAE;EACf,CAAC,CAAC;EACF,GAAGR,IAAI,CAACb,oBAAoB,CAAC;IAC3BsB,YAAY,EAAE,SAAkB;IAChCC,UAAU,EAAE;EACd,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC;AAChB,CAAC,EAAE,YAAY,CAAC;AAEhB,OAAO,MAAMC,UAAU,GAAGZ,gBAAgB,CAAC,CAAC,CAAC;EAC3Ca,IAAI,EAAE,YAAY;EAElBC,KAAK,EAAET,mBAAmB,CAAC,CAAC;EAE5BU,KAAK,EAAE;IACL,mBAAmB,EAAGC,GAAW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AAKA,CAAC,CAACK,cAAc,CAAC;cAAC;gBAGjDe,OAAO,EAAE,CAAC7C,KAAK,CAACR,WAAW,GAAGqD,OAAO,GAAGJ;cAAS;YAIzD;UAAC;QAAA,IAKLpC,KAAK,CAACqC,OAAO,GAAG,CAAC;MAAA;IAGzB,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,41 +1,39 @@
1
- @layer vuetify.components {
2
- .v-number-input input[type=number] {
3
- -moz-appearance: textfield;
4
- }
5
- .v-number-input input[type=number]::-webkit-outer-spin-button, .v-number-input input[type=number]::-webkit-inner-spin-button {
6
- -webkit-appearance: none;
7
- }
8
- .v-number-input .v-field {
9
- padding-inline-end: 0;
10
- padding-inline-start: 0;
11
- }
12
- .v-number-input--inset .v-divider {
13
- height: 55%;
14
- width: 55%;
15
- align-self: center;
16
- }
17
- .v-number-input--split .v-field__input {
18
- text-align: center;
19
- }
20
- .v-number-input--stacked .v-number-input__control {
21
- flex-direction: column-reverse;
22
- }
23
- .v-number-input--stacked .v-number-input__control .v-btn {
24
- flex: 1;
25
- }
26
- .v-number-input--hide-input .v-field {
27
- flex: none;
28
- }
29
- .v-number-input--hide-input .v-field__input {
30
- width: 0;
31
- padding-inline: 0;
32
- }
33
- .v-number-input__control {
34
- display: flex;
35
- height: 100%;
36
- }
37
- .v-number-input__control .v-btn {
38
- background-color: transparent;
39
- border-radius: 0;
40
- }
1
+ .v-number-input input[type=number] {
2
+ -moz-appearance: textfield;
3
+ }
4
+ .v-number-input input[type=number]::-webkit-outer-spin-button, .v-number-input input[type=number]::-webkit-inner-spin-button {
5
+ -webkit-appearance: none;
6
+ }
7
+ .v-number-input .v-field {
8
+ padding-inline-end: 0;
9
+ padding-inline-start: 0;
10
+ }
11
+ .v-number-input--inset .v-divider {
12
+ height: 55%;
13
+ width: 55%;
14
+ align-self: center;
15
+ }
16
+ .v-number-input--split .v-field__input {
17
+ text-align: center;
18
+ }
19
+ .v-number-input--stacked .v-number-input__control {
20
+ flex-direction: column-reverse;
21
+ }
22
+ .v-number-input--stacked .v-number-input__control .v-btn {
23
+ flex: 1;
24
+ }
25
+ .v-number-input--hide-input .v-field {
26
+ flex: none;
27
+ }
28
+ .v-number-input--hide-input .v-field__input {
29
+ width: 0;
30
+ padding-inline: 0;
31
+ }
32
+ .v-number-input__control {
33
+ display: flex;
34
+ height: 100%;
35
+ }
36
+ .v-number-input__control .v-btn {
37
+ background-color: transparent;
38
+ border-radius: 0;
41
39
  }
@@ -65,8 +65,8 @@ export const VNumberInput = genericComponent()({
65
65
  const vTextFieldRef = ref();
66
66
  const stepDecimals = computed(() => getDecimals(props.step));
67
67
  const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0);
68
- const form = useForm();
69
- const controlsDisabled = computed(() => props.disabled || props.readonly || form?.isReadonly.value);
68
+ const form = useForm(props);
69
+ const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
70
70
  const canIncrease = computed(() => {
71
71
  if (controlsDisabled.value) return false;
72
72
  return (model.value ?? 0) + props.step <= props.max;
@@ -89,7 +89,7 @@ export const VNumberInput = genericComponent()({
89
89
  click: onClickDown
90
90
  }));
91
91
  onMounted(() => {
92
- if (!props.readonly && !props.disabled) {
92
+ if (!controlsDisabled.value) {
93
93
  clampModel();
94
94
  }
95
95
  });
@@ -165,7 +165,8 @@ export const VNumberInput = genericComponent()({
165
165
  "flat": true,
166
166
  "key": "increment-btn",
167
167
  "height": controlNodeDefaultHeight.value,
168
- "name": "increment-btn",
168
+ "data-testid": "increment",
169
+ "aria-hidden": "true",
169
170
  "icon": incrementIcon.value,
170
171
  "onClick": onClickUp,
171
172
  "onMousedown": onControlMousedown,
@@ -192,7 +193,8 @@ export const VNumberInput = genericComponent()({
192
193
  "flat": true,
193
194
  "key": "decrement-btn",
194
195
  "height": controlNodeDefaultHeight.value,
195
- "name": "decrement-btn",
196
+ "data-testid": "decrement",
197
+ "aria-hidden": "true",
196
198
  "icon": decrementIcon.value,
197
199
  "size": controlNodeSize.value,
198
200
  "tabindex": "-1",
@@ -1 +1 @@
1
- {"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","makeVTextFieldProps","VTextField","useForm","forwardRefs","useProxiedModel","computed","nextTick","onMounted","ref","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","modelValue","Number","min","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","step","VNumberInput","name","props","emits","val","setup","_ref","slots","_model","model","get","value","set","isNaN","vTextFieldRef","stepDecimals","modelDecimals","form","controlsDisabled","disabled","readonly","isReadonly","canIncrease","canDecrease","incrementIcon","decrementIcon","controlNodeSize","controlNodeDefaultHeight","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","clampModel","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","e","stopPropagation","onBeforeinput","data","existingTxt","target","selectionStart","selectionEnd","potentialNewInputVal","slice","test","preventDefault","onKeydown","includes","key","ctrlKey","onControlMousedown","inputText","_","textFieldProps","filterProps","incrementControlNode","_createVNode","flat","height","size","icon","decrementControlNode","decrement","controlNode","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","$event","class","style","_len","args","Array","_key","_len2","_key2"],"sources":["../../../src/labs/VNumberInput/VNumberInput.tsx"],"sourcesContent":["// Styles\nimport './VNumberInput.sass'\n\n// Components\nimport { VBtn } from '../../components/VBtn'\nimport { VDefaultsProvider } from '../../components/VDefaultsProvider'\nimport { VDivider } from '../../components/VDivider'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\ntype ControlSlot = {\n click: (e: MouseEvent) => void\n}\n\ntype VNumberInputSlots = Omit<VTextFieldSlots, 'default'> & {\n increment: ControlSlot\n decrement: ControlSlot\n}\n\ntype ControlVariant = 'default' | 'stacked' | 'split'\n\nconst makeVNumberInputProps = propsFactory({\n controlVariant: {\n type: String as PropType<ControlVariant>,\n default: 'default',\n },\n inset: Boolean,\n hideInput: Boolean,\n modelValue: {\n type: Number as PropType<Number | null>,\n default: null,\n },\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { slots }) {\n const _model = useProxiedModel(props, 'modelValue')\n\n const model = computed({\n get: () => _model.value,\n set (val) {\n if (val === null) {\n _model.value = null\n return\n }\n\n if (!isNaN(+val) && +val <= props.max && +val >= props.min) {\n _model.value = +val\n }\n },\n })\n\n const vTextFieldRef = ref<VTextField | undefined>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0)\n\n const form = useForm()\n const controlsDisabled = computed(() => (\n props.disabled || props.readonly || form?.isReadonly.value\n ))\n\n const canIncrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number - props.step >= props.min\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse')\n const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand')\n const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small')\n const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%')\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n onMounted(() => {\n if (!props.readonly && !props.disabled) {\n clampModel()\n }\n })\n\n function toggleUpDown (increment = true) {\n if (controlsDisabled.value) return\n if (model.value == null) {\n model.value = clamp(0, props.min, props.max)\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +((((model.value as number) + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +((((model.value as number) - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown()\n }\n\n function onClickDown (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown(false)\n }\n\n function onBeforeinput (e: InputEvent) {\n if (!e.data) return\n const existingTxt = (e.target as HTMLInputElement)?.value\n const selectionStart = (e.target as HTMLInputElement)?.selectionStart\n const selectionEnd = (e.target as HTMLInputElement)?.selectionEnd\n const potentialNewInputVal =\n existingTxt\n ? existingTxt.slice(0, selectionStart as number | undefined) + e.data + existingTxt.slice(selectionEnd as number | undefined)\n : e.data\n // Only numbers, \"-\", \".\" are allowed\n // AND \"-\", \".\" are allowed only once\n // AND \"-\" is only allowed at the start\n if (!/^-?(\\d+(\\.\\d*)?|(\\.\\d+)|\\d*|\\.)$/.test(potentialNewInputVal)) {\n e.preventDefault()\n }\n }\n\n async function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault()\n clampModel()\n // _model is controlled, so need to wait until props['modelValue'] is updated\n await nextTick()\n if (e.key === 'ArrowDown') {\n toggleUpDown(false)\n } else {\n toggleUpDown()\n }\n }\n }\n\n function onControlMousedown (e: MouseEvent) {\n e.stopPropagation()\n }\n\n function clampModel () {\n if (!vTextFieldRef.value) return\n const inputText = vTextFieldRef.value.value\n if (inputText && !isNaN(+inputText)) {\n model.value = clamp(+(inputText), props.min, props.max)\n } else {\n model.value = null\n }\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function incrementControlNode () {\n return !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ controlNodeDefaultHeight.value }\n name=\"increment-btn\"\n icon={ incrementIcon.value }\n onClick={ onClickUp }\n onMousedown={ onControlMousedown }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: incrementIcon.value,\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function decrementControlNode () {\n return !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ controlNodeDefaultHeight.value }\n name=\"decrement-btn\"\n icon={ decrementIcon.value }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n onClick={ onClickDown }\n onMousedown={ onControlMousedown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: decrementIcon.value,\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function controlNode () {\n return (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n { incrementControlNode() }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n const appendInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n { incrementControlNode() }\n </div>\n ) : (!props.reverse\n ? <>{ dividerNode() }{ controlNode() }</>\n : undefined)\n\n const hasAppendInner = slots['append-inner'] || appendInnerControl\n\n const prependInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? <>{ controlNode() }{ dividerNode() }</>\n : undefined)\n\n const hasPrependInner = slots['prepend-inner'] || prependInnerControl\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n v-model={ model.value }\n onBeforeinput={ onBeforeinput }\n onChange={ clampModel }\n onKeydown={ onKeydown }\n class={[\n 'v-number-input',\n {\n 'v-number-input--default': controlVariant.value === 'default',\n 'v-number-input--hide-input': props.hideInput,\n 'v-number-input--inset': props.inset,\n 'v-number-input--reverse': props.reverse,\n 'v-number-input--split': controlVariant.value === 'split',\n 'v-number-input--stacked': controlVariant.value === 'stacked',\n },\n props.class,\n ]}\n { ...textFieldProps }\n style={ props.style }\n inputmode=\"decimal\"\n >\n {{\n ...slots,\n 'append-inner': hasAppendInner ? (...args) => (\n <>\n { slots['append-inner']?.(...args) }\n { appendInnerControl }\n </>\n ) : undefined,\n 'prepend-inner': hasPrependInner ? (...args) => (\n <>\n { prependInnerControl }\n { slots['prepend-inner']?.(...args) }\n </>\n ) : undefined,\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vTextFieldRef)\n },\n})\n\nexport type VNumberInput = InstanceType<typeof VNumberInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,m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MAAA,EAAI+C,IAAI,OAAAC,KAAA,CAAAE,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;YAAJJ,IAAI,CAAAI,KAAA,IAAApD,SAAA,CAAAoD,KAAA;UAAA;UAAA,OAAAxB,YAAA,CAAAW,SAAA,SAErCE,mBAAmB,EACnBtE,KAAK,CAAC,eAAe,CAAC,GAAG,GAAG6E,IAAI,CAAC;QAAA,CAEtC,GAAG9C;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOjE,WAAW,CAAC,CAAC,CAAC,EAAEyC,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","makeVTextFieldProps","VTextField","useForm","forwardRefs","useProxiedModel","computed","nextTick","onMounted","ref","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","modelValue","Number","min","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","step","VNumberInput","name","props","emits","val","setup","_ref","slots","_model","model","get","value","set","isNaN","vTextFieldRef","stepDecimals","modelDecimals","form","controlsDisabled","isDisabled","isReadonly","canIncrease","canDecrease","incrementIcon","decrementIcon","controlNodeSize","controlNodeDefaultHeight","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","clampModel","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","e","stopPropagation","onBeforeinput","data","existingTxt","target","selectionStart","selectionEnd","potentialNewInputVal","slice","test","preventDefault","onKeydown","includes","key","ctrlKey","onControlMousedown","inputText","_","textFieldProps","filterProps","incrementControlNode","_createVNode","disabled","flat","height","size","icon","decrementControlNode","decrement","controlNode","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","$event","class","style","_len","args","Array","_key","_len2","_key2"],"sources":["../../../src/labs/VNumberInput/VNumberInput.tsx"],"sourcesContent":["// Styles\nimport './VNumberInput.sass'\n\n// Components\nimport { VBtn } from '../../components/VBtn'\nimport { VDefaultsProvider } from '../../components/VDefaultsProvider'\nimport { VDivider } from '../../components/VDivider'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\ntype ControlSlot = {\n click: (e: MouseEvent) => void\n}\n\ntype VNumberInputSlots = Omit<VTextFieldSlots, 'default'> & {\n increment: ControlSlot\n decrement: ControlSlot\n}\n\ntype ControlVariant = 'default' | 'stacked' | 'split'\n\nconst makeVNumberInputProps = propsFactory({\n controlVariant: {\n type: String as PropType<ControlVariant>,\n default: 'default',\n },\n inset: Boolean,\n hideInput: Boolean,\n modelValue: {\n type: Number as PropType<Number | null>,\n default: null,\n },\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { slots }) {\n const _model = useProxiedModel(props, 'modelValue')\n\n const model = computed({\n get: () => _model.value,\n set (val) {\n if (val === null) {\n _model.value = null\n return\n }\n\n if (!isNaN(+val) && +val <= props.max && +val >= props.min) {\n _model.value = +val\n }\n },\n })\n\n const vTextFieldRef = ref<VTextField | undefined>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0)\n\n const form = useForm(props)\n const controlsDisabled = computed(() => (\n form.isDisabled.value || form.isReadonly.value\n ))\n\n const canIncrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number - props.step >= props.min\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse')\n const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand')\n const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small')\n const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%')\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n onMounted(() => {\n if (!controlsDisabled.value) {\n clampModel()\n }\n })\n\n function toggleUpDown (increment = true) {\n if (controlsDisabled.value) return\n if (model.value == null) {\n model.value = clamp(0, props.min, props.max)\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +((((model.value as number) + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +((((model.value as number) - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown()\n }\n\n function onClickDown (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown(false)\n }\n\n function onBeforeinput (e: InputEvent) {\n if (!e.data) return\n const existingTxt = (e.target as HTMLInputElement)?.value\n const selectionStart = (e.target as HTMLInputElement)?.selectionStart\n const selectionEnd = (e.target as HTMLInputElement)?.selectionEnd\n const potentialNewInputVal =\n existingTxt\n ? existingTxt.slice(0, selectionStart as number | undefined) + e.data + existingTxt.slice(selectionEnd as number | undefined)\n : e.data\n // Only numbers, \"-\", \".\" are allowed\n // AND \"-\", \".\" are allowed only once\n // AND \"-\" is only allowed at the start\n if (!/^-?(\\d+(\\.\\d*)?|(\\.\\d+)|\\d*|\\.)$/.test(potentialNewInputVal)) {\n e.preventDefault()\n }\n }\n\n async function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault()\n clampModel()\n // _model is controlled, so need to wait until props['modelValue'] is updated\n await nextTick()\n if (e.key === 'ArrowDown') {\n toggleUpDown(false)\n } else {\n toggleUpDown()\n }\n }\n }\n\n function onControlMousedown (e: MouseEvent) {\n e.stopPropagation()\n }\n\n function clampModel () {\n if (!vTextFieldRef.value) return\n const inputText = vTextFieldRef.value.value\n if (inputText && !isNaN(+inputText)) {\n model.value = clamp(+(inputText), props.min, props.max)\n } else {\n model.value = null\n }\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function incrementControlNode () {\n return !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ controlNodeDefaultHeight.value }\n data-testid=\"increment\"\n aria-hidden=\"true\"\n icon={ incrementIcon.value }\n onClick={ onClickUp }\n onMousedown={ onControlMousedown }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: incrementIcon.value,\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function decrementControlNode () {\n return !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ controlNodeDefaultHeight.value }\n data-testid=\"decrement\"\n aria-hidden=\"true\"\n icon={ decrementIcon.value }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n onClick={ onClickDown }\n onMousedown={ onControlMousedown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: decrementIcon.value,\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function controlNode () {\n return (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n { incrementControlNode() }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n const appendInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n { incrementControlNode() }\n </div>\n ) : (!props.reverse\n ? <>{ dividerNode() }{ controlNode() }</>\n : undefined)\n\n const hasAppendInner = slots['append-inner'] || appendInnerControl\n\n const prependInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? <>{ controlNode() }{ dividerNode() }</>\n : undefined)\n\n const hasPrependInner = slots['prepend-inner'] || prependInnerControl\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n v-model={ model.value }\n onBeforeinput={ onBeforeinput }\n onChange={ clampModel }\n onKeydown={ onKeydown }\n class={[\n 'v-number-input',\n {\n 'v-number-input--default': controlVariant.value === 'default',\n 'v-number-input--hide-input': props.hideInput,\n 'v-number-input--inset': props.inset,\n 'v-number-input--reverse': props.reverse,\n 'v-number-input--split': controlVariant.value === 'split',\n 'v-number-input--stacked': controlVariant.value === 'stacked',\n },\n props.class,\n ]}\n { ...textFieldProps }\n style={ props.style }\n inputmode=\"decimal\"\n >\n {{\n ...slots,\n 'append-inner': hasAppendInner ? (...args) => (\n <>\n { slots['append-inner']?.(...args) }\n { appendInnerControl }\n </>\n ) : undefined,\n 'prepend-inner': hasPrependInner ? (...args) => (\n <>\n { prependInnerControl }\n { slots['prepend-inner']?.(...args) }\n </>\n ) : undefined,\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vTextFieldRef)\n },\n})\n\nexport type VNumberInput = InstanceType<typeof VNumberInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,WAAW;AAAA,SACXC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC/CC,KAAK,EAAEC,gBAAgB,EAAEC,WAAW,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE5E;AAeA,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EACzCG,cAAc,EAAE;IACdC,IAAI,EAAEC,MAAkC;IACxCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,OAAO;EACdC,SAAS,EAAED,OAAO;EAClBE,UAAU,EAAE;IACVN,IAAI,EAAEO,MAAiC;IACvCL,OAAO,EAAE;EACX,CAAC;EACDM,GAAG,EAAE;IACHR,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAEK,MAAM,CAACE;EAClB,CAAC;EACDC,GAAG,EAAE;IACHV,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAEK,MAAM,CAACI;EAClB,CAAC;EACDC,IAAI,EAAE;IACJZ,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAE;EACX,CAAC;EAED,GAAGP,IAAI,CAACZ,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,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I,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;YAAJF,IAAI,CAAAE,IAAA,IAAAnD,SAAA,CAAAmD,IAAA;UAAA;UAAA,OAAAvB,YAAA,CAAAY,SAAA,SAEnCpE,KAAK,CAAC,cAAc,CAAC,GAAG,GAAG6E,IAAI,CAAC,EAChCX,kBAAkB;QAAA,CAEvB,GAAGpC,SAAS;QACb,eAAe,EAAEyC,eAAe,GAAG;UAAA,SAAAS,KAAA,GAAApD,SAAA,CAAAC,MAAA,EAAIgD,IAAI,OAAAC,KAAA,CAAAE,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;YAAJJ,IAAI,CAAAI,KAAA,IAAArD,SAAA,CAAAqD,KAAA;UAAA;UAAA,OAAAzB,YAAA,CAAAY,SAAA,SAErCE,mBAAmB,EACnBtE,KAAK,CAAC,eAAe,CAAC,GAAG,GAAG6E,IAAI,CAAC;QAAA,CAEtC,GAAG/C;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOhE,WAAW,CAAC,CAAC,CAAC,EAAEyC,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,54 +1,58 @@
1
- @layer vuetify.components {
2
- .v-picker.v-sheet {
3
- display: grid;
4
- grid-auto-rows: min-content;
5
- grid-template-areas: "title" "header" "body";
6
- overflow: hidden;
7
- }
8
- .v-picker.v-sheet {
9
- box-shadow: 0px 0px 0px 0px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 0px 0px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
10
- }
11
- .v-picker.v-sheet {
12
- border-radius: 4px;
13
- }
14
- .v-picker.v-sheet.v-picker--with-actions {
15
- grid-template-areas: "title" "header" "body" "actions";
16
- }
17
- .v-picker__body {
18
- grid-area: body;
19
- overflow: hidden;
20
- position: relative;
21
- }
22
- .v-picker__header {
23
- grid-area: header;
24
- }
25
- .v-picker__actions {
26
- grid-area: actions;
27
- padding: 0 12px 12px;
28
- display: flex;
29
- align-items: center;
30
- justify-content: flex-end;
31
- }
32
- .v-picker__actions .v-btn {
33
- min-width: 48px;
34
- }
35
- .v-picker__actions .v-btn:not(:last-child) {
36
- margin-inline-end: 8px;
37
- }
38
- .v-picker--landscape {
39
- grid-template-areas: "title" "header body" "header body";
40
- }
41
- .v-picker--landscape.v-picker--with-actions {
42
- grid-template-areas: "title" "header body" "header actions";
43
- }
44
- .v-picker-title {
45
- text-transform: uppercase;
46
- font-size: 0.75rem;
47
- grid-area: title;
48
- padding-inline: 24px 12px;
49
- padding-top: 16px;
50
- padding-bottom: 16px;
51
- font-weight: 400;
52
- letter-spacing: 0.1666666667em;
53
- }
1
+ .v-picker.v-sheet {
2
+ display: grid;
3
+ grid-auto-rows: min-content;
4
+ grid-template-areas: "title" "header" "body";
5
+ overflow: hidden;
6
+ }
7
+ .v-picker.v-sheet {
8
+ box-shadow: 0px 0px 0px 0px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 0px 0px 0px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, 0.12));
9
+ }
10
+ .v-picker.v-sheet {
11
+ border-radius: 4px;
12
+ }
13
+ .v-picker.v-sheet.v-picker--with-actions {
14
+ grid-template-areas: "title" "header" "body" "actions";
15
+ }
16
+
17
+ .v-picker__body {
18
+ grid-area: body;
19
+ overflow: hidden;
20
+ position: relative;
21
+ }
22
+
23
+ .v-picker__header {
24
+ grid-area: header;
25
+ }
26
+
27
+ .v-picker__actions {
28
+ grid-area: actions;
29
+ padding: 0 12px 12px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: flex-end;
33
+ }
34
+ .v-picker__actions .v-btn {
35
+ min-width: 48px;
36
+ }
37
+ .v-picker__actions .v-btn:not(:last-child) {
38
+ margin-inline-end: 8px;
39
+ }
40
+
41
+ .v-picker--landscape {
42
+ grid-template-areas: "title" "header body" "header body";
43
+ }
44
+
45
+ .v-picker--landscape.v-picker--with-actions {
46
+ grid-template-areas: "title" "header body" "header actions";
47
+ }
48
+
49
+ .v-picker-title {
50
+ text-transform: uppercase;
51
+ font-size: 0.75rem;
52
+ grid-area: title;
53
+ padding-inline: 24px 12px;
54
+ padding-top: 16px;
55
+ padding-bottom: 16px;
56
+ font-weight: 400;
57
+ letter-spacing: 0.1666666667em;
54
58
  }