@dimailn/vuetify 2.7.2-alpha24 → 2.7.2-alpha25

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 (74) hide show
  1. package/dist/vuetify.js +241 -230
  2. package/dist/vuetify.js.map +1 -1
  3. package/dist/vuetify.min.css +1 -1
  4. package/dist/vuetify.min.js +2 -2
  5. package/es5/components/VBtn/VBtn.js +16 -16
  6. package/es5/components/VBtn/VBtn.js.map +1 -1
  7. package/es5/components/VColorPicker/VColorPicker.js +18 -31
  8. package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
  9. package/es5/components/VColorPicker/VColorPickerCanvas.js +45 -46
  10. package/es5/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
  11. package/es5/components/VColorPicker/VColorPickerEdit.js +27 -26
  12. package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
  13. package/es5/components/VColorPicker/VColorPickerPreview.js +41 -30
  14. package/es5/components/VColorPicker/VColorPickerPreview.js.map +1 -1
  15. package/es5/components/VColorPicker/VColorPickerSwatches.js +13 -10
  16. package/es5/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
  17. package/es5/components/VDataTable/VDataTable.js +7 -11
  18. package/es5/components/VDataTable/VDataTable.js.map +1 -1
  19. package/es5/components/VInput/VInput.js +20 -6
  20. package/es5/components/VInput/VInput.js.map +1 -1
  21. package/es5/components/VSlider/VSlider.js +23 -18
  22. package/es5/components/VSlider/VSlider.js.map +1 -1
  23. package/es5/components/VTooltip/VTooltip.js +3 -7
  24. package/es5/components/VTooltip/VTooltip.js.map +1 -1
  25. package/es5/framework.js +1 -1
  26. package/lib/components/VBtn/VBtn.js +18 -19
  27. package/lib/components/VBtn/VBtn.js.map +1 -1
  28. package/lib/components/VColorPicker/VColorPicker.js +29 -37
  29. package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
  30. package/lib/components/VColorPicker/VColorPickerCanvas.js +41 -43
  31. package/lib/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
  32. package/lib/components/VColorPicker/VColorPickerEdit.js +25 -31
  33. package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
  34. package/lib/components/VColorPicker/VColorPickerPreview.js +45 -32
  35. package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
  36. package/lib/components/VColorPicker/VColorPickerSwatches.js +15 -9
  37. package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
  38. package/lib/components/VDataTable/VDataTable.js +3 -4
  39. package/lib/components/VDataTable/VDataTable.js.map +1 -1
  40. package/lib/components/VInput/VInput.js +12 -4
  41. package/lib/components/VInput/VInput.js.map +1 -1
  42. package/lib/components/VSlider/VSlider.js +26 -21
  43. package/lib/components/VSlider/VSlider.js.map +1 -1
  44. package/lib/components/VTooltip/VTooltip.js +6 -9
  45. package/lib/components/VTooltip/VTooltip.js.map +1 -1
  46. package/lib/framework.js +1 -1
  47. package/package.json +1 -1
  48. package/src/components/VBtn/VBtn.ts +18 -16
  49. package/src/components/VBtn/__tests__/VBtn.spec.ts +257 -242
  50. package/src/components/VBtn/__tests__/__snapshots__/VBtn.spec.ts.snap +13 -73
  51. package/src/components/VColorPicker/VColorPicker.ts +32 -35
  52. package/src/components/VColorPicker/VColorPickerCanvas.ts +44 -37
  53. package/src/components/VColorPicker/VColorPickerEdit.ts +37 -35
  54. package/src/components/VColorPicker/VColorPickerPreview.ts +48 -28
  55. package/src/components/VColorPicker/VColorPickerSwatches.ts +23 -12
  56. package/src/components/VColorPicker/__tests__/VColorPicker.spec.ts +47 -47
  57. package/src/components/VColorPicker/__tests__/VColorPickerCanvas.spec.ts +15 -13
  58. package/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts +52 -50
  59. package/src/components/VColorPicker/__tests__/VColorPickerPreview.spec.ts +101 -30
  60. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +200 -157
  61. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +28 -11
  62. package/src/components/VDataTable/VDataTable.ts +3 -3
  63. package/src/components/VInput/VInput.ts +8 -2
  64. package/src/components/VInput/__tests__/VInput.spec.ts +170 -234
  65. package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +50 -101
  66. package/src/components/VSkeletonLoader/__tests__/VSkeletonLoader.spec.ts +22 -15
  67. package/src/components/VSkeletonLoader/__tests__/__snapshots__/VSkeletonLoader.spec.ts.snap +60 -60
  68. package/src/components/VSlider/VSlider.ts +43 -27
  69. package/src/components/VSlider/__tests__/VSlider.spec.ts +188 -286
  70. package/src/components/VSlider/__tests__/__snapshots__/VSlider.spec.ts.snap +157 -246
  71. package/src/components/VTabs/__tests__/VTab.spec.ts +3 -3
  72. package/src/components/VTabs/__tests__/VTabsBar.spec.ts +2 -2
  73. package/src/components/VTooltip/VTooltip.ts +20 -20
  74. package/src/components/VTooltip/__tests__/VTooltip.spec.ts +60 -75
package/dist/vuetify.js CHANGED
@@ -2412,16 +2412,14 @@ __webpack_require__.r(__webpack_exports__);
2412
2412
  /* harmony import */ var _VProgressCircular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VProgressCircular */ "./src/components/VProgressCircular/index.ts");
2413
2413
  /* harmony import */ var _mixins_groupable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/groupable */ "./src/mixins/groupable/index.ts");
2414
2414
  /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable/index.ts");
2415
- /* harmony import */ var _mixins_elevatable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/elevatable */ "./src/mixins/elevatable/index.ts");
2416
- /* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable/index.ts");
2417
- /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable/index.ts");
2418
- /* harmony import */ var _mixins_sizeable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../mixins/sizeable */ "./src/mixins/sizeable/index.ts");
2419
- /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
2420
- /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
2421
- /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
2422
- /* harmony import */ var _util_mergeData__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../util/mergeData */ "./src/util/mergeData.ts");
2423
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! vue */ "vue");
2424
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_13__);
2415
+ /* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable/index.ts");
2416
+ /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable/index.ts");
2417
+ /* harmony import */ var _mixins_sizeable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/sizeable */ "./src/mixins/sizeable/index.ts");
2418
+ /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
2419
+ /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts");
2420
+ /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
2421
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vue */ "vue");
2422
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_11__);
2425
2423
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2426
2424
 
