nuxt-glorious 2.0.0-develop-26 → 2.0.0-develop-28
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.json +1 -1
- package/dist/runtime/components/G/Input.vue +17 -6
- package/dist/runtime/components/props/Input.d.ts +5 -0
- package/dist/runtime/components/props/Input.mjs +3 -1
- package/dist/runtime/components/props/common/index.d.ts +7 -0
- package/dist/runtime/components/props/common/index.mjs +7 -0
- package/dist/runtime/style/style.css +4 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
@@ -72,12 +72,10 @@ const isSelected = (value: any): boolean => {
|
|
72
72
|
if (typeof tags.value !== 'object' && typeof modelValue.value !== 'object')
|
73
73
|
return false
|
74
74
|
|
75
|
-
console.log()
|
76
|
-
|
77
75
|
return (
|
78
|
-
tags.value.some((item: any) => item.
|
76
|
+
tags.value.some((item: any) => item[props.keyOfValue] === value) ||
|
79
77
|
(typeof modelValue.value === 'object' &&
|
80
|
-
modelValue.value.some((item: any) => item.
|
78
|
+
modelValue.value.some((item: any) => item[props.keyOfValue] === value))
|
81
79
|
)
|
82
80
|
}
|
83
81
|
const addTagViaOption = (option: any, event: any) => {
|
@@ -197,7 +195,6 @@ const inputClicked = (event: any) => {
|
|
197
195
|
></GIcon>
|
198
196
|
|
199
197
|
<div
|
200
|
-
v-if="props.options.length > 0"
|
201
198
|
class="glorious-input-options hidden"
|
202
199
|
:class="[`size-${props.size}`]"
|
203
200
|
>
|
@@ -208,12 +205,22 @@ const inputClicked = (event: any) => {
|
|
208
205
|
<GLoading color="green" />
|
209
206
|
</div>
|
210
207
|
<div v-else>
|
208
|
+
<div
|
209
|
+
v-if="props.options.length === 0"
|
210
|
+
class="text-center"
|
211
|
+
>
|
212
|
+
{{ props.noItemsFound }}
|
213
|
+
</div>
|
211
214
|
<div
|
212
215
|
v-for="(option, index) in props.options"
|
213
216
|
:key="index"
|
214
217
|
@click="addTagViaOption(option, $event)"
|
215
|
-
:class="[isSelected(option.
|
218
|
+
:class="[isSelected(option[props.keyOfValue]) ? 'disabled' : '']"
|
216
219
|
>
|
220
|
+
<slot
|
221
|
+
name="option"
|
222
|
+
:item="option"
|
223
|
+
></slot>
|
217
224
|
{{
|
218
225
|
option[
|
219
226
|
getAttribute(props.displayTextKey, 'input', 'displayTextKey')
|
@@ -231,6 +238,10 @@ const inputClicked = (event: any) => {
|
|
231
238
|
v-for="(item, index) in tags"
|
232
239
|
:key="index"
|
233
240
|
>
|
241
|
+
<slot
|
242
|
+
name="option"
|
243
|
+
:item="item"
|
244
|
+
></slot>
|
234
245
|
{{
|
235
246
|
typeof item === 'object'
|
236
247
|
? item[
|
@@ -10,7 +10,8 @@ import {
|
|
10
10
|
required,
|
11
11
|
displayTextKey,
|
12
12
|
keyOfValue,
|
13
|
-
loading
|
13
|
+
loading,
|
14
|
+
noItemsFound
|
14
15
|
} from "./common/index.mjs";
|
15
16
|
export default {
|
16
17
|
...color(),
|
@@ -25,6 +26,7 @@ export default {
|
|
25
26
|
...disabled,
|
26
27
|
...options,
|
27
28
|
...loading,
|
29
|
+
...noItemsFound(),
|
28
30
|
type: {
|
29
31
|
required: false,
|
30
32
|
default: "text",
|
@@ -734,7 +734,7 @@ button:focus-visible {
|
|
734
734
|
}
|
735
735
|
}
|
736
736
|
.glorious-scaffold-modal {
|
737
|
-
@apply fixed bg-white md:top-[15%] z-50 right-0 left-0 mx-auto p-3 md:rounded-md rounded-t-md md:bottom-0 bottom-0
|
737
|
+
@apply fixed bg-white md:top-[15%] z-50 right-0 left-0 mx-auto p-3 md:rounded-md rounded-t-md md:bottom-0 bottom-0;
|
738
738
|
}
|
739
739
|
.glorious-scaffold-modal .close-modal-btn {
|
740
740
|
@apply flex justify-center items-center w-6 h-6;
|
@@ -742,6 +742,9 @@ button:focus-visible {
|
|
742
742
|
.glorious-scaffold-modal-header {
|
743
743
|
@apply flex justify-between items-center;
|
744
744
|
}
|
745
|
+
.glorious-scaffold-modal-content {
|
746
|
+
@apply overflow-y-auto max-h-150;
|
747
|
+
}
|
745
748
|
.glorious-scaffold-modal-footer {
|
746
749
|
@apply flex justify-center gap-3 mt-3;
|
747
750
|
}
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "2.0.0-develop-
|
2
|
+
"version": "2.0.0-develop-28",
|
3
3
|
"name": "nuxt-glorious",
|
4
4
|
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
5
|
"repository": "sajadhzj/nuxt-glorious",
|