@tak-ps/vue-tabler 3.54.0 → 3.55.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
+ ### v3.55.0
14
+
15
+ - :rocket: Dynamic Icon Resolution
16
+
17
+ ### v3.54.1
18
+
19
+ - :rocket: Use props instead for IconButton
20
+
13
21
  ### v3.54.0
14
22
 
15
23
  - :tada: Sketch out new `IconButton` component
@@ -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,13 +1,14 @@
1
1
  <template>
2
- <component
3
- :is='icon'
4
- :title='title'
5
- :size='size'
6
- :stroke='stroke'
7
- tabindex='0'
8
- v-tooltip='title'
9
- class='cursor-pointer hover-button rounded'
10
- />
2
+ <component
3
+ :is='IconButton'
4
+ :title='title'
5
+ :size='size'
6
+ :stroke='stroke'
7
+ tabindex='0'
8
+ role='button'
9
+ v-tooltip='title'
10
+ class='cursor-pointer hover-button rounded'
11
+ />
11
12
  </template>
12
13
 
13
14
  <script>
@@ -15,7 +16,7 @@ export default {
15
16
  name: 'TablerIconButton',
16
17
  props: {
17
18
  icon: {
18
- type: Object,
19
+ type: String,
19
20
  required: true
20
21
  },
21
22
  title: {
@@ -31,5 +32,8 @@ export default {
31
32
  default: 5
32
33
  }
33
34
  },
35
+ components: {
36
+ IconButton: defineAsyncComponent(() => import(`@tabler/icons-vue/dist/esm/icons/${this.icon}.mjs`))
37
+ }
34
38
  }
35
39
  </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.0",
4
+ "version": "3.55.0",
5
5
  "lib": "lib.js",
6
6
  "module": "lib.js",
7
7
  "description": "Tabler UI components for Vue3",