2427
2425
  var __assign = undefined && undefined.__assign || function () {
@@ -2478,22 +2476,18 @@ var __read = undefined && undefined.__read || function (o, n) {
2478
2476
 
2479
2477
 
2480
2478
 
2481
-
2482
2479
  // Utilities
2483
2480
 
2484
2481
 
2485
2482
 
2486
-
2487
2483
  // Types
2488
2484
 
2489
2485
 
2490
-
2491
- var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_VSheet__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_routable__WEBPACK_IMPORTED_MODULE_7__["default"], _mixins_positionable__WEBPACK_IMPORTED_MODULE_6__["default"], _mixins_sizeable__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_mixins_groupable__WEBPACK_IMPORTED_MODULE_3__["factory"])('btnToggle'), Object(_mixins_toggleable__WEBPACK_IMPORTED_MODULE_4__["factory"])('inputValue')
2486
+ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_8__["default"])(_VSheet__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_routable__WEBPACK_IMPORTED_MODULE_6__["default"], _mixins_positionable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_sizeable__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_mixins_groupable__WEBPACK_IMPORTED_MODULE_3__["factory"])('btnToggle'), Object(_mixins_toggleable__WEBPACK_IMPORTED_MODULE_4__["factory"])('inputValue')
2492
2487
  /* @vue/component */
2493
2488
  );
