@pocketprep/ui-kit 3.0.3 → 3.0.5
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/dist/@pocketprep/ui-kit.js +77 -73
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +4 -4
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/lib/components/Buttons/Button.vue +4 -4
- package/lib/components/Buttons/Tab.vue +4 -4
- package/lib/components/Exams/ExamMenuCard.vue +5 -3
- package/lib/components/Search/Pill.vue +4 -4
- package/lib/components/Tables/Table.vue +7 -3
- package/package.json +1 -1
- package/stylelint.config.cjs +1 -1
|
@@ -63,15 +63,15 @@ export default class Button extends Vue {
|
|
|
63
63
|
@Prop({ default: '' }) readonly iconTitle!: string
|
|
64
64
|
@Prop({ default: false }) isLoading!: boolean
|
|
65
65
|
|
|
66
|
-
buttonClicked () {
|
|
66
|
+
buttonClicked (event: Event) {
|
|
67
67
|
if (!this.disabled && !this.isLoading) {
|
|
68
|
-
this.emitClick()
|
|
68
|
+
this.emitClick(event)
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
@Emit('click')
|
|
73
|
-
emitClick () {
|
|
74
|
-
return
|
|
73
|
+
emitClick (event: Event) {
|
|
74
|
+
return event
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
class="uikit-tab"
|
|
5
5
|
:class="{ 'uikit-tab--disabled': disabled, 'uikit-tab--active': active }"
|
|
6
6
|
:tabindex="disabled ? -1 : 0"
|
|
7
|
-
@click="emitClick
|
|
8
|
-
@keydown.enter="emitClick
|
|
7
|
+
@click="emitClick"
|
|
8
|
+
@keydown.enter="emitClick"
|
|
9
9
|
@mousedown.prevent
|
|
10
10
|
>
|
|
11
11
|
<slot />
|
|
@@ -27,8 +27,8 @@ export default class Tab extends Vue {
|
|
|
27
27
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
28
28
|
|
|
29
29
|
@Emit('click')
|
|
30
|
-
emitClick () {
|
|
31
|
-
return
|
|
30
|
+
emitClick (event: Event) {
|
|
31
|
+
return event
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
</script>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}"
|
|
9
9
|
:tabindex="isClickable ? '0' : '-1'"
|
|
10
10
|
@mousedown.prevent
|
|
11
|
-
@click="isClickable && emitClick()"
|
|
11
|
+
@click="isClickable && emitClick($event)"
|
|
12
12
|
@keydown="isClickable && emitKeydown($event)"
|
|
13
13
|
>
|
|
14
14
|
<div class="uikit-exam-menu-card__icon">
|
|
@@ -44,12 +44,14 @@
|
|
|
44
44
|
import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
|
|
45
45
|
import Icon from '../Icons/Icon.vue'
|
|
46
46
|
import BundleIcon from '../BundleIcons/BundleIcon.vue'
|
|
47
|
+
import PremiumPill from '../Bundles/PremiumPill.vue'
|
|
47
48
|
import type { Study } from '@pocketprep/types'
|
|
48
49
|
|
|
49
50
|
@Component({
|
|
50
51
|
components: {
|
|
51
52
|
BundleIcon,
|
|
52
53
|
Icon,
|
|
54
|
+
PremiumPill,
|
|
53
55
|
},
|
|
54
56
|
})
|
|
55
57
|
export default class ExamMenuCard extends Vue {
|
|
@@ -62,8 +64,8 @@ export default class ExamMenuCard extends Vue {
|
|
|
62
64
|
@Prop({ default: true }) isClickable!: boolean
|
|
63
65
|
|
|
64
66
|
@Emit('click')
|
|
65
|
-
emitClick () {
|
|
66
|
-
return
|
|
67
|
+
emitClick (event: Event) {
|
|
68
|
+
return event
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
@Emit('keydown')
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
class="uikit-pill"
|
|
5
5
|
:class="{ 'uikit-pill--show-close': showClose }"
|
|
6
6
|
:tabindex="showClose ? 0 : -1"
|
|
7
|
-
@click="showClose && emitClick()"
|
|
8
|
-
@keydown.enter="showClose && emitClick()"
|
|
7
|
+
@click="showClose && emitClick($event)"
|
|
8
|
+
@keydown.enter="showClose && emitClick($event)"
|
|
9
9
|
@mousedown.prevent
|
|
10
10
|
>
|
|
11
11
|
<div class="uikit-pill__label">
|
|
@@ -33,8 +33,8 @@ export default class Pill extends Vue {
|
|
|
33
33
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
34
34
|
|
|
35
35
|
@Emit('click')
|
|
36
|
-
emitClick () {
|
|
37
|
-
return
|
|
36
|
+
emitClick (event: Event) {
|
|
37
|
+
return event
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
</script>
|
|
@@ -238,7 +238,10 @@ export default class Table extends Vue {
|
|
|
238
238
|
@Prop() tableCellStyles!: Record<string, string>
|
|
239
239
|
|
|
240
240
|
gridStyles: Record<string, string> = {}
|
|
241
|
-
currentSort: ITableSortSettings = {
|
|
241
|
+
currentSort: ITableSortSettings = {
|
|
242
|
+
column: null,
|
|
243
|
+
direction: this.sortToggleOrder?.[0] !== undefined ? this.sortToggleOrder[0] : -1,
|
|
244
|
+
}
|
|
242
245
|
|
|
243
246
|
created () {
|
|
244
247
|
// Use default sort, if provided
|
|
@@ -269,9 +272,10 @@ export default class Table extends Vue {
|
|
|
269
272
|
this.currentSort.column = column
|
|
270
273
|
} else {
|
|
271
274
|
const currentSortDirIndex = this.sortToggleOrder.indexOf(this.currentSort.direction)
|
|
272
|
-
|
|
275
|
+
const newSortDirection = this.sortToggleOrder[
|
|
273
276
|
(currentSortDirIndex + 1) % this.sortToggleOrder.length
|
|
274
|
-
]
|
|
277
|
+
]
|
|
278
|
+
this.currentSort.direction = newSortDirection !== undefined ? newSortDirection : -1
|
|
275
279
|
}
|
|
276
280
|
this.emitSort()
|
|
277
281
|
}
|
package/package.json
CHANGED