edvoyui-component-library-test-flight 0.0.210 → 0.0.211
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.
|
@@ -34,6 +34,7 @@ declare const _default: import('../../../node_modules/vue').DefineComponent<impo
|
|
|
34
34
|
};
|
|
35
35
|
}>, {
|
|
36
36
|
closeModal: () => void;
|
|
37
|
+
dismissModal: () => void;
|
|
37
38
|
slideClass: import('../../../node_modules/vue').ComputedRef<string>;
|
|
38
39
|
}, {}, {}, {}, import('../../../node_modules/vue').ComponentOptionsMixin, import('../../../node_modules/vue').ComponentOptionsMixin, ("update:isVisible" | "confirm")[], "update:isVisible" | "confirm", import('../../../node_modules/vue').PublicProps, Readonly<import('../../../node_modules/vue').ExtractPropTypes<{
|
|
39
40
|
isVisible: {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<button
|
|
45
45
|
type="button"
|
|
46
46
|
class="flex items-center justify-center text-gray-400 bg-white hover:bg-gray-50 rounded-3xl hover:text-gray-600 size-8"
|
|
47
|
-
@click="
|
|
47
|
+
@click="dismissModal"
|
|
48
48
|
>
|
|
49
49
|
<span class="sr-only">Close</span>
|
|
50
50
|
<svg
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
class="sticky bottom-0 flex items-center justify-end float-none p-4 space-x-2"
|
|
85
85
|
>
|
|
86
86
|
<button
|
|
87
|
-
@click="
|
|
87
|
+
@click="dismissModal"
|
|
88
88
|
class="px-4 py-2 text-base font-semibold tracking-wide text-gray-600 transition-colors duration-75 bg-white rounded-md hover:bg-gray-100"
|
|
89
89
|
>
|
|
90
90
|
Cancel
|
|
@@ -166,11 +166,18 @@ export default defineComponent({
|
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
// Methods
|
|
169
|
+
// Accidental dismissal (backdrop click / Esc) — suppressed when persistent.
|
|
169
170
|
const closeModal = () => {
|
|
170
171
|
if (!props.persistent) {
|
|
171
172
|
emit("update:isVisible", false);
|
|
172
173
|
}
|
|
173
174
|
};
|
|
175
|
+
// Explicit close affordances (the X button and default Cancel) always
|
|
176
|
+
// dismiss, even when persistent. `persistent` only guards against the
|
|
177
|
+
// accidental backdrop/Esc dismissal handled by closeModal.
|
|
178
|
+
const dismissModal = () => {
|
|
179
|
+
emit("update:isVisible", false);
|
|
180
|
+
};
|
|
174
181
|
const handleKeydown = (event: KeyboardEvent) => {
|
|
175
182
|
if (event.key === "Escape" && props.isVisible && !props.persistent) {
|
|
176
183
|
closeModal();
|
|
@@ -194,6 +201,7 @@ export default defineComponent({
|
|
|
194
201
|
});
|
|
195
202
|
return {
|
|
196
203
|
closeModal,
|
|
204
|
+
dismissModal,
|
|
197
205
|
slideClass,
|
|
198
206
|
};
|
|
199
207
|
},
|