adminforth 1.11.5-next.3 → 1.11.5-next.4
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/spa/src/afcl/Dialog.vue +43 -41
- package/package.json +1 -1
|
@@ -5,52 +5,54 @@
|
|
|
5
5
|
>
|
|
6
6
|
<slot name="trigger"></slot>
|
|
7
7
|
</div>
|
|
8
|
-
<
|
|
9
|
-
<div
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
18
|
-
{{ header }}
|
|
19
|
-
</h3>
|
|
20
|
-
<button
|
|
21
|
-
v-if="headerCloseButton"
|
|
22
|
-
type="button"
|
|
23
|
-
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
|
24
|
-
@click="modal?.hide()"
|
|
8
|
+
<Teleport to="body">
|
|
9
|
+
<div ref="modalEl" tabindex="-1" aria-hidden="true" class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
|
10
|
+
<div v-bind="$attrs" class="relative p-4 max-w-2xl max-h-full" :class="$attrs.class?.includes('w-') ? '' : 'w-full'">
|
|
11
|
+
<!-- Modal content -->
|
|
12
|
+
<div class="relative bg-white rounded-lg shadow-sm dark:bg-gray-700">
|
|
13
|
+
<!-- Modal header -->
|
|
14
|
+
<div
|
|
15
|
+
v-if="header"
|
|
16
|
+
class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600 border-gray-200"
|
|
25
17
|
>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
</
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
18
|
+
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
19
|
+
{{ header }}
|
|
20
|
+
</h3>
|
|
21
|
+
<button
|
|
22
|
+
v-if="headerCloseButton"
|
|
23
|
+
type="button"
|
|
24
|
+
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
|
25
|
+
@click="modal?.hide()"
|
|
26
|
+
>
|
|
27
|
+
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
28
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
29
|
+
</svg>
|
|
30
|
+
<span class="sr-only">Close modal</span>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
<!-- Modal body -->
|
|
34
|
+
<div class="p-4 md:p-5 space-y-4 text-gray-700 dark:text-gray-400">
|
|
35
|
+
<slot></slot>
|
|
36
|
+
</div>
|
|
37
|
+
<!-- Modal footer -->
|
|
38
|
+
<div
|
|
39
|
+
v-if="buttons.length"
|
|
40
|
+
class="flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600"
|
|
47
41
|
>
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
<Button
|
|
43
|
+
v-for="(button, buttonIndex) in buttons"
|
|
44
|
+
:key="buttonIndex"
|
|
45
|
+
v-bind="button.options"
|
|
46
|
+
:class="{ 'ms-3': buttonIndex > 0 }"
|
|
47
|
+
@click="button.onclick(modal)"
|
|
48
|
+
>
|
|
49
|
+
{{ button.label }}
|
|
50
|
+
</Button>
|
|
51
|
+
</div>
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|
|
52
54
|
</div>
|
|
53
|
-
</
|
|
55
|
+
</Teleport>
|
|
54
56
|
</template>
|
|
55
57
|
|
|
56
58
|
<script setup lang="ts">
|