2494
2489
  /* harmony default export */ __webpack_exports__["default"] = (baseMixins.extend({
2495
2490
  name: 'v-btn',
2496
- inheritAttrs: false,
2497
2491
  props: {
2498
2492
  activeClass: {
2499
2493
  type: String
@@ -2528,7 +2522,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_V
2528
2522
  classes: function classes() {
2529
2523
  return __assign(__assign(__assign(__assign(__assign(__assign({
2530
2524
  'v-btn': true
2531
- }, _mixins_routable__WEBPACK_IMPORTED_MODULE_7__["default"].computed.classes.call(this)), {
2525
+ }, _mixins_routable__WEBPACK_IMPORTED_MODULE_6__["default"].computed.classes.call(this)), {
2532
2526
  'v-btn--absolute': this.absolute,
2533
2527
  'v-btn--block': this.block,
2534
2528
  'v-btn--bottom': this.bottom,
@@ -2553,7 +2547,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_V
2553
2547
  },
2554
2548
  computedElevation: function computedElevation() {
2555
2549
  if (this.disabled) return undefined;
2556
- return _mixins_elevatable__WEBPACK_IMPORTED_MODULE_5__["default"].computed.computedElevation.call(this);
2550
+ return this.elevation;
2557
2551
  },
2558
2552
  computedRipple: function computedRipple() {
2559
2553
  var _a;
@@ -2587,7 +2581,7 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_V
2587
2581
  original = _b[0],
2588
2582
  replacement = _b[1];
2589
2583
 
2590
- if (_this.$attrs.hasOwnProperty(original)) Object(_util_console__WEBPACK_IMPORTED_MODULE_10__["breaking"])(original, replacement, _this);
2584
+ if (_this.$attrs.hasOwnProperty(original)) Object(_util_console__WEBPACK_IMPORTED_MODULE_9__["breaking"])(original, replacement, _this);
2591
2585
  });
2592
2586
  },
2593
2587
  methods: {
@@ -2599,14 +2593,14 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_V
2599
2593
  this.btnToggle && this.toggle();
2600
2594
  },
2601
2595
  genContent: function genContent() {
2602
- return Object(vue__WEBPACK_IMPORTED_MODULE_13__["h"])('span', {
2596
+ return Object(vue__WEBPACK_IMPORTED_MODULE_11__["h"])('span', {
2603
2597
  class: 'v-btn__content'
2604
- }, Object(_util_helpers__WEBPACK_IMPORTED_MODULE_11__["getSlot"])(this));
2598
+ }, Object(_util_helpers__WEBPACK_IMPORTED_MODULE_10__["getSlot"])(this));
2605
2599
  },
2606
2600
  genLoader: function genLoader() {
2607
- return Object(vue__WEBPACK_IMPORTED_MODULE_13__["h"])('span', {
2601
+ return Object(vue__WEBPACK_IMPORTED_MODULE_11__["h"])('span', {
2608
2602
  class: 'v-btn__loader'
2609
- }, Object(_util_helpers__WEBPACK_IMPORTED_MODULE_11__["getSlot"])(this, 'loader') || [Object(vue__WEBPACK_IMPORTED_MODULE_13__["h"])(_VProgressCircular__WEBPACK_IMPORTED_MODULE_2__["default"], {
2603
+ }, Object(_util_helpers__WEBPACK_IMPORTED_MODULE_10__["getSlot"])(this, 'loader') || [Object(vue__WEBPACK_IMPORTED_MODULE_11__["h"])(_VProgressCircular__WEBPACK_IMPORTED_MODULE_2__["default"], {
2610
2604
  indeterminate: true,
2611
2605
  size: 23,
2612
2606
  width: 2
@@ -2621,20 +2615,25 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_V
2621
2615
  linkData = _a.data,
2622
2616
  directives = _a.directives;
2623
2617
 
2624
- var setColor = this.hasBg ? this.setBackgroundColor : this.setTextColor;
2625
- var data = {};
2618
+ var setColor = this.hasBg ? this.setBackgroundColor : this.setTextColor; // Merge component classes with routable classes
2619
+
2620
+ var mergedClasses = __assign(__assign({}, this.classes), linkData.class);
2626
2621
 
2627
2622
  if (tag === 'button') {
2628
- data.type = this.type;
2629
- data.disabled = this.disabled;
2623
+ linkData.type = this.type;
2624
+ linkData.disabled = this.disabled;
2630
2625
  }
2631
2626
 
2632
- data.value = ['string', 'number'].includes(_typeof(this.value)) ? this.value : JSON.stringify(this.value);
2633
- data = __assign(__assign({}, data), linkData);
2634
- data = Object(_util_mergeData__WEBPACK_IMPORTED_MODULE_12__["default"])(data, {
2635
- class: this.$attrs.class
2636
- });
2637
- return Object(vue__WEBPACK_IMPORTED_MODULE_13__["withDirectives"])(Object(vue__WEBPACK_IMPORTED_MODULE_13__["h"])(tag, this.disabled ? data : setColor(this.color, data), children), directives);
2627
+ linkData.value = ['string', 'number'].includes(_typeof(this.value)) ? this.value : JSON.stringify(this.value);
2628
+
2629
+ var data = __assign(__assign({}, linkData), {
2630
+ class: mergedClasses,
2631
+ style: this.styles
2632
+ }); // Apply color styling but preserve Vue's automatic attribute inheritance
2633
+
2634
+
2635
+ var finalData = this.disabled ? data : setColor(this.color, data);
2636
+ return Object(vue__WEBPACK_IMPORTED_MODULE_11__["withDirectives"])(Object(vue__WEBPACK_IMPORTED_MODULE_11__["h"])(tag, finalData, children), directives);
2638
2637
  }
2639
2638
  }));
2640
2639
 
@@ -7977,12 +7976,9 @@ __webpack_require__.r(__webpack_exports__);
7977
7976
  /* harmony import */ var _VColorPickerEdit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./VColorPickerEdit */ "./src/components/VColorPicker/VColorPickerEdit.ts");
7978
7977
  /* harmony import */ var _VColorPickerSwatches__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./VColorPickerSwatches */ "./src/components/VColorPicker/VColorPickerSwatches.ts");
7979
7978
  /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util */ "./src/components/VColorPicker/util/index.ts");
7980
- /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
7981
- /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
7982
- /* harmony import */ var _mixins_elevatable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../mixins/elevatable */ "./src/mixins/elevatable/index.ts");
7983
- /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable/index.ts");
7984
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7985
-
7979
+ /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
7980
+ /* harmony import */ var _mixins_elevatable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../mixins/elevatable */ "./src/mixins/elevatable/index.ts");
7981
+ /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable/index.ts");
7986
7982
  var __assign = undefined && undefined.__assign || function () {
7987
7983
  __assign = Object.assign || function (t) {
7988
7984
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -8010,13 +8006,13 @@ var __assign = undefined && undefined.__assign || function () {
8010
8006
  // Helpers
8011
8007
 
8012
8008
 
8013
-
8014
8009
  // Mixins
8015
8010
 
8016
8011
 
8017
8012
 
8018
- /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_8__["default"])(_mixins_elevatable__WEBPACK_IMPORTED_MODULE_10__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_11__["default"]).extend({
8013
+ /* harmony default export */ __webpack_exports__["default"] = (Object(vue__WEBPACK_IMPORTED_MODULE_0__["defineComponent"])({
8019
8014
  name: 'v-color-picker',
8015
+ mixins: [_mixins_elevatable__WEBPACK_IMPORTED_MODULE_9__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_10__["default"]],
8020
8016
  props: {
8021
8017
  canvasHeight: {
8022
8018
  type: [String, Number],
@@ -8053,6 +8049,7 @@ var __assign = undefined && undefined.__assign || function () {
8053
8049
  default: 300
8054
8050
  }
8055
8051
  },
8052
+ emits: ['update:modelValue', 'update:color', 'update:mode'],
8056
8053
  data: function data() {
8057
8054
  return {
8058
8055
  internalValue: Object(_util__WEBPACK_IMPORTED_MODULE_7__["fromRGBA"])({
@@ -8070,7 +8067,7 @@ var __assign = undefined && undefined.__assign || function () {
8070
8067
  }
8071
8068
  },
8072
8069
  watch: {
8073
- value: {
8070
+ modelValue: {
8074
8071
  handler: function handler(color) {
8075
8072
  this.updateColor(Object(_util__WEBPACK_IMPORTED_MODULE_7__["parseColor"])(color, this.internalValue));
8076
8073
  },
@@ -8082,7 +8079,7 @@ var __assign = undefined && undefined.__assign || function () {
8082
8079
  this.internalValue = color;
8083
8080
  var value = Object(_util__WEBPACK_IMPORTED_MODULE_7__["extractColor"])(this.internalValue, this.modelValue);
8084
8081
 
8085
- if (!Object(_util_helpers__WEBPACK_IMPORTED_MODULE_9__["deepEqual"])(value, this.modelValue)) {
8082
+ if (!Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["deepEqual"])(value, this.modelValue)) {
8086
8083
  this.$emit('update:modelValue', value);
8087
8084
  this.$emit('update:color', this.internalValue);
8088
8085
  }
@@ -8119,42 +8116,29 @@ var __assign = undefined && undefined.__assign || function () {
8119
8116
  },
8120
8117
  genPreview: function genPreview() {
8121
8118
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VColorPickerPreview__WEBPACK_IMPORTED_MODULE_3__["default"], {
8122
- props: {
8123
- color: this.internalValue,
8124
- disabled: this.disabled,
8125
- hideAlpha: this.hideAlpha
8126
- },
8127
- on: {
8128
- 'update:color': this.updateColor
8129
- }
8119
+ color: this.internalValue,
8120
+ disabled: this.disabled,
8121
+ hideAlpha: this.hideAlpha,
8122
+ 'onUpdate:color': this.updateColor
8130
8123
  });
8131
8124
  },
8132
8125
  genSwatches: function genSwatches() {
8133
8126
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VColorPickerSwatches__WEBPACK_IMPORTED_MODULE_6__["default"], {
8134
- props: {
8135
- dark: this.dark,
8136
- light: this.light,
8137
- disabled: this.disabled,
8138
- swatches: this.swatches,
8139
- color: this.internalValue,
8140
- maxHeight: this.swatchesMaxHeight
8141
- },
8142
- on: {
8143
- 'update:color': this.updateColor
8144
- }
8127
+ disabled: this.disabled,
8128
+ swatches: this.swatches,
8129
+ color: this.internalValue,
8130
+ maxHeight: this.swatchesMaxHeight,
8131
+ 'onUpdate:color': this.updateColor
8145
8132
  });
8146
8133
  }
8147
8134
  },
8148
8135
  render: function render() {
8149
- var _h;
8150
-
8151
- return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VSheet_VSheet__WEBPACK_IMPORTED_MODULE_2__["default"], (_h = {
8152
- class: 'v-color-picker'
8153
- }, _defineProperty(_h, "class", __assign(__assign({
8154
- 'v-color-picker--flat': this.flat
8155
- }, this.themeClasses), this.elevationClasses)), _defineProperty(_h, "props", {
8136
+ return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VSheet_VSheet__WEBPACK_IMPORTED_MODULE_2__["default"], {
8137
+ class: ['v-color-picker', __assign(__assign({
8138
+ 'v-color-picker--flat': this.flat
8139
+ }, this.themeClasses), this.elevationClasses)],
8156
8140
  maxWidth: this.width
8157
- }), _h), [!this.hideCanvas && this.genCanvas(), (!this.hideSliders || !this.hideInputs) && this.genControls(), this.showSwatches && this.genSwatches()]);
8141
+ }, [!this.hideCanvas && this.genCanvas(), (!this.hideSliders || !this.hideInputs) && this.genControls(), this.showSwatches && this.genSwatches()]);
8158
8142
  }
8159
8143
  }));
8160
8144
 
@@ -8186,15 +8170,11 @@ __webpack_require__.r(__webpack_exports__);
8186
8170
  /* harmony import */ var _VColorPickerCanvas_sass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_VColorPickerCanvas_sass__WEBPACK_IMPORTED_MODULE_1__);
8187
8171
  /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
8188
8172
  /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/components/VColorPicker/util/index.ts");
8189
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8190
-
8191
8173
  // Styles
8192
8174
 
8193
8175
  // Helpers
8194
8176
 
8195
8177
 
8196
- // Types
8197
-
8198
8178
 
8199
8179
  /* harmony default export */ __webpack_exports__["default"] = (Object(vue__WEBPACK_IMPORTED_MODULE_0__["defineComponent"])({
8200
8180
  name: 'v-color-picker-canvas',
@@ -8224,6 +8204,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8224
8204
  default: 300
8225
8205
  }
8226
8206
  },
8207
+ emits: ['update:color'],
8227
8208
  data: function data() {
8228
8209
  return {
8229
8210
  boundingRect: {
@@ -8241,34 +8222,24 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8241
8222
  y: 0
8242
8223
  };
8243
8224
  return {
8244
- x: this.color.hsva.s * parseInt(this.width, 10),
8245
- y: (1 - this.color.hsva.v) * parseInt(this.height, 10)
8225
+ x: this.color.hsva.s * parseInt(String(this.width), 10),
8226
+ y: (1 - this.color.hsva.v) * parseInt(String(this.height), 10)
8246
8227
  };
8247
8228
  }
8248
8229
  },
8249
8230
  watch: {
8250
- 'color.hue': 'updateCanvas'
8231
+ 'color.hue': function colorHue() {
8232
+ this.updateCanvas();
8233
+ }
8251
8234
  },
8252
8235
  mounted: function mounted() {
8253
8236
  this.updateCanvas();
8254
8237
  },
8255
8238
  methods: {
8256
- emitColor: function emitColor(x, y) {
8257
- var _a = this.boundingRect,
8258
- left = _a.left,
8259
- top = _a.top,
8260
- width = _a.width,
8261
- height = _a.height;
8262
- this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_3__["fromHSVA"])({
8263
- h: this.color.hue,
8264
- s: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["clamp"])(x - left, 0, width) / width,
8265
- v: 1 - Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["clamp"])(y - top, 0, height) / height,
8266
- a: this.color.alpha
8267
- }));
8268
- },
8269
8239
  updateCanvas: function updateCanvas() {
8270
8240
  if (!this.color) return;
8271
8241
  var canvas = this.$refs.canvas;
8242
+ if (!canvas) return;
8272
8243
  var ctx = canvas.getContext('2d');
8273
8244
  if (!ctx) return;
8274
8245
  var saturationGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);
@@ -8285,19 +8256,24 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8285
8256
  ctx.fillStyle = valueGradient;
8286
8257
  ctx.fillRect(0, 0, canvas.width, canvas.height);
8287
8258
  },
8259
+ emitColor: function emitColor(x, y) {
8260
+ var _a = this.boundingRect,
8261
+ left = _a.left,
8262
+ top = _a.top,
8263
+ width = _a.width,
8264
+ height = _a.height;
8265
+ this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_3__["fromHSVA"])({
8266
+ h: this.color.hue,
8267
+ s: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["clamp"])(x - left, 0, width) / width,
8268
+ v: 1 - Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["clamp"])(y - top, 0, height) / height,
8269
+ a: this.color.alpha
8270
+ }));
8271
+ },
8288
8272
  handleClick: function handleClick(e) {
8289
8273
  if (this.disabled) return;
8290
8274
  this.boundingRect = this.$el.getBoundingClientRect();
8291
8275
  this.emitColor(e.clientX, e.clientY);
8292
8276
  },
8293
- handleMouseDown: function handleMouseDown(e) {
8294
- // To prevent selection while moving cursor
8295
- e.preventDefault();
8296
- if (this.disabled) return;
8297
- this.boundingRect = this.$el.getBoundingClientRect();
8298
- window.addEventListener('mousemove', this.handleMouseMove);
8299
- window.addEventListener('mouseup', this.handleMouseUp);
8300
- },
8301
8277
  handleMouseMove: function handleMouseMove(e) {
8302
8278
  if (this.disabled) return;
8303
8279
  this.emitColor(e.clientX, e.clientY);
@@ -8306,30 +8282,35 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8306
8282
  window.removeEventListener('mousemove', this.handleMouseMove);
8307
8283
  window.removeEventListener('mouseup', this.handleMouseUp);
8308
8284
  },
8285
+ handleMouseDown: function handleMouseDown(e) {
8286
+ // To prevent selection while moving cursor
8287
+ e.preventDefault();
8288
+ if (this.disabled) return;
8289
+ this.boundingRect = this.$el.getBoundingClientRect();
8290
+ window.addEventListener('mousemove', this.handleMouseMove);
8291
+ window.addEventListener('mouseup', this.handleMouseUp);
8292
+ },
8309
8293
  genCanvas: function genCanvas() {
8310
8294
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('canvas', {
8311
8295
  ref: 'canvas',
8312
- attrs: {
8313
- width: this.width,
8314
- height: this.height
8315
- }
8296
+ width: this.width,
8297
+ height: this.height
8316
8298
  });
8317
8299
  },
8318
8300
  genDot: function genDot() {
8319
- var _h;
8320
-
8321
- var radius = parseInt(this.dotSize, 10) / 2;
8301
+ var radius = parseInt(String(this.dotSize), 10) / 2;
8322
8302
  var x = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.dot.x - radius);
8323
8303
  var y = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.dot.y - radius);
8324
- return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', (_h = {
8325
- class: 'v-color-picker__canvas-dot'
8326
- }, _defineProperty(_h, "class", {
8327
- 'v-color-picker__canvas-dot--disabled': this.disabled
8328
- }), _defineProperty(_h, "style", {
8329
- width: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.dotSize),
8330
- height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.dotSize),
8331
- transform: "translate(" + x + ", " + y + ")"
8332
- }), _h));
8304
+ return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8305
+ class: ['v-color-picker__canvas-dot', {
8306
+ 'v-color-picker__canvas-dot--disabled': this.disabled
8307
+ }],
8308
+ style: {
8309
+ width: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.dotSize),
8310
+ height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.dotSize),
8311
+ transform: "translate(" + x + ", " + y + ")"
8312
+ }
8313
+ });
8333
8314
  }
