@enos5/enos-vue-default 1.8.14 → 1.8.16
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-D1NKz8QO.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-D1NKz8QO.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as ActionCard,
|
|
4
4
|
a as ActionMessage,
|
|
@@ -1099,6 +1099,7 @@ const _sfc_main$G = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1099
1099
|
return;
|
|
1100
1100
|
}
|
|
1101
1101
|
const rect = triggerRef.value.getBoundingClientRect();
|
|
1102
|
+
const teleportElement = teleportTarget.value instanceof HTMLElement ? teleportTarget.value : null;
|
|
1102
1103
|
const viewportWidth = window.innerWidth;
|
|
1103
1104
|
const viewportHeight = window.innerHeight;
|
|
1104
1105
|
const spaceBelow = viewportHeight - rect.bottom - 8;
|
|
@@ -1106,6 +1107,19 @@ const _sfc_main$G = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1106
1107
|
const shouldOpenUpward = spaceBelow < 240 && spaceAbove > spaceBelow;
|
|
1107
1108
|
const width = Math.min(rect.width, Math.max(viewportWidth - rect.left - 16, 160));
|
|
1108
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
|
+
}
|
|
1109
1123
|
dropdownStyle.value = {
|
|
1110
1124
|
position: "fixed",
|
|
1111
1125
|
left: `${Math.max(rect.left, 8)}px`,
|
|
@@ -3972,6 +3986,19 @@ const _sfc_main$t = {
|
|
|
3972
3986
|
const emit = __emit;
|
|
3973
3987
|
const dialog = ref();
|
|
3974
3988
|
const showSlot = ref(props.show);
|
|
3989
|
+
const presetMaxWidthClasses = {
|
|
3990
|
+
"sm": "sm:max-w-sm",
|
|
3991
|
+
"md": "sm:max-w-md",
|
|
3992
|
+
"lg": "sm:max-w-lg",
|
|
3993
|
+
"xl": "sm:max-w-xl",
|
|
3994
|
+
"2xl": "sm:max-w-2xl",
|
|
3995
|
+
"3xl": "sm:max-w-3xl",
|
|
3996
|
+
"4xl": "sm:max-w-4xl",
|
|
3997
|
+
"5xl": "sm:max-w-5xl",
|
|
3998
|
+
"6xl": "sm:max-w-6xl",
|
|
3999
|
+
"7xl": "sm:max-w-7xl",
|
|
4000
|
+
"full": "sm:max-w-full"
|
|
4001
|
+
};
|
|
3975
4002
|
const openModal = () => {
|
|
3976
4003
|
document.body.style.overflow = "hidden";
|
|
3977
4004
|
showSlot.value = true;
|
|
@@ -4015,13 +4042,13 @@ const _sfc_main$t = {
|
|
|
4015
4042
|
document.body.style.overflow = null;
|
|
4016
4043
|
});
|
|
4017
4044
|
const maxWidthClass = computed(() => {
|
|
4018
|
-
return
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4045
|
+
return presetMaxWidthClasses[props.maxWidth] ?? null;
|
|
4046
|
+
});
|
|
4047
|
+
const modalWidthStyle = computed(() => {
|
|
4048
|
+
if (maxWidthClass.value) {
|
|
4049
|
+
return null;
|
|
4050
|
+
}
|
|
4051
|
+
return props.maxWidth ? { maxWidth: props.maxWidth } : null;
|
|
4025
4052
|
});
|
|
4026
4053
|
const positionClasses = computed(() => {
|
|
4027
4054
|
switch (props.position) {
|
|
@@ -4072,10 +4099,11 @@ const _sfc_main$t = {
|
|
|
4072
4099
|
}, {
|
|
4073
4100
|
default: withCtx(() => [
|
|
4074
4101
|
withDirectives(createElementVNode("div", {
|
|
4075
|
-
class: normalizeClass(["relative z-50 mb-6 overflow-hidden rounded-lg border border-neutral-200 bg-white shadow-xl transform transition-all dark:border-neutral-800 dark:bg-neutral-950 sm:mx-auto sm:w-full", maxWidthClass.value])
|
|
4102
|
+
class: normalizeClass(["relative z-50 mb-6 overflow-hidden rounded-lg border border-neutral-200 bg-white shadow-xl transform transition-all dark:border-neutral-800 dark:bg-neutral-950 sm:mx-auto sm:w-full", maxWidthClass.value]),
|
|
4103
|
+
style: normalizeStyle(modalWidthStyle.value)
|
|
4076
4104
|
}, [
|
|
4077
4105
|
showSlot.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
|
|
4078
|
-
],
|
|
4106
|
+
], 6), [
|
|
4079
4107
|
[vShow, __props.show]
|
|
4080
4108
|
])
|
|
4081
4109
|
]),
|
|
@@ -6528,4 +6556,4 @@ export {
|
|
|
6528
6556
|
_sfc_main$B as y,
|
|
6529
6557
|
_sfc_main$A as z
|
|
6530
6558
|
};
|
|
6531
|
-
//# sourceMappingURL=plugin-
|
|
6559
|
+
//# sourceMappingURL=plugin-D1NKz8QO.js.map
|