@a-vision-software/vue-input-components 1.4.10 → 1.4.11
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/src/components/TextInput.vue.d.ts +1 -93
- package/dist/src/types/dropdown.d.ts +1 -1
- package/dist/src/types/navigation.d.ts +1 -1
- package/dist/src/types/textinput.d.ts +8 -4
- package/dist/vue-input-components.cjs.js +1 -1
- package/dist/vue-input-components.css +1 -1
- package/dist/vue-input-components.es.js +9 -6
- package/dist/vue-input-components.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/Dropdown.vue +1 -1
- package/src/components/TextInput.vue +1 -1
- package/src/types/dropdown.ts +1 -1
- package/src/types/navigation.ts +1 -1
- package/src/types/textinput.ts +12 -4
- package/src/views/TextInputTestView.vue +3 -0
package/package.json
CHANGED
|
@@ -121,7 +121,7 @@ const filterInput = ref<HTMLInputElement | null>(null)
|
|
|
121
121
|
|
|
122
122
|
const selectedOptions = computed(() => {
|
|
123
123
|
if (Array.isArray(props.modelValue)) {
|
|
124
|
-
return props.options.filter((option) => props.modelValue
|
|
124
|
+
return props.options.filter((option) => props.modelValue?.includes(option.id))
|
|
125
125
|
}
|
|
126
126
|
return props.options.filter((option) => option.id === props.modelValue)
|
|
127
127
|
})
|
package/src/types/dropdown.ts
CHANGED
package/src/types/navigation.ts
CHANGED
package/src/types/textinput.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export type TextInputProps =
|
|
2
|
+
{
|
|
3
3
|
required?: boolean
|
|
4
|
-
type?: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date' | 'number'
|
|
5
4
|
placeholder?: string
|
|
6
5
|
label?: string
|
|
7
6
|
labelPosition?: 'top' | 'left'
|
|
@@ -19,7 +18,16 @@ export interface TextInputProps {
|
|
|
19
18
|
bgColor?: string
|
|
20
19
|
autosave?: (value: string) => Promise<void>
|
|
21
20
|
error?: string
|
|
22
|
-
}
|
|
21
|
+
} & (
|
|
22
|
+
| {
|
|
23
|
+
modelValue: string
|
|
24
|
+
type?: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date'
|
|
25
|
+
}
|
|
26
|
+
| {
|
|
27
|
+
modelValue: number
|
|
28
|
+
type: 'number'
|
|
29
|
+
}
|
|
30
|
+
)
|
|
23
31
|
|
|
24
32
|
export interface TextInputEmits {
|
|
25
33
|
(e: 'update:modelValue', value: string): void
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
label-position="top" label-align="left" />
|
|
49
49
|
<TextInput v-model="comment" label="Comment" type="text" placeholder="Your comment" label-position="top"
|
|
50
50
|
label-align="left" />
|
|
51
|
+
<TextInput v-model="age" type="number" label="Age" placeholder="Enter your age" label-position="top"
|
|
52
|
+
label-align="left" />
|
|
51
53
|
</div>
|
|
52
54
|
</div>
|
|
53
55
|
</div>
|
|
@@ -66,6 +68,7 @@ const postalCode = ref('')
|
|
|
66
68
|
const country = ref('')
|
|
67
69
|
const birthDate = ref('1967-08-22')
|
|
68
70
|
const comment = ref('')
|
|
71
|
+
const age = ref(0)
|
|
69
72
|
const bio = ref('')
|
|
70
73
|
const feedback = ref('')
|
|
71
74
|
|