nuxt-glorious 1.2.2-3 → 1.2.2-5
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.
Potentially problematic release.
This version of nuxt-glorious might be problematic. Click here for more details.
- package/dist/module.json +1 -1
- package/dist/runtime/assets/style/components/input.css +1 -1
- package/dist/runtime/assets/style/components/modal.css +14 -14
- package/dist/runtime/components/G/Input.vue +1 -1
- package/dist/runtime/components/G/Modal.vue +24 -21
- package/dist/runtime/components/G/Table.vue +46 -24
- package/package.json +1 -1
package/dist/module.json
CHANGED
@@ -1,42 +1,42 @@
|
|
1
|
-
.
|
1
|
+
.glorious-scaffold-modal {
|
2
2
|
@apply fixed bg-white md:top-[15%] z-50 right-0 left-0 mx-auto p-3 md:rounded-md rounded-t-md md:bottom-0 bottom-0 overflow-y-auto;
|
3
3
|
}
|
4
|
-
.
|
4
|
+
.glorious-scaffold-modal-header {
|
5
5
|
@apply flex justify-between items-center;
|
6
6
|
}
|
7
|
-
.
|
8
|
-
@apply flex justify-center gap-3;
|
7
|
+
.glorious-scaffold-modal-footer {
|
8
|
+
@apply flex justify-center gap-3 mt-3;
|
9
9
|
}
|
10
|
-
.
|
10
|
+
.glorious-scaffold-modal-footer > button {
|
11
11
|
@apply min-w-24;
|
12
12
|
}
|
13
|
-
.
|
13
|
+
.glorious-scaffold-modal-bg-blur {
|
14
14
|
@apply fixed top-0 right-0 backdrop-blur-sm bg-gray-500 bg-opacity-50 h-full w-full z-[40];
|
15
15
|
}
|
16
|
-
.
|
16
|
+
.glorious-scaffold-modal.size-full {
|
17
17
|
@apply w-full h-full top-0 rounded-none;
|
18
18
|
}
|
19
|
-
.
|
19
|
+
.glorious-scaffold-modal.size-xl {
|
20
20
|
@apply md:w-[70%] w-full md:h-max max-h-[70%];
|
21
21
|
}
|
22
|
-
.
|
22
|
+
.glorious-scaffold-modal.size-lg {
|
23
23
|
@apply md:w-[60%] w-full md:h-max max-h-[70%];
|
24
24
|
}
|
25
|
-
.
|
25
|
+
.glorious-scaffold-modal.size-md {
|
26
26
|
@apply md:w-[50%] w-full md:h-max max-h-[70%];
|
27
27
|
}
|
28
|
-
.
|
28
|
+
.glorious-scaffold-modal.size-sm {
|
29
29
|
@apply lg:w-[25%] md:w-[35%] w-full md:h-max max-h-[70%];
|
30
30
|
}
|
31
|
-
.
|
31
|
+
.glorious-scaffold-modal.close {
|
32
32
|
@apply hidden;
|
33
33
|
}
|
34
34
|
@screen md {
|
35
|
-
.
|
35
|
+
.glorious-scaffold-modal.open {
|
36
36
|
animation: animationOpacity 0.2s normal forwards;
|
37
37
|
}
|
38
38
|
}
|
39
|
-
.
|
39
|
+
.glorious-scaffold-modal.open {
|
40
40
|
animation: animationMobile 0.3s normal forwards;
|
41
41
|
}
|
42
42
|
@keyframes animationOpacity {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { watch } from "#imports";
|
3
|
+
import { GloriousStore } from "../../stores/GloriousStore";
|
3
4
|
const props = defineProps({
|
4
5
|
modelValue: {
|
5
6
|
required: true,
|
@@ -52,7 +53,7 @@ const emits = defineEmits(["ok", "close", "update:modelValue"]);
|
|
52
53
|
|
53
54
|
const addBlurBackground = (): void => {
|
54
55
|
const backgroundBlur = document.createElement("div");
|
55
|
-
backgroundBlur.classList.add("
|
56
|
+
backgroundBlur.classList.add("glorious-scaffold-modal-bg-blur");
|
56
57
|
const nuxt: any = document.getElementById("__nuxt");
|
57
58
|
nuxt.appendChild(backgroundBlur);
|
58
59
|
backgroundBlur.addEventListener("click", () => {
|
@@ -69,7 +70,9 @@ watch(
|
|
69
70
|
if (props.modelValue && props.blur) {
|
70
71
|
addBlurBackground();
|
71
72
|
} else {
|
72
|
-
const blur: any = document.querySelector(
|
73
|
+
const blur: any = document.querySelector(
|
74
|
+
".glorious-scaffold-modal-bg-blur"
|
75
|
+
);
|
73
76
|
if (blur !== null) blur.remove();
|
74
77
|
}
|
75
78
|
}
|
@@ -78,11 +81,11 @@ watch(
|
|
78
81
|
|
79
82
|
<template>
|
80
83
|
<div
|
81
|
-
class="
|
84
|
+
class="glorious-scaffold-modal"
|
82
85
|
:class="[props.modelValue ? 'open' : 'close', `size-${props.size}`]"
|
83
86
|
>
|
84
87
|
<!-- header -->
|
85
|
-
<div v-show="props?.title !== ''" class="
|
88
|
+
<div v-show="props?.title !== ''" class="glorious-scaffold-modal-header">
|
86
89
|
<span class="font-medium">{{ props.title }}</span>
|
87
90
|
<GButton
|
88
91
|
class="flex justify-center items-center w-6 h-6"
|
@@ -94,14 +97,14 @@ watch(
|
|
94
97
|
</GButton>
|
95
98
|
</div>
|
96
99
|
<hr v-show="props.title !== ''" class="my-3" />
|
97
|
-
<!-- end
|
100
|
+
<!-- end header -->
|
98
101
|
|
99
|
-
<div class="
|
102
|
+
<div class="glorious-scaffold-modal-content">
|
100
103
|
<slot />
|
101
104
|
</div>
|
102
105
|
|
103
106
|
<!-- start footer -->
|
104
|
-
<div v-show="props.okBtn !== ''" class="
|
107
|
+
<div v-show="props.okBtn !== ''" class="glorious-scaffold-modal-footer">
|
105
108
|
<GButton :loading="props.okBtnLoading" @click="emits('ok')">
|
106
109
|
{{ props.okBtn }}
|
107
110
|
</GButton>
|
@@ -117,45 +120,45 @@ watch(
|
|
117
120
|
</template>
|
118
121
|
|
119
122
|
<style>
|
120
|
-
.
|
123
|
+
.glorious-scaffold-modal {
|
121
124
|
@apply fixed bg-white md:top-[15%] z-50 right-0 left-0 mx-auto p-3 md:rounded-md rounded-t-md md:bottom-0 bottom-0 overflow-y-auto;
|
122
125
|
}
|
123
|
-
.
|
126
|
+
.glorious-scaffold-modal-header {
|
124
127
|
@apply flex justify-between items-center;
|
125
128
|
}
|
126
|
-
.
|
127
|
-
@apply flex justify-center gap-3;
|
129
|
+
.glorious-scaffold-modal-footer {
|
130
|
+
@apply flex justify-center gap-3 mt-3;
|
128
131
|
}
|
129
|
-
.
|
132
|
+
.glorious-scaffold-modal-footer > button {
|
130
133
|
@apply min-w-24;
|
131
134
|
}
|
132
|
-
.
|
135
|
+
.glorious-scaffold-modal-bg-blur {
|
133
136
|
@apply fixed top-0 right-0 backdrop-blur-sm bg-gray-500 bg-opacity-50 h-full w-full z-[40];
|
134
137
|
}
|
135
|
-
.
|
138
|
+
.glorious-scaffold-modal.size-full {
|
136
139
|
@apply w-full h-full top-0 rounded-none;
|
137
140
|
}
|
138
|
-
.
|
141
|
+
.glorious-scaffold-modal.size-xl {
|
139
142
|
@apply md:w-[70%] w-full md:h-max max-h-[70%];
|
140
143
|
}
|
141
|
-
.
|
144
|
+
.glorious-scaffold-modal.size-lg {
|
142
145
|
@apply md:w-[60%] w-full md:h-max max-h-[70%];
|
143
146
|
}
|
144
|
-
.
|
147
|
+
.glorious-scaffold-modal.size-md {
|
145
148
|
@apply md:w-[50%] w-full md:h-max max-h-[70%];
|
146
149
|
}
|
147
|
-
.
|
150
|
+
.glorious-scaffold-modal.size-sm {
|
148
151
|
@apply lg:w-[25%] md:w-[35%] w-full md:h-max max-h-[70%];
|
149
152
|
}
|
150
|
-
.
|
153
|
+
.glorious-scaffold-modal.close {
|
151
154
|
@apply hidden;
|
152
155
|
}
|
153
156
|
@screen md {
|
154
|
-
.
|
157
|
+
.glorious-scaffold-modal.open {
|
155
158
|
animation: animationOpacity 0.2s normal forwards;
|
156
159
|
}
|
157
160
|
}
|
158
|
-
.
|
161
|
+
.glorious-scaffold-modal.open {
|
159
162
|
animation: animationMobile 0.3s normal forwards;
|
160
163
|
}
|
161
164
|
@keyframes animationOpacity {
|
@@ -13,34 +13,56 @@ const props = defineProps({
|
|
13
13
|
required: true,
|
14
14
|
type: Object,
|
15
15
|
},
|
16
|
+
loading: {
|
17
|
+
required: false,
|
18
|
+
default: false,
|
19
|
+
type: Boolean,
|
20
|
+
},
|
21
|
+
loadingOption: {
|
22
|
+
required: false,
|
23
|
+
default: {
|
24
|
+
color: "green",
|
25
|
+
},
|
26
|
+
type: {
|
27
|
+
color: String,
|
28
|
+
},
|
29
|
+
},
|
16
30
|
});
|
17
31
|
</script>
|
18
32
|
|
19
33
|
<template>
|
20
|
-
<div class="
|
21
|
-
<table>
|
22
|
-
<
|
23
|
-
<
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<
|
31
|
-
<
|
32
|
-
<
|
33
|
-
v-
|
34
|
-
:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
<div class="flex flex-col">
|
35
|
+
<div class="glorious-table" :class="[`color-${props.color}`]">
|
36
|
+
<table>
|
37
|
+
<thead>
|
38
|
+
<tr>
|
39
|
+
<th v-for="(headItem, index) in props.header" :key="index">
|
40
|
+
{{ headItem }}
|
41
|
+
</th>
|
42
|
+
</tr>
|
43
|
+
</thead>
|
44
|
+
<tbody>
|
45
|
+
<tr v-for="(bodyItem, index) in props.body" :key="index">
|
46
|
+
<td
|
47
|
+
v-for="(headItem, headKey, headIndex) in props.header"
|
48
|
+
:key="headIndex"
|
49
|
+
>
|
50
|
+
<slot
|
51
|
+
v-if="typeof $slots[headKey] !== 'undefined'"
|
52
|
+
:name="headKey"
|
53
|
+
:item="bodyItem"
|
54
|
+
/>
|
55
|
+
<template v-else>
|
56
|
+
{{ bodyItem[headKey] }}
|
57
|
+
</template>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
</tbody>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<div class="flex justify-center">
|
64
|
+
<GLoading v-if="props.loading" :color="props.loadingOption.color" />
|
65
|
+
</div>
|
44
66
|
</div>
|
45
67
|
</template>
|
46
68
|
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "1.2.2-
|
2
|
+
"version": "1.2.2-5",
|
3
3
|
"name": "nuxt-glorious",
|
4
4
|
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
5
|
"repository": "sajadhzj/nuxt-glorious",
|