@enos5/enos-vue-default 1.8.13 → 1.8.15
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/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './styles.css';
|
|
2
|
-
import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-
|
|
2
|
+
import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-DGM-XlRe.js";
|
|
3
3
|
export {
|
|
4
4
|
_ as ActionCard,
|
|
5
5
|
a as ActionMessage,
|
package/dist/index.node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-
|
|
1
|
+
import { _, a, b, c, d, e, f, g, h, i, C, j, k, D, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, S, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z, $, a0, a1, a2, a3 } from "./plugin-DGM-XlRe.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as ActionCard,
|
|
4
4
|
a as ActionMessage,
|
|
@@ -1067,8 +1067,10 @@ const _sfc_main$G = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
1069
|
const syncTeleportTarget = () => {
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1070
|
+
const modalContainer = rootRef.value?.closest(
|
|
1071
|
+
'[data-slot="dialog-content"], [data-dismissable-layer], [role="dialog"], dialog'
|
|
1072
|
+
);
|
|
1073
|
+
teleportTarget.value = modalContainer ?? document.body;
|
|
1072
1074
|
};
|
|
1073
1075
|
const selectOption = (option) => {
|
|
1074
1076
|
const value = optionValue(option);
|
|
@@ -1097,6 +1099,7 @@ const _sfc_main$G = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1097
1099
|
return;
|
|
1098
1100
|
}
|
|
1099
1101
|
const rect = triggerRef.value.getBoundingClientRect();
|
|
1102
|
+
const teleportElement = teleportTarget.value instanceof HTMLElement ? teleportTarget.value : null;
|
|
1100
1103
|
const viewportWidth = window.innerWidth;
|
|
1101
1104
|
const viewportHeight = window.innerHeight;
|
|
1102
1105
|
const spaceBelow = viewportHeight - rect.bottom - 8;
|
|
@@ -1104,6 +1107,19 @@ const _sfc_main$G = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1104
1107
|
const shouldOpenUpward = spaceBelow < 240 && spaceAbove > spaceBelow;
|
|
1105
1108
|
const width = Math.min(rect.width, Math.max(viewportWidth - rect.left - 16, 160));
|
|
1106
1109
|
const maxHeight = Math.max(Math.min(240, shouldOpenUpward ? spaceAbove : spaceBelow), 120);
|
|
1110
|
+
if (teleportElement && teleportElement !== document.body) {
|
|
1111
|
+
const containerRect = teleportElement.getBoundingClientRect();
|
|
1112
|
+
dropdownStyle.value = {
|
|
1113
|
+
position: "absolute",
|
|
1114
|
+
left: `${rect.left - containerRect.left}px`,
|
|
1115
|
+
width: `${width}px`,
|
|
1116
|
+
maxHeight: `${maxHeight}px`,
|
|
1117
|
+
pointerEvents: "auto",
|
|
1118
|
+
zIndex: "9999",
|
|
1119
|
+
...shouldOpenUpward ? { bottom: `${containerRect.bottom - rect.top + 1}px` } : { top: `${rect.bottom - containerRect.top - 1}px` }
|
|
1120
|
+
};
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1107
1123
|
dropdownStyle.value = {
|
|
1108
1124
|
position: "fixed",
|
|
1109
1125
|
left: `${Math.max(rect.left, 8)}px`,
|
|
@@ -6526,4 +6542,4 @@ export {
|
|
|
6526
6542
|
_sfc_main$B as y,
|
|
6527
6543
|
_sfc_main$A as z
|
|
6528
6544
|
};
|
|
6529
|
-
//# sourceMappingURL=plugin-
|
|
6545
|
+
//# sourceMappingURL=plugin-DGM-XlRe.js.map
|