vue-devui 1.0.0-rc.6 → 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 (168) hide show
  1. package/README.md +5 -0
  2. package/alert/index.es.js +37 -11
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +311 -77
  6. package/auto-complete/index.umd.js +3 -5
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +81 -70
  9. package/avatar/index.umd.js +1 -1
  10. package/avatar/style.css +1 -1
  11. package/badge/index.es.js +29 -4
  12. package/badge/index.umd.js +1 -1
  13. package/badge/style.css +1 -1
  14. package/button/index.es.js +5632 -87
  15. package/button/index.umd.js +27 -1
  16. package/button/style.css +1 -1
  17. package/card/index.es.js +56 -29
  18. package/card/index.umd.js +1 -1
  19. package/card/style.css +1 -1
  20. package/checkbox/index.es.js +364 -234
  21. package/checkbox/index.umd.js +1 -1
  22. package/checkbox/style.css +1 -1
  23. package/date-picker/index.es.js +310 -157
  24. package/date-picker/index.umd.js +1 -1
  25. package/date-picker/style.css +1 -1
  26. package/drawer/index.es.js +28 -3
  27. package/drawer/index.umd.js +1 -1
  28. package/drawer/style.css +1 -1
  29. package/dropdown/index.es.js +125 -45
  30. package/dropdown/index.umd.js +1 -1
  31. package/dropdown/style.css +1 -1
  32. package/editable-select/index.es.js +437 -22
  33. package/editable-select/index.umd.js +1 -1
  34. package/editable-select/style.css +1 -1
  35. package/form/index.es.js +490 -605
  36. package/form/index.umd.js +15 -15
  37. package/form/style.css +1 -1
  38. package/fullscreen/index.es.js +29 -5
  39. package/fullscreen/index.umd.js +1 -1
  40. package/fullscreen/style.css +1 -1
  41. package/grid/index.es.js +71 -50
  42. package/grid/index.umd.js +1 -1
  43. package/grid/style.css +1 -1
  44. package/icon/index.es.js +109 -13
  45. package/icon/index.umd.js +1 -1
  46. package/icon/style.css +1 -0
  47. package/image-preview/index.es.js +34 -11
  48. package/image-preview/index.umd.js +1 -1
  49. package/image-preview/style.css +1 -1
  50. package/input/index.es.js +330 -130
  51. package/input/index.umd.js +1 -1
  52. package/input/style.css +1 -1
  53. package/input-number/index.es.js +272 -199
  54. package/input-number/index.umd.js +1 -1
  55. package/input-number/style.css +1 -1
  56. package/layout/index.es.js +34 -6
  57. package/layout/index.umd.js +1 -1
  58. package/layout/style.css +1 -1
  59. package/loading/index.es.js +34 -10
  60. package/loading/index.umd.js +1 -1
  61. package/loading/style.css +1 -1
  62. package/modal/index.es.js +126 -27
  63. package/modal/index.umd.js +1 -1
  64. package/modal/style.css +1 -1
  65. package/notification/index.es.js +125 -25
  66. package/notification/index.umd.js +1 -1
  67. package/notification/style.css +1 -1
  68. package/nuxt/components/ButtonGroup.js +3 -0
  69. package/nuxt/components/CheckboxButton.js +3 -0
  70. package/nuxt/components/CheckboxGroup.js +3 -0
  71. package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
  72. package/nuxt/components/FORM_TOKEN.js +3 -0
  73. package/nuxt/components/Icon.js +1 -0
  74. package/nuxt/components/LABEL_DATA.js +3 -0
  75. package/nuxt/components/Option.js +3 -0
  76. package/nuxt/components/buttonGroupInjectionKey.js +3 -0
  77. package/nuxt/components/buttonGroupProps.js +3 -0
  78. package/nuxt/components/formControlProps.js +3 -0
  79. package/nuxt/components/formItemProps.js +3 -0
  80. package/nuxt/components/formProps.js +3 -0
  81. package/nuxt/components/iconProps.js +1 -0
  82. package/nuxt/components/svgIconProps.js +3 -0
  83. package/overlay/index.es.js +31 -9
  84. package/overlay/index.umd.js +1 -1
  85. package/overlay/style.css +1 -1
  86. package/package.json +2 -1
  87. package/pagination/index.es.js +135 -124
  88. package/pagination/index.umd.js +1 -1
  89. package/pagination/style.css +1 -1
  90. package/popover/index.es.js +198 -83
  91. package/popover/index.umd.js +16 -16
  92. package/popover/style.css +1 -1
  93. package/progress/index.es.js +76 -20
  94. package/progress/index.umd.js +3 -3
  95. package/progress/style.css +1 -1
  96. package/radio/index.es.js +161 -140
  97. package/radio/index.umd.js +1 -1
  98. package/radio/style.css +1 -1
  99. package/rate/index.es.js +48 -16
  100. package/rate/index.umd.js +1 -1
  101. package/rate/style.css +1 -1
  102. package/result/index.es.js +108 -12
  103. package/result/index.umd.js +1 -1
  104. package/result/style.css +1 -1
  105. package/search/index.es.js +379 -167
  106. package/search/index.umd.js +17 -17
  107. package/search/style.css +1 -1
  108. package/select/index.es.js +7339 -556
  109. package/select/index.umd.js +27 -1
  110. package/select/style.css +1 -1
  111. package/skeleton/index.es.js +37 -12
  112. package/skeleton/index.umd.js +1 -1
  113. package/skeleton/style.css +1 -1
  114. package/slider/index.es.js +34 -10
  115. package/slider/index.umd.js +1 -1
  116. package/slider/style.css +1 -1
  117. package/splitter/index.es.js +201 -84
  118. package/splitter/index.umd.js +14 -14
  119. package/splitter/style.css +1 -1
  120. package/status/index.es.js +26 -2
  121. package/status/index.umd.js +1 -1
  122. package/status/style.css +1 -1
  123. package/style.css +1 -1
  124. package/switch/index.es.js +30 -6
  125. package/switch/index.umd.js +1 -1
  126. package/switch/style.css +1 -1
  127. package/table/index.es.js +6808 -585
  128. package/table/index.umd.js +27 -1
  129. package/table/style.css +1 -1
  130. package/tabs/index.es.js +136 -70
  131. package/tabs/index.umd.js +1 -1
  132. package/tabs/style.css +1 -1
  133. package/tag/index.es.js +31 -7
  134. package/tag/index.umd.js +1 -1
  135. package/tag/style.css +1 -1
  136. package/textarea/index.es.js +5631 -80
  137. package/textarea/index.umd.js +35 -1
  138. package/textarea/style.css +1 -1
  139. package/timeline/index.es.js +108 -12
  140. package/timeline/index.umd.js +1 -1
  141. package/timeline/style.css +1 -1
  142. package/tooltip/index.es.js +190 -74
  143. package/tooltip/index.umd.js +17 -17
  144. package/tooltip/style.css +1 -1
  145. package/tree/index.es.js +376 -256
  146. package/tree/index.umd.js +1 -1
  147. package/tree/style.css +1 -1
  148. package/upload/index.es.js +138 -34
  149. package/upload/index.umd.js +1 -1
  150. package/upload/style.css +1 -1
  151. package/vue-devui.es.js +6770 -5769
  152. package/vue-devui.umd.js +27 -21
  153. package/comment/index.d.ts +0 -7
  154. package/comment/index.es.js +0 -84
  155. package/comment/index.umd.js +0 -1
  156. package/comment/package.json +0 -7
  157. package/comment/style.css +0 -1
  158. package/nuxt/components/Comment.js +0 -3
  159. package/nuxt/components/FormControl.js +0 -3
  160. package/nuxt/components/FormLabel.js +0 -3
  161. package/nuxt/components/ReadTip.js +0 -3
  162. package/nuxt/components/commentProps.js +0 -3
  163. package/nuxt/components/readTipProps.js +0 -3
  164. package/read-tip/index.d.ts +0 -7
  165. package/read-tip/index.es.js +0 -261
  166. package/read-tip/index.umd.js +0 -1
  167. package/read-tip/package.json +0 -7
  168. package/read-tip/style.css +0 -1
