@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
@@ -104,9 +104,9 @@
104
104
 
105
105
  </div>
106
106
  </div>
107
- <div
108
- v-if="keyboardMode !== 'teach'"
109
- v-dark="isDarkMode"
107
+ <div
108
+ v-if="keyboardMode !== 'teach'"
109
+ v-dark="isDarkMode"
110
110
  class="uikit-keyboard-modal__item"
111
111
  >
112
112
  <div>
@@ -134,49 +134,48 @@
134
134
  </ModalContainer>
135
135
  </template>
136
136
 
137
- <script lang="ts">
138
- import { Component, Emit, Prop, Vue } from 'vue-facing-decorator'
137
+ <script setup lang="ts">
139
138
  import ModalContainer from '../Modal/ModalContainer.vue'
140
139
  import ToggleSwitch from '../Controls/ToggleSwitch.vue'
141
- import { dark } from '../../directives'
140
+ import { dark as vDark } from '../../directives'
141
+ import { onMounted, useTemplateRef } from 'vue'
142
142
 
143
- @Component({
144
- directives: {
145
- dark,
146
- },
147
- components: {
148
- ModalContainer,
149
- ToggleSwitch,
150
- },
151
- })
152
- export default class KeyboardShortcutsModal extends Vue {
153
- @Prop() allowKeyboardShortcuts!: boolean
154
- @Prop({ default: false }) isDarkMode!: boolean
155
- @Prop({ default: 'quiz' }) keyboardMode!: 'quiz' | 'review' | 'teach'
143
+ const {
144
+ allowKeyboardShortcuts = false,
145
+ isDarkMode = false,
146
+ keyboardMode = 'quiz',
147
+ } = defineProps<{
148
+ allowKeyboardShortcuts?: boolean
149
+ isDarkMode?: boolean
150
+ keyboardMode?: 'quiz' | 'review' | 'teach'
151
+ }>()
156
152
 
157
- mounted () {
158
- setTimeout(() => {
159
- const titleEl = this.$refs['uikit-keyboard-modal__title'] as HTMLElement | undefined
160
- titleEl?.focus()
161
- }, 0)
162
- }
153
+ const emit = defineEmits<{
154
+ 'close': []
155
+ 'toggleKeyboardShortcuts': [allowKeyboardShortcuts: boolean]
156
+ }>()
163
157
 
164
- toggleKeyboardShortcuts (newVal: boolean) {
165
- if (newVal !== this.allowKeyboardShortcuts) {
166
- this.emitToggleKeyboardShortcuts(newVal)
167
- }
168
- }
158
+ const titleRef = useTemplateRef<HTMLElement>('uikit-keyboard-modal__title')
169
159
 
170
- @Emit('close')
171
- emitClose () {
172
- return true
173
- }
160
+ onMounted(() => {
161
+ setTimeout(() => {
162
+ titleRef.value?.focus()
163
+ }, 0)
164
+ })
174
165
 
175
- @Emit('toggleKeyboardShortcuts')
176
- emitToggleKeyboardShortcuts (allowKeyboardShortcuts: boolean) {
177
- return allowKeyboardShortcuts
166
+ const toggleKeyboardShortcuts = (newVal: boolean) => {
167
+ if (newVal !== allowKeyboardShortcuts) {
168
+ emitToggleKeyboardShortcuts(newVal)
178
169
  }
179
170
  }
171
+
172
+ const emitClose = () => {
173
+ emit('close')
174
+ }
175
+
176
+ const emitToggleKeyboardShortcuts = (newAllowKeyboardShortcuts: boolean) => {
177
+ emit('toggleKeyboardShortcuts', newAllowKeyboardShortcuts)
178
+ }
180
179
  </script>
181
180
 
182
181
  <style lang="scss">
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="uikit-question-build-list-choices-container-root" @click="clearFocusState">
3
- <!--
3
+ <!--
4
4
  Visually hidden aria-live region for choice move announcements:
5
5
  "Moved Photosynthesis to position 2 of 6."
6
6
  -->
@@ -10,7 +10,7 @@
10
10
  class="uikit-question-build-list-choices-container__announcements"
11
11
  >
12
12
  {{ announcementMessage }}
13
- </div>
13
+ </div>
14
14
  <div
15
15
  class="uikit-question-build-list-choices-container-wrapper"
16
16
  >
@@ -21,11 +21,11 @@
21
21
  tag="ol"
22
22
  class="uikit-question-build-list-choices-container"
23
23
  :class="{
24
- 'uikit-question-build-list-choices-container--correct':
24
+ 'uikit-question-build-list-choices-container--correct':
25
25
  (showBuildListOrder || reviewMode) && isBuildListOrderCorrect,
26
- 'uikit-question-build-list-choices-container--incorrect':
26
+ 'uikit-question-build-list-choices-container--incorrect':
27
27
  (showBuildListOrder || reviewMode) && !isBuildListOrderCorrect,
28
- 'uikit-question-build-list-choices-container--teach-group-review':
28
+ 'uikit-question-build-list-choices-container--teach-group-review':
29
29
  (showBuildListOrder || reviewMode) && isTeachGroupReview,
30
30
  'uikit-question-build-list-choices-container--review-mode': reviewMode,
31
31
  }"
@@ -37,14 +37,14 @@
37
37
  :key="choice.key"
38
38
  class="uikit-question-build-list-choices-container__choice-container"
39
39
  :class="{
40
- 'uikit-question-build-list-choices-container__choice-container--floating':
40
+ 'uikit-question-build-list-choices-container__choice-container--floating':
41
41
  floatingChoiceKey === choice.key
42
42
  }"
