@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.
Files changed (85) hide show
  1. package/README.md +2 -2
  2. package/dist/@pocketprep/ui-kit.css +1 -0
  3. package/dist/@pocketprep/ui-kit.js +14335 -14870
  4. package/dist/@pocketprep/ui-kit.js.map +1 -1
  5. package/dist/@pocketprep/ui-kit.umd.cjs +11 -11
  6. package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
  7. package/eslint.config.ts +111 -0
  8. package/lib/components/Banners/Banner.vue +2 -2
  9. package/lib/components/Bundles/BundleList.vue +1 -1
  10. package/lib/components/Bundles/BundleSearch.vue +123 -121
  11. package/lib/components/Bundles/PremiumPill.vue +2 -2
  12. package/lib/components/Buttons/Button.vue +19 -18
  13. package/lib/components/Buttons/Link.vue +9 -8
  14. package/lib/components/Buttons/Tab.vue +4 -3
  15. package/lib/components/Calendar/Calendar.vue +14 -2
  16. package/lib/components/Charts/Bar.vue +3 -3
  17. package/lib/components/Charts/Pie.vue +4 -4
  18. package/lib/components/Controls/SegmentControl.vue +8 -7
  19. package/lib/components/Controls/Slider.vue +2 -3
  20. package/lib/components/Controls/ToggleSwitch.vue +3 -2
  21. package/lib/components/EmptyStates/EmptyState.vue +3 -2
  22. package/lib/components/Exams/ExamCard.vue +3 -3
  23. package/lib/components/Exams/ExamMenuCard.vue +2 -2
  24. package/lib/components/Filters/FilterDropdown.vue +2 -2
  25. package/lib/components/Filters/FilterOptions.vue +2 -2
  26. package/lib/components/Forms/Checkbox.vue +2 -2
  27. package/lib/components/Forms/CheckboxOption.vue +2 -2
  28. package/lib/components/Forms/Errors.vue +2 -2
  29. package/lib/components/Forms/Input.vue +2 -2
  30. package/lib/components/Forms/Radio.vue +37 -39
  31. package/lib/components/Forms/RadioButton.vue +1 -1
  32. package/lib/components/Forms/Select.vue +7 -6
  33. package/lib/components/Forms/Textarea.vue +2 -2
  34. package/lib/components/Icons/Icon.vue +1 -0
  35. package/lib/components/Icons/IconEdit.vue +4 -2
  36. package/lib/components/Icons/IconFullViewActive.vue +1 -1
  37. package/lib/components/Icons/IconLoading2.vue +1 -3
  38. package/lib/components/Loaders/SkeletonLoader.vue +2 -2
  39. package/lib/components/Messaging/InfoMessage.vue +2 -2
  40. package/lib/components/Modal/Modal.vue +2 -2
  41. package/lib/components/Modal/ModalContainer.vue +2 -2
  42. package/lib/components/Onboarding/EmailAuth.vue +5 -5
  43. package/lib/components/Onboarding/MagicCodeEntry.vue +3 -4
  44. package/lib/components/Pagination/QuestionReviewPagination.vue +4 -4
  45. package/lib/components/Pagination/TablePagination.vue +2 -2
  46. package/lib/components/Quiz/FlagToggle.vue +2 -2
  47. package/lib/components/Quiz/GlobalMetricsToggle.vue +3 -2
  48. package/lib/components/Quiz/KeyboardShortcutsButton.vue +1 -1
  49. package/lib/components/Quiz/KeyboardShortcutsModal.vue +1 -1
  50. package/lib/components/Quiz/Question/ChoicesContainer.vue +4 -3
  51. package/lib/components/Quiz/Question/DropdownExplanation.vue +2 -2
  52. package/lib/components/Quiz/Question/Explanation.vue +2 -2
  53. package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +12 -17
  54. package/lib/components/Quiz/Question/MatrixRadioGroup.vue +2 -2
  55. package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +19 -26
  56. package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +7 -5
  57. package/lib/components/Quiz/Question/PassageAndImage.vue +2 -2
  58. package/lib/components/Quiz/Question/PassageAndImageDropdown.vue +7 -6
  59. package/lib/components/Quiz/Question/Paywall.vue +2 -2
  60. package/lib/components/Quiz/Question/QuestionContext.vue +2 -3
  61. package/lib/components/Quiz/Question/StatsSummary.vue +2 -2
  62. package/lib/components/Quiz/Question/Summary.vue +2 -2
  63. package/lib/components/Quiz/Question.vue +29 -28
  64. package/lib/components/Quiz/QuizContainer.vue +31 -37
  65. package/lib/components/Quiz/QuizProgress.vue +73 -77
  66. package/lib/components/Quiz/QuizProgressBar.vue +3 -2
  67. package/lib/components/Search/Pill.vue +2 -2
  68. package/lib/components/Search/Search.vue +2 -2
  69. package/lib/components/SidePanels/SidePanel.vue +8 -3
  70. package/lib/components/Tables/Table.vue +4 -3
  71. package/lib/components/Tables/TableActions.vue +3 -3
  72. package/lib/components/Tags/Tag.vue +2 -2
  73. package/lib/components/Toasts/Toast.vue +5 -3
  74. package/lib/components/Tooltips/OverflowTooltip.vue +2 -2
  75. package/lib/components/Tooltips/Tooltip.vue +2 -2
  76. package/lib/directives.ts +1 -1
  77. package/lib/pocketprep-export.module.scss +3 -2
  78. package/lib/pocketprep.scss +2 -2
  79. package/lib/styles/_breakpoints.scss +6 -12
  80. package/lib/styles/_colors.scss +0 -1
  81. package/package.json +36 -27
  82. package/stylelint.config.js +38 -0
  83. package/.eslintrc.cjs +0 -74
  84. package/dist/style.css +0 -1
  85. package/stylelint.config.cjs +0 -22