8334
8315
  },
8335
8316
  render: function render() {
@@ -8339,10 +8320,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8339
8320
  width: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.width),
8340
8321
  height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.height)
8341
8322
  },
8342
- on: {
8343
- click: this.handleClick,
8344
- mousedown: this.handleMouseDown
8345
- }
8323
+ onClick: this.handleClick,
8324
+ onMousedown: this.handleMouseDown
8346
8325
  }, [this.genCanvas(), this.genDot()]);
8347
8326
  }
8348
8327
  }));
@@ -8428,8 +8407,6 @@ var __read = undefined && undefined.__read || function (o, n) {
8428
8407
 
8429
8408
  // Helpers
8430
8409
 
8431
- // Types
8432
-
8433
8410
 
8434
8411
 
8435
8412
  var modes = {
@@ -8448,7 +8425,10 @@ var modes = {
8448
8425
  /* harmony default export */ __webpack_exports__["default"] = (Object(vue__WEBPACK_IMPORTED_MODULE_0__["defineComponent"])({
8449
8426
  name: 'v-color-picker-edit',
8450
8427
  props: {
8451
- color: Object,
8428
+ color: {
8429
+ type: Object,
8430
+ required: true
8431
+ },
8452
8432
  disabled: Boolean,
8453
8433
  hideAlpha: Boolean,
8454
8434
  hideModeSwitch: Boolean,
@@ -8460,15 +8440,15 @@ var modes = {
8460
8440
  }
8461
8441
  }
8462
8442
  },
8443
+ emits: ['update:color', 'update:mode'],
8463
8444
  data: function data() {
8464
8445
  return {
8465
- modes: modes,
8466
8446
  internalMode: this.mode
8467
8447
  };
8468
8448
  },
8469
8449
  computed: {
8470
8450
  currentMode: function currentMode() {
8471
- return this.modes[this.internalMode];
8451
+ return modes[this.internalMode];
8472
8452
  }
8473
8453
  },
8474
8454
  watch: {
@@ -8476,9 +8456,6 @@ var modes = {
8476
8456
  this.internalMode = _mode;
8477
8457
  }
8478
8458
  },
8479
- created: function created() {
8480
- this.internalMode = this.mode;
8481
- },
8482
8459
  methods: {
8483
8460
  getValue: function getValue(v, type) {
8484
8461
  if (type === 'float') return Math.round(v * 100) / 100;else if (type === 'int') return Math.round(v);else return 0;
@@ -8487,20 +8464,21 @@ var modes = {
8487
8464
  if (type === 'float') return parseFloat(v);else if (type === 'int') return parseInt(v, 10) || 0;else return 0;
8488
8465
  },
8489
8466
  changeMode: function changeMode() {
8490
- var modes = Object.keys(this.modes);
8491
- var index = modes.indexOf(this.internalMode);
8492
- var newMode = modes[(index + 1) % modes.length];
8467
+ var modeKeys = Object.keys(modes);
8468
+ var index = modeKeys.indexOf(this.internalMode);
8469
+ var newMode = modeKeys[(index + 1) % modeKeys.length];
8493
8470
  this.internalMode = newMode;
8494
8471
  this.$emit('update:mode', newMode);
8495
8472
  },
8496
- genInput: function genInput(target, attrs, value, on) {
8473
+ genInput: function genInput(target, attrs, value, onChange) {
8497
8474
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8498
8475
  class: 'v-color-picker__input'
8499
- }, [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('input', __assign(__assign(__assign({
8476
+ }, [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('input', __assign(__assign({
8500
8477
  key: target
8501
8478
  }, attrs), {
8502
- value: value
8503
- }), on)), Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('span', target.toUpperCase())]);
8479
+ value: value,
8480
+ onChange: onChange
8481
+ })), Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('span', target.toUpperCase())]);
8504
8482
  },
8505
8483
  genInputs: function genInputs() {
8506
8484
  var _this = this;
@@ -8511,12 +8489,10 @@ var modes = {
8511
8489
  return this.genInput('hex', {
8512
8490
  maxlength: this.hideAlpha ? 7 : 9,
8513
8491
  disabled: this.disabled
8514
- }, value, {
8515
- change: function change(e) {
8516
- var el = e.target;
8492
+ }, value, function (e) {
8493
+ var el = e.target;
8517
8494
 
8518
- _this.$emit('update:color', _this.currentMode.from(Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_4__["parseHex"])(el.value)));
8519
- }
8495
+ _this.$emit('update:color', _this.currentMode.from(Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_4__["parseHex"])(el.value)));
8520
8496
  });
8521
8497
  } else {
8522
8498
  var inputs = this.hideAlpha ? this.currentMode.inputs.slice(0, -1) : this.currentMode.inputs;
@@ -8533,16 +8509,14 @@ var modes = {
8533
8509
  max: max,
8534
8510
  step: type === 'float' ? '0.01' : type === 'int' ? '1' : undefined,
8535
8511
  disabled: _this.disabled
8536
- }, _this.getValue(value[target], type), {
8537
- input: function input(e) {
8538
- var _a;
8512
+ }, _this.getValue(value[target], type), function (e) {
8513
+ var _a;
8539
8514
 
8540
- var el = e.target;
8515
+ var el = e.target;
8541
8516
 
8542
- var newVal = _this.parseValue(el.value || '0', type);
8517
+ var newVal = _this.parseValue(el.value || '0', type);
8543
8518
 
8544
- _this.$emit('update:color', _this.currentMode.from(Object.assign({}, value, (_a = {}, _a[target] = newVal, _a)), _this.color.alpha));
8545
- }
8519
+ _this.$emit('update:color', _this.currentMode.from(Object.assign({}, value, (_a = {}, _a[target] = newVal, _a)), _this.color.alpha));
8546
8520
  });
8547
8521
  });
8548
8522
  }
@@ -8553,7 +8527,11 @@ var modes = {
8553
8527
  icon: true,
8554
8528
  disabled: this.disabled,
8555
8529
  onClick: this.changeMode
8556
- }, [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VIcon__WEBPACK_IMPORTED_MODULE_3__["default"], '$unfold')]);
8530
+ }, {
8531
+ default: function _default() {
8532
+ return [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VIcon__WEBPACK_IMPORTED_MODULE_3__["default"], {}, '$unfold')];
8533
+ }
8534
+ });
8557
8535
  }
