@pocketprep/ui-kit 3.9.5 → 3.9.6

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.
@@ -75,6 +75,8 @@ import IconReadiness from './IconReadiness.vue'
75
75
  import IconConcept from './IconConcept.vue'
76
76
  import IconStar from './IconStar.vue'
77
77
  import IconRecommendedFilter from './IconRecommendedFilter.vue'
78
+ import IconTutorChat from './IconTutorChat.vue'
79
+ import IconMinimize from './IconMinimize.vue'
78
80
 
79
81
  withDefaults(defineProps<{
80
82
  type?: TIconType
@@ -175,4 +177,6 @@ withDefaults(defineProps<{
175
177
  <IconConcept v-else-if="type === 'concept'" :title="title" />
176
178
  <IconStar v-else-if="type === 'star'" :title="title" />
177
179
  <IconRecommendedFilter v-else-if="type === 'recommendedFilter'" :title="title" />
180
+ <IconTutorChat v-else-if="type === 'tutorChat'" :title="title" />
181
+ <IconMinimize v-else-if="type === 'minimize'" :title="title" />
178
182
  </template>
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+
3
+ const { title } = defineProps<{
4
+ title: string
5
+ }>()
6
+ </script>
7
+
8
+ <template>
9
+ <!-- eslint-disable -->
10
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="2" viewBox="0 0 18 2" fill="none">
11
+ <title>{{ title }}</title>
12
+ <rect width="18" height="2" rx="1" fill="currentColor"/>
13
+ </svg>
14
+ <!-- eslint-enable -->
15
+ </template>
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+
3
+ const { title } = defineProps<{
4
+ title: string
5
+ }>()
6
+ </script>
7
+
8
+ <template>
9
+ <!-- eslint-disable -->
10
+ <svg width="29" height="27" viewBox="0 0 29 27" fill="none" xmlns="http://www.w3.org/2000/svg">
11
+ <title>{{ title }}</title>
12
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.12891 5.12988C2.04554 5.40534 2 5.69733 2 6V17C2 18.6569 3.34315 20 5 20H7V22L9.5 20H16.7695L19.3535 22H10L5 27V22C2.23858 22 1.12748e-07 19.7614 0 17V8C0 6.64624 0.89708 5.50326 2.12891 5.12988Z" fill="currentColor"/>
13
+ <path d="M26 1H8C6.89543 1 6 1.89543 6 3V14C6 15.1046 6.89543 16 8 16H17.3203L17.5811 16.1865L23 20.0566V16H26C27.1046 16 28 15.1046 28 14V3C28 1.89543 27.1046 1 26 1Z" stroke="currentColor" stroke-width="2"/>
14
+ </svg>
15
+ <!-- eslint-enable -->
16
+ </template>
@@ -74,3 +74,5 @@ export type TIconType =
74
74
  | 'concept'
75
75
  | 'star'
76
76
  | 'recommendedFilter'
77
+ | 'tutorChat'
78
+ | 'minimize'
@@ -132,7 +132,10 @@
132
132
  v-breakpoint="breakpointsWithEl"
133
133
  type="tertiary-small"
134
134
  class="uikit-question-choices-container__toggle-explanation"
135
- :class="{ 'uikit-question-choices-container__toggle-explanation--review-mode': reviewMode }"
135
+ :class="{
136
+ 'uikit-question-choices-container__toggle-explanation--review-mode': reviewMode,
137
+ 'uikit-question-choices-container__toggle-explanation--right-side-bar-open': showRightSideBar,
138
+ }"
136
139
  :is-dark-mode="isDarkMode"
137
140
  :aria-expanded="showExplanation ? 'true' : 'false'"
138
141
  @click.stop="toggleChoiceExplanation"
@@ -317,6 +320,7 @@ const {
317
320
  passageImageUrl,
318
321
  isCorrect,
319
322
  breakpointsWithEl,
323
+ showRightSideBar,
320
324
  } = useQuestionContext()
321
325
 
322
326
  const emitChoiceFocusIn = (choiceKey: TChoiceKey) => {
@@ -725,6 +729,10 @@ const handleClick = (event: MouseEvent) => {
725
729
  &--mobile {
726
730
  display: block;
727
731
  }
732
+
733
+ &--tablet-landscape#{&}--right-side-bar-open {
734
+ display: block;
735
+ }
728
736
  }
729
737
 
730
738
  &__toggle-explanation-text {
@@ -739,6 +747,10 @@ const handleClick = (event: MouseEvent) => {
739
747
  display: initial;
740
748
  }
741
749
 
750
+ &--tablet-landscape#{&}--right-side-bar-open {
751
+ display: initial;
752
+ }
753
+
742
754
  &--up {
743
755
  transform: rotate(180deg);
744
756
  }
@@ -4,7 +4,8 @@
4
4
  ref="uikit-question-dropdown-explanation"
5
5
  class="uikit-question-dropdown-explanation__dropdown-explanation"
6
6
  :class="{
7
- 'uikit-question-dropdown-explanation__dropdown-explanation--show-stats': globalMetrics
7
+ 'uikit-question-dropdown-explanation__dropdown-explanation--show-stats': globalMetrics,
8
+ 'uikit-question-dropdown-explanation__dropdown-explanation--right-side-bar-open': showRightSideBar,
8
9
  }"
9
10
  >
10
11
  <slot name="explanationTopExperiment"></slot>
@@ -96,6 +97,7 @@ const {
96
97
  isDarkMode,
97
98
  breakpointsWithEl,
98
99
  keywordDefinitions,
100
+ showRightSideBar,
99
101
  } = useQuestionContext()
100
102
 
101
103
  const explanation = computed(() => {
@@ -124,6 +126,10 @@ const toggleDropdownExplanationImageLongAlt = () => {
124
126
  display: block;
125
127
  }
126
128
 
129
+ &--tablet-landscape#{&}--right-side-bar-open {
130
+ display: block;
131
+ }
132
+
127
133
  &--show-stats {
128
134
  padding-bottom: 23px;
129
135
  padding-right: 66px;
@@ -147,7 +147,7 @@ const toggleExplanation = () => {
147
147
  border: 1px solid rgba($pewter, 0.85);
148
148
  border-bottom: 0;
149
149
  border-radius: 6px 6px 0 0;
150
- padding: 42px 60px 72px;
150
+ padding: 44px 34px 72px;
151
151
  box-sizing: border-box;
152
152
  max-width: 565px;
153
153
  min-height: 100%;
@@ -85,5 +85,6 @@ export const useQuestionContext = () => {
85
85
  selectedMPMCChoices: inject(InjectionKeys.selectedMPMCChoicesKey, ref([])),
86
86
  selectedBuildListChoiceOrder: inject(InjectionKeys.selectedBuildListChoiceOrderKey, ref([])),
87
87
  isTeachGroupReview: inject(InjectionKeys.isTeachGroupReviewKey, ref(false)),
88
+ showRightSideBar: inject(InjectionKeys.showRightSideBarKey, ref(false)),
88
89
  }
89
90
  }
@@ -84,3 +84,4 @@ export const selectedMatrixChoicesKey = Symbol('selectedMatrixChoices') as Injec
84
84
  export const selectedMPMCChoicesKey = Symbol('selectedMPMCChoices') as InjectionKey<Ref<TChoiceKey[]>>
85
85
  export const selectedBuildListChoiceOrderKey = Symbol('selectedBuildListChoiceOrder') as InjectionKey<Ref<TBuildListChoiceKey[]>>
86
86
  export const isTeachGroupReviewKey = Symbol('isTeachGroupReview') as InjectionKey<Ref<boolean>>
87
+ export const showRightSideBarKey = Symbol('showRightSideBar') as InjectionKey<Ref<boolean>>
@@ -35,6 +35,7 @@
35
35
  'uikit-question__main--matrix-question-review-mode': isMatrixQuestion && reviewMode,
36
36
  'uikit-question__main--mpmc-question-review-mode': isMPMCQuestion && reviewMode,
37
37
  'uikit-question__main--build-list-question-review-mode': isBuildListQuestion && reviewMode,
38
+ 'uikit-question__main--right-side-bar-open': showRightSideBar,
38
39
  }"
39
40
  >
40
41
  <div v-if="!showPassageAndImage && !showExplanation && !showPaywall">
@@ -421,6 +422,7 @@
421
422
  'uikit-question__right-side--explanation': showExplanation && !showPaywall,
422
423
  'uikit-question__right-side--matrix-question-review-mode': isMatrixQuestion && reviewMode,
423
424
  'uikit-question__right-side--mpmc-question-review-mode': isMPMCQuestion && reviewMode,
425
+ 'uikit-question__right-side--right-side-bar-open': showRightSideBar,
424
426
  }"
425
427
  >
426
428
  <PassageAndImage
@@ -513,6 +515,7 @@ const props = withDefaults(defineProps<{
513
515
  isTeachReview?: boolean
514
516
  isTeachGroupReview?: boolean
515
517
  keywordDefinitions?: { keyword: string; definition: string }[]
518
+ showRightSideBar?: boolean
516
519
  }>(), {
517
520
  questionNumber: undefined,
518
521
  quizLength: undefined,
@@ -541,6 +544,7 @@ const props = withDefaults(defineProps<{
541
544
  isTeachReview: false,
542
545
  isTeachGroupReview: false,
543
546
  keywordDefinitions: () => [],
547
+ showRightSideBar: false,
544
548
  })
545
549
 
546
550
  const emit = defineEmits<{
@@ -575,6 +579,7 @@ const hideReferences = computed(() => props.hideReferences)
575
579
  const keywordDefinitions = computed(() => props.keywordDefinitions)
576
580
  const showPaywall = computed(() => props.showPaywall)
577
581
  const isTeachGroupReview = computed(() => props.isTeachGroupReview)
582
+ const showRightSideBar = computed(() => props.showRightSideBar)
578
583
  const hoverChoiceKey = ref<TChoiceKey | null>(null)
579
584
  const focusChoiceKey = ref<TChoiceKey | null>(null)
580
585
  const choiceStrikes = ref<TChoiceKey[]>([])
@@ -1746,6 +1751,7 @@ provide(InjectionKeys.buildListChoiceScoresKey, buildListChoiceScores)
1746
1751
  provide(InjectionKeys.isBuildListOrderCorrectKey, isBuildListOrderCorrect)
1747
1752
  provide(InjectionKeys.selectedBuildListChoiceOrderKey, selectedBuildListChoiceOrder)
1748
1753
  provide(InjectionKeys.isTeachGroupReviewKey, isTeachGroupReview)
1754
+ provide(InjectionKeys.showRightSideBarKey, showRightSideBar)
1749
1755
  </script>
1750
1756
 
1751
1757
  <style lang="scss">
@@ -1810,11 +1816,15 @@ provide(InjectionKeys.isTeachGroupReviewKey, isTeachGroupReview)
1810
1816
  width: 51%;
1811
1817
  }
1812
1818
 
1813
- &--show-side#{&}--tablet-landscape:not(&--tablet-portrait) {
1819
+ &--show-side#{&}--tablet-landscape:not(&--tablet-portrait):not(&--right-side-bar-open) {
1814
1820
  width: 50%;
1815
1821
  padding-right: 36px;
1816
1822
  }
1817
1823
 
1824
+ &--right-side-bar-open#{&}--tablet-landscape:not(&--tablet-portrait) {
1825
+ width: 100%
1826
+ }
1827
+
1818
1828
  &--unanswered#{&}--mobile,
1819
1829
  &--mcr#{&}--mobile {
1820
1830
  display: inline-block;
@@ -1858,6 +1868,10 @@ provide(InjectionKeys.isTeachGroupReviewKey, isTeachGroupReview)
1858
1868
  display: none;
1859
1869
  }
1860
1870
 
1871
+ &--tablet-landscape#{&}--right-side-bar-open {
1872
+ display: none;
1873
+ }
1874
+
1861
1875
  &--matrix-question-review-mode#{&}--tablet-landscape,
