@britecore/bc-design-system 3.31.3 → 3.32.2

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 (105) hide show
  1. package/lib/actions-failure-dialog.js +2 -2
  2. package/lib/alert.js +2 -2
  3. package/lib/autocomplete.js +30 -30
  4. package/lib/badge.js +2 -2
  5. package/lib/breadcrumb-item.js +6 -5
  6. package/lib/breadcrumb.js +95 -21
  7. package/lib/breakpoint.js +23 -18
  8. package/lib/button-group.js +8 -8
  9. package/lib/button-link.js +2 -2
  10. package/lib/button.js +8 -8
  11. package/lib/card.js +2 -2
  12. package/lib/cascader-panel.js +68 -67
  13. package/lib/cascader.js +221 -221
  14. package/lib/checkbox-button.js +8 -8
  15. package/lib/checkbox-group.js +8 -8
  16. package/lib/checkbox.js +4 -4
  17. package/lib/collapse-item.js +6 -6
  18. package/lib/collapse.js +2 -2
  19. package/lib/data-filter.js +2 -2
  20. package/lib/data-table-action-buttons.js +20 -20
  21. package/lib/data-table-cell.js +4 -4
  22. package/lib/data-table-collapsible-row.js +2 -2
  23. package/lib/data-table-column-header.js +2 -2
  24. package/lib/data-table-column.js +2 -2
  25. package/lib/data-table-row.js +4 -4
  26. package/lib/data-table.js +96 -92
  27. package/lib/date-display.js +4 -4
  28. package/lib/date-picker.js +133 -133
  29. package/lib/dialog.js +10 -10
  30. package/lib/dropdown-item.js +8 -8
  31. package/lib/dropdown-menu.js +8 -8
  32. package/lib/dropdown.js +53 -53
  33. package/lib/element-ui.common.js +1131 -973
  34. package/lib/filter-badges.js +16 -16
  35. package/lib/filter-button.js +2 -2
  36. package/lib/filters-display.js +73 -73
  37. package/lib/form-filter-item.js +49 -49
  38. package/lib/form-filter.js +55 -55
  39. package/lib/form-item.js +2 -2
  40. package/lib/form.js +2 -2
  41. package/lib/index.js +1 -1
  42. package/lib/infinite-scroll.js +8 -8
  43. package/lib/inline-editor.js +14 -14
  44. package/lib/inline-status.js +2 -2
  45. package/lib/input-number.js +14 -14
  46. package/lib/input-password.js +46 -46
  47. package/lib/input-phone-number.js +22 -22
  48. package/lib/input-tag.js +42 -29
  49. package/lib/input-validation-code.js +25 -25
  50. package/lib/input.js +3 -3
  51. package/lib/list-group-item.js +8 -8
  52. package/lib/list-group.js +8 -8
  53. package/lib/loading-wrapper.js +2 -2
  54. package/lib/loading.js +10 -10
  55. package/lib/message-box.js +26 -26
  56. package/lib/message.js +23 -23
  57. package/lib/notification.js +11 -11
  58. package/lib/option-group.js +8 -8
  59. package/lib/option.js +15 -15
  60. package/lib/pagination.js +133 -133
  61. package/lib/popover.js +10 -10
  62. package/lib/progress.js +8 -8
  63. package/lib/radio-button.js +8 -8
  64. package/lib/radio-filter.js +41 -41
  65. package/lib/radio-group.js +10 -10
  66. package/lib/radio.js +8 -8
  67. package/lib/scrollbar.js +6 -6
  68. package/lib/search.js +2 -2
  69. package/lib/select-filter.js +50 -50
  70. package/lib/select.js +52 -51
  71. package/lib/slider.js +607 -506
  72. package/lib/spinner.js +2 -2
  73. package/lib/spreadsheet-preview.js +10 -10
  74. package/lib/step.js +2 -2
  75. package/lib/steps.js +4 -4
  76. package/lib/switch.js +12 -12
  77. package/lib/tab-pane.js +2 -2
  78. package/lib/table-column.js +21 -21
  79. package/lib/table.js +310 -209
  80. package/lib/tabs.js +14 -14
  81. package/lib/tag.js +6 -6
  82. package/lib/theme-chalk/breadcrumb.css +1 -1
  83. package/lib/theme-chalk/index.css +1 -1
  84. package/lib/time-picker.js +49 -49
  85. package/lib/time-select.js +33 -33
  86. package/lib/timeline-item.js +8 -8
  87. package/lib/timeline.js +6 -6
  88. package/lib/tooltip.js +169 -68
  89. package/lib/transfer.js +34 -34
  90. package/lib/tree.js +28 -28
  91. package/lib/upload.js +78 -78
  92. package/package.json +2 -2
  93. package/packages/breadcrumb/src/breadcrumb-item.vue +1 -0
  94. package/packages/breadcrumb/src/breadcrumb.vue +48 -5
  95. package/packages/breakpoint/breakpoint.vue +8 -2
  96. package/packages/data-table/src/DataTable.vue +2 -0
  97. package/packages/input-phone-number/src/main.vue +1 -1
  98. package/packages/input-tag/src/main.vue +4 -1
  99. package/packages/theme-chalk/lib/breadcrumb.css +1 -1
  100. package/packages/theme-chalk/lib/index.css +1 -1
  101. package/packages/theme-chalk/src/breadcrumb.scss +12 -3
  102. package/packages/tooltip/index.js +4 -0
  103. package/packages/tooltip/src/directive.js +46 -0
  104. package/packages/tooltip/src/main.js +5 -4
  105. package/src/index.js +1 -3
package/lib/slider.js CHANGED
@@ -220,6 +220,82 @@ var isDefined = exports.isDefined = function isDefined(val) {
220
220
 
221
221
  /***/ }),
222
222
 
