nuxt-glorious 1.1.9 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/module.json +1 -1
- package/dist/runtime/assets/style/components/buttons.css +6 -6
- package/dist/runtime/assets/style/components/modal.css +6 -6
- package/dist/runtime/components/G/Button.vue +10 -15
- package/dist/runtime/components/G/File.vue +1 -1
- package/dist/runtime/components/G/Input.vue +4 -4
- package/dist/runtime/components/G/Modal.vue +7 -7
- package/dist/runtime/components/G/textarea.vue +0 -6
- package/dist/runtime/composables/useGloriousFetch.mjs +0 -1
- package/dist/runtime/stores/GloriousStore.mjs +2 -4
- package/dist/runtime/utils/gTailwindColor.d.ts +1 -0
- package/dist/runtime/utils/gTailwindColor.mjs +5 -0
- package/package.json +54 -53
- package/dist/runtime/utils/tailwindColor.d.ts +0 -1
- package/dist/runtime/utils/tailwindColor.mjs +0 -5
package/dist/module.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
button:focus-visible {
|
2
|
-
outline
|
2
|
+
@apply outline-none;
|
3
3
|
}
|
4
4
|
|
5
5
|
.xl.glorious-button-orange, .xl.glorious-button-blue, .xl.glorious-button-gray, .xl.glorious-button-red, .xl.glorious-button-primary {
|
@@ -48,7 +48,7 @@ button:focus-visible {
|
|
48
48
|
@apply text-gray-500 hover:bg-green-100;
|
49
49
|
}
|
50
50
|
.glorious-button-primary:disabled {
|
51
|
-
@apply cursor-not-allowed
|
51
|
+
@apply cursor-not-allowed;
|
52
52
|
}
|
53
53
|
.glorious-button-primary:disabled:not(:disabled) {
|
54
54
|
@apply bg-green-300;
|
@@ -61,7 +61,7 @@ button:focus-visible {
|
|
61
61
|
@apply text-gray-500 hover:bg-red-100;
|
62
62
|
}
|
63
63
|
.glorious-button-red:disabled {
|
64
|
-
@apply cursor-not-allowed
|
64
|
+
@apply cursor-not-allowed;
|
65
65
|
}
|
66
66
|
.glorious-button-red:disabled:not(:disabled) {
|
67
67
|
@apply bg-red-300;
|
@@ -74,7 +74,7 @@ button:focus-visible {
|
|
74
74
|
@apply text-gray-500 hover:bg-gray-100;
|
75
75
|
}
|
76
76
|
.glorious-button-gray:disabled {
|
77
|
-
@apply cursor-not-allowed
|
77
|
+
@apply cursor-not-allowed;
|
78
78
|
}
|
79
79
|
.glorious-button-gray:disabled:not(:disabled) {
|
80
80
|
@apply bg-gray-300;
|
@@ -87,7 +87,7 @@ button:focus-visible {
|
|
87
87
|
@apply text-gray-500 hover:bg-blue-100;
|
88
88
|
}
|
89
89
|
.glorious-button-blue:disabled {
|
90
|
-
@apply cursor-not-allowed
|
90
|
+
@apply cursor-not-allowed;
|
91
91
|
}
|
92
92
|
.glorious-button-blue:disabled:not(:disabled) {
|
93
93
|
@apply bg-blue-300;
|
@@ -100,7 +100,7 @@ button:focus-visible {
|
|
100
100
|
@apply text-gray-500 hover:bg-orange-100;
|
101
101
|
}
|
102
102
|
.glorious-button-orange:disabled {
|
103
|
-
@apply cursor-not-allowed
|
103
|
+
@apply cursor-not-allowed;
|
104
104
|
}
|
105
105
|
.glorious-button-orange:disabled:not(:disabled) {
|
106
106
|
@apply bg-orange-300;
|
@@ -31,15 +31,15 @@
|
|
31
31
|
.g-scafold-modal.close {
|
32
32
|
@apply hidden;
|
33
33
|
}
|
34
|
-
.g-scafold-modal.open {
|
35
|
-
animation: animation-mobile 0.3s normal forwards;
|
36
|
-
}
|
37
34
|
@screen md {
|
38
35
|
.g-scafold-modal.open {
|
39
|
-
animation:
|
36
|
+
animation: animationOpacity 0.2s normal forwards;
|
40
37
|
}
|
41
38
|
}
|
42
|
-
|
39
|
+
.g-scafold-modal.open {
|
40
|
+
animation: animationMobile 0.3s normal forwards;
|
41
|
+
}
|
42
|
+
@keyframes animationOpacity {
|
43
43
|
from {
|
44
44
|
opacity: 0;
|
45
45
|
}
|
@@ -47,7 +47,7 @@
|
|
47
47
|
opacity: 1;
|
48
48
|
}
|
49
49
|
}
|
50
|
-
@keyframes
|
50
|
+
@keyframes animationMobile {
|
51
51
|
from {
|
52
52
|
transform: translateY(100%);
|
53
53
|
}
|
@@ -36,13 +36,6 @@ const props = defineProps({
|
|
36
36
|
type: String,
|
37
37
|
},
|
38
38
|
});
|
39
|
-
|
40
|
-
const emits = defineEmits(["click"]);
|
41
|
-
const click = () => {
|
42
|
-
if (props.loading) return;
|
43
|
-
|
44
|
-
emits("click");
|
45
|
-
};
|
46
39
|
</script>
|
47
40
|
|
48
41
|
<template>
|
@@ -55,7 +48,6 @@ const click = () => {
|
|
55
48
|
props.outline ? 'outline' : '',
|
56
49
|
]"
|
57
50
|
:disabled="props.disabled"
|
58
|
-
@click="click"
|
59
51
|
>
|
60
52
|
<div v-if="props.loading" class="loading">
|
61
53
|
<GLoading />
|
@@ -72,13 +64,16 @@ const click = () => {
|
|
72
64
|
]"
|
73
65
|
:disabled="props.disabled"
|
74
66
|
>
|
75
|
-
<
|
67
|
+
<div v-if="props.loading" class="loading">
|
68
|
+
<GLoading />
|
69
|
+
</div>
|
70
|
+
<slot v-else />
|
76
71
|
</NuxtLink>
|
77
72
|
</template>
|
78
73
|
|
79
74
|
<style>
|
80
75
|
button:focus-visible {
|
81
|
-
outline
|
76
|
+
@apply outline-none;
|
82
77
|
}
|
83
78
|
|
84
79
|
.xl.glorious-button-orange, .xl.glorious-button-blue, .xl.glorious-button-gray, .xl.glorious-button-red, .xl.glorious-button-primary {
|
@@ -127,7 +122,7 @@ button:focus-visible {
|
|
127
122
|
@apply text-gray-500 hover:bg-green-100;
|
128
123
|
}
|
129
124
|
.glorious-button-primary:disabled {
|
130
|
-
@apply cursor-not-allowed
|
125
|
+
@apply cursor-not-allowed;
|
131
126
|
}
|
132
127
|
.glorious-button-primary:disabled:not(:disabled) {
|
133
128
|
@apply bg-green-300;
|
@@ -140,7 +135,7 @@ button:focus-visible {
|
|
140
135
|
@apply text-gray-500 hover:bg-red-100;
|
141
136
|
}
|
142
137
|
.glorious-button-red:disabled {
|
143
|
-
@apply cursor-not-allowed
|
138
|
+
@apply cursor-not-allowed;
|
144
139
|
}
|
145
140
|
.glorious-button-red:disabled:not(:disabled) {
|
146
141
|
@apply bg-red-300;
|
@@ -153,7 +148,7 @@ button:focus-visible {
|
|
153
148
|
@apply text-gray-500 hover:bg-gray-100;
|
154
149
|
}
|
155
150
|
.glorious-button-gray:disabled {
|
156
|
-
@apply cursor-not-allowed
|
151
|
+
@apply cursor-not-allowed;
|
157
152
|
}
|
158
153
|
.glorious-button-gray:disabled:not(:disabled) {
|
159
154
|
@apply bg-gray-300;
|
@@ -166,7 +161,7 @@ button:focus-visible {
|
|
166
161
|
@apply text-gray-500 hover:bg-blue-100;
|
167
162
|
}
|
168
163
|
.glorious-button-blue:disabled {
|
169
|
-
@apply cursor-not-allowed
|
164
|
+
@apply cursor-not-allowed;
|
170
165
|
}
|
171
166
|
.glorious-button-blue:disabled:not(:disabled) {
|
172
167
|
@apply bg-blue-300;
|
@@ -179,7 +174,7 @@ button:focus-visible {
|
|
179
174
|
@apply text-gray-500 hover:bg-orange-100;
|
180
175
|
}
|
181
176
|
.glorious-button-orange:disabled {
|
182
|
-
@apply cursor-not-allowed
|
177
|
+
@apply cursor-not-allowed;
|
183
178
|
}
|
184
179
|
.glorious-button-orange:disabled:not(:disabled) {
|
185
180
|
@apply bg-orange-300;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<script setup lang="ts">
|
2
2
|
import { computed, ref, watch } from "#imports";
|
3
3
|
import { useGloriousCore } from "../../composables/useGloriousCore";
|
4
|
-
import
|
4
|
+
import gTailwindColor from "../../utils/gTailwindColor";
|
5
5
|
const props = defineProps({
|
6
6
|
modelValue: {
|
7
7
|
required: false,
|
@@ -208,7 +208,7 @@ const typeInput = ref(props.type);
|
|
208
208
|
class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
|
209
209
|
:size="23"
|
210
210
|
name="glorious-eye-fill"
|
211
|
-
:color="
|
211
|
+
:color="gTailwindColor('gray', 500)"
|
212
212
|
@click="typeInput = 'text'"
|
213
213
|
></GIcon>
|
214
214
|
<GIcon
|
@@ -216,7 +216,7 @@ const typeInput = ref(props.type);
|
|
216
216
|
class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
|
217
217
|
:size="23"
|
218
218
|
name="glorious-eye-off-fill"
|
219
|
-
:color="
|
219
|
+
:color="gTailwindColor('gray', 500)"
|
220
220
|
@click="typeInput = 'password'"
|
221
221
|
></GIcon>
|
222
222
|
</div>
|
@@ -236,7 +236,7 @@ const typeInput = ref(props.type);
|
|
236
236
|
class="glorious-input-icon"
|
237
237
|
:name="props.icon"
|
238
238
|
:size="computeIconSize"
|
239
|
-
:color="
|
239
|
+
:color="gTailwindColor('gray', '500')"
|
240
240
|
/>
|
241
241
|
</div>
|
242
242
|
<GErrorText :error="props.error" />
|
@@ -109,7 +109,7 @@ watch(
|
|
109
109
|
v-show="props.closeBtn !== ''"
|
110
110
|
@click="emits('update:modelValue', false)"
|
111
111
|
>
|
112
|
-
{{ props.closeBtn }}
|
112
|
+
{{ props.closeBtn }}
|
113
113
|
</GButton>
|
114
114
|
</div>
|
115
115
|
<!-- end footer -->
|
@@ -150,15 +150,15 @@ watch(
|
|
150
150
|
.g-scafold-modal.close {
|
151
151
|
@apply hidden;
|
152
152
|
}
|
153
|
-
.g-scafold-modal.open {
|
154
|
-
animation: animation-mobile 0.3s normal forwards;
|
155
|
-
}
|
156
153
|
@screen md {
|
157
154
|
.g-scafold-modal.open {
|
158
|
-
animation:
|
155
|
+
animation: animationOpacity 0.2s normal forwards;
|
159
156
|
}
|
160
157
|
}
|
161
|
-
|
158
|
+
.g-scafold-modal.open {
|
159
|
+
animation: animationMobile 0.3s normal forwards;
|
160
|
+
}
|
161
|
+
@keyframes animationOpacity {
|
162
162
|
from {
|
163
163
|
opacity: 0;
|
164
164
|
}
|
@@ -166,7 +166,7 @@ watch(
|
|
166
166
|
opacity: 1;
|
167
167
|
}
|
168
168
|
}
|
169
|
-
@keyframes
|
169
|
+
@keyframes animationMobile {
|
170
170
|
from {
|
171
171
|
transform: translateY(100%);
|
172
172
|
}
|
@@ -41,11 +41,6 @@ const props = defineProps({
|
|
41
41
|
default: "off",
|
42
42
|
type: String,
|
43
43
|
},
|
44
|
-
rows: {
|
45
|
-
require: false,
|
46
|
-
default: 3,
|
47
|
-
type: Number,
|
48
|
-
},
|
49
44
|
});
|
50
45
|
|
51
46
|
const inputValue: any = ref(null);
|
@@ -71,7 +66,6 @@ watch(
|
|
71
66
|
:class="[props.size, `glorious-textarea-${props.color}`]"
|
72
67
|
:placeholder="props.placeholder"
|
73
68
|
:disabled="props.disabled"
|
74
|
-
:rows="props.rows"
|
75
69
|
/>
|
76
70
|
</div>
|
77
71
|
<GErrorText :error="props.error" />
|
@@ -8,8 +8,7 @@ export const GloriousStore = defineStore("GloriousStore", {
|
|
8
8
|
},
|
9
9
|
loading: {},
|
10
10
|
keepData: {},
|
11
|
-
forms: {}
|
12
|
-
modals: {}
|
11
|
+
forms: {}
|
13
12
|
}),
|
14
13
|
getters: {
|
15
14
|
authIsLogin() {
|
@@ -40,8 +39,7 @@ export const GloriousStore = defineStore("GloriousStore", {
|
|
40
39
|
show: false,
|
41
40
|
keepData: {}
|
42
41
|
};
|
43
|
-
if (typeof key === "string")
|
44
|
-
this.modals[key] = defaultValue;
|
42
|
+
if (typeof key === "string") this.modals[key] = defaultValue;
|
45
43
|
else
|
46
44
|
key.map((item) => {
|
47
45
|
this.modals[item] = defaultValue;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function gTailwindColor(name: string, range: number): any;
|
package/package.json
CHANGED
@@ -1,53 +1,54 @@
|
|
1
|
-
{
|
2
|
-
"version": "1.
|
3
|
-
"name": "nuxt-glorious",
|
4
|
-
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
|
-
"repository": "sajadhzj/nuxt-glorious",
|
6
|
-
"author": "sajad hossein zadeh (https://github.com/sajadhzj)",
|
7
|
-
"license": "MIT",
|
8
|
-
"
|
9
|
-
|
10
|
-
|
11
|
-
"
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
"
|
23
|
-
"dev
|
24
|
-
"dev:
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"test
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"@
|
33
|
-
"@
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
"@nuxt/
|
41
|
-
"@nuxt/
|
42
|
-
"@nuxt/
|
43
|
-
"@nuxt/
|
44
|
-
"@
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
}
|
1
|
+
{
|
2
|
+
"version": "1.2.0",
|
3
|
+
"name": "nuxt-glorious",
|
4
|
+
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
|
+
"repository": "sajadhzj/nuxt-glorious",
|
6
|
+
"author": "sajad hossein zadeh (https://github.com/sajadhzj)",
|
7
|
+
"license": "MIT",
|
8
|
+
"type": "module",
|
9
|
+
"exports": {
|
10
|
+
".": {
|
11
|
+
"types": "./dist/types.d.ts",
|
12
|
+
"import": "./dist/module.mjs",
|
13
|
+
"require": "./dist/module.cjs"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"main": "./dist/module.cjs",
|
17
|
+
"types": "./dist/types.d.ts",
|
18
|
+
"files": [
|
19
|
+
"dist"
|
20
|
+
],
|
21
|
+
"scripts": {
|
22
|
+
"prepack": "nuxt-module-build build",
|
23
|
+
"dev": "nuxi dev playground",
|
24
|
+
"dev:build": "nuxi build playground",
|
25
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
26
|
+
"release": "npm run prepack && npm publish",
|
27
|
+
"lint": "eslint .",
|
28
|
+
"test": "vitest run",
|
29
|
+
"test:watch": "vitest watch"
|
30
|
+
},
|
31
|
+
"dependencies": {
|
32
|
+
"@nuxt/kit": "^3.11.1",
|
33
|
+
"@nuxtjs/tailwindcss": "^6.12.0",
|
34
|
+
"@pinia/nuxt": "^0.5.1",
|
35
|
+
"defu": "^6.1.4",
|
36
|
+
"pinia": "^2.1.7",
|
37
|
+
"sass": "^1.77.5"
|
38
|
+
},
|
39
|
+
"devDependencies": {
|
40
|
+
"@nuxt/devtools": "latest",
|
41
|
+
"@nuxt/eslint-config": "^0.2.0",
|
42
|
+
"@nuxt/module-builder": "^0.5.5",
|
43
|
+
"@nuxt/schema": "^3.11.1",
|
44
|
+
"@nuxt/test-utils": "^3.12.0",
|
45
|
+
"@types/node": "^20.11.29",
|
46
|
+
"changelogen": "^0.5.5",
|
47
|
+
"eslint": "^8.57.0",
|
48
|
+
"nuxt": "^3.11.1",
|
49
|
+
"vitest": "^1.4.0"
|
50
|
+
},
|
51
|
+
"overrides": {
|
52
|
+
"vue": "latest"
|
53
|
+
}
|
54
|
+
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function tailwindColor(name: string, range: number): any;
|