43
43
  role="listitem"
44
44
  :aria-label="`Item ${index + 1} of ${orderedChoices.length}: ${stripHtmlTags(choice.text || '')}`"
45
45
  >
46
- <div
47
- v-dark="isDarkMode"
46
+ <div
47
+ v-dark="isDarkMode"
48
48
  v-breakpoint="breakpointsWithEl"
49
49
  class="uikit-question-build-list-choices-container__choice-number"
50
50
  :class="{
@@ -67,16 +67,16 @@
67
67
  @mousedown.prevent
68
68
  :ref="(el) => setCardRef(el, choice.key)"
69
69
  >
70
- <div
70
+ <div
71
71
  v-dark="isDarkMode"
72
- v-breakpoint="breakpointsWithEl"
72
+ v-breakpoint="breakpointsWithEl"
73
73
  class="uikit-question-build-list-choices-container__mobile-choice-number"
74
74
  :class="{
75
- 'uikit-question-build-list-choices-container__mobile-choice-number--correct':
75
+ 'uikit-question-build-list-choices-container__mobile-choice-number--correct':
76
76
  (reviewMode || showBuildListOrder) && isChoiceInCorrectPosition(choice, index),
77
- 'uikit-question-build-list-choices-container__mobile-choice-number--incorrect':
77
+ 'uikit-question-build-list-choices-container__mobile-choice-number--incorrect':
78
78
  (reviewMode || showBuildListOrder) && !isChoiceInCorrectPosition(choice, index),
79
- 'uikit-question-build-list-choices-container__mobile-choice-number--review-mode':
79
+ 'uikit-question-build-list-choices-container__mobile-choice-number--review-mode':
80
80
  reviewMode,
81
81
  }"
82
82
  >
@@ -85,7 +85,7 @@
85
85
  <div v-dark="isDarkMode" class="uikit-question-build-list-choices-container__choice-text">
86
86
  {{ stripHtmlTags(choice.text || '') }}
87
87
  </div>
88
- <div
88
+ <div
89
89
  v-if="reviewMode || showBuildListOrder"
90
90
  class="uikit-question-build-list-choices-container__answer-info"
91
91
  >