1862
1876
  &--mpmc-question-review-mode#{&}--tablet-landscape {
1863
1877
  display: none;
@@ -14,7 +14,11 @@
14
14
  >
15
15
  <slot name="header" />
16
16
  </div>
17
- <div class="uikit-quiz-container__main" :style="customMainStyles">
17
+ <div
18
+ class="uikit-quiz-container__main"
19
+ :class="{ 'uikit-quiz-container__main--right-side-bar-open': showRightSideBar }"
20
+ :style="customMainStyles"
21
+ >
18
22
  <div
19
23
  v-if="showSide"
20
24
  v-breakpoint="{ containerEl: quizContainerEl }"
@@ -24,6 +28,14 @@
24
28
  <slot name="definition"></slot>
25
29
  <slot name="side" />
26
30
  </div>
31
+ <div
32
+ v-if="showRightSideBar"
33
+ v-breakpoint="{ containerEl: quizContainerEl }"
34
+ v-dark="isDarkMode"
35
+ class="uikit-quiz-container__right-side"
36
+ >
37
+ <slot name="rightSide" />
38
+ </div>
27
39
  <div
28
40
  v-breakpoint="{ containerEl: quizContainerEl }"
29
41
  class="uikit-quiz-container__question"
@@ -53,12 +65,14 @@ import { dark as vDark, breakpoint as vBreakpoint } from '../../directives'
53
65
 