223
+ /***/ 100:
224
+ /***/ (function(module, exports, __webpack_require__) {
225
+
226
+ "use strict";
227
+
228
+
229
+ exports.__esModule = true;
230
+
231
+ var _assign = __webpack_require__(48);
232
+
233
+ var _assign2 = _interopRequireDefault(_assign);
234
+
235
+ var _extends2 = __webpack_require__(42);
236
+
237
+ var _extends3 = _interopRequireDefault(_extends2);
238
+
239
+ var _typeof2 = __webpack_require__(2);
240
+
241
+ var _typeof3 = _interopRequireDefault(_typeof2);
242
+
243
+ var _vue = __webpack_require__(1);
244
+
245
+ var _vue2 = _interopRequireDefault(_vue);
246
+
247
+ var _main = __webpack_require__(77);
248
+
249
+ var _main2 = _interopRequireDefault(_main);
250
+
251
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
252
+
253
+ var Tooltip = _vue2.default.extend(_main2.default);
254
+ var validPlacements = ['top', 'right', 'bottom', 'left'].reduce(function (arr, position) {
255
+ arr.push(position + '-start', position, position + '-end');
256
+ return arr;
257
+ }, []);
258
+
259
+ var destroyInstance = function destroyInstance(instance) {
260
+ var el = instance.$el;
261
+ el.parentNode.removeChild(el);
262
+ instance.$destroy();
263
+ };
264
+
265
+ var bindUpdateHandler = function bindUpdateHandler(el, binding) {
266
+ // when updating, destroy the previous instance
267
+ if (el.$tooltipInstance) destroyInstance(el.$tooltipInstance);
268
+
269
+ // prepare props
270
+ var props = (0, _typeof3.default)(binding.value) === 'object' ? (0, _extends3.default)({ reference: el }, binding.value) : { reference: el, content: binding.value };
271
+ var placement = validPlacements.find(function (placement) {
272
+ return binding.arg === placement;
273
+ });
274
+
275
+ if (placement && !Object.prototype.hasOwnProperty.call(props, 'placement')) props.placement = placement;
276
+
277
+ // create instance and pass props
278
+ var instance = new Tooltip();
279
+ (0, _assign2.default)(instance, props);
280
+
281
+ // mount
282
+ instance.vm = instance.$mount();
283
+ el.appendChild(instance.$el);
284
+
285
+ // store reference to destroy in unbind/update
286
+ el.$tooltipInstance = instance;
287
+ };
288
+
289
+ exports.default = {
290
+ bind: bindUpdateHandler,
291
+ update: bindUpdateHandler,
292
+ unbind: function unbind(el) {
293
+ if (el.$tooltipInstance) destroyInstance(el.$tooltipInstance);
294
+ }
295
+ };
296
+
297
+ /***/ }),
298
+
223
299
  /***/ 11:
224
300
  /***/ (function(module, exports, __webpack_require__) {
225
301
 
@@ -266,7 +342,7 @@ var scrollBarWidth = void 0;
266
342
 
267
343
  /***/ }),
268
344
 
269
- /***/ 12:
345
+ /***/ 13:
270
346
  /***/ (function(module, exports, __webpack_require__) {
271
347
 
272
348
  "use strict";
@@ -337,7 +413,7 @@ exports.default = {
337
413
 
338
414
  /***/ }),
339
415
 
340
- /***/ 131:
416
+ /***/ 132:
341
417
  /***/ (function(module, exports, __webpack_require__) {
342
418
 
343
419
  "use strict";
@@ -345,7 +421,7 @@ exports.default = {
345
421
 
346
422
  exports.__esModule = true;
347
423
 
348
- var _inputNumber = __webpack_require__(132);
424
+ var _inputNumber = __webpack_require__(133);
349
425
 
350
426
  var _inputNumber2 = _interopRequireDefault(_inputNumber);
351
427
 
@@ -360,15 +436,15 @@ exports.default = _inputNumber2.default;
360
436
 
361
437
  /***/ }),
362
438
 
363
- /***/ 132:
439
+ /***/ 133:
364
440
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
365
441
 
366
442
  "use strict";
367
443
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
368
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__ = __webpack_require__(91);
444
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__ = __webpack_require__(92);
369
445
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__);
370
446
  /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
371
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4bdf4164_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue__ = __webpack_require__(133);
447
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4bdf4164_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue__ = __webpack_require__(134);
372
448
  var normalizeComponent = __webpack_require__(0)
373
449
  /* script */
374
450
 
@@ -397,7 +473,7 @@ var Component = normalizeComponent(
397
473
 
398
474
  /***/ }),
399
475
 
400
- /***/ 133:
476
+ /***/ 134:
401
477
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
402
478
 
403
479
  "use strict";
@@ -674,7 +750,7 @@ var _emitter = __webpack_require__(6);
674
750
 
675
751
  var _emitter2 = _interopRequireDefault(_emitter);
676
752
 
677
- var _migrating = __webpack_require__(12);
753
+ var _migrating = __webpack_require__(13);
678
754
 
679
755
  var _migrating2 = _interopRequireDefault(_migrating);
680
756
 
@@ -1381,7 +1457,7 @@ exports.default = _input2.default;
1381
1457
 
1382
1458
  /***/ }),
1383
1459
 
