vue-devui 1.0.0-rc.8 → 1.0.0-rc.9

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 (123) hide show
  1. package/alert/index.es.js +2 -2
  2. package/alert/index.umd.js +1 -1
  3. package/auto-complete/index.es.js +282 -84
  4. package/auto-complete/index.umd.js +3 -5
  5. package/auto-complete/style.css +1 -1
  6. package/avatar/index.es.js +59 -74
  7. package/avatar/index.umd.js +1 -1
  8. package/badge/index.es.js +2 -2
  9. package/badge/index.umd.js +1 -1
  10. package/button/index.es.js +111 -38
  11. package/button/index.umd.js +15 -15
  12. package/button/style.css +1 -1
  13. package/card/index.es.js +2 -2
  14. package/card/index.umd.js +1 -1
  15. package/checkbox/index.es.js +340 -228
  16. package/checkbox/index.umd.js +1 -1
  17. package/checkbox/style.css +1 -1
  18. package/date-picker/index.es.js +264 -63
  19. package/date-picker/index.umd.js +1 -1
  20. package/date-picker/style.css +1 -1
  21. package/drawer/index.es.js +2 -2
  22. package/drawer/index.umd.js +1 -1
  23. package/dropdown/index.es.js +104 -48
  24. package/dropdown/index.umd.js +1 -1
  25. package/dropdown/style.css +1 -1
  26. package/editable-select/index.es.js +423 -8
  27. package/editable-select/index.umd.js +1 -1
  28. package/editable-select/style.css +1 -1
  29. package/form/index.es.js +304 -184
  30. package/form/index.umd.js +15 -15
  31. package/form/style.css +1 -1
  32. package/fullscreen/index.es.js +2 -2
  33. package/fullscreen/index.umd.js +1 -1
  34. package/grid/index.es.js +8 -6
  35. package/grid/index.umd.js +1 -1
  36. package/icon/index.es.js +109 -13
  37. package/icon/index.umd.js +1 -1
  38. package/icon/style.css +1 -0
  39. package/image-preview/index.es.js +2 -2
  40. package/image-preview/index.umd.js +1 -1
  41. package/input/index.es.js +278 -30
  42. package/input/index.umd.js +1 -1
  43. package/input/style.css +1 -1
  44. package/input-number/index.es.js +272 -199
  45. package/input-number/index.umd.js +1 -1
  46. package/input-number/style.css +1 -1
  47. package/layout/index.es.js +2 -2
  48. package/layout/index.umd.js +1 -1
  49. package/loading/index.es.js +2 -2
  50. package/loading/index.umd.js +1 -1
  51. package/modal/index.es.js +105 -32
  52. package/modal/index.umd.js +1 -1
  53. package/modal/style.css +1 -1
  54. package/notification/index.es.js +105 -32
  55. package/notification/index.umd.js +1 -1
  56. package/notification/style.css +1 -1
  57. package/nuxt/components/CheckboxButton.js +3 -0
  58. package/nuxt/components/Icon.js +1 -0
  59. package/nuxt/components/LABEL_DATA.js +3 -0
  60. package/nuxt/components/Option.js +3 -0
  61. package/nuxt/components/iconProps.js +1 -0
  62. package/nuxt/components/svgIconProps.js +3 -0
  63. package/overlay/index.es.js +2 -2
  64. package/overlay/index.umd.js +1 -1
  65. package/package.json +2 -1
  66. package/pagination/index.es.js +2 -2
  67. package/pagination/index.umd.js +1 -1
  68. package/popover/index.es.js +153 -67
  69. package/popover/index.umd.js +15 -15
  70. package/popover/style.css +1 -1
  71. package/progress/index.es.js +2 -2
  72. package/progress/index.umd.js +2 -2
  73. package/radio/index.es.js +139 -143
  74. package/radio/index.umd.js +1 -1
  75. package/rate/index.es.js +16 -8
  76. package/rate/index.umd.js +1 -1
  77. package/result/index.es.js +108 -12
  78. package/result/index.umd.js +1 -1
  79. package/result/style.css +1 -1
  80. package/search/index.es.js +316 -60
  81. package/search/index.umd.js +16 -16
  82. package/search/style.css +1 -1
  83. package/select/index.es.js +7334 -574
  84. package/select/index.umd.js +27 -1
  85. package/select/style.css +1 -1
  86. package/skeleton/index.es.js +2 -2
  87. package/skeleton/index.umd.js +1 -1
  88. package/slider/index.es.js +2 -2
  89. package/slider/index.umd.js +1 -1
  90. package/splitter/index.es.js +178 -89
  91. package/splitter/index.umd.js +17 -17
  92. package/splitter/style.css +1 -1
  93. package/status/index.es.js +2 -2
  94. package/status/index.umd.js +1 -1
  95. package/style.css +1 -1
  96. package/switch/index.es.js +2 -2
  97. package/switch/index.umd.js +1 -1
  98. package/table/index.es.js +1301 -524
  99. package/table/index.umd.js +18 -18
  100. package/table/style.css +1 -1
  101. package/tabs/index.es.js +114 -72
  102. package/tabs/index.umd.js +1 -1
  103. package/tabs/style.css +1 -1
  104. package/tag/index.es.js +6 -7
  105. package/tag/index.umd.js +1 -1
  106. package/textarea/index.es.js +5545 -11
  107. package/textarea/index.umd.js +35 -1
  108. package/timeline/index.es.js +108 -12
  109. package/timeline/index.umd.js +1 -1
  110. package/timeline/style.css +1 -1
  111. package/tooltip/index.es.js +168 -79
  112. package/tooltip/index.umd.js +15 -15
  113. package/tooltip/style.css +1 -1
  114. package/tree/index.es.js +338 -227
  115. package/tree/index.umd.js +1 -1
  116. package/tree/style.css +1 -1
  117. package/upload/index.es.js +105 -32
  118. package/upload/index.umd.js +1 -1
  119. package/upload/style.css +1 -1
  120. package/vue-devui.es.js +3269 -1742
  121. package/vue-devui.umd.js +29 -23
  122. package/nuxt/components/FormControl.js +0 -3
  123. package/nuxt/components/FormLabel.js +0 -3