@@ -45,8 +45,8 @@ import { computed } from 'vue'
45
45
  import Icon from '../Icons/Icon.vue'
46
46
 
47
47
  const props = withDefaults(defineProps<{
48
- currentPage: number
49
- total: number
48
+ currentPage?: number
49
+ total?: number
50
50
  }>(), {
51
51
  currentPage: 0,
52
52
  total: 0,
@@ -71,8 +71,8 @@ const changePage = (direction: 'next' | 'previous') => {
71
71
  </script>
72
72
 
73
73
  <style lang="scss" scoped>
74
- @import '../../styles/breakpoints';
75
- @import '../../styles/colors';
74
+ @use '@/styles/breakpoints' as *;
75
+ @use '@/styles/colors' as *;
76
76
 
77
77
  .uikit-question-review-pagination {
78
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
- @import '../../styles/breakpoints';
125
- @import '../../styles/colors';
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
- @import '../../styles/colors';
97
- @import '../../styles/breakpoints';
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
- @import '../../styles/breakpoints';
78
- @import '../../styles/colors';
78
+ @use '@/styles/breakpoints' as *;
79
+ @use '@/styles/colors' as *;
79
80
 
80
81
  .uikit-global-metrics-toggle {
81
82
  position: relative;
@@ -60,7 +60,7 @@ export default class KeyboardShortcutsButton extends Vue {
60
60
  </script>
61
61
 
62
62
  <style lang="scss">
63
- @import '../../styles/colors';
63
+ @use '@/styles/colors' as *;
64
64
 
65
65
  .uikit-keyboard-shortcuts-btn {
66
66
  position: relative;
@@ -180,7 +180,7 @@ export default class KeyboardShortcutsModal extends Vue {
180
180
  </script>
181
181
 
182
182
  <style lang="scss">
183
- @import '../../styles/colors';
183
+ @use '@/styles/colors' as *;
184
184
 
185
185
  .uikit-keyboard-modal {
186
186
  box-sizing: border-box;
@@ -377,8 +377,9 @@ const handleClick = (event: MouseEvent) => {
377
377
  </script>
378
378
 
379
379
  <style lang="scss">
380
- @import '../../../styles/colors';
381
- @import '../../../styles/breakpoints';
380
+ @use 'sass:color';
381
+ @use '@/styles/breakpoints' as *;
382
+ @use '@/styles/colors' as *;
382
383
 
383
384
  .uikit-question-choices-container {
384
385
  display: contents;
@@ -814,7 +815,7 @@ const handleClick = (event: MouseEvent) => {
814
815
  color: $white;
815
816
 
816
817
  &:hover {
817
- background-color: mix($brand-blue, black, 90%);
818
+ background-color: color.mix($brand-blue, black, 90%);
818
819
  }
819
820
 
820
821
  &:focus {
@@ -113,8 +113,8 @@ const toggleDropdownExplanationImageLongAlt = () => {
113
113
  </script>
114
114
 
115
115
  <style lang="scss">
116
- @import '../../../styles/colors';
117
- @import '../../../styles/breakpoints';
116
+ @use '@/styles/breakpoints' as *;
117
+ @use '@/styles/colors' as *;
118
118
 
119
119
  .uikit-question-dropdown-explanation {
120
120
  &__dropdown-explanation {
@@ -138,8 +138,8 @@ const toggleExplanation = () => {
138
138
  </script>
139
139
 
140
140
  <style lang="scss">
141
- @import '../../../styles/colors';
142
- @import '../../../styles/breakpoints';
141
+ @use '@/styles/breakpoints' as *;
142
+ @use '@/styles/colors' as *;
143
143
 
144
144
  .uikit-question-explanation {
145
145
  position: relative;
@@ -204,7 +204,6 @@ const emit = defineEmits<{
204
204
 
205
205
  const {
206
206
  // questionEl is used by the breakpoint directive
207
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
208
207
  questionEl,
209
208
  question,
210
209
  isMatrixQuestionCorrect,
@@ -272,7 +271,7 @@ const convertSelectedMatrixChoiceToCheckboxGrid = () => {
272
271
  selectedMatrixChoices.value.forEach(choice => {
273
272
  const rowIndex = Number(choice.substring(1, choice.indexOf('_'))) - 1
274
273
  const colIndex = Number(choice.split('_').pop()) - 1
275
- const row = checkboxGrid && checkboxGrid[rowIndex]
274
+ const row = checkboxGrid?.[rowIndex]
276
275
  if (row) {
277
276
  row[colIndex] = true
278
277
  }
@@ -284,7 +283,7 @@ const convertSelectedMatrixChoiceToRadioBtnGrid = () => {
284
283
  const radioBtnGrid = defaultRadioButtonGrid.value
285
284
  selectedMatrixChoices.value.forEach(choice => {
286
285
  const rowIndex = Number(choice.substring(1, choice.indexOf('_'))) - 1
287
- const row = radioBtnGrid && radioBtnGrid[rowIndex]
286
+ const row = radioBtnGrid?.[rowIndex]
288
287
  if (row) {
289
288
  row.value = choice
290
289
  }
@@ -334,7 +333,7 @@ const correctlySelectedChoice = (rowIndex: number, colIndex: number) => {
334
333
  const incorrectlySelectedChoice = (rowIndex: number, colIndex: number) => {
335
334
  if (selectedMatrixChoices.value && matrixAnswerKeys.value) {
336
335
  const selectedChoice = selectedChoiceKey(rowIndex, colIndex)
337
- if (selectedChoice && selectedChoice.startsWith('d')) {
336
+ if (selectedChoice?.startsWith('d')) {
338
337
  return true
339
338
  }
340
339
  }
@@ -348,11 +347,11 @@ const correctAnswerButNotSelected = (rowIndex: number, colIndex: number) => {
348
347
  }
349
348
 
350
349
  const checkboxContainerStyling = (rowIndex: number, columnIndex: number) => {
351
- const isReviewMode = showMatrixAnswers.value || reviewMode
350
+ const isReviewMode = showMatrixAnswers.value || reviewMode.value
352
351
 
353
352
  // check box is correctlySelected
354
353
  if (isReviewMode && correctlySelectedChoice(rowIndex, columnIndex)) {
355
- const borderColor = isDarkMode ? brandColors.jungleGreen : brandColors.cadaverous
354
+ const borderColor = isDarkMode.value ? brandColors.jungleGreen : brandColors.cadaverous
356
355
  return {
357
356
  borderColor: `${borderColor} !important`,
358
357
  background: `${borderColor} !important`,
@@ -375,9 +374,9 @@ const checkboxContainerStyling = (rowIndex: number, columnIndex: number) => {
375
374
  }
376
375
 
377
376
  const checkboxCheckStyling = (rowIndex: number, columnIndex: number) => {
378
- const isReviewMode = showMatrixAnswers.value || reviewMode
377
+ const isReviewMode = showMatrixAnswers.value || reviewMode.value
379
378
  if (isReviewMode && correctAnswerButNotSelected(rowIndex, columnIndex)) {
380
- const color = isDarkMode ? brandColors.jungleGreen : brandColors.cadaverous
379
+ const color = isDarkMode.value ? brandColors.jungleGreen : brandColors.cadaverous
381
380
  return {
382
381
  color: `${color} !important`,
383
382
  }
@@ -401,11 +400,7 @@ watch(matrixCheckboxGrid, () => {
401
400
 
402
401
  matrixCheckboxGrid.value?.forEach((row, rowIndex) => {
403
402
  row.forEach((choice, choiceIndex) => {
404
- if (
405
- choice &&
406
- matrixChoiceLayout.value?.[rowIndex] &&
407
- matrixChoiceLayout.value?.[rowIndex]?.[choiceIndex]
408
- ) {
403
+ if (choice && matrixChoiceLayout?.value?.[rowIndex]?.[choiceIndex]) {
409
404
  const choiceKey = matrixChoiceLayout.value?.[rowIndex]?.[choiceIndex] as TMatrixChoiceKey | null
410
405
  if (choiceKey) {
411
406
  selectedCheckboxChoices.push(choiceKey)
@@ -432,12 +427,12 @@ watch(matrixRadioGrid, () => {
432
427
  }, { deep: true })
433
428
 
434
429
  watch(selectedMatrixChoices, () => {
435
- if ((reviewMode || showMatrixAnswers.value) && question.value.type === 'Matrix Checkbox') {
430
+ if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Checkbox') {
436
431
  const selectedCheckboxGrid = convertSelectedMatrixChoiceToCheckboxGrid()
437
432
  matrixCheckboxGrid.value = selectedCheckboxGrid ? selectedCheckboxGrid : defaultCheckboxGrid.value
438
433
  }
439
434
 
440
- if ((reviewMode || showMatrixAnswers.value) && question.value.type === 'Matrix Radio Button') {
435
+ if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Radio Button') {
441
436
  const selectedRadioBtnGrid = convertSelectedMatrixChoiceToRadioBtnGrid()
442
437
  matrixRadioGrid.value = selectedRadioBtnGrid
443
438
  }
@@ -446,8 +441,8 @@ watch(selectedMatrixChoices, () => {
446
441
  </script>
447
442
 
448
443
  <style lang="scss">
449
- @import '../../../styles/colors';
450
- @import '../../../styles/breakpoints';
444
+ @use '@/styles/breakpoints' as *;
445
+ @use '@/styles/colors' as *;
451
446
 
452
447
  .uikit-question-matrix-choices-container {
453
448
  width: 100%;
@@ -74,8 +74,8 @@ const selectChoice = (choiceKey: TMatrixChoiceKey) => {
74
74
  </template>
75
75
 
76
76
  <style lang="scss" scoped>
77
- @import '../../../styles/breakpoints';
78
- @import '../../../styles/colors';
77
+ @use '@/styles/breakpoints' as *;
78
+ @use '@/styles/colors' as *;
79
79
 
80
80
  .uikit-matrix-radio-group {
81
81
  display: flex;
@@ -169,7 +169,6 @@ const emit = defineEmits<{
169
169
 
170
170
  const {
171
171
  // questionEl is used by the breakpoint directive
172
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
173
172
  questionEl,
174
173
  question,
175
174
  isMatrixQuestionCorrect,
@@ -298,7 +297,7 @@ const correctlySelectedChoice = (rowIndex: number, columnIndex: number) => {
298
297
  const incorrectlySelectedChoice = (rowIndex: number, columnIndex: number) => {
299
298
  if (selectedMatrixChoices.value && matrixAnswerKeys.value) {
300
299
  const selectedChoice = selectedChoiceKey(rowIndex, columnIndex)
301
- if (selectedChoice && selectedChoice.startsWith('d')) {
300
+ if (selectedChoice?.startsWith('d')) {
302
301
  return true
303
302
  }
304
303
  }
@@ -312,11 +311,11 @@ const correctAnswerButNotSelected = (rowIndex: number, columnIndex: number) => {
312
311
  }
313
312
 
314
313
  const checkboxContainerStyling = (rowIndex: number, columnIndex: number) => {
315
- const isReviewMode = showMatrixAnswers.value || reviewMode
314
+ const isReviewMode = showMatrixAnswers.value || reviewMode.value
316
315
 
317
316
  // check box is correctlySelected
318
317
  if (isReviewMode && correctlySelectedChoice(rowIndex, columnIndex)) {
319
- const borderColor = isDarkMode ? brandColors.jungleGreen : brandColors.cadaverous
318
+ const borderColor = isDarkMode.value ? brandColors.jungleGreen : brandColors.cadaverous
320
319
  return {
321
320
  borderColor: `${borderColor} !important`,
322
321
  background: `${borderColor} !important`,
@@ -339,9 +338,9 @@ const checkboxContainerStyling = (rowIndex: number, columnIndex: number) => {
339
338
  }
340
339
 
341
340
  const checkboxCheckStyling = (rowIndex: number, columnIndex: number) => {
342
- const isReviewMode = showMatrixAnswers.value || reviewMode
341
+ const isReviewMode = showMatrixAnswers.value || reviewMode.value
343
342
  if (isReviewMode && correctAnswerButNotSelected(rowIndex, columnIndex)) {
344
- const color = isDarkMode ? brandColors.jungleGreen : brandColors.cadaverous
343
+ const color = isDarkMode.value ? brandColors.jungleGreen : brandColors.cadaverous
345
344
  return {
346
345
  color: `${color} !important`,
347
346
  }
@@ -349,11 +348,10 @@ const checkboxCheckStyling = (rowIndex: number, columnIndex: number) => {
349
348
  }
350
349
 
351
350
  const correctRow = (rowIndex: number) => {
352
- if (matrixChoiceLayout.value && matrixChoiceLayout.value[rowIndex]) {
351
+ if (matrixChoiceLayout.value?.[rowIndex]) {
353
352
  if (
354
353
  question?.value.type === 'Matrix Checkbox' &&
355
- matrixCheckboxGrid.value &&
356
- matrixCheckboxGrid.value[rowIndex]
354
+ matrixCheckboxGrid.value?.[rowIndex]
357
355
  ) {
358
356
  const correctAnswerKeys = matrixChoiceLayout.value[rowIndex]?.filter(choice =>
359
357
  choice.startsWith('a')
@@ -371,8 +369,7 @@ const correctRow = (rowIndex: number) => {
371
369
 
372
370
  if (
373
371
  question?.value.type === 'Matrix Radio Button' &&
374
- matrixRadioGrid.value &&
375
- matrixRadioGrid.value[rowIndex]
372
+ matrixRadioGrid.value?.[rowIndex]
376
373
  ) {
377
374
  const rowVal = matrixRadioGrid.value[rowIndex]?.value
378
375
  if (rowVal) {
@@ -402,7 +399,7 @@ const convertSelectedMatrixChoiceToCheckboxGrid = () => {
402
399
  selectedMatrixChoices.value.forEach(choice => {
403
400
  const rowIndex = Number(choice.substring(1, choice.indexOf('_'))) - 1
404
401
  const columnIndex = Number(choice.split('_').pop()) - 1
405
- const row = checkboxGrid && checkboxGrid[rowIndex]
402
+ const row = checkboxGrid?.[rowIndex]
406
403
  if (row) {
407
404
  row[columnIndex] = true
408
405
  if (selectedColumnHeaders.value[rowIndex] && question.value.matrixLabels?.columns[columnIndex]) {
@@ -441,7 +438,7 @@ const convertSelectedMatrixChoiceToRadioBtnGrid = () => {
441
438
  selectedColumnHeaders.value[rowIndex]?.push(columnHeader)
442
439
  }
443
440
  }
444
- const radioBtnGridRow = radioBtnGrid && radioBtnGrid[rowIndex]
441
+ const radioBtnGridRow = radioBtnGrid?.[rowIndex]
445
442
  if (radioBtnGridRow) {
446
443
  radioBtnGridRow.value = choice
447
444
  }
@@ -450,12 +447,12 @@ const convertSelectedMatrixChoiceToRadioBtnGrid = () => {
450
447
  }
451
448
 
452
449
  const checkboxRowClicked = (rowIndex: number, columnIndex: number) => {
453
- const matrixCheckboxGridRow = matrixCheckboxGrid.value && matrixCheckboxGrid.value[rowIndex]
450
+ const matrixCheckboxGridRow = matrixCheckboxGrid.value?.[rowIndex]
454
451
  if (matrixCheckboxGridRow) {
455
452
  matrixCheckboxGridRow[columnIndex] = !matrixCheckboxGridRow[columnIndex]
456
453
  const columnHeader = question.value.matrixLabels?.columns[columnIndex]
457
454
 
458
- if (selectedColumnHeaders.value && selectedColumnHeaders.value[rowIndex] && columnHeader) {
455
+ if (selectedColumnHeaders.value?.[rowIndex] && columnHeader) {
459
456
  if (selectedColumnHeaders.value[rowIndex]?.includes(columnHeader)) {
460
457
  const columnHeaderIndex = selectedColumnHeaders.value[rowIndex]?.indexOf(columnHeader)
461
458
  if (columnHeaderIndex !== undefined && columnHeaderIndex !== -1) {
@@ -493,16 +490,12 @@ const emitSelectedMatrixChoice = (matrixChoiceKeys: TMatrixChoiceKey[]) => {
493
490
  }
494
491
 
495
492
  watch(matrixCheckboxGrid, () => {
496
- if (matrixChoiceLayout.value && matrixCheckboxGrid.value && (!reviewMode || !showMatrixAnswers.value)) {
493
+ if (matrixChoiceLayout.value && matrixCheckboxGrid.value && (!reviewMode.value || !showMatrixAnswers.value)) {
497
494
  const selectedCheckboxChoices: TMatrixChoiceKey[] = []
498
495
 
499
496
  matrixCheckboxGrid.value.forEach((row, rowIndex) => {
500
497
  row.forEach((choice, choiceIndex) => {
501
- if (
502
- choice &&
503
- matrixChoiceLayout.value?.[rowIndex] &&
504
- matrixChoiceLayout.value?.[rowIndex]?.[choiceIndex]
505
- ) {
498
+ if (choice && matrixChoiceLayout?.value?.[rowIndex]?.[choiceIndex]) {
506
499
  const choiceKey = matrixChoiceLayout.value?.[rowIndex]?.[choiceIndex] as TMatrixChoiceKey
507
500
  if (choiceKey) {
508
501
  selectedCheckboxChoices.push(choiceKey)
@@ -516,7 +509,7 @@ watch(matrixCheckboxGrid, () => {
516
509
  }, { deep: true })
517
510
 
518
511
  watch(matrixRadioGrid, () => {
519
- if (matrixChoiceLayout.value && matrixRadioGrid.value && (!reviewMode || !showMatrixAnswers.value)) {
512
+ if (matrixChoiceLayout.value && matrixRadioGrid.value && (!reviewMode.value || !showMatrixAnswers.value)) {
520
513
  const selectedRadioButtonChoices: TMatrixChoiceKey[] = []
521
514
 
522
515
  matrixRadioGrid.value.forEach((row) => {
@@ -536,12 +529,12 @@ watch(showMatrixAnswers, () => {
536
529
  })
537
530
 
538
531
  watch(selectedMatrixChoices, () => {
539
- if ((reviewMode || showMatrixAnswers.value) && question.value.type === 'Matrix Checkbox') {
532
+ if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Checkbox') {
540
533
  const selectedCheckboxGrid = convertSelectedMatrixChoiceToCheckboxGrid()
541
534
  matrixCheckboxGrid.value = selectedCheckboxGrid ? selectedCheckboxGrid : defaultCheckboxGrid.value
542
535
  }
543
536
 
544
- if ((reviewMode || showMatrixAnswers.value) && question.value.type === 'Matrix Radio Button') {
537
+ if ((reviewMode.value || showMatrixAnswers.value) && question.value.type === 'Matrix Radio Button') {
545
538
  const selectedRadioBtnGrid = convertSelectedMatrixChoiceToRadioBtnGrid()
546
539
  matrixRadioGrid.value = selectedRadioBtnGrid
547
540
  }
@@ -549,8 +542,8 @@ watch(selectedMatrixChoices, () => {
549
542
  </script>
550
543
 
551
544
  <style lang="scss">
552
- @import '../../../styles/colors';
553
- @import '../../../styles/breakpoints';
545
+ @use '@/styles/breakpoints' as *;
546
+ @use '@/styles/colors' as *;
554
547
 
555
548
  .uikit-question-mobile-matrix-choices-container {
556
549
  width: 100%;
@@ -4,15 +4,17 @@ import { dark as vDark } from '../../../directives'
4
4
  import type { TMatrixChoiceKey } from '../question'
5
5
 
6
6
  interface Props {
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 props = withDefaults(defineProps<Props>(), {
15
15
  isDarkMode: false,
16
+ choices: () => [],
17
+ labels: () => [],
16
18
  showAnswers: false,
17
19
  disabled: false,
18
20
  })
@@ -91,8 +93,8 @@ const stripHtmlTags = (string?: string) => {
91
93
  </template>
92
94
 
93
95
  <style lang="scss" scoped>
94
- @import '../../../styles/breakpoints';
95
- @import '../../../styles/colors';
96
+ @use '@/styles/breakpoints' as *;
97
+ @use '@/styles/colors' as *;
96
98
 
97
99
  .uikit-mobile-matrix-radio-group {
98
100
  list-style: none;
@@ -102,8 +102,8 @@ const emitMoveFocusToPrompt = () => {
102
102
  </script>
103
103
 
104
104
  <style lang="scss">
105
- @import '../../../styles/colors';
106
- @import '../../../styles/breakpoints';
105
+ @use '@/styles/breakpoints' as *;
106
+ @use '@/styles/colors' as *;
107
107
 
108
108
  .uikit-question-passage-and-image {
109
109
  position: relative;
@@ -141,8 +141,9 @@ const togglePassageImageLongAltDropdown = () => {
141
141
  </script>
142
142
 
143
143
  <style lang="scss">
144
- @import '../../../styles/colors';
145
- @import '../../../styles/breakpoints';
144
+ @use 'sass:color';
145
+ @use '@/styles/breakpoints' as *;
146
+ @use '@/styles/colors' as *;
146
147
 
147
148
  .uikit-question-passage-and-image-dropdown {
148
149
  &__passage-and-image-dropdown-btn {
@@ -161,11 +162,11 @@ const togglePassageImageLongAltDropdown = () => {
161
162
 
162
163
  &:hover {
163
164
  .uikit-question-passage-and-image-dropdown__passage-and-image-dropdown-text {
164
- color: mix($brand-blue, black, 90%);
165
+ color: color.mix($brand-blue, black, 90%);
165
166
  }
166
167
 
167
168
  .uikit-question-passage-and-image-dropdown__passage-and-image-dropdown-arrow {
168
- color: mix($brand-blue, black, 90%);
169
+ color: color.mix($brand-blue, black, 90%);
169
170
  }
170
171
 
171
172
  &::before {
@@ -261,7 +262,7 @@ const togglePassageImageLongAltDropdown = () => {
261
262
  line-height: 24px;
262
263
  font-size: 16px;
263
264
  font-weight: 400;
264
- letter-spacing: -0.1;
265
+ letter-spacing: -0.1px;
265
266
 
266
267
  &--mobile {
267
268
  line-height: 24px;
@@ -315,7 +316,7 @@ const togglePassageImageLongAltDropdown = () => {
315
316
  font-size: 15px;
316
317
  line-height: 22px;
317
318
  font-weight: 500;
318
- letter-spacing: -0.2;
319
+ letter-spacing: -0.2px;
319
320
 
320
321
  &--dark {
321
322
  color: $fog;
@@ -66,8 +66,8 @@ const emitUpgradeClick = () => {
66
66
  </script>
67
67
 
68
68
  <style lang="scss">
69
- @import '../../../styles/colors';
70
- @import '../../../styles/breakpoints';
69
+ @use '@/styles/breakpoints' as *;
70
+ @use '@/styles/colors' as *;
71
71
 
72
72
  .uikit-question-paywall {
73
73
  width: 100%;
@@ -65,7 +65,6 @@ import { useQuestionContext } from './composables'
65
65
 
66
66
  const {
67
67
  // questionEl is used by the breakpoint directive
68
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
69
68
  questionEl,
70
69
  breakpointsWithEl,
71
70
  quizLength,
@@ -85,8 +84,8 @@ defineExpose({
85
84
  </script>
86
85
 
87
86
  <style lang="scss">
88
- @import '../../../styles/colors';
89
- @import '../../../styles/breakpoints';
87
+ @use '@/styles/breakpoints' as *;
88
+ @use '@/styles/colors' as *;
90
89
 
91
90
  .uikit-question-context {
92
91
  display: flex;
@@ -42,8 +42,8 @@ const {
42
42
  </script>
43
43
 
44
44
  <style lang="scss">
45
- @import '../../../styles/colors';
46
- @import '../../../styles/breakpoints';
45
+ @use '@/styles/breakpoints' as *;
46
+ @use '@/styles/colors' as *;
47
47
 
48
48
  .uikit-question-stats-summary {
49
49
  margin-top: 24px;
@@ -180,8 +180,8 @@ const toggleSummaryExplanationImageLongAlt = () => {
180
180
  </script>
181
181
 
182
182
  <style lang="scss">
183
- @import '../../../styles/colors';
184
- @import '../../../styles/breakpoints';
183
+ @use '@/styles/breakpoints' as *;
184
+ @use '@/styles/colors' as *;
185
185
 
186
186
  .uikit-question-summary {
187
187
  position: relative;