@iris-ui-kit/vue 0.2.15 → 0.2.17
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.
- package/dist/admin.cjs +34 -7
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +1 -1
- package/dist/{chunk-KIEJL6C6.js → chunk-2ETVCAVL.js} +36 -9
- package/dist/chunk-2ETVCAVL.js.map +1 -0
- package/dist/index.cjs +34 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-KIEJL6C6.js.map +0 -1
package/dist/admin.cjs
CHANGED
|
@@ -381,7 +381,7 @@ var CSS = `
|
|
|
381
381
|
white-space: nowrap;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
:where(.iris-nav-menu--horizontal .iris-nav-menu-item) {
|
|
384
|
+
:where(.iris-nav-menu--horizontal > .iris-nav-menu-group > .iris-nav-menu-item) {
|
|
385
385
|
width: auto;
|
|
386
386
|
padding-inline-start: var(--iris-nav-item-padding-inline);
|
|
387
387
|
}
|
|
@@ -660,6 +660,11 @@ var IrisNavMenu = vue.defineComponent({
|
|
|
660
660
|
state.value = current.filter((item) => item !== key);
|
|
661
661
|
}
|
|
662
662
|
};
|
|
663
|
+
const keepsPointerInside = (container, event) => {
|
|
664
|
+
if (!container || !(container instanceof HTMLElement)) return false;
|
|
665
|
+
const next = event.relatedTarget;
|
|
666
|
+
return !!(next && next instanceof Node && container.contains(next));
|
|
667
|
+
};
|
|
663
668
|
const interactionKeyAtDepth = (keys, depth) => keys.find((key) => core.findNavPath(props.items, key).length === depth + 1);
|
|
664
669
|
const horizontalBranchVisible = (key, depth) => {
|
|
665
670
|
const hoveredAtDepth = interactionKeyAtDepth(hoveredBranches.value, depth);
|
|
@@ -720,8 +725,10 @@ var IrisNavMenu = vue.defineComponent({
|
|
|
720
725
|
onMouseenter: () => {
|
|
721
726
|
if (!node.disabled) hovered.value = node.key;
|
|
722
727
|
},
|
|
723
|
-
onMouseleave: () => {
|
|
724
|
-
if (hovered.value === node.key
|
|
728
|
+
onMouseleave: (event) => {
|
|
729
|
+
if (hovered.value === node.key && !keepsPointerInside(event.currentTarget, event)) {
|
|
730
|
+
hovered.value = null;
|
|
731
|
+
}
|
|
725
732
|
},
|
|
726
733
|
onClick: () => select(branch ? core.firstLeaf(node) : node)
|
|
727
734
|
},
|
|
@@ -766,8 +773,10 @@ var IrisNavMenu = vue.defineComponent({
|
|
|
766
773
|
onMouseenter: () => {
|
|
767
774
|
if (!node.disabled) hovered.value = node.key;
|
|
768
775
|
},
|
|
769
|
-
onMouseleave: () => {
|
|
770
|
-
if (hovered.value === node.key
|
|
776
|
+
onMouseleave: (event) => {
|
|
777
|
+
if (hovered.value === node.key && !keepsPointerInside(event.currentTarget, event)) {
|
|
778
|
+
hovered.value = null;
|
|
779
|
+
}
|
|
771
780
|
},
|
|
772
781
|
onClick: () => branch ? toggle(node.key) : select(node)
|
|
773
782
|
},
|
|
@@ -811,8 +820,26 @@ var IrisNavMenu = vue.defineComponent({
|
|
|
811
820
|
`iris-nav-menu-group--depth-${Math.min(9, depth)}`
|
|
812
821
|
],
|
|
813
822
|
...horizontal ? {
|
|
814
|
-
onMouseenter: () =>
|
|
815
|
-
|
|
823
|
+
onMouseenter: (event) => {
|
|
824
|
+
if (!keepsPointerInside(event.currentTarget, event)) {
|
|
825
|
+
setBranchInteraction(hoveredBranches, node.key, true);
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
onMouseover: (event) => {
|
|
829
|
+
if (!keepsPointerInside(event.currentTarget, event)) {
|
|
830
|
+
setBranchInteraction(hoveredBranches, node.key, true);
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
onMouseout: (event) => {
|
|
834
|
+
if (!keepsPointerInside(event.currentTarget, event)) {
|
|
835
|
+
setBranchInteraction(hoveredBranches, node.key, false);
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
onMouseleave: (event) => {
|
|
839
|
+
if (!keepsPointerInside(event.currentTarget, event)) {
|
|
840
|
+
setBranchInteraction(hoveredBranches, node.key, false);
|
|
841
|
+
}
|
|
842
|
+
},
|
|
816
843
|
onFocusin: () => setBranchInteraction(focusedBranches, node.key, true),
|
|
817
844
|
onFocusout: (event) => {
|
|
818
845
|
const group = event.currentTarget;
|