@imaginario27/air-ui-ds 1.2.0 → 1.2.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.
|
@@ -10,10 +10,27 @@
|
|
|
10
10
|
<div
|
|
11
11
|
v-if="modelValue"
|
|
12
12
|
:id
|
|
13
|
-
class="
|
|
13
|
+
:class="[
|
|
14
|
+
'fixed',
|
|
15
|
+
'inset-0',
|
|
16
|
+
'z-[9999]',
|
|
17
|
+
'bg-background-overlay',
|
|
18
|
+
'backdrop-blur-sm',
|
|
19
|
+
'overflow-y-auto',
|
|
20
|
+
overlayClass,
|
|
21
|
+
]"
|
|
14
22
|
>
|
|
15
23
|
<div
|
|
16
|
-
class="
|
|
24
|
+
:class="[
|
|
25
|
+
'modal-container',
|
|
26
|
+
'min-h-full',
|
|
27
|
+
'flex',
|
|
28
|
+
'w-full',
|
|
29
|
+
'items-center',
|
|
30
|
+
'justify-center',
|
|
31
|
+
'p-4',
|
|
32
|
+
containerClass,
|
|
33
|
+
]"
|
|
17
34
|
@click.self="closeModalOnClickOutside"
|
|
18
35
|
>
|
|
19
36
|
<Transition
|
|
@@ -41,7 +58,7 @@
|
|
|
41
58
|
@click="closeModal"
|
|
42
59
|
/>
|
|
43
60
|
|
|
44
|
-
<div class="p-4 md:p-6">
|
|
61
|
+
<div :class="['p-4 md:p-6', cardClasses]">
|
|
45
62
|
<slot />
|
|
46
63
|
</div>
|
|
47
64
|
</div>
|
|
@@ -59,10 +76,6 @@ const props = defineProps({
|
|
|
59
76
|
type: Boolean as PropType<boolean>,
|
|
60
77
|
default: false,
|
|
61
78
|
},
|
|
62
|
-
cardClasses: {
|
|
63
|
-
type: String as PropType<string>,
|
|
64
|
-
default: 'max-w-[600px]',
|
|
65
|
-
},
|
|
66
79
|
closeOnClickOutside: {
|
|
67
80
|
type: Boolean as PropType<boolean>,
|
|
68
81
|
default: false,
|
|
@@ -71,7 +84,14 @@ const props = defineProps({
|
|
|
71
84
|
type: Boolean as PropType<boolean>,
|
|
72
85
|
default: true,
|
|
73
86
|
},
|
|
87
|
+
overlayClass: String as PropType<string>,
|
|
88
|
+
containerClass: String as PropType<string>,
|
|
89
|
+
cardClasses: {
|
|
90
|
+
type: String as PropType<string>,
|
|
91
|
+
default: 'max-w-[600px]',
|
|
92
|
+
},
|
|
74
93
|
id: String as PropType<string>,
|
|
94
|
+
|
|
75
95
|
})
|
|
76
96
|
|
|
77
97
|
// Emits
|
|
@@ -109,11 +129,11 @@ const handleEscKey = (event: KeyboardEvent) => {
|
|
|
109
129
|
|
|
110
130
|
// Event listeners
|
|
111
131
|
const addEscListener = () => {
|
|
112
|
-
|
|
132
|
+
globalThis.addEventListener('keydown', handleEscKey)
|
|
113
133
|
}
|
|
114
134
|
|
|
115
135
|
const removeEscListener = () => {
|
|
116
|
-
|
|
136
|
+
globalThis.removeEventListener('keydown', handleEscKey)
|
|
117
137
|
}
|
|
118
138
|
|
|
119
139
|
// Cleanup on component unmount
|