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,200 +1,142 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import { computed, ref, watch } from
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
|
6
|
-
modelValue: {
|
7
|
-
required: false,
|
8
|
-
default: "",
|
9
|
-
type: [String, Array<String>, Number],
|
10
|
-
},
|
11
|
-
color: {
|
12
|
-
required: false,
|
13
|
-
default: "primary",
|
14
|
-
type: String as () => "orange" | "blue" | "gray" | "red" | "primary",
|
15
|
-
},
|
16
|
-
placeholder: {
|
17
|
-
required: false,
|
18
|
-
default: "",
|
19
|
-
type: String,
|
20
|
-
},
|
21
|
-
title: {
|
22
|
-
required: false,
|
23
|
-
default: "",
|
24
|
-
type: String,
|
25
|
-
},
|
26
|
-
size: {
|
27
|
-
required: false,
|
28
|
-
default: "md",
|
29
|
-
type: String as () => "xl" | "lg" | "md" | "sm" | "xsm",
|
30
|
-
},
|
31
|
-
error: {
|
32
|
-
required: false,
|
33
|
-
default: "|",
|
34
|
-
type: String,
|
35
|
-
},
|
36
|
-
icon: {
|
37
|
-
required: false,
|
38
|
-
default: "",
|
39
|
-
type: String,
|
40
|
-
},
|
41
|
-
disabled: {
|
42
|
-
required: false,
|
43
|
-
default: false,
|
44
|
-
type: Boolean,
|
45
|
-
},
|
46
|
-
type: {
|
47
|
-
required: false,
|
48
|
-
default: "text",
|
49
|
-
type: String as () =>
|
50
|
-
| "button"
|
51
|
-
| "checkbox"
|
52
|
-
| "color"
|
53
|
-
| "date"
|
54
|
-
| "email"
|
55
|
-
| "file"
|
56
|
-
| "hidden"
|
57
|
-
| "password"
|
58
|
-
| "radio"
|
59
|
-
| "range"
|
60
|
-
| "tel"
|
61
|
-
| "text"
|
62
|
-
| "url"
|
63
|
-
| "number",
|
64
|
-
},
|
65
|
-
autocomplete: {
|
66
|
-
required: false,
|
67
|
-
default: "off",
|
68
|
-
type: String as () => "off" | "on" | "new-password",
|
69
|
-
},
|
70
|
-
mode: {
|
71
|
-
required: false,
|
72
|
-
default: "normal",
|
73
|
-
type: String as () => "normal" | "tag",
|
74
|
-
},
|
75
|
-
display: {
|
76
|
-
required: false,
|
77
|
-
default: "",
|
78
|
-
type: String as () => "price",
|
79
|
-
},
|
80
|
-
inputMode: {
|
81
|
-
required: false,
|
82
|
-
default: "text",
|
83
|
-
type: String as () =>
|
84
|
-
| "text"
|
85
|
-
| "none"
|
86
|
-
| "decimal"
|
87
|
-
| "numeric"
|
88
|
-
| "tel"
|
89
|
-
| "search"
|
90
|
-
| "email"
|
91
|
-
| "url",
|
92
|
-
},
|
93
|
-
});
|
2
|
+
import { computed, GloriousStore, ref, watch } from '#imports'
|
3
|
+
import { hasValidationError } from '../helper'
|
4
|
+
import { useGloriousCore } from '../../composables/useGloriousCore'
|
5
|
+
import _props from '../props/Input'
|
94
6
|
|
95
|
-
const
|
96
|
-
|
97
|
-
|
7
|
+
const props: any = defineProps(_props)
|
8
|
+
const modelValue = defineModel()
|
9
|
+
modelValue.value = ''
|
10
|
+
const inputValue: any = ref(null)
|
98
11
|
|
99
12
|
watch(
|
100
13
|
() => inputValue.value,
|
101
14
|
() => {
|
102
|
-
if (props.mode ===
|
15
|
+
if (props.mode === 'tag') return
|
103
16
|
|
104
17
|
switch (props.display) {
|
105
|
-
case
|
106
|
-
inputValue.value = useGloriousCore.
|
18
|
+
case 'price':
|
19
|
+
inputValue.value = useGloriousCore.numbersWithSeparateSamePrice(
|
107
20
|
inputValue.value
|
108
|
-
)
|
109
|
-
|
110
|
-
|
111
|
-
inputValue.value.toString().replaceAll(",", "")
|
112
|
-
);
|
113
|
-
break;
|
21
|
+
)
|
22
|
+
modelValue.value = inputValue.value.toString().replaceAll(',', '')
|
23
|
+
break
|
114
24
|
default:
|
115
|
-
|
116
|
-
break
|
25
|
+
modelValue.value = inputValue.value
|
26
|
+
break
|
117
27
|
}
|
118
28
|
}
|
119
|
-
)
|
29
|
+
)
|
120
30
|
|
121
31
|
const computeIconSize = computed(() => {
|
122
|
-
let iconSize = 0
|
32
|
+
let iconSize = 0
|
123
33
|
|
124
34
|
switch (props.size) {
|
125
|
-
case
|
126
|
-
iconSize = 30
|
127
|
-
break
|
128
|
-
case
|
129
|
-
iconSize = 27
|
130
|
-
break
|
131
|
-
case
|
132
|
-
iconSize = 25
|
133
|
-
break
|
134
|
-
case
|
135
|
-
iconSize = 23
|
136
|
-
break
|
137
|
-
case
|
138
|
-
iconSize = 20
|
139
|
-
break
|
35
|
+
case 'xl':
|
36
|
+
iconSize = 30
|
37
|
+
break
|
38
|
+
case 'lg':
|
39
|
+
iconSize = 27
|
40
|
+
break
|
41
|
+
case 'md':
|
42
|
+
iconSize = 25
|
43
|
+
break
|
44
|
+
case 'sm':
|
45
|
+
iconSize = 23
|
46
|
+
break
|
47
|
+
case 'xs':
|
48
|
+
iconSize = 20
|
49
|
+
break
|
140
50
|
default:
|
141
|
-
iconSize = 30
|
142
|
-
break
|
51
|
+
iconSize = 30
|
52
|
+
break
|
143
53
|
}
|
144
54
|
|
145
|
-
return iconSize
|
146
|
-
})
|
55
|
+
return iconSize
|
56
|
+
})
|
147
57
|
|
148
58
|
// ------------------------------------------------------------------------------------------------ TAG
|
149
|
-
const tags: any = ref([])
|
59
|
+
const tags: any = ref([])
|
150
60
|
|
151
61
|
const addTag = (event: any) => {
|
152
|
-
if (
|
62
|
+
if (props.tagLockOption) return
|
63
|
+
|
64
|
+
if (tags.value.length === 0) tags.value = []
|
65
|
+
|
66
|
+
if (props.mode !== 'tag') return
|
67
|
+
const value: any = event.target.value
|
68
|
+
tags.value.push(value)
|
69
|
+
modelValue.value = tags.value
|
70
|
+
inputValue.value = ''
|
71
|
+
}
|
72
|
+
|
73
|
+
const addTagViaOption = (option: any, event: any) => {
|
74
|
+
// event.stopPropagation() if want not close with window
|
75
|
+
if (tags.value.length === 0) tags.value = []
|
76
|
+
|
77
|
+
const value: any = option
|
78
|
+
tags.value.push(value)
|
79
|
+
modelValue.value = tags.value
|
80
|
+
inputValue.value = ''
|
81
|
+
}
|
153
82
|
|
154
|
-
if (props.mode !== "tag") return;
|
155
|
-
const value: any = event.target.value;
|
156
|
-
tags.value.push(value);
|
157
|
-
emits("update:modelValue", tags.value);
|
158
|
-
inputValue.value = "";
|
159
|
-
};
|
160
83
|
const removeTag = (tag: string) => {
|
161
|
-
tags.value = tags.value.filter((item: any) => item !== tag)
|
162
|
-
|
163
|
-
}
|
84
|
+
tags.value = tags.value.filter((item: any) => item !== tag)
|
85
|
+
modelValue.value = tags.value
|
86
|
+
}
|
164
87
|
|
165
88
|
// -------------------------------------- init value
|
166
89
|
const initValue = () => {
|
167
|
-
if (props.mode ===
|
168
|
-
tags.value =
|
169
|
-
return
|
90
|
+
if (props.mode === 'tag') {
|
91
|
+
tags.value = modelValue.value
|
92
|
+
return
|
170
93
|
}
|
171
94
|
|
172
|
-
inputValue.value =
|
173
|
-
}
|
174
|
-
initValue()
|
95
|
+
inputValue.value = modelValue.value
|
96
|
+
}
|
97
|
+
initValue()
|
175
98
|
watch(
|
176
|
-
() =>
|
99
|
+
() => modelValue.value,
|
177
100
|
() => initValue()
|
178
|
-
)
|
101
|
+
)
|
102
|
+
|
103
|
+
const typeInput = ref(props.type)
|
179
104
|
|
180
|
-
const
|
105
|
+
const inputClicked = (event: any) => {
|
106
|
+
if (props.mode === 'tag' && props.options) {
|
107
|
+
const gio = document.querySelectorAll('.glorious-input-options')
|
108
|
+
gio.forEach((element: any) => element.classList.add('hidden'))
|
109
|
+
|
110
|
+
const optionsElement = event.currentTarget.parentElement.children[1]
|
111
|
+
if (optionsElement.classList.contains('hidden'))
|
112
|
+
optionsElement.classList.remove('hidden')
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
const gs = GloriousStore()
|
181
117
|
</script>
|
182
118
|
|
183
119
|
<template>
|
184
120
|
<div class="flex flex-col">
|
185
|
-
<span class="text-
|
121
|
+
<span class="glorious-title text-sm font-medium text-gray-500">
|
122
|
+
{{ props.title }}
|
123
|
+
</span>
|
124
|
+
|
186
125
|
<div
|
187
126
|
class="glorious-input"
|
188
|
-
:class="[
|
127
|
+
:class="[
|
128
|
+
props.icon !== '' ? `icon-${props.size}` : '',
|
129
|
+
hasValidationError(props.error) ? 'validation-error' : '',
|
130
|
+
]"
|
189
131
|
>
|
190
132
|
<div class="relative">
|
191
133
|
<input
|
192
134
|
v-model="inputValue"
|
193
135
|
:inputmode="props.inputMode"
|
194
136
|
:autocomplete="props.autocomplete"
|
195
|
-
class="w-full"
|
137
|
+
class="w-full glorious-input-field"
|
196
138
|
:class="[
|
197
|
-
props.size
|
139
|
+
`size-${props.size}`,
|
198
140
|
`glorious-input-${props.color}`,
|
199
141
|
props.type === 'password' ? 'pl-[30px] pr-3' : 'px-3',
|
200
142
|
]"
|
@@ -202,13 +144,13 @@ const typeInput = ref(props.type);
|
|
202
144
|
:disabled="props.disabled"
|
203
145
|
:type="typeInput"
|
204
146
|
@keyup.enter="addTag($event)"
|
147
|
+
@click="inputClicked($event)"
|
205
148
|
/>
|
206
149
|
<GIcon
|
207
150
|
v-if="props.type === 'password' && typeInput === 'password'"
|
208
151
|
class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
|
209
152
|
:size="23"
|
210
153
|
name="glorious-eye-fill"
|
211
|
-
:color="gTailwindColor('gray', 500)"
|
212
154
|
@click="typeInput = 'text'"
|
213
155
|
></GIcon>
|
214
156
|
<GIcon
|
@@ -216,13 +158,40 @@ const typeInput = ref(props.type);
|
|
216
158
|
class="absolute left-0 top-0 bottom-0 my-auto ml-1 cursor-pointer"
|
217
159
|
:size="23"
|
218
160
|
name="glorious-eye-off-fill"
|
219
|
-
:color="gTailwindColor('gray', 500)"
|
220
161
|
@click="typeInput = 'password'"
|
221
162
|
></GIcon>
|
163
|
+
|
164
|
+
<div
|
165
|
+
v-if="props.options.length > 0"
|
166
|
+
class="glorious-input-options hidden"
|
167
|
+
:class="[`size-${props.size}`]"
|
168
|
+
>
|
169
|
+
<div
|
170
|
+
v-if="props.loadingOptions"
|
171
|
+
class="flex justify-center"
|
172
|
+
>
|
173
|
+
<GLoading color="green" />
|
174
|
+
</div>
|
175
|
+
<template v-else>
|
176
|
+
<div
|
177
|
+
v-for="(option, index) in props.options"
|
178
|
+
:key="index"
|
179
|
+
@click="addTagViaOption(option, $event)"
|
180
|
+
>
|
181
|
+
{{ option.text }}
|
182
|
+
</div>
|
183
|
+
</template>
|
184
|
+
</div>
|
222
185
|
</div>
|
223
|
-
<div
|
224
|
-
|
225
|
-
|
186
|
+
<div
|
187
|
+
v-if="tags.length !== 0"
|
188
|
+
class="glorious-input-tag"
|
189
|
+
>
|
190
|
+
<div
|
191
|
+
v-for="(item, index) in tags"
|
192
|
+
:key="index"
|
193
|
+
>
|
194
|
+
{{ typeof item === 'object' ? item.text : item }}
|
226
195
|
<GIcon
|
227
196
|
name="glorious-x"
|
228
197
|
:size="10"
|
@@ -236,103 +205,10 @@ const typeInput = ref(props.type);
|
|
236
205
|
class="glorious-input-icon"
|
237
206
|
:name="props.icon"
|
238
207
|
:size="computeIconSize"
|
239
|
-
:color="gTailwindColor('gray', '500')"
|
240
208
|
/>
|
241
209
|
</div>
|
242
210
|
<GErrorText :error="props.error" />
|
243
211
|
</div>
|
244
212
|
</template>
|
245
213
|
|
246
|
-
<style
|
247
|
-
.xl.glorious-input-orange, .xl.glorious-input-blue, .xl.glorious-input-gray, .xl.glorious-input-red, .xl.glorious-input-primary {
|
248
|
-
@apply py-2.5;
|
249
|
-
}
|
250
|
-
.lg.glorious-input-orange, .lg.glorious-input-blue, .lg.glorious-input-gray, .lg.glorious-input-red, .lg.glorious-input-primary {
|
251
|
-
@apply py-2;
|
252
|
-
}
|
253
|
-
.md.glorious-input-orange, .md.glorious-input-blue, .md.glorious-input-gray, .md.glorious-input-red, .md.glorious-input-primary {
|
254
|
-
@apply py-1.5;
|
255
|
-
}
|
256
|
-
.sm.glorious-input-orange, .sm.glorious-input-blue, .sm.glorious-input-gray, .sm.glorious-input-red, .sm.glorious-input-primary {
|
257
|
-
@apply py-1;
|
258
|
-
}
|
259
|
-
.xsm.glorious-input-orange, .xsm.glorious-input-blue, .xsm.glorious-input-gray, .xsm.glorious-input-red, .xsm.glorious-input-primary {
|
260
|
-
@apply py-0.5;
|
261
|
-
}
|
262
|
-
|
263
|
-
.glorious-input-orange:focus-visible, .glorious-input-blue:focus-visible, .glorious-input-gray:focus-visible, .glorious-input-red:focus-visible, .glorious-input-primary:focus-visible {
|
264
|
-
@apply outline-none ring-2;
|
265
|
-
}
|
266
|
-
|
267
|
-
.glorious-input-primary {
|
268
|
-
@apply rounded-md ring-1 ring-green-500;
|
269
|
-
}
|
270
|
-
.glorious-input-primary:disabled {
|
271
|
-
@apply bg-green-300 cursor-not-allowed;
|
272
|
-
}
|
273
|
-
|
274
|
-
.glorious-input-red {
|
275
|
-
@apply rounded-md ring-1 ring-red-500;
|
276
|
-
}
|
277
|
-
.glorious-input-red:disabled {
|
278
|
-
@apply cursor-not-allowed;
|
279
|
-
}
|
280
|
-
|
281
|
-
.glorious-input-gray {
|
282
|
-
@apply rounded-md ring-1 ring-gray-500;
|
283
|
-
}
|
284
|
-
.glorious-input-gray:disabled {
|
285
|
-
@apply cursor-not-allowed;
|
286
|
-
}
|
287
|
-
|
288
|
-
.glorious-input-blue {
|
289
|
-
@apply rounded-md ring-1 ring-blue-500;
|
290
|
-
}
|
291
|
-
.glorious-input-blue:disabled {
|
292
|
-
@apply cursor-not-allowed;
|
293
|
-
}
|
294
|
-
|
295
|
-
.glorious-input-orange {
|
296
|
-
@apply rounded-md ring-1 ring-orange-500;
|
297
|
-
}
|
298
|
-
.glorious-input-orange:disabled {
|
299
|
-
@apply cursor-not-allowed;
|
300
|
-
}
|
301
|
-
|
302
|
-
.glorious-input {
|
303
|
-
@apply relative w-full;
|
304
|
-
}
|
305
|
-
.glorious-input > input {
|
306
|
-
@apply w-full;
|
307
|
-
}
|
308
|
-
.glorious-input > input::placeholder {
|
309
|
-
@apply text-[14px];
|
310
|
-
}
|
311
|
-
.glorious-input.icon-xl > input {
|
312
|
-
@apply rtl:pr-9 ltr:pl-9;
|
313
|
-
}
|
314
|
-
.glorious-input.icon-lg > input {
|
315
|
-
@apply rtl:pr-9 ltr:pl-8;
|
316
|
-
}
|
317
|
-
.glorious-input.icon-md > input {
|
318
|
-
@apply rtl:pr-9 ltr:pl-8;
|
319
|
-
}
|
320
|
-
.glorious-input.icon-sm > input {
|
321
|
-
@apply rtl:pr-8 ltr:pl-8;
|
322
|
-
}
|
323
|
-
.glorious-input.icon-xsm > input {
|
324
|
-
@apply rtl:pr-8 ltr:pl-7;
|
325
|
-
}
|
326
|
-
|
327
|
-
.glorious-input-icon {
|
328
|
-
@apply absolute h-max top-0 bottom-0 my-auto rtl:right-1 ltr:left-1;
|
329
|
-
}
|
330
|
-
|
331
|
-
/* ----------------------------------------------- TAG */
|
332
|
-
.glorious-input-tag {
|
333
|
-
@apply mt-3 gap-2 flex flex-wrap;
|
334
|
-
}
|
335
|
-
.glorious-input-tag > div {
|
336
|
-
@apply bg-green-500 px-1 rounded text-white flex items-center gap-2 cursor-pointer;
|
337
|
-
}
|
338
|
-
</style>
|
214
|
+
<style lang="scss" src="../../style/components/input.scss" />
|
@@ -1,27 +1,12 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
|
3
|
-
|
4
|
-
required: false,
|
5
|
-
default: "#fff",
|
6
|
-
type: String,
|
7
|
-
},
|
8
|
-
size: {
|
9
|
-
required: false,
|
10
|
-
default: 30,
|
11
|
-
type: Number,
|
12
|
-
},
|
13
|
-
stroke: {
|
14
|
-
required: false,
|
15
|
-
default: 3,
|
16
|
-
type: Number,
|
17
|
-
},
|
18
|
-
});
|
2
|
+
import _props from '../props/Loading'
|
3
|
+
const props: any = defineProps(_props)
|
19
4
|
</script>
|
20
5
|
|
21
6
|
<template>
|
22
7
|
<div class="inline">
|
23
8
|
<div
|
24
|
-
class="
|
9
|
+
class="glorious-loading"
|
25
10
|
:style="{
|
26
11
|
width: `${props.size}px`,
|
27
12
|
border: `${props.stroke}px solid ${props.color}`,
|
@@ -30,6 +15,4 @@ const props = defineProps({
|
|
30
15
|
</div>
|
31
16
|
</template>
|
32
17
|
|
33
|
-
<style
|
34
|
-
.loader{animation:l20-1 .8s linear infinite alternate,l20-2 1.6s linear infinite;aspect-ratio:1;border-radius:50%}@keyframes l20-1{0%{clip-path:polygon(50% 50%,0 0,50% 0,50% 0,50% 0,50% 0,50% 0)}12.5%{clip-path:polygon(50% 50%,0 0,50% 0,100% 0,100% 0,100% 0,100% 0)}25%{clip-path:polygon(50% 50%,0 0,50% 0,100% 0,100% 100%,100% 100%,100% 100%)}50%{clip-path:polygon(50% 50%,0 0,50% 0,100% 0,100% 100%,50% 100%,0 100%)}62.5%{clip-path:polygon(50% 50%,100% 0,100% 0,100% 0,100% 100%,50% 100%,0 100%)}75%{clip-path:polygon(50% 50%,100% 100%,100% 100%,100% 100%,100% 100%,50% 100%,0 100%)}to{clip-path:polygon(50% 50%,50% 100%,50% 100%,50% 100%,50% 100%,50% 100%,0 100%)}}@keyframes l20-2{0%{transform:scaleY(1) rotate(0deg)}49.99%{transform:scaleY(1) rotate(135deg)}50%{transform:scaleY(-1) rotate(0deg)}to{transform:scaleY(-1) rotate(-135deg)}}
|
35
|
-
</style>
|
18
|
+
<style lang="scss" src="../../style/components/loading.scss" />
|