cy-element-ui 1.1.11 → 1.1.13

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 (170) hide show
  1. package/README.md +59 -3
  2. package/lib/alert.js +420 -0
  3. package/lib/aside.js +277 -0
  4. package/lib/autocomplete.js +952 -0
  5. package/lib/avatar.js +363 -0
  6. package/lib/backtop.js +404 -0
  7. package/lib/badge.js +334 -0
  8. package/lib/breadcrumb-item.js +322 -0
  9. package/lib/breadcrumb.js +293 -0
  10. package/lib/button-group.js +262 -0
  11. package/lib/button.js +357 -0
  12. package/lib/calendar.js +933 -0
  13. package/lib/card.js +297 -0
  14. package/lib/carousel-item.js +434 -0
  15. package/lib/carousel.js +707 -0
  16. package/lib/cascader-panel.js +1558 -0
  17. package/lib/cascader.js +1439 -0
  18. package/lib/checkbox-button.js +583 -0
  19. package/lib/checkbox-group.js +313 -0
  20. package/lib/checkbox.js +627 -0
  21. package/lib/col.js +177 -0
  22. package/lib/collapse-item.js +497 -0
  23. package/lib/collapse.js +329 -0
  24. package/lib/color-picker.js +1943 -0
  25. package/lib/container.js +288 -0
  26. package/lib/date-picker.js +6340 -0
  27. package/lib/descriptions-item.js +140 -0
  28. package/lib/descriptions.js +457 -0
  29. package/lib/dialog.js +598 -0
  30. package/lib/directives/mousewheel.js +26 -0
  31. package/lib/directives/repeat-click.js +33 -0
  32. package/lib/divider.js +313 -0
  33. package/lib/drawer.js +592 -0
  34. package/lib/dropdown-item.js +316 -0
  35. package/lib/dropdown-menu.js +351 -0
  36. package/lib/dropdown.js +643 -0
  37. package/lib/empty.js +730 -0
  38. package/lib/footer.js +277 -0
  39. package/lib/form-item.js +826 -0
  40. package/lib/form.js +466 -0
  41. package/lib/header.js +277 -0
  42. package/lib/icon.js +265 -0
  43. package/lib/image.js +1138 -0
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +301 -0
  46. package/lib/input-number.js +757 -0
  47. package/lib/input.js +998 -0
  48. package/lib/link.js +332 -0
  49. package/lib/loading.js +631 -0
  50. package/lib/locale/format.js +56 -0
  51. package/lib/locale/index.js +63 -0
  52. package/lib/locale/lang/en.js +126 -0
  53. package/lib/locale/lang/zh-CN.js +126 -0
  54. package/lib/locale/lang/zh-TW.js +126 -0
  55. package/lib/main.js +264 -0
  56. package/lib/menu-item-group.js +308 -0
  57. package/lib/menu-item.js +491 -0
  58. package/lib/menu.js +865 -0
  59. package/lib/message-box.js +1192 -0
  60. package/lib/message.js +548 -0
  61. package/lib/mixins/emitter.js +36 -0
  62. package/lib/mixins/focus.js +15 -0
  63. package/lib/mixins/locale.js +17 -0
  64. package/lib/mixins/migrating.js +69 -0
  65. package/lib/notification.js +615 -0
  66. package/lib/option-group.js +344 -0
  67. package/lib/option.js +474 -0
  68. package/lib/page-header.js +319 -0
  69. package/lib/pagination.js +950 -0
  70. package/lib/popconfirm.js +457 -0
  71. package/lib/popover.js +617 -0
  72. package/lib/progress.js +595 -0
  73. package/lib/radio-button.js +463 -0
  74. package/lib/radio-group.js +391 -0
  75. package/lib/radio.js +497 -0
  76. package/lib/rate.js +670 -0
  77. package/lib/result.js +578 -0
  78. package/lib/row.js +149 -0
  79. package/lib/scrollbar.js +423 -0
  80. package/lib/select.js +2167 -0
  81. package/lib/selectDisplayInput.js +367 -0
  82. package/lib/skeleton-item.js +342 -0
  83. package/lib/skeleton.js +372 -0
  84. package/lib/slider.js +1199 -0
  85. package/lib/spinner.js +301 -0
  86. package/lib/statistic.js +533 -0
  87. package/lib/step.js +522 -0
  88. package/lib/steps.js +342 -0
  89. package/lib/subTitle.js +295 -0
  90. package/lib/submenu.js +701 -0
  91. package/lib/switch.js +554 -0
  92. package/lib/tab-pane.js +332 -0
  93. package/lib/tabDialog.js +1184 -0
  94. package/lib/table-column.js +952 -0
  95. package/lib/table.js +5015 -0
  96. package/lib/tabs.js +920 -0
  97. package/lib/tag.js +304 -0
  98. package/lib/theme-chalk/base.css +1 -1
  99. package/lib/theme-chalk/index.css +1 -2
  100. package/lib/theme-chalk/selectDisplayInput.css +1 -0
  101. package/lib/theme-chalk/subTitle.css +1 -0
  102. package/lib/theme-chalk/tabDialog.css +1 -0
  103. package/lib/theme-chalk/treeSelect.css +1 -0
  104. package/lib/time-picker.js +2967 -0
  105. package/lib/time-select.js +1765 -0
  106. package/lib/timeline-item.js +371 -0
  107. package/lib/timeline.js +275 -0
  108. package/lib/tooltip.js +425 -0
  109. package/lib/transfer.js +1102 -0
  110. package/lib/transitions/collapse-transition.js +91 -0
  111. package/lib/tree.js +2263 -0
  112. package/lib/treeSelect.js +4430 -0
  113. package/lib/umd/locale/en.js +142 -0
  114. package/lib/umd/locale/zh-CN.js +142 -0
  115. package/lib/umd/locale/zh-TW.js +142 -0
  116. package/lib/upload.js +1390 -0
  117. package/lib/utils/after-leave.js +35 -0
  118. package/lib/utils/aria-dialog.js +104 -0
  119. package/lib/utils/aria-utils.js +126 -0
  120. package/lib/utils/clickoutside.js +79 -0
  121. package/lib/utils/date-util.js +310 -0
  122. package/lib/utils/date.js +369 -0
  123. package/lib/utils/dom.js +234 -0
  124. package/lib/utils/lodash.js +9421 -0
  125. package/lib/utils/menu/aria-menubar.js +24 -0
  126. package/lib/utils/menu/aria-menuitem.js +62 -0
  127. package/lib/utils/menu/aria-submenu.js +69 -0
  128. package/lib/utils/merge.js +21 -0
  129. package/lib/utils/popper.js +1261 -0
  130. package/lib/utils/popup/index.js +233 -0
  131. package/lib/utils/popup/popup-manager.js +205 -0
  132. package/lib/utils/resize-event.js +59 -0
  133. package/lib/utils/scroll-into-view.js +38 -0
  134. package/lib/utils/scrollbar-width.js +39 -0
  135. package/lib/utils/shared.js +12 -0
  136. package/lib/utils/types.js +52 -0
  137. package/lib/utils/util.js +272 -0
  138. package/lib/utils/vdom.js +13 -0
  139. package/lib/utils/vue-popper.js +202 -0
  140. package/package.json +3 -3
  141. package/packages/selectDisplayInput/index.js +8 -0
  142. package/packages/selectDisplayInput/src/main.vue +75 -0
  143. package/packages/theme-chalk/gulpfile.js +1 -1
  144. package/packages/{theme-cy/src → theme-chalk/src/cy}/index.scss +1 -0
  145. package/packages/theme-chalk/src/cy/selectDisplayInput.scss +76 -0
  146. package/packages/theme-chalk/src/index.scss +2 -3
  147. package/packages/treeSelect/src/main.vue +7 -3
  148. package/src/index.js +7 -4
  149. package/lib/theme-cy/base.css +0 -1
  150. package/lib/theme-cy/index.css +0 -1
  151. package/lib/theme-cy/subTitle.css +0 -1
  152. package/lib/theme-cy/tabDialog.css +0 -1
  153. package/lib/theme-cy/treeSelect.css +0 -1
  154. package/packages/theme-chalk/src/tabDialog.scss +0 -0
  155. package/packages/theme-chalk/src/treeSelect.scss +0 -0
  156. package/packages/theme-cy/gulpfile.js +0 -19
  157. package/packages/theme-cy/lib/base.css +0 -1
  158. package/packages/theme-cy/lib/element.css +0 -1
  159. package/packages/theme-cy/lib/index.css +0 -1
  160. package/packages/theme-cy/lib/subTitle.css +0 -1
  161. package/packages/theme-cy/lib/tabDialog.css +0 -1
  162. package/packages/theme-cy/lib/treeSelect.css +0 -1
  163. package/packages/theme-cy/package.json +0 -9
  164. /package/lib/{theme-cy → theme-chalk}/element.css +0 -0
  165. /package/packages/{theme-cy/src → theme-chalk/src/cy}/base.scss +0 -0
  166. /package/packages/{theme-cy/src → theme-chalk/src/cy}/element.scss +0 -0
  167. /package/packages/{theme-cy/src → theme-chalk/src/cy}/subTitle.scss +0 -0
  168. /package/packages/{theme-cy/src → theme-chalk/src/cy}/tabDialog.scss +0 -0
  169. /package/packages/{theme-cy/src → theme-chalk/src/cy}/treeSelect.scss +0 -0
  170. /package/packages/theme-chalk/src/{subTitle.scss → selectDisplayInput.scss} +0 -0