8558
8536
  },
8559
8537
  render: function render() {
@@ -8614,77 +8592,86 @@ var __assign = undefined && undefined.__assign || function () {
8614
8592
 
8615
8593
  // Utilities
8616
8594
 
8617
- // Types
8618
-
8619
8595
 
8620
8596
 
8621
8597
  /* harmony default export */ __webpack_exports__["default"] = (Object(vue__WEBPACK_IMPORTED_MODULE_0__["defineComponent"])({
8622
8598
  name: 'v-color-picker-preview',
8623
8599
  props: {
8624
- color: Object,
8600
+ color: {
8601
+ type: Object,
8602
+ required: true
8603
+ },
8625
8604
  disabled: Boolean,
8626
8605
  hideAlpha: Boolean
8627
8606
  },
8607
+ emits: ['update:color'],
8628
8608
  methods: {
8629
8609
  genAlpha: function genAlpha() {
8630
8610
  var _this = this;
8631
8611
 
8612
+ var _a;
8613
+
8614
+ if (!this.color) return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div');
8632
8615
  return this.genTrack({
8633
8616
  class: 'v-color-picker__alpha',
8634
8617
  thumbColor: 'grey lighten-2',
8635
8618
  hideDetails: true,
8636
- value: this.color.alpha,
8619
+ modelValue: this.color.alpha,
8637
8620
  step: 0,
8638
8621
  min: 0,
8639
8622
  max: 1,
8640
8623
  style: {
8641
- backgroundImage: this.disabled ? undefined : "linear-gradient(to " + (this.$vuetify.rtl ? 'left' : 'right') + ", transparent, " + Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_3__["RGBtoCSS"])(this.color.rgba) + ")"
8624
+ backgroundImage: this.disabled ? undefined : "linear-gradient(to " + (((_a = this.$vuetify) === null || _a === void 0 ? void 0 : _a.rtl) ? 'left' : 'right') + ", transparent, " + Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_3__["RGBtoCSS"])(this.color.rgba) + ")"
8642
8625
  },
8643
- onInput: function onInput(val) {
8644
- return _this.color.alpha !== val && _this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHSVA"])(__assign(__assign({}, _this.color.hsva), {
8645
- a: val
8646
- })));
8626
+ 'onUpdate:modelValue': function onUpdateModelValue(val) {
8627
+ if (_this.color && _this.color.alpha !== val) {
8628
+ _this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHSVA"])(__assign(__assign({}, _this.color.hsva), {
8629
+ a: val
8630
+ })));
8631
+ }
8647
8632
  }
