@tak-ps/vue-tabler 3.54.1 → 3.55.1

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.1
14
+
15
+ - :bug: Fix async import dep
16
+
17
+ ### v3.55.0
18
+
19
+ - :rocket: Dynamic Icon Resolution
20
+
13
21
  ### v3.54.1
14
22
 
15
23
  - :rocket: Use props instead for IconButton
@@ -9,10 +9,8 @@
9
9
  </div>
10
10
  </template>
11
11
  <template v-else>
12
- <IconTrash
13
- :size='size'
14
- :stroke='1'
15
- class='cursor-pointer'
12
+ <TablerIconButton
13
+ :icon='IconTrash'
16
14
  @click.stop.prevent='modal = true'
17
15
  />
18
16
  </template>
@@ -57,6 +55,7 @@
57
55
 
58
56
  <script>
59
57
  import TablerModal from './Modal.vue';
58
+ import TablerIconButton from './IconButton.vue';
60
59
  import TablerLoading from './Loading.vue';
61
60
  import {
62
61
  IconTrash
@@ -1,22 +1,26 @@
1
1
  <template>
2
- <div
2
+ <component
3
+ :is='IconButton'
3
4
  :title='title'
5
+ :size='size'
6
+ :stroke='stroke'
4
7
  tabindex='0'
5
8
  role='button'
6
9
  v-tooltip='title'
7
10
  class='cursor-pointer hover-button rounded'
8
- >
9
- <slot
10
- :size='size'
11
- :stroke='stroke'
12
- />
13
- </div>
11
+ />
14
12
  </template>
15
13
 
16
14
  <script>
15
+ import { defineAsyncComponent } from 'vue'
16
+
17
17
  export default {
18
18
  name: 'TablerIconButton',
19
19
  props: {
20
+ icon: {
21
+ type: String,
22
+ required: true
23
+ },
20
24
  title: {
21
25
  type: String,
22
26
  required: true
@@ -30,5 +34,8 @@ export default {
30
34
  default: 5
31
35
  }
32
36
  },
37
+ components: {
38
+ IconButton: defineAsyncComponent(() => import(`@tabler/icons-vue/dist/esm/icons/${this.icon}.mjs`))
39
+ }
33
40
  }
34
41
  </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.54.1",
4
+ "version": "3.55.1",
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",