package/lib/tooltip.js ADDED
@@ -0,0 +1,425 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "/dist/";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 142);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 142:
91
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
+
93
+ "use strict";
94
+ // ESM COMPAT FLAG
95
+ __webpack_require__.r(__webpack_exports__);
96
+
97
+ // EXTERNAL MODULE: external "element-ui/lib/utils/vue-popper"
98
+ var vue_popper_ = __webpack_require__(5);
99
+ var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
100
+
101
+ // EXTERNAL MODULE: external "throttle-debounce/debounce"
102
+ var debounce_ = __webpack_require__(20);
103
+ var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
104
+
105
+ // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
106
+ var dom_ = __webpack_require__(2);
107
+
108
+ // EXTERNAL MODULE: external "element-ui/lib/utils/util"
109
+ var util_ = __webpack_require__(3);
110
+
111
+ // EXTERNAL MODULE: external "vue"
112
+ var external_vue_ = __webpack_require__(6);
113
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
114
+
115
+ // CONCATENATED MODULE: ./packages/tooltip/src/main.js
116
+
117
+
118
+
119
+
120
+
121
+
122
+ /* harmony default export */ var main = ({
123
+ name: 'ElTooltip',
124
+
125
+ mixins: [vue_popper_default.a],
126
+
127
+ props: {
128
+ openDelay: {
129
+ type: Number,
130
+ default: 0
131
+ },
132
+ disabled: Boolean,
133
+ manual: Boolean,
134
+ effect: {
135
+ type: String,
136
+ default: 'dark'
137
+ },
138
+ arrowOffset: {
139
+ type: Number,
140
+ default: 0
141
+ },
142
+ popperClass: String,
143
+ content: String,
144
+ visibleArrow: {
145
+ default: true
146
+ },
147
+ transition: {
148
+ type: String,
149
+ default: 'el-fade-in-linear'
150
+ },
151
+ popperOptions: {
152
+ default: function _default() {
153
+ return {
154
+ boundariesPadding: 10,
155
+ gpuAcceleration: false
156
+ };
157
+ }
158
+ },
159
+ enterable: {
160
+ type: Boolean,
161
+ default: true
162
+ },
163
+ hideAfter: {
164
+ type: Number,
165
+ default: 0
166
+ },
167
+ tabindex: {
168
+ type: Number,
169
+ default: 0
170
+ }
171
+ },
172
+
173
+ data: function data() {
174
+ return {
175
+ tooltipId: 'el-tooltip-' + Object(util_["generateId"])(),
176
+ timeoutPending: null,
177
+ focusing: false
178
+ };
179
+ },
180
+ beforeCreate: function beforeCreate() {
181
+ var _this = this;
182
+
183
+ if (this.$isServer) return;
184
+
185
+ this.popperVM = new external_vue_default.a({
186
+ data: { node: '' },
187
+ render: function render(h) {
188
+ return this.node;
189
+ }
190
+ }).$mount();
191
+
192
+ this.debounceClose = debounce_default()(200, function () {
193
+ return _this.handleClosePopper();
194
+ });
195
+ },
196
+ render: function render(h) {
197
+ var _this2 = this;
198
+
199
+ if (this.popperVM) {
200
+ this.popperVM.node = h(
201
+ 'transition',
202
+ {
203
+ attrs: {
204
+ name: this.transition
205
+ },
206
+ on: {
207
+ 'afterLeave': this.doDestroy
208
+ }
209
+ },
210
+ [h(
211
+ 'div',
212
+ {
213
+ on: {
214
+ 'mouseleave': function mouseleave() {
215
+ _this2.setExpectedState(false);_this2.debounceClose();
216
+ },
217
+ 'mouseenter': function mouseenter() {
218
+ _this2.setExpectedState(true);
219
+ }
220
+ },
221
+
222
+ ref: 'popper',
223
+ attrs: { role: 'tooltip',
224
+ id: this.tooltipId,
225
+ 'aria-hidden': this.disabled || !this.showPopper ? 'true' : 'false'
226
+ },
227
+ directives: [{
228
+ name: 'show',
229
+ value: !this.disabled && this.showPopper
230
+ }],
231
+
232
+ 'class': ['el-tooltip__popper', 'is-' + this.effect, this.popperClass] },
233
+ [this.$slots.content || this.content]
234
+ )]
235
+ );
236
+ }
237
+
238
+ var firstElement = this.getFirstElement();
239
+ if (!firstElement) return null;
240
+
241
+ var data = firstElement.data = firstElement.data || {};
242
+ data.staticClass = this.addTooltipClass(data.staticClass);
243
+
244
+ return firstElement;
245
+ },
246
+ mounted: function mounted() {
247
+ var _this3 = this;
248
+
249
+ this.referenceElm = this.$el;
250
+ if (this.$el.nodeType === 1) {
251
+ this.$el.setAttribute('aria-describedby', this.tooltipId);
252
+ this.$el.setAttribute('tabindex', this.tabindex);
253
+ Object(dom_["on"])(this.referenceElm, 'mouseenter', this.show);
254
+ Object(dom_["on"])(this.referenceElm, 'mouseleave', this.hide);
255
+ Object(dom_["on"])(this.referenceElm, 'focus', function () {
256
+ if (!_this3.$slots.default || !_this3.$slots.default.length) {
257
+ _this3.handleFocus();
258
+ return;
259
+ }
260
+ var instance = _this3.$slots.default[0].componentInstance;
261
+ if (instance && instance.focus) {
262
+ instance.focus();
263
+ } else {
264
+ _this3.handleFocus();
265
+ }
266
+ });
267
+ Object(dom_["on"])(this.referenceElm, 'blur', this.handleBlur);
268
+ Object(dom_["on"])(this.referenceElm, 'click', this.removeFocusing);
269
+ }
270
+ // fix issue https://github.com/ElemeFE/element/issues/14424
271
+ if (this.value && this.popperVM) {
272
+ this.popperVM.$nextTick(function () {
273
+ if (_this3.value) {
274
+ _this3.updatePopper();
275
+ }
276
+ });
277
+ }
278
+ },
279
+
280
+ watch: {
281
+ focusing: function focusing(val) {
282
+ if (val) {
283
+ Object(dom_["addClass"])(this.referenceElm, 'focusing');
284
+ } else {
285
+ Object(dom_["removeClass"])(this.referenceElm, 'focusing');
286
+ }
287
+ }
288
+ },
289
+ methods: {
290
+ show: function show() {
291
+ this.setExpectedState(true);
292
+ this.handleShowPopper();
293
+ },
294
+ hide: function hide() {
295
+ this.setExpectedState(false);
296
+ this.debounceClose();
297
+ },
298
+ handleFocus: function handleFocus() {
299
+ this.focusing = true;
300
+ this.show();
301
+ },
302
+ handleBlur: function handleBlur() {
303
+ this.focusing = false;
304
+ this.hide();
305
+ },
306
+ removeFocusing: function removeFocusing() {
307
+ this.focusing = false;
308
+ },
309
+ addTooltipClass: function addTooltipClass(prev) {
310
+ if (!prev) {
311
+ return 'el-tooltip';
312
+ } else {
313
+ return 'el-tooltip ' + prev.replace('el-tooltip', '');
314
+ }
315
+ },
316
+ handleShowPopper: function handleShowPopper() {
317
+ var _this4 = this;
318
+
319
+ if (!this.expectedState || this.manual) return;
320
+ clearTimeout(this.timeout);
321
+ this.timeout = setTimeout(function () {
322
+ _this4.showPopper = true;
323
+ }, this.openDelay);
324
+
325
+ if (this.hideAfter > 0) {
326
+ this.timeoutPending = setTimeout(function () {
327
+ _this4.showPopper = false;
328
+ }, this.hideAfter);
329
+ }
330
+ },
331
+ handleClosePopper: function handleClosePopper() {
332
+ if (this.enterable && this.expectedState || this.manual) return;
333
+ clearTimeout(this.timeout);
334
+
335
+ if (this.timeoutPending) {
336
+ clearTimeout(this.timeoutPending);
337
+ }
338
+ this.showPopper = false;
339
+
340
+ if (this.disabled) {
341
+ this.doDestroy();
342
+ }
343
+ },
344
+ setExpectedState: function setExpectedState(expectedState) {
345
+ if (expectedState === false) {
346
+ clearTimeout(this.timeoutPending);
347
+ }
348
+ this.expectedState = expectedState;
349
+ },
350
+ getFirstElement: function getFirstElement() {
351
+ var slots = this.$slots.default;
352
+ if (!Array.isArray(slots)) return null;
353
+ var element = null;
354
+ for (var index = 0; index < slots.length; index++) {
355
+ if (slots[index] && slots[index].tag) {
356
+ element = slots[index];
357
+ break;
358
+ };
359
+ }
360
+ return element;
361
+ }
362
+ },
363
+
364
+ beforeDestroy: function beforeDestroy() {
365
+ this.popperVM && this.popperVM.$destroy();
366
+ },
367
+ destroyed: function destroyed() {
368
+ var reference = this.referenceElm;
369
+ if (reference.nodeType === 1) {
370
+ Object(dom_["off"])(reference, 'mouseenter', this.show);
371
+ Object(dom_["off"])(reference, 'mouseleave', this.hide);
372
+ Object(dom_["off"])(reference, 'focus', this.handleFocus);
373
+ Object(dom_["off"])(reference, 'blur', this.handleBlur);
374
+ Object(dom_["off"])(reference, 'click', this.removeFocusing);
375
+ }
376
+ }
377
+ });
378
+ // CONCATENATED MODULE: ./packages/tooltip/index.js
379
+
380
+
381
+ /* istanbul ignore next */
382
+ main.install = function (Vue) {
383
+ Vue.component(main.name, main);
384
+ };
385
+
386
+ /* harmony default export */ var tooltip = __webpack_exports__["default"] = (main);
387
+
388
+ /***/ }),
389
+
390
+ /***/ 2:
391
+ /***/ (function(module, exports) {
392
+
393
+ module.exports = require("element-ui/lib/utils/dom");
394
+
395
+ /***/ }),
396
+
397
+ /***/ 20:
398
+ /***/ (function(module, exports) {
399
+
400
+ module.exports = require("throttle-debounce/debounce");
401
+
402
+ /***/ }),
403
+
404
+ /***/ 3:
405
+ /***/ (function(module, exports) {
406
+
407
+ module.exports = require("element-ui/lib/utils/util");
408
+
409
+ /***/ }),
410
+
411
+ /***/ 5:
412
+ /***/ (function(module, exports) {
413
+
414
+ module.exports = require("element-ui/lib/utils/vue-popper");
415
+
416
+ /***/ }),
417
+
418
+ /***/ 6:
419
+ /***/ (function(module, exports) {
420
+
421
+ module.exports = require("vue");
422
+
423
+ /***/ })
424
+
425
+ /******/ });