@tak-ps/vue-tabler 2.7.0 → 2.9.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,14 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v2.9.0
14
+
15
+ - :bug: Add `white-space: pre;` to text area to retain newline characters
16
+
17
+ ### v2.8.0
18
+
19
+ - :tada: Add Enum Component
20
+
13
21
  ### v2.7.0
14
22
 
15
23
  - :tada: Add Bytes Component
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <div>
3
+ <label v-if='label' class="form-label" v-text='label'></label>
4
+
5
+ <select v-model='current' :disabled='disabled' class='form-select'>
6
+ <option v-for='option in options' :value="option" v-text='option'></option>
7
+ </select>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'TablerInput',
14
+ props: {
15
+ modelValue: {
16
+ type: String,
17
+ required: true
18
+ },
19
+ default: {
20
+ type: String,
21
+ required: false
22
+ },
23
+ options: {
24
+ type: Array,
25
+ required: true
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ default: false,
30
+ },
31
+ label: String,
32
+ },
33
+ data: function() {
34
+ return {
35
+ current: ''
36
+ }
37
+ },
38
+ mounted: function() {
39
+ if (!this.modelValue && this.default) this.current = this.default
40
+ else this.current = this.modelValue;
41
+ },
42
+ watch: {
43
+ current: function() {
44
+ if (this.current === this.modelValue) return;
45
+ this.$emit('update:modelValue', this.current);
46
+ }
47
+ }
48
+ }
49
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>
2
+ <div style='white-space: pre;'>
3
3
  <label v-if='label' class="form-label" v-text='label'></label>
4
4
 
5
5
  <template v-if='!rows || rows <= 1'>
package/lib.js CHANGED
@@ -8,10 +8,12 @@ import TablerToggle from './components/Toggle.vue'
8
8
  import TablerInput from './components/Input.vue'
9
9
  import TablerBreadCrumb from './components/BreadCrumb.vue';
10
10
  import TablerBytes from './components/Bytes.vue';
11
+ import TablerEnum from './components/Enum.vue';
11
12
  import TablerEpoch from './components/Epoch.vue';
12
13
  import TablerEpochRange from './components/EpochRange.vue';
13
14
 
14
15
  export {
16
+ TablerEnum,
15
17
  TablerBytes,
16
18
  TablerEpoch,
17
19
  TablerEpochRange,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "2.7.0",
4
+ "version": "2.9.0",
5
5
  "main": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",