nuxt-glorious 1.2.0 → 1.2.9-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.
Files changed (151) hide show
  1. package/dist/module.d.mts +38 -1
  2. package/dist/module.d.ts +38 -1
  3. package/dist/module.json +2 -2
  4. package/dist/module.mjs +45 -36
  5. package/dist/runtime/assets/icons/glorious-eye-fill.svg +1 -1
  6. package/dist/runtime/assets/icons/glorious-eye-off-fill.svg +1 -1
  7. package/dist/runtime/assets/icons/glorious-star-fill.svg +3 -0
  8. package/dist/runtime/assets/icons/glorious-star-half.svg +3 -0
  9. package/dist/runtime/assets/icons/glorious-star-line.svg +3 -0
  10. package/dist/runtime/components/G/Alert.vue +16 -0
  11. package/dist/runtime/components/G/Avatar.vue +16 -0
  12. package/dist/runtime/components/G/Breadcrumb.vue +37 -0
  13. package/dist/runtime/components/G/Button.vue +13 -154
  14. package/dist/runtime/components/G/Checkbox.vue +26 -0
  15. package/dist/runtime/components/G/CountDown.vue +33 -43
  16. package/dist/runtime/components/G/Drawer.vue +16 -75
  17. package/dist/runtime/components/G/Dropdown.vue +17 -31
  18. package/dist/runtime/components/G/ErrorText.vue +7 -11
  19. package/dist/runtime/components/G/File.vue +25 -117
  20. package/dist/runtime/components/G/Icon.vue +125 -0
  21. package/dist/runtime/components/G/Input.vue +126 -250
  22. package/dist/runtime/components/G/Loading.vue +4 -21
  23. package/dist/runtime/components/G/Modal.vue +51 -138
  24. package/dist/runtime/components/G/Paginate.vue +24 -57
  25. package/dist/runtime/components/G/Radio.vue +18 -27
  26. package/dist/runtime/components/G/Rating.vue +30 -0
  27. package/dist/runtime/components/G/Select.vue +27 -112
  28. package/dist/runtime/components/G/Switch.vue +28 -0
  29. package/dist/runtime/components/G/Tab.vue +80 -44
  30. package/dist/runtime/components/G/Table.vue +62 -0
  31. package/dist/runtime/components/G/textarea.vue +17 -120
  32. package/dist/runtime/components/G/timeline.vue +28 -0
  33. package/dist/runtime/components/helper.d.ts +3 -0
  34. package/dist/runtime/components/helper.mjs +37 -0
  35. package/dist/runtime/components/props/Alert.d.ts +8 -0
  36. package/dist/runtime/components/props/Alert.mjs +4 -0
  37. package/dist/runtime/components/props/Avatar.d.ts +12 -0
  38. package/dist/runtime/components/props/Avatar.mjs +9 -0
  39. package/dist/runtime/components/props/Breadcrumb.d.ts +26 -0
  40. package/dist/runtime/components/props/Breadcrumb.mjs +11 -0
  41. package/dist/runtime/components/props/Button.d.ts +47 -0
  42. package/dist/runtime/components/props/Button.mjs +14 -0
  43. package/dist/runtime/components/props/CheckBox.d.ts +23 -0
  44. package/dist/runtime/components/props/CheckBox.mjs +7 -0
  45. package/dist/runtime/components/props/CountDown.d.ts +7 -0
  46. package/dist/runtime/components/props/CountDown.mjs +6 -0
  47. package/dist/runtime/components/props/Drawer.d.ts +8 -0
  48. package/dist/runtime/components/props/Drawer.mjs +7 -0
  49. package/dist/runtime/components/props/ErrorText.d.ts +8 -0
  50. package/dist/runtime/components/props/ErrorText.mjs +4 -0
  51. package/dist/runtime/components/props/File.d.ts +28 -0
  52. package/dist/runtime/components/props/File.mjs +9 -0
  53. package/dist/runtime/components/props/Icon.d.ts +23 -0
  54. package/dist/runtime/components/props/Icon.mjs +7 -0
  55. package/dist/runtime/components/props/Input.d.ts +91 -0
  56. package/dist/runtime/components/props/Input.mjs +50 -0
  57. package/dist/runtime/components/props/Loading.d.ts +18 -0
  58. package/dist/runtime/components/props/Loading.mjs +6 -0
  59. package/dist/runtime/components/props/Modal.d.ts +48 -0
  60. package/dist/runtime/components/props/Modal.mjs +38 -0
  61. package/dist/runtime/components/props/Paginate.d.ts +18 -0
  62. package/dist/runtime/components/props/Paginate.mjs +17 -0
  63. package/dist/runtime/components/props/Radio.d.ts +33 -0
  64. package/dist/runtime/components/props/Radio.mjs +9 -0
  65. package/dist/runtime/components/props/Select.d.ts +61 -0
  66. package/dist/runtime/components/props/Select.mjs +23 -0
  67. package/dist/runtime/components/props/Switch.d.ts +13 -0
  68. package/dist/runtime/components/props/Switch.mjs +5 -0
  69. package/dist/runtime/components/props/Tab.d.ts +21 -0
  70. package/dist/runtime/components/props/Tab.mjs +7 -0
  71. package/dist/runtime/components/props/Table.d.ts +49 -0
  72. package/dist/runtime/components/props/Table.mjs +19 -0
  73. package/dist/runtime/components/props/Textarea.d.ts +38 -0
  74. package/dist/runtime/components/props/Textarea.mjs +14 -0
  75. package/dist/runtime/components/props/Timeline.d.ts +11 -0
  76. package/dist/runtime/components/props/Timeline.mjs +7 -0
  77. package/dist/runtime/components/props/common/index.d.ts +161 -0
  78. package/dist/runtime/components/props/common/index.mjs +147 -0
  79. package/dist/runtime/composables/useGloriousCore.d.ts +1 -1
  80. package/dist/runtime/composables/useGloriousCore.mjs +1 -1
  81. package/dist/runtime/composables/useGloriousFetch.d.ts +4 -3
  82. package/dist/runtime/composables/useGloriousFetch.mjs +6 -5
  83. package/dist/runtime/middlewares/AuthStrategy.mjs +2 -6
  84. package/dist/runtime/middlewares/ResponseGloriousStore.mjs +9 -0
  85. package/dist/runtime/plugins/InputComponent.d.ts +2 -0
  86. package/dist/runtime/plugins/InputComponent.mjs +13 -0
  87. package/dist/runtime/plugins/module.d.ts +4 -0
  88. package/dist/runtime/plugins/module.mjs +94 -0
  89. package/dist/runtime/stores/GloriousStore.d.ts +0 -1
  90. package/dist/runtime/stores/GloriousStore.mjs +3 -13
  91. package/dist/runtime/style/components/alert.css +33 -0
  92. package/dist/runtime/style/components/alert.scss +7 -0
  93. package/dist/runtime/style/components/avatar.css +57 -0
  94. package/dist/runtime/style/components/avatar.scss +13 -0
  95. package/dist/runtime/style/components/breadcrumb.css +6 -0
  96. package/dist/runtime/style/components/breadcrumb.scss +6 -0
  97. package/dist/runtime/style/components/button.css +113 -0
  98. package/dist/runtime/style/components/button.scss +30 -0
  99. package/dist/runtime/style/components/checkbox.css +94 -0
  100. package/dist/runtime/style/components/checkbox.scss +52 -0
  101. package/dist/runtime/{assets/style → style}/components/drawer.css +14 -18
  102. package/dist/runtime/style/components/drawer.scss +57 -0
  103. package/dist/runtime/style/components/dropdown.scss +19 -0
  104. package/dist/runtime/style/components/editor.scss +4 -0
  105. package/dist/runtime/style/components/file.css +134 -0
  106. package/dist/runtime/style/components/file.scss +19 -0
  107. package/dist/runtime/style/components/input.css +187 -0
  108. package/dist/runtime/style/components/input.scss +87 -0
  109. package/dist/runtime/style/components/loading.css +43 -0
  110. package/dist/runtime/style/components/loading.scss +92 -0
  111. package/dist/runtime/style/components/modal.css +66 -0
  112. package/dist/runtime/style/components/modal.scss +76 -0
  113. package/dist/runtime/style/components/paginate.scss +18 -0
  114. package/dist/runtime/style/components/radio.css +121 -0
  115. package/dist/runtime/style/components/radio.scss +59 -0
  116. package/dist/runtime/style/components/rating.css +26 -0
  117. package/dist/runtime/style/components/rating.scss +25 -0
  118. package/dist/runtime/style/components/select.css +46 -0
  119. package/dist/runtime/style/components/select.scss +40 -0
  120. package/dist/runtime/style/components/switch.css +61 -0
  121. package/dist/runtime/style/components/switch.scss +74 -0
  122. package/dist/runtime/{assets/style → style}/components/tab.css +3 -3
  123. package/dist/runtime/style/components/tab.scss +11 -0
  124. package/dist/runtime/style/components/table.css +99 -0
  125. package/dist/runtime/style/components/table.scss +41 -0
  126. package/dist/runtime/style/components/textarea.css +64 -0
  127. package/dist/runtime/style/components/textarea.scss +43 -0
  128. package/dist/runtime/style/components/timeline.css +47 -0
  129. package/dist/runtime/style/components/timeline.scss +40 -0
  130. package/dist/runtime/style/mixin.css +0 -0
  131. package/dist/runtime/style/mixin.scss +40 -0
  132. package/dist/runtime/style/variable.css +0 -0
  133. package/dist/runtime/style/variable.scss +19 -0
  134. package/dist/types.d.mts +2 -10
  135. package/dist/types.d.ts +2 -10
  136. package/package.json +9 -7
  137. package/dist/runtime/assets/style/components/buttons.css +0 -107
  138. package/dist/runtime/assets/style/components/file.css +0 -65
  139. package/dist/runtime/assets/style/components/input.css +0 -91
  140. package/dist/runtime/assets/style/components/modal.css +0 -57
  141. package/dist/runtime/assets/style/components/select.css +0 -54
  142. package/dist/runtime/assets/style/components/textarea.css +0 -64
  143. package/dist/runtime/components/G/Breadcrump.vue +0 -46
  144. package/dist/runtime/components/G/Icon/index.vue +0 -143
  145. package/dist/runtime/plugins/Drawer.mjs +0 -35
  146. package/dist/runtime/utils/gTailwindColor.d.ts +0 -1
  147. package/dist/runtime/utils/gTailwindColor.mjs +0 -5
  148. /package/dist/runtime/{plugins/Drawer.d.ts → middlewares/ResponseGloriousStore.d.ts} +0 -0
  149. /package/dist/runtime/{assets/style → style}/components/dropdown.css +0 -0
  150. /package/dist/runtime/{assets/style → style}/components/editor.css +0 -0
  151. /package/dist/runtime/{assets/style → style}/components/paginate.css +0 -0
