@pocketprep/ui-kit 3.8.4 → 3.9.0

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.
Files changed (159) hide show
  1. package/dist/@pocketprep/ui-kit.css +1 -1
  2. package/dist/@pocketprep/ui-kit.js +14469 -17731
  3. package/dist/@pocketprep/ui-kit.js.map +1 -1
  4. package/dist/@pocketprep/ui-kit.umd.cjs +19 -29
  5. package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
  6. package/eslint.config.ts +38 -11
  7. package/lib/SVGDefinitions.vue +32 -35
  8. package/lib/components/Banners/Banner.vue +10 -14
  9. package/lib/components/Blobs/Blob.vue +6 -14
  10. package/lib/components/Blobs/BlobEmptyState.vue +9 -8
  11. package/lib/components/Blobs/blob.d.ts +1 -1
  12. package/lib/components/BundleIcons/BundleIcon.vue +36 -63
  13. package/lib/components/BundleIcons/bundleIcon.d.ts +1 -1
  14. package/lib/components/Bundles/BundleList.vue +71 -59
  15. package/lib/components/Bundles/BundleSearch.vue +93 -117
  16. package/lib/components/Bundles/PremiumPill.vue +6 -12
  17. package/lib/components/Buttons/Button.vue +32 -35
  18. package/lib/components/Buttons/Link.vue +32 -31
  19. package/lib/components/Buttons/Tab.vue +14 -17
  20. package/lib/components/Calendar/Calendar.vue +87 -85
  21. package/lib/components/Charts/Bar.vue +192 -263
  22. package/lib/components/Charts/Pie.vue +55 -61
  23. package/lib/components/Charts/highcharts-wrap.ts +81 -0
  24. package/lib/components/Controls/SegmentControl.vue +26 -24
  25. package/lib/components/Controls/Slider.vue +51 -47
  26. package/lib/components/Controls/ToggleSwitch.vue +33 -31
  27. package/lib/components/EmptyStates/EmptyState.vue +69 -73
  28. package/lib/components/Exams/ExamCard.vue +59 -47
  29. package/lib/components/Exams/ExamMenuCard.vue +30 -28
  30. package/lib/components/Filters/FilterDropdown.vue +83 -86
  31. package/lib/components/Filters/FilterOptions.vue +83 -88
  32. package/lib/components/Forms/Checkbox.vue +27 -27
  33. package/lib/components/Forms/CheckboxOption.vue +30 -30
  34. package/lib/components/Forms/Errors.vue +21 -24
  35. package/lib/components/Forms/Input.vue +71 -59
  36. package/lib/components/Forms/Radio.vue +2 -2
  37. package/lib/components/Forms/RadioButton.vue +8 -8
  38. package/lib/components/Forms/Select.vue +265 -257
  39. package/lib/components/Forms/Textarea.vue +49 -35
  40. package/lib/components/Icons/IconAccordionArrow.vue +7 -9
  41. package/lib/components/Icons/IconActivity.vue +7 -9
  42. package/lib/components/Icons/IconAdd.vue +7 -11
  43. package/lib/components/Icons/IconAddCircle.vue +7 -9
  44. package/lib/components/Icons/IconArrow.vue +7 -9
  45. package/lib/components/Icons/IconBarChart.vue +7 -9
  46. package/lib/components/Icons/IconCalendar.vue +7 -9
  47. package/lib/components/Icons/IconCalendarPicker.vue +7 -9
  48. package/lib/components/Icons/IconChat.vue +7 -9
  49. package/lib/components/Icons/IconCheck.vue +7 -9
  50. package/lib/components/Icons/IconClose.vue +7 -9
  51. package/lib/components/Icons/IconConcept.vue +1 -1
  52. package/lib/components/Icons/IconCorrect.vue +7 -9
  53. package/lib/components/Icons/IconEdit.vue +7 -11
  54. package/lib/components/Icons/IconExam.vue +7 -9
  55. package/lib/components/Icons/IconExternalLink.vue +7 -9
  56. package/lib/components/Icons/IconEyeHide.vue +7 -9
  57. package/lib/components/Icons/IconEyeShow.vue +7 -9
  58. package/lib/components/Icons/IconFilter.vue +7 -9
  59. package/lib/components/Icons/IconFilterActive.vue +7 -9
  60. package/lib/components/Icons/IconFlag.vue +7 -9
  61. package/lib/components/Icons/IconFlagContent.vue +8 -9
  62. package/lib/components/Icons/IconFlagFeedback.vue +8 -10
  63. package/lib/components/Icons/IconFlagFilled.vue +7 -9
  64. package/lib/components/Icons/IconFullView.vue +7 -9
  65. package/lib/components/Icons/IconFullViewActive.vue +7 -9
  66. package/lib/components/Icons/IconGridDrag.vue +2 -2
  67. package/lib/components/Icons/IconHandle.vue +7 -9
  68. package/lib/components/Icons/IconHeart.vue +7 -9
  69. package/lib/components/Icons/IconHelp.vue +7 -9
  70. package/lib/components/Icons/IconHighlight.vue +2 -2
  71. package/lib/components/Icons/IconHourglass.vue +7 -9
  72. package/lib/components/Icons/IconImage.vue +7 -9
  73. package/lib/components/Icons/IconIncorrect.vue +7 -9
  74. package/lib/components/Icons/IconInfo.vue +7 -9
  75. package/lib/components/Icons/IconKeyboard.vue +7 -9
  76. package/lib/components/Icons/IconLaunch.vue +7 -9
  77. package/lib/components/Icons/IconLevelUp.vue +7 -9
  78. package/lib/components/Icons/IconLightbulb.vue +7 -9
  79. package/lib/components/Icons/IconLightning.vue +7 -9
  80. package/lib/components/Icons/IconLink.vue +7 -9
  81. package/lib/components/Icons/IconList.vue +7 -9
  82. package/lib/components/Icons/IconLoading.vue +7 -9
  83. package/lib/components/Icons/IconLoading2.vue +11 -11
  84. package/lib/components/Icons/IconLock.vue +7 -9
  85. package/lib/components/Icons/IconMissedQuestions.vue +7 -9
  86. package/lib/components/Icons/IconMoon.vue +7 -9
  87. package/lib/components/Icons/IconPaginationArrow.vue +7 -9
  88. package/lib/components/Icons/IconPaginationArrowDouble.vue +7 -9
  89. package/lib/components/Icons/IconPassage.vue +7 -9
  90. package/lib/components/Icons/IconPencil.vue +7 -9
  91. package/lib/components/Icons/IconPeople.vue +7 -9
  92. package/lib/components/Icons/IconPercent.vue +7 -9
  93. package/lib/components/Icons/IconPerson.vue +8 -9
  94. package/lib/components/Icons/IconPresent.vue +7 -9
  95. package/lib/components/Icons/IconPreview.vue +7 -9
  96. package/lib/components/Icons/IconQuestions.vue +7 -9
  97. package/lib/components/Icons/IconQuick10.vue +7 -9
  98. package/lib/components/Icons/IconQuickActions.vue +2 -2
  99. package/lib/components/Icons/IconRecommendedFilter.vue +1 -1
  100. package/lib/components/Icons/IconRemoveCircle.vue +7 -9
  101. package/lib/components/Icons/IconReviewFlag.vue +7 -9
  102. package/lib/components/Icons/IconSearch.vue +7 -9
  103. package/lib/components/Icons/IconShare.vue +7 -9
  104. package/lib/components/Icons/IconSideBar.vue +7 -9
  105. package/lib/components/Icons/IconSideBarActive.vue +7 -9
  106. package/lib/components/Icons/IconStar.vue +1 -1
  107. package/lib/components/Icons/IconStopwatch.vue +7 -9
  108. package/lib/components/Icons/IconStrike.vue +7 -9
  109. package/lib/components/Icons/IconSubject.vue +7 -9
  110. package/lib/components/Icons/IconText.vue +7 -9
  111. package/lib/components/Icons/IconTimer.vue +8 -9
  112. package/lib/components/Icons/IconWarning.vue +7 -9
  113. package/lib/components/Icons/icon.d.ts +1 -1
  114. package/lib/components/Loaders/SkeletonLoader.vue +1 -5
  115. package/lib/components/Modal/Modal.vue +23 -29
  116. package/lib/components/Modal/ModalContainer.vue +135 -133
  117. package/lib/components/Onboarding/EmailAuth.vue +66 -70
  118. package/lib/components/Onboarding/MagicCodeEntry.vue +88 -83
  119. package/lib/components/Pagination/QuestionReviewPagination.vue +3 -3
  120. package/lib/components/Pagination/TablePagination.vue +47 -44
  121. package/lib/components/PhonePerson/PhonePerson.vue +18 -18
  122. package/lib/components/PhonePerson/phonePerson.d.ts +1 -1
  123. package/lib/components/Quiz/FlagToggle.vue +45 -44
  124. package/lib/components/Quiz/GlobalMetricsToggle.vue +29 -28
  125. package/lib/components/Quiz/KeyboardShortcutsButton.vue +16 -23
  126. package/lib/components/Quiz/KeyboardShortcutsModal.vue +36 -37
  127. package/lib/components/Quiz/Question/BuildListChoicesContainer.vue +65 -65
  128. package/lib/components/Quiz/Question/ChoicesContainer.vue +5 -5
  129. package/lib/components/Quiz/Question/DropdownExplanation.vue +5 -5
  130. package/lib/components/Quiz/Question/Explanation.vue +6 -6
  131. package/lib/components/Quiz/Question/MPMCChoicesContainer.vue +17 -17
  132. package/lib/components/Quiz/Question/MPMCRadioGroup.vue +2 -2
  133. package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +39 -39
  134. package/lib/components/Quiz/Question/MatrixRadioGroup.vue +6 -6
  135. package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +27 -28
  136. package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +2 -2
  137. package/lib/components/Quiz/Question/PassageAndImage.vue +3 -3
  138. package/lib/components/Quiz/Question/PassageAndImageDropdown.vue +7 -7
  139. package/lib/components/Quiz/Question/Paywall.vue +2 -2
  140. package/lib/components/Quiz/Question/QuestionContext.vue +1 -1
  141. package/lib/components/Quiz/Question/StatsSummary.vue +2 -2
  142. package/lib/components/Quiz/Question/Summary.vue +11 -11
  143. package/lib/components/Quiz/Question.vue +90 -82
  144. package/lib/components/Quiz/QuizContainer.vue +1 -1
  145. package/lib/components/Quiz/QuizProgressBar.vue +23 -23
  146. package/lib/components/Quiz/question.d.ts +3 -3
  147. package/lib/components/Search/Pill.vue +16 -19
  148. package/lib/components/Search/Search.vue +52 -47
  149. package/lib/components/SidePanels/SidePanel.vue +168 -174
  150. package/lib/components/Tables/Table.vue +135 -122
  151. package/lib/components/Tables/TableActions.vue +81 -76
  152. package/lib/components/Tables/table.d.ts +1 -1
  153. package/lib/components/Tags/Tag.vue +49 -39
  154. package/lib/components/Toasts/Toast.vue +44 -42
  155. package/lib/components/Tooltips/OverflowTooltip.vue +39 -45
  156. package/lib/components/Tooltips/Tooltip.vue +69 -70
  157. package/lib/directives.ts +4 -4
  158. package/lib/utils.ts +13 -12
  159. package/package.json +27 -28
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, onMounted, ref, watch } from 'vue'
3
3
  import { dark as vDark } from '../../../directives'
