@pocketprep/ui-kit 3.4.90 → 3.5.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/README.md +2 -2
- package/dist/@pocketprep/ui-kit.css +1 -0
- package/dist/@pocketprep/ui-kit.js +16490 -18228
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +11 -11
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/eslint.config.ts +111 -0
- package/lib/components/Banners/Banner.vue +2 -2
- package/lib/components/Bundles/BundleList.vue +1 -1
- package/lib/components/Bundles/BundleSearch.vue +43 -12
- package/lib/components/Bundles/PremiumPill.vue +2 -2
- package/lib/components/Buttons/Button.vue +19 -18
- package/lib/components/Buttons/Link.vue +9 -8
- package/lib/components/Buttons/Tab.vue +4 -3
- package/lib/components/Calendar/Calendar.vue +14 -2
- package/lib/components/Charts/Bar.vue +3 -3
- package/lib/components/Charts/Pie.vue +4 -4
- package/lib/components/Controls/SegmentControl.vue +8 -7
- package/lib/components/Controls/Slider.vue +2 -3
- package/lib/components/Controls/ToggleSwitch.vue +3 -2
- package/lib/components/EmptyStates/EmptyState.vue +3 -2
- package/lib/components/Exams/ExamCard.vue +3 -3
- package/lib/components/Exams/ExamMenuCard.vue +2 -2
- package/lib/components/Filters/FilterDropdown.vue +2 -2
- package/lib/components/Filters/FilterOptions.vue +2 -2
- package/lib/components/Forms/Checkbox.vue +2 -2
- package/lib/components/Forms/CheckboxOption.vue +2 -2
- package/lib/components/Forms/Errors.vue +2 -2
- package/lib/components/Forms/Input.vue +2 -2
- package/lib/components/Forms/Radio.vue +37 -39
- package/lib/components/Forms/RadioButton.vue +1 -1
- package/lib/components/Forms/Select.vue +7 -6
- package/lib/components/Forms/Textarea.vue +2 -2
- package/lib/components/Icons/Icon.vue +1 -0
- package/lib/components/Icons/IconEdit.vue +4 -2
- package/lib/components/Icons/IconFullViewActive.vue +1 -1
- package/lib/components/Icons/IconLoading2.vue +1 -3
- package/lib/components/Loaders/SkeletonLoader.vue +2 -2
- package/lib/components/Messaging/InfoMessage.vue +2 -2
- package/lib/components/Modal/Modal.vue +2 -2
- package/lib/components/Modal/ModalContainer.vue +2 -2
- package/lib/components/Onboarding/EmailAuth.vue +5 -5
- package/lib/components/Onboarding/MagicCodeEntry.vue +3 -4
- package/lib/components/Pagination/QuestionReviewPagination.vue +23 -21
- package/lib/components/Pagination/TablePagination.vue +2 -2
- package/lib/components/Quiz/FlagToggle.vue +2 -2
- package/lib/components/Quiz/GlobalMetricsToggle.vue +3 -2
- package/lib/components/Quiz/KeyboardShortcutsButton.vue +1 -1
- package/lib/components/Quiz/KeyboardShortcutsModal.vue +1 -1
- package/lib/components/Quiz/Question/ChoicesContainer.vue +99 -132
- package/lib/components/Quiz/Question/DropdownExplanation.vue +41 -55
- package/lib/components/Quiz/Question/Explanation.vue +49 -59
- package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +208 -226
- package/lib/components/Quiz/Question/MatrixRadioGroup.vue +7 -6
- package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +315 -320
- package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +14 -11
- package/lib/components/Quiz/Question/PassageAndImage.vue +34 -45
- package/lib/components/Quiz/Question/PassageAndImageDropdown.vue +39 -49
- package/lib/components/Quiz/Question/Paywall.vue +30 -41
- package/lib/components/Quiz/Question/QuestionContext.vue +24 -33
- package/lib/components/Quiz/Question/StatsSummary.vue +12 -22
- package/lib/components/Quiz/Question/Summary.vue +56 -66
- package/lib/components/Quiz/Question/composables.ts +71 -0
- package/lib/components/Quiz/Question/injectionSymbols.ts +69 -0
- package/lib/components/Quiz/Question.vue +810 -1009
- package/lib/components/Quiz/QuizContainer.vue +63 -67
- package/lib/components/Quiz/QuizProgress.vue +73 -77
- package/lib/components/Quiz/QuizProgressBar.vue +3 -2
- package/lib/components/Quiz/question.d.ts +4 -4
- package/lib/components/Search/Pill.vue +2 -2
- package/lib/components/Search/Search.vue +2 -2
- package/lib/components/SidePanels/SidePanel.vue +8 -3
- package/lib/components/Tables/Table.vue +4 -3
- package/lib/components/Tables/TableActions.vue +3 -3
- package/lib/components/Tags/Tag.vue +2 -2
- package/lib/components/Toasts/Toast.vue +5 -3
- package/lib/components/Tooltips/OverflowTooltip.vue +2 -2
- package/lib/components/Tooltips/Tooltip.vue +2 -2
- package/lib/directives.ts +28 -23
- package/lib/pocketprep-export.module.scss +3 -2
- package/lib/pocketprep.scss +2 -2
- package/lib/styles/_breakpoints.scss +12 -24
- package/lib/styles/_colors.scss +0 -1
- package/package.json +38 -29
- package/stylelint.config.js +38 -0
- package/.eslintrc.cjs +0 -74
- package/dist/style.css +0 -1
- package/stylelint.config.cjs +0 -22
|
@@ -50,7 +50,8 @@ export default class ToggleSwitch extends Vue {
|
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<style lang="scss">
|
|
53
|
-
@
|
|
53
|
+
@use 'sass:color';
|
|
54
|
+
@use '@/styles/colors' as *;
|
|
54
55
|
|
|
55
56
|
.uikit-toggle-switch {
|
|
56
57
|
background-color: $steel;
|
|
@@ -104,7 +105,7 @@ export default class ToggleSwitch extends Vue {
|
|
|
104
105
|
background-color: $brand-blue;
|
|
105
106
|
|
|
106
107
|
&:hover {
|
|
107
|
-
background-color:
|
|
108
|
+
background-color: color.adjust($brand-blue, $lightness: -10%);
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
&--dark {
|
|
@@ -48,6 +48,7 @@ import Blob from '../Blobs/Blob.vue'
|
|
|
48
48
|
import { dark } from '../../directives'
|
|
49
49
|
|
|
50
50
|
@Component({
|
|
51
|
+
name: 'EmptyState',
|
|
51
52
|
components: {
|
|
52
53
|
Icon,
|
|
53
54
|
Blob,
|
|
@@ -117,8 +118,8 @@ export default class EmptyState extends Vue {
|
|
|
117
118
|
</script>
|
|
118
119
|
|
|
119
120
|
<style lang="scss">
|
|
120
|
-
@
|
|
121
|
-
@
|
|
121
|
+
@use '@/styles/breakpoints' as *;
|
|
122
|
+
@use '@/styles/colors' as *;
|
|
122
123
|
|
|
123
124
|
.uikit-empty-state {
|
|
124
125
|
text-align: center;
|
|
@@ -110,8 +110,8 @@ export default class ExamCard extends Vue {
|
|
|
110
110
|
</script>
|
|
111
111
|
|
|
112
112
|
<style lang="scss">
|
|
113
|
-
@
|
|
114
|
-
@
|
|
113
|
+
@use '@/styles/breakpoints' as *;
|
|
114
|
+
@use '@/styles/colors' as *;
|
|
115
115
|
|
|
116
116
|
.uikit-exam-card {
|
|
117
117
|
position: relative;
|
|
@@ -135,7 +135,7 @@ export default class ExamCard extends Vue {
|
|
|
135
135
|
width: 340px;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
&:not(&--cancel
|
|
138
|
+
&:not(&--cancel, &--disable-interaction) {
|
|
139
139
|
cursor: pointer;
|
|
140
140
|
|
|
141
141
|
&:hover,
|
|
@@ -76,8 +76,8 @@ export default class ExamMenuCard extends Vue {
|
|
|
76
76
|
</script>
|
|
77
77
|
|
|
78
78
|
<style lang="scss">
|
|
79
|
-
@
|
|
80
|
-
@
|
|
79
|
+
@use '@/styles/breakpoints' as *;
|
|
80
|
+
@use '@/styles/colors' as *;
|
|
81
81
|
|
|
82
82
|
.uikit-exam-menu-card {
|
|
83
83
|
display: flex;
|
|
@@ -152,8 +152,8 @@ export default class FilterDropdown extends Vue {
|
|
|
152
152
|
</script>
|
|
153
153
|
|
|
154
154
|
<style lang="scss">
|
|
155
|
-
@
|
|
156
|
-
@
|
|
155
|
+
@use '@/styles/breakpoints' as *;
|
|
156
|
+
@use '@/styles/colors' as *;
|
|
157
157
|
|
|
158
158
|
.uikit-filter {
|
|
159
159
|
position: relative;
|
|
@@ -200,8 +200,8 @@ export default class FilterOptions extends Vue {
|
|
|
200
200
|
</script>
|
|
201
201
|
|
|
202
202
|
<style lang="scss">
|
|
203
|
-
@
|
|
204
|
-
@
|
|
203
|
+
@use '@/styles/breakpoints' as *;
|
|
204
|
+
@use '@/styles/colors' as *;
|
|
205
205
|
|
|
206
206
|
.filter-options {
|
|
207
207
|
background: $white;
|
|
@@ -73,8 +73,8 @@ export default class Checkbox extends Vue {
|
|
|
73
73
|
</script>
|
|
74
74
|
|
|
75
75
|
<style lang="scss">
|
|
76
|
-
@
|
|
77
|
-
@
|
|
76
|
+
@use '@/styles/breakpoints' as *;
|
|
77
|
+
@use '@/styles/colors' as *;
|
|
78
78
|
|
|
79
79
|
.uikit-checkbox {
|
|
80
80
|
background: $white;
|
|
@@ -70,8 +70,8 @@ export default class CheckboxOption extends Vue {
|
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<style lang="scss">
|
|
73
|
-
@
|
|
74
|
-
@
|
|
73
|
+
@use '@/styles/breakpoints' as *;
|
|
74
|
+
@use '@/styles/colors' as *;
|
|
75
75
|
|
|
76
76
|
.uikit-checkbox-option {
|
|
77
77
|
font-size: 15px;
|
|
@@ -55,8 +55,8 @@ export default class Errors extends Vue {
|
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
57
|
<style lang="scss">
|
|
58
|
-
@
|
|
59
|
-
@
|
|
58
|
+
@use '@/styles/breakpoints' as *;
|
|
59
|
+
@use '@/styles/colors' as *;
|
|
60
60
|
|
|
61
61
|
.uikit-errors {
|
|
62
62
|
border: 1px solid rgba($red-pegasus, 0.5);
|
|
@@ -146,8 +146,8 @@ export default class Input extends Vue {
|
|
|
146
146
|
</script>
|
|
147
147
|
|
|
148
148
|
<style lang="scss">
|
|
149
|
-
@
|
|
150
|
-
@
|
|
149
|
+
@use '@/styles/breakpoints' as *;
|
|
150
|
+
@use '@/styles/colors' as *;
|
|
151
151
|
|
|
152
152
|
.uikit-input {
|
|
153
153
|
&__input {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
'uikit-radio__item--has-helper-text': !!(item.helperText)
|
|
36
36
|
}"
|
|
37
37
|
role="radio"
|
|
38
|
-
:aria-checked="modelValue && item.value === modelValue.value"
|
|
38
|
+
:aria-checked="!!modelValue && item.value === modelValue.value"
|
|
39
39
|
:aria-label="`${item.label}${ item.helperText ? ` ${item.helperText}` : '' }`"
|
|
40
40
|
@click="!(disabled || item.disabled ) && selectItem(item)"
|
|
41
41
|
@keydown.enter.space="keyPressedItem"
|
|
@@ -66,59 +66,57 @@
|
|
|
66
66
|
</div>
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
|
-
<script lang="ts">
|
|
70
|
-
import {
|
|
71
|
-
import { dark } from '../../directives'
|
|
69
|
+
<script setup lang="ts">
|
|
70
|
+
import { ref } from 'vue'
|
|
71
|
+
import { dark as vDark } from '../../directives'
|
|
72
72
|
import RadioButton from './RadioButton.vue'
|
|
73
73
|
|
|
74
74
|
interface IItem {
|
|
75
|
-
value: string
|
|
76
|
-
label
|
|
75
|
+
value: string | number
|
|
76
|
+
label?: string
|
|
77
77
|
helperText?: string
|
|
78
78
|
disabled?: boolean
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
const props = withDefaults(defineProps<{
|
|
82
|
+
label?: string
|
|
83
|
+
data: IItem[]
|
|
84
|
+
center?: boolean
|
|
85
|
+
modelValue: IItem | null
|
|
86
|
+
disabled?: boolean
|
|
87
|
+
isDarkMode?: boolean
|
|
88
|
+
labelledBy?: string | false
|
|
89
|
+
}>(), {
|
|
90
|
+
label: '',
|
|
91
|
+
isDarkMode: false,
|
|
92
|
+
labelledBy: false,
|
|
88
93
|
})
|
|
89
|
-
export default class Radio extends Vue {
|
|
90
|
-
@Prop() label?: string
|
|
91
|
-
@Prop() data!: IItem[]
|
|
92
|
-
@Prop() center?: boolean
|
|
93
|
-
@Prop() modelValue!: IItem
|
|
94
|
-
@Prop() disabled?: boolean
|
|
95
|
-
@Prop({ default: false }) isDarkMode!: boolean
|
|
96
|
-
@Prop({ default: false }) labelledBy!: string | false
|
|
97
|
-
|
|
98
|
-
uid = Math.floor(Math.random() * 1e9)
|
|
99
|
-
hover = false
|
|
100
|
-
focus = false
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
95
|
+
const emit = defineEmits<{
|
|
96
|
+
'update:modelValue': [ item: IItem ]
|
|
97
|
+
}>()
|
|
106
98
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
99
|
+
const uid = Math.floor(Math.random() * 1e9)
|
|
100
|
+
const hover = ref(false)
|
|
101
|
+
|
|
102
|
+
const selectItem = (item: IItem) => {
|
|
103
|
+
emit('update:modelValue', item)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const keyPressedItem = (e: KeyboardEvent) => {
|
|
107
|
+
// select option on enter or space
|
|
108
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
109
|
+
e.preventDefault()
|
|
110
|
+
const itemValue = (e.target as HTMLElement).getAttribute('data-value')
|
|
111
|
+
const item = props.data.find(i => String(i.value) === itemValue)
|
|
112
|
+
item && selectItem(item)
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
115
|
</script>
|
|
118
116
|
|
|
119
117
|
<style lang="scss">
|
|
120
|
-
@
|
|
121
|
-
@
|
|
118
|
+
@use '@/styles/breakpoints' as *;
|
|
119
|
+
@use '@/styles/colors' as *;
|
|
122
120
|
|
|
123
121
|
.uikit-radio {
|
|
124
122
|
&__label {
|
|
@@ -163,6 +163,7 @@ interface IItem {
|
|
|
163
163
|
* @see [Designs for Inputs](https://marvelapp.com/adf8ab3/screen/70331421)
|
|
164
164
|
*/
|
|
165
165
|
@Component({
|
|
166
|
+
name: 'PocketSelect',
|
|
166
167
|
components: {
|
|
167
168
|
Icon,
|
|
168
169
|
},
|
|
@@ -447,8 +448,8 @@ export default class Select extends Vue {
|
|
|
447
448
|
</script>
|
|
448
449
|
|
|
449
450
|
<style lang="scss">
|
|
450
|
-
@
|
|
451
|
-
@
|
|
451
|
+
@use '@/styles/breakpoints' as *;
|
|
452
|
+
@use '@/styles/colors' as *;
|
|
452
453
|
|
|
453
454
|
.uikit-select {
|
|
454
455
|
position: relative;
|
|
@@ -595,13 +596,13 @@ export default class Select extends Vue {
|
|
|
595
596
|
margin: 4px 0 0 0;
|
|
596
597
|
|
|
597
598
|
&--dark {
|
|
598
|
-
&--hover {
|
|
599
|
-
background-color: $charcoal;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
599
|
border-color: $pewter;
|
|
603
600
|
color: $fog;
|
|
604
601
|
caret-color: $banana-bread;
|
|
602
|
+
|
|
603
|
+
&--hover {
|
|
604
|
+
background-color: $charcoal;
|
|
605
|
+
}
|
|
605
606
|
}
|
|
606
607
|
}
|
|
607
608
|
|
|
@@ -100,8 +100,8 @@ export default class Textarea extends Vue {
|
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
102
|
<style lang="scss">
|
|
103
|
-
@
|
|
104
|
-
@
|
|
103
|
+
@use '@/styles/breakpoints' as *;
|
|
104
|
+
@use '@/styles/colors' as *;
|
|
105
105
|
|
|
106
106
|
.uikit-textarea {
|
|
107
107
|
&__container {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- eslint-disable -->
|
|
3
3
|
<svg width="28px" height="20px" viewBox="0 0 28 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
4
|
-
<title>
|
|
4
|
+
<title>{{ title }}</title>
|
|
5
5
|
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
6
6
|
<g transform="translate(-50.000000, -9.000000)">
|
|
7
7
|
<g transform="translate(52.000000, 10.500000)">
|
|
@@ -15,7 +15,7 @@ export default class IconLoading2 extends Vue {
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<style lang="scss">
|
|
18
|
-
@
|
|
18
|
+
@use '@/styles/colors' as *;
|
|
19
19
|
|
|
20
20
|
.uikit-loading {
|
|
21
21
|
height: 100%;
|
|
@@ -40,12 +40,10 @@ export default class IconLoading2 extends Vue {
|
|
|
40
40
|
|
|
41
41
|
@keyframes spin {
|
|
42
42
|
from {
|
|
43
|
-
-webkit-transform: rotate(0deg);
|
|
44
43
|
transform: rotate(0deg);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
to {
|
|
48
|
-
-webkit-transform: rotate(359deg);
|
|
49
47
|
transform: rotate(359deg);
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -12,8 +12,8 @@ export default class SkeletonLoader extends Vue {}
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<style lang="scss" scoped>
|
|
15
|
-
@
|
|
16
|
-
@
|
|
15
|
+
@use '@/styles/breakpoints' as *;
|
|
16
|
+
@use '@/styles/colors' as *;
|
|
17
17
|
|
|
18
18
|
.uikit-skeleton-loader {
|
|
19
19
|
// Using width and height of parent
|
|
@@ -51,8 +51,8 @@ export default class Modal extends Vue {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<style lang="scss">
|
|
54
|
-
@
|
|
55
|
-
@
|
|
54
|
+
@use '@/styles/breakpoints' as *;
|
|
55
|
+
@use '@/styles/colors' as *;
|
|
56
56
|
|
|
57
57
|
.uikit-modal {
|
|
58
58
|
border-radius: 12px;
|
|
@@ -163,8 +163,8 @@ export default class ModalContainer extends Vue {
|
|
|
163
163
|
</script>
|
|
164
164
|
|
|
165
165
|
<style lang="scss">
|
|
166
|
-
@
|
|
167
|
-
@
|
|
166
|
+
@use '@/styles/breakpoints' as *;
|
|
167
|
+
@use '@/styles/colors' as *;
|
|
168
168
|
|
|
169
169
|
.uikit-modal-container {
|
|
170
170
|
position: absolute;
|
|
@@ -84,7 +84,7 @@ export default class EmailAuth extends Vue {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
submitSignIn () {
|
|
88
88
|
this.isLoading = true
|
|
89
89
|
this.errorMessage = ''
|
|
90
90
|
|
|
@@ -99,7 +99,7 @@ export default class EmailAuth extends Vue {
|
|
|
99
99
|
this.isLoading = false
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
resendEmail () {
|
|
103
103
|
this.errorMessage = ''
|
|
104
104
|
this.isResending = true
|
|
105
105
|
this.emitResend({ email: this.email })
|
|
@@ -107,7 +107,7 @@ export default class EmailAuth extends Vue {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
@Emit('submit')
|
|
110
|
-
emitSubmit (results: { email: string; code: string}) {
|
|
110
|
+
emitSubmit (results: { email: string; code: string }) {
|
|
111
111
|
return results
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -124,8 +124,8 @@ export default class EmailAuth extends Vue {
|
|
|
124
124
|
</script>
|
|
125
125
|
|
|
126
126
|
<style lang="scss">
|
|
127
|
-
@
|
|
128
|
-
@
|
|
127
|
+
@use '@/styles/breakpoints' as *;
|
|
128
|
+
@use '@/styles/colors' as *;
|
|
129
129
|
|
|
130
130
|
.uikit-email-auth {
|
|
131
131
|
&__form {
|
|
@@ -42,8 +42,8 @@ export default class MagicCodeEntry extends Vue {
|
|
|
42
42
|
mounted () {
|
|
43
43
|
// Ensure proper letter spacing for magic code in case of a11y browser extension overrides
|
|
44
44
|
setTimeout(() => {
|
|
45
|
-
const codeInputEl = document.querySelector('.uikit-magic-code__code-input')
|
|
46
|
-
if (codeInputEl) {
|
|
45
|
+
const codeInputEl = document.querySelector('.uikit-magic-code__code-input')
|
|
46
|
+
if (codeInputEl instanceof HTMLElement) {
|
|
47
47
|
codeInputEl.style.letterSpacing = '35.5px'
|
|
48
48
|
}
|
|
49
49
|
}, 500)
|
|
@@ -127,7 +127,7 @@ export default class MagicCodeEntry extends Vue {
|
|
|
127
127
|
</script>
|
|
128
128
|
|
|
129
129
|
<style lang="scss">
|
|
130
|
-
@
|
|
130
|
+
@use '@/styles/colors' as *;
|
|
131
131
|
|
|
132
132
|
.uikit-magic-code {
|
|
133
133
|
position: relative;
|
|
@@ -184,7 +184,6 @@ export default class MagicCodeEntry extends Vue {
|
|
|
184
184
|
appearance: none;
|
|
185
185
|
|
|
186
186
|
&::selection {
|
|
187
|
-
color: none;
|
|
188
187
|
background: none;
|
|
189
188
|
}
|
|
190
189
|
}
|
|
@@ -40,37 +40,39 @@
|
|
|
40
40
|
</div>
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
|
-
<script lang="ts">
|
|
44
|
-
import {
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
import { computed } from 'vue'
|
|
45
45
|
import Icon from '../Icons/Icon.vue'
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
const props = withDefaults(defineProps<{
|
|
48
|
+
currentPage?: number
|
|
49
|
+
total?: number
|
|
50
|
+
}>(), {
|
|
51
|
+
currentPage: 0,
|
|
52
|
+
total: 0,
|
|
51
53
|
})
|
|
52
|
-
export default class QuestionReviewPagination extends Vue {
|
|
53
|
-
@Prop({ default: 0 }) currentPage!: number
|
|
54
|
-
@Prop() total!: number
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const emit = defineEmits<{
|
|
56
|
+
changePage: [ pageNum: number ]
|
|
57
|
+
}>()
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
const nextPageDisabled = computed(() => {
|
|
60
|
+
return props.currentPage >= Math.floor(props.total - 1)
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const changePage = (direction: 'next' | 'previous') => {
|
|
64
|
+
if (direction === 'next') {
|
|
65
|
+
const pageNum = nextPageDisabled.value ? props.currentPage : props.currentPage + 1
|
|
66
|
+
emit('changePage', pageNum)
|
|
67
|
+
} else {
|
|
68
|
+
emit('changePage', Math.max(0, props.currentPage - 1))
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
</script>
|
|
70
72
|
|
|
71
73
|
<style lang="scss" scoped>
|
|
72
|
-
@
|
|
73
|
-
@
|
|
74
|
+
@use '@/styles/breakpoints' as *;
|
|
75
|
+
@use '@/styles/colors' as *;
|
|
74
76
|
|
|
75
77
|
.uikit-question-review-pagination {
|
|
76
78
|
display: flex;
|
|
@@ -121,8 +121,8 @@ export default class TablePagination extends Vue {
|
|
|
121
121
|
</script>
|
|
122
122
|
|
|
123
123
|
<style lang="scss" scoped>
|
|
124
|
-
@
|
|
125
|
-
@
|
|
124
|
+
@use '@/styles/breakpoints' as *;
|
|
125
|
+
@use '@/styles/colors' as *;
|
|
126
126
|
|
|
127
127
|
.uikit-table-pagination {
|
|
128
128
|
display: flex;
|
|
@@ -93,8 +93,8 @@ export default class FlagToggle extends Vue {
|
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<style lang="scss">
|
|
96
|
-
@
|
|
97
|
-
@
|
|
96
|
+
@use '@/styles/breakpoints' as *;
|
|
97
|
+
@use '@/styles/colors' as *;
|
|
98
98
|
|
|
99
99
|
.uikit-flag-toggle {
|
|
100
100
|
position: relative;
|
|
@@ -47,6 +47,7 @@ import Icon from '../Icons/Icon.vue'
|
|
|
47
47
|
import BrandColors from '../../pocketprep-export.module.scss'
|
|
48
48
|
|
|
49
49
|
@Component({
|
|
50
|
+
name: 'GlobalMetricsToggle',
|
|
50
51
|
components: {
|
|
51
52
|
Tooltip,
|
|
52
53
|
Icon,
|
|
@@ -74,8 +75,8 @@ export default class GlobalMetricsToggle extends Vue {
|
|
|
74
75
|
</script>
|
|
75
76
|
|
|
76
77
|
<style lang="scss">
|
|
77
|
-
@
|
|
78
|
-
@
|
|
78
|
+
@use '@/styles/breakpoints' as *;
|
|
79
|
+
@use '@/styles/colors' as *;
|
|
79
80
|
|
|
80
81
|
.uikit-global-metrics-toggle {
|
|
81
82
|
position: relative;
|