@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
  */
@@ -2031,6 +2031,11 @@ var en = {
2031
2031
  counter: '{0} files',
2032
2032
  counterSize: '{0} files ({1} in total)'
2033
2033
  },
2034
+ fileUpload: {
2035
+ title: 'Drag and drop files here',
2036
+ divider: 'or',
2037
+ browse: 'Browse Files'
2038
+ },
2034
2039
  timePicker: {
2035
2040
  am: 'AM',
2036
2041
  pm: 'PM',
@@ -4441,7 +4446,8 @@ const aliases = {
4441
4446
  calendar: 'mdi-calendar',
4442
4447
  treeviewCollapse: 'mdi-menu-down',
4443
4448
  treeviewExpand: 'mdi-menu-right',
4444
- eyeDropper: 'mdi-eyedropper'
4449
+ eyeDropper: 'mdi-eyedropper',
4450
+ upload: 'mdi-cloud-upload'
4445
4451
  };
4446
4452
  const mdi = {
4447
4453
  // Not using mergeProps here, functional components merge props by default (?)
@@ -28166,6 +28172,319 @@ const VDateInput = genericComponent()({
28166
28172
 
28167
28173
  // Types
28168
28174
 
28175
+ const makeVFileUploadItemProps = propsFactory({
28176
+ clearable: Boolean,
28177
+ file: {
28178
+ type: Object,
28179
+ default: null
28180
+ },
28181
+ fileIcon: {
28182
+ type: String,
28183
+ // TODO: setup up a proper aliased icon
28184
+ default: 'mdi-file-document'
28185
+ },
28186
+ showSize: Boolean,
28187
+ ...makeVListItemProps({
28188
+ border: true,
28189
+ rounded: true,
28190
+ lines: 'two'
28191
+ })
28192
+ }, 'VFileUploadItem');
28193
+ const VFileUploadItem = genericComponent()({
28194
+ name: 'VFileUploadItem',
28195
+ props: makeVFileUploadItemProps(),
28196
+ emits: {
28197
+ 'click:remove': () => true,
28198
+ click: e => true
28199
+ },
28200
+ setup(props, _ref) {
28201
+ let {
28202
+ emit,
28203
+ slots
28204
+ } = _ref;
28205
+ const preview = ref();
28206
+ const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
28207
+ function onClickRemove() {
28208
+ emit('click:remove');
28209
+ }
28210
+ watchEffect(() => {
28211
+ preview.value = props.file?.type.startsWith('image') ? URL.createObjectURL(props.file) : undefined;
28212
+ });
28213
+ useRender(() => {
28214
+ const listItemProps = VListItem.filterProps(props);
28215
+ return createVNode(VListItem, mergeProps(listItemProps, {
28216
+ "title": props.title ?? props.file?.name,
28217
+ "subtitle": props.showSize ? humanReadableFileSize(props.file?.size, base.value) : props.file?.type,
28218
+ "class": "v-file-upload-item"
28219
+ }), {
28220
+ ...slots,
28221
+ prepend: slotProps => createVNode(Fragment, null, [!slots.prepend ? createVNode(VAvatar, {
28222
+ "icon": props.fileIcon,
28223
+ "image": preview.value,
28224
+ "rounded": true
28225
+ }, null) : createVNode(VDefaultsProvider, {
28226
+ "defaults": {
28227
+ VAvatar: {
28228
+ image: preview.value,
28229
+ icon: !preview.value ? props.fileIcon : undefined,
28230
+ rounded: true
28231
+ }
28232
+ }
28233
+ }, {
28234
+ default: () => [slots.prepend?.(slotProps) ?? createVNode(VAvatar, null, null)]
28235
+ })]),
28236
+ append: slotProps => createVNode(Fragment, null, [props.clearable && createVNode(Fragment, null, [!slots.clear ? createVNode(VBtn, {
28237
+ "icon": "$clear",
28238
+ "density": "comfortable",
28239
+ "variant": "text",
28240
+ "onClick": onClickRemove
28241
+ }, null) : createVNode(VDefaultsProvider, {
28242
+ "defaults": {
28243
+ VBtn: {
28244
+ icon: '$clear',
28245
+ density: 'comfortable',
28246
+ variant: 'text'
28247
+ }
28248
+ }
28249
+ }, {
28250
+ default: () => [slots.clear?.({
28251
+ ...slotProps,
28252
+ props: {
28253
+ onClick: onClickRemove
28254
+ }
28255
+ }) ?? createVNode(VBtn, null, null)]
28256
+ })]), slots.append?.(slotProps)])
28257
+ });
28258
+ });
28259
+ }
28260
+ });
28261
+
28262
+ // Types
28263
+
28264
+ const makeVFileUploadProps = propsFactory({
28265
+ browseText: {
28266
+ type: String,
28267
+ default: '$vuetify.fileUpload.browse'
28268
+ },
28269
+ dividerText: {
28270
+ type: String,
28271
+ default: '$vuetify.fileUpload.divider'
28272
+ },
28273
+ title: {
28274
+ type: String,
28275
+ default: '$vuetify.fileUpload.title'
28276
+ },
28277
+ subtitle: String,
28278
+ icon: {
28279
+ type: IconValue,
28280
+ default: '$upload'
28281
+ },
28282
+ modelValue: {
28283
+ type: [Array, Object],
28284
+ default: null,
28285
+ validator: val => {
28286
+ return wrapInArray(val).every(v => v != null && typeof v === 'object');
28287
+ }
28288
+ },
28289
+ clearable: Boolean,
28290
+ disabled: Boolean,
28291
+ hideBrowse: Boolean,
28292
+ multiple: Boolean,
28293
+ scrim: {
28294
+ type: [Boolean, String],
28295
+ default: true
28296
+ },
28297
+ showSize: Boolean,
28298
+ name: String,
28299
+ ...makeDelayProps(),
28300
+ ...makeDensityProps(),
28301
+ ...only(makeVDividerProps({
28302
+ length: 150
28303
+ }), ['length', 'thickness', 'opacity']),
28304
+ ...makeVSheetProps()
28305
+ }, 'VFileUpload');
28306
+ const VFileUpload = genericComponent()({
28307
+ name: 'VFileUpload',
28308
+ inheritAttrs: false,
28309
+ props: makeVFileUploadProps(),
28310
+ emits: {
28311
+ 'update:modelValue': files => true
28312
+ },
28313
+ setup(props, _ref) {
28314
+ let {
28315
+ attrs,
28316
+ slots
28317
+ } = _ref;
28318
+ const {
28319
+ t
28320
+ } = useLocale();
28321
+ const {
28322
+ densityClasses
28323
+ } = useDensity(props);
28324
+ const model = useProxiedModel(props, 'modelValue', props.modelValue, val => wrapInArray(val), val => props.multiple || Array.isArray(props.modelValue) ? val : val[0]);
28325
+ const dragOver = shallowRef(false);
28326
+ const vSheetRef = ref(null);
28327
+ const inputRef = ref(null);
28328
+ onMounted(() => {
28329
+ vSheetRef.value?.$el.addEventListener('dragover', onDragOver);
28330
+ vSheetRef.value?.$el.addEventListener('drop', onDrop);
28331
+ });
28332
+ onUnmounted(() => {
28333
+ vSheetRef.value?.$el.removeEventListener('dragover', onDragOver);
28334
+ vSheetRef.value?.$el.removeEventListener('drop', onDrop);
28335
+ });
28336
+ function onDragOver(e) {
28337
+ e.preventDefault();
28338
+ e.stopImmediatePropagation();
28339
+ dragOver.value = true;
28340
+ }
28341
+ function onDragLeave(e) {
28342
+ e.preventDefault();
28343
+ dragOver.value = false;
28344
+ }
28345
+ function onDrop(e) {
28346
+ e.preventDefault();
28347
+ e.stopImmediatePropagation();
28348
+ dragOver.value = false;
28349
+ const files = Array.from(e.dataTransfer?.files ?? []);
28350
+ if (!files.length) return;
28351
+ if (!props.multiple) {
28352
+ model.value = [files[0]];
28353
+ return;
28354
+ }
28355
+ const array = model.value.slice();
28356
+ for (const file of files) {
28357
+ if (!array.some(f => f.name === file.name)) {
28358
+ array.push(file);
28359
+ }
28360
+ }
28361
+ model.value = array;
28362
+ }
28363
+ function onClick() {
28364
+ inputRef.value?.click();
28365
+ }
28366
+ function onClickRemove(index) {
28367
+ model.value = model.value.filter((_, i) => i !== index);
28368
+ if (model.value.length > 0 || !inputRef.value) return;
28369
+ inputRef.value.value = '';
28370
+ }
28371
+ useRender(() => {
28372
+ const hasTitle = !!(slots.title || props.title);
28373
+ const hasIcon = !!(slots.icon || props.icon);
28374
+ const hasBrowse = !!(!props.hideBrowse && (slots.browse || props.density === 'default'));
28375
+ const cardProps = VSheet.filterProps(props);
28376
+ const dividerProps = VDivider.filterProps(props);
28377
+ const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
28378
+ const inputNode = createVNode("input", mergeProps({
28379
+ "ref": inputRef,
28380
+ "type": "file",
28381
+ "disabled": props.disabled,
28382
+ "multiple": props.multiple,
28383
+ "name": props.name,
28384
+ "onChange": e => {
28385
+ if (!e.target) return;
28386
+ const target = e.target;
28387
+ model.value = [...(target.files ?? [])];
28388
+ }
28389
+ }, inputAttrs), null);
28390
+ return createVNode(Fragment, null, [createVNode(VSheet, mergeProps({
28391
+ "ref": vSheetRef
28392
+ }, cardProps, {
28393
+ "class": ['v-file-upload', {
28394
+ 'v-file-upload--clickable': !hasBrowse,
28395
+ 'v-file-upload--disabled': props.disabled,
28396
+ 'v-file-upload--dragging': dragOver.value
28397
+ }, densityClasses.value],
28398
+ "onDragleave": onDragLeave,
28399
+ "onDragover": onDragOver,
28400
+ "onDrop": onDrop,
28401
+ "onClick": !hasBrowse ? onClick : undefined
28402
+ }, rootAttrs), {
28403
+ default: () => [hasIcon && createVNode("div", {
28404
+ "key": "icon",
28405
+ "class": "v-file-upload-icon"
28406
+ }, [!slots.icon ? createVNode(VIcon, {
28407
+ "key": "icon-icon",
28408
+ "icon": props.icon
28409
+ }, null) : createVNode(VDefaultsProvider, {
28410
+ "key": "icon-defaults",
28411
+ "defaults": {
28412
+ VIcon: {
28413
+ icon: props.icon
28414
+ }
28415
+ }
28416
+ }, {
28417
+ default: () => [slots.icon()]
28418
+ })]), hasTitle && createVNode("div", {
28419
+ "key": "title",
28420
+ "class": "v-file-upload-title"
28421
+ }, [slots.title?.() ?? t(props.title)]), props.density === 'default' && createVNode(Fragment, null, [createVNode("div", {
28422
+ "key": "upload-divider",
28423
+ "class": "v-file-upload-divider"
28424
+ }, [slots.divider?.() ?? createVNode(VDivider, dividerProps, {
28425
+ default: () => [t(props.dividerText)]
28426
+ })]), hasBrowse && createVNode(Fragment, null, [!slots.browse ? createVNode(VBtn, {
28427
+ "readonly": props.disabled,
28428
+ "size": "large",
28429
+ "text": t(props.browseText),
28430
+ "variant": "tonal",
28431
+ "onClick": onClick
28432
+ }, null) : createVNode(VDefaultsProvider, {
28433
+ "defaults": {
28434
+ VBtn: {
28435
+ readonly: props.disabled,
28436
+ size: 'large',
28437
+ text: t(props.browseText),
28438
+ variant: 'tonal'
28439
+ }
28440
+ }
28441
+ }, {
28442
+ default: () => [slots.browse({
28443
+ props: {
28444
+ onClick
28445
+ }
28446
+ })]
28447
+ })]), props.subtitle && createVNode("div", {
28448
+ "class": "v-file-upload-subtitle"
28449
+ }, [props.subtitle])]), createVNode(VOverlay, {
28450
+ "model-value": dragOver.value,
28451
+ "contained": true,
28452
+ "scrim": props.scrim
28453
+ }, null), slots.input?.({
28454
+ inputNode
28455
+ }) ?? inputNode]
28456
+ }), model.value.length > 0 && createVNode("div", {
28457
+ "class": "v-file-upload-items"
28458
+ }, [model.value.map((file, i) => {
28459
+ const slotProps = {
28460
+ file,
28461
+ props: {
28462
+ 'onClick:remove': () => onClickRemove(i)
28463
+ }
28464
+ };
28465
+ return createVNode(VDefaultsProvider, {
28466
+ "key": i,
28467
+ "defaults": {
28468
+ VFileUploadItem: {
28469
+ file,
28470
+ clearable: props.clearable,
28471
+ disabled: props.disabled,
28472
+ showSize: props.showSize
28473
+ }
28474
+ }
28475
+ }, {
28476
+ default: () => [slots.item?.(slotProps) ?? createVNode(VFileUploadItem, {
28477
+ "key": i,
28478
+ "onClick:remove": () => onClickRemove(i)
28479
+ }, slots)]
28480
+ });
28481
+ })])]);
28482
+ });
28483
+ }
28484
+ });
28485
+
28486
+ // Types
28487
+
28169
28488
  const makeVNumberInputProps = propsFactory({
28170
28489
  controlVariant: {
28171
28490
  type: String,
@@ -29997,6 +30316,8 @@ var components = /*#__PURE__*/Object.freeze({
29997
30316
  VField: VField,
29998
30317
  VFieldLabel: VFieldLabel,
29999
30318
  VFileInput: VFileInput,
30319
+ VFileUpload: VFileUpload,
30320
+ VFileUploadItem: VFileUploadItem,
30000
30321
  VFooter: VFooter,
30001
30322
  VForm: VForm,
30002
30323
  VHover: VHover,
@@ -30410,7 +30731,7 @@ function createVuetify$1() {
30410
30731
  goTo
30411
30732
  };
30412
30733
  }
30413
- const version$1 = "3.7.5-master.2024-12-11";
30734
+ const version$1 = "3.7.5-master.2024-12-12";
30414
30735
  createVuetify$1.version = version$1;
30415
30736
 
30416
30737
  // Vue's inject() can only be used in setup
@@ -30663,7 +30984,7 @@ var index = /*#__PURE__*/Object.freeze({
30663
30984
 
30664
30985
  /* eslint-disable local-rules/sort-imports */
30665
30986
 
30666
- const version = "3.7.5-master.2024-12-11";
30987
+ const version = "3.7.5-master.2024-12-12";
30667
30988
 
30668
30989
  /* eslint-disable local-rules/sort-imports */
30669
30990