vuetify 3.3.2 → 3.3.4

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 (356) hide show
  1. package/dist/_component-variables-labs.sass +2 -0
  2. package/dist/json/attributes.json +460 -20
  3. package/dist/json/importMap-labs.json +32 -0
  4. package/dist/json/importMap.json +24 -24
  5. package/dist/json/tags.json +150 -0
  6. package/dist/json/web-types.json +1639 -40
  7. package/dist/vuetify-labs.css +499 -230
  8. package/dist/vuetify-labs.d.ts +5421 -326
  9. package/dist/vuetify-labs.esm.js +2124 -1098
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +2123 -1097
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +219 -210
  14. package/dist/vuetify.d.ts +314 -165
  15. package/dist/vuetify.esm.js +330 -179
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +329 -178
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +792 -784
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/blueprints/index.d.mts +34 -27
  23. package/lib/blueprints/md1.d.mts +34 -27
  24. package/lib/blueprints/md2.d.mts +34 -27
  25. package/lib/blueprints/md3.d.mts +34 -27
  26. package/lib/components/VAppBar/VAppBar.mjs +3 -10
  27. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  28. package/lib/components/VAppBar/index.d.mts +24 -8
  29. package/lib/components/VAutocomplete/VAutocomplete.css +4 -22
  30. package/lib/components/VAutocomplete/VAutocomplete.mjs +17 -12
  31. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  32. package/lib/components/VAutocomplete/VAutocomplete.sass +6 -17
  33. package/lib/components/VBreadcrumbs/index.d.mts +7 -7
  34. package/lib/components/VBtn/VBtn.css +11 -11
  35. package/lib/components/VBtn/VBtn.mjs +1 -1
  36. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  37. package/lib/components/VBtn/VBtn.sass +1 -1
  38. package/lib/components/VBtn/_mixins.scss +1 -1
  39. package/lib/components/VBtn/index.d.mts +24 -8
  40. package/lib/components/VCard/VCard.mjs +1 -1
  41. package/lib/components/VCard/VCard.mjs.map +1 -1
  42. package/lib/components/VCard/index.d.mts +44 -28
  43. package/lib/components/VCheckbox/VCheckbox.mjs +8 -1
  44. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  45. package/lib/components/VCheckbox/index.d.mts +7 -1
  46. package/lib/components/VChip/VChip.css +67 -67
  47. package/lib/components/VChip/VChip.mjs +2 -2
  48. package/lib/components/VChip/VChip.mjs.map +1 -1
  49. package/lib/components/VChip/_variables.scss +1 -1
  50. package/lib/components/VChip/index.d.mts +48 -32
  51. package/lib/components/VCombobox/VCombobox.css +4 -22
  52. package/lib/components/VCombobox/VCombobox.mjs +16 -8
  53. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  54. package/lib/components/VCombobox/VCombobox.sass +6 -17
  55. package/lib/components/VCombobox/_variables.scss +3 -3
  56. package/lib/components/VCounter/index.d.mts +8 -8
  57. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +1 -1
  58. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  59. package/lib/components/VExpansionPanel/index.d.mts +56 -24
  60. package/lib/components/VField/VField.css +72 -8
  61. package/lib/components/VField/VField.sass +10 -5
  62. package/lib/components/VField/_mixins.sass +7 -0
  63. package/lib/components/VFileInput/VFileInput.css +2 -17
  64. package/lib/components/VFileInput/VFileInput.mjs +0 -2
  65. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  66. package/lib/components/VFileInput/VFileInput.sass +2 -11
  67. package/lib/components/VFileInput/_variables.scss +3 -3
  68. package/lib/components/VIcon/VIcon.mjs +2 -2
  69. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  70. package/lib/components/VInput/VInput.css +14 -1
  71. package/lib/components/VInput/VInput.sass +6 -0
  72. package/lib/components/VInput/_variables.scss +5 -1
  73. package/lib/components/VList/VListItem.mjs +2 -2
  74. package/lib/components/VList/VListItem.mjs.map +1 -1
  75. package/lib/components/VList/index.d.mts +24 -8
  76. package/lib/components/VMenu/VMenu.mjs +29 -3
  77. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  78. package/lib/components/VOverlay/VOverlay.mjs +7 -4
  79. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  80. package/lib/components/VOverlay/useActivator.mjs +29 -35
  81. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  82. package/lib/components/VSelect/VSelect.css +2 -20
  83. package/lib/components/VSelect/VSelect.mjs +16 -11
  84. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  85. package/lib/components/VSelect/VSelect.sass +2 -12
  86. package/lib/components/VSelect/_variables.scss +3 -3
  87. package/lib/components/VSlider/VSliderThumb.mjs +2 -2
  88. package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
  89. package/lib/components/VTabs/VTab.mjs +2 -2
  90. package/lib/components/VTabs/VTab.mjs.map +1 -1
  91. package/lib/components/VTabs/VTabs.css +1 -0
  92. package/lib/components/VTabs/VTabs.sass +1 -0
  93. package/lib/components/VTabs/index.d.mts +24 -8
  94. package/lib/components/VTextarea/VTextarea.css +7 -7
  95. package/lib/components/VTextarea/VTextarea.sass +9 -9
  96. package/lib/components/VTimePicker/VTimePickerTitle.mjs +1 -1
  97. package/lib/components/index.d.mts +266 -132
  98. package/lib/components/index.mjs +1 -2
  99. package/lib/components/index.mjs.map +1 -1
  100. package/lib/composables/icons.mjs.map +1 -1
  101. package/lib/composables/list-items.mjs +5 -2
  102. package/lib/composables/list-items.mjs.map +1 -1
  103. package/lib/composables/nested/nested.mjs +1 -1
  104. package/lib/composables/nested/nested.mjs.map +1 -1
  105. package/lib/composables/theme.mjs +1 -1
  106. package/lib/composables/theme.mjs.map +1 -1
  107. package/lib/entry-bundler.mjs +1 -1
  108. package/lib/framework.mjs +1 -1
  109. package/lib/iconsets/fa-svg.d.mts +1 -0
  110. package/lib/iconsets/fa.d.mts +1 -0
  111. package/lib/iconsets/fa.mjs +2 -1
  112. package/lib/iconsets/fa.mjs.map +1 -1
  113. package/lib/iconsets/fa4.d.mts +1 -0
  114. package/lib/iconsets/fa4.mjs +2 -1
  115. package/lib/iconsets/fa4.mjs.map +1 -1
  116. package/lib/iconsets/md.d.mts +1 -0
  117. package/lib/iconsets/md.mjs +2 -1
  118. package/lib/iconsets/md.mjs.map +1 -1
  119. package/lib/iconsets/mdi-svg.d.mts +1 -0
  120. package/lib/iconsets/mdi-svg.mjs +36 -35
  121. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  122. package/lib/iconsets/mdi.d.mts +1 -0
  123. package/lib/iconsets/mdi.mjs +2 -1
  124. package/lib/iconsets/mdi.mjs.map +1 -1
  125. package/lib/index.d.mts +48 -33
  126. package/lib/labs/VDataTable/VDataTable.css +4 -14
  127. package/lib/labs/VDataTable/VDataTable.sass +6 -15
  128. package/lib/labs/VDataTable/VDataTableHeaders.mjs +2 -2
  129. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  130. package/lib/labs/VDataTable/VDataTableVirtual.mjs +16 -12
  131. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  132. package/lib/labs/VDataTable/composables/headers.mjs +2 -5
  133. package/lib/labs/VDataTable/composables/headers.mjs.map +1 -1
  134. package/lib/labs/VDataTable/composables/select.mjs +3 -2
  135. package/lib/labs/VDataTable/composables/select.mjs.map +1 -1
  136. package/lib/labs/VDateInput/VDateInput.mjs +127 -0
  137. package/lib/labs/VDateInput/VDateInput.mjs.map +1 -0
  138. package/lib/labs/VDateInput/VDateInput.sass +11 -0
  139. package/lib/labs/VDateInput/VDateRangeInput.mjs +223 -0
  140. package/lib/labs/VDateInput/VDateRangeInput.mjs.map +1 -0
  141. package/lib/labs/VDateInput/VDateRangeInput.sass +10 -0
  142. package/lib/labs/VDateInput/composables.mjs +59 -0
  143. package/lib/labs/VDateInput/composables.mjs.map +1 -0
  144. package/lib/labs/VDateInput/index.d.mts +1352 -0
  145. package/lib/labs/VDateInput/index.mjs +3 -0
  146. package/lib/labs/VDateInput/index.mjs.map +1 -0
  147. package/lib/labs/VDatePicker/VDateCard.css +33 -0
  148. package/lib/labs/VDatePicker/VDateCard.mjs +112 -0
  149. package/lib/labs/VDatePicker/VDateCard.mjs.map +1 -0
  150. package/lib/labs/VDatePicker/VDateCard.sass +32 -0
  151. package/lib/labs/VDatePicker/VDatePicker.css +23 -0
  152. package/lib/labs/VDatePicker/VDatePicker.mjs +172 -0
  153. package/lib/labs/VDatePicker/VDatePicker.mjs.map +1 -0
  154. package/lib/labs/VDatePicker/VDatePicker.sass +23 -0
  155. package/lib/labs/VDatePicker/VDatePickerControls.css +15 -0
  156. package/lib/labs/VDatePicker/VDatePickerControls.mjs +80 -0
  157. package/lib/labs/VDatePicker/VDatePickerControls.mjs.map +1 -0
  158. package/lib/labs/VDatePicker/VDatePickerControls.sass +15 -0
  159. package/lib/labs/VDatePicker/VDatePickerHeader.css +54 -0
  160. package/lib/labs/VDatePicker/VDatePickerHeader.mjs +75 -0
  161. package/lib/labs/VDatePicker/VDatePickerHeader.mjs.map +1 -0
  162. package/lib/labs/VDatePicker/VDatePickerHeader.sass +51 -0
  163. package/lib/labs/VDatePicker/VDatePickerInput.sass +17 -0
  164. package/lib/labs/VDatePicker/VDatePickerMonth.css +77 -0
  165. package/lib/labs/VDatePicker/VDatePickerMonth.mjs +286 -0
  166. package/lib/labs/VDatePicker/VDatePickerMonth.mjs.map +1 -0
  167. package/lib/labs/VDatePicker/VDatePickerMonth.sass +69 -0
  168. package/lib/{components → labs}/VDatePicker/VDatePickerTitle.mjs +1 -1
  169. package/lib/labs/VDatePicker/VDatePickerTitle.mjs.map +1 -0
  170. package/lib/labs/VDatePicker/VDatePickerYears.css +18 -0
  171. package/lib/labs/VDatePicker/VDatePickerYears.mjs +64 -0
  172. package/lib/labs/VDatePicker/VDatePickerYears.mjs.map +1 -0
  173. package/lib/labs/VDatePicker/VDatePickerYears.sass +16 -0
  174. package/lib/labs/VDatePicker/composables.mjs +33 -0
  175. package/lib/labs/VDatePicker/composables.mjs.map +1 -0
  176. package/lib/labs/VDatePicker/index.d.mts +4430 -0
  177. package/lib/labs/VDatePicker/index.mjs +7 -0
  178. package/lib/labs/VDatePicker/index.mjs.map +1 -0
  179. package/lib/labs/VDatePicker/mixins/date-picker-table.mjs.map +1 -0
  180. package/lib/labs/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -0
  181. package/lib/labs/VDatePicker/util/eventHelpers.mjs.map +1 -0
  182. package/lib/labs/VDatePicker/util/index.mjs.map +1 -0
  183. package/lib/labs/VDatePicker/util/isDateAllowed.mjs.map +1 -0
  184. package/lib/labs/VDatePicker/util/monthChange.mjs.map +1 -0
  185. package/lib/labs/VDatePicker/util/pad.mjs.map +1 -0
  186. package/lib/labs/VDatePicker/util/sanitizeDateString.mjs.map +1 -0
  187. package/lib/labs/VDatePicker/utils.mjs +69 -0
  188. package/lib/labs/VDatePicker/utils.mjs.map +1 -0
  189. package/lib/labs/VDateRangePicker/VDateRangeCard.mjs +87 -0
  190. package/lib/labs/VDateRangePicker/VDateRangeCard.mjs.map +1 -0
  191. package/lib/labs/VDateRangePicker/VDateRangeCard.sass +33 -0
  192. package/lib/labs/VDateRangePicker/VDateRangePicker.mjs +131 -0
  193. package/lib/labs/VDateRangePicker/VDateRangePicker.mjs.map +1 -0
  194. package/lib/labs/VDateRangePicker/VDateRangePicker.sass +21 -0
  195. package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs +103 -0
  196. package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs.map +1 -0
  197. package/lib/labs/VDateRangePicker/VDateRangePickerHeader.sass +39 -0
  198. package/lib/labs/VDateRangePicker/VDateRangePickerMonth.mjs +61 -0
  199. package/lib/labs/VDateRangePicker/VDateRangePickerMonth.mjs.map +1 -0
  200. package/lib/labs/VDateRangePicker/VDateRangePickerMonth.sass +12 -0
  201. package/lib/labs/VDateRangePicker/index.d.mts +1065 -0
  202. package/lib/labs/VDateRangePicker/index.mjs +3 -0
  203. package/lib/labs/VDateRangePicker/index.mjs.map +1 -0
  204. package/lib/labs/VPicker/VPicker.css +57 -0
  205. package/lib/labs/VPicker/VPicker.mjs +47 -0
  206. package/lib/labs/VPicker/VPicker.mjs.map +1 -0
  207. package/lib/labs/VPicker/VPicker.sass +53 -0
  208. package/lib/labs/VPicker/VPickerTitle.mjs +4 -0
  209. package/lib/labs/VPicker/VPickerTitle.mjs.map +1 -0
  210. package/lib/labs/VPicker/index.d.mts +541 -0
  211. package/lib/labs/VPicker/index.mjs +3 -0
  212. package/lib/labs/VPicker/index.mjs.map +1 -0
  213. package/lib/labs/components.d.mts +5136 -198
  214. package/lib/labs/components.mjs +2 -0
  215. package/lib/labs/components.mjs.map +1 -1
  216. package/lib/labs/date/DateAdapter.mjs.map +1 -1
  217. package/lib/labs/date/adapters/vuetify.d.mts +28 -25
  218. package/lib/labs/date/adapters/vuetify.mjs +65 -75
  219. package/lib/labs/date/adapters/vuetify.mjs.map +1 -1
  220. package/lib/labs/date/date.mjs +82 -11
  221. package/lib/labs/date/date.mjs.map +1 -1
  222. package/lib/labs/date/index.d.mts +31 -30
  223. package/lib/locale/af.mjs +14 -5
  224. package/lib/locale/af.mjs.map +1 -1
  225. package/lib/locale/ar.mjs +14 -5
  226. package/lib/locale/ar.mjs.map +1 -1
  227. package/lib/locale/az.mjs +14 -5
  228. package/lib/locale/az.mjs.map +1 -1
  229. package/lib/locale/bg.mjs +14 -5
  230. package/lib/locale/bg.mjs.map +1 -1
  231. package/lib/locale/ca.mjs +14 -5
  232. package/lib/locale/ca.mjs.map +1 -1
  233. package/lib/locale/ckb.mjs +14 -5
  234. package/lib/locale/ckb.mjs.map +1 -1
  235. package/lib/locale/cs.mjs +14 -5
  236. package/lib/locale/cs.mjs.map +1 -1
  237. package/lib/locale/da.mjs +14 -5
  238. package/lib/locale/da.mjs.map +1 -1
  239. package/lib/locale/de.mjs +14 -5
  240. package/lib/locale/de.mjs.map +1 -1
  241. package/lib/locale/el.mjs +14 -5
  242. package/lib/locale/el.mjs.map +1 -1
  243. package/lib/locale/en.mjs +14 -5
  244. package/lib/locale/en.mjs.map +1 -1
  245. package/lib/locale/es.mjs +14 -5
  246. package/lib/locale/es.mjs.map +1 -1
  247. package/lib/locale/et.mjs +14 -5
  248. package/lib/locale/et.mjs.map +1 -1
  249. package/lib/locale/fa.mjs +14 -5
  250. package/lib/locale/fa.mjs.map +1 -1
  251. package/lib/locale/fi.mjs +14 -5
  252. package/lib/locale/fi.mjs.map +1 -1
  253. package/lib/locale/fr.mjs +14 -5
  254. package/lib/locale/fr.mjs.map +1 -1
  255. package/lib/locale/he.mjs +14 -5
  256. package/lib/locale/he.mjs.map +1 -1
  257. package/lib/locale/hr.mjs +14 -5
  258. package/lib/locale/hr.mjs.map +1 -1
  259. package/lib/locale/hu.mjs +14 -5
  260. package/lib/locale/hu.mjs.map +1 -1
  261. package/lib/locale/id.mjs +14 -5
  262. package/lib/locale/id.mjs.map +1 -1
  263. package/lib/locale/index.d.mts +588 -210
  264. package/lib/locale/it.mjs +14 -5
  265. package/lib/locale/it.mjs.map +1 -1
  266. package/lib/locale/ja.mjs +14 -5
  267. package/lib/locale/ja.mjs.map +1 -1
  268. package/lib/locale/ko.mjs +14 -5
  269. package/lib/locale/ko.mjs.map +1 -1
  270. package/lib/locale/lt.mjs +14 -5
  271. package/lib/locale/lt.mjs.map +1 -1
  272. package/lib/locale/lv.mjs +14 -5
  273. package/lib/locale/lv.mjs.map +1 -1
  274. package/lib/locale/nl.mjs +14 -5
  275. package/lib/locale/nl.mjs.map +1 -1
  276. package/lib/locale/no.mjs +14 -5
  277. package/lib/locale/no.mjs.map +1 -1
  278. package/lib/locale/pl.mjs +14 -5
  279. package/lib/locale/pl.mjs.map +1 -1
  280. package/lib/locale/pt.mjs +14 -5
  281. package/lib/locale/pt.mjs.map +1 -1
  282. package/lib/locale/ro.mjs +14 -5
  283. package/lib/locale/ro.mjs.map +1 -1
  284. package/lib/locale/ru.mjs +14 -5
  285. package/lib/locale/ru.mjs.map +1 -1
  286. package/lib/locale/sk.mjs +14 -5
  287. package/lib/locale/sk.mjs.map +1 -1
  288. package/lib/locale/sl.mjs +14 -5
  289. package/lib/locale/sl.mjs.map +1 -1
  290. package/lib/locale/sr-Cyrl.mjs +14 -5
  291. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  292. package/lib/locale/sr-Latn.mjs +14 -5
  293. package/lib/locale/sr-Latn.mjs.map +1 -1
  294. package/lib/locale/sv.mjs +14 -5
  295. package/lib/locale/sv.mjs.map +1 -1
  296. package/lib/locale/th.mjs +14 -5
  297. package/lib/locale/th.mjs.map +1 -1
  298. package/lib/locale/tr.mjs +14 -5
  299. package/lib/locale/tr.mjs.map +1 -1
  300. package/lib/locale/uk.mjs +14 -5
  301. package/lib/locale/uk.mjs.map +1 -1
  302. package/lib/locale/vi.mjs +14 -5
  303. package/lib/locale/vi.mjs.map +1 -1
  304. package/lib/locale/zh-Hans.mjs +14 -5
  305. package/lib/locale/zh-Hans.mjs.map +1 -1
  306. package/lib/locale/zh-Hant.mjs +14 -5
  307. package/lib/locale/zh-Hant.mjs.map +1 -1
  308. package/lib/util/bindProps.mjs +49 -0
  309. package/lib/util/bindProps.mjs.map +1 -0
  310. package/lib/util/dateTimeUtils.mjs +68 -0
  311. package/lib/util/dateTimeUtils.mjs.map +1 -1
  312. package/lib/util/helpers.mjs +3 -0
  313. package/lib/util/helpers.mjs.map +1 -1
  314. package/lib/util/index.mjs +1 -0
  315. package/lib/util/index.mjs.map +1 -1
  316. package/package.json +5 -2
  317. package/lib/components/VDatePicker/VDatePicker.mjs +0 -475
  318. package/lib/components/VDatePicker/VDatePicker.mjs.map +0 -1
  319. package/lib/components/VDatePicker/VDatePickerDateTable.mjs +0 -120
  320. package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +0 -1
  321. package/lib/components/VDatePicker/VDatePickerHeader.mjs +0 -136
  322. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +0 -1
  323. package/lib/components/VDatePicker/VDatePickerHeader.sass +0 -46
  324. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +0 -48
  325. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +0 -1
  326. package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +0 -1
  327. package/lib/components/VDatePicker/VDatePickerYears.mjs +0 -84
  328. package/lib/components/VDatePicker/VDatePickerYears.mjs.map +0 -1
  329. package/lib/components/VDatePicker/VDatePickerYears.sass +0 -30
  330. package/lib/components/VDatePicker/index.mjs +0 -18
  331. package/lib/components/VDatePicker/index.mjs.map +0 -1
  332. package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +0 -1
  333. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +0 -1
  334. package/lib/components/VDatePicker/util/eventHelpers.mjs.map +0 -1
  335. package/lib/components/VDatePicker/util/index.mjs.map +0 -1
  336. package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +0 -1
  337. package/lib/components/VDatePicker/util/monthChange.mjs.map +0 -1
  338. package/lib/components/VDatePicker/util/pad.mjs.map +0 -1
  339. package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +0 -1
  340. package/lib/components/VPicker/VPicker.mjs +0 -86
  341. package/lib/components/VPicker/VPicker.mjs.map +0 -1
  342. package/lib/components/VPicker/VPicker.sass +0 -94
  343. package/lib/components/VPicker/index.mjs +0 -4
  344. package/lib/components/VPicker/index.mjs.map +0 -1
  345. /package/lib/{components → labs}/VDatePicker/VDatePickerTable.sass +0 -0
  346. /package/lib/{components → labs}/VDatePicker/VDatePickerTitle.sass +0 -0
  347. /package/lib/{components → labs}/VDatePicker/_variables.scss +0 -0
  348. /package/lib/{components → labs}/VDatePicker/mixins/date-picker-table.mjs +0 -0
  349. /package/lib/{components → labs}/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -0
  350. /package/lib/{components → labs}/VDatePicker/util/eventHelpers.mjs +0 -0
  351. /package/lib/{components → labs}/VDatePicker/util/index.mjs +0 -0
  352. /package/lib/{components → labs}/VDatePicker/util/isDateAllowed.mjs +0 -0
  353. /package/lib/{components → labs}/VDatePicker/util/monthChange.mjs +0 -0
  354. /package/lib/{components → labs}/VDatePicker/util/pad.mjs +0 -0
  355. /package/lib/{components → labs}/VDatePicker/util/sanitizeDateString.mjs +0 -0
  356. /package/lib/{components → labs}/VPicker/_variables.scss +0 -0
