@tak-ps/vue-tabler 3.55.0 → 3.55.2

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
+ ### v3.55.2
14
+
15
+ - :bug: Switch to `setup` for IconButton
16
+
17
+ ### v3.55.1
18
+
19
+ - :bug: Fix async import dep
20
+
13
21
  ### v3.55.0
14
22
 
15
23
  - :rocket: Dynamic Icon Resolution
@@ -10,7 +10,8 @@
10
10
  </template>
11
11
  <template v-else>
12
12
  <TablerIconButton
13
- :icon='IconTrash'
13
+ icon='IconTrash'
14
+ title='Delete'
14
15
  @click.stop.prevent='modal = true'
15
16
  />
16
17
  </template>
@@ -66,6 +67,7 @@ export default {
66
67
  components: {
67
68
  IconTrash,
68
69
  TablerLoading,
70
+ TablerIconButton,
69
71
  TablerModal
70
72
  },
71
73
  props: {
@@ -1,39 +1,40 @@
1
1
  <template>
2
- <component
3
- :is='IconButton'
4
- :title='title'
5
- :size='size'
6
- :stroke='stroke'
2
+ <div
7
3
  tabindex='0'
8
4
  role='button'
9
5
  v-tooltip='title'
10
6
  class='cursor-pointer hover-button rounded'
11
- />
7
+ >
8
+ <IconButton
9
+ :title='title'
10
+ :size='size'
11
+ :stroke='stroke'
12
+ />
13
+ </div>
12
14
  </template>
13
15
 
14
- <script>
15
- export default {
16
- name: 'TablerIconButton',
17
- props: {
18
- icon: {
19
- type: String,
20
- required: true
21
- },
22
- title: {
23
- type: String,
24
- required: true
25
- },
26
- size: {
27
- type: Number,
28
- default: 32
29
- },
30
- stroke: {
31
- type: Number,
32
- default: 5
33
- }
16
+ <script setup>
17
+ import { defineAsyncComponent, defineProps } from 'vue'
18
+ import * as Icons from '@tabler/icons-vue';
19
+
20
+ const props = defineProps({
21
+ icon: {
22
+ type: String,
23
+ required: true
24
+ },
25
+ title: {
26
+ type: String,
27
+ required: true
34
28
  },
35
- components: {
36
- IconButton: defineAsyncComponent(() => import(`@tabler/icons-vue/dist/esm/icons/${this.icon}.mjs`))
29
+ size: {
30
+ type: Number,
31
+ default: 32
32
+ },
33
+ stroke: {
34
+ type: Number,
35
+ default: 1
37
36
  }
38
- }
37
+ })
38
+
39
+ const IconButton = Icons[props.icon];
39
40
  </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.55.0",
4
+ "version": "3.55.2",
5
5
  "lib": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",
@@ -21,7 +21,8 @@
21
21
  "homepage": "https://github.com/tak-ps/vue-tabler#readme",
22
22
  "dependencies": {
23
23
  "@tabler/icons-vue": "^3.0.0",
24
- "showdown": "^2.1.0"
24
+ "showdown": "^2.1.0",
25
+ "vue": "^3.5.12"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@babel/eslint-parser": "^7.22.15",