vuetify 2.4.4 → 2.4.5

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 (81) hide show
  1. package/dist/json/attributes.json +7 -7
  2. package/dist/json/web-types.json +12 -12
  3. package/dist/vuetify.css +3 -0
  4. package/dist/vuetify.css.map +1 -1
  5. package/dist/vuetify.js +88 -34
  6. package/dist/vuetify.js.map +1 -1
  7. package/dist/vuetify.min.css +2 -2
  8. package/dist/vuetify.min.js +2 -2
  9. package/es5/components/VCalendar/VCalendarCategory.js +8 -6
  10. package/es5/components/VCalendar/VCalendarCategory.js.map +1 -1
  11. package/es5/components/VCombobox/VCombobox.js +7 -1
  12. package/es5/components/VCombobox/VCombobox.js.map +1 -1
  13. package/es5/components/VData/VData.js +1 -1
  14. package/es5/components/VData/VData.js.map +1 -1
  15. package/es5/components/VFileInput/VFileInput.js +1 -1
  16. package/es5/components/VFileInput/VFileInput.js.map +1 -1
  17. package/es5/components/VLazy/VLazy.js +3 -8
  18. package/es5/components/VLazy/VLazy.js.map +1 -1
  19. package/es5/components/VList/VListItem.js +1 -1
  20. package/es5/components/VList/VListItem.js.map +1 -1
  21. package/es5/components/VRating/VRating.js +0 -1
  22. package/es5/components/VRating/VRating.js.map +1 -1
  23. package/es5/components/VSelect/VSelect.js +19 -10
  24. package/es5/components/VSelect/VSelect.js.map +1 -1
  25. package/es5/components/VTextField/VTextField.js +8 -2
  26. package/es5/components/VTextField/VTextField.js.map +1 -1
  27. package/es5/framework.js +1 -1
  28. package/es5/locale/sk.js +1 -1
  29. package/es5/locale/sk.js.map +1 -1
  30. package/es5/services/theme/utils.js +10 -10
  31. package/es5/services/theme/utils.js.map +1 -1
  32. package/es5/util/dom.js +33 -0
  33. package/es5/util/dom.js.map +1 -0
  34. package/lib/components/VCalendar/VCalendarCategory.js +7 -5
  35. package/lib/components/VCalendar/VCalendarCategory.js.map +1 -1
  36. package/lib/components/VCombobox/VCombobox.js +6 -1
  37. package/lib/components/VCombobox/VCombobox.js.map +1 -1
  38. package/lib/components/VData/VData.js +1 -1
  39. package/lib/components/VData/VData.js.map +1 -1
  40. package/lib/components/VFileInput/VFileInput.js +1 -1
  41. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  42. package/lib/components/VLazy/VLazy.js +3 -8
  43. package/lib/components/VLazy/VLazy.js.map +1 -1
  44. package/lib/components/VList/VListItem.js +1 -1
  45. package/lib/components/VList/VListItem.js.map +1 -1
  46. package/lib/components/VRating/VRating.js +0 -1
  47. package/lib/components/VRating/VRating.js.map +1 -1
  48. package/lib/components/VSelect/VSelect.js +9 -2
  49. package/lib/components/VSelect/VSelect.js.map +1 -1
  50. package/lib/components/VTextField/VTextField.js +7 -2
  51. package/lib/components/VTextField/VTextField.js.map +1 -1
  52. package/lib/framework.js +1 -1
  53. package/lib/locale/sk.js +1 -1
  54. package/lib/locale/sk.js.map +1 -1
  55. package/lib/util/dom.js +24 -0
  56. package/lib/util/dom.js.map +1 -0
  57. package/package.json +2 -2
  58. package/src/components/VAutocomplete/__tests__/VAutocomplete.spec.ts +3 -1
  59. package/src/components/VAutocomplete/__tests__/VAutocomplete2.spec.ts +3 -0
  60. package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +1 -0
  61. package/src/components/VCalendar/VCalendarCategory.ts +7 -5
  62. package/src/components/VCombobox/VCombobox.ts +10 -0
  63. package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +1 -1
  64. package/src/components/VCombobox/__tests__/VCombobox.spec.ts +1 -0
  65. package/src/components/VData/VData.ts +1 -1
  66. package/src/components/VDataTable/VDataTableHeader.sass +2 -0
  67. package/src/components/VFileInput/VFileInput.ts +1 -1
  68. package/src/components/VLazy/VLazy.ts +6 -11
  69. package/src/components/VList/VListItem.ts +1 -1
  70. package/src/components/VList/__tests__/VListItem.spec.ts +1 -1
  71. package/src/components/VRating/VRating.ts +0 -1
  72. package/src/components/VSelect/VSelect.ts +13 -4
  73. package/src/components/VSelect/__tests__/VSelect.spec.ts +67 -0
  74. package/src/components/VSelect/__tests__/VSelect2.spec.ts +26 -0
  75. package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +4 -4
  76. package/src/components/VTextField/VTextField.ts +9 -4
  77. package/src/components/VTextField/__tests__/VTextField.spec.ts +15 -4
  78. package/src/locale/sk.ts +1 -1
  79. package/src/util/__tests__/dom.spec.ts +42 -0
  80. package/src/util/dom.ts +24 -0
  81. package/types/services/icons.d.ts +2 -2