@@ -290,7 +290,9 @@ declare const VExpansionPanel: {
290
290
  readonly?: boolean | undefined;
291
291
  tag?: string | undefined;
292
292
  rounded?: string | number | boolean | undefined;
293
- ripple?: boolean | Record<string, any> | undefined;
293
+ ripple?: boolean | {
294
+ class: string;
295
+ } | undefined;
294
296
  collapseIcon?: IconValue | undefined;
295
297
  expandIcon?: IconValue | undefined;
296
298
  hideActions?: boolean | undefined;
@@ -390,7 +392,9 @@ declare const VExpansionPanel: {
390
392
  disabled: boolean;
391
393
  readonly: boolean;
392
394
  tag: string;
393
- ripple: boolean | Record<string, any>;
395
+ ripple: boolean | {
396
+ class: string;
397
+ } | undefined;
394
398
  collapseIcon: IconValue;
395
399
  expandIcon: IconValue;
396
400
  hideActions: boolean;
@@ -434,7 +438,9 @@ declare const VExpansionPanel: {
434
438
  readonly: boolean;
435
439
  tag: string;
436
440
  rounded: string | number | boolean;
437
- ripple: boolean | Record<string, any>;
441
+ ripple: boolean | {
442
+ class: string;
443
+ } | undefined;
438
444
  collapseIcon: IconValue;
439
445
  expandIcon: IconValue;
440
446
  hideActions: boolean;
@@ -474,7 +480,9 @@ declare const VExpansionPanel: {
474
480
  disabled: boolean;
475
481
  readonly: boolean;
476
482
  tag: string;
477
- ripple: boolean | Record<string, any>;
483
+ ripple: boolean | {
484
+ class: string;
485
+ } | undefined;
478
486
  collapseIcon: IconValue;
479
487
  expandIcon: IconValue;
480
488
  hideActions: boolean;
@@ -517,7 +525,9 @@ declare const VExpansionPanel: {
517
525
  disabled: boolean;
518
526
  readonly: boolean;
519
527
  tag: string;
520
- ripple: boolean | Record<string, any>;
528
+ ripple: boolean | {
529
+ class: string;
530
+ } | undefined;
521
531
  collapseIcon: IconValue;
522
532
  expandIcon: IconValue;
523
533
  hideActions: boolean;
@@ -561,7 +571,9 @@ declare const VExpansionPanel: {
561
571
  readonly: boolean;
562
572
  tag: string;
563
573
  rounded: string | number | boolean;
564
- ripple: boolean | Record<string, any>;
574
+ ripple: boolean | {
575
+ class: string;
576
+ } | undefined;
565
577
  collapseIcon: IconValue;
566
578
  expandIcon: IconValue;
567
579
  hideActions: boolean;
@@ -592,7 +604,9 @@ declare const VExpansionPanel: {
592
604
  };
593
605
  hideActions: BooleanConstructor;
594
606
  ripple: {
595
- type: (ObjectConstructor | BooleanConstructor)[];
607
+ type: vue.PropType<boolean | {
608
+ class: string;
609
+ } | undefined>;
596
610
  default: boolean;
597
611
  };
598
612
  readonly: BooleanConstructor;
@@ -632,7 +646,9 @@ declare const VExpansionPanel: {
632
646
  };
633
647
  hideActions: BooleanConstructor;
634
648
  ripple: {
635
- type: (ObjectConstructor | BooleanConstructor)[];
649
+ type: vue.PropType<boolean | {
650
+ class: string;
651
+ } | undefined>;
636
652
  default: boolean;
637
653
  };
638
654
  readonly: BooleanConstructor;
@@ -842,7 +858,9 @@ declare const VExpansionPanelTitle: {
842
858
  $props: {
843
859
  style?: vue.StyleValue | undefined;
844
860
  readonly?: boolean | undefined;
845
- ripple?: boolean | Record<string, any> | undefined;
861
+ ripple?: boolean | {
862
+ class: string;
863
+ } | undefined;
846
864
  collapseIcon?: IconValue | undefined;
847
865
  expandIcon?: IconValue | undefined;
848
866
  hideActions?: boolean | undefined;
@@ -922,7 +940,9 @@ declare const VExpansionPanelTitle: {
922
940
  $options: vue.ComponentOptionsBase<{
923
941
  style: vue.StyleValue;
924
942
  readonly: boolean;
925
- ripple: boolean | Record<string, any>;
943
+ ripple: boolean | {
944
+ class: string;
945
+ } | undefined;
926
946
  collapseIcon: IconValue;
927
947
  expandIcon: IconValue;
928
948
  hideActions: boolean;
@@ -944,7 +964,9 @@ declare const VExpansionPanelTitle: {
944
964
  }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
945
965
  style: vue.StyleValue;
946
966
  readonly: boolean;
947
- ripple: boolean | Record<string, any>;
967
+ ripple: boolean | {
968
+ class: string;
969
+ } | undefined;
948
970
  collapseIcon: IconValue;
949
971
  expandIcon: IconValue;
950
972
  hideActions: boolean;
@@ -978,7 +1000,9 @@ declare const VExpansionPanelTitle: {
978
1000
  } & {
979
1001
  style: vue.StyleValue;
980
1002
  readonly: boolean;
981
- ripple: boolean | Record<string, any>;
1003
+ ripple: boolean | {
1004
+ class: string;
1005
+ } | undefined;
982
1006
  collapseIcon: IconValue;
983
1007
  expandIcon: IconValue;
984
1008
  hideActions: boolean;
@@ -1004,7 +1028,9 @@ declare const VExpansionPanelTitle: {
1004
1028
  } & vue.ComponentOptionsBase<{
1005
1029
  style: vue.StyleValue;
1006
1030
  readonly: boolean;
1007
- ripple: boolean | Record<string, any>;
1031
+ ripple: boolean | {
1032
+ class: string;
1033
+ } | undefined;
1008
1034
  collapseIcon: IconValue;
1009
1035
  expandIcon: IconValue;
1010
1036
  hideActions: boolean;
@@ -1026,7 +1052,9 @@ declare const VExpansionPanelTitle: {
1026
1052
  }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
1027
1053
  style: vue.StyleValue;
1028
1054
  readonly: boolean;
1029
- ripple: boolean | Record<string, any>;
1055
+ ripple: boolean | {
1056
+ class: string;
1057
+ } | undefined;
1030
1058
  collapseIcon: IconValue;
1031
1059
  expandIcon: IconValue;
1032
1060
  hideActions: boolean;
@@ -1038,44 +1066,48 @@ declare const VExpansionPanelTitle: {
1038
1066
  [key: string]: any;
1039
1067
  }>[];
1040
1068
  }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
1041
- class: vue.PropType<any>;
1069
+ class: PropType<any>;
1042
1070
  style: {
1043
- type: vue.PropType<vue.StyleValue>;
1071
+ type: PropType<vue.StyleValue>;
1044
1072
  default: null;
1045
1073
  };
1046
1074
  color: StringConstructor;
1047
1075
  expandIcon: {
1048
- type: vue.PropType<IconValue>;
1076
+ type: PropType<IconValue>;
1049
1077
  default: string;
1050
1078
  };
1051
1079
  collapseIcon: {
1052
- type: vue.PropType<IconValue>;
1080
+ type: PropType<IconValue>;
1053
1081
  default: string;
1054
1082
  };
1055
1083
  hideActions: BooleanConstructor;
1056
1084
  ripple: {
1057
- type: (ObjectConstructor | BooleanConstructor)[];
1085
+ type: PropType<boolean | {
1086
+ class: string;
1087
+ } | undefined>;
1058
1088
  default: boolean;
1059
1089
  };
1060
1090
  readonly: BooleanConstructor;
1061
1091
  }, vue.ExtractPropTypes<{
1062
- class: vue.PropType<any>;
1092
+ class: PropType<any>;
1063
1093
  style: {
1064
- type: vue.PropType<vue.StyleValue>;
1094
+ type: PropType<vue.StyleValue>;
1065
1095
  default: null;
1066
1096
  };
1067
1097
  color: StringConstructor;
1068
1098
  expandIcon: {
1069
- type: vue.PropType<IconValue>;
1099
+ type: PropType<IconValue>;
1070
1100
  default: string;
1071
1101
  };
1072
1102
  collapseIcon: {
1073
- type: vue.PropType<IconValue>;
1103
+ type: PropType<IconValue>;
1074
1104
  default: string;
1075
1105
  };
1076
1106
  hideActions: BooleanConstructor;
1077
1107
  ripple: {
1078
- type: (ObjectConstructor | BooleanConstructor)[];
1108
+ type: PropType<boolean | {
1109
+ class: string;
1110
+ } | undefined>;
1079
1111
  default: boolean;
1080
1112
  };
1081
1113
  readonly: BooleanConstructor;
@@ -51,17 +51,47 @@
51
51
  border-bottom-right-radius: 0;
52
52
  }
53
53
  .v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-solo-inverted, .v-input--density-default .v-field--variant-solo-filled, .v-input--density-default .v-field--variant-filled {
54
- --v-input-control-height: 56px;
54
+ --v-input-control-height: 54px;
55
55
  --v-field-padding-bottom: 5px;
56
56
  }
57
57
 
58
+ .v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-solo-inverted, .v-input--density-default .v-field--variant-solo-filled, .v-input--density-default .v-field--variant-filled {
59
+ --v-input-control-height: 52px;
60
+ --v-field-padding-bottom: 5px;
61
+ }
62
+
63
+ .v-input--density-default .v-field--variant-solo, .v-input--density-default .v-field--variant-solo-inverted, .v-input--density-default .v-field--variant-solo-filled, .v-input--density-default .v-field--variant-filled {
64
+ --v-input-control-height: 50px;
65
+ --v-field-padding-bottom: 5px;
66
+ }
67
+
68
+ .v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-solo-inverted, .v-input--density-comfortable .v-field--variant-solo-filled, .v-input--density-comfortable .v-field--variant-filled {
69
+ --v-input-control-height: 46px;
70
+ --v-field-padding-bottom: 1px;
71
+ }
72
+
58
73
  .v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-solo-inverted, .v-input--density-comfortable .v-field--variant-solo-filled, .v-input--density-comfortable .v-field--variant-filled {
59
- --v-input-control-height: 48px;
74
+ --v-input-control-height: 44px;
60
75
  --v-field-padding-bottom: 1px;
61
76
  }
62
77
 
78
+ .v-input--density-comfortable .v-field--variant-solo, .v-input--density-comfortable .v-field--variant-solo-inverted, .v-input--density-comfortable .v-field--variant-solo-filled, .v-input--density-comfortable .v-field--variant-filled {
79
+ --v-input-control-height: 42px;
80
+ --v-field-padding-bottom: 1px;
81
+ }
82
+
83
+ .v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-solo-inverted, .v-input--density-compact .v-field--variant-solo-filled, .v-input--density-compact .v-field--variant-filled {
84
+ --v-input-control-height: 38px;
85
+ --v-field-padding-bottom: 0px;
86
+ }
87
+
88
+ .v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-solo-inverted, .v-input--density-compact .v-field--variant-solo-filled, .v-input--density-compact .v-field--variant-filled {
89
+ --v-input-control-height: 36px;
90
+ --v-field-padding-bottom: 0px;
91
+ }
92
+
63
93
  .v-input--density-compact .v-field--variant-solo, .v-input--density-compact .v-field--variant-solo-inverted, .v-input--density-compact .v-field--variant-solo-filled, .v-input--density-compact .v-field--variant-filled {
64
- --v-input-control-height: 40px;
94
+ --v-input-control-height: 34px;
65
95
  --v-field-padding-bottom: 0px;
66
96
  }
67
97
 
@@ -90,20 +120,53 @@
90
120
  --v-field-padding-top: var(--v-field-padding-top--plain-underlined, 6px);
91
121
  }
92
122
  .v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
93
- --v-input-control-height: 48px;
123
+ --v-input-control-height: 46px;
124
+ --v-field-padding-bottom: 5px;
125
+ }
126
+
127
+ .v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
128
+ --v-input-control-height: 44px;
129
+ --v-field-padding-bottom: 5px;
130
+ }
131
+
132
+ .v-input--density-default .v-field--variant-plain, .v-input--density-default .v-field--variant-underlined {
133
+ --v-input-control-height: 42px;
94
134
  --v-field-padding-bottom: 5px;
95
135
  }
96
136
 
97
137
  .v-input--density-comfortable .v-field--variant-plain, .v-input--density-comfortable .v-field--variant-underlined {
98
- --v-input-control-height: 40px;
138
+ --v-input-control-height: 38px;
99
139
  --v-field-padding-bottom: 1px;
100
140
  }
101
141
 
142
+ .v-input--density-comfortable .v-field--variant-plain, .v-input--density-comfortable .v-field--variant-underlined {
143
+ --v-input-control-height: 36px;
144
+ --v-field-padding-bottom: 1px;
145
+ }
146
+
147
+ .v-input--density-comfortable .v-field--variant-plain, .v-input--density-comfortable .v-field--variant-underlined {
148
+ --v-input-control-height: 34px;
149
+ --v-field-padding-bottom: 1px;
150
+ }
151
+
152
+ .v-input--density-compact .v-field--variant-plain, .v-input--density-compact .v-field--variant-underlined {
153
+ --v-input-control-height: 30px;
154
+ --v-field-padding-bottom: 0px;
155
+ }
156
+
102
157
  .v-input--density-compact .v-field--variant-plain, .v-input--density-compact .v-field--variant-underlined {
103
- --v-input-control-height: 32px;
158
+ --v-input-control-height: 28px;
104
159
  --v-field-padding-bottom: 0px;
105
160
  }
106
161
 
162
+ .v-input--density-compact .v-field--variant-plain, .v-input--density-compact .v-field--variant-underlined {
163
+ --v-input-control-height: 26px;
164
+ --v-field-padding-bottom: 0px;
165
+ }
166
+
167
+ .v-field--variant-outlined {
168
+ --v-input-chips-margin-bottom: 2px;
169
+ }
107
170
  .v-field--flat {
108
171
  box-shadow: none;
109
172
  }
@@ -125,13 +188,14 @@
125
188
  flex-wrap: wrap;
126
189
  letter-spacing: 0.009375em;
127
190
  opacity: var(--v-high-emphasis-opacity);
128
- min-height: var(--v-field-input-min-height);
191
+ min-height: calc(var(--v-field-input-min-height) + var(--v-input-chips-margin-bottom) + 2px);
129
192
  padding-inline-start: var(--v-field-padding-start);
130
193
  padding-inline-end: var(--v-field-padding-end);
131
194
  padding-top: var(--v-field-input-padding-top);
132
195
  padding-bottom: var(--v-field-input-padding-bottom);
196
+ position: relative;
133
197
  width: 100%;
134
- --v-field-input-min-height: max(var(--v-input-control-height, 56px), 1.625rem + var(--v-field-input-padding-top) + var(--v-field-input-padding-bottom));
198
+ --v-field-input-min-height: max(var(--v-input-control-height, 56px), 1.5rem + var(--v-field-input-padding-top) + var(--v-field-input-padding-bottom));
135
199
  }
136
200
  .v-field__input input {
137
201
  letter-spacing: inherit;
@@ -4,6 +4,7 @@
4
4
  @use '../../styles/settings'
5
5
  @use '../../styles/tools'
6
6
  @use './variables' as *
7
+ @use './mixins' as *
7
8
 
8
9
  /* region INPUT */
9
10
  .v-field
@@ -68,9 +69,9 @@
68
69
  $root: &
69
70
 
70
71
  @at-root
71
- @include tools.density('v-input', $input-density) using ($modifier)
72
+ @include input-density('v-input', $input-density, $input-chips-margin-bottom) using ($modifier, $chips-modifier)
72
73
  @at-root #{selector.nest(&, $root)}
73
- --v-input-control-height: #{$field-control-height + $modifier}
74
+ --v-input-control-height: #{$field-control-height + $modifier - math.div($chips-modifier, 2) - $input-chips-margin-top}
74
75
  --v-field-padding-bottom: #{math.max(0px, $field-control-padding-bottom + $modifier * .5)}
75
76
 
76
77
  &--variant-outlined,
@@ -96,11 +97,14 @@
96
97
  --v-field-padding-top: var(--v-field-padding-top--plain-underlined, 6px)
97
98
 
98
99
  @at-root
99
- @include tools.density('v-input', $input-density) using ($modifier)
100
+ @include input-density('v-input', $input-density, $input-chips-margin-bottom) using ($modifier, $chips-modifier)
100
101
  @at-root #{selector.nest(&, $root)}
101
- --v-input-control-height: #{$field-control-underlined-height + $modifier}
102
+ --v-input-control-height: #{$field-control-underlined-height + $modifier - math.div($chips-modifier, 2) - $input-chips-margin-top}
102
103
  --v-field-padding-bottom: #{math.max(0px, $field-control-padding-bottom + $modifier * .5)}
103
104
 
105
+ &--variant-outlined
106
+ --v-input-chips-margin-bottom: #{$input-chips-margin-top}
107
+
104
108
  &--flat
105
109
  box-shadow: none
106
110
 
@@ -123,11 +127,12 @@
123
127
  flex-wrap: wrap
124
128
  letter-spacing: $field-letter-spacing
125
129
  opacity: $field-input-opacity
126
- min-height: var(--v-field-input-min-height)
130
+ min-height: calc(var(--v-field-input-min-height) + var(--v-input-chips-margin-bottom) + $input-chips-margin-top)
127
131
  padding-inline-start: var(--v-field-padding-start)
128
132
  padding-inline-end: var(--v-field-padding-end)
129
133
  padding-top: var(--v-field-input-padding-top)
130
134
  padding-bottom: var(--v-field-input-padding-bottom)
135
+ position: relative
131
136
  width: 100%
132
137
  --v-field-input-min-height: #{$field-input-min-height}
133
138
 
@@ -0,0 +1,7 @@
1
+ @use '../../styles/settings'
2
+
3
+ @mixin input-density($name, $input-densities, $input-chips-margin-bottom)
4
+ @each $input-density, $input-multiplier in $input-densities
5
+ @each $input-chips-margin-bottom-density, $input-chips-margin-bottom-multiplier in $input-chips-margin-bottom
6
+ .#{$name}--density-#{$input-density}
7
+ @content($input-multiplier * settings.$spacer, $input-chips-margin-bottom-multiplier * settings.$spacer)
@@ -1,15 +1,3 @@
1
- .v-input--density-default {
2
- --file-input-chips-margin-bottom: 0px;
3
- }
4
-
5
- .v-input--density-comfortable {
6
- --file-input-chips-margin-bottom: 2px;
7
- }
8
-
9
- .v-input--density-compact {
10
- --file-input-chips-margin-bottom: 4px;
11
- }
12
-
13
1
  .v-file-input input[type=file] {
14
2
  height: 100%;
15
3
  left: 0;
@@ -19,10 +7,7 @@
19
7
  width: 100%;
20
8
  z-index: 1;
21
9
  }
22
- .v-file-input--chips .v-field__input, .v-file-input--selection-slot .v-field__input {
23
- min-height: calc(var(--v-field-input-min-height) + var(--file-input-chips-margin-bottom) + 2px);
24
- }
25
10
  .v-file-input .v-chip {
26
- margin-top: 2px;
27
- margin-bottom: var(--file-input-chips-margin-bottom);
11
+ margin-top: var(--v-input-chips-margin-top);
12
+ margin-bottom: var(--v-input-chips-margin-bottom);
28
13
  }
@@ -140,8 +140,6 @@ export const VFileInput = genericComponent()({
140
140
  "modelValue": model.value,
141
141
  "onUpdate:modelValue": $event => model.value = $event,
142
142
  "class": ['v-file-input', {
143
- 'v-file-input--chips': !!props.chips,
144
- 'v-file-input--selection-slot': !!slots.selection,
145
143
  'v-text-field--plain-underlined': isPlainOrUnderlined.value
146
144
  }, props.class],
147
145
  "style": props.style,
@@ -1 +1 @@
1
- {"version":3,"file":"VFileInput.mjs","names":["VChip","VCounter","VField","filterFieldProps","makeVFieldProps","makeVInputProps","VInput","useFocus","forwardRefs","useLocale","useProxiedModel","computed","nextTick","ref","watch","callEvent","filterInputAttrs","genericComponent","humanReadableFileSize","propsFactory","useRender","wrapInArray","makeVFileInputProps","chips","Boolean","counter","counterSizeString","type","String","default","counterString","multiple","showSize","Number","validator","v","includes","prependIcon","modelValue","Array","val","every","clearable","VFileInput","name","inheritAttrs","props","emits","e","focused","files","setup","_ref","attrs","emit","slots","t","model","isFocused","focus","blur","base","undefined","totalBytes","value","reduce","bytes","_ref2","size","totalBytesReadable","fileNames","map","file","counterValue","fileCount","length","vInputRef","vFieldRef","inputRef","isActive","active","isPlainOrUnderlined","variant","onFocus","document","activeElement","onClickPrepend","onControlClick","onControlMousedown","click","onClear","stopPropagation","newValue","hasModelReset","isArray","hasCounter","hasDetails","details","rootAttrs","inputAttrs","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","selection","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","_ref4","fieldClass","slotProps","_Fragment","target","text","color","join"],"sources":["../../../src/components/VFileInput/VFileInput.tsx"],"sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Components\nimport { VChip } from '@/components/VChip'\nimport { VCounter } from '@/components/VCounter'\nimport { VField } from '@/components/VField'\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport {\n callEvent,\n filterInputAttrs,\n genericComponent,\n humanReadableFileSize,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VFileInputSlots = VInputSlots & VFieldSlots & {\n counter: never\n selection: {\n fileNames: string[]\n totalBytes: number\n totalBytesReadable: string\n }\n}\n\nexport const makeVFileInputProps = propsFactory({\n chips: Boolean,\n counter: Boolean,\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n multiple: Boolean,\n showSize: {\n type: [Boolean, Number] as PropType<boolean | 1000 | 1024>,\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(v)\n )\n },\n },\n\n ...makeVInputProps({ prependIcon: '$file' }),\n\n modelValue: {\n type: Array as PropType<File[]>,\n default: () => ([]),\n validator: (val: any) => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n },\n\n ...makeVFieldProps({ clearable: true }),\n}, 'VFileInput')\n\nexport const VFileInput = genericComponent<VFileInputSlots>()({\n name: 'VFileInput',\n\n inheritAttrs: false,\n\n props: makeVFileInputProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (files: File[]) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { t } = useLocale()\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n const totalBytes = computed(() => (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0))\n const totalBytesReadable = computed(() => humanReadableFileSize(totalBytes.value, base.value))\n\n const fileNames = computed(() => (model.value ?? []).map(file => {\n const { name = '', size = 0 } = file\n\n return !props.showSize\n ? name\n : `${name} (${humanReadableFileSize(size, base.value)})`\n }))\n\n const counterValue = computed(() => {\n const fileCount = model.value?.length ?? 0\n if (props.showSize) return t(props.counterSizeString, fileCount, totalBytesReadable.value)\n else return t(props.counterString, fileCount)\n })\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n isFocused.value ||\n props.active\n ))\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onClickPrepend (e: MouseEvent) {\n onControlClick(e)\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onControlClick (e: MouseEvent) {\n inputRef.value?.click()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = []\n\n callEvent(props['onClick:clear'], e)\n })\n }\n\n watch(model, newValue => {\n const hasModelReset = !Array.isArray(newValue) || !newValue.length\n\n if (hasModelReset && inputRef.value) {\n inputRef.value.value = ''\n }\n })\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = VInput.filterProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-file-input',\n {\n 'v-file-input--chips': !!props.chips,\n 'v-file-input--selection-slot': !!slots.selection,\n 'v-text-field--plain-underlined': isPlainOrUnderlined.value,\n },\n props.class,\n ]}\n style={ props.style }\n onClick:prepend={ onClickPrepend }\n { ...rootAttrs }\n { ...inputProps }\n centerAffix={ !isPlainOrUnderlined.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n prepend-icon={ props.prependIcon }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <>\n <input\n ref={ inputRef }\n type=\"file\"\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n multiple={ props.multiple }\n name={ props.name }\n onClick={ e => {\n e.stopPropagation()\n\n onFocus()\n }}\n onChange={ e => {\n if (!e.target) return\n\n const target = e.target as HTMLInputElement\n model.value = [...target.files ?? []]\n }}\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n\n <div class={ fieldClass }>\n { !!model.value?.length && (\n slots.selection ? slots.selection({\n fileNames: fileNames.value,\n totalBytes: totalBytes.value,\n totalBytesReadable: totalBytesReadable.value,\n })\n : props.chips ? fileNames.value.map(text => (\n <VChip\n key={ text }\n size=\"small\"\n color={ props.color }\n >{ text }</VChip>\n ))\n : fileNames.value.join(', ')\n )}\n </div>\n </>\n ),\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ !!model.value?.length }\n value={ counterValue.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VFileInput = InstanceType<typeof VFileInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,KAAK;AAAA,SACLC,QAAQ;AAAA,SACRC,MAAM;AAAA,SACNC,gBAAgB,EAAEC,eAAe;AAAA,SACjCC,eAAe,EAAEC,MAAM,gCAEhC;AAAA,SACSC,QAAQ;AAAA,SACRC,WAAW;AAAA,SACXC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAElDC,SAAS,EACTC,gBAAgB,EAChBC,gBAAgB,EAChBC,qBAAqB,EACrBC,YAAY,EACZC,SAAS,EACTC,WAAW,gCAGb;AAcA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,KAAK,EAAEC,OAAO;EACdC,OAAO,EAAED,OAAO;EAChBE,iBAAiB,EAAE;IACjBC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EACDC,aAAa,EAAE;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GpC,EAEJ,GAAGqC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOtD,WAAW,CAAC,CAAC,CAAC,EAAEoE,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VFileInput.mjs","names":["VChip","VCounter","VField","filterFieldProps","makeVFieldProps","makeVInputProps","VInput","useFocus","forwardRefs","useLocale","useProxiedModel","computed","nextTick","ref","watch","callEvent","filterInputAttrs","genericComponent","humanReadableFileSize","propsFactory","useRender","wrapInArray","makeVFileInputProps","chips","Boolean","counter","counterSizeString","type","String","default","counterString","multiple","showSize","Number","validator","v","includes","prependIcon","modelValue","Array","val","every","clearable","VFileInput","name","inheritAttrs","props","emits","e","focused","files","setup","_ref","attrs","emit","slots","t","model","isFocused","focus","blur","base","undefined","totalBytes","value","reduce","bytes","_ref2","size","totalBytesReadable","fileNames","map","file","counterValue","fileCount","length","vInputRef","vFieldRef","inputRef","isActive","active","isPlainOrUnderlined","variant","onFocus","document","activeElement","onClickPrepend","onControlClick","onControlMousedown","click","onClear","stopPropagation","newValue","hasModelReset","isArray","hasCounter","hasDetails","details","rootAttrs","inputAttrs","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","_ref4","fieldClass","slotProps","_Fragment","target","selection","text","color","join"],"sources":["../../../src/components/VFileInput/VFileInput.tsx"],"sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Components\nimport { VChip } from '@/components/VChip'\nimport { VCounter } from '@/components/VCounter'\nimport { VField } from '@/components/VField'\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport {\n callEvent,\n filterInputAttrs,\n genericComponent,\n humanReadableFileSize,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VFileInputSlots = VInputSlots & VFieldSlots & {\n counter: never\n selection: {\n fileNames: string[]\n totalBytes: number\n totalBytesReadable: string\n }\n}\n\nexport const makeVFileInputProps = propsFactory({\n chips: Boolean,\n counter: Boolean,\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n multiple: Boolean,\n showSize: {\n type: [Boolean, Number] as PropType<boolean | 1000 | 1024>,\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(v)\n )\n },\n },\n\n ...makeVInputProps({ prependIcon: '$file' }),\n\n modelValue: {\n type: Array as PropType<File[]>,\n default: () => ([]),\n validator: (val: any) => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n },\n\n ...makeVFieldProps({ clearable: true }),\n}, 'VFileInput')\n\nexport const VFileInput = genericComponent<VFileInputSlots>()({\n name: 'VFileInput',\n\n inheritAttrs: false,\n\n props: makeVFileInputProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (files: File[]) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { t } = useLocale()\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n const totalBytes = computed(() => (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0))\n const totalBytesReadable = computed(() => humanReadableFileSize(totalBytes.value, base.value))\n\n const fileNames = computed(() => (model.value ?? []).map(file => {\n const { name = '', size = 0 } = file\n\n return !props.showSize\n ? name\n : `${name} (${humanReadableFileSize(size, base.value)})`\n }))\n\n const counterValue = computed(() => {\n const fileCount = model.value?.length ?? 0\n if (props.showSize) return t(props.counterSizeString, fileCount, totalBytesReadable.value)\n else return t(props.counterString, fileCount)\n })\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n isFocused.value ||\n props.active\n ))\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onClickPrepend (e: MouseEvent) {\n onControlClick(e)\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onControlClick (e: MouseEvent) {\n inputRef.value?.click()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = []\n\n callEvent(props['onClick:clear'], e)\n })\n }\n\n watch(model, newValue => {\n const hasModelReset = !Array.isArray(newValue) || !newValue.length\n\n if (hasModelReset && inputRef.value) {\n inputRef.value.value = ''\n }\n })\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = VInput.filterProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-file-input',\n {\n 'v-text-field--plain-underlined': isPlainOrUnderlined.value,\n },\n props.class,\n ]}\n style={ props.style }\n onClick:prepend={ onClickPrepend }\n { ...rootAttrs }\n { ...inputProps }\n centerAffix={ !isPlainOrUnderlined.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n prepend-icon={ props.prependIcon }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <>\n <input\n ref={ inputRef }\n type=\"file\"\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n multiple={ props.multiple }\n name={ props.name }\n onClick={ e => {\n e.stopPropagation()\n\n onFocus()\n }}\n onChange={ e => {\n if (!e.target) return\n\n const target = e.target as HTMLInputElement\n model.value = [...target.files ?? []]\n }}\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n\n <div class={ fieldClass }>\n { !!model.value?.length && (\n slots.selection ? slots.selection({\n fileNames: fileNames.value,\n totalBytes: totalBytes.value,\n totalBytesReadable: totalBytesReadable.value,\n })\n : props.chips ? fileNames.value.map(text => (\n <VChip\n key={ text }\n size=\"small\"\n color={ props.color }\n >{ text }</VChip>\n ))\n : fileNames.value.join(', ')\n )}\n </div>\n </>\n ),\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ !!model.value?.length }\n value={ counterValue.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VFileInput = InstanceType<typeof VFileInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,KAAK;AAAA,SACLC,QAAQ;AAAA,SACRC,MAAM;AAAA,SACNC,gBAAgB,EAAEC,eAAe;AAAA,SACjCC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2D,IAAI,CAAC,IAAI,CAAC,CAC7B;YAAA;UAGN;QAAA,CAGN;QACD1B,OAAO,EAAED,UAAU,GAAGqB,SAAS,IAAAb,YAAA,CAAAc,SAAA,SAEzB/D,KAAK,CAAC0C,OAAO,GAAGoB,SAAS,CAAC,EAE1BtB,UAAU,IAAAS,YAAA,CAAAc,SAAA,SAAAd,YAAA,sBAAAA,YAAA,CAAAvG,QAAA;UAAA,UAKG,CAAC,CAACwD,KAAK,CAACO,KAAK,EAAEW,MAAM;UAAA,SACtBF,YAAY,CAACT;QAAK,GACRT,KAAK,CAAC9B,OAAO,GAGpC,EAEJ,GAAGqC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOtD,WAAW,CAAC,CAAC,CAAC,EAAEoE,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
@@ -2,10 +2,6 @@
2
2
  @use '../../styles/tools'
3
3
  @use 'sass:math'
4
4
 
5
- @at-root
6
- @include tools.density('v-input', $file-input-chips-margin-bottom) using ($modifier)
7
- --file-input-chips-margin-bottom: #{0px + math.div($modifier, 2)}
8
-
9
5
  // Block
10
6
  .v-file-input
11
7
  input[type="file"]
@@ -17,11 +13,6 @@
17
13
  width: 100%
18
14
  z-index: 1
19
15
 
20
- &--chips,
21
- &--selection-slot
22
- .v-field__input
23
- min-height: calc(var(--v-field-input-min-height) + var(--file-input-chips-margin-bottom) + $file-input-chips-margin-top)
24
-
25
16
  .v-chip
26
- margin-top: $file-input-chips-margin-top
27
- margin-bottom: var(--file-input-chips-margin-bottom)
17
+ margin-top: var(--v-input-chips-margin-top)
18
+ margin-bottom: var(--v-input-chips-margin-bottom)
@@ -1,4 +1,4 @@
1
1
  // Defaults
2
- $file-input-chip-margin-inline-end: 4px !default;
3
- $file-input-chips-margin-top: 2px !default;
4
- $file-input-chips-margin-bottom: ('default': 0, 'comfortable': 1, 'compact': 2) !default;
2
+ $file-input-chip-margin-inline-end: null !default;
3
+ $file-input-chips-margin-top: null !default;
4
+ $file-input-chips-margin-bottom: null !default;
@@ -10,7 +10,7 @@ import { makeSizeProps, useSize } from "../../composables/size.mjs";
10
10
  import { makeTagProps } from "../../composables/tag.mjs";
11
11
  import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
12
12
  import { computed, ref, Text, toRef } from 'vue';
13
- import { convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.mjs";
13
+ import { convertToUnit, flattenFragments, genericComponent, propsFactory, useRender } from "../../util/index.mjs";
14
14
  export const makeVIconProps = propsFactory({
15
15
  color: String,
16
16
  start: Boolean,
@@ -48,7 +48,7 @@ export const VIcon = genericComponent()({
48
48
  useRender(() => {
49
49
  const slotValue = slots.default?.();
50
50
  if (slotValue) {
51
- slotIcon.value = slotValue.filter(node => node.type === Text && node.children && typeof node.children === 'string')[0]?.children;
51
+ slotIcon.value = flattenFragments(slotValue).filter(node => node.type === Text && node.children && typeof node.children === 'string')[0]?.children;
52
52
  }
53
53
  return _createVNode(iconData.value.component, {
54
54
  "tag": props.tag,
@@ -1 +1 @@
1
- {"version":3,"file":"VIcon.mjs","names":["useTextColor","makeComponentProps","IconValue","useIcon","makeSizeProps","useSize","makeTagProps","makeThemeProps","provideTheme","computed","ref","Text","toRef","convertToUnit","genericComponent","propsFactory","useRender","makeVIconProps","color","String","start","Boolean","end","icon","tag","VIcon","name","props","setup","_ref","attrs","slots","slotIcon","themeClasses","iconData","value","sizeClasses","textColorClasses","textColorStyles","slotValue","default","filter","node","type","children","_createVNode","component","onClick","class","fontSize","size","height","width","undefined","style"],"sources":["../../../src/components/VIcon/VIcon.tsx"],"sourcesContent":["// Styles\nimport './VIcon.sass'\n\n// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { IconValue, useIcon } from '@/composables/icons'\nimport { makeSizeProps, useSize } from '@/composables/size'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, Text, toRef } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVIconProps = propsFactory({\n color: String,\n start: Boolean,\n end: Boolean,\n icon: IconValue,\n\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({ tag: 'i' }),\n ...makeThemeProps(),\n}, 'VIcon')\n\nexport const VIcon = genericComponent()({\n name: 'VIcon',\n\n props: makeVIconProps(),\n\n setup (props, { attrs, slots }) {\n const slotIcon = ref<string>()\n\n const { themeClasses } = provideTheme(props)\n const { iconData } = useIcon(computed(() => slotIcon.value || props.icon))\n const { sizeClasses } = useSize(props)\n const { textColorClasses, textColorStyles } = useTextColor(toRef(props, 'color'))\n\n useRender(() => {\n const slotValue = slots.default?.()\n if (slotValue) {\n slotIcon.value = slotValue.filter(node =>\n node.type === Text && node.children && typeof node.children === 'string'\n )[0]?.children as string\n }\n\n return (\n <iconData.value.component\n tag={ props.tag }\n icon={ iconData.value.icon }\n class={[\n 'v-icon',\n 'notranslate',\n themeClasses.value,\n sizeClasses.value,\n textColorClasses.value,\n {\n 'v-icon--clickable': !!attrs.onClick,\n 'v-icon--start': props.start,\n 'v-icon--end': props.end,\n },\n props.class,\n ]}\n style={[\n !sizeClasses.value ? ({\n fontSize: convertToUnit(props.size),\n height: convertToUnit(props.size),\n width: convertToUnit(props.size),\n }) : undefined,\n textColorStyles.value,\n props.style,\n ]}\n role={ attrs.onClick ? 'button' : undefined }\n aria-hidden={ !attrs.onClick }\n >\n { slotValue }\n </iconData.value.component>\n )\n })\n\n return {}\n },\n})\n\nexport type VIcon = InstanceType<typeof VIcon>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,kBAAkB;AAAA,SAClBC,SAAS,EAAEC,OAAO;AAAA,SAClBC,aAAa,EAAEC,OAAO;AAAA,SACtBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,uCAErC;AACA,SAASC,QAAQ,EAAEC,G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AI,CAACC,IAAI,KAAKhC,IAAI,IAAI+B,IAAI,CAACE,QAAQ,IAAI,OAAOF,IAAI,CAACE,QAAQ,KAAK,QAAQ,CACzE,CAAC,CAAC,CAAC,EAAEA,QAAkB;MAC1B;MAEA,OAAAC,YAAA,CAAAX,QAAA,CAAAC,KAAA,CAAAW,SAAA;QAAA,OAEUnB,KAAK,CAACH,GAAG;QAAA,QACRU,QAAQ,CAACC,KAAK,CAACZ,IAAI;QAAA,SACnB,CACL,QAAQ,EACR,aAAa,EACbU,YAAY,CAACE,KAAK,EAClBC,WAAW,CAACD,KAAK,EACjBE,gBAAgB,CAACF,KAAK,EACtB;UACE,mBAAmB,EAAE,CAAC,CAACL,KAAK,CAACiB,OAAO;UACpC,eAAe,EAAEpB,KAAK,CAACP,KAAK;UAC5B,aAAa,EAAEO,KAAK,CAACL;QACvB,CAAC,EACDK,KAAK,CAACqB,KAAK,CACZ;QAAA,SACM,CACL,CAACZ,WAAW,CAACD,KAAK,GAAI;UACpBc,QAAQ,EAAEpC,aAAa,CAACc,KAAK,CAACuB,IAAI,CAAC;UACnCC,MAAM,EAAEtC,aAAa,CAACc,KAAK,CAACuB,IAAI,CAAC;UACjCE,KAAK,EAAEvC,aAAa,CAACc,KAAK,CAACuB,IAAI;QACjC,CAAC,GAAIG,SAAS,EACdf,eAAe,CAACH,KAAK,EACrBR,KAAK,CAAC2B,KAAK,CACZ;QAAA,QACMxB,KAAK,CAACiB,OAAO,GAAG,QAAQ,GAAGM,SAAS;QAAA,eAC7B,CAACvB,KAAK,CAACiB;MAAO;QAAAP,OAAA,EAAAA,CAAA,MAE1BD,SAAS;MAAA;IAGjB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VIcon.mjs","names":["useTextColor","makeComponentProps","IconValue","useIcon","makeSizeProps","useSize","makeTagProps","makeThemeProps","provideTheme","computed","ref","Text","toRef","convertToUnit","flattenFragments","genericComponent","propsFactory","useRender","makeVIconProps","color","String","start","Boolean","end","icon","tag","VIcon","name","props","setup","_ref","attrs","slots","slotIcon","themeClasses","iconData","value","sizeClasses","textColorClasses","textColorStyles","slotValue","default","filter","node","type","children","_createVNode","component","onClick","class","fontSize","size","height","width","undefined","style"],"sources":["../../../src/components/VIcon/VIcon.tsx"],"sourcesContent":["// Styles\nimport './VIcon.sass'\n\n// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { IconValue, useIcon } from '@/composables/icons'\nimport { makeSizeProps, useSize } from '@/composables/size'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, Text, toRef } from 'vue'\nimport { convertToUnit, flattenFragments, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVIconProps = propsFactory({\n color: String,\n start: Boolean,\n end: Boolean,\n icon: IconValue,\n\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({ tag: 'i' }),\n ...makeThemeProps(),\n}, 'VIcon')\n\nexport const VIcon = genericComponent()({\n name: 'VIcon',\n\n props: makeVIconProps(),\n\n setup (props, { attrs, slots }) {\n const slotIcon = ref<string>()\n\n const { themeClasses } = provideTheme(props)\n const { iconData } = useIcon(computed(() => slotIcon.value || props.icon))\n const { sizeClasses } = useSize(props)\n const { textColorClasses, textColorStyles } = useTextColor(toRef(props, 'color'))\n\n useRender(() => {\n const slotValue = slots.default?.()\n if (slotValue) {\n slotIcon.value = flattenFragments(slotValue).filter(node =>\n node.type === Text && node.children && typeof node.children === 'string'\n )[0]?.children as string\n }\n\n return (\n <iconData.value.component\n tag={ props.tag }\n icon={ iconData.value.icon }\n class={[\n 'v-icon',\n 'notranslate',\n themeClasses.value,\n sizeClasses.value,\n textColorClasses.value,\n {\n 'v-icon--clickable': !!attrs.onClick,\n 'v-icon--start': props.start,\n 'v-icon--end': props.end,\n },\n props.class,\n ]}\n style={[\n !sizeClasses.value ? ({\n fontSize: convertToUnit(props.size),\n height: convertToUnit(props.size),\n width: convertToUnit(props.size),\n }) : undefined,\n textColorStyles.value,\n props.style,\n ]}\n role={ attrs.onClick ? 'button' : undefined }\n aria-hidden={ !attrs.onClick }\n >\n { slotValue }\n </iconData.value.component>\n )\n })\n\n return {}\n },\n})\n\nexport type VIcon = InstanceType<typeof VIcon>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,kBAAkB;AAAA,SAClBC,SAAS,EAAEC,OAAO;AAAA,SAClBC,aAAa,EAAEC,OAAO;AAAA,SACtBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,uCAErC;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,IAAI,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACvCC,aAAa,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAEnF,OAAO,MAAMC,cAAc,GAAGF,YAAY,CAAC;EACzCG,KAAK,EAAEC,MAAM;EACbC,KAAK,EAAEC,OAAO;EACdC,GAAG,EAAED,OAAO;EACZE,IAAI,EAAEtB,SAAS;EAEf,GAAGD,kBAAkB,EAAE;EACvB,GAAGG,aAAa,EAAE;EAClB,GAAGE,YAAY,CAAC;IAAEmB,GAAG,EAAE;EAAI,CAAC,CAAC;EAC7B,GAAGlB,cAAc;AACnB,CAAC,EAAE,OAAO,CAAC;AAEX,OAAO,MAAMmB,KAAK,GAAGX,gBAAgB,EAAE,CAAC;EACtCY,IAAI,EAAE,OAAO;EAEbC,KAAK,EAAEV,cAAc,EAAE;EAEvBW,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAoB;IAAA,IAAlB;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC5B,MAAMG,QAAQ,GAAGvB,GAAG,EAAU;IAE9B,MAAM;MAAEwB;IAAa,CAAC,GAAG1B,YAAY,CAACoB,KAAK,CAAC;IAC5C,MAAM;MAAEO;IAAS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ExC,aAAa,CAACe,KAAK,CAACuB,IAAI;QACjC,CAAC,GAAIG,SAAS,EACdf,eAAe,CAACH,KAAK,EACrBR,KAAK,CAAC2B,KAAK,CACZ;QAAA,QACMxB,KAAK,CAACiB,OAAO,GAAG,QAAQ,GAAGM,SAAS;QAAA,eAC7B,CAACvB,KAAK,CAACiB;MAAO;QAAAP,OAAA,EAAAA,CAAA,MAE1BD,SAAS;MAAA;IAGjB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
@@ -3,7 +3,8 @@
3
3
  flex: 1 1 auto;
4
4
  font-size: 1rem;
5
5
  font-weight: 400;
6
- line-height: 1.625;
6
+ line-height: 1.5;
7
+ --v-input-chips-margin-top: 2px;
7
8
  }
8
9
  .v-input--disabled {
9
10
  pointer-events: none;
@@ -23,6 +24,18 @@
23
24
  --v-input-padding-top: 7px;
24
25
  }
25
26
 
27
+ .v-input--density-default {
28
+ --v-input-chips-margin-bottom: 0px;
29
+ }
30
+
31
+ .v-input--density-comfortable {
32
+ --v-input-chips-margin-bottom: 2px;
33
+ }
34
+
35
+ .v-input--density-compact {
36
+ --v-input-chips-margin-bottom: 4px;
37
+ }
38
+
26
39
  .v-input--vertical {
27
40
  grid-template-areas: "append" "control" "prepend";
28
41
  grid-template-rows: max-content auto max-content;