@tak-ps/vue-tabler 3.48.0 → 3.49.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 CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v3.49.0
14
+
15
+ - :rocket: Add ability to specify a search icon for TablerInput
16
+
13
17
  ### v3.48.0
14
18
 
15
19
  - :rocket: Setup default stroke state
@@ -3,17 +3,25 @@
3
3
  <TablerLabel :label='label' :description='description' :required='required'><slot/></TablerLabel>
4
4
  <div class='col-12'>
5
5
  <template v-if='!rows || rows <= 1'>
6
- <input
7
- :disabled='disabled'
8
- v-model='current'
9
- @keyup.enter='$emit("submit")'
10
- :type='computed_type'
11
- :class='{
12
- "is-invalid": errorstr
13
- }'
14
- class="form-control"
15
- :placeholder='placeholder||label||""'
16
- />
6
+ <div class='input-icon'>
7
+ <span v-if='icon' class="input-icon-addon">
8
+ <IconSearch v-if='icon === "search"' :size='20' :stroke='1'/>
9
+ </span>
10
+ <input
11
+ :disabled='disabled'
12
+ v-model='current'
13
+ @keyup.enter='$emit("submit")'
14
+ :type='computed_type'
15
+ :class='{
16
+ "is-invalid": errorstr
17
+ }'
18
+ class="form-control"
19
+ :placeholder='placeholder||label||""'
20
+ />
21
+ <span v-if='$slots.posticon' class="input-icon-addon">
22
+ <slot name='prepost'/>
23
+ </span>
24
+ </div>
17
25
  </template>
18
26
  <template v-else>
19
27
  <textarea
@@ -37,6 +45,9 @@
37
45
 
38
46
  <script>
39
47
  import TablerLabel from '../internal/Label.vue';
48
+ import {
49
+ IconSearch
50
+ } from '@tabler/icons-vue';
40
51
 
41
52
  export default {
42
53
  name: 'TablerInput',
@@ -46,6 +57,9 @@ export default {
46
57
  type: [String, Number],
47
58
  required: true
48
59
  },
60
+ icon: {
61
+ type: String,
62
+ },
49
63
  required: {
50
64
  type: Boolean,
51
65
  default: false,
@@ -130,6 +144,7 @@ export default {
130
144
  }
131
145
  },
132
146
  components: {
147
+ IconSearch,
133
148
  TablerLabel
134
149
  }
135
150
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "3.48.0",
4
+ "version": "3.49.0",
5
5
  "lib": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",