@pocketprep/ui-kit 3.5.0 → 3.5.2
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 +14335 -14870
- 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 +123 -121
- 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 +4 -4
- 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 +4 -3
- package/lib/components/Quiz/Question/DropdownExplanation.vue +2 -2
- package/lib/components/Quiz/Question/Explanation.vue +2 -2
- package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +12 -17
- package/lib/components/Quiz/Question/MatrixRadioGroup.vue +2 -2
- package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +19 -26
- package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +7 -5
- package/lib/components/Quiz/Question/PassageAndImage.vue +2 -2
- package/lib/components/Quiz/Question/PassageAndImageDropdown.vue +7 -6
- package/lib/components/Quiz/Question/Paywall.vue +2 -2
- package/lib/components/Quiz/Question/QuestionContext.vue +2 -3
- package/lib/components/Quiz/Question/StatsSummary.vue +2 -2
- package/lib/components/Quiz/Question/Summary.vue +2 -2
- package/lib/components/Quiz/Question.vue +29 -28
- package/lib/components/Quiz/QuizContainer.vue +31 -37
- package/lib/components/Quiz/QuizProgress.vue +73 -77
- package/lib/components/Quiz/QuizProgressBar.vue +3 -2
- 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 +1 -1
- package/lib/pocketprep-export.module.scss +3 -2
- package/lib/pocketprep.scss +2 -2
- package/lib/styles/_breakpoints.scss +6 -12
- package/lib/styles/_colors.scss +0 -1
- package/package.json +36 -27
- package/stylelint.config.js +38 -0
- package/.eslintrc.cjs +0 -74
- package/dist/style.css +0 -1
- package/stylelint.config.cjs +0 -22
|
@@ -167,22 +167,22 @@
|
|
|
167
167
|
<slot name="explanationTopExperiment"></slot>
|
|
168
168
|
</template>
|
|
169
169
|
<template #motivationalMoment="{
|
|
170
|
-
isCorrect,
|
|
170
|
+
isCorrect:isCorrectMM,
|
|
171
171
|
choiceKey,
|
|
172
|
-
showAnswers,
|
|
173
|
-
answerKeys,
|
|
172
|
+
showAnswers:showAnswersMM,
|
|
173
|
+
answerKeys:answerKeysMM,
|
|
174
174
|
}">
|
|
175
175
|
<slot
|
|
176
176
|
name="motivationalMoment"
|
|
177
|
-
:showAnswers="
|
|
178
|
-
:answerKeys="
|
|
177
|
+
:showAnswers="showAnswersMM"
|
|
178
|
+
:answerKeys="answerKeysMM"
|
|
179
179
|
:choiceKey="choiceKey"
|
|
180
|
-
:isCorrect="
|
|
180
|
+
:isCorrect="isCorrectMM"
|
|
181
181
|
/>
|
|
182
182
|
</template>
|
|
183
183
|
<template #showNamesTable="{
|
|
184
184
|
choiceKey,
|
|
185
|
-
}"
|
|
185
|
+
}">
|
|
186
186
|
<slot
|
|
187
187
|
name="showNamesTable"
|
|
188
188
|
:choiceKey="choiceKey"
|
|
@@ -200,17 +200,17 @@
|
|
|
200
200
|
@emitSelectedMatrixChoice="selectMatrixChoice"
|
|
201
201
|
>
|
|
202
202
|
<template #motivationalMoment="{
|
|
203
|
-
isCorrect,
|
|
203
|
+
isCorrect:isCorrectMM,
|
|
204
204
|
choiceKey,
|
|
205
|
-
showAnswers,
|
|
206
|
-
answerKeys,
|
|
205
|
+
showAnswers:showAnswersMM,
|
|
206
|
+
answerKeys:answerKeysMM,
|
|
207
207
|
}">
|
|
208
208
|
<slot
|
|
209
209
|
name="motivationalMoment"
|
|
210
|
-
:showAnswers="
|
|
211
|
-
:answerKeys="
|
|
210
|
+
:showAnswers="showAnswersMM"
|
|
211
|
+
:answerKeys="answerKeysMM"
|
|
212
212
|
:choiceKey="choiceKey"
|
|
213
|
-
:isCorrect="
|
|
213
|
+
:isCorrect="isCorrectMM"
|
|
214
214
|
/>
|
|
215
215
|
</template>
|
|
216
216
|
<template #explanationBottomExperiment>
|
|
@@ -225,18 +225,18 @@
|
|
|
225
225
|
>
|
|
226
226
|
<template
|
|
227
227
|
#motivationalMoment="{
|
|
228
|
-
isCorrect,
|
|
228
|
+
isCorrect:isCorrectMM,
|
|
229
229
|
choiceKey,
|
|
230
|
-
showAnswers,
|
|
231
|
-
answerKeys,
|
|
230
|
+
showAnswers:showAnswersMM,
|
|
231
|
+
answerKeys:answerKeysMM,
|
|
232
232
|
}"
|
|
233
233
|
>
|
|
234
234
|
<slot
|
|
235
235
|
name="motivationalMoment"
|
|
236
|
-
:showAnswers="
|
|
237
|
-
:answerKeys="
|
|
236
|
+
:showAnswers="showAnswersMM"
|
|
237
|
+
:answerKeys="answerKeysMM"
|
|
238
238
|
:choiceKey="choiceKey"
|
|
239
|
-
:isCorrect="
|
|
239
|
+
:isCorrect="isCorrectMM"
|
|
240
240
|
/>
|
|
241
241
|
</template>
|
|
242
242
|
<template #explanationBottomExperiment>
|
|
@@ -424,7 +424,7 @@ const props = withDefaults(defineProps<{
|
|
|
424
424
|
hideReferences?: boolean
|
|
425
425
|
isTeachReview?: boolean
|
|
426
426
|
isTeachGroupReview?: boolean
|
|
427
|
-
keywordDefinitions
|
|
427
|
+
keywordDefinitions?: { keyword: string; definition: string }[]
|
|
428
428
|
}>(), {
|
|
429
429
|
imageUrlPrefix: '',
|
|
430
430
|
quizMode: 'quick10',
|
|
@@ -621,7 +621,7 @@ const passageAndImageTitle = computed(() => {
|
|
|
621
621
|
} else if (!props.question.passage && passageImageUrl.value) {
|
|
622
622
|
return 'Image'
|
|
623
623
|
} else {
|
|
624
|
-
return props.question.passageLabel ?
|
|
624
|
+
return props.question.passageLabel ? props.question.passageLabel :
|
|
625
625
|
'Passage'
|
|
626
626
|
}
|
|
627
627
|
})
|
|
@@ -737,7 +737,7 @@ const isMatrixQuestionAnswered = computed(() => {
|
|
|
737
737
|
// Matrix questions are answered if each row has a selected choice
|
|
738
738
|
if (isMatrixQuestion.value) {
|
|
739
739
|
const answeredRowNums = selectedMatrixChoices.value.map(choice => {
|
|
740
|
-
if (choice
|
|
740
|
+
if (choice) {
|
|
741
741
|
return Number(choice.split('_')[0]?.slice(1))
|
|
742
742
|
}
|
|
743
743
|
return
|
|
@@ -834,7 +834,7 @@ const moveFocusToPassage = () => {
|
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
|
|
837
|
-
const moveFocusToPrompt =
|
|
837
|
+
const moveFocusToPrompt = () => {
|
|
838
838
|
promptEl?.value?.focus()
|
|
839
839
|
}
|
|
840
840
|
|
|
@@ -861,7 +861,7 @@ const startReviewMode = () => {
|
|
|
861
861
|
} else {
|
|
862
862
|
showMatrixAnswers.value = true
|
|
863
863
|
showExplanation.value = props.defaultShowExplanation === null ? true : props.defaultShowExplanation
|
|
864
|
-
selectedMatrixChoices.value = matrixAnswerKeys.value
|
|
864
|
+
selectedMatrixChoices.value = matrixAnswerKeys.value
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
|
|
@@ -956,7 +956,7 @@ const handleTouchMove = (event: TouchEvent) => {
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
|
|
959
|
-
const handleTouchEnd = (option: {choiceKey: TChoiceKey; event: TouchEvent}) => {
|
|
959
|
+
const handleTouchEnd = (option: { choiceKey: TChoiceKey; event: TouchEvent }) => {
|
|
960
960
|
const choiceKey = option.choiceKey
|
|
961
961
|
const event = option.event
|
|
962
962
|
const targetEl = event.target as Ref
|
|
@@ -1237,7 +1237,7 @@ if (isMatrixQuestion.value && props.previousMatrixChoices) {
|
|
|
1237
1237
|
updateSelectedMatrixChoices(props.previousMatrixChoices)
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
1240
|
-
onMounted(
|
|
1240
|
+
onMounted(() => {
|
|
1241
1241
|
questionEl.value = props.containerEl || questionRef.value
|
|
1242
1242
|
|
|
1243
1243
|
if (props.initialShowAnswers) {
|
|
@@ -1315,8 +1315,8 @@ provide(InjectionKeys.isTeachGroupReviewKey, isTeachGroupReview)
|
|
|
1315
1315
|
</script>
|
|
1316
1316
|
|
|
1317
1317
|
<style lang="scss">
|
|
1318
|
-
@
|
|
1319
|
-
@
|
|
1318
|
+
@use '@/styles/breakpoints' as *;
|
|
1319
|
+
@use '@/styles/colors' as *;
|
|
1320
1320
|
|
|
1321
1321
|
.uikit-question {
|
|
1322
1322
|
position: relative;
|
|
@@ -1812,6 +1812,7 @@ provide(InjectionKeys.isTeachGroupReviewKey, isTeachGroupReview)
|
|
|
1812
1812
|
|
|
1813
1813
|
&__matrix-choices-container {
|
|
1814
1814
|
display: block;
|
|
1815
|
+
|
|
1815
1816
|
@include breakpoint(black-bear) {
|
|
1816
1817
|
display: none;
|
|
1817
1818
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
ref="quiz-container"
|
|
3
|
+
ref="quiz-container-ref"
|
|
4
4
|
v-breakpoint
|
|
5
5
|
v-dark="isDarkMode"
|
|
6
6
|
class="uikit-quiz-container"
|
|
@@ -47,49 +47,43 @@
|
|
|
47
47
|
</div>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
|
-
<script lang="ts">
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
<script setup lang="ts">
|
|
51
|
+
import { onBeforeUnmount, onMounted, useTemplateRef } from 'vue'
|
|
52
|
+
import { dark as vDark, breakpoint as vBreakpoint } from '../../directives'
|
|
53
|
+
|
|
54
|
+
withDefaults(defineProps<{
|
|
55
|
+
showSide?: boolean
|
|
56
|
+
isDarkMode?: boolean
|
|
57
|
+
customHeaderStyles?: Record<string, string>
|
|
58
|
+
customMainStyles?: Record<string, string>
|
|
59
|
+
customFooterStyles?: Record<string, string>
|
|
60
|
+
}>(), {
|
|
61
|
+
showSide: false,
|
|
62
|
+
isDarkMode: false,
|
|
63
|
+
customHeaderStyles: () => ({}),
|
|
64
|
+
customMainStyles: () => ({}),
|
|
65
|
+
customFooterStyles: () => ({}),
|
|
63
66
|
})
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
quizContainerEl: HTMLElement | null = null
|
|
72
|
-
|
|
73
|
-
beforeUnmount () {
|
|
74
|
-
const bodyEl = document.getElementsByTagName('body')[0]
|
|
75
|
-
if (bodyEl) {
|
|
76
|
-
bodyEl.style.overflow = ''
|
|
77
|
-
}
|
|
67
|
+
|
|
68
|
+
const quizContainerEl = useTemplateRef('quiz-container-ref')
|
|
69
|
+
|
|
70
|
+
onBeforeUnmount(() => {
|
|
71
|
+
const bodyEl = document.getElementsByTagName('body')[0]
|
|
72
|
+
if (bodyEl) {
|
|
73
|
+
bodyEl.style.overflow = ''
|
|
78
74
|
}
|
|
75
|
+
})
|
|
79
76
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
const quizContainerEl = this.$refs['quiz-container'] as HTMLElement || null
|
|
86
|
-
this.quizContainerEl = quizContainerEl
|
|
77
|
+
onMounted(() => {
|
|
78
|
+
const bodyEl = document.getElementsByTagName('body')[0]
|
|
79
|
+
if (bodyEl) {
|
|
80
|
+
bodyEl.style.overflow = 'hidden'
|
|
87
81
|
}
|
|
88
|
-
}
|
|
82
|
+
})
|
|
89
83
|
</script>
|
|
90
84
|
|
|
91
85
|
<style lang="scss">
|
|
92
|
-
@
|
|
86
|
+
@use '@/styles/colors' as *;
|
|
93
87
|
|
|
94
88
|
.uikit-quiz-container {
|
|
95
89
|
display: flex;
|
|
@@ -35,104 +35,100 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
|
-
<script lang="ts">
|
|
39
|
-
import {
|
|
38
|
+
<script setup lang="ts">
|
|
39
|
+
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
|
|
40
40
|
import QuizProgressBar from '../Quiz/QuizProgressBar.vue'
|
|
41
41
|
import { ResizeObserver as ResizeObserverPonyFill } from 'resize-observer'
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
const props = withDefaults(defineProps<{
|
|
44
|
+
answeredIndexList: number[]
|
|
45
|
+
selectedIndex: number
|
|
46
|
+
numQuestions: number
|
|
47
|
+
forceSlider?: boolean
|
|
48
|
+
}>(), {
|
|
49
|
+
forceSlider: false,
|
|
47
50
|
})
|
|
48
|
-
export default class QuizProgress extends Vue {
|
|
49
|
-
@Prop() answeredIndexList!: number[]
|
|
50
|
-
@Prop() selectedIndex!: number
|
|
51
|
-
@Prop() numQuestions!: number
|
|
52
|
-
@Prop({ default: false }) forceSlider!: boolean
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const emit = defineEmits<{
|
|
53
|
+
'barClicked': [ index: number ]
|
|
54
|
+
}>()
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
56
|
+
const containerWidth = ref(0)
|
|
57
|
+
const mutationObserver = ref<ResizeObserver | null>(null)
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
: this.numQuestions < 50
|
|
65
|
-
? 2
|
|
66
|
-
: 2.5
|
|
67
|
-
}
|
|
59
|
+
const isSlider = computed(() => {
|
|
60
|
+
return props.forceSlider || props.numQuestions > 100
|
|
61
|
+
})
|
|
68
62
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return barWidth
|
|
77
|
-
}
|
|
63
|
+
const barMaxMargin = computed(() => {
|
|
64
|
+
return props.numQuestions > 100 || props.forceSlider
|
|
65
|
+
? 0 // No margin for >100 questions or slider mode
|
|
66
|
+
: props.numQuestions < 50
|
|
67
|
+
? 2
|
|
68
|
+
: 2.5
|
|
69
|
+
})
|
|
78
70
|
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
const barWidth = computed(() => {
|
|
72
|
+
const numGaps = props.numQuestions - 1
|
|
73
|
+
const totalMarginWidth = numGaps * barMaxMargin.value * 2
|
|
74
|
+
const availableWidth = containerWidth.value - totalMarginWidth
|
|
75
|
+
const calculatedBarWidth = (props.forceSlider || props.numQuestions > 100)
|
|
76
|
+
? availableWidth / props.numQuestions
|
|
77
|
+
: Math.floor(Math.max(availableWidth / props.numQuestions, 1))
|
|
78
|
+
return calculatedBarWidth
|
|
79
|
+
})
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
0
|
|
85
|
-
)
|
|
86
|
-
}
|
|
81
|
+
const barMargin = computed(() => {
|
|
82
|
+
const maxMargin = ((containerWidth.value - (barWidth.value * props.numQuestions)) / (props.numQuestions - 1)) / 2
|
|
87
83
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
return Math.max(
|
|
85
|
+
Math.min(barMaxMargin.value, Math.floor(maxMargin)),
|
|
86
|
+
0
|
|
87
|
+
)
|
|
88
|
+
})
|
|
91
89
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
const barWidthString = computed(() => {
|
|
91
|
+
return `${barWidth.value}px`
|
|
92
|
+
})
|
|
95
93
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
94
|
+
onMounted(() => {
|
|
95
|
+
containerWidth.value = document.querySelector('.uikit-quiz-progress')?.getBoundingClientRect().width || 0
|
|
96
|
+
const el = document.querySelector('.uikit-quiz-progress') as Element
|
|
97
|
+
const resizeMutationObserver = window.ResizeObserver
|
|
98
|
+
? new ResizeObserver(() => {
|
|
99
|
+
containerWidth.value = document.querySelector('.uikit-quiz-progress')?.getBoundingClientRect().width || 0
|
|
100
|
+
})
|
|
101
|
+
: new ResizeObserverPonyFill(() => {
|
|
102
|
+
containerWidth.value = document.querySelector('.uikit-quiz-progress')?.getBoundingClientRect().width || 0
|
|
103
|
+
})
|
|
104
|
+
mutationObserver.value = resizeMutationObserver
|
|
105
|
+
mutationObserver.value.observe(el)
|
|
106
|
+
})
|
|
109
107
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
onBeforeUnmount(() => {
|
|
109
|
+
mutationObserver.value?.disconnect()
|
|
110
|
+
})
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
112
|
+
const clickAndFocus = (index: number) => {
|
|
113
|
+
const bars = document.querySelectorAll('.uikit-quiz-progress__bar')
|
|
114
|
+
const bar = bars[index - 1] as HTMLElement
|
|
115
|
+
if (bar) {
|
|
116
|
+
emitBarClicked(index)
|
|
117
|
+
setTimeout(() => {
|
|
118
|
+
nextTick(() => {
|
|
119
|
+
bar.focus()
|
|
120
|
+
})
|
|
121
|
+
}, 50)
|
|
125
122
|
}
|
|
123
|
+
}
|
|
126
124
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return index
|
|
130
|
-
}
|
|
125
|
+
const emitBarClicked = (index: number) => {
|
|
126
|
+
emit('barClicked', index)
|
|
131
127
|
}
|
|
132
128
|
</script>
|
|
133
129
|
|
|
134
130
|
<style lang="scss">
|
|
135
|
-
@
|
|
131
|
+
@use '@/styles/breakpoints' as *;
|
|
136
132
|
|
|
137
133
|
.uikit-quiz-progress {
|
|
138
134
|
display: flex;
|
|
@@ -18,6 +18,7 @@ import { Component, Emit, Prop, Vue } from 'vue-facing-decorator'
|
|
|
18
18
|
import { breakpoint } from '../../directives'
|
|
19
19
|
|
|
20
20
|
@Component({
|
|
21
|
+
name: 'QuizProgressBar',
|
|
21
22
|
directives: {
|
|
22
23
|
breakpoint,
|
|
23
24
|
},
|
|
@@ -40,8 +41,8 @@ export default class QuizProgressBar extends Vue {
|
|
|
40
41
|
</script>
|
|
41
42
|
|
|
42
43
|
<style lang="scss">
|
|
43
|
-
@
|
|
44
|
-
@
|
|
44
|
+
@use '@/styles/breakpoints' as *;
|
|
45
|
+
@use '@/styles/colors' as *;
|
|
45
46
|
|
|
46
47
|
.uikit-quiz-progress-bar {
|
|
47
48
|
flex: 1;
|
|
@@ -40,8 +40,8 @@ export default class Pill extends Vue {
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<style lang="scss">
|
|
43
|
-
@
|
|
44
|
-
@
|
|
43
|
+
@use '@/styles/breakpoints' as *;
|
|
44
|
+
@use '@/styles/colors' as *;
|
|
45
45
|
|
|
46
46
|
.uikit-pill {
|
|
47
47
|
background: $brand-black;
|
|
@@ -124,8 +124,8 @@ export default class Search 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-search {
|
|
131
131
|
position: relative;
|
|
@@ -128,6 +128,7 @@ import Icon from '../Icons/Icon.vue'
|
|
|
128
128
|
import { dark } from '../../directives'
|
|
129
129
|
|
|
130
130
|
@Component({
|
|
131
|
+
name: 'SidePanel',
|
|
131
132
|
components: {
|
|
132
133
|
Icon,
|
|
133
134
|
PocketButton: Button,
|
|
@@ -150,7 +151,7 @@ export default class SidePanel extends Vue {
|
|
|
150
151
|
@Prop({ default: false }) isDarkMode!: boolean
|
|
151
152
|
|
|
152
153
|
openSidePanel = false
|
|
153
|
-
notContentHeight = this.tabs
|
|
154
|
+
notContentHeight = this.tabs?.length ? 262 : 218
|
|
154
155
|
focusListener: Parameters<typeof addEventListener>[1] | null = null
|
|
155
156
|
savedYPosition = 0
|
|
156
157
|
sidePanelNumber = 0
|
|
@@ -289,8 +290,8 @@ export default class SidePanel extends Vue {
|
|
|
289
290
|
</script>
|
|
290
291
|
|
|
291
292
|
<style lang="scss">
|
|
292
|
-
@
|
|
293
|
-
@
|
|
293
|
+
@use '@/styles/breakpoints' as *;
|
|
294
|
+
@use '@/styles/colors' as *;
|
|
294
295
|
|
|
295
296
|
.uikit-page-overlay {
|
|
296
297
|
background: rgba($brand-black, 0);
|
|
@@ -588,6 +589,10 @@ export default class SidePanel extends Vue {
|
|
|
588
589
|
|
|
589
590
|
&--teach-side-panel {
|
|
590
591
|
background-color: $white;
|
|
592
|
+
|
|
593
|
+
&--dark {
|
|
594
|
+
background: $charcoal;
|
|
595
|
+
}
|
|
591
596
|
}
|
|
592
597
|
|
|
593
598
|
&--dark {
|
|
@@ -379,8 +379,9 @@ export default class Table extends Vue {
|
|
|
379
379
|
</script>
|
|
380
380
|
|
|
381
381
|
<style lang="scss">
|
|
382
|
-
@
|
|
383
|
-
@
|
|
382
|
+
@use 'sass:color';
|
|
383
|
+
@use '@/styles/breakpoints' as *;
|
|
384
|
+
@use '@/styles/colors' as *;
|
|
384
385
|
|
|
385
386
|
.uikit-table {
|
|
386
387
|
&__container {
|
|
@@ -584,7 +585,7 @@ export default class Table extends Vue {
|
|
|
584
585
|
|
|
585
586
|
&--hover-focus {
|
|
586
587
|
&:hover {
|
|
587
|
-
background-color: mix($barely-background, $brand-black, 96%);
|
|
588
|
+
background-color: color.mix($barely-background, $brand-black, 96%);
|
|
588
589
|
}
|
|
589
590
|
|
|
590
591
|
&:focus {
|
|
@@ -77,7 +77,7 @@ export default class TableActions extends Vue {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
actionClicked (action: ITableAction | ITableSubAction) {
|
|
80
|
-
if ('menu' in action && action.menu
|
|
80
|
+
if ('menu' in action && action.menu?.length) {
|
|
81
81
|
if (this.visibleMenuActionId !== action.id) {
|
|
82
82
|
this.focusedMenuOptionIndex = null
|
|
83
83
|
this.visibleMenuActionId = action.id
|
|
@@ -139,8 +139,8 @@ export default class TableActions extends Vue {
|
|
|
139
139
|
</script>
|
|
140
140
|
|
|
141
141
|
<style lang="scss">
|
|
142
|
-
@
|
|
143
|
-
@
|
|
142
|
+
@use '@/styles/breakpoints' as *;
|
|
143
|
+
@use '@/styles/colors' as *;
|
|
144
144
|
|
|
145
145
|
.uikit-table-actions {
|
|
146
146
|
display: flex;
|
|
@@ -64,8 +64,8 @@ export default class Tag extends Vue {
|
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
66
|
<style lang="scss">
|
|
67
|
-
@
|
|
68
|
-
@
|
|
67
|
+
@use '@/styles/breakpoints' as *;
|
|
68
|
+
@use '@/styles/colors' as *;
|
|
69
69
|
|
|
70
70
|
.uikit-tag {
|
|
71
71
|
box-sizing: border-box;
|
|
@@ -80,7 +80,9 @@ export default class Toast extends Vue {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
clearCloseTimeout () {
|
|
83
|
-
|
|
83
|
+
if (this.closeTimeout) {
|
|
84
|
+
clearTimeout(this.closeTimeout)
|
|
85
|
+
}
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
@Emit('close')
|
|
@@ -91,8 +93,8 @@ export default class Toast extends Vue {
|
|
|
91
93
|
</script>
|
|
92
94
|
|
|
93
95
|
<style lang="scss" scoped>
|
|
94
|
-
@
|
|
95
|
-
@
|
|
96
|
+
@use '@/styles/breakpoints' as *;
|
|
97
|
+
@use '@/styles/colors' as *;
|
|
96
98
|
|
|
97
99
|
.toast {
|
|
98
100
|
background-color: rgba($charcoal, 0.9);
|
|
@@ -82,8 +82,8 @@ export default class OverflowTooltip extends Vue {
|
|
|
82
82
|
</script>
|
|
83
83
|
|
|
84
84
|
<style lang="scss">
|
|
85
|
-
@
|
|
86
|
-
@
|
|
85
|
+
@use '@/styles/breakpoints' as *;
|
|
86
|
+
@use '@/styles/colors' as *;
|
|
87
87
|
|
|
88
88
|
.uikit-overflow-tooltip {
|
|
89
89
|
position: relative;
|
|
@@ -103,8 +103,8 @@ export default class Tooltip extends Vue {
|
|
|
103
103
|
</script>
|
|
104
104
|
|
|
105
105
|
<style lang="scss">
|
|
106
|
-
@
|
|
107
|
-
@
|
|
106
|
+
@use '@/styles/breakpoints' as *;
|
|
107
|
+
@use '@/styles/colors' as *;
|
|
108
108
|
|
|
109
109
|
.uikit-tooltip-popup {
|
|
110
110
|
color: $white;
|
package/lib/directives.ts
CHANGED
|
@@ -77,7 +77,7 @@ const eventListeners: Partial<Record<string, () => void>> = {}
|
|
|
77
77
|
const mutationObservers: Partial<Record<string, MutationObserver>> = {}
|
|
78
78
|
const resizeObservers: Partial<Record<string, ResizeObserver>> = {}
|
|
79
79
|
|
|
80
|
-
export const fixed: Directive = {
|
|
80
|
+
export const fixed: Directive<HTMLElement> = {
|
|
81
81
|
beforeMount: el => {
|
|
82
82
|
if (!el.dataset.breakpointId) {
|
|
83
83
|
const { top, left } = el.getBoundingClientRect()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use './styles/breakpoints' as *;
|
|
2
|
+
@use './styles/colors' as *;
|
|
3
3
|
|
|
4
4
|
/* stylelint-disable property-case */
|
|
5
5
|
:export {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
blackBear: $black-bear;
|
|
11
11
|
koalaBear: $koala-bear;
|
|
12
12
|
teddyBear: $teddy-bear;
|
|
13
|
+
|
|
13
14
|
// colors
|
|
14
15
|
white: $white;
|
|
15
16
|
pickledBluewood: $pickled-bluewood;
|
package/lib/pocketprep.scss
CHANGED