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
@@ -1,143 +0,0 @@
1
- <script lang="ts" setup>
2
- import { ref, watch } from "#imports";
3
-
4
- const props = defineProps({
5
- name: {
6
- required: true,
7
- type: String,
8
- default: "",
9
- },
10
- color: {
11
- required: false,
12
- type: String,
13
- default: "#000",
14
- },
15
- size: {
16
- required: false,
17
- type: Number,
18
- default: 20,
19
- },
20
- stroke: {
21
- required: false,
22
- type: [Number, null],
23
- default: null,
24
- },
25
- });
26
-
27
- const icon = ref("");
28
-
29
- const methods = {
30
- computeProps: (icon: any) => {
31
- //color
32
- icon = icon.replaceAll("\n", " ");
33
- //stroke
34
- icon = icon
35
- .split(" ")
36
- .map((item: any) =>
37
- item.includes('stroke="') && typeof props.color !== "undefined"
38
- ? 'stroke="' + props.color + '"'
39
- : item
40
- )
41
- .join(" ");
42
-
43
- //fill
44
- if (typeof props.color !== "undefined") {
45
- icon = icon
46
- .split(" ")
47
- .map((item: any) => {
48
- if (!item.includes('fill="none"')) {
49
- if (item.includes('fill="') && !item.includes('"/>'))
50
- return `fill="${props.color}"`;
51
- else if (item.includes('fill="') && item.includes('"/>'))
52
- return `fill="${props.color}"/>`;
53
- else return item;
54
- } else return item;
55
- })
56
- .join(" ");
57
- }
58
-
59
- //size
60
- icon = icon.replaceAll("\n", " ");
61
-
62
- //width
63
- icon = icon
64
- .split(" ")
65
- .map((item: any) =>
66
- item.includes('width="') &&
67
- !item.includes("stroke-width") &&
68
- typeof props.size !== "undefined"
69
- ? 'width="' + props.size + '"'
70
- : item
71
- )
72
- .join(" ");
73
-
74
- icon = icon
75
- .split(" ")
76
- .map((item: any) =>
77
- item.includes('height="') && typeof props.size !== "undefined"
78
- ? 'height="' + props.size + '"'
79
- : item
80
- )
81
- .join(" ");
82
-
83
- //stroke
84
- if (props.stroke !== null) {
85
- icon = icon.replaceAll("\n", " ");
86
- icon = icon
87
- .split(" ")
88
- .map((item: any) =>
89
- item.includes("stroke-width") && typeof props.stroke !== "undefined"
90
- ? 'stroke-width="' + props.stroke + '"'
91
- : item
92
- )
93
- .join(" ");
94
- }
95
-
96
- return icon;
97
- },
98
- };
99
-
100
- async function getIcon() {
101
- try {
102
- const iconsImport = import.meta.glob("assets/icons/**/**.svg", {
103
- query: "?raw",
104
- eager: false,
105
- });
106
- let rawIcon = "";
107
- if (typeof iconsImport[`/assets/icons/${props.name}.svg`] !== "undefined") {
108
- const icon: any = await iconsImport[`/assets/icons/${props.name}.svg`]();
109
- rawIcon = icon.default;
110
- } else {
111
- const staticAssets = import.meta.glob("../../../assets/icons/**/**.svg", {
112
- query: "?raw",
113
- eager: false,
114
- });
115
-
116
- const icon: any = await staticAssets[
117
- `../../../assets/icons/${props.name}.svg`
118
- ]();
119
- rawIcon = icon.default;
120
- }
121
-
122
- icon.value = methods.computeProps(rawIcon);
123
- } catch (e) {
124
- console.error(
125
- `glorious error -> Icon '${props.name}' doesn't exist in 'assets/icons'`
126
- );
127
- }
128
- }
129
-
130
- await getIcon();
131
-
132
- watch(
133
- () => props,
134
- () => getIcon(),
135
- {
136
- deep: true,
137
- }
138
- );
139
- </script>
140
- <template>
141
- <!-- eslint-disable vue/no-v-html -->
142
- <div class="w-max h-max" v-html="icon" />
143
- </template>
@@ -1,35 +0,0 @@
1
- import { defineNuxtPlugin } from "#app";
2
- export default defineNuxtPlugin(() => {
3
- const methods = {
4
- addBlurBackground: (key) => {
5
- const backgroundBlur = document.createElement("div");
6
- backgroundBlur.classList.add("bg-blur-drawer");
7
- const nuxt = document.getElementById("__nuxt");
8
- nuxt.appendChild(backgroundBlur);
9
- backgroundBlur.addEventListener("click", () => {
10
- const componentId = document.getElementById(key);
11
- componentId.classList.replace("open", "close");
12
- backgroundBlur.remove();
13
- });
14
- },
15
- drawer: {
16
- provide: (key) => {
17
- let drawer = document.getElementById(key);
18
- if (drawer.classList.contains("close")) {
19
- drawer.classList.remove("hidden");
20
- drawer.classList.replace("close", "open");
21
- methods.addBlurBackground(key);
22
- } else {
23
- drawer.classList.replace("open", "close");
24
- const bgBlur = document.querySelector(".bg-blur-drawer");
25
- bgBlur?.remove();
26
- }
27
- }
28
- }
29
- };
30
- return {
31
- provide: {
32
- drawer: (key = "drawer") => methods.drawer.provide(key)
33
- }
34
- };
35
- });
@@ -1 +0,0 @@
1
- export default function gTailwindColor(name: string, range: number): any;
@@ -1,5 +0,0 @@
1
- import colors from "tailwindcss/colors.js";
2
- export default function gTailwindColor(name, range) {
3
- const gTailwindColor2 = colors;
4
- return gTailwindColor2[name][range];
5
- }