@@ -102,7 +102,7 @@
102
102
  v-breakpoint="breakpointsWithEl"
103
103
  class="uikit-question-build-list-choices-container__answer-correct-icon"
104
104
  type="correct"
105
-
105
+
106
106
  />
107
107
  <Icon
108
108
  v-else-if="!isChoiceInCorrectPosition(choice, index) && !reviewMode"
@@ -120,7 +120,7 @@
120
120
  v-dark="isDarkMode"
121
121
  class="uikit-question-build-list-choices-container__choice-up-button"
122
122
  :class="{
123
- 'uikit-question-build-list-choices-container__choice-up-button--disabled':
123
+ 'uikit-question-build-list-choices-container__choice-up-button--disabled':
124
124
  index === 0
125
125
  }"
126
126
  :disabled="index === 0"
@@ -135,7 +135,7 @@
135
135
  <Icon
136
136
  v-dark="isDarkMode"
137
137
  class="uikit-question-build-list-choices-container__up-button-icon"
138
- type="arrow"
138
+ type="arrow"
139
139
  :aria-hidden="true"
140
140
  />
141
141
  </button>
@@ -143,7 +143,7 @@
143
143
  v-dark="isDarkMode"
144
144
  class="uikit-question-build-list-choices-container__choice-down-button"
145
145
  :class="{
146
- 'uikit-question-build-list-choices-container__choice-down-button--disabled':
146
+ 'uikit-question-build-list-choices-container__choice-down-button--disabled':
147
147
  index === orderedChoices.length - 1
148
148
  }"
149
149
  :disabled="index === orderedChoices.length - 1"
@@ -158,7 +158,7 @@
158
158
  <Icon
159
159
  v-dark="isDarkMode"
160
160
  class="uikit-question-build-list-choices-container__down-button-icon"
161
- type="arrow"
161
+ type="arrow"
162
162
  :aria-hidden="true"
163
163
  />
164
164
  </button>
