@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
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import RadioButton from '../../Forms/RadioButton.vue'
|
|
3
3
|
import { dark as vDark } from '../../../directives'
|
|
4
|
+
import type { TMatrixChoiceKey } from '../question'
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
|
-
isDarkMode
|
|
7
|
-
choices
|
|
8
|
-
labels
|
|
9
|
-
showAnswers
|
|
10
|
-
disabled
|
|
7
|
+
isDarkMode?: boolean
|
|
8
|
+
choices?: TMatrixChoiceKey[]
|
|
9
|
+
labels?: string[]
|
|
10
|
+
showAnswers?: boolean
|
|
11
|
+
disabled?: boolean
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const props = withDefaults(defineProps<Props>(), {
|
|
14
15
|
isDarkMode: false,
|
|
16
|
+
choices: () => [],
|
|
17
|
+
labels: () => [],
|
|
15
18
|
showAnswers: false,
|
|
16
19
|
disabled: false,
|
|
17
20
|
})
|
|
18
21
|
|
|
19
|
-
const selectedChoice = defineModel<
|
|
22
|
+
const selectedChoice = defineModel<TMatrixChoiceKey | null>({ default: null })
|
|
20
23
|
|
|
21
|
-
const selectChoice = (choiceKey:
|
|
24
|
+
const selectChoice = (choiceKey: TMatrixChoiceKey) => {
|
|
22
25
|
selectedChoice.value = choiceKey
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
const radioButtonColor = (choice:
|
|
28
|
+
const radioButtonColor = (choice: TMatrixChoiceKey) => {
|
|
26
29
|
if (props.showAnswers) {
|
|
27
30
|
if (choice === selectedChoice.value && selectedChoice.value?.startsWith('a')) {
|
|
28
31
|
return 'green'
|
|
@@ -52,7 +55,7 @@ const stripHtmlTags = (string?: string) => {
|
|
|
52
55
|
|
|
53
56
|
<template>
|
|
54
57
|
<ul
|
|
55
|
-
v-if="choices.length"
|
|
58
|
+
v-if="choices && choices.length"
|
|
56
59
|
class="uikit-mobile-matrix-radio-group"
|
|
57
60
|
v-dark="isDarkMode"
|
|
58
61
|
role="radiogroup"
|
|
@@ -90,8 +93,8 @@ const stripHtmlTags = (string?: string) => {
|
|
|
90
93
|
</template>
|
|
91
94
|
|
|
92
95
|
<style lang="scss" scoped>
|
|
93
|
-
@
|
|
94
|
-
@
|
|
96
|
+
@use '@/styles/breakpoints' as *;
|
|
97
|
+
@use '@/styles/colors' as *;
|
|
95
98
|
|
|
96
99
|
.uikit-mobile-matrix-radio-group {
|
|
97
100
|
list-style: none;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="showPassageAndImage"
|
|
4
|
-
v-breakpoint
|
|
4
|
+
v-breakpoint="breakpointsWithEl"
|
|
5
5
|
class="uikit-question-passage-and-image"
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
<img
|
|
21
21
|
v-if="passageImageUrl"
|
|
22
22
|
v-dark="isDarkMode"
|
|
23
|
-
v-breakpoint
|
|
23
|
+
v-breakpoint="breakpointsWithEl"
|
|
24
24
|
class="uikit-question-passage-and-image__image"
|
|
25
25
|
:src="passageImageUrl"
|
|
26
26
|
:alt="`${passageImageAlt}. Extended image description below.`"
|
|
27
27
|
>
|
|
28
28
|
<PocketButton
|
|
29
29
|
v-if="passageImageLongAlt"
|
|
30
|
-
v-breakpoint
|
|
30
|
+
v-breakpoint="breakpointsWithEl"
|
|
31
31
|
type="tertiary-small"
|
|
32
32
|
class="uikit-question-passage-and-image__toggle-passage-image-description"
|
|
33
33
|
:is-dark-mode="isDarkMode"
|
|
@@ -66,55 +66,44 @@
|
|
|
66
66
|
</div>
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
|
-
<script lang="ts">
|
|
70
|
-
import { Component, Emit, Prop, Vue } from 'vue-facing-decorator'
|
|
71
|
-
import type { Study } from '@pocketprep/types'
|
|
69
|
+
<script setup lang="ts">
|
|
72
70
|
import Icon from '../../Icons/Icon.vue'
|
|
73
71
|
import PocketButton from '../../Buttons/Button.vue'
|
|
74
|
-
import {
|
|
75
|
-
import
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
'tablet-landscape': 1439,
|
|
101
|
-
} }) breakpoints!: TBreakPointsObject
|
|
102
|
-
|
|
103
|
-
@Emit('emitTogglePassageImageLongAlt')
|
|
104
|
-
emitTogglePassageImageLongAlt () {
|
|
105
|
-
return
|
|
106
|
-
}
|
|
72
|
+
import { dark as vDark, breakpoint as vBreakpoint } from '../../../directives'
|
|
73
|
+
import { useQuestionContext } from './composables'
|
|
74
|
+
|
|
75
|
+
const emit = defineEmits<{
|
|
76
|
+
'emitTogglePassageImageLongAlt': []
|
|
77
|
+
'emitMoveFocusToPrompt': []
|
|
78
|
+
}>()
|
|
79
|
+
|
|
80
|
+
const {
|
|
81
|
+
// questionEl is used by the breakpoint directive
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
83
|
+
questionEl,
|
|
84
|
+
question,
|
|
85
|
+
showPassageImageLongAlt,
|
|
86
|
+
showPassageAndImage,
|
|
87
|
+
passageImageUrl,
|
|
88
|
+
passageImageLongAlt,
|
|
89
|
+
passageImageAlt,
|
|
90
|
+
passageAndImageTitle,
|
|
91
|
+
isDarkMode,
|
|
92
|
+
breakpointsWithEl,
|
|
93
|
+
} = useQuestionContext()
|
|
94
|
+
|
|
95
|
+
const emitTogglePassageImageLongAlt = () => {
|
|
96
|
+
emit('emitTogglePassageImageLongAlt')
|
|
97
|
+
}
|
|
107
98
|
|
|
108
|
-
|
|
109
|
-
emitMoveFocusToPrompt
|
|
110
|
-
return
|
|
111
|
-
}
|
|
99
|
+
const emitMoveFocusToPrompt = () => {
|
|
100
|
+
emit('emitMoveFocusToPrompt')
|
|
112
101
|
}
|
|
113
102
|
</script>
|
|
114
103
|
|
|
115
104
|
<style lang="scss">
|
|
116
|
-
@
|
|
117
|
-
@
|
|
105
|
+
@use '@/styles/breakpoints' as *;
|
|
106
|
+
@use '@/styles/colors' as *;
|
|
118
107
|
|
|
119
108
|
.uikit-question-passage-and-image {
|
|
120
109
|
position: relative;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-if="question.passage || passageImageUrl"
|
|
4
4
|
ref="uikit-question-passage-and-image-dropdown"
|
|
5
|
-
v-breakpoint
|
|
5
|
+
v-breakpoint="breakpointsWithEl"
|
|
6
6
|
v-dark="isDarkMode"
|
|
7
7
|
class="uikit-question-passage-and-image-dropdown"
|
|
8
8
|
>
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
<div
|
|
47
47
|
v-if="showPassageImageDropdown"
|
|
48
|
-
v-breakpoint
|
|
48
|
+
v-breakpoint="breakpointsWithEl"
|
|
49
49
|
class="uikit-question-passage-and-image-dropdown__passage-and-image-dropdown-container"
|
|
50
50
|
>
|
|
51
51
|
<div
|
|
52
52
|
v-if="question.passage"
|
|
53
|
-
v-breakpoint
|
|
53
|
+
v-breakpoint="breakpointsWithEl"
|
|
54
54
|
class="uikit-question-passage-and-image-dropdown__passage-dropdown-passage"
|
|
55
55
|
:class="{
|
|
56
56
|
'uikit-question-passage-and-image-dropdown__passage-dropdown-passage--with-image': passageImageUrl,
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
>
|
|
70
70
|
<PocketButton
|
|
71
71
|
v-if="passageImageLongAlt"
|
|
72
|
-
v-breakpoint
|
|
72
|
+
v-breakpoint="breakpointsWithEl"
|
|
73
73
|
type="tertiary-small"
|
|
74
74
|
class="uikit-question-passage-and-image-dropdown__toggle-img-dropdown-img-description"
|
|
75
75
|
:class="{
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
<div
|
|
99
99
|
v-if="showPassageImageLongAlt"
|
|
100
100
|
ref="uikit-question-passage-and-image-dropdown__img-dropdown-img-description"
|
|
101
|
-
v-breakpoint
|
|
101
|
+
v-breakpoint="breakpointsWithEl"
|
|
102
102
|
v-dark="isDarkMode"
|
|
103
103
|
class="uikit-question-passage-and-image-dropdown__img-dropdown-img-description"
|
|
104
104
|
tabindex="-1"
|
|
@@ -108,52 +108,42 @@
|
|
|
108
108
|
</div>
|
|
109
109
|
</template>
|
|
110
110
|
|
|
111
|
-
<script lang="ts">
|
|
112
|
-
import { Component, Emit, Prop, Vue } from 'vue-facing-decorator'
|
|
113
|
-
import type { Study } from '@pocketprep/types'
|
|
111
|
+
<script setup lang="ts">
|
|
114
112
|
import Icon from '../../Icons/Icon.vue'
|
|
115
113
|
import PocketButton from '../../Buttons/Button.vue'
|
|
116
|
-
import {
|
|
117
|
-
import
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
'tablet-landscape': 1439,
|
|
143
|
-
} }) breakpoints!: TBreakPointsObject
|
|
144
|
-
|
|
145
|
-
showPassageImageDropdown = false
|
|
146
|
-
|
|
147
|
-
@Emit('togglePassageImageLongAltDropdown')
|
|
148
|
-
togglePassageImageLongAltDropdown () {
|
|
149
|
-
return
|
|
150
|
-
}
|
|
114
|
+
import { dark as vDark, breakpoint as vBreakpoint } from '../../../directives'
|
|
115
|
+
import { useQuestionContext } from './composables'
|
|
116
|
+
import { ref } from 'vue'
|
|
117
|
+
|
|
118
|
+
const emit = defineEmits<{
|
|
119
|
+
'togglePassageImageLongAltDropdown': []
|
|
120
|
+
}>()
|
|
121
|
+
|
|
122
|
+
const {
|
|
123
|
+
// questionEl is used by the breakpoint directive
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
125
|
+
questionEl,
|
|
126
|
+
question,
|
|
127
|
+
isDarkMode,
|
|
128
|
+
passageImageUrl,
|
|
129
|
+
passageImageAlt,
|
|
130
|
+
passageImageLongAlt,
|
|
131
|
+
showPassageImageLongAlt,
|
|
132
|
+
passageAndImageTitle,
|
|
133
|
+
breakpointsWithEl,
|
|
134
|
+
} = useQuestionContext()
|
|
135
|
+
|
|
136
|
+
const showPassageImageDropdown = ref(false)
|
|
137
|
+
|
|
138
|
+
const togglePassageImageLongAltDropdown = () => {
|
|
139
|
+
emit('togglePassageImageLongAltDropdown')
|
|
151
140
|
}
|
|
152
141
|
</script>
|
|
153
142
|
|
|
154
143
|
<style lang="scss">
|
|
155
|
-
@
|
|
156
|
-
@
|
|
144
|
+
@use 'sass:color';
|
|
145
|
+
@use '@/styles/breakpoints' as *;
|
|
146
|
+
@use '@/styles/colors' as *;
|
|
157
147
|
|
|
158
148
|
.uikit-question-passage-and-image-dropdown {
|
|
159
149
|
&__passage-and-image-dropdown-btn {
|
|
@@ -172,11 +162,11 @@ export default class PassageAndImageDropdown extends Vue {
|
|
|
172
162
|
|
|
173
163
|
&:hover {
|
|
174
164
|
.uikit-question-passage-and-image-dropdown__passage-and-image-dropdown-text {
|
|
175
|
-
color: mix($brand-blue, black, 90%);
|
|
165
|
+
color: color.mix($brand-blue, black, 90%);
|
|
176
166
|
}
|
|
177
167
|
|
|
178
168
|
.uikit-question-passage-and-image-dropdown__passage-and-image-dropdown-arrow {
|
|
179
|
-
color: mix($brand-blue, black, 90%);
|
|
169
|
+
color: color.mix($brand-blue, black, 90%);
|
|
180
170
|
}
|
|
181
171
|
|
|
182
172
|
&::before {
|
|
@@ -272,7 +262,7 @@ export default class PassageAndImageDropdown extends Vue {
|
|
|
272
262
|
line-height: 24px;
|
|
273
263
|
font-size: 16px;
|
|
274
264
|
font-weight: 400;
|
|
275
|
-
letter-spacing: -0.
|
|
265
|
+
letter-spacing: -0.1px;
|
|
276
266
|
|
|
277
267
|
&--mobile {
|
|
278
268
|
line-height: 24px;
|
|
@@ -326,7 +316,7 @@ export default class PassageAndImageDropdown extends Vue {
|
|
|
326
316
|
font-size: 15px;
|
|
327
317
|
line-height: 22px;
|
|
328
318
|
font-weight: 500;
|
|
329
|
-
letter-spacing: -0.
|
|
319
|
+
letter-spacing: -0.2px;
|
|
330
320
|
|
|
331
321
|
&--dark {
|
|
332
322
|
color: $fog;
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
>
|
|
5
5
|
<div
|
|
6
6
|
v-dark="isDarkMode"
|
|
7
|
-
v-breakpoint
|
|
7
|
+
v-breakpoint="breakpointsWithEl"
|
|
8
8
|
class="uikit-question-paywall__paywall"
|
|
9
9
|
:class="{ 'uikit-question-paywall__paywall--review': reviewMode }"
|
|
10
10
|
>
|
|
11
11
|
<img
|
|
12
|
-
v-breakpoint
|
|
12
|
+
v-breakpoint="breakpointsWithEl"
|
|
13
13
|
:src="isDarkMode ? paywallImages['dark'] : paywallImages['light']"
|
|
14
14
|
alt=""
|
|
15
15
|
class="uikit-question-paywall__paywall-image"
|
|
16
16
|
>
|
|
17
17
|
<div
|
|
18
18
|
v-dark="isDarkMode"
|
|
19
|
-
v-breakpoint
|
|
19
|
+
v-breakpoint="breakpointsWithEl"
|
|
20
20
|
class="uikit-question-paywall__paywall-text"
|
|
21
21
|
>
|
|
22
22
|
You need a Premium Subscription to view this question's answer and explanation.
|
|
@@ -32,53 +32,42 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
|
-
<script lang="ts">
|
|
36
|
-
import {
|
|
37
|
-
import Icon from '../../Icons/Icon.vue'
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import { computed } from 'vue'
|
|
38
37
|
import PocketButton from '../../Buttons/Button.vue'
|
|
39
|
-
import { dark, breakpoint } from '../../../directives'
|
|
40
|
-
import type { TBreakPointsObject } from './../question'
|
|
41
38
|
import PaywallImageLight from '../../../assets/question/paywall-light.png'
|
|
42
39
|
import PaywallImageDark from '../../../assets/question/paywall-dark.png'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
get paywallImages () {
|
|
65
|
-
return {
|
|
66
|
-
light: PaywallImageLight,
|
|
67
|
-
dark: PaywallImageDark,
|
|
68
|
-
}
|
|
40
|
+
import { dark as vDark, breakpoint as vBreakpoint } from '../../../directives'
|
|
41
|
+
import { useQuestionContext } from './composables'
|
|
42
|
+
|
|
43
|
+
const emit = defineEmits<{
|
|
44
|
+
'upgradeClicked': []
|
|
45
|
+
}>()
|
|
46
|
+
|
|
47
|
+
const {
|
|
48
|
+
// questionEl is used by the breakpoint directive
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
50
|
+
questionEl,
|
|
51
|
+
isDarkMode,
|
|
52
|
+
reviewMode,
|
|
53
|
+
breakpointsWithEl,
|
|
54
|
+
} = useQuestionContext()
|
|
55
|
+
|
|
56
|
+
const paywallImages = computed(() => {
|
|
57
|
+
return {
|
|
58
|
+
light: PaywallImageLight,
|
|
59
|
+
dark: PaywallImageDark,
|
|
69
60
|
}
|
|
61
|
+
})
|
|
70
62
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return true
|
|
74
|
-
}
|
|
63
|
+
const emitUpgradeClick = () => {
|
|
64
|
+
emit('upgradeClicked')
|
|
75
65
|
}
|
|
76
|
-
|
|
77
66
|
</script>
|
|
78
67
|
|
|
79
68
|
<style lang="scss">
|
|
80
|
-
@
|
|
81
|
-
@
|
|
69
|
+
@use '@/styles/breakpoints' as *;
|
|
70
|
+
@use '@/styles/colors' as *;
|
|
82
71
|
|
|
83
72
|
.uikit-question-paywall {
|
|
84
73
|
width: 100%;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="uikit-question-context"
|
|
4
|
-
v-breakpoint
|
|
4
|
+
v-breakpoint="breakpointsWithEl"
|
|
5
5
|
class="uikit-question-context"
|
|
6
6
|
tabindex="-1"
|
|
7
7
|
>
|
|
@@ -51,50 +51,41 @@
|
|
|
51
51
|
</h2>
|
|
52
52
|
<div
|
|
53
53
|
class="uikit-question-context__tag"
|
|
54
|
-
v-breakpoint
|
|
54
|
+
v-breakpoint="breakpointsWithEl"
|
|
55
55
|
>
|
|
56
56
|
<slot name="tag" />
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
|
-
<script lang="ts">
|
|
62
|
-
import { Component, Vue, Prop } from 'vue-facing-decorator'
|
|
61
|
+
<script setup lang="ts">
|
|
63
62
|
import Icon from '../../Icons/Icon.vue'
|
|
64
|
-
import { dark, breakpoint } from '../../../directives'
|
|
65
|
-
import
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
import { dark as vDark, breakpoint as vBreakpoint } from '../../../directives'
|
|
64
|
+
import { useQuestionContext } from './composables'
|
|
65
|
+
|
|
66
|
+
const {
|
|
67
|
+
// questionEl is used by the breakpoint directive
|
|
68
|
+
questionEl,
|
|
69
|
+
breakpointsWithEl,
|
|
70
|
+
quizLength,
|
|
71
|
+
quizMode,
|
|
72
|
+
questionNumber,
|
|
73
|
+
isDarkMode,
|
|
74
|
+
isCorrect,
|
|
75
|
+
contextIconType,
|
|
76
|
+
showAnswers,
|
|
77
|
+
showMatrixAnswers,
|
|
78
|
+
} = useQuestionContext()
|
|
79
|
+
|
|
80
|
+
defineExpose({
|
|
81
|
+
questionEl,
|
|
75
82
|
})
|
|
76
|
-
export default class QuestionContext extends Vue {
|
|
77
|
-
@Prop() quizLength!: number
|
|
78
|
-
@Prop({ default: 'quick10' }) quizMode!: TQuizMode
|
|
79
|
-
@Prop() questionNumber!: number
|
|
80
|
-
@Prop({ default: false }) isDarkMode!: boolean
|
|
81
|
-
@Prop({ default: false }) isCorrect!: boolean
|
|
82
|
-
@Prop() contextIconType!: TContextIcon
|
|
83
|
-
@Prop({ default: null }) questionEl!: Element | null
|
|
84
|
-
@Prop({ default: false }) showAnswers!: boolean
|
|
85
|
-
@Prop({ default: false }) showMatrixAnswers!: boolean
|
|
86
|
-
@Prop({ default: {
|
|
87
|
-
'mobile': 767,
|
|
88
|
-
'tablet-portrait': 1023,
|
|
89
|
-
'tablet-landscape': 1439,
|
|
90
|
-
} }) breakpoints!: TBreakPointsObject
|
|
91
|
-
}
|
|
92
83
|
|
|
93
84
|
</script>
|
|
94
85
|
|
|
95
86
|
<style lang="scss">
|
|
96
|
-
@
|
|
97
|
-
@
|
|
87
|
+
@use '@/styles/breakpoints' as *;
|
|
88
|
+
@use '@/styles/colors' as *;
|
|
98
89
|
|
|
99
90
|
.uikit-question-context {
|
|
100
91
|
display: flex;
|
|
@@ -28,32 +28,22 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
|
-
<script lang="ts">
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import { dark, breakpoint } from '../../../directives'
|
|
35
|
-
import type { TChoiceScores, TMatrixChoiceScores } from './../question'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
@Component({
|
|
39
|
-
directives: {
|
|
40
|
-
dark,
|
|
41
|
-
breakpoint,
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
export default class StatsSummary extends Vue {
|
|
45
|
-
@Prop({ default: null }) globalMetrics!: Study.Class.GlobalQuestionMetricJSON | null
|
|
46
|
-
@Prop() choiceScores!: TChoiceScores
|
|
47
|
-
@Prop({ default: false }) isDarkMode!: boolean
|
|
48
|
-
@Prop({ default: false }) isMatrixQuestion!: boolean
|
|
49
|
-
@Prop() matrixChoiceScores!: TMatrixChoiceScores
|
|
50
|
-
}
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import { dark as vDark } from '../../../directives'
|
|
33
|
+
import { useQuestionContext } from './composables'
|
|
51
34
|
|
|
35
|
+
const {
|
|
36
|
+
globalMetrics,
|
|
37
|
+
choiceScores,
|
|
38
|
+
isDarkMode,
|
|
39
|
+
isMatrixQuestion,
|
|
40
|
+
matrixChoiceScores,
|
|
41
|
+
} = useQuestionContext()
|
|
52
42
|
</script>
|
|
53
43
|
|
|
54
44
|
<style lang="scss">
|
|
55
|
-
@
|
|
56
|
-
@
|
|
45
|
+
@use '@/styles/breakpoints' as *;
|
|
46
|
+
@use '@/styles/colors' as *;
|
|
57
47
|
|
|
58
48
|
.uikit-question-stats-summary {
|
|
59
49
|
margin-top: 24px;
|