@tak-ps/vue-tabler 3.72.0 → 3.72.1

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/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v3.72.1
14
+
15
+ - :bug: User error not committing the file
16
+
13
17
  ### v3.72.0
14
18
 
15
19
  - :rocket: Add seperate File Input
@@ -0,0 +1,103 @@
1
+ <template>
2
+ <div class='row'>
3
+ <TablerLabel
4
+ v-if='label'
5
+ :label='label'
6
+ :description='description'
7
+ :required='required'
8
+ >
9
+ <slot />
10
+ </TablerLabel>
11
+ <div class='col-12'>
12
+ <input
13
+ ref='text-input'
14
+ @change='$emit("change", $event)'
15
+ :disabled='disabled'
16
+ :autofocus='autofocus'
17
+ :accept='accept'
18
+ type='file'
19
+ :class='{
20
+ "is-invalid": errorstr
21
+ }'
22
+ class='form-control'
23
+ :placeholder='placeholder||label||""'
24
+ @blur='$emit("blur")'
25
+ />
26
+ <span
27
+ v-if='loading'
28
+ class='input-icon-addon'
29
+ >
30
+ <div
31
+ class='spinner-border spinner-border-sm text-secondary'
32
+ role='status'
33
+ />
34
+ </span>
35
+ <div
36
+ v-if='errorstr'
37
+ class='invalid-feedback'
38
+ v-text='errorstr'
39
+ />
40
+ </div>
41
+ </div>
42
+ </template>
43
+
44
+ <script>
45
+ import TablerLabel from '../internal/Label.vue';
46
+
47
+ export default {
48
+ name: 'TablerFileInput',
49
+ components: {
50
+ TablerLabel
51
+ },
52
+ props: {
53
+ modelValue: {
54
+ type: [String, Number],
55
+ required: true
56
+ },
57
+ autofocus: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ loading: {
62
+ type: Boolean,
63
+ default: false
64
+ },
65
+ required: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ disabled: {
70
+ type: Boolean,
71
+ default: false,
72
+ },
73
+ accept: {
74
+ type: String,
75
+ },
76
+ description: {
77
+ type: String,
78
+ default: '',
79
+ },
80
+ label: String,
81
+ placeholder: String,
82
+ error: String,
83
+ },
84
+ emits: ['blur', 'change'],
85
+ data: function() {
86
+ return {
87
+ help: false,
88
+ internal_error: '',
89
+ }
90
+ },
91
+ computed: {
92
+ errorstr: function() {
93
+ if (this.error) return this.error;
94
+ return this.internal_error;
95
+ },
96
+ },
97
+ mounted: function() {
98
+ if (this.autofocus) {
99
+ this.$refs['text-input'].focus();
100
+ }
101
+ }
102
+ }
103
+ </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "3.72.0",
4
+ "version": "3.72.1",
5
5
  "lib": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",