@a-vision-software/vue-input-components 1.3.20 → 1.3.21

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/README.md CHANGED
@@ -14,148 +14,59 @@ A collection of reusable Vue 3 input components with consistent styling and beha
14
14
 
15
15
  ## Components
16
16
 
17
- ### Text Input
17
+ ### [Text Input](docs/components/TextInput.md)
18
18
 
19
- A versatile text input component that supports:
19
+ A versatile text input component that supports icons, validation, and custom styling.
20
20
 
21
- - Icons (Font Awesome or images)
22
- - Placeholder text
23
- - Disabled state
24
- - Custom styling (colors, border radius, padding)
25
- - Clear button
26
- - Password toggle
27
- - Character counter
28
- - Error messages
21
+ ### [File Upload](docs/components/FileUpload.md)
29
22
 
30
- ### File Upload
23
+ A file upload component with drag and drop support, file validation, and preview capabilities.
31
24
 
32
- A file upload component with:
25
+ ### [Action](docs/components/Action.md)
33
26
 
34
- - Drag and drop support
35
- - Multiple file selection
36
- - File type validation
37
- - File size limits
38
- - Preview support
39
- - Custom styling
40
- - Progress indicator
27
+ A flexible action component that can be used as a button, link, or icon button with various styles.
41
28
 
42
- ### Action
29
+ ### [Navigation](docs/components/Navigation.md)
43
30
 
44
- A flexible action component that can be used as:
31
+ A navigation component with multiple styles, icons support, and responsive design.
45
32
 
46
- - Button
47
- - Link
48
- - Icon button
49
- - With various styles and states
33
+ ### [Dropdown](docs/components/Dropdown.md)
50
34
 
51
- ### Navigation
35
+ A dropdown component that supports single/multiple selection, filtering, and custom styling.
52
36
 
53
- A navigation component with:
37
+ ### [Checkbox](docs/components/Checkbox.md)
54
38
 
55
- - Multiple styles (tiles, tabs, dropdowns)
56
- - Icons support
57
- - Sub-navigation items
58
- - Custom styling
59
- - Responsive design
60
- - Keyboard navigation
61
-
62
- ### Dropdown
63
-
64
- A dropdown component that supports:
65
-
66
- - Single and multiple selection
67
- - Icons (Font Awesome or images)
68
- - Placeholder text
69
- - Filtering of options
70
- - Disabled state
71
- - Custom styling (colors, border radius, padding)
72
- - Clear selection button
73
- - Tags for multiple selection
74
- - Responsive design
39
+ A checkbox component with support for single/multiple selection and various presentation modes.
75
40
 
76
41
  ## Installation
77
42
 
78
43
  ```bash
79
- npm install vue-input-components
44
+ npm install @a-vision-software/vue-input-components
80
45
  ```
81
46
 
82
- ## Usage
47
+ ## Quick Start
83
48
 
84
49
  ```vue
85
50
  <template>
86
- <TextInput v-model="text" placeholder="Enter text" icon="user" :disabled="false" />
87
-
88
- <FileUpload v-model="files" accept="image/*" :max-size="5 * 1024 * 1024" @upload="handleUpload" />
89
-
90
- <Action type="button" label="Click me" icon="check" @click="handleClick" />
91
-
92
- <Navigation :items="navigationItems" type="tiles" v-model:active-item="activeItem" />
93
-
94
- <Dropdown
95
- v-model="selected"
96
- :options="options"
97
- placeholder="Select an option"
98
- icon="house"
99
- :multiple="true"
100
- :filterable="true"
101
- />
51
+ <TextInput v-model="text" placeholder="Enter text" icon="user" />
52
+ <FileUpload v-model="files" accept="image/*" />
53
+ <Action type="button" label="Click me" icon="check" />
54
+ <Navigation :items="navigationItems" type="tiles" />
55
+ <Dropdown v-model="selected" :options="options" />
56
+ <Checkbox v-model="selected" :options="options" />
102
57
  </template>
103
- ```
104
58
 
