@pocketprep/ui-kit 3.5.14 → 3.5.16

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.
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <script lang="ts">
20
- import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
20
+ import { Vue, Component, Prop } from 'vue-facing-decorator'
21
21
  import { dark } from '../../directives'
22
22
 
23
23
  type TLinkType = 'tertiary' | 'tertiary-red' | 'tertiary-small'
@@ -29,6 +29,7 @@ type TLinkType = 'tertiary' | 'tertiary-red' | 'tertiary-small'
29
29
  directives: {
30
30
  dark,
31
31
  },
32
+ emits: [ 'click' ],
32
33
  })
33
34
  export default class Link extends Vue {
34
35
  @Prop({ default: 'tertiary' }) readonly type!: TLinkType
@@ -38,12 +39,16 @@ export default class Link extends Vue {
38
39
  @Prop({ default: false }) readonly hasIcon!: boolean
39
40
  @Prop({ default: false }) readonly isDarkMode!: boolean
40
41
 
41
- @Emit('click')
42
42
  clicked (event: MouseEvent) {
43
+ if (this.disabled) {
44
+ event.preventDefault()
45
+ event.stopImmediatePropagation()
46
+ return
47
+ }
43
48
  if (this.href === '#') {
44
49
  event.preventDefault()
45
50
  }
46
- return event
51
+ this.$emit('click', event)
47
52
  }
48
53
  }
49
54
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/ui-kit",
3
- "version": "3.5.14",
3
+ "version": "3.5.16",
4
4
  "description": "Pocket Prep UI Kit",
5
5
  "author": "pocketprep",
6
6
  "scripts": {