@a-vision-software/vue-input-components 1.2.4 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-vision-software/vue-input-components",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "A collection of reusable Vue 3 input components with TypeScript support",
5
5
  "author": "A-Vision Software",
6
6
  "license": "MIT",
@@ -22,6 +22,7 @@
22
22
  ],
23
23
  "type": "module",
24
24
  "files": [
25
+ "src",
25
26
  "dist"
26
27
  ],
27
28
  "main": "./dist/vue-input-components.cjs.js",
package/src/App.vue ADDED
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <router-view />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ // Component logic will be added here
7
+ </script>
@@ -0,0 +1,67 @@
1
+ :root {
2
+ /* Base colors */
3
+ --primary-color: #3498db;
4
+ --primary-color-light: rgba(52, 152, 219, 0.2);
5
+ --secondary-color: #2ecc71;
6
+
7
+ /* Text colors */
8
+ --text-color: #2c3e50;
9
+ --text-color-light: #7f8c8d;
10
+
11
+ /* UI colors */
12
+ --border-color: #dcdfe6;
13
+ --icon-color: #95a5a6;
14
+
15
+ /* State colors */
16
+ --error-color: #e74c3c;
17
+ --error-color-light: rgba(231, 76, 60, 0.2);
18
+ --success-color: #2ecc71;
19
+ --success-color-light: rgba(46, 204, 113, 0.2);
20
+ --warning-color: #f1c40f;
21
+ --warning-color-light: rgba(241, 196, 15, 0.2);
22
+
23
+ /* Background colors */
24
+ --disabled-color: #bdc3c7;
25
+ --disabled-background: #f5f7fa;
26
+ --card-bg: #ffffff;
27
+ --background-color: #f8f9fa;
28
+
29
+ /* Input colors */
30
+ --input-bg-color: rgba(255, 255, 255, 0.8);
31
+ --input-bg-hover: rgba(0, 0, 0, 0.05);
32
+ --input-bg-disabled: rgba(0, 0, 0, 0.05);
33
+
34
+ /* Text Colors */
35
+ --text-muted: #6c757d;
36
+
37
+ /* Border Colors */
38
+ --input-bg: #ffffff;
39
+ --input-bg-disabled: #e9ecef;
40
+
41
+ /* Status Colors */
42
+ --danger-color: #dc3545;
43
+ --success-color: #28a745;
44
+ --warning-color: #ffc107;
45
+
46
+ /* Shadow Colors */
47
+ --shadow-color: rgba(74, 108, 247, 0.25);
48
+
49
+ /* Typography */
50
+ --line-height: 20px;
51
+
52
+ /* File Upload Colors */
53
+ --upload-border-color: var(--border-color);
54
+ --upload-bg-color: var(--background-color);
55
+ --upload-dragging-border-color: var(--primary-color);
56
+ --upload-dragging-bg-color: var(--primary-color-light);
57
+ --upload-has-files-border-color: var(--success-color);
58
+ --upload-has-files-bg-color: var(--success-color-light);
59
+ --upload-icon-color: var(--icon-color);
60
+ --upload-text-color: var(--text-color-light);
61
+ --progress-bg-color: var(--disabled-background);
62
+ --progress-color: var(--primary-color);
63
+ --success-bg-color: var(--success-color-light);
64
+ --success-text-color: var(--success-color);
65
+ --error-bg-color: var(--error-color-light);
66
+ --error-text-color: var(--error-color);
67
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
@@ -0,0 +1,160 @@
1
+ :root {
2
+ /* Typography */
3
+ --font-family:
4
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
5
+ --font-size-xs: 0.75rem;
6
+ --font-size-sm: 0.875rem;
7
+ --font-size-base: 1rem;
8
+ --font-size-lg: 1.125rem;
9
+ --font-size-xl: 1.25rem;
10
+ --font-weight-normal: 400;
11
+ --font-weight-medium: 500;
12
+ --font-weight-bold: 600;
13
+ --line-height-tight: 1.25;
14
+ --line-height-base: 1.5;
15
+ --line-height-loose: 1.75;
16
+
17
+ /* Spacing */
18
+ --spacing-xs: 0.25rem;
19
+ --spacing-sm: 0.5rem;
20
+ --spacing-md: 1rem;
21
+ --spacing-lg: 1.5rem;
22
+ --spacing-xl: 2rem;
23
+
24
+ /* Borders */
25
+ --border-radius-sm: 0.25rem;
26
+ --border-radius-md: 0.375rem;
27
+ --border-radius-lg: 0.5rem;
28
+ --border-width: 1px;
29
+ --border-width-thick: 2px;
30
+
31
+ /* Shadows */
32
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
33
+ --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
34
+ --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
35
+
36
+ /* Transitions */
37
+ --transition-fast: 150ms;
38
+ --transition-base: 200ms;
39
+ --transition-slow: 300ms;
40
+ --transition-timing: ease-in-out;
41
+ }
42
+
43
+ /* Base styles */
44
+ html {
45
+ box-sizing: border-box;
46
+ font-size: 16px;
47
+ }
48
+
49
+ *,
50
+ *:before,
51
+ *:after {
52
+ box-sizing: inherit;
53
+ }
54
+
55
+ body {
56
+ margin: 0;
57
+ padding: 0;
58
+ font-family: var(--font-family);
59
+ font-size: var(--font-size-base);
60
+ line-height: var(--line-height-base);
61
+ color: var(--text-color);
62
+ background-color: var(--background-color);
63
+ -webkit-font-smoothing: antialiased;
64
+ -moz-osx-font-smoothing: grayscale;
65
+ }
66
+
67
+ h1,
68
+ h2,
69
+ h3,
70
+ h4,
71
+ h5,
72
+ h6 {
73
+ margin: 0;
74
+ font-weight: var(--font-weight-bold);
75
+ line-height: var(--line-height-tight);
76
+ color: var(--text-color);
77
+ }
78
+
79
+ p {
80
+ margin: 0 0 var(--spacing-md) 0;
81
+ }
82
+
83
+ a {
84
+ color: var(--primary-color);
85
+ text-decoration: none;
86
+ transition: color var(--transition-base) var(--transition-timing);
87
+ }
88
+
89
+ a:hover {
90
+ color: var(--primary-color-light);
91
+ }
92
+
93
+ /* Utility classes */
94
+ .text-error {
95
+ color: var(--error-color);
96
+ }
97
+
98
+ .text-success {
99
+ color: var(--success-color);
100
+ }
101
+
102
+ .text-warning {
103
+ color: var(--warning-color);
104
+ }
105
+
106
+ .text-disabled {
107
+ color: var(--disabled-color);
108
+ }
109
+
110
+ .bg-card {
111
+ background-color: var(--card-bg);
112
+ }
113
+
114
+ .shadow-sm {
115
+ box-shadow: var(--shadow-sm);
116
+ }
117
+
118
+ .shadow-md {
119
+ box-shadow: var(--shadow-md);
120
+ }
121
+
122
+ .shadow-lg {
123
+ box-shadow: var(--shadow-lg);
124
+ }
125
+
126
+ .rounded-sm {
127
+ border-radius: var(--border-radius-sm);
128
+ }
129
+
130
+ .rounded-md {
131
+ border-radius: var(--border-radius-md);
132
+ }
133
+
134
+ .rounded-lg {
135
+ border-radius: var(--border-radius-lg);
136
+ }
137
+
138
+ /* Responsive breakpoints */
139
+ @media (max-width: 640px) {
140
+ html {
141
+ font-size: 14px;
142
+ }
143
+ }
144
+
145
+ @media (min-width: 1200px) {
146
+ html {
147
+ font-size: 16px;
148
+ }
149
+ }
150
+
151
+ /* Print styles */
152
+ @media print {
153
+ body {
154
+ background: white;
155
+ }
156
+
157
+ @page {
158
+ margin: 2cm;
159
+ }
160
+ }
@@ -0,0 +1,208 @@
1
+ <template>
2
+ <component
3
+ :is="isLink ? 'a' : 'button'"
4
+ :href="isLink ? href : undefined"
5
+ :type="isLink ? undefined : type"
6
+ :class="[
7
+ 'action',
8
+ {
9
+ 'action--icon-only': icon && !label,
10
+ 'action--label-only': !icon && label,
11
+ 'action--icon-label': icon && label,
12
+ 'action--disabled': disabled,
13
+ 'action--link': isLink,
14
+ 'action--small': size === 'small',
15
+ 'action--large': size === 'large',
16
+ 'action--transparent': variant === 'transparent',
17
+ },
18
+ ]"
19
+ :style="buttonStyle"
20
+ :disabled="disabled"
21
+ @click="handleClick"
22
+ >
23
+ <font-awesome-icon v-if="icon" :icon="icon" class="action__icon" />
24
+ <span v-if="label" class="action__label">{{ label }}</span>
25
+ </component>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { computed } from 'vue'
30
+
31
+ interface ActionProps {
32
+ icon?: string
33
+ label?: string
34
+ href?: string
35
+ type?: 'button' | 'submit' | 'reset'
36
+ disabled?: boolean
37
+ color?: string
38
+ size?: 'small' | 'regular' | 'large'
39
+ variant?: 'solid' | 'transparent'
40
+ }
41
+
42
+ const props = withDefaults(defineProps<ActionProps>(), {
43
+ icon: undefined,
44
+ label: undefined,
45
+ href: undefined,
46
+ type: 'button',
47
+ disabled: false,
48
+ color: 'var(--primary)',
49
+ size: 'regular',
50
+ variant: 'solid',
51
+ })
52
+
53
+ const emit = defineEmits<{
54
+ (e: 'click', event: MouseEvent): void
55
+ }>()
56
+
57
+ const isLink = computed(() => !!props.href)
58
+
59
+ const buttonStyle = computed(() => {
60
+ if (!props.color) return {}
61
+
62
+ if (props.variant === 'transparent') {
63
+ return {
64
+ backgroundColor: 'rgba(255, 255, 255, 0.1)',
65
+ color: props.color,
66
+ borderColor: props.color,
67
+ }
68
+ }
69
+
70
+ return props.href
71
+ ? {
72
+ color: props.color,
73
+ borderColor: 'transparent',
74
+ backgroundColor: 'transparent',
75
+ }
76
+ : {
77
+ color: 'rgba(255, 255, 255, 0.8)',
78
+ borderColor: props.color,
79
+ backgroundColor: props.color,
80
+ }
81
+ })
82
+
83
+ const handleClick = (event: MouseEvent) => {
84
+ if (!props.disabled) {
85
+ emit('click', event)
86
+ }
87
+ }
88
+ </script>
89
+
90
+ <style scoped>
91
+ .action {
92
+ display: inline-flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ gap: 0.5rem;
96
+ padding: 0.5rem 1rem;
97
+ border: 1px solid;
98
+ border-radius: 0.375rem;
99
+ font-size: 1rem;
100
+ font-weight: 500;
101
+ text-decoration: none;
102
+ cursor: pointer;
103
+ transition: all 0.2s ease-in-out;
104
+ }
105
+
106
+ /* Size variants */
107
+ .action--small {
108
+ padding: 0.25rem 0.5rem;
109
+ font-size: 0.8rem;
110
+ border-radius: 0.25rem;
111
+ gap: 0.25rem;
112
+ min-height: 1.5rem;
113
+ }
114
+
115
+ .action--small.action--icon-only {
116
+ padding: 0.375rem;
117
+ min-width: 1.5rem;
118
+ }
119
+
120
+ .action--small .action__icon {
121
+ font-size: 0.9rem;
122
+ width: 0.9rem;
123
+ height: 0.9rem;
124
+ }
125
+
126
+ .action--large {
127
+ padding: 0.75rem 1.5rem;
128
+ font-size: 1.25rem;
129
+ border-radius: 0.5rem;
130
+ gap: 0.625rem;
131
+ min-height: 2.5rem;
132
+ }
133
+
134
+ .action--large.action--icon-only {
135
+ padding: 1rem;
136
+ min-width: 2.5rem;
137
+ }
138
+
139
+ .action--large .action__icon {
140
+ font-size: 1.35rem;
141
+ width: 1.35rem;
142
+ height: 1.35rem;
143
+ }
144
+
145
+ .action:hover:not(.action--disabled) {
146
+ opacity: 0.9;
147
+ transform: translateY(-1px);
148
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
149
+ }
150
+
151
+ .action:active:not(.action--disabled) {
152
+ transform: translateY(0);
153
+ box-shadow: none;
154
+ }
155
+
156
+ .action--icon-only {
157
+ padding: 0.75rem;
158
+ border-radius: 50%;
159
+ aspect-ratio: 1;
160
+ }
161
+
162
+ .action--label-only {
163
+ padding: 0.5rem 1rem;
164
+ }
165
+
166
+ .action--icon-label {
167
+ padding: 0.5rem 1rem;
168
+ }
169
+
170
+ .action--disabled {
171
+ opacity: 0.6;
172
+ cursor: not-allowed;
173
+ }
174
+
175
+ .action--link {
176
+ background-color: transparent !important;
177
+ border: none !important;
178
+ box-shadow: none !important;
179
+ transform: none !important;
180
+ }
181
+
182
+ .action--link:hover:not(.action--disabled) {
183
+ opacity: 0.8;
184
+ transform: none;
185
+ box-shadow: none;
186
+ }
187
+
188
+ .action--link .action__label {
189
+ text-decoration: underline;
190
+ }
191
+
192
+ .action--transparent:hover:not(.action--disabled) {
193
+ background-color: rgba(255, 255, 255, 0.15);
194
+ }
195
+
196
+ .action__icon {
197
+ font-size: 1.25rem;
198
+ width: 1.25rem;
199
+ height: 1.25rem;
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: center;
203
+ }
204
+
205
+ .action__label {
206
+ white-space: nowrap;
207
+ }
208
+ </style>