package/dist/vuetify.js CHANGED
@@ -3296,13 +3296,15 @@ var __spread = undefined && undefined.__spread || function () {
3296
3296
  genDays: function genDays() {
3297
3297
  var _this = this;
3298
3298
 
3299
- var d = this.days[0];
3300
- var days = this.days.slice();
3301
- days = new Array(this.parsedCategories.length);
3302
- days.fill(d);
3303
- return days.map(function (v, i) {
3304
- return _this.genDay(v, 0, i);
3299
+ var days = [];
3300
+ this.days.forEach(function (d) {
3301
+ var day = new Array(_this.parsedCategories.length);
3302
+ day.fill(d);
3303
+ days.push.apply(days, __spread(day.map(function (v, i) {
3304
+ return _this.genDay(v, 0, i);
3305
+ })));
3305
3306
  });
3307
+ return days;
3306
3308
  },
3307
3309
  genDay: function genDay(day, index, categoryIndex) {
3308
3310
  var _this = this;
@@ -9131,7 +9133,12 @@ var __assign = undefined && undefined.__assign || function () {
9131
9133
  if (this.editingIndex > -1) {
9132
9134
  this.updateEditing();
9133
9135
  } else {
9134
- _VAutocomplete_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"].options.methods.selectItem.call(this, item);
9136
+ _VAutocomplete_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"].options.methods.selectItem.call(this, item); // if selected item contains search value,
9137
+ // remove the search string
9138
+
9139
+ if (this.internalSearch && this.multiple && this.getText(item).toLocaleLowerCase().includes(this.internalSearch.toLocaleLowerCase())) {
9140
+ this.internalSearch = null;
9141
+ }
9135
9142
  }
9136
9143
  },
9137
9144
  setSelectedItems: function setSelectedItems() {
@@ -9817,7 +9824,7 @@ var __spread = undefined && undefined.__spread || function () {
9817
9824
  // Make sure we don't try to display non-existant page if items suddenly change
9818
9825
  // TODO: Could possibly move this to pageStart/pageStop?
9819
9826
  if (this.serverItemsLength === -1 && items.length <= this.pageStart) {
9820
- this.internalOptions.page = Math.max(1, this.internalOptions.page - 1);
9827
+ this.internalOptions.page = Math.max(1, Math.ceil(items.length / this.internalOptions.itemsPerPage));
9821
9828
  }
9822
9829
 
9823
9830
  return items.slice(this.pageStart, this.pageStop);
@@ -15520,7 +15527,7 @@ var __spread = undefined && undefined.__spread || function () {
15520
15527
  text: function text() {
15521
15528
  var _this = this;
15522
15529
 
15523
- if (!this.isDirty) return [this.placeholder];
15530
+ if (!this.isDirty && (this.isFocused || !this.hasLabel)) return [this.placeholder];
15524
15531
  return this.internalArrayValue.map(function (file) {
15525
15532
  var _a = file.name,
15526
15533
  name = _a === void 0 ? '' : _a,
@@ -18289,17 +18296,12 @@ var __assign = undefined && undefined.__assign || function () {
18289
18296
  },
18290
18297
  methods: {
18291
18298
  genContent: function genContent() {
18292
- var slot = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["getSlot"])(this);
18293
- /* istanbul ignore if */
18294
-
18295
- if (!this.transition) return slot;
18296
- var children = [];
18297
- if (this.isActive) children.push(slot);
18298
- return this.$createElement('transition', {
18299
+ var children = this.isActive && Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["getSlot"])(this);
18300
+ return this.transition ? this.$createElement('transition', {
18299
18301
  props: {
18300
18302
  name: this.transition
18301
18303
  }
18302
- }, children);
18304
+ }, children) : children;
18303
18305
  },
18304
18306
  onObserve: function onObserve(entries, observer, isIntersecting) {
18305
18307
  if (this.isActive) return;
@@ -18874,7 +18876,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_m
18874
18876
  if (this.$attrs.hasOwnProperty('role')) {// do nothing, role already provided
18875
18877
  } else if (this.isInNav) {// do nothing, role is inherit
18876
18878
  } else if (this.isInGroup) {
18877
- attrs.role = 'listitem';
18879
+ attrs.role = 'option';
18878
18880
  attrs['aria-selected'] = String(this.isActive);
18879
18881
  } else if (this.isInMenu) {
18880
18882
  attrs.role = this.isClickable ? 'menuitem' : undefined;
@@ -22634,7 +22636,6 @@ __webpack_require__.r(__webpack_exports__);
22634
22636
 
22635
22637
  return this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], this.setTextColor(this.getColor(props), {
22636
22638
  attrs: {
22637
- tabindex: -1,
22638
22639
  'aria-label': this.$vuetify.lang.t(this.iconLabel, i + 1, Number(this.length))
22639
22640
  },
22640
22641
  directives: this.directives,
@@ -22967,7 +22968,13 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_14__["default"])(_
22967
22968
  return "list-" + this._uid;
22968
22969
  },
22969
22970
  computedCounterValue: function computedCounterValue() {
22970
- return this.multiple ? this.selectedItems.length : (this.getText(this.selectedItems[0]) || '').toString().length;
22971
+ var value = this.multiple ? this.selectedItems : (this.getText(this.selectedItems[0]) || '').toString();
22972
+
22973
+ if (typeof this.counterValue === 'function') {
22974
+ return this.counterValue(value);
22975
+ }
22976
+
22977
+ return value.length;
22971
22978
  },
22972
22979
  directives: function directives() {
22973
22980
  var _this = this;
@@ -23533,6 +23540,8 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_14__["default"])(_
23533
23540
  }
23534
23541
  },
23535
23542
  onUpDown: function onUpDown(e) {
23543
+ var _this = this;
23544
+
23536
23545
  var menu = this.$refs.menu;
23537
23546
  if (!menu) return;
23538
23547
  e.preventDefault(); // Multiple selects do not cycle their value
@@ -23546,6 +23555,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_14__["default"])(_
23546
23555
  menu.isBooted = true;
23547
23556
  window.requestAnimationFrame(function () {
23548
23557
  menu.getTiles();
23558
+ if (!menu.hasClickableTiles) return _this.activateMenu();
23549
23559
 
23550
23560
  switch (keyCode) {
23551
23561
  case _util_helpers__WEBPACK_IMPORTED_MODULE_12__["keyCodes"].up:
@@ -23565,7 +23575,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_14__["default"])(_
23565
23575
  break;
23566
23576
  }
23567
23577
 
23568
- menu.activeTile && menu.activeTile.click();
23578
+ _this.selectItem(_this.allItems[_this.getMenuIndex()]);
23569
23579
  });
23570
23580
  },
23571
23581
  selectItem: function selectItem(item) {
@@ -27997,9 +28007,10 @@ __webpack_require__.r(__webpack_exports__);
27997
28007
  /* harmony import */ var _mixins_validatable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/validatable */ "./src/mixins/validatable/index.ts");
27998
28008
  /* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize/index.ts");
27999
28009
  /* harmony import */ var _directives_ripple__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../directives/ripple */ "./src/directives/ripple/index.ts");
28000
- /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
28001
- /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
28002
- /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
28010
+ /* harmony import */ var _util_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/dom */ "./src/util/dom.ts");
28011
+ /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
28012
+ /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
28013
+ /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
28003
28014
  var __assign = undefined && undefined.__assign || function () {
28004
28015
  __assign = Object.assign || function (t) {
28005
28016
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -28067,10 +28078,11 @@ var __spread = undefined && undefined.__spread || function () {
28067
28078
  // Utilities
28068
28079
 
28069
28080
 
28081
+
28070
28082
  // Types
28071
28083
 
28072
28084
 
28073
- var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_11__["default"])(_VInput__WEBPACK_IMPORTED_MODULE_1__["default"], Object(_mixins_intersectable__WEBPACK_IMPORTED_MODULE_4__["default"])({
28085
+ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_12__["default"])(_VInput__WEBPACK_IMPORTED_MODULE_1__["default"], Object(_mixins_intersectable__WEBPACK_IMPORTED_MODULE_4__["default"])({
28074
28086
  onVisible: ['onResize', 'tryAutofocus']
28075
28087
  }), _mixins_loadable__WEBPACK_IMPORTED_MODULE_5__["default"]);
28076
28088
  var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];
@@ -28224,19 +28236,19 @@ var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'mo
28224
28236
  created: function created() {
28225
28237
  /* istanbul ignore next */
28226
28238
  if (this.$attrs.hasOwnProperty('box')) {
28227
- Object(_util_console__WEBPACK_IMPORTED_MODULE_10__["breaking"])('box', 'filled', this);
28239
+ Object(_util_console__WEBPACK_IMPORTED_MODULE_11__["breaking"])('box', 'filled', this);
28228
28240
  }
28229
28241
  /* istanbul ignore next */
28230
28242
 
28231
28243
 
28232
28244
  if (this.$attrs.hasOwnProperty('browser-autocomplete')) {
28233
- Object(_util_console__WEBPACK_IMPORTED_MODULE_10__["breaking"])('browser-autocomplete', 'autocomplete', this);
28245
+ Object(_util_console__WEBPACK_IMPORTED_MODULE_11__["breaking"])('browser-autocomplete', 'autocomplete', this);
28234
28246
  }
28235
28247
  /* istanbul ignore if */
28236
28248
 
28237
28249
 
28238
28250
  if (this.shaped && !(this.filled || this.outlined || this.isSolo)) {
28239
- Object(_util_console__WEBPACK_IMPORTED_MODULE_10__["consoleWarn"])('shaped should be used with either filled or outlined', this);
28251
+ Object(_util_console__WEBPACK_IMPORTED_MODULE_11__["consoleWarn"])('shaped should be used with either filled or outlined', this);
28240
28252
  }
28241
28253
  },
28242
28254
  mounted: function mounted() {
@@ -28386,7 +28398,7 @@ var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'mo
28386
28398
  });
28387
28399
  return this.$createElement('legend', {
28388
28400
  style: {
28389
- width: !this.isSingle ? Object(_util_helpers__WEBPACK_IMPORTED_MODULE_9__["convertToUnit"])(width) : undefined
28401
+ width: !this.isSingle ? Object(_util_helpers__WEBPACK_IMPORTED_MODULE_10__["convertToUnit"])(width) : undefined
28390
28402
  }
28391
28403
  }, [span]);
28392
28404
  },
@@ -28456,8 +28468,10 @@ var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'mo
28456
28468
  },
28457
28469
  onFocus: function onFocus(e) {
28458
28470
  if (!this.$refs.input) return;
28471
+ var root = Object(_util_dom__WEBPACK_IMPORTED_MODULE_9__["attachedRoot"])(this.$el);
28472
+ if (!root) return;
28459
28473
 
28460
- if (document.activeElement !== this.$refs.input) {
28474
+ if (root.activeElement !== this.$refs.input) {
28461
28475
  return this.$refs.input.focus();
28462
28476
  }
28463
28477
 
@@ -28472,7 +28486,7 @@ var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'mo
28472
28486
  this.badInput = target.validity && target.validity.badInput;
28473
28487
  },
28474
28488
  onKeyDown: function onKeyDown(e) {
28475
- if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_9__["keyCodes"].enter) this.$emit('change', this.internalValue);
28489
+ if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].enter) this.$emit('change', this.internalValue);
28476
28490
  this.$emit('keydown', e);
28477
28491
  },
28478
28492
  onMouseDown: function onMouseDown(e) {
@@ -28501,7 +28515,9 @@ var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'mo
28501
28515
  this.prependWidth = this.$refs['prepend-inner'].offsetWidth;
28502
28516
  },
28503
28517
  tryAutofocus: function tryAutofocus() {
28504
- if (!this.autofocus || typeof document === 'undefined' || !this.$refs.input || document.activeElement === this.$refs.input) return false;
28518
+ if (!this.autofocus || typeof document === 'undefined' || !this.$refs.input) return false;
28519
+ var root = Object(_util_dom__WEBPACK_IMPORTED_MODULE_9__["attachedRoot"])(this.$el);
28520
+ if (!root || root.activeElement === this.$refs.input) return false;
28505
28521
  this.$refs.input.focus();
28506
28522
  return true;
28507
28523
  },
@@ -33832,7 +33848,7 @@ function () {
33832
33848
 
33833
33849
  Vuetify.install = _install__WEBPACK_IMPORTED_MODULE_0__["install"];
33834
33850
  Vuetify.installed = false;
33835
- Vuetify.version = "2.4.4";
33851
+ Vuetify.version = "2.4.5";
33836
33852
  Vuetify.config = {
33837
33853
  silent: false
33838
33854
  };
@@ -36652,7 +36668,7 @@ __webpack_require__.r(__webpack_exports__);
36652
36668
  },
36653
36669
  rating: {
36654
36670
  ariaLabel: {
36655
- icon: 'Rating {0} of {1}'
36671
+ icon: 'Hodnotenie {0} z {1}'
36656
36672
  }
36657
36673
  }
36658
36674
  });
@@ -43771,6 +43787,44 @@ function dedupeModelListeners(data) {
43771
43787
 
43772
43788
  /***/ }),
43773
43789
 
43790
+ /***/ "./src/util/dom.ts":
43791
+ /*!*************************!*\
43792
+ !*** ./src/util/dom.ts ***!
43793
+ \*************************/
43794
+ /*! exports provided: attachedRoot */
43795
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
43796
+
43797
+ "use strict";
43798
+ __webpack_require__.r(__webpack_exports__);
43799
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachedRoot", function() { return attachedRoot; });
43800
+ /**
43801
+ * Returns:
43802
+ * - 'null' if the node is not attached to the DOM
43803
+ * - the root node (HTMLDocument | ShadowRoot) otherwise
43804
+ */
43805
+ function attachedRoot(node) {
43806
+ /* istanbul ignore next */
43807
+ if (typeof node.getRootNode !== 'function') {
43808
+ // Shadow DOM not supported (IE11), lets find the root of this node
43809
+ while (node.parentNode) {
43810
+ node = node.parentNode;
43811
+ } // The root parent is the document if the node is attached to the DOM
43812
+
43813
+
43814
+ if (node !== document) return null;
43815
+ return document;
43816
+ }
43817
+
43818
+ var root = node.getRootNode(); // The composed root node is the document if the node is attached to the DOM
43819
+
43820
+ if (root !== document && root.getRootNode({
43821
+ composed: true
43822
+ }) !== document) return null;
43823
+ return root;
43824
+ }
43825
+
43826
+ /***/ }),
43827
+
43774
43828
  /***/ "./src/util/helpers.ts":
43775
43829
  /*!*****************************!*\
43776
43830
  !*** ./src/util/helpers.ts ***!