nuxt-glorious 1.1.9 → 1.2.1-0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "glorious",
3
3
  "configKey": "glorious",
4
- "version": "1.1.9"
4
+ "version": "1.2.1-0"
5
5
  }
package/dist/module.mjs CHANGED
@@ -57,7 +57,6 @@ const module = defineNuxtModule({
57
57
  });
58
58
  await installModule("@pinia/nuxt");
59
59
  addImportsDir(resolver.resolve("runtime/composables"));
60
- addImportsDir(resolver.resolve("runtime/utils"));
61
60
  addImportsDir(resolver.resolve("runtime/stores"));
62
61
  addImportsDir(resolver.resolve("runtime/middlewares"));
63
62
  addComponentsDir({
@@ -1,6 +1,6 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <g clip-path="url(#clip0_138_29818)">
3
- <path d="M1.18091 12C2.12091 6.88 6.60791 3 11.9999 3C17.3919 3 21.8779 6.88 22.8189 12C21.8789 17.12 17.3919 21 11.9999 21C6.60791 21 2.12191 17.12 1.18091 12ZM11.9999 17C13.326 17 14.5978 16.4732 15.5354 15.5355C16.4731 14.5979 16.9999 13.3261 16.9999 12C16.9999 10.6739 16.4731 9.40215 15.5354 8.46447C14.5978 7.52678 13.326 7 11.9999 7C10.6738 7 9.40206 7.52678 8.46437 8.46447C7.52669 9.40215 6.99991 10.6739 6.99991 12C6.99991 13.3261 7.52669 14.5979 8.46437 15.5355C9.40206 16.4732 10.6738 17 11.9999 17ZM11.9999 15C11.2043 15 10.4412 14.6839 9.87859 14.1213C9.31598 13.5587 8.99991 12.7956 8.99991 12C8.99991 11.2044 9.31598 10.4413 9.87859 9.87868C10.4412 9.31607 11.2043 9 11.9999 9C12.7956 9 13.5586 9.31607 14.1212 9.87868C14.6838 10.4413 14.9999 11.2044 14.9999 12C14.9999 12.7956 14.6838 13.5587 14.1212 14.1213C13.5586 14.6839 12.7956 15 11.9999 15Z" fill="black"/>
3
+ <path d="M1.18091 12C2.12091 6.88 6.60791 3 11.9999 3C17.3919 3 21.8779 6.88 22.8189 12C21.8789 17.12 17.3919 21 11.9999 21C6.60791 21 2.12191 17.12 1.18091 12ZM11.9999 17C13.326 17 14.5978 16.4732 15.5354 15.5355C16.4731 14.5979 16.9999 13.3261 16.9999 12C16.9999 10.6739 16.4731 9.40215 15.5354 8.46447C14.5978 7.52678 13.326 7 11.9999 7C10.6738 7 9.40206 7.52678 8.46437 8.46447C7.52669 9.40215 6.99991 10.6739 6.99991 12C6.99991 13.3261 7.52669 14.5979 8.46437 15.5355C9.40206 16.4732 10.6738 17 11.9999 17ZM11.9999 15C11.2043 15 10.4412 14.6839 9.87859 14.1213C9.31598 13.5587 8.99991 12.7956 8.99991 12C8.99991 11.2044 9.31598 10.4413 9.87859 9.87868C10.4412 9.31607 11.2043 9 11.9999 9C12.7956 9 13.5586 9.31607 14.1212 9.87868C14.6838 10.4413 14.9999 11.2044 14.9999 12C14.9999 12.7956 14.6838 13.5587 14.1212 14.1213C13.5586 14.6839 12.7956 15 11.9999 15Z" fill="#6b7280"/>
4
4
  </g>
5
5
  <defs>
6
6
  <clipPath id="clip0_138_29818">
@@ -1,6 +1,6 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <g clip-path="url(#clip0_138_29807)">
3
- <path d="M4.51991 5.93407L1.39291 2.80807L2.80791 1.39307L22.6069 21.1931L21.1919 22.6071L17.8819 19.2971C16.1231 20.4126 14.0826 21.0034 11.9999 21.0001C6.60791 21.0001 2.12191 17.1201 1.18091 12.0001C1.61094 9.67078 2.78254 7.54296 4.52091 5.93407H4.51991ZM14.7569 16.1721L13.2929 14.7081C12.733 14.976 12.1037 15.0636 11.4918 14.9589C10.88 14.8541 10.3157 14.5621 9.87678 14.1232C9.43785 13.6843 9.14588 13.12 9.04112 12.5081C8.93637 11.8963 9.02399 11.267 9.29191 10.7071L7.82791 9.24307C7.19162 10.2046 6.90718 11.3564 7.02274 12.5036C7.1383 13.6507 7.64676 14.7227 8.46203 15.5379C9.27729 16.3532 10.3493 16.8617 11.4964 16.9772C12.6436 17.0928 13.7954 16.8084 14.7569 16.1721ZM7.97391 3.76007C9.22091 3.27007 10.5799 3.00007 11.9999 3.00007C17.3919 3.00007 21.8779 6.88007 22.8189 12.0001C22.5125 13.6658 21.8238 15.2376 20.8069 16.5921L16.9469 12.7321C17.0616 11.9597 16.9937 11.1712 16.7488 10.4297C16.5039 9.68827 16.0888 9.01448 15.5366 8.46233C14.9845 7.91019 14.3107 7.49504 13.5693 7.25014C12.8278 7.00524 12.0393 6.93741 11.2669 7.05207L7.97391 3.76107V3.76007Z" fill="black"/>
3
+ <path d="M4.51991 5.93407L1.39291 2.80807L2.80791 1.39307L22.6069 21.1931L21.1919 22.6071L17.8819 19.2971C16.1231 20.4126 14.0826 21.0034 11.9999 21.0001C6.60791 21.0001 2.12191 17.1201 1.18091 12.0001C1.61094 9.67078 2.78254 7.54296 4.52091 5.93407H4.51991ZM14.7569 16.1721L13.2929 14.7081C12.733 14.976 12.1037 15.0636 11.4918 14.9589C10.88 14.8541 10.3157 14.5621 9.87678 14.1232C9.43785 13.6843 9.14588 13.12 9.04112 12.5081C8.93637 11.8963 9.02399 11.267 9.29191 10.7071L7.82791 9.24307C7.19162 10.2046 6.90718 11.3564 7.02274 12.5036C7.1383 13.6507 7.64676 14.7227 8.46203 15.5379C9.27729 16.3532 10.3493 16.8617 11.4964 16.9772C12.6436 17.0928 13.7954 16.8084 14.7569 16.1721ZM7.97391 3.76007C9.22091 3.27007 10.5799 3.00007 11.9999 3.00007C17.3919 3.00007 21.8779 6.88007 22.8189 12.0001C22.5125 13.6658 21.8238 15.2376 20.8069 16.5921L16.9469 12.7321C17.0616 11.9597 16.9937 11.1712 16.7488 10.4297C16.5039 9.68827 16.0888 9.01448 15.5366 8.46233C14.9845 7.91019 14.3107 7.49504 13.5693 7.25014C12.8278 7.00524 12.0393 6.93741 11.2669 7.05207L7.97391 3.76107V3.76007Z" fill="#6b7280"/>
4
4
  </g>
5
5
  <defs>
6
6
  <clipPath id="clip0_138_29807">
@@ -1,5 +1,5 @@
1
1
  button:focus-visible {
2
- outline: none;
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 opacity-50;
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 opacity-50;
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 opacity-50;
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 opacity-50;
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 opacity-50;
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: animation-opacity 0.2s normal forwards;
36
+ animation: animationOpacity 0.2s normal forwards;
40
37
  }
41
38
  }
42
- @keyframes animation-opacity {
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 animation-mobile {
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
- <slot />
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: none;
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 opacity-50;
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 opacity-50;
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 opacity-50;
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 opacity-50;
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 opacity-50;
177
+ @apply cursor-not-allowed;
183
178
  }
184
179
  .glorious-button-orange:disabled:not(:disabled) {
185
180
  @apply bg-orange-300;
@@ -2,7 +2,7 @@
2
2
  const props = defineProps({
3
3
  modelValue: {
4
4
  required: true,
5
- type: [String, Object, null],
5
+ type: null,
6
6
  },
7
7
  color: {
8
8
  required: false,
@@ -1,7 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref, watch } from "#imports";
3
3
  import { useGloriousCore } from "../../composables/useGloriousCore";
4
- import tailwindColor from "../../utils/tailwindColor";
5
4
  const props = defineProps({
6
5
  modelValue: {
7
6
  required: false,
@@ -208,7 +207,6 @@ const typeInput = ref(props.type);
208
207
  class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
209
208
  :size="23"
210
209
  name="glorious-eye-fill"
211
- :color="tailwindColor('gray', 500)"
212
210
  @click="typeInput = 'text'"
213
211
  ></GIcon>
214
212
  <GIcon
@@ -216,7 +214,6 @@ const typeInput = ref(props.type);
216
214
  class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
217
215
  :size="23"
218
216
  name="glorious-eye-off-fill"
219
- :color="tailwindColor('gray', 500)"
220
217
  @click="typeInput = 'password'"
221
218
  ></GIcon>
222
219
  </div>
@@ -236,7 +233,6 @@ const typeInput = ref(props.type);
236
233
  class="glorious-input-icon"
237
234
  :name="props.icon"
238
235
  :size="computeIconSize"
239
- :color="$tailwindColor('gray', '500')"
240
236
  />
241
237
  </div>
242
238
  <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 }}Z
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: animation-opacity 0.2s normal forwards;
155
+ animation: animationOpacity 0.2s normal forwards;
159
156
  }
160
157
  }
161
- @keyframes animation-opacity {
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 animation-mobile {
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" />
@@ -11,7 +11,6 @@ const defaultOptions = {
11
11
  Accept: "application/json"
12
12
  },
13
13
  bodyType: "normal",
14
- body: {},
15
14
  credentials: "same-origin"
16
15
  };
17
16
  export default function(url, options = defaultOptions) {
@@ -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;
package/package.json CHANGED
@@ -1,53 +1,54 @@
1
- {
2
- "version": "1.1.9",
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
- "exports": {
9
- ".": {
10
- "types": "./dist/types.d.ts",
11
- "import": "./dist/module.mjs",
12
- "require": "./dist/module.cjs"
13
- }
14
- },
15
- "main": "./dist/module.cjs",
16
- "types": "./dist/types.d.ts",
17
- "files": [
18
- "dist"
19
- ],
20
- "scripts": {
21
- "prepack": "nuxt-module-build build",
22
- "dev": "nuxi dev playground",
23
- "dev:build": "nuxi build playground",
24
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
25
- "release": "npm run prepack && npm publish",
26
- "lint": "eslint .",
27
- "test": "vitest run",
28
- "test:watch": "vitest watch"
29
- },
30
- "dependencies": {
31
- "@nuxt/kit": "^3.11.1",
32
- "@nuxtjs/tailwindcss": "^6.12.0",
33
- "@pinia/nuxt": "^0.5.1",
34
- "defu": "^6.1.4",
35
- "pinia": "^2.1.7",
36
- "sass": "^1.77.5"
37
- },
38
- "devDependencies": {
39
- "@nuxt/devtools": "latest",
40
- "@nuxt/eslint-config": "^0.2.0",
41
- "@nuxt/module-builder": "^0.5.5",
42
- "@nuxt/schema": "^3.11.1",
43
- "@nuxt/test-utils": "^3.12.0",
44
- "@types/node": "^20.11.29",
45
- "changelogen": "^0.5.5",
46
- "eslint": "^8.57.0",
47
- "nuxt": "^3.13.2",
48
- "vitest": "^1.4.0"
49
- },
50
- "overrides": {
51
- "vue": "latest"
52
- }
53
- }
1
+ {
2
+ "version": "1.2.1-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;
@@ -1,5 +0,0 @@
1
- import colors from "tailwindcss/colors.js";
2
- export default function tailwindColor(name, range) {
3
- const tailwindColor2 = colors;
4
- return tailwindColor2[name][range];
5
- }