8648
8633
  });
8649
8634
  },
8650
- genSliders: function genSliders() {
8651
- return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8652
- class: 'v-color-picker__sliders'
8653
- }, [this.genHue(), !this.hideAlpha && this.genAlpha()]);
8654
- },
8655
- genDot: function genDot() {
8656
- return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8657
- class: 'v-color-picker__dot'
8658
- }, [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8659
- style: {
8660
- background: Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_3__["RGBAtoCSS"])(this.color.rgba)
8661
- }
8662
- })]);
8663
- },
8664
8635
  genHue: function genHue() {
8665
8636
  var _this = this;
8666
8637
 
8638
+ if (!this.color) return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div');
8667
8639
  return this.genTrack({
8668
8640
  class: 'v-color-picker__hue',
8669
8641
  thumbColor: 'grey lighten-2',
8670
8642
  hideDetails: true,
8671
- value: this.color.hue,
8643
+ modelValue: this.color.hue,
8672
8644
  step: 0,
8673
8645
  min: 0,
8674
8646
  max: 360,
8675
- onInput: function onInput(val) {
8676
- return _this.color.hue !== val && _this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHSVA"])(__assign(__assign({}, _this.color.hsva), {
8677
- h: val
8678
- })));
8647
+ 'onUpdate:modelValue': function onUpdateModelValue(val) {
8648
+ if (_this.color && _this.color.hue !== val) {
8649
+ _this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHSVA"])(__assign(__assign({}, _this.color.hsva), {
8650
+ h: val
8651
+ })));
8652
+ }
8679
8653
  }
8680
8654
  });
8681
8655
  },
8682
8656
  genTrack: function genTrack(options) {
8683
- return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VSlider_VSlider__WEBPACK_IMPORTED_MODULE_2__["default"], __assign(__assign(__assign({
8684
- class: 'v-color-picker__track'
8685
- }, options), {
8657
+ return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VSlider_VSlider__WEBPACK_IMPORTED_MODULE_2__["default"], __assign({
8658
+ class: 'v-color-picker__track',
8686
8659
  disabled: this.disabled
8687
- }), options.props));
8660
+ }, options));
8661
+ },
8662
+ genSliders: function genSliders() {
8663
+ return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8664
+ class: 'v-color-picker__sliders'
8665
+ }, [this.genHue(), !this.hideAlpha && this.genAlpha()]);
8666
+ },
8667
+ genDot: function genDot() {
8668
+ return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8669
+ class: 'v-color-picker__dot'
8670
+ }, [Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8671
+ style: {
8672
+ background: this.color ? Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_3__["RGBAtoCSS"])(this.color.rgba) : 'transparent'
8673
+ }
8674
+ })]);
8688
8675
  }
8689
8676
  },
8690
8677
  render: function render() {
@@ -8726,9 +8713,8 @@ __webpack_require__.r(__webpack_exports__);
8726
8713
  /* harmony import */ var _util_colors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/colors */ "./src/util/colors.ts");
8727
8714
  /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./src/components/VColorPicker/util/index.ts");
8728
8715
  /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts");
8729
- /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts");
8716
+ /* harmony import */ var _util_colorUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/colorUtils */ "./src/util/colorUtils.ts");
8730
8717
  /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable/index.ts");
8731
- /* harmony import */ var _util_colorUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/colorUtils */ "./src/util/colorUtils.ts");
8732
8718
  // Styles
8733
8719
 
8734
8720
  // Components
@@ -8738,7 +8724,7 @@ __webpack_require__.r(__webpack_exports__);
8738
8724
 
8739
8725
 
8740
8726
 
8741
-
8727
+ // Mixins
8742
8728
 
8743
8729
 
8744
8730
 
@@ -8751,8 +8737,9 @@ function parseDefaultColors(colors) {
8751
8737
 
8752
8738
  var white = Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])('#FFFFFF').rgba;
8753
8739
  var black = Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])('#000000').rgba;
8754
- /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_6__["default"])(_mixins_themeable__WEBPACK_IMPORTED_MODULE_7__["default"]).extend({
8740
+ /* harmony default export */ __webpack_exports__["default"] = (Object(vue__WEBPACK_IMPORTED_MODULE_0__["defineComponent"])({
8755
8741
  name: 'v-color-picker-swatches',
8742
+ mixins: [_mixins_themeable__WEBPACK_IMPORTED_MODULE_7__["default"]],
8756
8743
  props: {
8757
8744
  swatches: {
8758
8745
  type: Array,
@@ -8761,10 +8748,14 @@ var black = Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])('#000000').rgb
8761
8748
  }
8762
8749
  },
8763
8750
  disabled: Boolean,
8764
- color: Object,
8751
+ color: {
8752
+ type: Object,
8753
+ required: true
8754
+ },
8765
8755
  maxWidth: [Number, String],
8766
8756
  maxHeight: [Number, String]
8767
8757
  },
8758
+ emits: ['update:color'],
8768
8759
  methods: {
8769
8760
  genColor: function genColor(color) {
8770
8761
  var _this = this;
@@ -8775,15 +8766,14 @@ var black = Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])('#000000').rgb
8775
8766
  }
8776
8767
  }, [Object(_util_helpers__WEBPACK_IMPORTED_MODULE_5__["deepEqual"])(this.color, Object(_util__WEBPACK_IMPORTED_MODULE_4__["parseColor"])(color, null)) && Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], {
8777
8768
  small: true,
8778
- dark: Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_8__["contrastRatio"])(this.color.rgba, white) > 2 && this.color.alpha > 0.5,
8779
- light: Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_8__["contrastRatio"])(this.color.rgba, black) > 2 && this.color.alpha > 0.5
8769
+ dark: Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_6__["contrastRatio"])(this.color.rgba, white) > 2 && this.color.alpha > 0.5,
8770
+ light: Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_6__["contrastRatio"])(this.color.rgba, black) > 2 && this.color.alpha > 0.5
8780
8771
  }, '$success')]);
8781
8772
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8782
8773
  class: 'v-color-picker__color',
8783
- on: {
8784
- // TODO: Less hacky way of catching transparent
8785
- click: function click() {
8786
- return _this.disabled || _this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])(color === 'transparent' ? '#00000000' : color));
8774
+ onClick: function onClick() {
8775
+ if (!_this.disabled) {
8776
+ _this.$emit('update:color', Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])(color === 'transparent' ? '#00000000' : color));
8787
8777
  }