@@ -21,21 +21,45 @@ 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
+ function createBem(namespace, element, modifier) {
27
+ let cls = namespace;
28
+ if (element) {
29
+ cls += `__${element}`;
30
+ }
31
+ if (modifier) {
32
+ cls += `--${modifier}`;
33
+ }
34
+ return cls;
35
+ }
36
+ function useNamespace(block, needDot = false) {
37
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
38
+ const b = () => createBem(namespace);
39
+ const e = (element) => element ? createBem(namespace, element) : "";
40
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
41
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
42
+ return {
43
+ b,
44
+ e,
45
+ m,
46
+ em
47
+ };
48
+ }
26
49
  var baseOverlay = "";
27
50
  function _isSlot(s) {
28
51
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
29
52
  }
30
53
  const CommonOverlay = defineComponent({
31
54
  setup(props, ctx) {
55
+ const ns2 = useNamespace("overlay");
32
56
  return () => {
33
57
  let _slot;
34
58
  return createVNode(Teleport, {
35
59
  "to": "#d-overlay-anchor"
36
60
  }, {
37
61
  default: () => [createVNode(Transition, {
38
- "name": "devui-overlay-fade"
62
+ "name": ns2.e("fade")
39
63
  }, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
40
64
  default: () => [_slot]
41
65
  })]
@@ -78,15 +102,12 @@ const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
78
102
  });
79
103
  const overlayEmits = ["update:visible", "backdropClick"];
80
104
  function useOverlayLogic(props, ctx) {
105
+ const ns2 = useNamespace("overlay");
81
106
  const backgroundClass = computed(() => {
82
- return [
83
- "devui-overlay-background",
84
- props.backgroundClass,
85
- !props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
86
- ];
107
+ return [ns2.e("background"), props.backgroundClass, !props.hasBackdrop ? ns2.em("background", "disabled") : ns2.em("background", "color")];
87
108
  });
88
109
  const overlayClass = computed(() => {
89
- return "devui-overlay";
110
+ return ns2.b();
90
111
  });
91
112
  const handleBackdropClick = (event) => {
92
113
  var _a;
@@ -296,6 +317,7 @@ const FlexibleOverlay = defineComponent({
296
317
  emit,
297
318
  expose
298
319
  }) {
320
+ const ns2 = useNamespace("flexible-overlay");
299
321
  const {
300
322
  arrowRef,
301
323
  overlayRef,
@@ -308,14 +330,70 @@ const FlexibleOverlay = defineComponent({
308
330
  var _a;
309
331
  return props.modelValue && createVNode("div", mergeProps({
310
332
  "ref": overlayRef,
311
- "class": "devui-flexible-overlay"
333
+ "class": ns2.b()
312
334
  }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
313
335
  "ref": arrowRef,
314
- "class": "devui-flexible-overlay-arrow"
336
+ "class": ns2.e("arrow")
315
337
  }, null)]);
316
338
  };
317
339
  }
318
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
+ });
319
397
  const tooltipProps = {
320
398
  content: {
321
399
  type: String,
@@ -336,6 +414,18 @@ const tooltipProps = {
336
414
  mouseLeaveDelay: {
337
415
  type: Number,
338
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
339
429
  }
340
430
  };
341
431
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -1049,7 +1139,7 @@ var lodash = { exports: {} };
1049
1139
  var objectCtorString = funcToString.call(Object2);
1050
1140
  var oldDash = root._;
1051
1141
  var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1052
- 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;
1053
1143
  var defineProperty = function() {
1054
1144
  try {
1055
1145
  var func = getNative(Object2, "defineProperty");
@@ -1064,7 +1154,7 @@ var lodash = { exports: {} };
1064
1154
  var metaMap = WeakMap2 && new WeakMap2();
1065
1155
  var realNames = {};
1066
1156
  var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
1067
- 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;
1068
1158
  function lodash2(value) {
1069
1159
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
1070
1160
  if (value instanceof LodashWrapper) {
@@ -1080,7 +1170,7 @@ var lodash = { exports: {} };
1080
1170
  function object() {
1081
1171
  }
1082
1172
  return function(proto) {
1083
- if (!isObject(proto)) {
1173
+ if (!isObject2(proto)) {
1084
1174
  return {};
1085
1175
  }
1086
1176
  if (objectCreate) {
@@ -1442,7 +1532,7 @@ var lodash = { exports: {} };
1442
1532
  if (result2 !== undefined$1) {
1443
1533
  return result2;
1444
1534
  }
1445
- if (!isObject(value)) {
1535
+ if (!isObject2(value)) {
1446
1536
  return value;
1447
1537
  }
1448
1538
  var isArr = isArray(value);
@@ -1518,7 +1608,7 @@ var lodash = { exports: {} };
1518
1608
  if (typeof func != "function") {
1519
1609
  throw new TypeError2(FUNC_ERROR_TEXT);
1520
1610
  }
1521
- return setTimeout(function() {
1611
+ return setTimeout2(function() {
1522
1612
  func.apply(undefined$1, args);
1523
1613
  }, wait);
1524
1614
  }
@@ -1789,7 +1879,7 @@ var lodash = { exports: {} };
1789
1879
  return true;
1790
1880
  }
1791
1881
  function baseIsNative(value) {
1792
- if (!isObject(value) || isMasked(value)) {
1882
+ if (!isObject2(value) || isMasked(value)) {
1793
1883
  return false;
1794
1884
  }
1795
1885
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
@@ -1829,7 +1919,7 @@ var lodash = { exports: {} };
1829
1919
  return result2;
1830
1920
  }
1831
1921
  function baseKeysIn(object) {
1832
- if (!isObject(object)) {
1922
+ if (!isObject2(object)) {
1833
1923
  return nativeKeysIn(object);
1834
1924
  }
1835
1925
  var isProto = isPrototype(object), result2 = [];
@@ -1874,7 +1964,7 @@ var lodash = { exports: {} };
1874
1964
  }
1875
1965
  baseFor(source, function(srcValue, key) {
1876
1966
  stack || (stack = new Stack());
1877
- if (isObject(srcValue)) {
1967
+ if (isObject2(srcValue)) {
1878
1968
  baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
1879
1969
  } else {
1880
1970
  var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
@@ -1914,7 +2004,7 @@ var lodash = { exports: {} };
1914
2004
  newValue = objValue;
1915
2005
  if (isArguments(objValue)) {
1916
2006
  newValue = toPlainObject(objValue);
1917
- } else if (!isObject(objValue) || isFunction(objValue)) {
2007
+ } else if (!isObject2(objValue) || isFunction(objValue)) {
1918
2008
  newValue = initCloneObject(srcValue);
1919
2009
  }
1920
2010
  } else {
@@ -2053,7 +2143,7 @@ var lodash = { exports: {} };
2053
2143
  return shuffleSelf(array, baseClamp(n, 0, array.length));
2054
2144
  }
2055
2145
  function baseSet(object, path, value, customizer) {
2056
- if (!isObject(object)) {
2146
+ if (!isObject2(object)) {
2057
2147
  return object;
2058
2148
  }
2059
2149
  path = castPath(path, object);
@@ -2067,7 +2157,7 @@ var lodash = { exports: {} };
2067
2157
  var objValue = nested[key];
2068
2158
  newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
2069
2159
  if (newValue === undefined$1) {
2070
- newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
2160
+ newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
2071
2161
  }
2072
2162
  }
2073
2163
  assignValue(nested, key, newValue);
@@ -2298,7 +2388,7 @@ var lodash = { exports: {} };
2298
2388
  end = end === undefined$1 ? length : end;
2299
2389
  return !start && end >= length ? array : baseSlice(array, start, end);
2300
2390
  }
2301
- var clearTimeout = ctxClearTimeout || function(id) {
2391
+ var clearTimeout2 = ctxClearTimeout || function(id) {
2302
2392
  return root.clearTimeout(id);
2303
2393
  };
2304
2394
  function cloneBuffer(buffer, isDeep) {
@@ -2517,7 +2607,7 @@ var lodash = { exports: {} };
2517
2607
  return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
2518
2608
  }
2519
2609
  var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
2520
- return isObject(result2) ? result2 : thisBinding;
2610
+ return isObject2(result2) ? result2 : thisBinding;
2521
2611
  };
2522
2612
  }
2523
2613
  function createCurry(func, bitmask, arity) {
@@ -2831,7 +2921,7 @@ var lodash = { exports: {} };
2831
2921
  return objValue;
2832
2922
  }
2833
2923
  function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
2834
- if (isObject(objValue) && isObject(srcValue)) {
2924
+ if (isObject2(objValue) && isObject2(srcValue)) {
2835
2925
  stack.set(srcValue, objValue);
2836
2926
  baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
2837
2927
  stack["delete"](srcValue);
@@ -3179,7 +3269,7 @@ var lodash = { exports: {} };
3179
3269
  return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3180
3270
  }
3181
3271
  function isIterateeCall(value, index2, object) {
3182
- if (!isObject(object)) {
3272
+ if (!isObject2(object)) {
3183
3273
  return false;
3184
3274
  }
3185
3275
  var type = typeof index2;
@@ -3222,7 +3312,7 @@ var lodash = { exports: {} };
3222
3312
  return value === proto;
3223
3313
  }
3224
3314
  function isStrictComparable(value) {
3225
- return value === value && !isObject(value);
3315
+ return value === value && !isObject2(value);
3226
3316
  }
3227
3317
  function matchesStrictComparable(key, srcValue) {
3228
3318
  return function(object) {
@@ -3327,7 +3417,7 @@ var lodash = { exports: {} };
3327
3417
  return object[key];
3328
3418
  }
3329
3419
  var setData = shortOut(baseSetData);
3330
- var setTimeout = ctxSetTimeout || function(func, wait) {
3420
+ var setTimeout2 = ctxSetTimeout || function(func, wait) {
3331
3421
  return root.setTimeout(func, wait);
3332
3422
  };
3333
3423
  var setToString = shortOut(baseSetToString);
@@ -4104,7 +4194,7 @@ var lodash = { exports: {} };
4104
4194
  throw new TypeError2(FUNC_ERROR_TEXT);
4105
4195
  }
4106
4196
  wait = toNumber(wait) || 0;
4107
- if (isObject(options)) {
4197
+ if (isObject2(options)) {
4108
4198
  leading = !!options.leading;
4109
4199
  maxing = "maxWait" in options;
4110
4200
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -4119,7 +4209,7 @@ var lodash = { exports: {} };
4119
4209
  }
4120
4210
  function leadingEdge(time) {
4121
4211
  lastInvokeTime = time;
4122
- timerId = setTimeout(timerExpired, wait);
4212
+ timerId = setTimeout2(timerExpired, wait);
4123
4213
  return leading ? invokeFunc(time) : result2;
4124
4214
  }
4125
4215
  function remainingWait(time) {
@@ -4135,7 +4225,7 @@ var lodash = { exports: {} };
4135
4225
  if (shouldInvoke(time)) {
4136
4226
  return trailingEdge(time);
4137
4227
  }
4138
- timerId = setTimeout(timerExpired, remainingWait(time));
4228
+ timerId = setTimeout2(timerExpired, remainingWait(time));
4139
4229
  }
4140
4230
  function trailingEdge(time) {
4141
4231
  timerId = undefined$1;
@@ -4147,7 +4237,7 @@ var lodash = { exports: {} };
4147
4237
  }
4148
4238
  function cancel() {
4149
4239
  if (timerId !== undefined$1) {
4150
- clearTimeout(timerId);
4240
+ clearTimeout2(timerId);
4151
4241
  }
4152
4242
  lastInvokeTime = 0;
4153
4243
  lastArgs = lastCallTime = lastThis = timerId = undefined$1;
@@ -4165,13 +4255,13 @@ var lodash = { exports: {} };
4165
4255
  return leadingEdge(lastCallTime);
4166
4256
  }
4167
4257
  if (maxing) {
4168
- clearTimeout(timerId);
4169
- timerId = setTimeout(timerExpired, wait);
4258
+ clearTimeout2(timerId);
4259
+ timerId = setTimeout2(timerExpired, wait);
4170
4260
  return invokeFunc(lastCallTime);
4171
4261
  }
4172
4262
  }
4173
4263
  if (timerId === undefined$1) {
4174
- timerId = setTimeout(timerExpired, wait);
4264
+ timerId = setTimeout2(timerExpired, wait);
4175
4265
  }
4176
4266
  return result2;
4177
4267
  }
@@ -4274,7 +4364,7 @@ var lodash = { exports: {} };
4274
4364
  if (typeof func != "function") {
4275
4365
  throw new TypeError2(FUNC_ERROR_TEXT);
4276
4366
  }
4277
- if (isObject(options)) {
4367
+ if (isObject2(options)) {
4278
4368
  leading = "leading" in options ? !!options.leading : leading;
4279
4369
  trailing = "trailing" in options ? !!options.trailing : trailing;
4280
4370
  }
@@ -4382,7 +4472,7 @@ var lodash = { exports: {} };
4382
4472
  return typeof value == "number" && nativeIsFinite(value);
4383
4473
  }
4384
4474
  function isFunction(value) {
4385
- if (!isObject(value)) {
4475
+ if (!isObject2(value)) {
4386
4476
  return false;
4387
4477
  }
4388
4478
  var tag = baseGetTag(value);
@@ -4394,7 +4484,7 @@ var lodash = { exports: {} };
4394
4484
  function isLength(value) {
4395
4485
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
4396
4486
  }
4397
- function isObject(value) {
4487
+ function isObject2(value) {
4398
4488
  var type = typeof value;
4399
4489
  return value != null && (type == "object" || type == "function");
4400
4490
  }
@@ -4501,9 +4591,9 @@ var lodash = { exports: {} };
4501
4591
  if (isSymbol(value)) {
4502
4592
  return NAN;
4503
4593
  }
4504
- if (isObject(value)) {
4594
+ if (isObject2(value)) {
4505
4595
  var other = typeof value.valueOf == "function" ? value.valueOf() : value;
4506
- value = isObject(other) ? other + "" : other;
4596
+ value = isObject2(other) ? other + "" : other;
4507
4597
  }
4508
4598
  if (typeof value != "string") {
4509
4599
  return value === 0 ? value : +value;
@@ -4724,7 +4814,7 @@ var lodash = { exports: {} };
4724
4814
  var Ctor = object && object.constructor;
4725
4815
  if (isArrLike) {
4726
4816
  accumulator = isArr ? new Ctor() : [];
4727
- } else if (isObject(object)) {
4817
+ } else if (isObject2(object)) {
4728
4818
  accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
4729
4819
  } else {
4730
4820
  accumulator = {};
@@ -5006,7 +5096,7 @@ var lodash = { exports: {} };
5006
5096
  }
5007
5097
  function truncate(string, options) {
5008
5098
  var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
5009
- if (isObject(options)) {
5099
+ if (isObject2(options)) {
5010
5100
  var separator = "separator" in options ? options.separator : separator;
5011
5101
  length = "length" in options ? toInteger(options.length) : length;
5012
5102
  omission = "omission" in options ? baseToString(options.omission) : omission;
@@ -5136,13 +5226,13 @@ var lodash = { exports: {} };
5136
5226
  });
5137
5227
  function mixin(object, source, options) {
5138
5228
  var props = keys(source), methodNames = baseFunctions(source, props);
5139
- if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
5229
+ if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
5140
5230
  options = source;
5141
5231
  source = object;
5142
5232
  object = this;
5143
5233
  methodNames = baseFunctions(source, keys(source));
5144
5234
  }
5145
- 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);
5146
5236
  arrayEach(methodNames, function(methodName) {
5147
5237
  var func = source[methodName];
5148
5238
  object[methodName] = func;
@@ -5488,7 +5578,7 @@ var lodash = { exports: {} };
5488
5578
  lodash2.isNil = isNil;
5489
5579
  lodash2.isNull = isNull;
5490
5580
  lodash2.isNumber = isNumber;
5491
- lodash2.isObject = isObject;
5581
+ lodash2.isObject = isObject2;
5492
5582
  lodash2.isObjectLike = isObjectLike;
5493
5583
  lodash2.isPlainObject = isPlainObject;
5494
5584
  lodash2.isRegExp = isRegExp;
@@ -5757,7 +5847,7 @@ const TransformOriginMap = {
5757
5847
  right: "-8px 50%"
5758
5848
  };
5759
5849
  function useTooltip(origin, props) {
5760
- const { position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
5850
+ const { position, mouseEnterDelay, mouseLeaveDelay, enterable, disabled, hideAfter } = toRefs(props);
5761
5851
  const visible = ref(false);
5762
5852
  const isEnter = ref(false);
5763
5853
  const positionArr = computed(() => typeof position.value === "string" ? [position.value] : position.value);
@@ -5772,6 +5862,9 @@ function useTooltip(origin, props) {
5772
5862
  !isEnter.value && (visible.value = false);
5773
5863
  }, mouseLeaveDelay.value);
5774
5864
  const onMouseenter = () => {
5865
+ if (disabled.value) {
5866
+ return;
5867
+ }
5775
5868
  isEnter.value = true;
5776
5869
  enter();
5777
5870
  };
@@ -5782,11 +5875,29 @@ function useTooltip(origin, props) {
5782
5875
  const onPositionChange = (pos) => {
5783
5876
  placement.value = pos;
5784
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
+ };
5785
5889
  onMounted(() => {
5786
5890
  origin.value.addEventListener("mouseenter", onMouseenter);
5787
5891
  origin.value.addEventListener("mouseleave", onMouseleave);
5788
5892
  });
5789
- return { visible, placement, positionArr, overlayStyles, onPositionChange };
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 };
5790
5901
  }
5791
5902
  var tooltip = "";
5792
5903
  var DToolTip = defineComponent({
@@ -5806,38 +5917,43 @@ var DToolTip = defineComponent({
5806
5917
  placement,
5807
5918
  positionArr,
5808
5919
  overlayStyles,
5809
- onPositionChange
5920
+ onPositionChange,
5921
+ onMouseleave,
5922
+ onMouseenterOverlay
5810
5923
  } = useTooltip(origin, props);
5811
- return () => {
5812
- var _a;
5813
- return createVNode(Fragment, null, [createVNode("div", {
5814
- "ref": origin,
5815
- "class": "devui-tooltip-reference"
5816
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode(Teleport, {
5817
- "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}`) : ""
5818
5936
  }, {
5819
- default: () => [createVNode(Transition, {
5820
- "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
5821
5950
  }, {
5822
- default: () => [createVNode(FlexibleOverlay, {
5823
- "modelValue": visible.value,
5824
- "onUpdate:modelValue": ($event) => visible.value = $event,
5825
- "ref": tooltipRef,
5826
- "class": "devui-tooltip",
5827
- "origin": origin.value,
5828
- "position": positionArr.value,
5829
- "offset": 6,
5830
- "show-arrow": true,
5831
- "style": overlayStyles.value,
5832
- "onPositionChange": onPositionChange
5833
- }, {
5834
- default: () => [createVNode("span", {
5835
- "innerHTML": content.value
5836
- }, null)]
5837
- })]
5951
+ default: () => [createVNode("span", {
5952
+ "innerHTML": content.value
5953
+ }, null)]
5838
5954
  })]
5839
- })]);
5840
- };
5955
+ })]
5956
+ })]);
5841
5957
  }
5842
5958
  });
5843
5959
  function setStyle(element, style) {
@@ -5957,9 +6073,10 @@ var DSplitterBar = defineComponent({
5957
6073
  },
5958
6074
  props: splitterBarProps,
5959
6075
  setup(props) {
6076
+ const ns2 = useNamespace("splitter");
5960
6077
  const store = inject("splitterStore");
5961
6078
  const state = reactive({
5962
- wrapperClass: `devui-splitter-bar devui-splitter-bar-${props.orientation}`
6079
+ wrapperClass: `${ns2.e("bar")} ${ns2.em("bar", props.orientation)} `
5963
6080
  });
5964
6081
  const domRef = ref();
5965
6082
  watch([() => props.splitBarSize, domRef], ([curSplitBarSize, ele]) => {
@@ -6003,7 +6120,7 @@ var DSplitterBar = defineComponent({
6003
6120
  const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
6004
6121
  const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
6005
6122
  return {
6006
- "devui-collapse": isCollapsible,
6123
+ [ns2.e("collapse")]: isCollapsible,
6007
6124
  collapsed: isCollapsed,
6008
6125
  hidden: isNearPaneCollapsed
6009
6126
  };
@@ -6158,9 +6275,7 @@ var DSplitterBar = defineComponent({
6158
6275
  handleCollapsePrePane();
6159
6276
  }
6160
6277
  }, null)]
6161
- }), createVNode("div", {
6162
- "class": "devui-resize-handle"
6163
- }, null), props.showCollapseButton && createVNode(DToolTip, {
6278
+ }), props.showCollapseButton && createVNode(DToolTip, {
6164
6279
  "content": renderCollapsedTip()
6165
6280
  }, {
6166
6281
  default: () => [createVNode("div", {
@@ -6313,6 +6428,7 @@ var Splitter = defineComponent({
6313
6428
  const state = reactive({
6314
6429
  panes: []
6315
6430
  });
6431
+ const ns2 = useNamespace("splitter");
6316
6432
  state.panes = ((_b = (_a = ctx.slots).DSplitterPane) == null ? void 0 : _b.call(_a)) || [];
6317
6433
  store.setPanes({
6318
6434
  panes: state.panes
@@ -6353,7 +6469,7 @@ var Splitter = defineComponent({
6353
6469
  orientation,
6354
6470
  showCollapseButton
6355
6471
  } = props;
6356
- const wrapperClass = ["devui-splitter", `devui-splitter-${orientation}`];
6472
+ const wrapperClass = [ns2.b(), ns2.m(orientation)];
6357
6473
  return createVNode("div", {
6358
6474
  "class": wrapperClass,
6359
6475
  "ref": domRef
@@ -6417,6 +6533,7 @@ var SplitterPane = defineComponent({
6417
6533
  const store = inject("splitterStore");
6418
6534
  const domRef = ref();
6419
6535
  const orderRef = ref();
6536
+ const ns2 = useNamespace("splitter");
6420
6537
  watch([orderRef, domRef], ([order, ele]) => {
6421
6538
  if (!ele) {
6422
6539
  return;
@@ -6430,7 +6547,7 @@ var SplitterPane = defineComponent({
6430
6547
  return;
6431
6548
  }
6432
6549
  ele.style.flexBasis = curSize;
6433
- const paneFixedClass = "devui-splitter-pane-fixed";
6550
+ const paneFixedClass = ns2.em("pane", "fixed");
6434
6551
  if (curSize) {
6435
6552
  addClass(ele, paneFixedClass);
6436
6553
  } else {
@@ -6478,7 +6595,7 @@ var SplitterPane = defineComponent({
6478
6595
  if (!ele) {
6479
6596
  return;
6480
6597
  }
6481
- const paneHiddenClass = "devui-splitter-pane-hidden";
6598
+ const paneHiddenClass = ns2.em("pane", "hidden");
6482
6599
  if (!collapsed) {
6483
6600
  removeClass(ele, paneHiddenClass);
6484
6601
  } else {
@@ -6502,7 +6619,7 @@ var SplitterPane = defineComponent({
6502
6619
  if (!(ele instanceof HTMLElement)) {
6503
6620
  return;
6504
6621
  }
6505
- const flexGrowClass = "devui-splitter-pane-grow";
6622
+ const flexGrowClass = ns2.em("pane", "grow");
6506
6623
  if (hasClass(ele, flexGrowClass)) {
6507
6624
  removeClass(ele, flexGrowClass);
6508
6625
  } else if (collapsed) {
@@ -6517,7 +6634,7 @@ var SplitterPane = defineComponent({
6517
6634
  return () => {
6518
6635
  var _a;
6519
6636
  return createVNode("div", {
6520
- "class": "devui-splitter-pane",
6637
+ "class": ns2.e("pane"),
6521
6638
  "ref": domRef
6522
6639
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
6523
6640
  };