package/dist/module.d.mts CHANGED
@@ -1,7 +1,44 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
+ fetch?: {
5
+ baseURL?: string;
6
+ credentials?: 'same-origin' | 'include';
7
+ };
8
+ seo?: {
9
+ suffix?: string;
10
+ title?: string;
11
+ description?: string;
12
+ };
13
+ auth?: {
14
+ cookie?: {
15
+ name?: string;
16
+ httpOnly?: boolean;
17
+ };
18
+ redirect?: {
19
+ logout?: string;
20
+ login?: string;
21
+ };
22
+ strategy?: {
23
+ provider?: 'laravel-passport' | '';
24
+ endpoints?: {
25
+ userInfo?: {
26
+ url?: string;
27
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH';
28
+ pick?: string;
29
+ };
30
+ };
31
+ };
32
+ };
33
+ components: {
34
+ alert: {
35
+ props: {
36
+ color: string;
37
+ };
38
+ };
39
+ };
4
40
  }
41
+
5
42
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
43
 
7
- export { type ModuleOptions, _default as default };
44
+ export { _default as default };
package/dist/module.d.ts CHANGED
@@ -1,7 +1,44 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
+ fetch?: {
5
+ baseURL?: string;
6
+ credentials?: 'same-origin' | 'include';
7
+ };
8
+ seo?: {
9
+ suffix?: string;
10
+ title?: string;
11
+ description?: string;
12
+ };
13
+ auth?: {
14
+ cookie?: {
15
+ name?: string;
16
+ httpOnly?: boolean;
17
+ };
18
+ redirect?: {
19
+ logout?: string;
20
+ login?: string;
21
+ };
22
+ strategy?: {
23
+ provider?: 'laravel-passport' | '';
24
+ endpoints?: {
25
+ userInfo?: {
26
+ url?: string;
27
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH';
28
+ pick?: string;
29
+ };
30
+ };
31
+ };
32
+ };
33
+ components: {
34
+ alert: {
35
+ props: {
36
+ color: string;
37
+ };
38
+ };
39
+ };
4
40
  }
