@vuetify/nightly 3.7.5-master.2024-12-11 → 3.7.5-master.2024-12-12

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 (127) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +4228 -3932
  3. package/dist/json/importMap-labs.json +20 -12
  4. package/dist/json/importMap.json +176 -176
  5. package/dist/json/tags.json +84 -0
  6. package/dist/json/web-types.json +8499 -7558
  7. package/dist/vuetify-labs.css +4391 -4318
  8. package/dist/vuetify-labs.d.ts +1314 -1
  9. package/dist/vuetify-labs.esm.js +325 -4
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +325 -4
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +3206 -3206
  14. package/dist/vuetify.d.ts +59 -57
  15. package/dist/vuetify.esm.js +10 -4
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +10 -4
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +5 -5
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/entry-bundler.mjs +1 -1
  23. package/lib/framework.mjs +1 -1
  24. package/lib/iconsets/mdi.mjs +2 -1
  25. package/lib/iconsets/mdi.mjs.map +1 -1
  26. package/lib/index.d.mts +59 -57
  27. package/lib/labs/VFileUpload/VFileUpload.css +74 -0
  28. package/lib/labs/VFileUpload/VFileUpload.mjs +241 -0
  29. package/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -0
  30. package/lib/labs/VFileUpload/VFileUpload.sass +75 -0
  31. package/lib/labs/VFileUpload/VFileUploadItem.mjs +95 -0
  32. package/lib/labs/VFileUpload/VFileUploadItem.mjs.map +1 -0
  33. package/lib/labs/VFileUpload/_variables.scss +12 -0
  34. package/lib/labs/VFileUpload/index.d.mts +1365 -0
  35. package/lib/labs/VFileUpload/index.mjs +3 -0
  36. package/lib/labs/VFileUpload/index.mjs.map +1 -0
  37. package/lib/labs/components.d.mts +1348 -37
  38. package/lib/labs/components.mjs +1 -0
  39. package/lib/labs/components.mjs.map +1 -1
  40. package/lib/locale/af.mjs +5 -0
  41. package/lib/locale/af.mjs.map +1 -1
  42. package/lib/locale/ar.mjs +5 -0
  43. package/lib/locale/ar.mjs.map +1 -1
  44. package/lib/locale/az.mjs +5 -0
  45. package/lib/locale/az.mjs.map +1 -1
  46. package/lib/locale/bg.mjs +5 -0
  47. package/lib/locale/bg.mjs.map +1 -1
  48. package/lib/locale/ca.mjs +5 -0
  49. package/lib/locale/ca.mjs.map +1 -1
  50. package/lib/locale/ckb.mjs +5 -0
  51. package/lib/locale/ckb.mjs.map +1 -1
  52. package/lib/locale/cs.mjs +5 -0
  53. package/lib/locale/cs.mjs.map +1 -1
  54. package/lib/locale/da.mjs +5 -0
  55. package/lib/locale/da.mjs.map +1 -1
  56. package/lib/locale/de.mjs +5 -0
  57. package/lib/locale/de.mjs.map +1 -1
  58. package/lib/locale/el.mjs +5 -0
  59. package/lib/locale/el.mjs.map +1 -1
  60. package/lib/locale/en.mjs +5 -0
  61. package/lib/locale/en.mjs.map +1 -1
  62. package/lib/locale/es.mjs +5 -0
  63. package/lib/locale/es.mjs.map +1 -1
  64. package/lib/locale/et.mjs +5 -0
  65. package/lib/locale/et.mjs.map +1 -1
  66. package/lib/locale/fa.mjs +5 -0
  67. package/lib/locale/fa.mjs.map +1 -1
  68. package/lib/locale/fi.mjs +5 -0
  69. package/lib/locale/fi.mjs.map +1 -1
  70. package/lib/locale/fr.mjs +5 -0
  71. package/lib/locale/fr.mjs.map +1 -1
  72. package/lib/locale/he.mjs +5 -0
  73. package/lib/locale/he.mjs.map +1 -1
  74. package/lib/locale/hr.mjs +5 -0
  75. package/lib/locale/hr.mjs.map +1 -1
  76. package/lib/locale/hu.mjs +5 -0
  77. package/lib/locale/hu.mjs.map +1 -1
  78. package/lib/locale/id.mjs +5 -0
  79. package/lib/locale/id.mjs.map +1 -1
  80. package/lib/locale/index.d.mts +215 -0
  81. package/lib/locale/it.mjs +5 -0
  82. package/lib/locale/it.mjs.map +1 -1
  83. package/lib/locale/ja.mjs +5 -0
  84. package/lib/locale/ja.mjs.map +1 -1
  85. package/lib/locale/km.mjs +5 -0
  86. package/lib/locale/km.mjs.map +1 -1
  87. package/lib/locale/ko.mjs +5 -0
  88. package/lib/locale/ko.mjs.map +1 -1
  89. package/lib/locale/lt.mjs +5 -0
  90. package/lib/locale/lt.mjs.map +1 -1
  91. package/lib/locale/lv.mjs +5 -0
  92. package/lib/locale/lv.mjs.map +1 -1
  93. package/lib/locale/nl.mjs +5 -0
  94. package/lib/locale/nl.mjs.map +1 -1
  95. package/lib/locale/no.mjs +5 -0
  96. package/lib/locale/no.mjs.map +1 -1
  97. package/lib/locale/pl.mjs +5 -0
  98. package/lib/locale/pl.mjs.map +1 -1
  99. package/lib/locale/pt.mjs +5 -0
  100. package/lib/locale/pt.mjs.map +1 -1
  101. package/lib/locale/ro.mjs +5 -0
  102. package/lib/locale/ro.mjs.map +1 -1
  103. package/lib/locale/ru.mjs +5 -0
  104. package/lib/locale/ru.mjs.map +1 -1
  105. package/lib/locale/sk.mjs +5 -0
  106. package/lib/locale/sk.mjs.map +1 -1
  107. package/lib/locale/sl.mjs +5 -0
  108. package/lib/locale/sl.mjs.map +1 -1
  109. package/lib/locale/sr-Cyrl.mjs +5 -0
  110. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  111. package/lib/locale/sr-Latn.mjs +5 -0
  112. package/lib/locale/sr-Latn.mjs.map +1 -1
  113. package/lib/locale/sv.mjs +5 -0
  114. package/lib/locale/sv.mjs.map +1 -1
  115. package/lib/locale/th.mjs +5 -0
  116. package/lib/locale/th.mjs.map +1 -1
  117. package/lib/locale/tr.mjs +5 -0
  118. package/lib/locale/tr.mjs.map +1 -1
  119. package/lib/locale/uk.mjs +5 -0
  120. package/lib/locale/uk.mjs.map +1 -1
  121. package/lib/locale/vi.mjs +5 -0
  122. package/lib/locale/vi.mjs.map +1 -1
  123. package/lib/locale/zh-Hans.mjs +5 -0
  124. package/lib/locale/zh-Hans.mjs.map +1 -1
  125. package/lib/locale/zh-Hant.mjs +5 -0
  126. package/lib/locale/zh-Hant.mjs.map +1 -1
  127. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.7.5-master.2024-12-11