@@ -224,7 +224,7 @@ const prefersReducedMotion = () => {
224
224
  const updateOrderedChoices = () => {
225
225
  // Map the selectedBuildListChoiceOrder keys to full TBuildListChoice objects
226
226
  if (selectedBuildListChoiceOrder.value.length) {
227
- orderedChoices.value = selectedBuildListChoiceOrder.value.map(key =>
227
+ orderedChoices.value = selectedBuildListChoiceOrder.value.map(key =>
228
228
  buildListChoices.value.find(choice => choice.key === key)
229
229
  ).filter(Boolean) as TBuildListChoice[]
230
230
  } else {
@@ -259,7 +259,7 @@ const setFocusedArrowButton = (choiceKey: string, direction: 'up' | 'down') => {
259
259
  const restoreFocusToArrowButton = (choiceKey: string, direction: 'up' | 'down') => {
260
260
  const choiceEl = choiceRefs.value.get(choiceKey)
261
261
  if (choiceEl) {
262
- const buttonSelector = direction === 'up'
262
+ const buttonSelector = direction === 'up'
263
263
  ? '.uikit-question-build-list-choices-container__choice-up-button'
264
264
  : '.uikit-question-build-list-choices-container__choice-down-button'
265
265
  const button = choiceEl.querySelector(buttonSelector) as HTMLButtonElement
@@ -269,7 +269,7 @@ const restoreFocusToArrowButton = (choiceKey: string, direction: 'up' | 'down')
269
269
  } else {
270
270
  // Move focus to opposite button if focused button becomes disabled
271
271
  const oppositeDirection = direction === 'up' ? 'down' : 'up'
272
- const oppositeButtonSelector = oppositeDirection === 'up'
272
+ const oppositeButtonSelector = oppositeDirection === 'up'
273
273
  ? '.uikit-question-build-list-choices-container__choice-up-button'
274
274
  : '.uikit-question-build-list-choices-container__choice-down-button'
275
275
  const oppositeButton = choiceEl.querySelector(oppositeButtonSelector) as HTMLButtonElement
@@ -288,12 +288,12 @@ const restoreFocusAfterMove = (movedChoiceKey: string) => {
288
288
  if (showBuildListOrder.value || reviewMode.value) {
289
289
  return
290
290
  }
291
-
291
+
292
292
  // Don't restore focus to choice element if there's a focused arrow button
293
- if (focusedArrowButton.value && focusedArrowButton.value.choiceKey === movedChoiceKey) {
293
+ if (focusedArrowButton.value?.choiceKey === movedChoiceKey) {
294
294
  return
295
295
  }
296
-
296
+
297
297
  const delay = prefersReducedMotion() ? 0 : 50
298
298
  setTimeout(() => {
299
299
  const choiceEl = choiceRefs.value.get(movedChoiceKey)
@@ -301,7 +301,7 @@ const restoreFocusAfterMove = (movedChoiceKey: string) => {
301
301
  // Temporarily make the choice focusable for animation
302
302
  choiceEl.setAttribute('tabindex', '0')
303
303
  choiceEl.focus()
304
-
304
+
305
305
  // Remove tabindex after animation completes
306
306
  const animationDelay = prefersReducedMotion() ? 0 : 350
307
307
  setTimeout(() => {
@@ -316,7 +316,7 @@ const removeFocusAfterAnimation = (movedChoiceKey: string) => {
316
316
  if (showBuildListOrder.value || reviewMode.value) {
317
317
  return
318
318
  }
319
-
319
+
320
320
  // Only remove focus if the move was NOT triggered by arrow keys
321
321
  // AND there's no focused arrow button that should maintain focus
322
322
  if (!isMoveTriggeredByArrowKey.value && !focusedArrowButton.value) {
@@ -335,7 +335,7 @@ const removeFocusAfterAnimation = (movedChoiceKey: string) => {
335
335
  const announceMove = (choiceText: string, newPosition: number, totalItems: number) => {
336
336
  // Clear previous announcement
337
337
  announcementMessage.value = ''
338
-
338
+
339
339
  // Set new announcement after a brief delay to ensure screen readers pick it up
340
340
  const delay = prefersReducedMotion() ? 0 : 10
341
341
  setTimeout(() => {
@@ -346,31 +346,31 @@ const announceMove = (choiceText: string, newPosition: number, totalItems: numbe
346
346
  const moveChoiceUp = (index: number) => {
347
347
  if (index > 0) {
348
348
  const newChoices = [ ...orderedChoices.value ]
349
- const currentItem = newChoices[ index ]
350
- const previousItem = newChoices[ index - 1 ]
351
-
349
+ const currentItem = newChoices[index]
350
+ const previousItem = newChoices[index - 1]
351
+
352
352
  if (currentItem && previousItem) {
353
353
  // Set move in progress flag
354
354
  isMoveInProgress.value = true
355
-
355
+
356
356
  // Set floating state for the clicked choice
357
357
  floatingChoiceKey.value = currentItem.key
358
-
359
- newChoices[ index ] = previousItem
360
- newChoices[ index - 1 ] = currentItem
358
+
359
+ newChoices[index] = previousItem
360
+ newChoices[index - 1] = currentItem
361
361
  orderedChoices.value = newChoices
362
362
  // Announce the move
363
363
  const choiceText = stripHtmlTags(currentItem.text || '')
364
364
  announceMove(choiceText, index, orderedChoices.value.length)
365
-
365
+
366
366
  // Restore focus to the moved card
367
367
  restoreFocusAfterMove(currentItem.key)
368
-
368
+
369
369
  // Remove focus after animation if not triggered by arrow key
370
370
  removeFocusAfterAnimation(currentItem.key)
371
-
371
+
372
372
  // Restore focus to arrow button if it was previously focused
373
- if (focusedArrowButton.value && focusedArrowButton.value.choiceKey === currentItem.key) {
373
+ if (focusedArrowButton.value?.choiceKey === currentItem.key) {
374
374
  const delay = prefersReducedMotion() ? 0 : 400 // After animation completes
375
375
  setTimeout(() => {
376
376
  const focusedButton = focusedArrowButton.value
@@ -387,7 +387,7 @@ const moveChoiceUp = (index: number) => {
387
387
  isMoveInProgress.value = false
388
388
  }, delay)
389
389
  }
390
-
390
+
391
391
  // Clear floating state after animation completes
392
392
  const animationDelay = prefersReducedMotion() ? 0 : 300
393
393
  setTimeout(() => {
@@ -400,32 +400,32 @@ const moveChoiceUp = (index: number) => {
400
400
  const moveChoiceDown = (index: number) => {
401
401
  if (index < orderedChoices.value.length - 1) {
402
402
  const newChoices = [ ...orderedChoices.value ]
403
- const currentItem = newChoices[ index ]
404
- const nextItem = newChoices[ index + 1 ]
405
-
403
+ const currentItem = newChoices[index]
404
+ const nextItem = newChoices[index + 1]
405
+
406
406
  if (currentItem && nextItem) {
407
407
  // Set move in progress flag
408
408
  isMoveInProgress.value = true
409
-
409
+
410
410
  // Set floating state for the clicked choice
411
411
  floatingChoiceKey.value = currentItem.key
412
-
413
- newChoices[ index ] = nextItem
414
- newChoices[ index + 1 ] = currentItem
412
+
413
+ newChoices[index] = nextItem
414
+ newChoices[index + 1] = currentItem
415
415
  orderedChoices.value = newChoices
416
-
416
+
417
417
  // Announce the move
418
418
  const choiceText = stripHtmlTags(currentItem.text || '')
419
419
  announceMove(choiceText, index + 2, orderedChoices.value.length)
420
-
420
+
421
421
  // Restore focus to the moved card
422
422
  restoreFocusAfterMove(currentItem.key)
423
-
423
+
424
424
  // Remove focus after animation
425
425
  removeFocusAfterAnimation(currentItem.key)
426
-
426
+
427
427
  // Restore focus to arrow button if it was previously focused
428
- if (focusedArrowButton.value && focusedArrowButton.value.choiceKey === currentItem.key) {
428
+ if (focusedArrowButton.value?.choiceKey === currentItem.key) {
429
429
  const delay = prefersReducedMotion() ? 0 : 400 // After animation completes
430
430
  setTimeout(() => {
431
431
  const focusedButton = focusedArrowButton.value
@@ -442,7 +442,7 @@ const moveChoiceDown = (index: number) => {
442
442
  isMoveInProgress.value = false
443
443
  }, delay)
444
444
  }
445
-
445
+
446
446
  // Clear floating state after animation completes
447
447
  const animationDelay = prefersReducedMotion() ? 0 : 300
448
448
  setTimeout(() => {
@@ -451,7 +451,7 @@ const moveChoiceDown = (index: number) => {
451
451
  }
452
452
  }
453
453
  }
454
-
454
+
455
455
  const getCorrectPositionOrderNumber = (choice: TBuildListChoice) => {
456
456
  return Number(choice?.key.substring(1))
457
457
  }
@@ -461,7 +461,7 @@ const isChoiceInCorrectPosition = (choice: TBuildListChoice, currentIndex: numbe
461
461
  if (!correctOrderPosition) {
462
462
  return false
463
463
  }
464
-
464
+
465
465
  const currentOrderPosition = currentIndex + 1
466
466
  return correctOrderPosition === currentOrderPosition
467
467
  }
@@ -496,7 +496,7 @@ watch(orderedChoices, () => {
496
496
 
497
497
  watch(selectedBuildListChoiceOrder, () => {
498
498
  if ((reviewMode.value || showBuildListOrder.value)) {
499
- updateOrderedChoices()
499
+ updateOrderedChoices()
500
500
  }
501
501
  })
502
502
  </script>
@@ -512,7 +512,7 @@ watch(selectedBuildListChoiceOrder, () => {
512
512
  width: 1px;
513
513
  height: 1px;
514
514
  overflow: hidden;
515
- clip: rect(0, 0, 0, 0);
515
+ clip-path: circle(0);
516
516
  white-space: nowrap;
517
517
  }
518
518
 
@@ -564,7 +564,7 @@ watch(selectedBuildListChoiceOrder, () => {
564
564
  margin: 0;
565
565
  max-width: 492px;
566
566
  width: 100%;
567
-
567
+
568
568
  &::after {
569
569
  left: -8px;
570
570
  right: -8px;
@@ -612,11 +612,11 @@ watch(selectedBuildListChoiceOrder, () => {
612
612
  &--floating {
613
613
  transform: translateY(-4px);
614
614
  z-index: 10;
615
-
615
+
616
616
  .uikit-question-build-list-choices-container__choice {
617
617
  outline: 2px solid $brand-blue;
618
618
  outline-offset: 2px;
619
-
619
+
620
620
  &--dark {
621
621
  outline-color: $banana-bread;
622
622
  }
@@ -661,7 +661,7 @@ watch(selectedBuildListChoiceOrder, () => {
661
661
  font-weight: 500;
662
662
  line-height: 23px;
663
663
  letter-spacing: -0.1px;
664
-
664
+
665
665
  &--dark {
666
666
  background-color: $jet;
667
667
  }
@@ -713,13 +713,13 @@ watch(selectedBuildListChoiceOrder, () => {
713
713
  border-radius: 5px;
714
714
  border: 1px solid rgba($pewter, 0.85);
715
715
  background-color: $white;
716
- box-shadow: 0 1px 4px 0 rgba(71, 89, 103, 0.30);
716
+ box-shadow: 0 1px 4px 0 rgb(71, 89, 103, 0.30);
717
717
  outline: none;
718
718
 
719
719
  &--dark {
720
720
  border: 1px solid $slate;
721
721
  background-color: $brand-black;
722
- box-shadow: 0 1px 4px 0 rgba(71, 89, 103, 0.30);
722
+ box-shadow: 0 1px 4px 0 rgb(71, 89, 103, 0.30);
723
723
  }
724
724
 
725
725
  &--mobile {
@@ -793,7 +793,7 @@ watch(selectedBuildListChoiceOrder, () => {
793
793
  background-color: $butterscotch;
794
794
  }
795
795
  }
796
-
796
+
797
797
  &--disabled {
798
798
  opacity: 0.3;
799
799
  cursor: default;
@@ -907,4 +907,4 @@ watch(selectedBuildListChoiceOrder, () => {
907
907
  }
908
908
  }
909
909
  }
910
- </style>
910
+ </style>
@@ -10,13 +10,13 @@
10
10
  v-dark="isDarkMode"
11
11
  class="uikit-question-choices-container__choice-container"
12
12
  :class="{
13
- 'uikit-question-choices-container__choice-container--hover':
13
+ 'uikit-question-choices-container__choice-container--hover':
14
14
  !showAnswers && hoverChoiceKey === choice.key,
15
- 'uikit-question-choices-container__choice-container--focus':
15
+ 'uikit-question-choices-container__choice-container--focus':
16
16
  !showAnswers && focusChoiceKey === choice.key,
17
17
  'uikit-question-choices-container__choice-container--selected': !showAnswers
18
18
  && selectedChoices.includes(choice.key),
19
- 'uikit-question-choices-container__choice-container--correct':
19
+ 'uikit-question-choices-container__choice-container--correct':
20
20
  !isMCR && showAnswers && !isUnanswered && answerKeys.includes(choice.key),
21
21
  'uikit-question-choices-container__choice-container--incorrect': !isMCR && showAnswers
22
22
  && selectedChoices.includes(choice.key)
@@ -87,7 +87,7 @@
87
87
  v-dark="isDarkMode"
88
88
  class="uikit-question-choices-container__mcr-checkbox"
89
89
  :class="{
90
- 'uikit-question-choices-container__mcr-checkbox--selected':
90
+ 'uikit-question-choices-container__mcr-checkbox--selected':
91
91
  selectedChoices.includes(choice.key),
92
92
  'uikit-question-choices-container__mcr-checkbox--answer': showAnswers
93
93
  && answerKeys.includes(choice.key),
@@ -971,4 +971,4 @@ const handleClick = (event: MouseEvent) => {
971
971
  }
972
972
  }
973
973
  }
974
- </style>
974
+ </style>
@@ -100,8 +100,8 @@ const {
100
100
 
101
101
  const explanation = computed(() => {
102
102
  return highlightKeywordsInText({
103
- text: question.value.explanation || '',
104
- keywordDefinitions: keywordDefinitions.value,
103
+ text: question.value.explanation || '',
104
+ keywordDefinitions: keywordDefinitions.value,
105
105
  isDarkMode: isDarkMode.value,
106
106
  location: 'explanation',
107
107
  })
@@ -162,7 +162,7 @@ const toggleDropdownExplanationImageLongAlt = () => {
162
162
  line-height: 24px;
163
163
  font-weight: 400;
164
164
  padding-bottom: 6px;
165
-
165
+
166
166
  .keyword-highlight {
167
167
  span {
168
168
  font-size: 16px;
@@ -212,7 +212,7 @@ const toggleDropdownExplanationImageLongAlt = () => {
212
212
  letter-spacing: -0.1px;
213
213
  line-height: 22px;
214
214
  font-weight: 400;
215
- word-break: break-word;
215
+ overflow-wrap: anywhere;
216
216
  margin-bottom: -7px;
217
217
 
218
218
  &--dark {
@@ -221,4 +221,4 @@ const toggleDropdownExplanationImageLongAlt = () => {
221
221
  }
222
222
  }
223
223
  }
224
- </style>
224
+ </style>
@@ -48,7 +48,7 @@
48
48
  <Icon
49
49
  class="uikit-question-explanation__toggle-explanation-img-description-icon"
50
50
  :class="{
51
- 'uikit-question-explanation__toggle-explanation-img-description-icon--up':
51
+ 'uikit-question-explanation__toggle-explanation-img-description-icon--up':
52
52
  showExplanationImageLongAlt,
53
53
  }"
54
54
  type="accordionArrow"
@@ -121,8 +121,8 @@ const {
121
121
 
122
122
  const explanation = computed(() => {
123
123
  return highlightKeywordsInText({
124
- text: question.value.explanation || '',
125
- keywordDefinitions: keywordDefinitions.value,
124
+ text: question.value.explanation || '',
125
+ keywordDefinitions: keywordDefinitions.value,
126
126
  isDarkMode: isDarkMode.value,
127
127
  location: 'explanation',
128
128
  })
@@ -223,7 +223,7 @@ const toggleExplanation = () => {
223
223
  letter-spacing: -0.1px;
224
224
  line-height: 26px;
225
225
  margin-bottom: 24px;
226
- word-break: break-word;
226
+ overflow-wrap: anywhere;
227
227
 
228
228
  .keyword-highlight {
229
229
  span {
@@ -316,7 +316,7 @@ const toggleExplanation = () => {
316
316
  letter-spacing: -0.1px;
317
317
  line-height: 22px;
318
318
  font-weight: 600;
319
- word-break: break-word;
319
+ overflow-wrap: anywhere;
320
320
 
321
321
  &--dark {
322
322
  color: $white;
@@ -337,4 +337,4 @@ const toggleExplanation = () => {
337
337
  }
338
338
 
339
339
  }
340
- </style>
340
+ </style>