1384
- /***/ 200:
1460
+ /***/ 201:
1385
1461
  /***/ (function(module, exports, __webpack_require__) {
1386
1462
 
1387
1463
  "use strict";
@@ -1389,7 +1465,7 @@ exports.default = _input2.default;
1389
1465
 
1390
1466
  exports.__esModule = true;
1391
1467
 
1392
- var _inputNumber = __webpack_require__(131);
1468
+ var _inputNumber = __webpack_require__(132);
1393
1469
 
1394
1470
  var _inputNumber2 = _interopRequireDefault(_inputNumber);
1395
1471
 
@@ -1768,7 +1844,7 @@ exports.default = {
1768
1844
 
1769
1845
  /***/ }),
1770
1846
 
1771
- /***/ 201:
1847
+ /***/ 202:
1772
1848
  /***/ (function(module, exports, __webpack_require__) {
1773
1849
 
1774
1850
  "use strict";
@@ -1776,7 +1852,7 @@ exports.default = {
1776
1852
 
1777
1853
  exports.__esModule = true;
1778
1854
 
1779
- var _tooltip = __webpack_require__(98);
1855
+ var _tooltip = __webpack_require__(99);
1780
1856
 
1781
1857
  var _tooltip2 = _interopRequireDefault(_tooltip);
1782
1858
 
@@ -3888,7 +3964,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
3888
3964
 
3889
3965
  /***/ }),
3890
3966
 
3891
- /***/ 35:
3967
+ /***/ 36:
3892
3968
  /***/ (function(module, exports) {
3893
3969
 
3894
3970
  module.exports = require("throttle-debounce/debounce");
@@ -3923,7 +3999,7 @@ exports.default = _main2.default;
3923
3999
 
3924
4000
  "use strict";
3925
4001
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
3926
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_main_vue__ = __webpack_require__(200);
4002
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_main_vue__ = __webpack_require__(201);
3927
4003
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_main_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_main_vue__);
3928
4004
  /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_main_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_main_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
3929
4005
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7cd3f340_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_main_vue__ = __webpack_require__(372);
@@ -3960,7 +4036,7 @@ var Component = normalizeComponent(
3960
4036
 
3961
4037
  "use strict";
3962
4038
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
3963
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__ = __webpack_require__(201);
4039
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__ = __webpack_require__(202);
3964
4040
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__);
3965
4041
  /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
3966
4042
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_059e1e64_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_vue__ = __webpack_require__(371);
@@ -4283,6 +4359,20 @@ var delay = exports.delay = function delay(ms) {
4283
4359
 
4284
4360
  /***/ }),
4285
4361
 
4362
+ /***/ 42:
4363
+ /***/ (function(module, exports) {
4364
+
4365
+ module.exports = require("babel-runtime/helpers/extends");
4366
+
4367
+ /***/ }),
4368
+
4369
+ /***/ 48:
4370
+ /***/ (function(module, exports) {
4371
+
4372
+ module.exports = require("babel-runtime/core-js/object/assign");
4373
+
4374
+ /***/ }),
4375
+
4286
4376
  /***/ 5:
4287
4377
  /***/ (function(module, exports) {
4288
4378
 
@@ -4290,7 +4380,7 @@ module.exports = require("babel-runtime/core-js/object/keys");
4290
4380
 
4291
4381
  /***/ }),
4292
4382
 
4293
- /***/ 50:
4383
+ /***/ 52:
4294
4384
  /***/ (function(module, exports, __webpack_require__) {
4295
4385
 
4296
4386
  "use strict";
@@ -4321,7 +4411,7 @@ function getFirstComponentChild(children) {
4321
4411
 
4322
4412
  /***/ }),
4323
4413
 
4324
- /***/ 54:
4414
+ /***/ 56:
4325
4415
  /***/ (function(module, exports, __webpack_require__) {
4326
4416
 
4327
4417
  "use strict";
@@ -4393,7 +4483,7 @@ module.exports = require("babel-runtime/core-js/json/stringify");
4393
4483
 
4394
4484
  /***/ }),
4395
4485
 
4396
- /***/ 8:
4486
+ /***/ 77:
4397
4487
  /***/ (function(module, exports, __webpack_require__) {
4398
4488
 
4399
4489
  "use strict";
@@ -4401,464 +4491,91 @@ module.exports = require("babel-runtime/core-js/json/stringify");
4401
4491
 
4402
4492
  exports.__esModule = true;
4403
4493
 
4404
- exports.default = function (target) {
4405
- for (var i = 1, j = arguments.length; i < j; i++) {
4406
- var source = arguments[i] || {};
4407
- for (var prop in source) {
4408
- if (source.hasOwnProperty(prop)) {
4409
- var value = source[prop];
4410
- if (value !== undefined) {
4411
- target[prop] = value;
4412
- }
4413
- }
4414
- }
4415
- }
4416
-
4417
- return target;
4418
- };
4419
-
4420
- ;
4421
-
4422
- /***/ }),
4423
-
4424
- /***/ 82:
4425
- /***/ (function(module, exports, __webpack_require__) {
4494
+ var _vuePopper = __webpack_require__(21);
4426
4495
 
4427
- "use strict";
4496
+ var _vuePopper2 = _interopRequireDefault(_vuePopper);
4428
4497
 
4498
+ var _debounce = __webpack_require__(36);
4429
4499
 
4430
- exports.__esModule = true;
4500
+ var _debounce2 = _interopRequireDefault(_debounce);
4431
4501
 
4432
4502
  var _dom = __webpack_require__(3);
4433
4503
 
4434
- exports.default = {
4435
- bind: function bind(el, binding, vnode) {
4436
- var interval = null;
4437
- var startTime = void 0;
4438
- var handler = function handler() {
4439
- return vnode.context[binding.expression].apply();
4440
- };
4441
- var clear = function clear() {
4442
- if (new Date() - startTime < 100) {
4443
- handler();
4444
- }
4445
- clearInterval(interval);
4446
- interval = null;
4447
- };
4448
-
4449
- (0, _dom.on)(el, 'mousedown', function (e) {
4450
- if (e.button !== 0) return;
4451
- startTime = new Date();
4452
- (0, _dom.once)(document, 'mouseup', clear);
4453
- clearInterval(interval);
4454
- interval = setInterval(handler, 100);
4455
- });
4456
- }
4457
- };
4458
-
4459
- /***/ }),
4460
-
4461
- /***/ 9:
4462
- /***/ (function(module, exports) {
4463
-
4464
- module.exports = require("babel-runtime/core-js/promise");
4465
-
4466
- /***/ }),
4467
-
4468
- /***/ 91:
4469
- /***/ (function(module, exports, __webpack_require__) {
4470
-
4471
- "use strict";
4472
-
4473
-
4474
- exports.__esModule = true;
4475
-
4476
- var _input = __webpack_require__(20);
4477
-
4478
- var _input2 = _interopRequireDefault(_input);
4479
-
4480
- var _focus = __webpack_require__(54);
4504
+ var _vdom = __webpack_require__(52);
4481
4505
 
4482
- var _focus2 = _interopRequireDefault(_focus);
4506
+ var _util = __webpack_require__(4);
4483
4507
 
4484
- var _repeatClick = __webpack_require__(82);
4508
+ var _vue = __webpack_require__(1);
4485
4509
 
4486
- var _repeatClick2 = _interopRequireDefault(_repeatClick);
4510
+ var _vue2 = _interopRequireDefault(_vue);
4487
4511
 
4488
4512
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4489
4513
 
4490
4514
  exports.default = {
4491
- name: 'ElInputNumber',
4492
- mixins: [(0, _focus2.default)('input')],
4493
- inject: {
4494
- elForm: {
4495
- default: ''
4496
- },
4497
- elFormItem: {
4498
- default: ''
4499
- }
4500
- },
4501
- directives: {
4502
- repeatClick: _repeatClick2.default
4503
- },
4504
- components: {
4505
- ElInput: _input2.default
4506
- },
4515
+ name: 'ElTooltip',
4516
+
4517
+ mixins: [_vuePopper2.default],
4518
+
4507
4519
  props: {
4508
- step: {
4509
- type: Number,
4510
- default: 1
4511
- },
4512
- max: {
4520
+ openDelay: {
4513
4521
  type: Number,
4514
- default: Infinity
4522
+ default: 0
4515
4523
  },
4516
- min: {
4524
+ maxWidth: String,
4525
+ disabled: Boolean,
4526
+ manual: Boolean,
4527
+ arrowOffset: {
4517
4528
  type: Number,
4518
- default: -Infinity
4529
+ default: 0
4519
4530
  },
4520
- value: {},
4521
- disabled: Boolean,
4522
- size: String,
4523
- controls: {
4524
- type: Boolean,
4531
+ popperClass: String,
4532
+ content: String,
4533
+ visibleArrow: {
4525
4534
  default: true
4526
4535
  },
4527
- controlsPosition: {
4536
+ transition: {
4528
4537
  type: String,
4529
4538
  default: ''
4530
4539
  },
4531
- name: String,
4532
- label: String,
4533
- precision: {
4534
- type: Number,
4535
- validator: function validator(val) {
4536
- return val >= 0 && val === parseInt(val, 10);
4540
+ popperOptions: {
4541
+ default: function _default() {
4542
+ return {
4543
+ boundariesPadding: 10,
4544
+ gpuAcceleration: false
4545
+ };
4537
4546
  }
4538
4547
  },
4539
- dataElement: String
4548
+ enterable: {
4549
+ type: Boolean,
4550
+ default: true
4551
+ },
4552
+ hideAfter: {
4553
+ type: Number,
4554
+ default: 0
4555
+ }
4540
4556
  },
4557
+
4541
4558
  data: function data() {
4542
4559
  return {
4543
- currentValue: 0
4560
+ timeoutPending: null,
4561
+ focusing: false
4544
4562
  };
4545
4563
  },
4546
4564
 
4547
- watch: {
4548
- value: {
4549
- immediate: true,
4550
- handler: function handler(value) {
4551
- var newVal = value === undefined ? value : Number(value);
4552
- if (newVal !== undefined) {
4553
- if (isNaN(newVal)) {
4554
- return;
4555
- }
4556
- if (this.precision !== undefined) {
4557
- newVal = this.toPrecision(newVal, this.precision);
4558
- }
4559
- }
4560
- if (newVal >= this.max) newVal = this.max;
4561
- if (newVal <= this.min) newVal = this.min;
4562
- this.currentValue = newVal;
4563
- this.$emit('input', newVal);
4564
- }
4565
+ computed: {
4566
+ tooltipId: function tooltipId() {
4567
+ return 'el-tooltip-' + (0, _util.generateId)();
4565
4568
  }
4566
4569
  },
4567
- computed: {
4568
- minDisabled: function minDisabled() {
4569
- return this._decrease(this.value, this.step) < this.min;
4570
- },
4571
- maxDisabled: function maxDisabled() {
4572
- return this._increase(this.value, this.step) > this.max;
4573
- },
4574
- numPrecision: function numPrecision() {
4575
- var value = this.value,
4576
- step = this.step,
4577
- getPrecision = this.getPrecision,
4578
- precision = this.precision;
4570
+ beforeCreate: function beforeCreate() {
4571
+ var _this = this;
4579
4572
 
4580
- var stepPrecision = getPrecision(step);
4581
- if (precision !== undefined) {
4582
- if (stepPrecision > precision) {
4583
- console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
4584
- }
4585
- return precision;
4586
- } else {
4587
- return Math.max(getPrecision(value), stepPrecision);
4588
- }
4589
- },
4590
- controlsAtRight: function controlsAtRight() {
4591
- return this.controlsPosition === 'right';
4592
- },
4593
- _elFormItemSize: function _elFormItemSize() {
4594
- return (this.elFormItem || {}).elFormItemSize;
4595
- },
4596
- inputNumberSize: function inputNumberSize() {
4597
- return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
4598
- },
4599
- inputNumberDisabled: function inputNumberDisabled() {
4600
- return this.disabled || (this.elForm || {}).disabled;
4601
- },
4602
- currentInputValue: function currentInputValue() {
4603
- var currentValue = this.currentValue;
4604
- if (typeof currentValue === 'number' && this.precision !== undefined) {
4605
- return currentValue.toFixed(this.precision);
4606
- } else {
4607
- return currentValue;
4608
- }
4609
- }
4610
- },
4611
- methods: {
4612
- toPrecision: function toPrecision(num, precision) {
4613
- if (precision === undefined) precision = this.numPrecision;
4614
- return parseFloat(parseFloat(Number(num).toFixed(precision)));
4615
- },
4616
- getPrecision: function getPrecision(value) {
4617
- if (value === undefined) return 0;
4618
- var valueString = value.toString();
4619
- var dotPosition = valueString.indexOf('.');
4620
- var precision = 0;
4621
- if (dotPosition !== -1) {
4622
- precision = valueString.length - dotPosition - 1;
4623
- }
4624
- return precision;
4625
- },
4626
- _increase: function _increase(val, step) {
4627
- if (typeof val !== 'number' && val !== undefined) return this.currentValue;
4628
-
4629
- var precisionFactor = Math.pow(10, this.numPrecision);
4630
- // Solve the accuracy problem of JS decimal calculation by converting the value to integer.
4631
- return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
4632
- },
4633
- _decrease: function _decrease(val, step) {
4634
- if (typeof val !== 'number' && val !== undefined) return this.currentValue;
4635
-
4636
- var precisionFactor = Math.pow(10, this.numPrecision);
4637
-
4638
- return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
4639
- },
4640
- increase: function increase() {
4641
- if (this.inputNumberDisabled || this.maxDisabled) return;
4642
- var value = this.value || 0;
4643
- var newVal = this._increase(value, this.step);
4644
- this.setCurrentValue(newVal);
4645
- },
4646
- decrease: function decrease() {
4647
- if (this.inputNumberDisabled || this.minDisabled) return;
4648
- var value = this.value || 0;
4649
- var newVal = this._decrease(value, this.step);
4650
- this.setCurrentValue(newVal);
4651
- },
4652
- handleBlur: function handleBlur(event) {
4653
- this.$emit('blur', event);
4654
- this.$refs.input.setCurrentValue(this.currentInputValue);
4655
- },
4656
- handleFocus: function handleFocus(event) {
4657
- this.$emit('focus', event);
4658
- },
4659
- setCurrentValue: function setCurrentValue(newVal) {
4660
- var oldVal = this.currentValue;
4661
- if (typeof newVal === 'number' && this.precision !== undefined) {
4662
- newVal = this.toPrecision(newVal, this.precision);
4663
- }
4664
- if (newVal >= this.max) newVal = this.max;
4665
- if (newVal <= this.min) newVal = this.min;
4666
- if (oldVal === newVal) {
4667
- this.$refs.input.setCurrentValue(this.currentInputValue);
4668
- return;
4669
- }
4670
- this.$emit('input', newVal);
4671
- this.$emit('change', newVal, oldVal);
4672
- this.currentValue = newVal;
4673
- },
4674
- handleInputChange: function handleInputChange(value) {
4675
- var newVal = value === '' ? undefined : Number(value);
4676
- if (!isNaN(newVal) || value === '') {
4677
- this.setCurrentValue(newVal);
4678
- }
4679
- }
4680
- },
4681
- mounted: function mounted() {
4682
- var innerInput = this.$refs.input.$refs.input;
4683
- innerInput.setAttribute('role', 'spinbutton');
4684
- innerInput.setAttribute('aria-valuemax', this.max);
4685
- innerInput.setAttribute('aria-valuemin', this.min);
4686
- innerInput.setAttribute('aria-valuenow', this.currentValue);
4687
- innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
4688
- },
4689
- updated: function updated() {
4690
- if (!this.$refs || !this.$refs.input) return;
4691
- var innerInput = this.$refs.input.$refs.input;
4692
- innerInput.setAttribute('aria-valuenow', this.currentValue);
4693
- }
4694
- }; //
4695
- //
4696
- //
4697
- //
4698
- //
4699
- //
4700
- //
4701
- //
4702
- //
4703
- //
4704
- //
4705
- //
4706
- //
4707
- //
4708
- //
4709
- //
4710
- //
4711
- //
4712
- //
4713
- //
4714
- //
4715
- //
4716
- //
4717
- //
4718
- //
4719
- //
4720
- //
4721
- //
4722
- //
4723
- //
4724
- //
4725
- //
4726
- //
4727
- //
4728
- //
4729
- //
4730
- //
4731
- //
4732
- //
4733
- //
4734
- //
4735
- //
4736
- //
4737
- //
4738
- //
4739
- //
4740
- //
4741
- //
4742
- //
4743
-
4744
- /***/ }),
4745
-
4746
- /***/ 98:
4747
- /***/ (function(module, exports, __webpack_require__) {
4748
-
4749
- "use strict";
4750
-
4751
-
4752
- exports.__esModule = true;
4753
-
4754
- var _main = __webpack_require__(99);
4755
-
4756
- var _main2 = _interopRequireDefault(_main);
4757
-
4758
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4759
-
4760
- /* istanbul ignore next */
4761
- _main2.default.install = function (Vue) {
4762
- Vue.component(_main2.default.name, _main2.default);
4763
- };
4764
-
4765
- exports.default = _main2.default;
4766
-
4767
- /***/ }),
4768
-
4769
- /***/ 99:
4770
- /***/ (function(module, exports, __webpack_require__) {
4771
-
4772
- "use strict";
4773
-
4774
-
4775
- exports.__esModule = true;
4776
-
4777
- var _vuePopper = __webpack_require__(21);
4778
-
4779
- var _vuePopper2 = _interopRequireDefault(_vuePopper);
4780
-
4781
- var _debounce = __webpack_require__(35);
4782
-
4783
- var _debounce2 = _interopRequireDefault(_debounce);
4784
-
4785
- var _dom = __webpack_require__(3);
4786
-
4787
- var _vdom = __webpack_require__(50);
4788
-
4789
- var _util = __webpack_require__(4);
4790
-
4791
- var _vue = __webpack_require__(1);
4792
-
4793
- var _vue2 = _interopRequireDefault(_vue);
4794
-
4795
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4796
-
4797
- exports.default = {
4798
- name: 'ElTooltip',
4799
-
4800
- mixins: [_vuePopper2.default],
4801
-
4802
- props: {
4803
- openDelay: {
4804
- type: Number,
4805
- default: 0
4806
- },
4807
- maxWidth: String,
4808
- disabled: Boolean,
4809
- manual: Boolean,
4810
- arrowOffset: {
4811
- type: Number,
4812
- default: 0
4813
- },
4814
- popperClass: String,
4815
- content: String,
4816
- visibleArrow: {
4817
- default: true
4818
- },
4819
- transition: {
4820
- type: String,
4821
- default: 'el-fade-in-linear'
4822
- },
4823
- popperOptions: {
4824
- default: function _default() {
4825
- return {
4826
- boundariesPadding: 10,
4827
- gpuAcceleration: false
4828
- };
4829
- }
4830
- },
4831
- enterable: {
4832
- type: Boolean,
4833
- default: true
4834
- },
4835
- hideAfter: {
4836
- type: Number,
4837
- default: 0
4838
- }
4839
- },
4840
-
4841
- data: function data() {
4842
- return {
4843
- timeoutPending: null,
4844
- focusing: false
4845
- };
4846
- },
4847
-
4848
- computed: {
4849
- tooltipId: function tooltipId() {
4850
- return 'el-tooltip-' + (0, _util.generateId)();
4851
- }
4852
- },
4853
- beforeCreate: function beforeCreate() {
4854
- var _this = this;
4855
-
4856
- if (this.$isServer) return;
4857
-
4858
- this.popperVM = new _vue2.default({
4859
- data: { node: '' },
4860
- render: function render(h) {
4861
- return this.node;
4573
+ if (this.$isServer) return;
4574
+
4575
+ this.popperVM = new _vue2.default({
4576
+ data: { node: '' },
4577
+ render: function render(h) {
4578
+ return this.node;
4862
4579
  }
4863
4580
  }).$mount();
4864
4581
 
@@ -4923,10 +4640,11 @@ exports.default = {
4923
4640
  mounted: function mounted() {
4924
4641
  var _this3 = this;
4925
4642
 
4643
+ // this.reference comes from the Popper mixin's props
4926
4644
  this.referenceElm = this.reference || this.$el;
4927
- if (this.$el.nodeType === 1) {
4928
- this.$el.setAttribute('aria-describedby', this.tooltipId);
4929
- this.$el.setAttribute('tabindex', 0);
4645
+ if (this.referenceElm.nodeType === 1) {
4646
+ this.referenceElm.setAttribute('aria-describedby', this.tooltipId);
4647
+ this.referenceElm.setAttribute('tabindex', 0);
4930
4648
  (0, _dom.on)(this.referenceElm, 'mouseenter', this.show);
4931
4649
  (0, _dom.on)(this.referenceElm, 'mouseleave', this.hide);
4932
4650
  (0, _dom.on)(this.referenceElm, 'focus', function () {
@@ -4940,91 +4658,474 @@ exports.default = {
4940
4658
  } else {
4941
4659
  _this3.handleFocus();
4942
4660
  }
4943
- });
4944
- (0, _dom.on)(this.referenceElm, 'blur', this.handleBlur);
4945
- (0, _dom.on)(this.referenceElm, 'click', this.removeFocusing);
4661
+ });
4662
+ (0, _dom.on)(this.referenceElm, 'blur', this.handleBlur);
4663
+ (0, _dom.on)(this.referenceElm, 'click', this.removeFocusing);
4664
+ }
4665
+ },
4666
+
4667
+ watch: {
4668
+ focusing: function focusing(val) {
4669
+ if (val) {
4670
+ (0, _dom.addClass)(this.referenceElm, 'focusing');
4671
+ } else {
4672
+ (0, _dom.removeClass)(this.referenceElm, 'focusing');
4673
+ }
4674
+ }
4675
+ },
4676
+ methods: {
4677
+ show: function show() {
4678
+ this.setExpectedState(true);
4679
+ this.handleShowPopper();
4680
+ },
4681
+ hide: function hide() {
4682
+ this.setExpectedState(false);
4683
+ this.debounceClose();
4684
+ },
4685
+ handleFocus: function handleFocus() {
4686
+ this.focusing = true;
4687
+ this.show();
4688
+ },
4689
+ handleBlur: function handleBlur() {
4690
+ this.focusing = false;
4691
+ this.hide();
4692
+ },
4693
+ removeFocusing: function removeFocusing() {
4694
+ this.focusing = false;
4695
+ },
4696
+ concatClass: function concatClass(a, b) {
4697
+ if (a && a.indexOf(b) > -1) return a;
4698
+ return a ? b ? a + ' ' + b : a : b || '';
4699
+ },
4700
+ handleShowPopper: function handleShowPopper() {
4701
+ var _this4 = this;
4702
+
4703
+ if (!this.expectedState || this.manual) return;
4704
+ clearTimeout(this.timeout);
4705
+ this.timeout = setTimeout(function () {
4706
+ _this4.showPopper = true;
4707
+ }, this.openDelay);
4708
+
4709
+ if (this.hideAfter > 0) {
4710
+ this.timeoutPending = setTimeout(function () {
4711
+ _this4.showPopper = false;
4712
+ }, this.hideAfter);
4713
+ }
4714
+ },
4715
+ handleClosePopper: function handleClosePopper() {
4716
+ if (this.enterable && this.expectedState || this.manual) return;
4717
+ clearTimeout(this.timeout);
4718
+
4719
+ if (this.timeoutPending) {
4720
+ clearTimeout(this.timeoutPending);
4721
+ }
4722
+ this.showPopper = false;
4723
+
4724
+ if (this.disabled) {
4725
+ this.doDestroy();
4726
+ }
4727
+ },
4728
+ setExpectedState: function setExpectedState(expectedState) {
4729
+ if (expectedState === false) {
4730
+ clearTimeout(this.timeoutPending);
4731
+ }
4732
+ this.expectedState = expectedState;
4733
+ }
4734
+ },
4735
+
4736
+ destroyed: function destroyed() {
4737
+ var reference = this.referenceElm;
4738
+ (0, _dom.off)(reference, 'mouseenter', this.show);
4739
+ (0, _dom.off)(reference, 'mouseleave', this.hide);
4740
+ (0, _dom.off)(reference, 'focus', this.handleFocus);
4741
+ (0, _dom.off)(reference, 'blur', this.handleBlur);
4742
+ (0, _dom.off)(reference, 'click', this.removeFocusing);
4743
+ }
4744
+ };
4745
+
4746
+ /***/ }),
4747
+
4748
+ /***/ 8:
4749
+ /***/ (function(module, exports, __webpack_require__) {
4750
+
4751
+ "use strict";
4752
+
4753
+
4754
+ exports.__esModule = true;
4755
+
4756
+ exports.default = function (target) {
4757
+ for (var i = 1, j = arguments.length; i < j; i++) {
4758
+ var source = arguments[i] || {};
4759
+ for (var prop in source) {
4760
+ if (source.hasOwnProperty(prop)) {
4761
+ var value = source[prop];
4762
+ if (value !== undefined) {
4763
+ target[prop] = value;
4764
+ }
4765
+ }
4766
+ }
4767
+ }
4768
+
4769
+ return target;
4770
+ };
4771
+
4772
+ ;
4773
+
4774
+ /***/ }),
4775
+
4776
+ /***/ 83:
4777
+ /***/ (function(module, exports, __webpack_require__) {
4778
+
4779
+ "use strict";
4780
+
4781
+
4782
+ exports.__esModule = true;
4783
+
4784
+ var _dom = __webpack_require__(3);
4785
+
4786
+ exports.default = {
4787
+ bind: function bind(el, binding, vnode) {
4788
+ var interval = null;
4789
+ var startTime = void 0;
4790
+ var handler = function handler() {
4791
+ return vnode.context[binding.expression].apply();
4792
+ };
4793
+ var clear = function clear() {
4794
+ if (new Date() - startTime < 100) {
4795
+ handler();
4796
+ }
4797
+ clearInterval(interval);
4798
+ interval = null;
4799
+ };
4800
+
4801
+ (0, _dom.on)(el, 'mousedown', function (e) {
4802
+ if (e.button !== 0) return;
4803
+ startTime = new Date();
4804
+ (0, _dom.once)(document, 'mouseup', clear);
4805
+ clearInterval(interval);
4806
+ interval = setInterval(handler, 100);
4807
+ });
4808
+ }
4809
+ };
4810
+
4811
+ /***/ }),
4812
+
4813
+ /***/ 9:
4814
+ /***/ (function(module, exports) {
4815
+
4816
+ module.exports = require("babel-runtime/core-js/promise");
4817
+
4818
+ /***/ }),
4819
+
4820
+ /***/ 92:
4821
+ /***/ (function(module, exports, __webpack_require__) {
4822
+
4823
+ "use strict";
4824
+
4825
+
4826
+ exports.__esModule = true;
4827
+
4828
+ var _input = __webpack_require__(20);
4829
+
4830
+ var _input2 = _interopRequireDefault(_input);
4831
+
4832
+ var _focus = __webpack_require__(56);
4833
+
4834
+ var _focus2 = _interopRequireDefault(_focus);
4835
+
4836
+ var _repeatClick = __webpack_require__(83);
4837
+
4838
+ var _repeatClick2 = _interopRequireDefault(_repeatClick);
4839
+
4840
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4841
+
4842
+ exports.default = {
4843
+ name: 'ElInputNumber',
4844
+ mixins: [(0, _focus2.default)('input')],
4845
+ inject: {
4846
+ elForm: {
4847
+ default: ''
4848
+ },
4849
+ elFormItem: {
4850
+ default: ''
4851
+ }
4852
+ },
4853
+ directives: {
4854
+ repeatClick: _repeatClick2.default
4855
+ },
4856
+ components: {
4857
+ ElInput: _input2.default
4858
+ },
4859
+ props: {
4860
+ step: {
4861
+ type: Number,
4862
+ default: 1
4863
+ },
4864
+ max: {
4865
+ type: Number,
4866
+ default: Infinity
4867
+ },
4868
+ min: {
4869
+ type: Number,
4870
+ default: -Infinity
4871
+ },
4872
+ value: {},
4873
+ disabled: Boolean,
4874
+ size: String,
4875
+ controls: {
4876
+ type: Boolean,
4877
+ default: true
4878
+ },
4879
+ controlsPosition: {
4880
+ type: String,
4881
+ default: ''
4882
+ },
4883
+ name: String,
4884
+ label: String,
4885
+ precision: {
4886
+ type: Number,
4887
+ validator: function validator(val) {
4888
+ return val >= 0 && val === parseInt(val, 10);
4889
+ }
4890
+ },
4891
+ dataElement: String
4892
+ },
4893
+ data: function data() {
4894
+ return {
4895
+ currentValue: 0
4896
+ };
4897
+ },
4898
+
4899
+ watch: {
4900
+ value: {
4901
+ immediate: true,
4902
+ handler: function handler(value) {
4903
+ var newVal = value === undefined ? value : Number(value);
4904
+ if (newVal !== undefined) {
4905
+ if (isNaN(newVal)) {
4906
+ return;
4907
+ }
4908
+ if (this.precision !== undefined) {
4909
+ newVal = this.toPrecision(newVal, this.precision);
4910
+ }
4911
+ }
4912
+ if (newVal >= this.max) newVal = this.max;
4913
+ if (newVal <= this.min) newVal = this.min;
4914
+ this.currentValue = newVal;
4915
+ this.$emit('input', newVal);
4916
+ }
4946
4917
  }
4947
4918
  },
4919
+ computed: {
4920
+ minDisabled: function minDisabled() {
4921
+ return this._decrease(this.value, this.step) < this.min;
4922
+ },
4923
+ maxDisabled: function maxDisabled() {
4924
+ return this._increase(this.value, this.step) > this.max;
4925
+ },
4926
+ numPrecision: function numPrecision() {
4927
+ var value = this.value,
4928
+ step = this.step,
4929
+ getPrecision = this.getPrecision,
4930
+ precision = this.precision;
4948
4931
 
4949
- watch: {
4950
- focusing: function focusing(val) {
4951
- if (val) {
4952
- (0, _dom.addClass)(this.referenceElm, 'focusing');
4932
+ var stepPrecision = getPrecision(step);
4933
+ if (precision !== undefined) {
4934
+ if (stepPrecision > precision) {
4935
+ console.warn('[Element Warn][InputNumber]precision should not be less than the decimal places of step');
4936
+ }
4937
+ return precision;
4953
4938
  } else {
4954
- (0, _dom.removeClass)(this.referenceElm, 'focusing');
4939
+ return Math.max(getPrecision(value), stepPrecision);
4940
+ }
4941
+ },
4942
+ controlsAtRight: function controlsAtRight() {
4943
+ return this.controlsPosition === 'right';
4944
+ },
4945
+ _elFormItemSize: function _elFormItemSize() {
4946
+ return (this.elFormItem || {}).elFormItemSize;
4947
+ },
4948
+ inputNumberSize: function inputNumberSize() {
4949
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
4950
+ },
4951
+ inputNumberDisabled: function inputNumberDisabled() {
4952
+ return this.disabled || (this.elForm || {}).disabled;
4953
+ },
4954
+ currentInputValue: function currentInputValue() {
4955
+ var currentValue = this.currentValue;
4956
+ if (typeof currentValue === 'number' && this.precision !== undefined) {
4957
+ return currentValue.toFixed(this.precision);
4958
+ } else {
4959
+ return currentValue;
4955
4960
  }
4956
4961
  }
4957
4962
  },
4958
4963
  methods: {
4959
- show: function show() {
4960
- this.setExpectedState(true);
4961
- this.handleShowPopper();
4964
+ toPrecision: function toPrecision(num, precision) {
4965
+ if (precision === undefined) precision = this.numPrecision;
4966
+ return parseFloat(parseFloat(Number(num).toFixed(precision)));
4962
4967
  },
4963
- hide: function hide() {
4964
- this.setExpectedState(false);
4965
- this.debounceClose();
4968
+ getPrecision: function getPrecision(value) {
4969
+ if (value === undefined) return 0;
4970
+ var valueString = value.toString();
4971
+ var dotPosition = valueString.indexOf('.');
4972
+ var precision = 0;
4973
+ if (dotPosition !== -1) {
4974
+ precision = valueString.length - dotPosition - 1;
4975
+ }
4976
+ return precision;
4966
4977
  },
4967
- handleFocus: function handleFocus() {
4968
- this.focusing = true;
4969
- this.show();
4978
+ _increase: function _increase(val, step) {
4979
+ if (typeof val !== 'number' && val !== undefined) return this.currentValue;
4980
+
4981
+ var precisionFactor = Math.pow(10, this.numPrecision);
4982
+ // Solve the accuracy problem of JS decimal calculation by converting the value to integer.
4983
+ return this.toPrecision((precisionFactor * val + precisionFactor * step) / precisionFactor);
4970
4984
  },
4971
- handleBlur: function handleBlur() {
4972
- this.focusing = false;
4973
- this.hide();
4985
+ _decrease: function _decrease(val, step) {
4986
+ if (typeof val !== 'number' && val !== undefined) return this.currentValue;
4987
+
4988
+ var precisionFactor = Math.pow(10, this.numPrecision);
4989
+
4990
+ return this.toPrecision((precisionFactor * val - precisionFactor * step) / precisionFactor);
4974
4991
  },
4975
- removeFocusing: function removeFocusing() {
4976
- this.focusing = false;
4992
+ increase: function increase() {
4993
+ if (this.inputNumberDisabled || this.maxDisabled) return;
4994
+ var value = this.value || 0;
4995
+ var newVal = this._increase(value, this.step);
4996
+ this.setCurrentValue(newVal);
4977
4997
  },
4978
- concatClass: function concatClass(a, b) {
4979
- if (a && a.indexOf(b) > -1) return a;
4980
- return a ? b ? a + ' ' + b : a : b || '';
4998
+ decrease: function decrease() {
4999
+ if (this.inputNumberDisabled || this.minDisabled) return;
5000
+ var value = this.value || 0;
5001
+ var newVal = this._decrease(value, this.step);
5002
+ this.setCurrentValue(newVal);
4981
5003
  },
4982
- handleShowPopper: function handleShowPopper() {
4983
- var _this4 = this;
4984
-
4985
- if (!this.expectedState || this.manual) return;
4986
- clearTimeout(this.timeout);
4987
- this.timeout = setTimeout(function () {
4988
- _this4.showPopper = true;
4989
- }, this.openDelay);
4990
-
4991
- if (this.hideAfter > 0) {
4992
- this.timeoutPending = setTimeout(function () {
4993
- _this4.showPopper = false;
4994
- }, this.hideAfter);
4995
- }
5004
+ handleBlur: function handleBlur(event) {
5005
+ this.$emit('blur', event);
5006
+ this.$refs.input.setCurrentValue(this.currentInputValue);
4996
5007
  },
4997
- handleClosePopper: function handleClosePopper() {
4998
- if (this.enterable && this.expectedState || this.manual) return;
4999
- clearTimeout(this.timeout);
5000
-
5001
- if (this.timeoutPending) {
5002
- clearTimeout(this.timeoutPending);
5008
+ handleFocus: function handleFocus(event) {
5009
+ this.$emit('focus', event);
5010
+ },
5011
+ setCurrentValue: function setCurrentValue(newVal) {
5012
+ var oldVal = this.currentValue;
5013
+ if (typeof newVal === 'number' && this.precision !== undefined) {
5014
+ newVal = this.toPrecision(newVal, this.precision);
5003
5015
  }
5004
- this.showPopper = false;
5005
-
5006
- if (this.disabled) {
5007
- this.doDestroy();
5016
+ if (newVal >= this.max) newVal = this.max;
5017
+ if (newVal <= this.min) newVal = this.min;
5018
+ if (oldVal === newVal) {
5019
+ this.$refs.input.setCurrentValue(this.currentInputValue);
5020
+ return;
5008
5021
  }
5022
+ this.$emit('input', newVal);
5023
+ this.$emit('change', newVal, oldVal);
5024
+ this.currentValue = newVal;
5009
5025
  },
5010
- setExpectedState: function setExpectedState(expectedState) {
5011
- if (expectedState === false) {
5012
- clearTimeout(this.timeoutPending);
5026
+ handleInputChange: function handleInputChange(value) {
5027
+ var newVal = value === '' ? undefined : Number(value);
5028
+ if (!isNaN(newVal) || value === '') {
5029
+ this.setCurrentValue(newVal);
5013
5030
  }
5014
- this.expectedState = expectedState;
5015
5031
  }
5016
5032
  },
5017
-
5018
- destroyed: function destroyed() {
5019
- var reference = this.referenceElm;
5020
- (0, _dom.off)(reference, 'mouseenter', this.show);
5021
- (0, _dom.off)(reference, 'mouseleave', this.hide);
5022
- (0, _dom.off)(reference, 'focus', this.handleFocus);
5023
- (0, _dom.off)(reference, 'blur', this.handleBlur);
5024
- (0, _dom.off)(reference, 'click', this.removeFocusing);
5033
+ mounted: function mounted() {
5034
+ var innerInput = this.$refs.input.$refs.input;
5035
+ innerInput.setAttribute('role', 'spinbutton');
5036
+ innerInput.setAttribute('aria-valuemax', this.max);
5037
+ innerInput.setAttribute('aria-valuemin', this.min);
5038
+ innerInput.setAttribute('aria-valuenow', this.currentValue);
5039
+ innerInput.setAttribute('aria-disabled', this.inputNumberDisabled);
5040
+ },
5041
+ updated: function updated() {
5042
+ if (!this.$refs || !this.$refs.input) return;
5043
+ var innerInput = this.$refs.input.$refs.input;
5044
+ innerInput.setAttribute('aria-valuenow', this.currentValue);
5025
5045
  }
5046
+ }; //
5047
+ //
5048
+ //
5049
+ //
5050
+ //
5051
+ //
5052
+ //
5053
+ //
5054
+ //
5055
+ //
5056
+ //
5057
+ //
5058
+ //
5059
+ //
5060
+ //
5061
+ //
5062
+ //
5063
+ //
5064
+ //
5065
+ //
5066
+ //
5067
+ //
5068
+ //
5069
+ //
5070
+ //
5071
+ //
5072
+ //
5073
+ //
5074
+ //
5075
+ //
5076
+ //
5077
+ //
5078
+ //
5079
+ //
5080
+ //
5081
+ //
5082
+ //
5083
+ //
5084
+ //
5085
+ //
5086
+ //
5087
+ //
5088
+ //
5089
+ //
5090
+ //
5091
+ //
5092
+ //
5093
+ //
5094
+ //
5095
+
5096
+ /***/ }),
5097
+
5098
+ /***/ 99:
5099
+ /***/ (function(module, exports, __webpack_require__) {
5100
+
5101
+ "use strict";
5102
+
5103
+
5104
+ exports.__esModule = true;
5105
+
5106
+ var _vue = __webpack_require__(1);
5107
+
5108
+ var _vue2 = _interopRequireDefault(_vue);
5109
+
5110
+ var _main = __webpack_require__(77);
5111
+
5112
+ var _main2 = _interopRequireDefault(_main);
5113
+
5114
+ var _directive = __webpack_require__(100);
5115
+
5116
+ var _directive2 = _interopRequireDefault(_directive);
5117
+
5118
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5119
+
5120
+ _vue2.default.directive('tooltip', _directive2.default);
5121
+
5122
+ /* istanbul ignore next */
5123
+ _main2.default.install = function (Vue) {
5124
+ Vue.component(_main2.default.name, _main2.default);
5026
5125
  };
5027
5126
 
5127
+ exports.default = _main2.default;
5128
+
5028
5129
  /***/ })
5029
5130
 
5030
5131
  /******/ });