@tak-ps/vue-tabler 3.48.0 → 3.50.0
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 +8 -0
- package/components/input/Input.vue +32 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
## Version History
|
|
12
12
|
|
|
13
|
+
### v3.50.0
|
|
14
|
+
|
|
15
|
+
- :rocket: Show label conditionally to avoid 4px margin on top of input
|
|
16
|
+
|
|
17
|
+
### v3.49.0
|
|
18
|
+
|
|
19
|
+
- :rocket: Add ability to specify a search icon for TablerInput
|
|
20
|
+
|
|
13
21
|
### v3.48.0
|
|
14
22
|
|
|
15
23
|
- :rocket: Setup default stroke state
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class='row'>
|
|
3
|
-
<TablerLabel
|
|
3
|
+
<TablerLabel
|
|
4
|
+
v-if='label'
|
|
5
|
+
:label='label'
|
|
6
|
+
:description='description'
|
|
7
|
+
:required='required'
|
|
8
|
+
><slot/></TablerLabel>
|
|
4
9
|
<div class='col-12'>
|
|
5
10
|
<template v-if='!rows || rows <= 1'>
|
|
6
|
-
<input
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
<div class='input-icon'>
|
|
12
|
+
<span v-if='icon' class="input-icon-addon">
|
|
13
|
+
<IconSearch v-if='icon === "search"' :size='20' :stroke='1'/>
|
|
14
|
+
</span>
|
|
15
|
+
<input
|
|
16
|
+
:disabled='disabled'
|
|
17
|
+
v-model='current'
|
|
18
|
+
@keyup.enter='$emit("submit")'
|
|
19
|
+
:type='computed_type'
|
|
20
|
+
:class='{
|
|
21
|
+
"is-invalid": errorstr
|
|
22
|
+
}'
|
|
23
|
+
class="form-control"
|
|
24
|
+
:placeholder='placeholder||label||""'
|
|
25
|
+
/>
|
|
26
|
+
<span v-if='$slots.posticon' class="input-icon-addon">
|
|
27
|
+
<slot name='prepost'/>
|
|
28
|
+
</span>
|
|
29
|
+
</div>
|
|
17
30
|
</template>
|
|
18
31
|
<template v-else>
|
|
19
32
|
<textarea
|
|
@@ -37,6 +50,9 @@
|
|
|
37
50
|
|
|
38
51
|
<script>
|
|
39
52
|
import TablerLabel from '../internal/Label.vue';
|
|
53
|
+
import {
|
|
54
|
+
IconSearch
|
|
55
|
+
} from '@tabler/icons-vue';
|
|
40
56
|
|
|
41
57
|
export default {
|
|
42
58
|
name: 'TablerInput',
|
|
@@ -46,6 +62,9 @@ export default {
|
|
|
46
62
|
type: [String, Number],
|
|
47
63
|
required: true
|
|
48
64
|
},
|
|
65
|
+
icon: {
|
|
66
|
+
type: String,
|
|
67
|
+
},
|
|
49
68
|
required: {
|
|
50
69
|
type: Boolean,
|
|
51
70
|
default: false,
|
|
@@ -130,6 +149,7 @@ export default {
|
|
|
130
149
|
}
|
|
131
150
|
},
|
|
132
151
|
components: {
|
|
152
|
+
IconSearch,
|
|
133
153
|
TablerLabel
|
|
134
154
|
}
|
|
135
155
|
}
|