@@ -21,7 +21,7 @@ var __publicField = (obj, key, value) => {
21
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
22
  return value;
23
23
  };
24
- import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, toRefs, Fragment, inject, reactive, withDirectives, provide, resolveComponent, onUpdated } from "vue";
24
+ import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, toRefs, provide, reactive, resolveComponent, onUpdated } from "vue";
25
25
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
26
26
  function createBem(namespace, element, modifier) {
27
27
  let cls = namespace;
@@ -33,8 +33,8 @@ function createBem(namespace, element, modifier) {
33
33
  }
34
34
  return cls;
35
35
  }
36
- function useNamespace(block) {
37
- const namespace = `devui-${block}`;
36
+ function useNamespace(block, needDot = false) {
37
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
38
38
  const b = () => createBem(namespace);
39
39
  const e = (element) => element ? createBem(namespace, element) : "";
40
40
  const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
@@ -52,14 +52,14 @@ function _isSlot(s) {
52
52
  }
53
53
  const CommonOverlay = defineComponent({
54
54
  setup(props, ctx) {
55
- const ns = useNamespace("overlay");
55
+ const ns2 = useNamespace("overlay");
56
56
  return () => {
57
57
  let _slot;
58
58
  return createVNode(Teleport, {
59
59
  "to": "#d-overlay-anchor"
60
60
  }, {
61
61
  default: () => [createVNode(Transition, {
62
- "name": ns.e("fade")
62
+ "name": ns2.e("fade")
63
63
  }, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
64
64
  default: () => [_slot]
65
65
  })]
@@ -102,12 +102,12 @@ const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
102
102
  });
103
103
  const overlayEmits = ["update:visible", "backdropClick"];
104
104
  function useOverlayLogic(props, ctx) {
105
- const ns = useNamespace("overlay");
105
+ const ns2 = useNamespace("overlay");
106
106
  const backgroundClass = computed(() => {
107
- return [ns.e("background"), props.backgroundClass, !props.hasBackdrop ? ns.em("background", "disabled") : ns.em("background", "color")];
107
+ return [ns2.e("background"), props.backgroundClass, !props.hasBackdrop ? ns2.em("background", "disabled") : ns2.em("background", "color")];
108
108
  });
109
109
  const overlayClass = computed(() => {
110
- return ns.b();
110
+ return ns2.b();
111
111
  });
112
112
  const handleBackdropClick = (event) => {
113
113
  var _a;
@@ -317,7 +317,7 @@ const FlexibleOverlay = defineComponent({
317
317
  emit,
318
318
  expose
319
319
  }) {
320
- const ns = useNamespace("flexible-overlay");
320
+ const ns2 = useNamespace("flexible-overlay");
321
321
  const {
322
322
  arrowRef,
323
323
  overlayRef,
@@ -330,14 +330,70 @@ const FlexibleOverlay = defineComponent({
330
330
  var _a;
331
331
  return props.modelValue && createVNode("div", mergeProps({
332
332
  "ref": overlayRef,
333
- "class": ns.b()
333
+ "class": ns2.b()
334
334
  }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
335
335
  "ref": arrowRef,
336
- "class": ns.e("arrow")
336
+ "class": ns2.e("arrow")
337
337
  }, null)]);
338
338
  };
339
339
  }
340
340
  });
341
+ const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
342
+ const isObject = (val) => val !== null && typeof val === "object";
343
+ const ns = useNamespace("popper-trigger");
344
+ function wrapContent(content) {
345
+ return h("span", { class: ns.b() }, content);
346
+ }
347
+ function getFirstValidChild(nodes) {
348
+ for (const child of nodes) {
349
+ if (isObject(child)) {
350
+ if (child.type === Comment) {
351
+ continue;
352
+ }
353
+ if (child.type === "svg" || child.type === Text) {
354
+ return wrapContent(child);
355
+ }
356
+ if (child.type === Fragment) {
357
+ return getFirstValidChild(child.children);
358
+ }
359
+ return child;
360
+ }
361
+ return wrapContent(child);
362
+ }
363
+ return null;
364
+ }
365
+ var PopperTrigger = defineComponent({
366
+ name: "DPopperTrigger",
367
+ setup(_, ctx) {
368
+ const {
369
+ slots,
370
+ attrs
371
+ } = ctx;
372
+ return () => {
373
+ var _a;
374
+ const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots, attrs);
375
+ const triggerRef = inject(POPPER_TRIGGER_TOKEN);
376
+ if (!defaultSlot) {
377
+ return null;
378
+ }
379
+ const firstValidChild = getFirstValidChild(defaultSlot);
380
+ if (!firstValidChild) {
381
+ return null;
382
+ }
383
+ return withDirectives(cloneVNode(firstValidChild, attrs), [[{
384
+ mounted(el) {
385
+ triggerRef.value = el;
386
+ },
387
+ updated(el) {
388
+ triggerRef.value = el;
389
+ },
390
+ unmounted() {
391
+ triggerRef.value = null;
392
+ }
393
+ }]]);
394
+ };
395
+ }
396
+ });
341
397
  const tooltipProps = {
342
398
  content: {
343
399
  type: String,
@@ -358,6 +414,18 @@ const tooltipProps = {
358
414
  mouseLeaveDelay: {
359
415
  type: Number,
360
416
  default: 100
417
+ },
418
+ enterable: {
419
+ type: Boolean,
420
+ default: true
421
+ },
422
+ disabled: {
423
+ type: Boolean,
424
+ default: false
425
+ },
426
+ hideAfter: {
427
+ type: Number,
428
+ default: 0
361
429
  }
362
430
  };
363
431
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -1071,7 +1139,7 @@ var lodash = { exports: {} };
1071
1139
  var objectCtorString = funcToString.call(Object2);
1072
1140
  var oldDash = root._;
1073
1141
  var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1074
- var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined$1, symIterator = Symbol ? Symbol.iterator : undefined$1, symToStringTag = Symbol ? Symbol.toStringTag : undefined$1;
1142
+ var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
1075
1143
  var defineProperty = function() {
1076
1144
  try {
1077
1145
  var func = getNative(Object2, "defineProperty");
@@ -1086,7 +1154,7 @@ var lodash = { exports: {} };
1086
1154
  var metaMap = WeakMap2 && new WeakMap2();
1087
1155
  var realNames = {};
1088
1156
  var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
1089
- var symbolProto = Symbol ? Symbol.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1157
+ var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1090
1158
  function lodash2(value) {
1091
1159
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
1092
1160
  if (value instanceof LodashWrapper) {
@@ -1102,7 +1170,7 @@ var lodash = { exports: {} };
1102
1170
  function object() {
1103
1171
  }
1104
1172
  return function(proto) {
1105
- if (!isObject(proto)) {
1173
+ if (!isObject2(proto)) {
1106
1174
  return {};
1107
1175
  }
1108
1176
  if (objectCreate) {
@@ -1464,7 +1532,7 @@ var lodash = { exports: {} };
1464
1532
  if (result2 !== undefined$1) {
1465
1533
  return result2;
1466
1534
  }
1467
- if (!isObject(value)) {
1535
+ if (!isObject2(value)) {
1468
1536
  return value;
1469
1537
  }
1470
1538
  var isArr = isArray(value);
@@ -1540,7 +1608,7 @@ var lodash = { exports: {} };
1540
1608
  if (typeof func != "function") {
1541
1609
  throw new TypeError2(FUNC_ERROR_TEXT);
1542
1610
  }
1543
- return setTimeout(function() {
1611
+ return setTimeout2(function() {
1544
1612
  func.apply(undefined$1, args);
1545
1613
  }, wait);
1546
1614
  }
@@ -1811,7 +1879,7 @@ var lodash = { exports: {} };
1811
1879
  return true;
1812
1880
  }
1813
1881
  function baseIsNative(value) {
1814
- if (!isObject(value) || isMasked(value)) {
1882
+ if (!isObject2(value) || isMasked(value)) {
1815
1883
  return false;
1816
1884
  }
1817
1885
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
@@ -1851,7 +1919,7 @@ var lodash = { exports: {} };
1851
1919
  return result2;
1852
1920
  }
1853
1921
  function baseKeysIn(object) {
1854
- if (!isObject(object)) {
1922
+ if (!isObject2(object)) {
1855
1923
  return nativeKeysIn(object);
1856
1924
  }
1857
1925
  var isProto = isPrototype(object), result2 = [];
@@ -1896,7 +1964,7 @@ var lodash = { exports: {} };
1896
1964
  }
1897
1965
  baseFor(source, function(srcValue, key) {
1898
1966
  stack || (stack = new Stack());
1899
- if (isObject(srcValue)) {
1967
+ if (isObject2(srcValue)) {
1900
1968
  baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
1901
1969
  } else {
1902
1970
  var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
@@ -1936,7 +2004,7 @@ var lodash = { exports: {} };
1936
2004
  newValue = objValue;
1937
2005
  if (isArguments(objValue)) {
1938
2006
  newValue = toPlainObject(objValue);
1939
- } else if (!isObject(objValue) || isFunction(objValue)) {
2007
+ } else if (!isObject2(objValue) || isFunction(objValue)) {
1940
2008
  newValue = initCloneObject(srcValue);
1941
2009
  }
1942
2010
  } else {
@@ -2075,7 +2143,7 @@ var lodash = { exports: {} };
2075
2143
  return shuffleSelf(array, baseClamp(n, 0, array.length));
2076
2144
  }
2077
2145
  function baseSet(object, path, value, customizer) {
2078
- if (!isObject(object)) {
2146
+ if (!isObject2(object)) {
2079
2147
  return object;
2080
2148
  }
2081
2149
  path = castPath(path, object);
@@ -2089,7 +2157,7 @@ var lodash = { exports: {} };
2089
2157
  var objValue = nested[key];
2090
2158
  newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
2091
2159
  if (newValue === undefined$1) {
2092
- newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
2160
+ newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
2093
2161
  }
2094
2162
  }
2095
2163
  assignValue(nested, key, newValue);
@@ -2320,7 +2388,7 @@ var lodash = { exports: {} };
2320
2388
  end = end === undefined$1 ? length : end;
2321
2389
  return !start && end >= length ? array : baseSlice(array, start, end);
2322
2390
  }
2323
- var clearTimeout = ctxClearTimeout || function(id) {
2391
+ var clearTimeout2 = ctxClearTimeout || function(id) {
2324
2392
  return root.clearTimeout(id);
2325
2393
  };
2326
2394
  function cloneBuffer(buffer, isDeep) {
@@ -2539,7 +2607,7 @@ var lodash = { exports: {} };
2539
2607
  return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
2540
2608
  }
2541
2609
  var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
2542
- return isObject(result2) ? result2 : thisBinding;
2610
+ return isObject2(result2) ? result2 : thisBinding;
2543
2611
  };
2544
2612
  }
2545
2613
  function createCurry(func, bitmask, arity) {
@@ -2853,7 +2921,7 @@ var lodash = { exports: {} };
2853
2921
  return objValue;
2854
2922
  }
2855
2923
  function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
2856
- if (isObject(objValue) && isObject(srcValue)) {
2924
+ if (isObject2(objValue) && isObject2(srcValue)) {
2857
2925
  stack.set(srcValue, objValue);
2858
2926
  baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
2859
2927
  stack["delete"](srcValue);
@@ -3201,7 +3269,7 @@ var lodash = { exports: {} };
3201
3269
  return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3202
3270
  }
3203
3271
  function isIterateeCall(value, index2, object) {
3204
- if (!isObject(object)) {
3272
+ if (!isObject2(object)) {
3205
3273
  return false;
3206
3274
  }
3207
3275
  var type = typeof index2;
@@ -3244,7 +3312,7 @@ var lodash = { exports: {} };
3244
3312
  return value === proto;
3245
3313
  }
3246
3314
  function isStrictComparable(value) {
3247
- return value === value && !isObject(value);
3315
+ return value === value && !isObject2(value);
3248
3316
  }
3249
3317
  function matchesStrictComparable(key, srcValue) {
3250
3318
  return function(object) {
@@ -3349,7 +3417,7 @@ var lodash = { exports: {} };
3349
3417
  return object[key];
3350
3418
  }
3351
3419
  var setData = shortOut(baseSetData);
3352
- var setTimeout = ctxSetTimeout || function(func, wait) {
3420
+ var setTimeout2 = ctxSetTimeout || function(func, wait) {
3353
3421
  return root.setTimeout(func, wait);
3354
3422
  };
3355
3423
  var setToString = shortOut(baseSetToString);
@@ -4126,7 +4194,7 @@ var lodash = { exports: {} };
4126
4194
  throw new TypeError2(FUNC_ERROR_TEXT);
4127
4195
  }
4128
4196
  wait = toNumber(wait) || 0;
4129
- if (isObject(options)) {
4197
+ if (isObject2(options)) {
4130
4198
  leading = !!options.leading;
4131
4199
  maxing = "maxWait" in options;
4132
4200
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -4141,7 +4209,7 @@ var lodash = { exports: {} };
4141
4209
  }
4142
4210
  function leadingEdge(time) {
4143
4211
  lastInvokeTime = time;
4144
- timerId = setTimeout(timerExpired, wait);
4212
+ timerId = setTimeout2(timerExpired, wait);
4145
4213
  return leading ? invokeFunc(time) : result2;
4146
4214
  }
4147
4215
  function remainingWait(time) {
@@ -4157,7 +4225,7 @@ var lodash = { exports: {} };
4157
4225
  if (shouldInvoke(time)) {
4158
4226
  return trailingEdge(time);
4159
4227
  }
4160
- timerId = setTimeout(timerExpired, remainingWait(time));
4228
+ timerId = setTimeout2(timerExpired, remainingWait(time));
4161
4229
  }
4162
4230
  function trailingEdge(time) {
4163
4231
  timerId = undefined$1;
@@ -4169,7 +4237,7 @@ var lodash = { exports: {} };
4169
4237
  }
4170
4238
  function cancel() {
4171
4239
  if (timerId !== undefined$1) {
4172
- clearTimeout(timerId);
4240
+ clearTimeout2(timerId);
4173
4241
  }
4174
4242
  lastInvokeTime = 0;
4175
4243
  lastArgs = lastCallTime = lastThis = timerId = undefined$1;
@@ -4187,13 +4255,13 @@ var lodash = { exports: {} };
4187
4255
  return leadingEdge(lastCallTime);
4188
4256
  }
4189
4257
  if (maxing) {
4190
- clearTimeout(timerId);
4191
- timerId = setTimeout(timerExpired, wait);
4258
+ clearTimeout2(timerId);
4259
+ timerId = setTimeout2(timerExpired, wait);
4192
4260
  return invokeFunc(lastCallTime);
4193
4261
  }
4194
4262
  }
4195
4263
  if (timerId === undefined$1) {
4196
- timerId = setTimeout(timerExpired, wait);
4264
+ timerId = setTimeout2(timerExpired, wait);
4197
4265
  }
4198
4266
  return result2;
4199
4267
  }
@@ -4296,7 +4364,7 @@ var lodash = { exports: {} };
4296
4364
  if (typeof func != "function") {
4297
4365
  throw new TypeError2(FUNC_ERROR_TEXT);
4298
4366
  }
4299
- if (isObject(options)) {
4367
+ if (isObject2(options)) {
4300
4368
  leading = "leading" in options ? !!options.leading : leading;
4301
4369
  trailing = "trailing" in options ? !!options.trailing : trailing;
4302
4370
  }
@@ -4404,7 +4472,7 @@ var lodash = { exports: {} };
4404
4472
  return typeof value == "number" && nativeIsFinite(value);
4405
4473
  }
4406
4474
  function isFunction(value) {
4407
- if (!isObject(value)) {
4475
+ if (!isObject2(value)) {
4408
4476
  return false;
4409
4477
  }
4410
4478
  var tag = baseGetTag(value);
@@ -4416,7 +4484,7 @@ var lodash = { exports: {} };
4416
4484
  function isLength(value) {
4417
4485
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
4418
4486
  }
4419
- function isObject(value) {
4487
+ function isObject2(value) {
4420
4488
  var type = typeof value;
4421
4489
  return value != null && (type == "object" || type == "function");
4422
4490
  }
@@ -4523,9 +4591,9 @@ var lodash = { exports: {} };
4523
4591
  if (isSymbol(value)) {
4524
4592
  return NAN;
4525
4593
  }
4526
- if (isObject(value)) {
4594
+ if (isObject2(value)) {
4527
4595
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
4528
- value = isObject(other) ? other + "" : other;
4596
+ value = isObject2(other) ? other + "" : other;
4529
4597
  }
4530
4598
  if (typeof value != "string") {
4531
4599
  return value === 0 ? value : +value;
@@ -4746,7 +4814,7 @@ var lodash = { exports: {} };
4746
4814
  var Ctor = object && object.constructor;
4747
4815
  if (isArrLike) {
4748
4816
  accumulator = isArr ? new Ctor() : [];
4749
- } else if (isObject(object)) {
4817
+ } else if (isObject2(object)) {
4750
4818
  accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
4751
4819
  } else {
4752
4820
  accumulator = {};
@@ -5028,7 +5096,7 @@ var lodash = { exports: {} };
5028
5096
  }
5029
5097
  function truncate(string, options) {
5030
5098
  var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
5031
- if (isObject(options)) {
5099
+ if (isObject2(options)) {
5032
5100
  var separator = "separator" in options ? options.separator : separator;
5033
5101
  length = "length" in options ? toInteger(options.length) : length;
5034
5102
  omission = "omission" in options ? baseToString(options.omission) : omission;
@@ -5158,13 +5226,13 @@ var lodash = { exports: {} };
5158
5226
  });
5159
5227
  function mixin(object, source, options) {
5160
5228
  var props = keys(source), methodNames = baseFunctions(source, props);
5161
- if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
5229
+ if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
5162
5230
  options = source;
5163
5231
  source = object;
5164
5232
  object = this;
5165
5233
  methodNames = baseFunctions(source, keys(source));
5166
5234
  }
5167
- var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
5235
+ var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
5168
5236
  arrayEach(methodNames, function(methodName) {
5169
5237
  var func = source[methodName];
5170
5238
  object[methodName] = func;
@@ -5510,7 +5578,7 @@ var lodash = { exports: {} };
5510
5578
  lodash2.isNil = isNil;
5511
5579
  lodash2.isNull = isNull;
5512
5580
  lodash2.isNumber = isNumber;
5513
- lodash2.isObject = isObject;
5581
+ lodash2.isObject = isObject2;
5514
5582
  lodash2.isObjectLike = isObjectLike;
5515
5583
  lodash2.isPlainObject = isPlainObject;
5516
5584
  lodash2.isRegExp = isRegExp;
@@ -5779,7 +5847,7 @@ const TransformOriginMap = {
5779
5847
  right: "-8px 50%"
5780
5848
  };
5781
5849
  function useTooltip(origin, props) {
5782
- const { position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
5850
+ const { position, mouseEnterDelay, mouseLeaveDelay, enterable, disabled, hideAfter } = toRefs(props);
5783
5851
  const visible = ref(false);
5784
5852
  const isEnter = ref(false);
5785
5853
  const positionArr = computed(() => typeof position.value === "string" ? [position.value] : position.value);
@@ -5794,6 +5862,9 @@ function useTooltip(origin, props) {
5794
5862
  !isEnter.value && (visible.value = false);
5795
5863
  }, mouseLeaveDelay.value);
5796
5864
  const onMouseenter = () => {
5865
+ if (disabled.value) {
5866
+ return;
5867
+ }
5797
5868
  isEnter.value = true;
5798
5869
  enter();
5799
5870
  };
@@ -5804,11 +5875,29 @@ function useTooltip(origin, props) {
5804
5875
  const onPositionChange = (pos) => {
5805
5876
  placement.value = pos;
5806
5877
  };
5878
+ const quickLeave = () => {
5879
+ isEnter.value = false;
5880
+ visible.value = false;
5881
+ };
5882
+ const onMouseenterOverlay = () => {
5883
+ if (!enterable.value) {
5884
+ quickLeave();
5885
+ } else {
5886
+ onMouseenter();
5887
+ }
5888
+ };
5807
5889
  onMounted(() => {
5808
5890
  origin.value.addEventListener("mouseenter", onMouseenter);
5809
5891
  origin.value.addEventListener("mouseleave", onMouseleave);
5810
5892
  });
5811
- return { visible, placement, positionArr, overlayStyles, onPositionChange, onMouseenter, onMouseleave };
5893
+ let timer;
5894
+ watch(visible, (newVal) => {
5895
+ if (newVal && hideAfter.value) {
5896
+ timer && clearTimeout(timer);
5897
+ timer = setTimeout(quickLeave, hideAfter.value);
5898
+ }
5899
+ });
5900
+ return { visible, placement, positionArr, overlayStyles, onPositionChange, onMouseenter, onMouseleave, onMouseenterOverlay };
5812
5901
  }
5813
5902
  var tooltip = "";
5814
5903
  var DToolTip = defineComponent({
@@ -5829,42 +5918,42 @@ var DToolTip = defineComponent({
5829
5918
  positionArr,
5830
5919
  overlayStyles,
5831
5920
  onPositionChange,
5832
- onMouseenter,
5833
- onMouseleave
5921
+ onMouseleave,
5922
+ onMouseenterOverlay
5834
5923
  } = useTooltip(origin, props);
5835
- const ns = useNamespace("tooltip");
5836
- return () => {
5837
- var _a;
5838
- return createVNode(Fragment, null, [createVNode("div", {
5839
- "ref": origin,
5840
- "class": ns.e("reference")
5841
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode(Teleport, {
5842
- "to": "body"
5924
+ const ns2 = useNamespace("tooltip");
5925
+ provide(POPPER_TRIGGER_TOKEN, origin);
5926
+ return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
5927
+ default: () => {
5928
+ var _a;
5929
+ return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
5930
+ }
5931
+ }), createVNode(Teleport, {
5932
+ "to": "body"
5933
+ }, {
5934
+ default: () => [createVNode(Transition, {
5935
+ "name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
5843
5936
  }, {
5844
- default: () => [createVNode(Transition, {
5845
- "name": showAnimation.value ? `devui-tooltip-fade-${placement.value}` : ""
5937
+ default: () => [createVNode(FlexibleOverlay, {
5938
+ "modelValue": visible.value,
5939
+ "onUpdate:modelValue": ($event) => visible.value = $event,
5940
+ "ref": tooltipRef,
5941
+ "class": ns2.b(),
5942
+ "origin": origin.value,
5943
+ "position": positionArr.value,
5944
+ "offset": 6,
5945
+ "show-arrow": true,
5946
+ "style": overlayStyles.value,
5947
+ "onPositionChange": onPositionChange,
5948
+ "onMouseenter": onMouseenterOverlay,
5949
+ "onMouseleave": onMouseleave
5846
5950
  }, {
5847
- default: () => [createVNode(FlexibleOverlay, {
5848
- "modelValue": visible.value,
5849
- "onUpdate:modelValue": ($event) => visible.value = $event,
5850
- "ref": tooltipRef,
5851
- "class": ns.b(),
5852
- "origin": origin.value,
5853
- "position": positionArr.value,
5854
- "offset": 6,
5855
- "show-arrow": true,
5856
- "style": overlayStyles.value,
5857
- "onPositionChange": onPositionChange,
5858
- "onMouseenter": onMouseenter,
5859
- "onMouseleave": onMouseleave
5860
- }, {
5861
- default: () => [createVNode("span", {
5862
- "innerHTML": content.value
5863
- }, null)]
5864
- })]
5951
+ default: () => [createVNode("span", {
5952
+ "innerHTML": content.value
5953
+ }, null)]
5865
5954
  })]
5866
- })]);
5867
- };
5955
+ })]
5956
+ })]);
5868
5957
  }
5869
5958
  });
5870
5959
  function setStyle(element, style) {
@@ -5984,10 +6073,10 @@ var DSplitterBar = defineComponent({
5984
6073
  },
5985
6074
  props: splitterBarProps,
5986
6075
  setup(props) {
5987
- const ns = useNamespace("splitter");
6076
+ const ns2 = useNamespace("splitter");
5988
6077
  const store = inject("splitterStore");
5989
6078
  const state = reactive({
5990
- wrapperClass: `${ns.e("bar")} ${ns.em("bar", props.orientation)} `
6079
+ wrapperClass: `${ns2.e("bar")} ${ns2.em("bar", props.orientation)} `
5991
6080
  });
5992
6081
  const domRef = ref();
5993
6082
  watch([() => props.splitBarSize, domRef], ([curSplitBarSize, ele]) => {
@@ -6031,7 +6120,7 @@ var DSplitterBar = defineComponent({
6031
6120
  const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
6032
6121
  const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
6033
6122
  return {
6034
- [ns.e("collapse")]: isCollapsible,
6123
+ [ns2.e("collapse")]: isCollapsible,
6035
6124
  collapsed: isCollapsed,
6036
6125
  hidden: isNearPaneCollapsed
6037
6126
  };
@@ -6339,7 +6428,7 @@ var Splitter = defineComponent({
6339
6428
  const state = reactive({
6340
6429
  panes: []
6341
6430
  });
6342
- const ns = useNamespace("splitter");
6431
+ const ns2 = useNamespace("splitter");
6343
6432
  state.panes = ((_b = (_a = ctx.slots).DSplitterPane) == null ? void 0 : _b.call(_a)) || [];
6344
6433
  store.setPanes({
6345
6434
  panes: state.panes
@@ -6380,7 +6469,7 @@ var Splitter = defineComponent({
6380
6469
  orientation,
6381
6470
  showCollapseButton
6382
6471
  } = props;
6383
- const wrapperClass = [ns.b(), ns.m(orientation)];
6472
+ const wrapperClass = [ns2.b(), ns2.m(orientation)];
6384
6473
  return createVNode("div", {
6385
6474
  "class": wrapperClass,
6386
6475
  "ref": domRef
@@ -6444,7 +6533,7 @@ var SplitterPane = defineComponent({
6444
6533
  const store = inject("splitterStore");
6445
6534
  const domRef = ref();
6446
6535
  const orderRef = ref();
6447
- const ns = useNamespace("splitter");
6536
+ const ns2 = useNamespace("splitter");
6448
6537
  watch([orderRef, domRef], ([order, ele]) => {
6449
6538
  if (!ele) {
6450
6539
  return;
@@ -6458,7 +6547,7 @@ var SplitterPane = defineComponent({
6458
6547
  return;
6459
6548
  }
6460
6549
  ele.style.flexBasis = curSize;
6461
- const paneFixedClass = ns.em("pane", "fixed");
6550
+ const paneFixedClass = ns2.em("pane", "fixed");
6462
6551
  if (curSize) {
6463
6552
  addClass(ele, paneFixedClass);
6464
6553
  } else {
@@ -6506,7 +6595,7 @@ var SplitterPane = defineComponent({
6506
6595
  if (!ele) {
6507
6596
  return;
6508
6597
  }
6509
- const paneHiddenClass = ns.em("pane", "hidden");
6598
+ const paneHiddenClass = ns2.em("pane", "hidden");
6510
6599
  if (!collapsed) {
6511
6600
  removeClass(ele, paneHiddenClass);
6512
6601
  } else {
@@ -6530,7 +6619,7 @@ var SplitterPane = defineComponent({
6530
6619
  if (!(ele instanceof HTMLElement)) {
6531
6620
  return;
6532
6621
  }
6533
- const flexGrowClass = ns.em("pane", "grow");
6622
+ const flexGrowClass = ns2.em("pane", "grow");
6534
6623
  if (hasClass(ele, flexGrowClass)) {
6535
6624
  removeClass(ele, flexGrowClass);
6536
6625
  } else if (collapsed) {
@@ -6545,7 +6634,7 @@ var SplitterPane = defineComponent({
6545
6634
  return () => {
6546
6635
  var _a;
6547
6636
  return createVNode("div", {
6548
- "class": ns.e("pane"),
6637
+ "class": ns2.e("pane"),
6549
6638
  "ref": domRef
6550
6639
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
6551
6640
  };