nuxt-glorious 1.2.2-4 → 1.2.2-6
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 +30 -21
- package/dist/runtime/components/G/Input.vue +1 -1
- package/dist/runtime/components/G/Modal.vue +40 -28
- package/dist/runtime/components/G/Table.vue +46 -27
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,57 +1,66 @@
|
|
|
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
|
+
.glorious-scaffold-modal.open {
|
|
35
|
+
animation: animationMobile 0.3s normal forwards;
|
|
36
|
+
}
|
|
34
37
|
@screen md {
|
|
35
|
-
.
|
|
36
|
-
animation: animationOpacity 0.
|
|
38
|
+
.glorious-scaffold-modal.open {
|
|
39
|
+
animation: animationOpacity 0.3s normal forwards;
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
|
-
.g-scafold-modal.open {
|
|
40
|
-
animation: animationMobile 0.3s normal forwards;
|
|
41
|
-
}
|
|
42
42
|
@keyframes animationOpacity {
|
|
43
|
-
|
|
43
|
+
0% {
|
|
44
|
+
transform: scale(0.1);
|
|
44
45
|
opacity: 0;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
99% {
|
|
48
|
+
transform: scale(1);
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
100% {
|
|
52
|
+
transform: unset;
|
|
47
53
|
opacity: 1;
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
56
|
@keyframes animationMobile {
|
|
51
|
-
|
|
57
|
+
0% {
|
|
52
58
|
transform: translateY(100%);
|
|
53
59
|
}
|
|
54
|
-
|
|
60
|
+
99% {
|
|
55
61
|
transform: translateY(0);
|
|
56
62
|
}
|
|
63
|
+
100% {
|
|
64
|
+
transform: unset;
|
|
65
|
+
}
|
|
57
66
|
}
|
|
@@ -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,61 +120,70 @@ 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
|
}
|
|
156
|
+
.glorious-scaffold-modal.open {
|
|
157
|
+
animation: animationMobile 0.3s normal forwards;
|
|
158
|
+
}
|
|
153
159
|
@screen md {
|
|
154
|
-
.
|
|
155
|
-
animation: animationOpacity 0.
|
|
160
|
+
.glorious-scaffold-modal.open {
|
|
161
|
+
animation: animationOpacity 0.3s normal forwards;
|
|
156
162
|
}
|
|
157
163
|
}
|
|
158
|
-
.g-scafold-modal.open {
|
|
159
|
-
animation: animationMobile 0.3s normal forwards;
|
|
160
|
-
}
|
|
161
164
|
@keyframes animationOpacity {
|
|
162
|
-
|
|
165
|
+
0% {
|
|
166
|
+
transform: scale(0.1);
|
|
163
167
|
opacity: 0;
|
|
164
168
|
}
|
|
165
|
-
|
|
169
|
+
99% {
|
|
170
|
+
transform: scale(1);
|
|
171
|
+
opacity: 1;
|
|
172
|
+
}
|
|
173
|
+
100% {
|
|
174
|
+
transform: unset;
|
|
166
175
|
opacity: 1;
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
178
|
@keyframes animationMobile {
|
|
170
|
-
|
|
179
|
+
0% {
|
|
171
180
|
transform: translateY(100%);
|
|
172
181
|
}
|
|
173
|
-
|
|
182
|
+
99% {
|
|
174
183
|
transform: translateY(0);
|
|
175
184
|
}
|
|
185
|
+
100% {
|
|
186
|
+
transform: unset;
|
|
187
|
+
}
|
|
176
188
|
}
|
|
177
189
|
</style>
|
|
@@ -13,37 +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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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>
|
|
47
66
|
</div>
|
|
48
67
|
</template>
|
|
49
68
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.2-
|
|
2
|
+
"version": "1.2.2-6",
|
|
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",
|