54
66
  withDefaults(defineProps<{
55
67
  showSide?: boolean
68
+ showRightSideBar?: boolean
56
69
  isDarkMode?: boolean
57
70
  customHeaderStyles?: Record<string, string>
58
71
  customMainStyles?: Record<string, string>
59
72
  customFooterStyles?: Record<string, string>
60
73
  }>(), {
61
74
  showSide: false,
75
+ showRightSideBar: false,
62
76
  isDarkMode: false,
63
77
  customHeaderStyles: () => ({}),
64
78
  customMainStyles: () => ({}),
@@ -90,14 +104,14 @@ onMounted(() => {
90
104
  flex-direction: column;
91
105
  height: 100%;
92
106
  background-color: $brand-black;
93
- padding: 0 65px;
107
+ padding: 0 34px;
94
108
 
95
109
  &--desktop {
96
- padding: 0 22px 0 23px;
110
+ padding: 0 18px;
97
111
  }
98
112
 
99
113
  &--tablet-portrait {
100
- padding: 0 19px;
114
+ padding: 0 18px;
101
115
  }
102
116
 
103
117
  &--mobile {
@@ -141,6 +155,14 @@ onMounted(() => {
141
155
  }
142
156
  }
143
157
 
158
+ &--mobile &__main--right-side-bar-open {
159
+ flex-direction: column;
160
+
161
+ .uikit-quiz-container__question {
162
+ display: none;
163
+ }
164
+ }
165
+
144
166
  &__side {
145
167
  background-color: $black-feather;
146
168
  color: $white;
@@ -167,6 +189,31 @@ onMounted(() => {
167
189
  }
168
190
  }
169
191
 
192
+ &__right-side {
193
+ background-color: $black-feather;
194
+ color: $white;
195
+ width: 350px;
196
+ height: 100%;
197
+ margin-left: 18px;
198
+ border-radius: 6px;
199
+ order: 1;
200
+
201
+ &--dark {
202
+ background-color: $evening;
203
+ }
204
+
205
+ &--tablet-portrait {
206
+ width: 290px;
207
+ }
208
+
209
+ &--mobile {
210
+ width: 100%;
211
+ margin-left: 0;
212
+ flex: 1;
213
+ min-width: 0;
214
+ }
215
+ }
216
+
170
217
  &__question {
171
218
  position: relative;
172
219
  background-color: $gray-background;
@@ -174,6 +221,7 @@ onMounted(() => {
174
221
  box-shadow: 0 -2px 8px 0 rgba($brand-black, 0.15);
175
222
  flex: 1;
176
223
  height: 100%;
224
+ order: 0;
177
225
 
178
226
  &--show-side#{&}--tablet-landscape {
179
227
  border-radius: 0 6px 6px 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/ui-kit",
3
- "version": "3.9.5",
3
+ "version": "3.9.6",
4
4
  "description": "Pocket Prep UI Kit",
5
5
  "author": "pocketprep",
6
6
  "scripts": {