41
+
5
42
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
43
 
7
- export { type ModuleOptions, _default as default };
44
+ export { _default as default };
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "glorious",
2
+ "name": "nuxt-glorious",
3
3
  "configKey": "glorious",
4
- "version": "1.2.0"
4
+ "version": "1.2.9-5"
5
5
  }
package/dist/module.mjs CHANGED
@@ -1,47 +1,51 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addImportsDir, addComponentsDir, addPlugin, addRouteMiddleware } from '@nuxt/kit';
2
2
  import defu from 'defu';
3
3
 
4
+ const defaultModuleOption = {
5
+ fetch: {
6
+ baseURL: "/",
7
+ credentials: "same-origin"
8
+ },
9
+ seo: {
10
+ suffix: "",
11
+ title: "",
12
+ description: ""
13
+ },
14
+ auth: {
15
+ cookie: {
16
+ name: "ga-token",
17
+ httpOnly: false
18
+ },
19
+ redirect: {
20
+ login: "/login",
21
+ logout: "/logout"
22
+ },
23
+ strategy: {
24
+ provider: ""
25
+ }
26
+ },
27
+ components: {
28
+ alert: {
29
+ props: {
30
+ color: "green"
31
+ }
32
+ }
33
+ }
34
+ };
35
+
4
36
  const module = defineNuxtModule({
5
37
  meta: {
6
- name: "glorious",
38
+ name: "nuxt-glorious",
7
39
  configKey: "glorious"
8
40
  },
9
41
  // Default configuration options of the Nuxt module
10
42
  defaults: {},
11
43
  async setup(options, nuxt) {
12
44
  const resolver = createResolver(import.meta.url);
13
- nuxt.options.runtimeConfig.public.glorious = defu(nuxt.options.glorious, {
14
- fetch: {
15
- baseURL: "/",
16
- credentials: "same-origin"
17
- },
18
- seo: {
19
- suffix: "",
20
- title: "",
21
- description: ""
22
- },
23
- auth: {
24
- cookie: {
25
- name: "ga-token",
26
- httpOnly: false
27
- },
28
- redirect: {
29
- logout: "/login",
30
- login: "/login"
31
- },
32
- strategy: {
33
- provider: "",
34
- //[laravel-passport]
35
- endpoints: {
36
- userInfo: {
37
- url: "/",
38
- method: "GET",
39
- pick: ""
40
- }
41
- }
42
- }
43
- }
44
- });
45
+ nuxt.options.runtimeConfig.public.glorious = defu(
46
+ nuxt.options.glorious,
47
+ defaultModuleOption
48
+ );
45
49
  await installModule("@nuxtjs/tailwindcss", {
46
50
  // module configuration
47
51
  exposeConfig: true,
@@ -49,15 +53,15 @@ const module = defineNuxtModule({
49
53
  darkMode: "class",
50
54
  content: {
51
55
  files: [
52
- resolver.resolve("./runtime/components/G/**/*.{vue,mjs,ts}"),
56
+ resolver.resolve("./runtime/components/**/*.{vue,mjs,ts}"),
53
57
  resolver.resolve("./runtime/*.{mjs,js,ts}")
54
58
  ]
55
59
  }
56
60
  }
57
61
  });
58
62
  await installModule("@pinia/nuxt");
63
+ await installModule("@nuxt/image");
59
64
  addImportsDir(resolver.resolve("runtime/composables"));
60
- addImportsDir(resolver.resolve("runtime/utils"));
61
65
  addImportsDir(resolver.resolve("runtime/stores"));
62
66
  addImportsDir(resolver.resolve("runtime/middlewares"));
63
67
  addComponentsDir({
@@ -71,12 +75,17 @@ const module = defineNuxtModule({
71
75
  });
72
76
  });
73
77
  addPlugin(resolver.resolve("./runtime/plugins/glorious-app-setting"));
74
- addPlugin(resolver.resolve("./runtime/plugins/Drawer"));
78
+ addPlugin(resolver.resolve("./runtime/plugins/InputComponent"));
75
79
  addRouteMiddleware({
76
80
  name: "g-auth-strategy",
77
81
  path: resolver.resolve("./runtime/middlewares/AuthStrategy"),
78
82
  global: true
79
83
  });
84
+ addRouteMiddleware({
85
+ name: "response-glorious-store",
86
+ path: resolver.resolve("./runtime/middlewares/ResponseGloriousStore"),
87
+ global: true
88
+ });
80
89
  addRouteMiddleware({
81
90
  name: "g-auth",
82
91
  path: resolver.resolve("./runtime/middlewares/Auth")
@@ -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">
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.99999 15L4.12199 18.59L5.71999 11.89L0.48999 7.41L7.35499 6.86L9.99999 0.5L12.645 6.86L19.511 7.41L14.28 11.89L15.878 18.59L9.99999 15Z" fill="black"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.99999 12.656L12.817 14.376L12.051 11.166L14.558 9.019L11.268 8.755L9.99999 5.708V12.656ZM9.99999 15L4.12199 18.59L5.71999 11.89L0.48999 7.41L7.35499 6.86L9.99999 0.5L12.645 6.86L19.511 7.41L14.28 11.89L15.878 18.59L9.99999 15Z" fill="black"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="23" viewBox="0 0 24 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M11.9999 18.26L4.94691 22.208L6.52191 14.28L0.586914 8.792L8.61391 7.84L11.9999 0.5L15.3859 7.84L23.4129 8.792L17.4779 14.28L19.0529 22.208L11.9999 18.26ZM11.9999 15.968L16.2469 18.345L15.2979 13.572L18.8709 10.267L14.0379 9.694L11.9999 5.275L9.96191 9.695L5.12891 10.267L8.70191 13.572L7.75291 18.345L11.9999 15.968Z" fill="black"/>
3
+ </svg>
@@ -0,0 +1,16 @@
1
+ <script lang="ts" setup>
2
+ import _props from './../props/Alert'
3
+
4
+ const props = defineProps(_props)
5
+ </script>
6
+
7
+ <template>
8
+ <div
9
+ class="glorious-alert"
10
+ :class="[`color-${props.color}`]"
11
+ >
12
+ <slot />
13
+ </div>
14
+ </template>
15
+
16
+ <style lang="scss" src="../../style/components/alert.scss" />
@@ -0,0 +1,16 @@
1
+ <script lang="ts" setup>
2
+ import _props from '../props/Avatar'
3
+
4
+ const props: any = defineProps(_props)
5
+ </script>
6
+
7
+ <template>
8
+ <div
9
+ class="glorious-avatar"
10
+ :class="[`size-${props.size}`, `rounded-${props.rounded}`]"
11
+ >
12
+ <nuxt-img :src="props.src" />
13
+ </div>
14
+ </template>
15
+
16
+ <style lang="scss" src="../../style/components/avatar.scss" />
@@ -0,0 +1,37 @@
1
+ <script lang="ts" setup>
2
+ import _props from '../props/Breadcrumb'
3
+
4
+ const props: any = defineProps(_props)
5
+ </script>
6
+
7
+ <template>
8
+ <div class="glorious-breadcrumb flex gap-1 flex-wrap">
9
+ <div
10
+ v-for="(item, index) in props.items"
11
+ :key="index"
12
+ class="flex items-center gap-1 flex-wrap"
13
+ >
14
+ <GIcon
15
+ v-if="item.icon"
16
+ :name="`${item.icon}`"
17
+ />
18
+ <nuxt-link
19
+ v-if="item.to"
20
+ class="glorious-breadcrumb-link"
21
+ :to="`${item.to}`"
22
+ >
23
+ {{ item.text }}
24
+ </nuxt-link>
25
+ <span
26
+ v-else
27
+ class="glorious-breadcrumb-text"
28
+ :class="[index + 1 === props.items.length ? 'end-text' : '']"
29
+ >
30
+ {{ item.text }}
31
+ </span>
32
+ <span v-if="index + 1 !== props.items.length">{{ props.divider }}</span>
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <style lang="scss" src="../../style/components/breadcrumb.scss" />
@@ -1,41 +1,7 @@
1
1
  <script lang="ts" setup>
2
- const props = defineProps({
3
- color: {
4
- required: false,
5
- default: "primary",
6
- type: String as () => "orange" | "blue" | "gray" | "red" | "primary",
7
- },
8
- size: {
9
- required: false,
10
- default: "md",
11
- type: String as () => "xl" | "lg" | "md" | "sm" | "xsm",
12
- },
13
- outline: {
14
- required: false,
15
- default: false,
16
- type: Boolean,
17
- },
18
- disabled: {
19
- required: false,
20
- default: false,
21
- type: Boolean,
22
- },
23
- loading: {
24
- requried: false,
25
- default: false,
26
- type: Boolean,
27
- },
28
- to: {
29
- requried: false,
30
- default: "",
31
- type: String,
32
- },
33
- ariaLabel: {
34
- requried: false,
35
- default: "",
36
- type: String,
37
- },
38
- });
2
+ import _props from '../props/Button'
3
+
4
+ const props: any = defineProps(_props)
39
5
  </script>
40
6
 
41
7
  <template>
@@ -43,13 +9,17 @@ const props = defineProps({
43
9
  v-if="props.to === ''"
44
10
  :aria-label="props.ariaLabel"
45
11
  :class="[
46
- `glorious-button-${props.color}`,
47
- props.size,
12
+ `glorious-button `,
13
+ `color-${props.color}`,
14
+ `size-${props.size}`,
48
15
  props.outline ? 'outline' : '',
49
16
  ]"
50
17
  :disabled="props.disabled"
51
18
  >
52
- <div v-if="props.loading" class="loading">
19
+ <div
20
+ v-if="props.loading"
21
+ class="loading flex justify-center"
22
+ >
53
23
  <GLoading />
54
24
  </div>
55
25
  <slot v-else />
@@ -59,124 +29,13 @@ const props = defineProps({
59
29
  :to="props.to"
60
30
  :class="[
61
31
  `glorious-button-${props.color}`,
62
- props.size,
32
+ `size-${props.size}`,
63
33
  props.outline ? 'outline' : '',
64
34
  ]"
65
35
  :disabled="props.disabled"
66
36
  >
67
- <div v-if="props.loading" class="loading">
68
- <GLoading />
69
- </div>
70
- <slot v-else />
37
+ <slot />
71
38
  </NuxtLink>
72
39
  </template>
73
40
 
74
- <style>
75
- button:focus-visible {
76
- @apply outline-none;
77
- }
78
-
79
- .xl.glorious-button-orange, .xl.glorious-button-blue, .xl.glorious-button-gray, .xl.glorious-button-red, .xl.glorious-button-primary {
80
- @apply py-2.5;
81
- }
82
- .xl.glorious-button-orange > div.loading > div > div, .xl.glorious-button-blue > div.loading > div > div, .xl.glorious-button-gray > div.loading > div > div, .xl.glorious-button-red > div.loading > div > div, .xl.glorious-button-primary > div.loading > div > div {
83
- @apply w-[24px] !important;
84
- }
85
- .lg.glorious-button-orange, .lg.glorious-button-blue, .lg.glorious-button-gray, .lg.glorious-button-red, .lg.glorious-button-primary {
86
- @apply py-2;
87
- }
88
- .lg.glorious-button-orange > div.loading > div > div, .lg.glorious-button-blue > div.loading > div > div, .lg.glorious-button-gray > div.loading > div > div, .lg.glorious-button-red > div.loading > div > div, .lg.glorious-button-primary > div.loading > div > div {
89
- @apply w-[24px] !important;
90
- }
91
- .md.glorious-button-orange, .md.glorious-button-blue, .md.glorious-button-gray, .md.glorious-button-red, .md.glorious-button-primary {
92
- @apply py-1.5;
93
- }
94
- .md.glorious-button-orange > div.loading > div > div, .md.glorious-button-blue > div.loading > div > div, .md.glorious-button-gray > div.loading > div > div, .md.glorious-button-red > div.loading > div > div, .md.glorious-button-primary > div.loading > div > div {
95
- @apply w-[24px] !important;
96
- }
97
- .sm.glorious-button-orange, .sm.glorious-button-blue, .sm.glorious-button-gray, .sm.glorious-button-red, .sm.glorious-button-primary {
98
- @apply py-1;
99
- }
100
- .sm.glorious-button-orange > div.loading > div > div, .sm.glorious-button-blue > div.loading > div > div, .sm.glorious-button-gray > div.loading > div > div, .sm.glorious-button-red > div.loading > div > div, .sm.glorious-button-primary > div.loading > div > div {
101
- @apply w-[24px] !important;
102
- }
103
- .xsm.glorious-button-orange, .xsm.glorious-button-blue, .xsm.glorious-button-gray, .xsm.glorious-button-red, .xsm.glorious-button-primary {
104
- @apply py-0.5;
105
- }
106
- .xsm.glorious-button-orange > div.loading > div > div, .xsm.glorious-button-blue > div.loading > div > div, .xsm.glorious-button-gray > div.loading > div > div, .xsm.glorious-button-red > div.loading > div > div, .xsm.glorious-button-primary > div.loading > div > div {
107
- @apply w-[24px] !important;
108
- }
109
-
110
- .outline.glorious-button-orange, .outline.glorious-button-blue, .outline.glorious-button-gray, .outline.glorious-button-red, .outline.glorious-button-primary {
111
- @apply bg-transparent border outline-none;
112
- }
113
-
114
- .glorious-button-orange > div.loading, .glorious-button-blue > div.loading, .glorious-button-gray > div.loading, .glorious-button-red > div.loading, .glorious-button-primary > div.loading {
115
- @apply flex justify-center items-center;
116
- }
117
-
118
- .glorious-button-primary {
119
- @apply bg-green-700 hover:bg-green-600 rounded-md text-white border-green-500 px-3;
120
- }
121
- .glorious-button-primary.outline {
122
- @apply text-gray-500 hover:bg-green-100;
123
- }
124
- .glorious-button-primary:disabled {
125
- @apply cursor-not-allowed;
126
- }
127
- .glorious-button-primary:disabled:not(:disabled) {
128
- @apply bg-green-300;
129
- }
130
-
131
- .glorious-button-red {
132
- @apply bg-red-500 hover:bg-red-600 rounded-md text-white border-red-500 px-3;
133
- }
134
- .glorious-button-red.outline {
135
- @apply text-gray-500 hover:bg-red-100;
136
- }
137
- .glorious-button-red:disabled {
138
- @apply cursor-not-allowed;
139
- }
140
- .glorious-button-red:disabled:not(:disabled) {
141
- @apply bg-red-300;
142
- }
143
-
144
- .glorious-button-gray {
145
- @apply bg-gray-500 hover:bg-gray-600 rounded-md text-white border-gray-500 px-3;
146
- }
147
- .glorious-button-gray.outline {
148
- @apply text-gray-500 hover:bg-gray-100;
149
- }
150
- .glorious-button-gray:disabled {
151
- @apply cursor-not-allowed;
152
- }
153
- .glorious-button-gray:disabled:not(:disabled) {
154
- @apply bg-gray-300;
155
- }
156
-
157
- .glorious-button-blue {
158
- @apply bg-blue-500 hover:bg-blue-600 rounded-md text-white border-blue-500 px-3;
159
- }
160
- .glorious-button-blue.outline {
161
- @apply text-gray-500 hover:bg-blue-100;
162
- }
163
- .glorious-button-blue:disabled {
164
- @apply cursor-not-allowed;
165
- }
166
- .glorious-button-blue:disabled:not(:disabled) {
167
- @apply bg-blue-300;
168
- }
169
-
170
- .glorious-button-orange {
171
- @apply bg-orange-500 hover:bg-orange-600 rounded-md text-white border-orange-500 px-3;
172
- }
173
- .glorious-button-orange.outline {
174
- @apply text-gray-500 hover:bg-orange-100;
175
- }
176
- .glorious-button-orange:disabled {
177
- @apply cursor-not-allowed;
178
- }
179
- .glorious-button-orange:disabled:not(:disabled) {
180
- @apply bg-orange-300;
181
- }
182
- </style>
41
+ <style lang="scss" src="../../style/components/button.scss" />
@@ -0,0 +1,26 @@
1
+ <script lang="ts" setup>
2
+ import _props from '../props/CheckBox'
3
+
4
+ const props: any = defineProps(_props)
5
+ const model = defineModel()
6
+ const inputFunction = (event: any) => (model.value = event.target.checked)
7
+
8
+ model.value = props.checked
9
+ </script>
10
+
11
+ <template>
12
+ <label
13
+ class="glorious-checkbox"
14
+ :class="[`color-${props.color}`, `size-${props.size}`]"
15
+ >
16
+ <input
17
+ type="checkbox"
18
+ :checked="props.checked"
19
+ :disabled="props.disabled"
20
+ @input="inputFunction($event)"
21
+ />
22
+ <div></div>
23
+ </label>
24
+ </template>
25
+
26
+ <style lang="scss" src="../../style/components/checkbox.scss" />
@@ -1,69 +1,59 @@
1
1
  <script lang="ts" setup>
2
- import { onMounted, ref, useId, useSlots } from "#imports";
2
+ import { onMounted, ref, useId, useSlots } from '#imports'
3
+ import _props from '../props/CountDown'
4
+
5
+ const isEnd = ref<Boolean>(false)
6
+ const props = defineProps(_props)
7
+ const slot = useSlots()
8
+ const id = useId()
3
9
 
4
- const isEnd = ref<Boolean>(false);
5
- const props = defineProps({
6
- second: {
7
- required: true,
8
- type: Number,
9
- },
10
- className: {
11
- required: true,
12
- type: String,
13
- default: "flex text-gray-500 font-medium",
14
- },
15
- });
16
- const slot = useSlots();
17
- const id = useId();
18
10
  onMounted(() => {
19
- const currentSecond = props.second;
20
- let second = props.second;
11
+ let second = <number>props.second
21
12
  const countInterval = setInterval(() => {
22
13
  try {
23
- second--;
24
- let timeString = "";
14
+ second--
15
+ let timeString = ''
25
16
 
26
- if (currentSecond <= 60)
17
+ if (<number>props.second <= 60)
27
18
  timeString =
28
- "00:" + (second.toString().length === 1 ? "0" + second : second);
19
+ '00:' + (second.toString().length === 1 ? '0' + second : second)
29
20
  else {
30
- let minute: number | string = Math.floor(second / 60);
21
+ let minute: number | string = Math.floor(second / 60)
31
22
  if (minute >= 1) {
32
- const computeSecond = second - minute * 60;
23
+ const computeSecond = second - minute * 60
33
24
  const computeSecond2 =
34
25
  computeSecond.toString().length === 1
35
- ? "0" + computeSecond
36
- : computeSecond;
37
- minute = minute.toString().length === 1 ? "0" + minute : minute;
38
- timeString = minute + ":" + computeSecond2;
26
+ ? '0' + computeSecond
27
+ : computeSecond
28
+ minute = minute.toString().length === 1 ? '0' + minute : minute
29
+ timeString = minute + ':' + computeSecond2
39
30
  } else {
40
31
  timeString =
41
- "00:" + (second.toString().length === 1 ? "0" + second : second);
32
+ '00:' + (second.toString().length === 1 ? '0' + second : second)
42
33
  }
43
34
  }
44
35
 
45
- document.getElementById("countDown" + id).innerText = timeString;
36
+ const countDownElement: any = document.getElementById('countDown' + id)
37
+ countDownElement.innerText = timeString
46
38
 
47
39
  if (second === 0) {
48
- isEnd.value = true;
49
- clearInterval(countInterval);
40
+ isEnd.value = true
41
+ clearInterval(countInterval)
50
42
  }
51
43
  } catch (e) {
52
- clearInterval(countInterval);
44
+ clearInterval(countInterval)
53
45
  }
54
- }, 1000);
55
- });
46
+ }, 1000)
47
+ })
56
48
  </script>
57
49
  <template>
58
- <div>
59
- <span
60
- v-if="isEnd && typeof slot.end === 'undefined'"
61
- :class="props.className"
62
- >
63
- 00:00
64
- </span>
65
- <slot v-if="isEnd" name="end" />
66
- <div v-else :class="props.className">
50
+ <div class="glorious-count-down">
51
+ <span v-if="isEnd && typeof slot.end === 'undefined'"> 00:00 </span>
52
+ <slot
53
+ v-if="isEnd"
54
+ name="end"
55
+ />
56
+ <div v-else>
67
57
  <slot name="one"></slot>
68
58
  <div :id="`countDown` + id" />
69
59
  <slot name="two"></slot>