@nexxtmove/ui 1.3.0 → 1.3.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.
- package/dist/index.js +10 -3
- package/package.json +1 -1
- package/src/components/Modal/Modal.vue +12 -5
package/dist/index.js
CHANGED
|
@@ -3484,7 +3484,9 @@ var ar = /* @__PURE__ */ p({
|
|
|
3484
3484
|
md: "max-w-3xl",
|
|
3485
3485
|
lg: "max-w-5xl",
|
|
3486
3486
|
xl: "max-w-7xl"
|
|
3487
|
-
}, p = i(() =>
|
|
3487
|
+
}, p = i(() => {
|
|
3488
|
+
if (e.customWidth) return /^\d+$/.test(e.customWidth) ? `${e.customWidth}px` : e.customWidth;
|
|
3489
|
+
}), m = i(() => p.value ? void 0 : u[e.size]), h = i(() => p.value ? { maxWidth: p.value } : void 0);
|
|
3488
3490
|
return (i, u) => (w(), a(A(De), {
|
|
3489
3491
|
open: t.value,
|
|
3490
3492
|
"onUpdate:open": l
|
|
@@ -3509,7 +3511,8 @@ var ar = /* @__PURE__ */ p({
|
|
|
3509
3511
|
}, {
|
|
3510
3512
|
default: R(() => [t.value ? (w(), a(A(Ce), {
|
|
3511
3513
|
key: 0,
|
|
3512
|
-
class: y(["pointer-events-auto relative z-10 flex max-h-[85vh] w-full flex-col overflow-x-auto rounded-3xl bg-white shadow-lg",
|
|
3514
|
+
class: y(["pointer-events-auto relative z-10 flex max-h-[85vh] w-full flex-col overflow-x-auto rounded-3xl bg-white shadow-lg", m.value]),
|
|
3515
|
+
style: x(h.value),
|
|
3513
3516
|
"aria-describedby": r.value ? void 0 : "undefined",
|
|
3514
3517
|
onPointerDownOutside: u[0] ||= (t) => !e.dismissible && t.preventDefault(),
|
|
3515
3518
|
onInteractOutside: u[1] ||= (t) => !e.dismissible && t.preventDefault(),
|
|
@@ -3549,7 +3552,11 @@ var ar = /* @__PURE__ */ p({
|
|
|
3549
3552
|
i.$slots.footer ? (w(), s("div", Wr, [D(i.$slots, "footer")])) : o("", !0)
|
|
3550
3553
|
]),
|
|
3551
3554
|
_: 3
|
|
3552
|
-
}, 8, [
|
|
3555
|
+
}, 8, [
|
|
3556
|
+
"class",
|
|
3557
|
+
"style",
|
|
3558
|
+
"aria-describedby"
|
|
3559
|
+
])) : o("", !0)]),
|
|
3553
3560
|
_: 3
|
|
3554
3561
|
})])]),
|
|
3555
3562
|
_: 3
|
package/package.json
CHANGED
|
@@ -54,12 +54,18 @@ const sizeClasses = {
|
|
|
54
54
|
xl: 'max-w-7xl',
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return
|
|
57
|
+
// A bare number is treated as pixels; anything carrying its own unit (`90vw`,
|
|
58
|
+
// `42rem`) is passed through untouched.
|
|
59
|
+
const customMaxWidth = computed(() => {
|
|
60
|
+
if (!customWidth) return undefined
|
|
61
|
+
return /^\d+$/.test(customWidth) ? `${customWidth}px` : customWidth
|
|
62
62
|
})
|
|
63
|
+
|
|
64
|
+
const dialogClass = computed(() => (customMaxWidth.value ? undefined : sizeClasses[size]))
|
|
65
|
+
|
|
66
|
+
const dialogStyle = computed(() =>
|
|
67
|
+
customMaxWidth.value ? { maxWidth: customMaxWidth.value } : undefined,
|
|
68
|
+
)
|
|
63
69
|
</script>
|
|
64
70
|
|
|
65
71
|
<template>
|
|
@@ -89,6 +95,7 @@ const dialogClass = computed(() => {
|
|
|
89
95
|
'pointer-events-auto relative z-10 flex max-h-[85vh] w-full flex-col overflow-x-auto rounded-3xl bg-white shadow-lg',
|
|
90
96
|
dialogClass,
|
|
91
97
|
]"
|
|
98
|
+
:style="dialogStyle"
|
|
92
99
|
:aria-describedby="description ? undefined : 'undefined'"
|
|
93
100
|
@pointer-down-outside="!dismissible && $event.preventDefault()"
|
|
94
101
|
@interact-outside="!dismissible && $event.preventDefault()"
|