8788
8778
  }
8789
8779
  }, [content]);
@@ -8801,7 +8791,7 @@ var black = Object(_util__WEBPACK_IMPORTED_MODULE_4__["fromHex"])('#000000').rgb
8801
8791
  },
8802
8792
  render: function render() {
8803
8793
  return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', {
8804
- class: 'v-color-picker__swatches',
8794
+ class: ['v-color-picker__swatches', this.themeClasses],
8805
8795
  style: {
8806
8796
  maxWidth: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_5__["convertToUnit"])(this.maxWidth),
8807
8797
  maxHeight: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_5__["convertToUnit"])(this.maxHeight)
@@ -11338,10 +11328,9 @@ function searchTableItems(items, search, headersWithCustomFilters, headersWithou
11338
11328
  }));
11339
11329
  },
11340
11330
  genLoading: function genLoading() {
11341
- var th = Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('th', {
11342
- class: 'column',
11343
- attrs: this.colspanAttrs
11344
- }, [this.genProgress()]);
11331
+ var th = Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('th', __assign({
11332
+ class: 'column'
11333
+ }, this.colspanAttrs), [this.genProgress()]);
11345
11334
  var tr = Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('tr', {
11346
11335
  class: 'v-data-table__progress'
11347
11336
  }, [th]);
@@ -11379,9 +11368,7 @@ function searchTableItems(items, search, headersWithCustomFilters, headersWithou
11379
11368
  genEmptyWrapper: function genEmptyWrapper(content) {
11380
11369
  return Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('tr', {
11381
11370
  class: 'v-data-table__empty-wrapper'
11382
- }, [Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('td', {
11383
- attrs: this.colspanAttrs
11384
- }, content)]);
11371
+ }, [Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('td', __assign({}, this.colspanAttrs), content)]);
11385
11372
  },
11386
11373
  genItems: function genItems(items, props) {
11387
11374
  var empty = this.genEmpty(props.originalItemsLength, props.pagination.itemsLength);
@@ -11456,10 +11443,9 @@ function searchTableItems(items, search, headersWithCustomFilters, headersWithou
11456
11443
  click: removeFn
11457
11444
  }
11458
11445
  }, [Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])(_VIcon__WEBPACK_IMPORTED_MODULE_6__["default"], ['$close'])]);
11459
- var column = Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('td', {
11460
- class: 'text-start',
11461
- attrs: this.colspanAttrs
11462
- }, [toggle, this.groupByText + ": " + group, remove]);
11446
+ var column = Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('td', __assign({
11447
+ class: 'text-start'
11448
+ }, this.colspanAttrs), [toggle, this.groupByText + ": " + group, remove]);
11463
11449
  children.unshift(Object(vue__WEBPACK_IMPORTED_MODULE_1__["h"])('template', {
11464
11450
  slot: 'column.header'
11465
11451
  }, [column]));
@@ -17774,6 +17760,19 @@ var __assign = undefined && undefined.__assign || function () {
17774
17760
  };
17775
17761
 
17776
17762
  return __assign.apply(this, arguments);
17763
+ };
17764
+
17765
+ var __rest = undefined && undefined.__rest || function (s, e) {
17766
+ var t = {};
17767
+
17768
+ for (var p in s) {
17769
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
17770
+ }
17771
+
17772
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17773
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
17774
+ }
17775
+ return t;
17777
17776
  }; // Styles
17778
17777
 
17779
17778
 
@@ -18051,11 +18050,21 @@ var baseMixins = Object(_util_mixins__WEBPACK_IMPORTED_MODULE_9__["default"])(_m
18051
18050
  }
18052
18051
  },
18053
18052
  render: function render() {
18054
- return Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', this.setTextColor(this.validationState, {
18055
- class: __assign({
18053
+ var _this = this;
18054
+
18055
+ var _a = this.$attrs,
18056
+ additionalClasses = _a.class,
18057
+ restAttrs = __rest(_a, ["class"]);
18058
+
18059
+ return Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', this.setTextColor(this.validationState, __assign({
18060
+ class: __assign(__assign({
18056
18061
  'v-input': true
18057
- }, this.classes)
18058
- }), this.genContent());
18062
+ }, this.classes), Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["normalizeClasses"])(additionalClasses))
18063
+ }, restAttrs)), {
18064
+ default: function _default() {
18065
+ return _this.genContent();
18066
+ }
18067
+ });
18059
18068
  }
18060
18069
  }));
18061
18070
 
@@ -25999,7 +26008,7 @@ var __assign = undefined && undefined.__assign || function () {
25999
26008
  type: [Boolean, String],
26000
26009
  default: undefined,
26001
26010
  validator: function validator(v) {
26002
- return typeof v === 'boolean' || v === 'always';
26011
+ return typeof v === 'boolean' || v === 'always' || v === undefined;
26003
26012
  }
26004
26013
  },
