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.
- package/dist/module.d.mts +38 -1
- package/dist/module.d.ts +38 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +45 -36
- package/dist/runtime/assets/icons/glorious-eye-fill.svg +1 -1
- package/dist/runtime/assets/icons/glorious-eye-off-fill.svg +1 -1
- package/dist/runtime/assets/icons/glorious-star-fill.svg +3 -0
- package/dist/runtime/assets/icons/glorious-star-half.svg +3 -0
- package/dist/runtime/assets/icons/glorious-star-line.svg +3 -0
- package/dist/runtime/components/G/Alert.vue +16 -0
- package/dist/runtime/components/G/Avatar.vue +16 -0
- package/dist/runtime/components/G/Breadcrumb.vue +37 -0
- package/dist/runtime/components/G/Button.vue +13 -154
- package/dist/runtime/components/G/Checkbox.vue +26 -0
- package/dist/runtime/components/G/CountDown.vue +33 -43
- package/dist/runtime/components/G/Drawer.vue +16 -75
- package/dist/runtime/components/G/Dropdown.vue +17 -31
- package/dist/runtime/components/G/ErrorText.vue +7 -11
- package/dist/runtime/components/G/File.vue +25 -117
- package/dist/runtime/components/G/Icon.vue +125 -0
- package/dist/runtime/components/G/Input.vue +126 -250
- package/dist/runtime/components/G/Loading.vue +4 -21
- package/dist/runtime/components/G/Modal.vue +51 -138
- package/dist/runtime/components/G/Paginate.vue +24 -57
- package/dist/runtime/components/G/Radio.vue +18 -27
- package/dist/runtime/components/G/Rating.vue +30 -0
- package/dist/runtime/components/G/Select.vue +27 -112
- package/dist/runtime/components/G/Switch.vue +28 -0
- package/dist/runtime/components/G/Tab.vue +80 -44
- package/dist/runtime/components/G/Table.vue +62 -0
- package/dist/runtime/components/G/textarea.vue +17 -120
- package/dist/runtime/components/G/timeline.vue +28 -0
- package/dist/runtime/components/helper.d.ts +3 -0
- package/dist/runtime/components/helper.mjs +37 -0
- package/dist/runtime/components/props/Alert.d.ts +8 -0
- package/dist/runtime/components/props/Alert.mjs +4 -0
- package/dist/runtime/components/props/Avatar.d.ts +12 -0
- package/dist/runtime/components/props/Avatar.mjs +9 -0
- package/dist/runtime/components/props/Breadcrumb.d.ts +26 -0
- package/dist/runtime/components/props/Breadcrumb.mjs +11 -0
- package/dist/runtime/components/props/Button.d.ts +47 -0
- package/dist/runtime/components/props/Button.mjs +14 -0
- package/dist/runtime/components/props/CheckBox.d.ts +23 -0
- package/dist/runtime/components/props/CheckBox.mjs +7 -0
- package/dist/runtime/components/props/CountDown.d.ts +7 -0
- package/dist/runtime/components/props/CountDown.mjs +6 -0
- package/dist/runtime/components/props/Drawer.d.ts +8 -0
- package/dist/runtime/components/props/Drawer.mjs +7 -0
- package/dist/runtime/components/props/ErrorText.d.ts +8 -0
- package/dist/runtime/components/props/ErrorText.mjs +4 -0
- package/dist/runtime/components/props/File.d.ts +28 -0
- package/dist/runtime/components/props/File.mjs +9 -0
- package/dist/runtime/components/props/Icon.d.ts +23 -0
- package/dist/runtime/components/props/Icon.mjs +7 -0
- package/dist/runtime/components/props/Input.d.ts +91 -0
- package/dist/runtime/components/props/Input.mjs +50 -0
- package/dist/runtime/components/props/Loading.d.ts +18 -0
- package/dist/runtime/components/props/Loading.mjs +6 -0
- package/dist/runtime/components/props/Modal.d.ts +48 -0
- package/dist/runtime/components/props/Modal.mjs +38 -0
- package/dist/runtime/components/props/Paginate.d.ts +18 -0
- package/dist/runtime/components/props/Paginate.mjs +17 -0
- package/dist/runtime/components/props/Radio.d.ts +33 -0
- package/dist/runtime/components/props/Radio.mjs +9 -0
- package/dist/runtime/components/props/Select.d.ts +61 -0
- package/dist/runtime/components/props/Select.mjs +23 -0
- package/dist/runtime/components/props/Switch.d.ts +13 -0
- package/dist/runtime/components/props/Switch.mjs +5 -0
- package/dist/runtime/components/props/Tab.d.ts +21 -0
- package/dist/runtime/components/props/Tab.mjs +7 -0
- package/dist/runtime/components/props/Table.d.ts +49 -0
- package/dist/runtime/components/props/Table.mjs +19 -0
- package/dist/runtime/components/props/Textarea.d.ts +38 -0
- package/dist/runtime/components/props/Textarea.mjs +14 -0
- package/dist/runtime/components/props/Timeline.d.ts +11 -0
- package/dist/runtime/components/props/Timeline.mjs +7 -0
- package/dist/runtime/components/props/common/index.d.ts +161 -0
- package/dist/runtime/components/props/common/index.mjs +147 -0
- package/dist/runtime/composables/useGloriousCore.d.ts +1 -1
- package/dist/runtime/composables/useGloriousCore.mjs +1 -1
- package/dist/runtime/composables/useGloriousFetch.d.ts +4 -3
- package/dist/runtime/composables/useGloriousFetch.mjs +6 -5
- package/dist/runtime/middlewares/AuthStrategy.mjs +2 -6
- package/dist/runtime/middlewares/ResponseGloriousStore.mjs +9 -0
- package/dist/runtime/plugins/InputComponent.d.ts +2 -0
- package/dist/runtime/plugins/InputComponent.mjs +13 -0
- package/dist/runtime/plugins/module.d.ts +4 -0
- package/dist/runtime/plugins/module.mjs +94 -0
- package/dist/runtime/stores/GloriousStore.d.ts +0 -1
- package/dist/runtime/stores/GloriousStore.mjs +3 -13
- package/dist/runtime/style/components/alert.css +33 -0
- package/dist/runtime/style/components/alert.scss +7 -0
- package/dist/runtime/style/components/avatar.css +57 -0
- package/dist/runtime/style/components/avatar.scss +13 -0
- package/dist/runtime/style/components/breadcrumb.css +6 -0
- package/dist/runtime/style/components/breadcrumb.scss +6 -0
- package/dist/runtime/style/components/button.css +113 -0
- package/dist/runtime/style/components/button.scss +30 -0
- package/dist/runtime/style/components/checkbox.css +94 -0
- package/dist/runtime/style/components/checkbox.scss +52 -0
- package/dist/runtime/{assets/style → style}/components/drawer.css +14 -18
- package/dist/runtime/style/components/drawer.scss +57 -0
- package/dist/runtime/style/components/dropdown.scss +19 -0
- package/dist/runtime/style/components/editor.scss +4 -0
- package/dist/runtime/style/components/file.css +134 -0
- package/dist/runtime/style/components/file.scss +19 -0
- package/dist/runtime/style/components/input.css +187 -0
- package/dist/runtime/style/components/input.scss +87 -0
- package/dist/runtime/style/components/loading.css +43 -0
- package/dist/runtime/style/components/loading.scss +92 -0
- package/dist/runtime/style/components/modal.css +66 -0
- package/dist/runtime/style/components/modal.scss +76 -0
- package/dist/runtime/style/components/paginate.scss +18 -0
- package/dist/runtime/style/components/radio.css +121 -0
- package/dist/runtime/style/components/radio.scss +59 -0
- package/dist/runtime/style/components/rating.css +26 -0
- package/dist/runtime/style/components/rating.scss +25 -0
- package/dist/runtime/style/components/select.css +46 -0
- package/dist/runtime/style/components/select.scss +40 -0
- package/dist/runtime/style/components/switch.css +61 -0
- package/dist/runtime/style/components/switch.scss +74 -0
- package/dist/runtime/{assets/style → style}/components/tab.css +3 -3
- package/dist/runtime/style/components/tab.scss +11 -0
- package/dist/runtime/style/components/table.css +99 -0
- package/dist/runtime/style/components/table.scss +41 -0
- package/dist/runtime/style/components/textarea.css +64 -0
- package/dist/runtime/style/components/textarea.scss +43 -0
- package/dist/runtime/style/components/timeline.css +47 -0
- package/dist/runtime/style/components/timeline.scss +40 -0
- package/dist/runtime/style/mixin.css +0 -0
- package/dist/runtime/style/mixin.scss +40 -0
- package/dist/runtime/style/variable.css +0 -0
- package/dist/runtime/style/variable.scss +19 -0
- package/dist/types.d.mts +2 -10
- package/dist/types.d.ts +2 -10
- package/package.json +9 -7
- package/dist/runtime/assets/style/components/buttons.css +0 -107
- package/dist/runtime/assets/style/components/file.css +0 -65
- package/dist/runtime/assets/style/components/input.css +0 -91
- package/dist/runtime/assets/style/components/modal.css +0 -57
- package/dist/runtime/assets/style/components/select.css +0 -54
- package/dist/runtime/assets/style/components/textarea.css +0 -64
- package/dist/runtime/components/G/Breadcrump.vue +0 -46
- package/dist/runtime/components/G/Icon/index.vue +0 -143
- package/dist/runtime/plugins/Drawer.mjs +0 -35
- package/dist/runtime/utils/gTailwindColor.d.ts +0 -1
- package/dist/runtime/utils/gTailwindColor.mjs +0 -5
- /package/dist/runtime/{plugins/Drawer.d.ts → middlewares/ResponseGloriousStore.d.ts} +0 -0
- /package/dist/runtime/{assets/style → style}/components/dropdown.css +0 -0
- /package/dist/runtime/{assets/style → style}/components/editor.css +0 -0
- /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;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|