@tak-ps/vue-tabler 3.7.0 → 3.8.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,16 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v3.8.0
14
+
15
+ - :tada: Add Preliminary `Dropdown` component for modular Dropdowns
16
+
17
+ ### v3.7.1
18
+
19
+ - :bug: Include missing components in `Enum` & `Toggle` comps
20
+ - :rocket: `TablerSchema`: Default to empty string for description prop
21
+ - :rocket: `TablerSchema`: Default to false for required prop
22
+
13
23
  ### v3.7.0
14
24
 
15
25
  - :rocket: Include `description` and `required` to `TablerSchema` and sub components
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="dropdown">
3
+ <div type="button" ref='button' :id='id' data-bs-toggle="dropdown" aria-expanded="false" class='border rounded' style='height: 36px;'>
4
+ <slot>
5
+ <SettingsIcon style='cursor-pointer'/>
6
+ </slot>
7
+ </div>
8
+ <ul class="dropdown-menu" :aria-labelledby='id'>
9
+ <slot name='dropdown'>
10
+ Dropdown Content
11
+ </slot>
12
+ </ul>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import {
18
+ SettingsIcon
19
+ } from 'vue-tabler-icon';
20
+
21
+ export default {
22
+ name: 'TablerDropdown',
23
+ data: function() {
24
+ return {
25
+ id: 'tabler-dropdown-' + Math.random().toString(36).substr(2, 9) + '-' + Date.now().toString(36)
26
+ }
27
+ },
28
+ components: {
29
+ SettingsIcon
30
+ }
31
+ }
32
+ </script>
@@ -16,13 +16,18 @@
16
16
  </div>
17
17
  <div class='col-12'>
18
18
  <select v-model='current' :disabled='disabled' class='form-select'>
19
- <option v-for='option in options' :value="option" v-text='option'></option>
19
+ <option :key='option' v-for='option in options' :value="option" v-text='option'></option>
20
20
  </select>
21
21
  </div>
22
22
  </div>
23
23
  </template>
24
24
 
25
25
  <script>
26
+ import {
27
+ InfoSquareIcon
28
+ } from 'vue-tabler-icons';
29
+ import Help from './Help.vue';
30
+
26
31
  export default {
27
32
  name: 'TablerEnum',
28
33
  props: {
@@ -69,6 +74,10 @@ export default {
69
74
  if (this.current === this.modelValue) return;
70
75
  this.$emit('update:modelValue', this.current);
71
76
  }
77
+ },
78
+ components: {
79
+ InfoSquareIcon,
80
+ Help
72
81
  }
73
82
  }
74
83
  </script>
@@ -84,6 +84,8 @@ export default {
84
84
  } else {
85
85
  return `${start_month} ${start.getFullYear()}, ${start_time} - ${end_month} ${end.getFullYear()}, ${end_time}`;
86
86
  }
87
+ } else {
88
+ return 'Invalid Format'
87
89
  }
88
90
  }
89
91
  }
@@ -20,9 +20,6 @@
20
20
 
21
21
  <script>
22
22
  import Modal from './Modal.vue';
23
- import {
24
- InfoSquareIcon
25
- } from 'vue-tabler-icons'
26
23
 
27
24
  export default {
28
25
  name: 'TablerHelp',
@@ -44,7 +41,6 @@ export default {
44
41
  },
45
42
  components: {
46
43
  Modal,
47
- InfoSquareIcon
48
44
  }
49
45
  }
50
46
  </script>
@@ -5,8 +5,8 @@
5
5
  <TablerEnum
6
6
  :label='key'
7
7
  :disabled='disabled'
8
- :required='schema.properties[key].required'
9
- :description='schema.properties[key].description'
8
+ :required='schema.properties[key].required || false'
9
+ :description='schema.properties[key].description || ""'
10
10
  v-model='data[key]'
11
11
  :options='schema.properties[key].enum'
12
12
  :default='schema.properties[key].default'
@@ -16,8 +16,8 @@
16
16
  <TablerInput
17
17
  :label='key'
18
18
  :disabled='disabled'
19
- :required='schema.properties[key].required'
20
- :description='schema.properties[key].description'
19
+ :required='schema.properties[key].required || false'
20
+ :description='schema.properties[key].description || ""'
21
21
  v-model='data[key]'
22
22
  />
23
23
  </template>
@@ -25,8 +25,8 @@
25
25
  <TablerToggle
26
26
  :label='key'
27
27
  :disabled='disabled'
28
- :required='schema.properties[key].required'
29
- :description='schema.properties[key].description'
28
+ :required='schema.properties[key].required || false'
29
+ :description='schema.properties[key].description || ""'
30
30
  v-model='data[key]'
31
31
  />
32
32
  </template>
@@ -21,6 +21,11 @@
21
21
  </template>
22
22
 
23
23
  <script>
24
+ import {
25
+ InfoSquareIcon
26
+ } from 'vue-tabler-icons';
27
+ import Help from './Help.vue';
28
+
24
29
  export default {
25
30
  name: 'TablerToggle',
26
31
  props: {
@@ -38,7 +43,7 @@ export default {
38
43
  },
39
44
  description: {
40
45
  type: String,
41
- default: false
46
+ default: ''
42
47
  },
43
48
  label: {
44
49
  type: String,
@@ -62,5 +67,9 @@ export default {
62
67
  this.$emit('update:modelValue', this.current);
63
68
  }
64
69
  },
70
+ components: {
71
+ InfoSquareIcon,
72
+ Help
73
+ }
65
74
  }
66
75
  </script>
package/lib.js CHANGED
@@ -1,3 +1,4 @@
1
+ export { default as TablerDropdown } from './components/Dropdown.vue'
1
2
  export { default as TablerPager } from './components/Pager.vue'
2
3
  export { default as TablerNone } from './components/None.vue'
3
4
  export { default as TablerError } from './components/Err.vue'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "3.7.0",
4
+ "version": "3.8.0",
5
5
  "lib": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",