26005
26014
  thumbSize: {
@@ -26028,6 +26037,7 @@ var __assign = undefined && undefined.__assign || function () {
26028
26037
  modelValue: [Number, String],
26029
26038
  vertical: Boolean
26030
26039
  },
26040
+ emits: ['update:modelValue', 'start', 'end', 'mouseup', 'change', 'focus', 'blur'],
26031
26041
  data: function data() {
26032
26042
  return {
26033
26043
  app: null,
@@ -26053,11 +26063,14 @@ var __assign = undefined && undefined.__assign || function () {
26053
26063
  return this.lazyValue;
26054
26064
  },
26055
26065
  set: function set(val) {
26066
+ var originalVal = val;
26056
26067
  val = isNaN(val) ? this.minValue : val; // Round value to ensure the
26057
26068
  // entire slider range can
26058
26069
  // be selected with step
26059
26070
 
26060
- var value = this.roundValue(Math.min(Math.max(val, this.minValue), this.maxValue));
26071
+ var value = this.roundValue(val); // Then clamp to min/max
26072
+
26073
+ value = Math.min(Math.max(value, this.minValue), this.maxValue);
26061
26074
  if (value === this.lazyValue) return;
26062
26075
  this.lazyValue = value;
26063
26076
  this.$emit('update:modelValue', value);
@@ -26073,7 +26086,8 @@ var __assign = undefined && undefined.__assign || function () {
26073
26086
  return parseFloat(this.max);
26074
26087
  },
26075
26088
  stepNumeric: function stepNumeric() {
26076
- return this.step > 0 ? parseFloat(this.step) : 0;
26089
+ var step = parseFloat(this.step);
26090
+ return step > 0 ? step : 0;
26077
26091
  },
26078
26092
  inputWidth: function inputWidth() {
26079
26093
  var inputWidth = (this.roundValue(this.internalValue) - this.minValue) / (this.maxValue - this.minValue) * 100;
@@ -26131,14 +26145,21 @@ var __assign = undefined && undefined.__assign || function () {
26131
26145
  watch: {
26132
26146
  min: function min(val) {
26133
26147
  var parsed = parseFloat(val);
26134
- parsed > this.internalValue && this.$emit('update:modelValue', parsed);
26148
+
26149
+ if (parsed > this.internalValue) {
26150
+ this.$emit('update:modelValue', parsed);
26151
+ }
26135
26152
  },
26136
26153
  max: function max(val) {
26137
26154
  var parsed = parseFloat(val);
26138
- parsed < this.internalValue && this.$emit('update:modelValue', parsed);
26155
+
26156
+ if (parsed < this.internalValue) {
26157
+ this.$emit('update:modelValue', parsed);
26158
+ }
26139
26159
  },
26140
26160
  modelValue: {
26141
26161
  handler: function handler(v) {
26162
+ // Use the setter to ensure proper rounding and validation
26142
26163
  this.internalValue = v;
26143
26164
  },
26144
26165
  immediate: true
@@ -26157,7 +26178,7 @@ var __assign = undefined && undefined.__assign || function () {
26157
26178
  return children;
26158
26179
  },
26159
26180
  genSlider: function genSlider() {
26160
- return Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', {
26181
+ return Object(vue__WEBPACK_IMPORTED_MODULE_8__["withDirectives"])(Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', {
26161
26182
  class: __assign({
26162
26183
  'v-slider': true,
26163
26184
  'v-slider--horizontal': !this.vertical,
@@ -26167,14 +26188,10 @@ var __assign = undefined && undefined.__assign || function () {
26167
26188
  'v-slider--disabled': this.isDisabled,
26168
26189
  'v-slider--readonly': this.isReadonly
26169
26190
  }, this.themeClasses),
26170
- directives: [{
26171
- name: 'click-outside',
26172
- value: this.onBlur
26173
- }],
26174
26191
  onClick: this.onSliderClick,
26175
26192
  onMousedown: this.onSliderMouseDown,
26176
26193
  onTouchstart: this.onSliderMouseDown
26177
- }, this.genChildren());
26194
+ }, this.genChildren()), [[_directives_click_outside__WEBPACK_IMPORTED_MODULE_5__["default"], this.onBlur]]);
26178
26195
  },
26179
26196
  genChildren: function genChildren() {
26180
26197
  return [this.genInput(), this.genTrackContainer(), this.genSteps(), this.genThumbContainer(this.internalValue, this.inputWidth, this.isActive, this.isFocused, this.onFocus, this.onBlur)];
@@ -26280,12 +26297,8 @@ var __assign = undefined && undefined.__assign || function () {
26280
26297
  var transform = this.vertical ? "translateY(20%) translateY(" + (Number(this.thumbSize) / 3 - 1) + "px) translateX(55%) rotate(135deg)" : "translateY(-20%) translateY(-12px) translateX(-50%) rotate(45deg)";
26281
26298
  return Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])(_transitions__WEBPACK_IMPORTED_MODULE_2__["VScaleTransition"], {
26282
26299
  origin: 'bottom center'
26283
- }, [Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', {
26284
- class: 'v-slider__thumb-label-container',
26285
- directives: [{
26286
- name: 'show',
26287
- value: this.isFocused || this.isActive || this.thumbLabel === 'always'
26288
- }]
26300
+ }, [Object(vue__WEBPACK_IMPORTED_MODULE_8__["withDirectives"])(Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', {
26301
+ class: 'v-slider__thumb-label-container'
26289
26302
  }, [Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', this.setBackgroundColor(this.computedThumbColor, {
26290
26303
  class: 'v-slider__thumb-label',
26291
26304
  style: {
@@ -26293,7 +26306,7 @@ var __assign = undefined && undefined.__assign || function () {
26293
26306
  width: size,
26294
26307
  transform: transform
26295
26308
  }
26296
- }), [Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', content)])])]);
26309
+ }), [Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', content)])]), [[vue__WEBPACK_IMPORTED_MODULE_8__["vShow"], this.isFocused || this.isActive || this.thumbLabel === 'always']])]);
26297
26310
  },
26298
26311
  genThumb: function genThumb() {
26299
26312
  return Object(vue__WEBPACK_IMPORTED_MODULE_8__["h"])('div', this.setBackgroundColor(this.computedThumbColor, {
@@ -26388,6 +26401,7 @@ var __assign = undefined && undefined.__assign || function () {
26388
26401
  thumb.focus();
26389
26402
  this.onMouseMove(e);
26390
26403
  this.$emit('update:modelValue', this.internalValue);
26404
+ this.$emit('change', this.internalValue);
26391
26405
  },
26392
26406
  onBlur: function onBlur(e) {
26393
26407
  this.isFocused = false;
@@ -31364,6 +31378,7 @@ __webpack_require__.r(__webpack_exports__);
31364
31378
  // Helpers
31365
31379
 
31366
31380
 
31381
+ // Types
31367
31382
 
31368
31383
 
31369
31384
  /* @vue/component */
@@ -31470,7 +31485,7 @@ __webpack_require__.r(__webpack_exports__);
31470
31485
  var _this = this;
31471
31486
 
31472
31487
  this.$nextTick(function () {
31473
- _this.value && _this.callActivate();
31488
+ _this.modelValue && _this.callActivate();
31474
31489
  });
31475
31490
  },
31476
31491
  mounted: function mounted() {
@@ -31534,16 +31549,12 @@ __webpack_require__.r(__webpack_exports__);
31534
31549
  genContent: function genContent() {
31535
31550
  var _a;
31536
31551
 
31537
- return Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', this.setBackgroundColor(this.color, {
31552
+ return Object(vue__WEBPACK_IMPORTED_MODULE_0__["withDirectives"])(Object(vue__WEBPACK_IMPORTED_MODULE_0__["h"])('div', this.setBackgroundColor(this.color, {
31538
31553
  class: ['v-tooltip__content', (_a = {}, _a[this.contentClass] = true, _a.menuable__content__active = this.isActive, _a['v-tooltip__content--fixed'] = this.activatorFixed, _a)],
31539
31554
  style: this.styles,
31540
31555
  attrs: this.getScopeIdAttrs(),
31541
- directives: [{
31542
- name: 'show',
31543
- value: this.isContentActive
31544
- }],
31545
31556
  ref: 'content'
31546
- }), this.getContentSlot());
31557
+ }), this.getContentSlot()), [[vue__WEBPACK_IMPORTED_MODULE_0__["vShow"], this.isContentActive]]);
31547
31558
  }
31548
31559
  },
31549
31560
  render: function render() {
@@ -35245,7 +35256,7 @@ function () {
35245
35256
 
35246
35257
  Vuetify.install = _install__WEBPACK_IMPORTED_MODULE_0__["install"];
35247
35258
  Vuetify.installed = false;
35248
- Vuetify.version = "2.7.2-alpha24";
35259
+ Vuetify.version = "2.7.2-alpha25";
35249
35260
  Vuetify.config = {
35250
35261
  silent: false
35251
35262
  };