2
+ * Vuetify v3.7.5-master.2024-12-12
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -2035,6 +2035,11 @@
2035
2035
  counter: '{0} files',
2036
2036
  counterSize: '{0} files ({1} in total)'
2037
2037
  },
2038
+ fileUpload: {
2039
+ title: 'Drag and drop files here',
2040
+ divider: 'or',
2041
+ browse: 'Browse Files'
2042
+ },
2038
2043
  timePicker: {
2039
2044
  am: 'AM',
2040
2045
  pm: 'PM',
@@ -4445,7 +4450,8 @@
4445
4450
  calendar: 'mdi-calendar',
4446
4451
  treeviewCollapse: 'mdi-menu-down',
4447
4452
  treeviewExpand: 'mdi-menu-right',
4448
- eyeDropper: 'mdi-eyedropper'
4453
+ eyeDropper: 'mdi-eyedropper',
4454
+ upload: 'mdi-cloud-upload'
4449
4455
  };
4450
4456
  const mdi = {
4451
4457
  // Not using mergeProps here, functional components merge props by default (?)
@@ -28170,6 +28176,319 @@
28170
28176
 
28171
28177
  // Types
28172
28178
 
28179
+ const makeVFileUploadItemProps = propsFactory({
28180
+ clearable: Boolean,
28181
+ file: {
28182
+ type: Object,
28183
+ default: null
28184
+ },
28185
+ fileIcon: {
28186
+ type: String,
28187
+ // TODO: setup up a proper aliased icon
28188
+ default: 'mdi-file-document'
28189
+ },
28190
+ showSize: Boolean,
28191
+ ...makeVListItemProps({
28192
+ border: true,
28193
+ rounded: true,
28194
+ lines: 'two'
28195
+ })
28196
+ }, 'VFileUploadItem');
28197
+ const VFileUploadItem = genericComponent()({
28198
+ name: 'VFileUploadItem',
28199
+ props: makeVFileUploadItemProps(),
28200
+ emits: {
28201
+ 'click:remove': () => true,
28202
+ click: e => true
28203
+ },
28204
+ setup(props, _ref) {
28205
+ let {
28206
+ emit,
28207
+ slots
28208
+ } = _ref;
28209
+ const preview = vue.ref();
28210
+ const base = vue.computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
28211
+ function onClickRemove() {
28212
+ emit('click:remove');
28213
+ }
28214
+ vue.watchEffect(() => {
28215
+ preview.value = props.file?.type.startsWith('image') ? URL.createObjectURL(props.file) : undefined;
28216
+ });
28217
+ useRender(() => {
28218
+ const listItemProps = VListItem.filterProps(props);
28219
+ return vue.createVNode(VListItem, vue.mergeProps(listItemProps, {
28220
+ "title": props.title ?? props.file?.name,
28221
+ "subtitle": props.showSize ? humanReadableFileSize(props.file?.size, base.value) : props.file?.type,
28222
+ "class": "v-file-upload-item"
28223
+ }), {
28224
+ ...slots,
28225
+ prepend: slotProps => vue.createVNode(vue.Fragment, null, [!slots.prepend ? vue.createVNode(VAvatar, {
28226
+ "icon": props.fileIcon,
28227
+ "image": preview.value,
28228
+ "rounded": true
28229
+ }, null) : vue.createVNode(VDefaultsProvider, {
28230
+ "defaults": {
28231
+ VAvatar: {
28232
+ image: preview.value,
28233
+ icon: !preview.value ? props.fileIcon : undefined,
28234
+ rounded: true
28235
+ }
28236
+ }
28237
+ }, {
28238
+ default: () => [slots.prepend?.(slotProps) ?? vue.createVNode(VAvatar, null, null)]
28239
+ })]),
28240
+ append: slotProps => vue.createVNode(vue.Fragment, null, [props.clearable && vue.createVNode(vue.Fragment, null, [!slots.clear ? vue.createVNode(VBtn, {
28241
+ "icon": "$clear",
28242
+ "density": "comfortable",
28243
+ "variant": "text",
28244
+ "onClick": onClickRemove
28245
+ }, null) : vue.createVNode(VDefaultsProvider, {
28246
+ "defaults": {
28247
+ VBtn: {
28248
+ icon: '$clear',
28249
+ density: 'comfortable',
28250
+ variant: 'text'
28251
+ }
28252
+ }
28253
+ }, {
28254
+ default: () => [slots.clear?.({
28255
+ ...slotProps,
28256
+ props: {
28257
+ onClick: onClickRemove
28258
+ }
28259
+ }) ?? vue.createVNode(VBtn, null, null)]
28260
+ })]), slots.append?.(slotProps)])
28261
+ });
28262
+ });
28263
+ }
28264
+ });
28265
+
28266
+ // Types
28267
+
28268
+ const makeVFileUploadProps = propsFactory({
28269
+ browseText: {
28270
+ type: String,
28271
+ default: '$vuetify.fileUpload.browse'
28272
+ },
28273
+ dividerText: {
28274
+ type: String,
28275
+ default: '$vuetify.fileUpload.divider'
28276
+ },
28277
+ title: {
28278
+ type: String,
28279
+ default: '$vuetify.fileUpload.title'
28280
+ },
28281
+ subtitle: String,
28282
+ icon: {
28283
+ type: IconValue,
28284
+ default: '$upload'
28285
+ },
28286
+ modelValue: {
28287
+ type: [Array, Object],
28288
+ default: null,
28289
+ validator: val => {
28290
+ return wrapInArray(val).every(v => v != null && typeof v === 'object');
28291
+ }
28292
+ },
28293
+ clearable: Boolean,
28294
+ disabled: Boolean,
28295
+ hideBrowse: Boolean,
28296
+ multiple: Boolean,
28297
+ scrim: {
28298
+ type: [Boolean, String],
28299
+ default: true
28300
+ },
28301
+ showSize: Boolean,
28302
+ name: String,
28303
+ ...makeDelayProps(),
28304
+ ...makeDensityProps(),
28305
+ ...only(makeVDividerProps({
28306
+ length: 150
28307
+ }), ['length', 'thickness', 'opacity']),
28308
+ ...makeVSheetProps()
28309
+ }, 'VFileUpload');
28310
+ const VFileUpload = genericComponent()({
28311
+ name: 'VFileUpload',
28312
+ inheritAttrs: false,
28313
+ props: makeVFileUploadProps(),
28314
+ emits: {
28315
+ 'update:modelValue': files => true
28316
+ },
28317
+ setup(props, _ref) {
28318
+ let {
28319
+ attrs,
28320
+ slots
28321
+ } = _ref;
28322
+ const {
28323
+ t
28324
+ } = useLocale();
28325
+ const {
28326
+ densityClasses
28327
+ } = useDensity(props);
28328
+ const model = useProxiedModel(props, 'modelValue', props.modelValue, val => wrapInArray(val), val => props.multiple || Array.isArray(props.modelValue) ? val : val[0]);
28329
+ const dragOver = vue.shallowRef(false);
28330
+ const vSheetRef = vue.ref(null);
28331
+ const inputRef = vue.ref(null);
28332
+ vue.onMounted(() => {
28333
+ vSheetRef.value?.$el.addEventListener('dragover', onDragOver);
28334
+ vSheetRef.value?.$el.addEventListener('drop', onDrop);
28335
+ });
28336
+ vue.onUnmounted(() => {
28337
+ vSheetRef.value?.$el.removeEventListener('dragover', onDragOver);
28338
+ vSheetRef.value?.$el.removeEventListener('drop', onDrop);
28339
+ });
28340
+ function onDragOver(e) {
28341
+ e.preventDefault();
28342
+ e.stopImmediatePropagation();
28343
+ dragOver.value = true;
28344
+ }
28345
+ function onDragLeave(e) {
28346
+ e.preventDefault();
28347
+ dragOver.value = false;
28348
+ }
28349
+ function onDrop(e) {
28350
+ e.preventDefault();
28351
+ e.stopImmediatePropagation();
28352
+ dragOver.value = false;
28353
+ const files = Array.from(e.dataTransfer?.files ?? []);
28354
+ if (!files.length) return;
28355
+ if (!props.multiple) {
28356
+ model.value = [files[0]];
28357
+ return;
28358
+ }
28359
+ const array = model.value.slice();
28360
+ for (const file of files) {
28361
+ if (!array.some(f => f.name === file.name)) {
28362
+ array.push(file);
28363
+ }
28364
+ }
28365
+ model.value = array;
28366
+ }
28367
+ function onClick() {
28368
+ inputRef.value?.click();
28369
+ }
28370
+ function onClickRemove(index) {
28371
+ model.value = model.value.filter((_, i) => i !== index);
28372
+ if (model.value.length > 0 || !inputRef.value) return;
28373
+ inputRef.value.value = '';
28374
+ }
28375
+ useRender(() => {
28376
+ const hasTitle = !!(slots.title || props.title);
28377
+ const hasIcon = !!(slots.icon || props.icon);
28378
+ const hasBrowse = !!(!props.hideBrowse && (slots.browse || props.density === 'default'));
28379
+ const cardProps = VSheet.filterProps(props);
28380
+ const dividerProps = VDivider.filterProps(props);
28381
+ const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
28382
+ const inputNode = vue.createVNode("input", vue.mergeProps({
28383
+ "ref": inputRef,
28384
+ "type": "file",
28385
+ "disabled": props.disabled,
28386
+ "multiple": props.multiple,
28387
+ "name": props.name,
28388
+ "onChange": e => {
28389
+ if (!e.target) return;
28390
+ const target = e.target;
28391
+ model.value = [...(target.files ?? [])];
28392
+ }
28393
+ }, inputAttrs), null);
28394
+ return vue.createVNode(vue.Fragment, null, [vue.createVNode(VSheet, vue.mergeProps({
28395
+ "ref": vSheetRef
28396
+ }, cardProps, {
28397
+ "class": ['v-file-upload', {
28398
+ 'v-file-upload--clickable': !hasBrowse,
28399
+ 'v-file-upload--disabled': props.disabled,
28400
+ 'v-file-upload--dragging': dragOver.value
28401
+ }, densityClasses.value],
28402
+ "onDragleave": onDragLeave,
28403
+ "onDragover": onDragOver,
28404
+ "onDrop": onDrop,
28405
+ "onClick": !hasBrowse ? onClick : undefined
28406
+ }, rootAttrs), {
28407
+ default: () => [hasIcon && vue.createVNode("div", {
28408
+ "key": "icon",
28409
+ "class": "v-file-upload-icon"
28410
+ }, [!slots.icon ? vue.createVNode(VIcon, {
28411
+ "key": "icon-icon",
28412
+ "icon": props.icon
28413
+ }, null) : vue.createVNode(VDefaultsProvider, {
28414
+ "key": "icon-defaults",
28415
+ "defaults": {
28416
+ VIcon: {
28417
+ icon: props.icon
28418
+ }
28419
+ }
28420
+ }, {
28421
+ default: () => [slots.icon()]
28422
+ })]), hasTitle && vue.createVNode("div", {
28423
+ "key": "title",
28424
+ "class": "v-file-upload-title"
28425
+ }, [slots.title?.() ?? t(props.title)]), props.density === 'default' && vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
28426
+ "key": "upload-divider",
28427
+ "class": "v-file-upload-divider"
28428
+ }, [slots.divider?.() ?? vue.createVNode(VDivider, dividerProps, {
28429
+ default: () => [t(props.dividerText)]
28430
+ })]), hasBrowse && vue.createVNode(vue.Fragment, null, [!slots.browse ? vue.createVNode(VBtn, {
28431
+ "readonly": props.disabled,
28432
+ "size": "large",
28433
+ "text": t(props.browseText),
28434
+ "variant": "tonal",
28435
+ "onClick": onClick
28436
+ }, null) : vue.createVNode(VDefaultsProvider, {
28437
+ "defaults": {
28438
+ VBtn: {
28439
+ readonly: props.disabled,
28440
+ size: 'large',
28441
+ text: t(props.browseText),
28442
+ variant: 'tonal'
28443
+ }
28444
+ }
28445
+ }, {
28446
+ default: () => [slots.browse({
28447
+ props: {
28448
+ onClick
28449
+ }
28450
+ })]
28451
+ })]), props.subtitle && vue.createVNode("div", {
28452
+ "class": "v-file-upload-subtitle"
28453
+ }, [props.subtitle])]), vue.createVNode(VOverlay, {
28454
+ "model-value": dragOver.value,
28455
+ "contained": true,
28456
+ "scrim": props.scrim
28457
+ }, null), slots.input?.({
28458
+ inputNode
28459
+ }) ?? inputNode]
28460
+ }), model.value.length > 0 && vue.createVNode("div", {
28461
+ "class": "v-file-upload-items"
28462
+ }, [model.value.map((file, i) => {
28463
+ const slotProps = {
28464
+ file,
28465
+ props: {
28466
+ 'onClick:remove': () => onClickRemove(i)
28467
+ }
28468
+ };
28469
+ return vue.createVNode(VDefaultsProvider, {
28470
+ "key": i,
28471
+ "defaults": {
28472
+ VFileUploadItem: {
28473
+ file,
28474
+ clearable: props.clearable,
28475
+ disabled: props.disabled,
28476
+ showSize: props.showSize
28477
+ }
28478
+ }
28479
+ }, {
28480
+ default: () => [slots.item?.(slotProps) ?? vue.createVNode(VFileUploadItem, {
28481
+ "key": i,
28482
+ "onClick:remove": () => onClickRemove(i)
28483
+ }, slots)]
28484
+ });
28485
+ })])]);
28486
+ });
28487
+ }
28488
+ });
28489
+
28490
+ // Types
28491
+
28173
28492
  const makeVNumberInputProps = propsFactory({
28174
28493
  controlVariant: {
28175
28494
  type: String,
@@ -30001,6 +30320,8 @@
30001
30320
  VField: VField,
30002
30321
  VFieldLabel: VFieldLabel,
30003
30322
  VFileInput: VFileInput,
30323
+ VFileUpload: VFileUpload,
30324
+ VFileUploadItem: VFileUploadItem,
30004
30325
  VFooter: VFooter,
30005
30326
  VForm: VForm,
30006
30327
  VHover: VHover,
@@ -30414,7 +30735,7 @@
30414
30735
  goTo
30415
30736
  };
30416
30737
  }
30417
- const version$1 = "3.7.5-master.2024-12-11";
30738
+ const version$1 = "3.7.5-master.2024-12-12";
30418
30739
  createVuetify$1.version = version$1;
30419
30740
 
30420
30741
  // Vue's inject() can only be used in setup
@@ -30667,7 +30988,7 @@
30667
30988
 
30668
30989
  /* eslint-disable local-rules/sort-imports */
30669
30990
 
30670
- const version = "3.7.5-master.2024-12-11";
30991
+ const version = "3.7.5-master.2024-12-12";
30671
30992
 
30672
30993
  /* eslint-disable local-rules/sort-imports */
30673
30994