@a-vision-software/vue-input-components 1.3.11 → 1.3.13
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/Action.vue.d.ts +60 -0
- package/dist/src/components/Dropdown.vue.d.ts +95 -0
- package/dist/src/components/FileUpload.vue.d.ts +27 -0
- package/dist/src/components/Navigation.vue.d.ts +19 -0
- package/dist/src/components/TextInput.vue.d.ts +95 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/router/index.d.ts +2 -0
- package/dist/src/types/action.d.ts +17 -0
- package/dist/src/types/dropdown.d.ts +31 -0
- package/dist/src/types/fileupload.d.ts +24 -0
- package/dist/src/types/index.d.ts +8 -0
- package/dist/src/types/navigation.d.ts +33 -0
- package/dist/src/types/textinput.d.ts +34 -0
- package/dist/vue-input-components.cjs.js +1 -1
- package/dist/vue-input-components.css +1 -1
- package/dist/vue-input-components.es.js +4013 -3995
- package/dist/vue-input-components.umd.js +1 -1
- package/package.json +6 -3
- package/src/components/Dropdown.vue +76 -12
- package/src/components/TextInput.vue +79 -70
- package/src/types/action.ts +19 -0
- package/src/types/dropdown.ts +4 -0
- package/src/types/fileupload.ts +26 -0
- package/src/types/index.ts +6 -0
- package/src/types/textinput.ts +36 -0
- package/src/views/DropdownTestView.vue +5 -4
- package/src/views/TextInputTestView.vue +13 -15
- package/dist/types.d.ts +0 -126
- package/src/types.d.ts +0 -23
- package/src/types.ts +0 -109
|
@@ -12,20 +12,19 @@
|
|
|
12
12
|
<div class="input-group">
|
|
13
13
|
<h2>Account Information</h2>
|
|
14
14
|
<TextInput v-model="username" type="text" icon="user" placeholder="Enter your username" :required="true"
|
|
15
|
-
:error="usernameError" label="Username" label-position="left" label-align="right" label-width="20%"
|
|
16
|
-
total-width="100%" />
|
|
15
|
+
:error="usernameError" label="Username" label-position="left" label-align="right" label-width="20%" />
|
|
17
16
|
<TextInput v-model="password" type="password" icon="lock" placeholder="Enter your password" :required="true"
|
|
18
|
-
:error="passwordError" label="Password" label-position="left" label-align="right" label-width="20%"
|
|
19
|
-
total-width="100%" />
|
|
17
|
+
:error="passwordError" label="Password" label-position="left" label-align="right" label-width="20%" />
|
|
20
18
|
</div>
|
|
21
19
|
<div class="input-group">
|
|
22
20
|
<h2>Additional Information</h2>
|
|
23
|
-
<TextInput v-model="bio"
|
|
24
|
-
:rows="4" :maxLength="500" :error="bioError"
|
|
25
|
-
label-
|
|
26
|
-
<TextInput v-model="feedback"
|
|
27
|
-
:rows="3" :maxLength="1000" :error="feedbackError"
|
|
28
|
-
|
|
21
|
+
<TextInput v-model="bio" type="textarea" label="Bio" icon="user-circle"
|
|
22
|
+
placeholder="Tell us about yourself..." :rows="4" :maxLength="500" :error="bioError"
|
|
23
|
+
:autosave="handleBioAutosave" label-position="top" label-align="left" height="10rem" max-height="20rem" />
|
|
24
|
+
<TextInput v-model="feedback" type="textarea" label="Feedback" icon="comment"
|
|
25
|
+
placeholder="Share your thoughts..." :rows="3" :maxLength="1000" :error="feedbackError"
|
|
26
|
+
:autosave="handleFeedbackAutosave" label-position="left" label-align="left" label-width="auto"
|
|
27
|
+
max-height="8rem" />
|
|
29
28
|
</div>
|
|
30
29
|
</div>
|
|
31
30
|
<div class="column">
|
|
@@ -33,23 +32,22 @@
|
|
|
33
32
|
<h2>Address Information</h2>
|
|
34
33
|
<TextInput v-model="street" label="Street Address" type="text" icon="road"
|
|
35
34
|
placeholder="Enter your street address" :error="streetError" :autosave="handleStreetAutosave"
|
|
36
|
-
label-position="top" label-align="left"
|
|
35
|
+
label-position="top" label-align="left" />
|
|
37
36
|
<div class="address-row">
|
|
38
37
|
<TextInput v-model="city" label="City" type="text" icon="building" placeholder="Enter your city"
|
|
39
38
|
:error="cityError" :autosave="handleCityAutosave" label-position="top" label-align="left"
|
|
40
39
|
total-width="calc(100% - 11rem)" />
|
|
41
40
|
<TextInput v-model="postalCode" label="Postal Code" type="text" icon="fas fa-hashtag" placeholder="1234AB"
|
|
42
41
|
:error="postalCodeError" @update:modelValue="handlePostalCodeInput" :autosave="handlePostalCodeAutosave"
|
|
43
|
-
label-position="top" label-align="left"
|
|
42
|
+
label-position="top" label-align="left" width="10rem" />
|
|
44
43
|
</div>
|
|
45
44
|
<TextInput v-model="country" label="Country" type="text" icon="flag" placeholder="Enter your country"
|
|
46
|
-
:error="countryError" :autosave="handleCountryAutosave" label-position="top" label-align="left"
|
|
47
|
-
total-width="100%" />
|
|
45
|
+
:error="countryError" :autosave="handleCountryAutosave" label-position="top" label-align="left" />
|
|
48
46
|
<TextInput v-model="birthDate" type="date" label="Date of Birth" icon="calendar" placeholder="DD/MM/YYYY"
|
|
49
47
|
:min="minDate" :max="maxDate" :error="birthDateError" :autosave="handleBirthDateAutosave"
|
|
50
48
|
label-position="top" label-align="left" />
|
|
51
49
|
<TextInput v-model="comment" label="Comment" type="text" placeholder="Your comment" label-position="top"
|
|
52
|
-
label-align="left"
|
|
50
|
+
label-align="left" />
|
|
53
51
|
</div>
|
|
54
52
|
</div>
|
|
55
53
|
</div>
|
package/dist/types.d.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { default as Action } from './components/Action';
|
|
2
|
-
import { Component } from 'vue';
|
|
3
|
-
import { default as Dropdown } from './components/Dropdown';
|
|
4
|
-
import { default as FileUpload } from './components/FileUpload';
|
|
5
|
-
import { default as Navigation } from './components/Navigation';
|
|
6
|
-
import { default as TextInput } from './components/TextInput';
|
|
7
|
-
|
|
8
|
-
export { Action }
|
|
9
|
-
|
|
10
|
-
export declare type ActionComponent = {
|
|
11
|
-
focus: () => void;
|
|
12
|
-
blur: () => void;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export declare interface ActionProps {
|
|
16
|
-
icon?: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
href?: string;
|
|
19
|
-
type?: 'button' | 'submit' | 'reset';
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
color?: string;
|
|
22
|
-
size?: 'small' | 'regular' | 'large';
|
|
23
|
-
variant?: 'solid' | 'transparent';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Dropdown }
|
|
27
|
-
|
|
28
|
-
export { FileUpload }
|
|
29
|
-
|
|
30
|
-
export declare type FileUploadComponent = Component<FileUploadProps>;
|
|
31
|
-
|
|
32
|
-
export declare interface FileUploadEmits {
|
|
33
|
-
(e: 'update:modelValue', files: File[]): void;
|
|
34
|
-
(e: 'files-selected', files: File[]): void;
|
|
35
|
-
(e: 'start-upload', files: File[]): void;
|
|
36
|
-
(e: 'upload-progress', progress: number): void;
|
|
37
|
-
(e: 'upload-success', response: any): void;
|
|
38
|
-
(e: 'upload-error', error: Error): void;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export declare interface FileUploadProps {
|
|
42
|
-
modelValue: File[];
|
|
43
|
-
label?: string;
|
|
44
|
-
placeholder?: string;
|
|
45
|
-
error?: string;
|
|
46
|
-
disabled?: boolean;
|
|
47
|
-
required?: boolean;
|
|
48
|
-
multiple?: boolean;
|
|
49
|
-
accept?: string;
|
|
50
|
-
maxSize?: number;
|
|
51
|
-
uploadUrl?: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { Navigation }
|
|
55
|
-
|
|
56
|
-
export declare interface NavigationComponent {
|
|
57
|
-
props: NavigationProps;
|
|
58
|
-
emits: {
|
|
59
|
-
(e: 'item-click', item: NavigationItem): void;
|
|
60
|
-
(e: 'update:activeItem', id: string): void;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export declare interface NavigationItem {
|
|
65
|
-
id: string;
|
|
66
|
-
label: string;
|
|
67
|
-
icon?: string;
|
|
68
|
-
url?: string;
|
|
69
|
-
children?: NavigationItem[];
|
|
70
|
-
type?: 'tile' | 'tab' | 'dropdown';
|
|
71
|
-
color?: string;
|
|
72
|
-
disabled?: boolean;
|
|
73
|
-
alignment?: 'start' | 'end';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export declare interface NavigationProps {
|
|
77
|
-
items: NavigationItem[];
|
|
78
|
-
type?: 'tiles' | 'tabs' | 'dropdowns';
|
|
79
|
-
orientation?: 'horizontal' | 'vertical';
|
|
80
|
-
activeItem?: string;
|
|
81
|
-
color?: string;
|
|
82
|
-
hoverColor?: string;
|
|
83
|
-
activeColor?: string;
|
|
84
|
-
disabledColor?: string;
|
|
85
|
-
iconSize?: string;
|
|
86
|
-
gap?: string;
|
|
87
|
-
padding?: string;
|
|
88
|
-
borderRadius?: string;
|
|
89
|
-
showIcons?: boolean;
|
|
90
|
-
activeItemAlignment?: 'start' | 'end';
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { TextInput }
|
|
94
|
-
|
|
95
|
-
export declare type TextInputComponent = {
|
|
96
|
-
focus: () => void;
|
|
97
|
-
blur: () => void;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export declare interface TextInputProps {
|
|
101
|
-
modelValue: string;
|
|
102
|
-
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'date';
|
|
103
|
-
label?: string;
|
|
104
|
-
placeholder?: string;
|
|
105
|
-
icon?: string;
|
|
106
|
-
disabled?: boolean;
|
|
107
|
-
readonly?: boolean;
|
|
108
|
-
maxlength?: number;
|
|
109
|
-
error?: string;
|
|
110
|
-
min?: string;
|
|
111
|
-
max?: string;
|
|
112
|
-
required?: boolean;
|
|
113
|
-
success?: string;
|
|
114
|
-
labelPosition?: 'top' | 'left';
|
|
115
|
-
labelAlign?: 'left' | 'right' | 'center';
|
|
116
|
-
totalWidth?: string;
|
|
117
|
-
inputWidth?: string;
|
|
118
|
-
labelWidth?: string;
|
|
119
|
-
autosave?: (value: string) => Promise<void>;
|
|
120
|
-
isTextarea?: boolean;
|
|
121
|
-
maxHeight?: string;
|
|
122
|
-
height?: string;
|
|
123
|
-
bgColor?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { }
|
package/src/types.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare module '@a-vision-software/vue-input-components' {
|
|
2
|
-
import { DefineComponent } from 'vue'
|
|
3
|
-
|
|
4
|
-
export const TextInput: DefineComponent<{
|
|
5
|
-
modelValue?: string
|
|
6
|
-
label?: string
|
|
7
|
-
placeholder?: string
|
|
8
|
-
required?: boolean
|
|
9
|
-
disabled?: boolean
|
|
10
|
-
error?: string
|
|
11
|
-
}>
|
|
12
|
-
|
|
13
|
-
export const FileUpload: DefineComponent<{
|
|
14
|
-
modelValue?: File[]
|
|
15
|
-
maxFiles?: number
|
|
16
|
-
maxFileSize?: number
|
|
17
|
-
accept?: string
|
|
18
|
-
uploadUrl?: string
|
|
19
|
-
required?: boolean
|
|
20
|
-
disabled?: boolean
|
|
21
|
-
error?: string
|
|
22
|
-
}>
|
|
23
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { Component } from 'vue'
|
|
2
|
-
|
|
3
|
-
export interface TextInputProps {
|
|
4
|
-
modelValue: string
|
|
5
|
-
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'date'
|
|
6
|
-
label?: string
|
|
7
|
-
placeholder?: string
|
|
8
|
-
icon?: string
|
|
9
|
-
disabled?: boolean
|
|
10
|
-
readonly?: boolean
|
|
11
|
-
maxlength?: number
|
|
12
|
-
error?: string
|
|
13
|
-
min?: string
|
|
14
|
-
max?: string
|
|
15
|
-
required?: boolean
|
|
16
|
-
success?: string
|
|
17
|
-
labelPosition?: 'top' | 'left'
|
|
18
|
-
labelAlign?: 'left' | 'right' | 'center'
|
|
19
|
-
totalWidth?: string
|
|
20
|
-
inputWidth?: string
|
|
21
|
-
labelWidth?: string
|
|
22
|
-
autosave?: (value: string) => Promise<void>
|
|
23
|
-
isTextarea?: boolean
|
|
24
|
-
maxHeight?: string
|
|
25
|
-
height?: string
|
|
26
|
-
bgColor?: string
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface FileUploadProps {
|
|
30
|
-
modelValue: File[]
|
|
31
|
-
label?: string
|
|
32
|
-
placeholder?: string
|
|
33
|
-
error?: string
|
|
34
|
-
disabled?: boolean
|
|
35
|
-
required?: boolean
|
|
36
|
-
multiple?: boolean
|
|
37
|
-
accept?: string
|
|
38
|
-
maxSize?: number
|
|
39
|
-
uploadUrl?: string
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface FileUploadEmits {
|
|
43
|
-
(e: 'update:modelValue', files: File[]): void
|
|
44
|
-
(e: 'files-selected', files: File[]): void
|
|
45
|
-
(e: 'start-upload', files: File[]): void
|
|
46
|
-
(e: 'upload-progress', progress: number): void
|
|
47
|
-
(e: 'upload-success', response: any): void
|
|
48
|
-
(e: 'upload-error', error: Error): void
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type TextInputComponent = {
|
|
52
|
-
focus: () => void
|
|
53
|
-
blur: () => void
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type FileUploadComponent = Component<FileUploadProps>
|
|
57
|
-
|
|
58
|
-
export interface ActionProps {
|
|
59
|
-
icon?: string
|
|
60
|
-
label?: string
|
|
61
|
-
href?: string
|
|
62
|
-
type?: 'button' | 'submit' | 'reset'
|
|
63
|
-
disabled?: boolean
|
|
64
|
-
color?: string
|
|
65
|
-
size?: 'small' | 'regular' | 'large'
|
|
66
|
-
variant?: 'solid' | 'transparent'
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type ActionComponent = {
|
|
70
|
-
focus: () => void
|
|
71
|
-
blur: () => void
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface NavigationItem {
|
|
75
|
-
id: string
|
|
76
|
-
label: string
|
|
77
|
-
icon?: string
|
|
78
|
-
url?: string
|
|
79
|
-
children?: NavigationItem[]
|
|
80
|
-
type?: 'tile' | 'tab' | 'dropdown'
|
|
81
|
-
color?: string
|
|
82
|
-
disabled?: boolean
|
|
83
|
-
alignment?: 'start' | 'end'
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface NavigationProps {
|
|
87
|
-
items: NavigationItem[]
|
|
88
|
-
type?: 'tiles' | 'tabs' | 'dropdowns'
|
|
89
|
-
orientation?: 'horizontal' | 'vertical'
|
|
90
|
-
activeItem?: string
|
|
91
|
-
color?: string
|
|
92
|
-
hoverColor?: string
|
|
93
|
-
activeColor?: string
|
|
94
|
-
disabledColor?: string
|
|
95
|
-
iconSize?: string
|
|
96
|
-
gap?: string
|
|
97
|
-
padding?: string
|
|
98
|
-
borderRadius?: string
|
|
99
|
-
showIcons?: boolean
|
|
100
|
-
activeItemAlignment?: 'start' | 'end'
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface NavigationComponent {
|
|
104
|
-
props: NavigationProps
|
|
105
|
-
emits: {
|
|
106
|
-
(e: 'item-click', item: NavigationItem): void
|
|
107
|
-
(e: 'update:activeItem', id: string): void
|
|
108
|
-
}
|
|
109
|
-
}
|