105
- ## Props
106
-
107
- ### Text Input
108
-
109
- - `modelValue`: string - The input value
110
- - `placeholder`: string - Placeholder text
111
- - `icon`: string - Icon name or image URL (prefixed with 'img:')
112
- - `iconSize`: 'normal' | 'large' - Icon size
113
- - `disabled`: boolean - Whether the input is disabled
114
- - `type`: 'text' | 'password' | 'email' | 'number' - Input type
115
- - `showClear`: boolean - Whether to show the clear button
116
- - `showCounter`: boolean - Whether to show the character counter
117
- - `maxLength`: number - Maximum length of the input
118
- - `error`: string - Error message to display
119
- - Custom styling props (color, hoverColor, etc.)
120
-
121
- ### File Upload
122
-
123
- - `modelValue`: File[] - The selected files
124
- - `accept`: string - Accepted file types
125
- - `maxSize`: number - Maximum file size in bytes
126
- - `multiple`: boolean - Whether to allow multiple files
127
- - `disabled`: boolean - Whether the upload is disabled
128
- - Custom styling props
129
-
130
- ### Action
131
-
132
- - `type`: 'button' | 'link' - The type of action
133
- - `label`: string - The action label
134
- - `icon`: string - Icon name
135
- - `to`: string - Route for link type
136
- - `disabled`: boolean - Whether the action is disabled
137
- - Custom styling props
138
-
139
- ### Navigation
140
-
141
- - `items`: NavigationItem[] - The navigation items
142
- - `type`: 'tiles' | 'tabs' | 'dropdowns' - The navigation style
143
- - `orientation`: 'horizontal' | 'vertical' - The navigation orientation
144
- - `activeItem`: string - The active item ID
145
- - `iconSize`: 'normal' | 'large' - Icon size
146
- - Custom styling props
147
-
148
- ### Dropdown
149
-
150
- - `modelValue`: string | string[] - The selected value(s)
151
- - `options`: DropdownOption[] - The available options
152
- - `placeholder`: string - Placeholder text
153
- - `icon`: string - Icon name or image URL (prefixed with 'img:')
154
- - `iconSize`: 'normal' | 'large' - Icon size
155
- - `multiple`: boolean - Whether to allow multiple selection
156
- - `filterable`: boolean - Whether to allow filtering
157
- - `disabled`: boolean - Whether the dropdown is disabled
158
- - Custom styling props
59
+ <script setup lang="ts">
60
+ import {
61
+ TextInput,
62
+ FileUpload,
63
+ Action,
64
+ Navigation,
65
+ Dropdown,
66
+ Checkbox,
67
+ } from '@a-vision-software/vue-input-components'
68
+ </script>
69
+ ```
159
70
 
160
71
  ## Styling
161
72
 
@@ -0,0 +1,92 @@
1
+ import { CheckboxProps } from '../types/checkbox';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckboxProps>, {
4
+ multiple: boolean;
5
+ disabled: boolean;
6
+ width: string;
7
+ color: string;
8
+ hoverColor: string;
9
+ activeColor: string;
10
+ disabledColor: string;
11
+ backgroundColor: string;
12
+ borderRadius: string;
13
+ padding: string;
14
+ icon: string;
15
+ iconSize: string;
16
+ required: boolean;
17
+ error: string;
18
+ label: string;
19
+ labelPosition: string;
20
+ labelAlign: string;
21
+ labelWidth: string;
22
+ columns: number;
23
+ presentation: string;
24
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ "update:modelValue": (value: string | string[]) => void;
26
+ changed: () => void;
27
+ saved: () => void;
28
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckboxProps>, {
29
+ multiple: boolean;
30
+ disabled: boolean;
31
+ width: string;
32
+ color: string;
33
+ hoverColor: string;
34
+ activeColor: string;
35
+ disabledColor: string;
36
+ backgroundColor: string;
37
+ borderRadius: string;
38
+ padding: string;
39
+ icon: string;
40
+ iconSize: string;
41
+ required: boolean;
42
+ error: string;
43
+ label: string;
44
+ labelPosition: string;
45
+ labelAlign: string;
46
+ labelWidth: string;
47
+ columns: number;
48
+ presentation: string;
49
+ }>>> & Readonly<{
50
+ "onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
51
+ onChanged?: (() => any) | undefined;
52
+ onSaved?: (() => any) | undefined;
53
+ }>, {
54
+ error: string;
55
+ disabled: boolean;
56
+ icon: string;
57
+ label: string;
58
+ color: string;
59
+ backgroundColor: string;
60
+ multiple: boolean;
61
+ width: string;
62
+ hoverColor: string;
63
+ activeColor: string;
64
+ disabledColor: string;
65
+ borderRadius: string;
66
+ padding: string;
67
+ iconSize: "large" | "normal";
68
+ required: boolean;
69
+ labelPosition: "top" | "left";
70
+ labelAlign: "left" | "center" | "right";
71
+ labelWidth: string;
72
+ columns: number;
73
+ presentation: "default" | "minimal";
74
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
75
+ export default _default;
76
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
77
+ type __VLS_TypePropsToRuntimeProps<T> = {
78
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
79
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
80
+ } : {
81
+ type: import('vue').PropType<T[K]>;
82
+ required: true;
83
+ };
84
+ };
85
+ type __VLS_WithDefaults<P, D> = {
86
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
87
+ default: D[K];
88
+ }> : P[K];
89
+ };
90
+ type __VLS_Prettify<T> = {
91
+ [K in keyof T]: T[K];
92
+ } & {};
@@ -60,9 +60,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
60
60
  color: string;
61
61
  backgroundColor: string;
62
62
  multiple: boolean;
63
- placeholder: string;
64
- filterable: boolean;
65
- maxHeight: string;
66
63
  width: string;
67
64
  hoverColor: string;
68
65
  activeColor: string;
@@ -74,6 +71,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
74
71
  labelPosition: "top" | "left";
75
72
  labelAlign: "left" | "center" | "right";
76
73
  labelWidth: string;
74
+ placeholder: string;
75
+ filterable: boolean;
76
+ maxHeight: string;
77
77
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
78
78
  export default _default;
79
79
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -63,12 +63,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
63
63
  icon: string;
64
64
  label: string;
65
65
  modelValue: string;
66
- placeholder: string;
67
- maxHeight: string;
68
66
  width: string;
69
67
  labelPosition: "top" | "left";
70
68
  labelAlign: "left" | "center" | "right";
71
69
  labelWidth: string;
70
+ placeholder: string;
71
+ maxHeight: string;
72
72
  height: string;
73
73
  readonly: boolean;
74
74
  maxlength: number;
@@ -3,6 +3,7 @@ import { default as FileUpload } from './components/FileUpload.vue';
3
3
  import { default as Navigation } from './components/Navigation.vue';
4
4
  import { default as Action } from './components/Action.vue';
5
5
  import { default as Dropdown } from './components/Dropdown.vue';
6
+ import { default as Checkbox } from './components/Checkbox.vue';
6
7
 
7
- export { TextInput, FileUpload, Navigation, Action, Dropdown };
8
+ export { TextInput, FileUpload, Navigation, Action, Dropdown, Checkbox };
8
9
  export * from './types';
@@ -0,0 +1,30 @@
1
+ export interface CheckboxOption {
2
+ id: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ export interface CheckboxProps {
7
+ options: CheckboxOption[];
8
+ modelValue: string | string[];
9
+ multiple?: boolean;
10
+ disabled?: boolean;
11
+ width?: string;
12
+ color?: string;
13
+ hoverColor?: string;
14
+ activeColor?: string;
15
+ disabledColor?: string;
16
+ backgroundColor?: string;
17
+ borderRadius?: string;
18
+ padding?: string;
19
+ icon?: string;
20
+ iconSize?: 'normal' | 'large';
21
+ error?: string;
22
+ required?: boolean;
23
+ autosave?: (value: string | string[]) => Promise<void>;
24
+ label?: string;
25
+ labelPosition?: 'top' | 'left';
26
+ labelAlign?: 'left' | 'center' | 'right';
27
+ labelWidth?: string;
28
+ columns?: number;
29
+ presentation?: 'default' | 'minimal';
30
+ }
@@ -6,3 +6,4 @@ export * from './fileupload';
6
6
  export * from './action';
7
7
  export * from './navigation';
8
8
  export * from './dropdown';
9
+ export * from './checkbox';
@@ -1,24 +1,24 @@
1
1
  export interface TextInputProps {
2
2
  modelValue: string;
3
+ required?: boolean;
3
4
  type?: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date' | 'number';
4
5
  placeholder?: string;
5
6
  label?: string;
7
+ labelPosition?: 'top' | 'left';
8
+ labelAlign?: 'left' | 'center' | 'right';
9
+ labelWidth?: string;
10
+ width?: string;
6
11
  icon?: string;
7
12
  disabled?: boolean;
8
13
  readonly?: boolean;
9
14
  maxlength?: number;
10
- error?: string;
11
15
  min?: Date | string;
12
16
  max?: Date | string;
13
- autosave?: (value: string) => Promise<void>;
14
- labelPosition?: 'top' | 'left';
15
- labelAlign?: 'left' | 'center' | 'right';
16
- labelWidth?: string;
17
17
  height?: string;
18
18
  maxHeight?: string;
19
19
  bgColor?: string;
20
- width?: string;
21
- required?: boolean;
20
+ autosave?: (value: string) => Promise<void>;
21
+ error?: string;
22
22
  }
23
23
  export interface TextInputEmits {
24
24
  (e: 'update:modelValue', value: string): void;