@anweb/nuxt-ancore 1.15.1 → 1.15.3

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "AnCore",
3
3
  "configKey": "ancore",
4
- "version": "1.15.1",
4
+ "version": "1.15.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,19 +1,25 @@
1
1
  <script setup>
2
2
  import { useScrollLock } from "@vueuse/core";
3
- import { watch } from "vue";
4
3
  import { useAnDialogs } from "#imports";
5
4
  import { AnDialogsItem } from "#components";
6
5
  const Dialogs = useAnDialogs();
7
6
  const isLocked = useScrollLock(window);
8
- watch(() => Dialogs.items.length, (value) => {
9
- isLocked.value = !!value;
10
- });
7
+ const onAnimation = () => {
8
+ isLocked.value = !!Dialogs.items.length;
9
+ };
11
10
  </script>
12
11
 
13
12
  <template>
14
- <AnDialogsItem
15
- v-for="dialog of Dialogs.items"
16
- :key="dialog.id"
17
- :dialog="dialog"
18
- />
13
+ <transition-group
14
+ name="an-dialogs"
15
+ tag="div"
16
+ @before-enter="onAnimation"
17
+ @after-leave="onAnimation"
18
+ >
19
+ <AnDialogsItem
20
+ v-for="dialog of Dialogs.items"
21
+ :key="dialog.id"
22
+ :dialog="dialog"
23
+ />
24
+ </transition-group>
19
25
  </template>
@@ -65,14 +65,14 @@ onMounted(() => {
65
65
 
66
66
  <template>
67
67
  <div
68
- class="dialog -flex -flex__column"
68
+ class="an-dialog -flex -flex__column"
69
69
  :class="[{ '-fullscreen': config.fullscreen }, config.class]"
70
70
  >
71
71
  <component
72
72
  ref="refDialog"
73
73
  :is="props.dialog.component"
74
74
  :params="props.dialog.params"
75
- class="dialog__component"
75
+ class="an-dialog__component"
76
76
  :style="{ transform: `translateY(${top}px)` }"
77
77
  @close="Dialogs.close(props.dialog)"
78
78
  />
@@ -80,5 +80,5 @@ onMounted(() => {
80
80
  </template>
81
81
 
82
82
  <style scoped>
83
- .dialog{--an-dialogs-background:inherit;--an-dialogs-close:inherit;--an-dialogs-backdrop-filter:inherit;box-sizing:border-box;height:100%;left:0;position:fixed;top:0;width:100%;z-index:200}.dialog:not(.-fullscreen){align-items:center;backdrop-filter:var(--an-dialogs-backdrop-filter,blur(6px));-webkit-backdrop-filter:var(--an-dialogs-backdrop-filter,blur(6px));background:var(--an-dialogs-background,rgba(0,0,0,.3));display:flex;justify-content:center}@media (width < 768px){.dialog:not(.-fullscreen) .dialog__component{margin-top:auto;max-height:calc(100vh - 48px);position:relative;width:100%}.dialog:not(.-fullscreen) .dialog__component:before{background:var(--an-dialogs-close,rgba(0,0,0,.5));border-radius:100px;content:"";display:block;height:4px;margin:10px auto;width:50px}}@media (width >= 768px){.dialog:not(.-fullscreen) .dialog__component{margin:auto}}.dialog.-fullscreen .dialog__component{height:100%;width:100%}.dialog__component{box-sizing:border-box;overflow-y:scroll;position:relative;-ms-overflow-style:none;scrollbar-width:none}
83
+ .an-dialog{--an-dialogs-background:inherit;--an-dialogs-close:inherit;--an-dialogs-backdrop-filter:inherit;box-sizing:border-box;height:100%;left:0;position:fixed;top:0;width:100%;z-index:200}.an-dialog:not(.-fullscreen){align-items:center;backdrop-filter:var(--an-dialogs-backdrop-filter,blur(6px));-webkit-backdrop-filter:var(--an-dialogs-backdrop-filter,blur(6px));background:var(--an-dialogs-background,rgba(0,0,0,.3));display:flex;justify-content:center}@media (width < 768px){.an-dialog:not(.-fullscreen) .an-dialog__component{margin-top:auto;max-height:calc(100vh - 48px);position:relative;width:100%}.an-dialog:not(.-fullscreen) .an-dialog__component:before{background:var(--an-dialogs-close,rgba(0,0,0,.5));border-radius:100px;content:"";display:block;height:4px;margin:10px auto;width:50px}}@media (width >= 768px){.an-dialog:not(.-fullscreen) .an-dialog__component{margin:auto}}.an-dialog.-fullscreen .an-dialog__component{height:100%;width:100%}.an-dialog__component{box-sizing:border-box;overflow-y:scroll;position:relative;-ms-overflow-style:none;scrollbar-width:none}
84
84
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anweb/nuxt-ancore",
3
- "version": "1.15.1",
3
+ "version": "1.15.3",
4
4
  "description": "AnCore Nuxt module",
5
5
  "repository": "https://github.com/ANLTD/ancore",
6
6
  "license": "MIT",