@a-vision-software/vue-input-components 1.4.21 → 1.4.23
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/index.d.ts +8 -10
- package/dist/src/types/index.d.ts +1 -3
- package/dist/src/types/list.d.ts +2 -2
- package/dist/src/types/textinput.d.ts +2 -1
- package/dist/vue-input-components.cjs.js +2 -2
- package/dist/vue-input-components.css +1 -1
- package/dist/vue-input-components.es.js +3024 -3007
- package/dist/vue-input-components.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/FileUpload.vue +1 -1
- package/src/components/List.vue +2 -2
- package/src/components/Navigation.vue +162 -110
- package/src/components/TextInput.vue +88 -28
- package/src/index.ts +8 -10
- package/src/types/index.ts +1 -3
- package/src/types/list.ts +2 -2
- package/src/types/textinput.ts +3 -3
- package/src/views/TextInputTestView.vue +11 -0
package/src/index.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export { TextInput, FileUpload, Navigation, Action, Dropdown, Checkbox, List, Modal }
|
|
1
|
+
export { default as TextInput } from './components/TextInput.vue'
|
|
2
|
+
export { default as FileUpload } from './components/FileUpload.vue'
|
|
3
|
+
export { default as Navigation } from './components/Navigation.vue'
|
|
4
|
+
export { default as Action } from './components/Action.vue'
|
|
5
|
+
export { default as Dropdown } from './components/Dropdown.vue'
|
|
6
|
+
export { default as Checkbox } from './components/Checkbox.vue'
|
|
7
|
+
export { default as List } from './components/List.vue'
|
|
8
|
+
export { default as Modal } from './components/Modal.vue'
|
|
11
9
|
|
|
12
10
|
export * from './types'
|
package/src/types/index.ts
CHANGED
package/src/types/list.ts
CHANGED
|
@@ -23,7 +23,7 @@ interface ListAction {
|
|
|
23
23
|
onActionClick?: (item: any, action: any) => void
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
interface
|
|
26
|
+
interface ConditionalClassList {
|
|
27
27
|
[key: string]: (value: any) => boolean
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -37,7 +37,7 @@ interface ListColumn {
|
|
|
37
37
|
width?: string
|
|
38
38
|
minWidth?: string
|
|
39
39
|
maxWidth?: string
|
|
40
|
-
cellClasses?:
|
|
40
|
+
cellClasses?: ConditionalClassList
|
|
41
41
|
headerTooltip?: string
|
|
42
42
|
}
|
|
43
43
|
|
package/src/types/textinput.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export type TextInputProps =
|
|
2
|
-
{
|
|
1
|
+
export type TextInputProps = {
|
|
3
2
|
required?: boolean
|
|
4
3
|
placeholder?: string
|
|
5
4
|
label?: string
|
|
@@ -18,11 +17,12 @@ export type TextInputProps =
|
|
|
18
17
|
bgColor?: string
|
|
19
18
|
currencyFormatter?: Intl.NumberFormat
|
|
20
19
|
autosave?: (value: string) => Promise<void>
|
|
20
|
+
autosaveOnBlur?: boolean
|
|
21
21
|
error?: string
|
|
22
22
|
} & (
|
|
23
23
|
| {
|
|
24
24
|
modelValue: string
|
|
25
|
-
type: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date'
|
|
25
|
+
type: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date' | 'datetime'
|
|
26
26
|
}
|
|
27
27
|
| {
|
|
28
28
|
modelValue: number
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
<TextInput v-model="birthDate" type="date" label="Date of Birth" icon="calendar" placeholder="DD/MM/YYYY"
|
|
47
47
|
:min="minDate" :max="maxDate" :error="birthDateError" :autosave="handleBirthDateAutosave"
|
|
48
48
|
label-position="top" label-align="left" />
|
|
49
|
+
<TextInput v-model="appointmentDateTime" type="datetime" label="Appointment" icon="clock"
|
|
50
|
+
placeholder="DD/MM/YYYY HH:mm" :error="appointmentDateTimeError" :autosave="handleAppointmentDateTimeAutosave"
|
|
51
|
+
label-position="top" label-align="left" />
|
|
49
52
|
<TextInput v-model="comment" label="Comment" type="text" placeholder="Your comment" label-position="top"
|
|
50
53
|
label-align="left" />
|
|
51
54
|
<TextInput v-model="age" type="number" label="Age" placeholder="Enter your age" label-position="top"
|
|
@@ -69,6 +72,7 @@ const city = ref('')
|
|
|
69
72
|
const postalCode = ref('')
|
|
70
73
|
const country = ref('')
|
|
71
74
|
const birthDate = ref('1967-08-22')
|
|
75
|
+
const appointmentDateTime = ref('2025-12-03T14:30')
|
|
72
76
|
const comment = ref('')
|
|
73
77
|
const age = ref(0)
|
|
74
78
|
const bio = ref('')
|
|
@@ -82,6 +86,7 @@ const cityError = ref('')
|
|
|
82
86
|
const postalCodeError = ref('')
|
|
83
87
|
const countryError = ref('')
|
|
84
88
|
const birthDateError = ref('')
|
|
89
|
+
const appointmentDateTimeError = ref('')
|
|
85
90
|
const bioError = ref('')
|
|
86
91
|
const feedbackError = ref('')
|
|
87
92
|
|
|
@@ -154,6 +159,12 @@ const handleBirthDateAutosave = async (value: string) => {
|
|
|
154
159
|
birthDateError.value = ''
|
|
155
160
|
}
|
|
156
161
|
|
|
162
|
+
const handleAppointmentDateTimeAutosave = async (value: string) => {
|
|
163
|
+
console.log('Autosaving appointment datetime:', value)
|
|
164
|
+
await new Promise((resolve) => setTimeout(resolve, 1000))
|
|
165
|
+
appointmentDateTimeError.value = ''
|
|
166
|
+
}
|
|
167
|
+
|
|
157
168
|
const handleBioAutosave = async (value: string) => {
|
|
158
169
|
console.log('Autosaving bio:', value)
|
|
159
170
|
await new Promise((resolve) => setTimeout(resolve, 1000))
|