4
- import type { TChoiceKey } from './../question'
4
+ import type { TChoiceKey } from './../question'
5
5
  import { useQuestionContext } from './composables'
6
6
  import { stripHtmlTags } from '../../../utils'
7
7
  import Icon from '../../Icons/Icon.vue'
@@ -45,7 +45,7 @@ const choiceKeysByLabelIndexObj = computed(() => {
45
45
  // Create an object with the keys being the mpmc label indexes
46
46
  // and the values being an array of corresponding choiceKeys to the mpmc label
47
47
  const groupedChoiceKeyByLabelIndex: { [key: number]: TChoiceKey[] } = {}
48
-
48
+
49
49
  questionChoices.value?.forEach(choice => {
50
50
  const labelIndex = choice.labelIndex
51
51
 
@@ -62,10 +62,10 @@ const choiceKeysByLabelIndexObj = computed(() => {
62
62
 
63
63
  const choiceTextsByLabelIndex = computed(() => {
64
64
  const grouped: { [key: number]: string[] } = {}
65
-
65
+
66
66
  questionChoices.value?.forEach(choice => {
67
67
  const labelIndex = choice.labelIndex
68
-
68
+
69
69
  if (labelIndex !== undefined) {
70
70
  if (!grouped[labelIndex]) {
71
71
  grouped[labelIndex] = []
@@ -79,7 +79,7 @@ const choiceTextsByLabelIndex = computed(() => {
79
79
 
80
80
  const selectedChoiceTextsByLabelIndex = computed(() => {
81
81
  const selectedTexts: { [key: number]: string } = {}
82
-
82
+
83
83
  mpmcRadioGrid.value?.forEach((part, labelIndex) => {
84
84
  if (part.value) {
85
85
  const choiceIndex = choiceKeysByLabelIndexObj.value[labelIndex]?.findIndex(key => key === part.value)
@@ -91,7 +91,7 @@ const selectedChoiceTextsByLabelIndex = computed(() => {
91
91
  }
92
92
  }
93
93
  })
94
-
94
+
95
95
  return selectedTexts
96
96
  })
97
97
 
@@ -183,7 +183,7 @@ watch(mpmcRadioGrid, () => {
183
183
  if (mpmcRadioGrid.value && (!reviewMode.value || !showMPMCAnswers.value)) {
184
184
  const selectedRadioButtonChoices: TChoiceKey[] = []
185
185
 
186
- mpmcRadioGrid.value.forEach((part) => {
186
+ mpmcRadioGrid.value.forEach(part => {
187
187
  if (part.value) {
188
188
  selectedRadioButtonChoices.push(part.value)
189
189
  }
@@ -201,7 +201,7 @@ watch(showMPMCAnswers, () => {
201
201
 
202
202
  watch(selectedMPMCChoices, () => {
203
203
  if ((reviewMode.value || showMPMCAnswers.value)) {
204
- const selectedRadioBtnGrid = convertSelectedMPMCChoiceToRadioBtnGrid()
204
+ const selectedRadioBtnGrid = convertSelectedMPMCChoiceToRadioBtnGrid()
205
205
  mpmcRadioGrid.value = selectedRadioBtnGrid
206
206
  }
207
207
  })
@@ -215,14 +215,14 @@ watch(selectedMPMCChoices, () => {
215
215
  <div
216
216
  class="uikit-question-mpmc-choices-container__choices-container"
217
217
  :class="{
218
- 'uikit-question-mpmc-choices-container__choices-container--correct':
218
+ 'uikit-question-mpmc-choices-container__choices-container--correct':
219
219
  (showMPMCAnswers || reviewMode) && isMPMCQuestionCorrect,
220
- 'uikit-question-mpmc-choices-container__choices-container--incorrect':
220
+ 'uikit-question-mpmc-choices-container__choices-container--incorrect':
221
221
  (showMPMCAnswers || reviewMode) && !isMPMCQuestionCorrect,
222
222
  }"
223
223
  v-dark="isDarkMode"
224
224
  >
225
- <div
225
+ <div
226
226
  v-for="(label, labelIndex) in mpmcLabels"
227
227
  class="uikit-question-mpmc-choices-container__part-container"
228
228
  :key="labelIndex"
@@ -249,16 +249,16 @@ watch(selectedMPMCChoices, () => {
249
249
  <Icon
250
250
  v-if="(showMPMCAnswers || reviewMode) && correctPart(labelIndex)"
251
251
  v-dark="isDarkMode"
252
- class="uikit-question-mpmc-choices-container__part-label-correct-icon"
252
+ class="uikit-question-mpmc-choices-container__part-label-correct-icon"
253
253
  type="check"
254
254
  />
255
255
  <Icon
256
256
  v-if="(showMPMCAnswers || reviewMode) && !correctPart(labelIndex)"
257
257
  v-dark="isDarkMode"
258
- class="uikit-question-mpmc-choices-container__part-label-incorrect-icon"
258
+ class="uikit-question-mpmc-choices-container__part-label-incorrect-icon"
259
259
  type="incorrect"
260
260
  />
261
- <div
261
+ <div
262
262
  class="uikit-question-mpmc-choices-container__part-label"
263
263
  :class="{
264
264
  'uikit-question-mpmc-choices-container__part-label--review-mode':
@@ -277,7 +277,7 @@ watch(selectedMPMCChoices, () => {
277
277
  type="accordionArrow"
278
278
  />
279
279
  </div>
280
- <div
280
+ <div
281
281
  v-if="selectedChoiceTextsByLabelIndex[labelIndex]"
282
282
  class="uikit-question-mpmc-choices-container__selected-choice-text"
283
283
  v-dark="isDarkMode"
@@ -285,7 +285,7 @@ watch(selectedMPMCChoices, () => {
285
285
  {{ selectedChoiceTextsByLabelIndex[labelIndex] }}
286
286
  </div>
287
287
  </div>
288
- <div
288
+ <div
289
289
  v-if="expandedPartNumbers.includes(labelIndex)"
290
290
  >
291
291
  <MPMCRadioGroup
@@ -468,4 +468,4 @@ watch(selectedMPMCChoices, () => {
468
468
  max-width: 492px;
469
469
  }
470
470
  }
471
- </style>
471
+ </style>
@@ -87,12 +87,12 @@ const radioButtonColor = (choice: TChoiceKey) => {
87
87
  :color="radioButtonColor(choice)"
88
88
  @click="!disabled && !showAnswers && selectChoice(choice)"
89
89
  />
90
- <div
90
+ <div
91
91
  v-if="choicesText && choicesText.length > 0"
92
92
  v-dark="props.isDarkMode"
93
93
  class="uikit-mpmc-radio-group__choice-text"
94
94
  :class="{
95
- 'uikit-mpmc-radio-group__choice-text--distractor':
95
+ 'uikit-mpmc-radio-group__choice-text--distractor':
96
96
  showAnswers && choice?.startsWith('d')
97
97
  }"
98
98
  @click="!disabled && !showAnswers && selectChoice(choice)"
@@ -4,19 +4,19 @@
4
4
  class="uikit-question-matrix-choices-container"
5
5
  ref="uikit-question-matrix-choices-container"
6
6
  >
7
- <div
8
- v-dark="isDarkMode"
9
- v-breakpoint="breakpointsWithEl"
7
+ <div
8
+ v-dark="isDarkMode"
9
+ v-breakpoint="breakpointsWithEl"
10
10
  class="uikit-question-matrix-choices-container__columns"
11
11
  >
12
- <div
12
+ <div
13
13
  v-dark="isDarkMode"
14
14
  v-breakpoint="breakpointsWithEl"
15
15
  class="uikit-question-matrix-choices-container__column-row-header"
16
16
  :class="{
17
- 'uikit-question-matrix-choices-container__column-row-header--two-columns':
17
+ 'uikit-question-matrix-choices-container__column-row-header--two-columns':
18
18
  numberOfMatrixColumnLabels === 2,
19
- 'uikit-question-matrix-choices-container__column-row-header--radio-btn-three-columns':
19
+ 'uikit-question-matrix-choices-container__column-row-header--radio-btn-three-columns':
20
20
  question.type === 'Matrix Radio Button' && numberOfMatrixColumnLabels === 3
21
21
  }"
22
22
  v-html="matrixColumnLabelsForRows"
@@ -25,7 +25,7 @@
25
25
  <div
26
26
  class="uikit-question-matrix-choices-container__column-header"
27
27
  :class="{
28
- 'uikit-question-matrix-choices-container__column-header--two-columns':
28
+ 'uikit-question-matrix-choices-container__column-header--two-columns':
29
29
  numberOfMatrixColumnLabels === 2,
30
30
  'uikit-question-matrix-choices-container__column-header--radio-btn-three-columns':
31
31
  question.type === 'Matrix Radio Button' && numberOfMatrixColumnLabels === 3
@@ -39,25 +39,25 @@
39
39
  />
40
40
  </div>
41
41
  </div>
42
- <div
42
+ <div
43
43
  class="uikit-question-matrix-choices-container__choices-container"
44
44
  :class="{
45
- 'uikit-question-matrix-choices-container__choices-container--correct':
45
+ 'uikit-question-matrix-choices-container__choices-container--correct':
46
46
  (showMatrixAnswers || reviewMode) && isMatrixQuestionCorrect,
47
- 'uikit-question-matrix-choices-container__choices-container--incorrect':
47
+ 'uikit-question-matrix-choices-container__choices-container--incorrect':
48
48
  (showMatrixAnswers || reviewMode) && !isMatrixQuestionCorrect,
49
- 'uikit-question-matrix-choices-container__choices-container--teach-group-review':
49
+ 'uikit-question-matrix-choices-container__choices-container--teach-group-review':
50
50
  (showMatrixAnswers || reviewMode) && isTeachGroupReview,
51
51
  }"
52
52
  v-dark="isDarkMode"
53
53
  v-breakpoint="breakpointsWithEl"
54
54
  >
55
- <div
55
+ <div
56
56
  class="uikit-question-matrix-choices-container__choices"
57
57
  :class="{
58
- 'uikit-question-matrix-choices-container__choices--checkbox':
58
+ 'uikit-question-matrix-choices-container__choices--checkbox':
59
59
  question.type === 'Matrix Checkbox',
60
- 'uikit-question-matrix-choices-container__choices--two-columns':
60
+ 'uikit-question-matrix-choices-container__choices--two-columns':
61
61
  numberOfMatrixColumnLabels === 2,
62
62
  }"
63
63
  v-dark="isDarkMode"
@@ -68,18 +68,18 @@
68
68
  <div
69
69
  class="uikit-question-matrix-choices-container__choice-text"
70
70
  :class="{
71
- 'uikit-question-matrix-choices-container__choice-text--checkbox':
71
+ 'uikit-question-matrix-choices-container__choice-text--checkbox':
72
72
  question.type === 'Matrix Checkbox',
73
- 'uikit-question-matrix-choices-container__choice-text--two-columns':
73
+ 'uikit-question-matrix-choices-container__choice-text--two-columns':
74
74
  numberOfMatrixColumnLabels === 2,
75
- 'uikit-question-matrix-choices-container__choice-text--radio-btn-two-columns':
75
+ 'uikit-question-matrix-choices-container__choice-text--radio-btn-two-columns':
76
76
  question.type === 'Matrix Radio Button' && numberOfMatrixColumnLabels === 2,
77
77
  }"
78
78
  v-dark="isDarkMode"
79
79
  v-breakpoint="breakpointsWithEl"
80
80
  v-html="rowLabel"
81
81
  />
82
- <template
82
+ <template
83
83
  v-if="
84
84
  question.type === 'Matrix Checkbox' &&
85
85
  matrixCheckboxGrid &&
@@ -95,9 +95,9 @@
95
95
  <div
96
96
  class="uikit-question-matrix-choices-container__checkbox"
97
97
  :class="{
98
- 'uikit-question-matrix-choices-container__checkbox--two-columns':
98
+ 'uikit-question-matrix-choices-container__checkbox--two-columns':
99
99
  numberOfMatrixColumnLabels === 2,
100
- 'uikit-question-matrix-choices-container__checkbox--review':
100
+ 'uikit-question-matrix-choices-container__checkbox--review':
101
101
  showMatrixAnswers || reviewMode,
102
102
  }"
103
103
  v-for="(columnLabel, columnIndex) in matrixColumnLabels"
@@ -114,15 +114,15 @@
114
114
  :checkbox-check-styles="checkboxCheckStyling(rowIndex, columnIndex)"
115
115
  :checkbox-styles="checkboxContainerStyling(rowIndex, columnIndex)"
116
116
  />
117
- <div
117
+ <div
118
118
  v-else
119
119
  class="uikit-question-matrix-choices-container__clickable-checkbox"
120
120
  :class="{
121
- 'uikit-question-matrix-choices-container__clickable-checkbox--review':
122
- showMatrixAnswers || reviewMode
121
+ 'uikit-question-matrix-choices-container__clickable-checkbox--review':
122
+ showMatrixAnswers || reviewMode
123
123
  }"
124
124
  @click="!(showMatrixAnswers || reviewMode) && checkboxClicked(rowIndex, columnIndex)"
125
- @keypress.enter="!(showMatrixAnswers || reviewMode) &&
125
+ @keypress.enter="!(showMatrixAnswers || reviewMode) &&
126
126
  checkboxClicked(rowIndex, columnIndex)"
127
127
  >
128
128
  <Checkbox
@@ -134,7 +134,7 @@
134
134
  </div>
135
135
  <Icon
136
136
  v-if="
137
- (showMatrixAnswers || reviewMode) &&
137
+ (showMatrixAnswers || reviewMode) &&
138
138
  (incorrectlySelectedChoice(rowIndex, columnIndex) ||
139
139
  correctAnswerButNotSelected(rowIndex, columnIndex))"
140
140
  class="uikit-question-matrix-choices-container__incorrect-answer-icon"
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
  </div>
146
146
  </template>
147
- <template
147
+ <template
148
148
  v-if="
149
149
  question.type === 'Matrix Radio Button' &&
150
150
  matrixRadioGrid &&
@@ -260,7 +260,7 @@ onMounted(() => {
260
260
  if (question.value.type === 'Matrix Checkbox') {
261
261
  matrixCheckboxGrid.value = convertSelectedMatrixChoiceToCheckboxGrid()
262
262
  }
263
-
263
+
264
264
  if (question.value.type === 'Matrix Radio Button') {
265
265
  matrixRadioGrid.value = convertSelectedMatrixChoiceToRadioBtnGrid()
266
266
  }
@@ -311,7 +311,7 @@ const selectedChoiceKey = (rowIndex: number, colIndex: number) => {
311
311
  const row = rowIndex += 1
312
312
  const column = colIndex += 1
313
313
  if (selectedMatrixChoices && matrixAnswerKeys) {
314
- const matrixSelectedChoiceKey = selectedMatrixChoices.value.find((choice) => {
314
+ const matrixSelectedChoiceKey = selectedMatrixChoices.value.find(choice => {
315
315
  const substring = choice.substring(1)
316
316
  return substring === `${row}_${column}`
317
317
  })
@@ -339,14 +339,14 @@ const incorrectlySelectedChoice = (rowIndex: number, colIndex: number) => {
339
339
  }
340
340
  return false
341
341
  }
342
-
342
+
343
343
  const correctAnswerButNotSelected = (rowIndex: number, colIndex: number) => {
344
344
  const selectedChoice = selectedChoiceKey(rowIndex, colIndex)
345
345
  const answerKey = matrixAnswerKeys.value.find(choice => choice === `a${rowIndex + 1}_${colIndex + 1}`)
346
346
  return answerKey && !selectedChoice
347
347
  }
348
348
 
349
- const checkboxContainerStyling = (rowIndex: number, columnIndex: number) => {
349
+ const checkboxContainerStyling = (rowIndex: number, columnIndex: number): Record<string, string> | undefined => {
350
350
  const isReviewMode = showMatrixAnswers.value || reviewMode.value
351
351
 
352
352
  // check box is correctlySelected
@@ -407,7 +407,7 @@ watch(matrixCheckboxGrid, () => {
407
407
  }
408
408
  }
409
409
  })
410
- })
410
+ })
411
411
  emitSelectedMatrixChoice(selectedCheckboxChoices)
412
412
  }
413
413
  }, { deep: true })
@@ -421,19 +421,19 @@ watch(matrixRadioGrid, () => {
421
421
  if (choiceKey && matrixChoiceLayout.value?.[rowIndex]) {
422
422
  selectedRadioButtonChoices.push(choiceKey)
423
423
  }
424
- })
424
+ })
425
425
  emitSelectedMatrixChoice(selectedRadioButtonChoices)
426
426
  }
427
427
  }, { deep: true })
428
428
 
429
429
  watch(selectedMatrixChoices, () => {
430
430
  if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Checkbox') {
431
- const selectedCheckboxGrid = convertSelectedMatrixChoiceToCheckboxGrid()
431
+ const selectedCheckboxGrid = convertSelectedMatrixChoiceToCheckboxGrid()
432
432
  matrixCheckboxGrid.value = selectedCheckboxGrid ? selectedCheckboxGrid : defaultCheckboxGrid.value
433
433
  }
434
434
 
435
435
  if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Radio Button') {
436
- const selectedRadioBtnGrid = convertSelectedMatrixChoiceToRadioBtnGrid()
436
+ const selectedRadioBtnGrid = convertSelectedMatrixChoiceToRadioBtnGrid()
437
437
  matrixRadioGrid.value = selectedRadioBtnGrid
438
438
  }
439
439
  })
@@ -573,7 +573,7 @@ watch(selectedMatrixChoices, () => {
573
573
  border-radius: 5px;
574
574
  border: 1px solid rgba($pewter, 0.85);
575
575
  background: $white;
576
- box-shadow: 0px 1px 4px 0px rgba(71, 89, 103, 0.30);
576
+ box-shadow: 0px 1px 4px 0px rgb(71, 89, 103, 0.30);
577
577
  display: flex;
578
578
  padding: 12px 10px 0 14px;
579
579
  position: relative;
@@ -591,7 +591,7 @@ watch(selectedMatrixChoices, () => {
591
591
  }
592
592
 
593
593
  &--dark {
594
- border: 1px solid rgba(136, 163, 182, 0.85);
594
+ border: 1px solid rgb(136, 163, 182, 0.85);
595
595
  background: $brand-black;
596
596
  }
597
597
 
@@ -627,7 +627,7 @@ watch(selectedMatrixChoices, () => {
627
627
  &--tablet-portrait {
628
628
  width: 279px;
629
629
  }
630
-
630
+
631
631
  &--mobile {
632
632
  font-size: 16px;
633
633
  font-weight: 600;
@@ -735,7 +735,7 @@ watch(selectedMatrixChoices, () => {
735
735
 
736
736
  &__radio-btns {
737
737
  min-width: 201px;
738
-
738
+
739
739
  &--three-columns {
740
740
  position: relative;
741
741
  left: 6px;
@@ -766,4 +766,4 @@ watch(selectedMatrixChoices, () => {
766
766
  }
767
767
  }
768
768
  }
769
- </style>
769
+ </style>
@@ -4,11 +4,11 @@ import { dark as vDark } from '../../../directives'
4
4
  import type { TMatrixChoiceKey } from '../question'
5
5
 
6
6
  defineProps<{
7
- isDarkMode: boolean
7
+ isDarkMode?: boolean
8
8
  choices?: TMatrixChoiceKey[]
9
9
  labels?: string[]
10
- showAnswers: boolean
11
- disabled: boolean
10
+ showAnswers?: boolean
11
+ disabled?: boolean
12
12
  }>()
13
13
 
14
14
  const selectedChoice = defineModel<TMatrixChoiceKey | null>({ default: null })
@@ -29,15 +29,15 @@ const selectChoice = (choiceKey: TMatrixChoiceKey) => {
29
29
  <li
30
30
  class="uikit-matrix-radio-group__option"
31
31
  :class="{
32
- 'uikit-matrix-radio-group__option--two-options':
33
- choices.length === 2
32
+ 'uikit-matrix-radio-group__option--two-options':
33
+ choices.length === 2
34
34
  }"
35
35
  v-dark="isDarkMode"
36
36
  role="radio"
37
37
  v-for="(choice) in choices"
38
38
  :key="choice"
39
39
  >
40
- <div
40
+ <div
41
41
  class="uikit-matrix-radio-group__radio-btn-div"
42
42
  @click="!disabled && !showAnswers && selectChoice(choice)"
43
43
  @keypress.enter="!disabled && !showAnswers && selectChoice(choice)"
@@ -6,16 +6,15 @@
6
6
  <div
7
7
  class="uikit-question-mobile-matrix-choices-container__choices-container"
8
8
  :class="{
9
- 'uikit-question-mobile-matrix-choices-container__choices-container--correct':
9
+ 'uikit-question-mobile-matrix-choices-container__choices-container--correct':
10
10
  (showMatrixAnswers || reviewMode) && isMatrixQuestionCorrect,
11
- 'uikit-question-mobile-matrix-choices-container__choices-container--incorrect':
11
+ 'uikit-question-mobile-matrix-choices-container__choices-container--incorrect':
12
12
  (showMatrixAnswers || reviewMode) && !isMatrixQuestionCorrect,
13
-
14
13
  }"
15
14
  v-dark="isDarkMode"
16
15
  v-breakpoint="breakpointsWithEl"
17
16
  >
18
- <div
17
+ <div
19
18
  class="uikit-question-mobile-matrix-choices-container__row-container"
20
19
  v-for="(rowLabel, rowIndex) in matrixRowLabels"
21
20
  :key="rowIndex"
@@ -35,16 +34,16 @@
35
34
  <Icon
36
35
  v-if="(showMatrixAnswers || reviewMode) && correctRow(rowIndex)"
37
36
  v-dark="isDarkMode"
38
- class="uikit-question-mobile-matrix-choices-container__row-label-correct-icon"
37
+ class="uikit-question-mobile-matrix-choices-container__row-label-correct-icon"
39
38
  type="check"
40
39
  />
41
40
  <Icon
42
41
  v-if="(showMatrixAnswers || reviewMode) && !correctRow(rowIndex)"
43
42
  v-dark="isDarkMode"
44
- class="uikit-question-mobile-matrix-choices-container__row-label-incorrect-icon"
43
+ class="uikit-question-mobile-matrix-choices-container__row-label-incorrect-icon"
45
44
  type="incorrect"
46
45
  />
47
- <div
46
+ <div
48
47
  class="uikit-question-mobile-matrix-choices-container__row-label"
49
48
  :class="{
50
49
  'uikit-question-mobile-matrix-choices-container__row-label--review-mode':
@@ -83,7 +82,7 @@
83
82
  </div>
84
83
  </div>
85
84
  </div>
86
- <div
85
+ <div
87
86
  v-if="
88
87
  expandedRowNumbers.includes(rowIndex) &&
89
88
  question.type === 'Matrix Checkbox' &&
@@ -96,7 +95,7 @@
96
95
  v-for="(column, columnIndex) in matrixColumnLabels"
97
96
  :key="columnIndex"
98
97
  @click="!(showMatrixAnswers || reviewMode) && checkboxRowClicked(rowIndex, columnIndex)"
99
- @keypress.enter="!(showMatrixAnswers || reviewMode) &&
98
+ @keypress.enter="!(showMatrixAnswers || reviewMode) &&
100
99
  checkboxRowClicked(rowIndex, columnIndex)"
101
100
  >
102
101
  <Checkbox
@@ -129,9 +128,9 @@
129
128
  </div>
130
129
  </div>
131
130
  </div>
132
- <div
133
- v-if="expandedRowNumbers.includes(rowIndex) &&
134
- question.type === 'Matrix Radio Button' &&
131
+ <div
132
+ v-if="expandedRowNumbers.includes(rowIndex) &&
133
+ question.type === 'Matrix Radio Button' &&
135
134
  matrixRadioGrid && matrixRadioGrid[rowIndex]"
136
135
  >
137
136
  <MobileMatrixRadioGroup
@@ -159,7 +158,7 @@ import Checkbox from '../../Forms/Checkbox.vue'
159
158
  import MobileMatrixRadioGroup from './MobileMatrixRadioGroup.vue'
160
159
  import { dark as vDark, breakpoint as vBreakpoint } from '../../../directives'
161
160
  import { useQuestionContext } from './composables'
162
- import type { IRadioOptions, TMatrixChoiceKey } from './../question'
161
+ import type { IRadioOptions, TMatrixChoiceKey } from './../question'
163
162
  import BrandColors from '../../../pocketprep-export.module.scss'
164
163
  import { computed, onMounted, ref, watch } from 'vue'
165
164
  import { stripHtmlTags } from '../../../utils'
@@ -242,7 +241,7 @@ const selectedChoiceKey = (rowIndex: number, columnIndex: number) => {
242
241
  const row = rowIndex += 1
243
242
  const column = columnIndex += 1
244
243
  if (selectedMatrixChoices.value.length && matrixAnswerKeys.value.length) {
245
- const matrixSelectedChoiceKey = selectedMatrixChoices.value.find((choice) => {
244
+ const matrixSelectedChoiceKey = selectedMatrixChoices.value.find(choice => {
246
245
  const substring = choice.substring(1)
247
246
  return substring === `${row}_${column}`
248
247
  })
@@ -295,14 +294,14 @@ const incorrectlySelectedChoice = (rowIndex: number, columnIndex: number) => {
295
294
  }
296
295
  return false
297
296
  }
298
-
297
+
299
298
  const correctAnswerButNotSelected = (rowIndex: number, columnIndex: number) => {
300
299
  const selectedChoice = selectedChoiceKey(rowIndex, columnIndex)
301
300
  const answerKey = matrixAnswerKeys.value.find(choice => choice === `a${rowIndex + 1}_${columnIndex + 1}`)
302
301
  return answerKey && !selectedChoice
303
302
  }
304
303
 
305
- const checkboxContainerStyling = (rowIndex: number, columnIndex: number) => {
304
+ const checkboxContainerStyling = (rowIndex: number, columnIndex: number): Record<string, string> | undefined => {
306
305
  const isReviewMode = showMatrixAnswers.value || reviewMode.value
307
306
 
308
307
  // check box is correctlySelected
@@ -342,10 +341,10 @@ const checkboxCheckStyling = (rowIndex: number, columnIndex: number) => {
342
341
  const correctRow = (rowIndex: number) => {
343
342
  if (matrixChoiceLayout.value?.[rowIndex]) {
344
343
  if (
345
- question?.value.type === 'Matrix Checkbox' &&
346
- matrixCheckboxGrid.value?.[rowIndex]
344
+ question?.value.type === 'Matrix Checkbox'
345
+ && matrixCheckboxGrid.value?.[rowIndex]
347
346
  ) {
348
- const correctAnswerKeys = matrixChoiceLayout.value[rowIndex]?.filter(choice =>
347
+ const correctAnswerKeys = matrixChoiceLayout.value[rowIndex]?.filter(choice =>
349
348
  choice.startsWith('a')
350
349
  )
351
350
  const selectedAnswerKeys = matrixCheckboxGrid.value[rowIndex]?.map((choice, choiceIndex) => {
@@ -355,13 +354,13 @@ const correctRow = (rowIndex: number) => {
355
354
  const selectedChoice = selectedChoiceKey(rowIndex, choiceIndex)
356
355
  return selectedChoice?.startsWith('a')
357
356
  })
358
- return !selectedAnswerKeys?.some(choice => choice?.startsWith('d')) &&
359
- (correctAnswerKeys?.length === correctSelectedKeys?.length)
357
+ return !selectedAnswerKeys?.some(choice => choice?.startsWith('d'))
358
+ && (correctAnswerKeys?.length === correctSelectedKeys?.length)
360
359
  }
361
360
 
362
361
  if (
363
- question?.value.type === 'Matrix Radio Button' &&
364
- matrixRadioGrid.value?.[rowIndex]
362
+ question?.value.type === 'Matrix Radio Button'
363
+ && matrixRadioGrid.value?.[rowIndex]
365
364
  ) {
366
365
  const rowVal = matrixRadioGrid.value[rowIndex]?.value
367
366
  if (rowVal) {
@@ -504,7 +503,7 @@ watch(matrixRadioGrid, () => {
504
503
  if (matrixChoiceLayout.value && matrixRadioGrid.value && (!reviewMode.value || !showMatrixAnswers.value)) {
505
504
  const selectedRadioButtonChoices: TMatrixChoiceKey[] = []
506
505
 
507
- matrixRadioGrid.value.forEach((row) => {
506
+ matrixRadioGrid.value.forEach(row => {
508
507
  if (row.value) {
509
508
  selectedRadioButtonChoices.push(row.value)
510
509
  }
@@ -522,12 +521,12 @@ watch(showMatrixAnswers, () => {
522
521
 
523
522
  watch(selectedMatrixChoices, () => {
524
523
  if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Checkbox') {
525
- const selectedCheckboxGrid = convertSelectedMatrixChoiceToCheckboxGrid()
524
+ const selectedCheckboxGrid = convertSelectedMatrixChoiceToCheckboxGrid()
526
525
  matrixCheckboxGrid.value = selectedCheckboxGrid ? selectedCheckboxGrid : defaultCheckboxGrid.value
527
526
  }
528
527
 
529
528
  if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Radio Button') {
530
- const selectedRadioBtnGrid = convertSelectedMatrixChoiceToRadioBtnGrid()
529
+ const selectedRadioBtnGrid = convertSelectedMatrixChoiceToRadioBtnGrid()
531
530
  matrixRadioGrid.value = selectedRadioBtnGrid
532
531
  }
533
532
  })
@@ -588,7 +587,7 @@ watch(selectedMatrixChoices, () => {
588
587
 
589
588
  &__row-container {
590
589
  margin-bottom: 9px;
591
- box-shadow: 0px 1px 4px 0px rgba(71, 89, 103, 0.30);
590
+ box-shadow: 0px 1px 4px 0px rgb(71, 89, 103, 0.30);
592
591
  border: 0.5px solid ($pewter, 0.85);
593
592
  border-radius: 5px;
594
593
 
@@ -742,4 +741,4 @@ watch(selectedMatrixChoices, () => {
742
741
  max-width: 492px;
743
742
  }
744
743
  }
745
- </style>
744
+ </style>
@@ -68,12 +68,12 @@ const radioButtonColor = (choice: TMatrixChoiceKey) => {
68
68
  :color="radioButtonColor(choice)"
69
69
  @click="!disabled && !showAnswers && selectChoice(choice)"
70
70
  />
71
- <div
71
+ <div
72
72
  v-if="labels"
73
73
  v-dark="props.isDarkMode"
74
74
  class="uikit-mobile-matrix-radio-group__label"
75
75
  :class="{
76
- 'uikit-mobile-matrix-radio-group__label--distractor':
76
+ 'uikit-mobile-matrix-radio-group__label--distractor':
77
77
  showAnswers && choice?.startsWith('d')
78
78
  }"
79
79
  @click="!disabled && !showAnswers && selectChoice(choice)"
@@ -35,7 +35,7 @@
35
35
  @click.stop="emitTogglePassageImageLongAlt"
36
36
  @mousedown.prevent
37
37
  >
38
- <span
38
+ <span
39
39
  class="uikit-question-passage-and-image__toggle-passage-image-description-text"
40
40
  >
41
41
  Image Description
@@ -43,7 +43,7 @@
43
43
  <Icon
44
44
  class="uikit-question-passage-and-image__toggle-passage-image-description-icon"
45
45
  :class="{
46
- 'uikit-question-passage-and-image__toggle-passage-image-description-icon--up':
46
+ 'uikit-question-passage-and-image__toggle-passage-image-description-icon--up':
47
47
  showPassageImageLongAlt,
48
48
  }"
49
49
  type="accordionArrow"
@@ -208,4 +208,4 @@ const emitMoveFocusToPrompt = () => {
208
208
  }
209
209
  }
210
210
  }
211
- </style>
211
+ </style>