@varlet/ui 3.20.0 → 3.20.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.20.0",
4
+ "version": "3.20.1",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.20.0",
4
+ "version": "3.20.1",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
package/lib/varlet.cjs.js CHANGED
@@ -5626,6 +5626,7 @@ function usePopover(options) {
5626
5626
  let reference = void 0;
5627
5627
  let enterPopover = false;
5628
5628
  let enterReference = false;
5629
+ let hoverSequence = 0;
5629
5630
  let allowClose = true;
5630
5631
  useEventListener(() => window, "keydown", handleKeydown);
5631
5632
  (0, vue.watch)(() => [
@@ -5695,28 +5696,32 @@ function usePopover(options) {
5695
5696
  function handleReferenceMouseenter() {
5696
5697
  if (options.trigger !== "hover") return;
5697
5698
  enterReference = true;
5699
+ hoverSequence++;
5698
5700
  open();
5699
5701
  }
5700
5702
  function handleReferenceMouseleave() {
5701
5703
  return __async$21(this, null, function* () {
5702
5704
  if (options.trigger !== "hover") return;
5703
5705
  enterReference = false;
5706
+ const currentHoverSequence = ++hoverSequence;
5704
5707
  yield doubleRaf();
5705
- if (enterPopover) return;
5708
+ if (currentHoverSequence !== hoverSequence || enterReference || enterPopover) return;
5706
5709
  close();
5707
5710
  });
5708
5711
  }
5709
5712
  function handlePopoverMouseenter() {
5710
5713
  if (options.trigger !== "hover") return;
5711
5714
  enterPopover = true;
5715
+ hoverSequence++;
5712
5716
  if (options.cascadeOptimization) allowClose = false;
5713
5717
  }
5714
5718
  function handlePopoverMouseleave() {
5715
5719
  return __async$21(this, null, function* () {
5716
5720
  if (options.trigger !== "hover") return;
5717
5721
  enterPopover = false;
5722
+ const currentHoverSequence = ++hoverSequence;
5718
5723
  yield doubleRaf();
5719
- if (enterReference) return;
5724
+ if (currentHoverSequence !== hoverSequence || enterReference || enterPopover) return;
5720
5725
  close();
5721
5726
  });
5722
5727
  }
@@ -32813,7 +32818,7 @@ var _WatermarkComponent = stdin_default$108;
32813
32818
  var stdin_default$102 = stdin_default$108;
32814
32819
  //#endregion
32815
32820
  //#region es/index.bundle.mjs
32816
- var version = "3.20.0";
32821
+ var version = "3.20.1";
32817
32822
  function install(app) {
32818
32823
  stdin_default.install && app.use(stdin_default);
32819
32824
  stdin_default$1.install && app.use(stdin_default$1);