@pocketprep/ui-kit 3.4.90 → 3.5.1

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 (88) hide show
  1. package/README.md +2 -2
  2. package/dist/@pocketprep/ui-kit.css +1 -0
  3. package/dist/@pocketprep/ui-kit.js +16490 -18228
  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 +43 -12
  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 +23 -21
  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 +99 -132
  51. package/lib/components/Quiz/Question/DropdownExplanation.vue +41 -55
  52. package/lib/components/Quiz/Question/Explanation.vue +49 -59
  53. package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +208 -226
  54. package/lib/components/Quiz/Question/MatrixRadioGroup.vue +7 -6
  55. package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +315 -320
  56. package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +14 -11
  57. package/lib/components/Quiz/Question/PassageAndImage.vue +34 -45
  58. package/lib/components/Quiz/Question/PassageAndImageDropdown.vue +39 -49
  59. package/lib/components/Quiz/Question/Paywall.vue +30 -41
  60. package/lib/components/Quiz/Question/QuestionContext.vue +24 -33
  61. package/lib/components/Quiz/Question/StatsSummary.vue +12 -22
  62. package/lib/components/Quiz/Question/Summary.vue +56 -66
  63. package/lib/components/Quiz/Question/composables.ts +71 -0
  64. package/lib/components/Quiz/Question/injectionSymbols.ts +69 -0
  65. package/lib/components/Quiz/Question.vue +810 -1009
  66. package/lib/components/Quiz/QuizContainer.vue +63 -67
  67. package/lib/components/Quiz/QuizProgress.vue +73 -77
  68. package/lib/components/Quiz/QuizProgressBar.vue +3 -2
  69. package/lib/components/Quiz/question.d.ts +4 -4
  70. package/lib/components/Search/Pill.vue +2 -2
  71. package/lib/components/Search/Search.vue +2 -2
  72. package/lib/components/SidePanels/SidePanel.vue +8 -3
  73. package/lib/components/Tables/Table.vue +4 -3
  74. package/lib/components/Tables/TableActions.vue +3 -3
  75. package/lib/components/Tags/Tag.vue +2 -2
  76. package/lib/components/Toasts/Toast.vue +5 -3
  77. package/lib/components/Tooltips/OverflowTooltip.vue +2 -2
  78. package/lib/components/Tooltips/Tooltip.vue +2 -2
  79. package/lib/directives.ts +28 -23
  80. package/lib/pocketprep-export.module.scss +3 -2
  81. package/lib/pocketprep.scss +2 -2
  82. package/lib/styles/_breakpoints.scss +12 -24
  83. package/lib/styles/_colors.scss +0 -1
  84. package/package.json +38 -29
  85. package/stylelint.config.js +38 -0
  86. package/.eslintrc.cjs +0 -74
  87. package/dist/style.css +0 -1
  88. package/stylelint.config.cjs +0 -22
@@ -50,7 +50,8 @@ export default class ToggleSwitch extends Vue {
50
50
  </script>
51
51
 
52
52
  <style lang="scss">
53
- @import '../../styles/colors';
53
+ @use 'sass:color';
54
+ @use '@/styles/colors' as *;
54
55
 
55
56
  .uikit-toggle-switch {
56
57
  background-color: $steel;
@@ -104,7 +105,7 @@ export default class ToggleSwitch extends Vue {
104
105
  background-color: $brand-blue;
105
106
 
106
107
  &:hover {
107
- background-color: darken($brand-blue, 10%);
108
+ background-color: color.adjust($brand-blue, $lightness: -10%);
108
109
  }
109
110
 
110
111
  &--dark {
@@ -48,6 +48,7 @@ import Blob from '../Blobs/Blob.vue'
48
48
  import { dark } from '../../directives'
49
49
 
50
50
  @Component({
51
+ name: 'EmptyState',
51
52
  components: {
52
53
  Icon,
53
54
  Blob,
@@ -117,8 +118,8 @@ export default class EmptyState extends Vue {
117
118
  </script>
118
119
 
119
120
  <style lang="scss">
120
- @import '../../styles/colors';
121
- @import '../../styles/breakpoints';
121
+ @use '@/styles/breakpoints' as *;
122
+ @use '@/styles/colors' as *;
122
123
 
123
124
  .uikit-empty-state {
124
125
  text-align: center;
@@ -110,8 +110,8 @@ export default class ExamCard extends Vue {
110
110
  </script>
111
111
 
112
112
  <style lang="scss">
113
- @import '../../styles/colors';
114
- @import '../../styles/breakpoints';
113
+ @use '@/styles/breakpoints' as *;
114
+ @use '@/styles/colors' as *;
115
115
 
116
116
  .uikit-exam-card {
117
117
  position: relative;
@@ -135,7 +135,7 @@ export default class ExamCard extends Vue {
135
135
  width: 340px;
136
136
  }
137
137
 
138
- &:not(&--cancel):not(&--disable-interaction) {
138
+ &:not(&--cancel, &--disable-interaction) {
139
139
  cursor: pointer;
140
140
 
141
141
  &:hover,
@@ -76,8 +76,8 @@ export default class ExamMenuCard extends Vue {
76
76
  </script>
77
77
 
78
78
  <style lang="scss">
79
- @import '../../styles/colors';
80
- @import '../../styles/breakpoints';
79
+ @use '@/styles/breakpoints' as *;
80
+ @use '@/styles/colors' as *;
81
81
 
82
82
  .uikit-exam-menu-card {
83
83
  display: flex;
@@ -152,8 +152,8 @@ export default class FilterDropdown extends Vue {
152
152
  </script>
153
153
 
154
154
  <style lang="scss">
155
- @import '../../styles/colors';
156
- @import '../../styles/breakpoints';
155
+ @use '@/styles/breakpoints' as *;
156
+ @use '@/styles/colors' as *;
157
157
 
158
158
  .uikit-filter {
159
159
  position: relative;
@@ -200,8 +200,8 @@ export default class FilterOptions extends Vue {
200
200
  </script>
201
201
 
202
202
  <style lang="scss">
203
- @import '../../styles/colors';
204
- @import '../../styles/breakpoints';
203
+ @use '@/styles/breakpoints' as *;
204
+ @use '@/styles/colors' as *;
205
205
 
206
206
  .filter-options {
207
207
  background: $white;
@@ -73,8 +73,8 @@ export default class Checkbox extends Vue {
73
73
  </script>
74
74
 
75
75
  <style lang="scss">
76
- @import '../../styles/colors';
77
- @import '../../styles/breakpoints';
76
+ @use '@/styles/breakpoints' as *;
77
+ @use '@/styles/colors' as *;
78
78
 
79
79
  .uikit-checkbox {
80
80
  background: $white;
@@ -70,8 +70,8 @@ export default class CheckboxOption extends Vue {
70
70
  </script>
71
71
 
72
72
  <style lang="scss">
73
- @import '../../styles/breakpoints';
74
- @import '../../styles/colors';
73
+ @use '@/styles/breakpoints' as *;
74
+ @use '@/styles/colors' as *;
75
75
 
76
76
  .uikit-checkbox-option {
77
77
  font-size: 15px;
@@ -55,8 +55,8 @@ export default class Errors extends Vue {
55
55
  </script>
56
56
 
57
57
  <style lang="scss">
58
- @import '../../styles/colors';
59
- @import '../../styles/breakpoints';
58
+ @use '@/styles/breakpoints' as *;
59
+ @use '@/styles/colors' as *;
60
60
 
61
61
  .uikit-errors {
62
62
  border: 1px solid rgba($red-pegasus, 0.5);
@@ -146,8 +146,8 @@ export default class Input extends Vue {
146
146
  </script>
147
147
 
148
148
  <style lang="scss">
149
- @import '../../styles/colors';
150
- @import '../../styles/breakpoints';
149
+ @use '@/styles/breakpoints' as *;
150
+ @use '@/styles/colors' as *;
151
151
 
152
152
  .uikit-input {
153
153
  &__input {
@@ -35,7 +35,7 @@
35
35
  'uikit-radio__item--has-helper-text': !!(item.helperText)
36
36
  }"
37
37
  role="radio"
38
- :aria-checked="modelValue && item.value === modelValue.value"
38
+ :aria-checked="!!modelValue && item.value === modelValue.value"
39
39
  :aria-label="`${item.label}${ item.helperText ? ` ${item.helperText}` : '' }`"
40
40
  @click="!(disabled || item.disabled ) && selectItem(item)"
41
41
  @keydown.enter.space="keyPressedItem"
@@ -66,59 +66,57 @@
66
66
  </div>
67
67
  </template>
68
68
 
69
- <script lang="ts">
70
- import { Component, Vue, Prop, Emit } from 'vue-facing-decorator'
71
- import { dark } from '../../directives'
69
+ <script setup lang="ts">
70
+ import { ref } from 'vue'
71
+ import { dark as vDark } from '../../directives'
72
72
  import RadioButton from './RadioButton.vue'
73
73
 
74
74
  interface IItem {
75
- value: string
76
- label: string
75
+ value: string | number
76
+ label?: string
77
77
  helperText?: string
78
78
  disabled?: boolean
79
79
  }
80
80
 
81
- @Component({
82
- components: {
83
- RadioButton,
84
- },
85
- directives: {
86
- dark,
87
- },
81
+ const props = withDefaults(defineProps<{
82
+ label?: string
83
+ data: IItem[]
84
+ center?: boolean
85
+ modelValue: IItem | null
86
+ disabled?: boolean
87
+ isDarkMode?: boolean
88
+ labelledBy?: string | false
89
+ }>(), {
90
+ label: '',
91
+ isDarkMode: false,
92
+ labelledBy: false,
88
93
  })
89
- export default class Radio extends Vue {
90
- @Prop() label?: string
91
- @Prop() data!: IItem[]
92
- @Prop() center?: boolean
93
- @Prop() modelValue!: IItem
94
- @Prop() disabled?: boolean
95
- @Prop({ default: false }) isDarkMode!: boolean
96
- @Prop({ default: false }) labelledBy!: string | false
97
-
98
- uid = Math.floor(Math.random() * 1e9)
99
- hover = false
100
- focus = false
101
94
 
102
- @Emit('update:modelValue')
103
- selectItem (item: IItem) {
104
- return item
105
- }
95
+ const emit = defineEmits<{
96
+ 'update:modelValue': [ item: IItem ]
97
+ }>()
106
98
 
107
- keyPressedItem (e: KeyboardEvent) {
108
- // select option on enter or space
109
- if (e.key === 'Enter' || e.key === ' ') {
110
- e.preventDefault()
111
- const itemValue = (e.target as HTMLElement).getAttribute('data-value')
112
- const item = this.data.find(i => String(i.value) === itemValue)
113
- item && this.selectItem(item)
114
- }
99
+ const uid = Math.floor(Math.random() * 1e9)
100
+ const hover = ref(false)
101
+
102
+ const selectItem = (item: IItem) => {
103
+ emit('update:modelValue', item)
104
+ }
105
+
106
+ const keyPressedItem = (e: KeyboardEvent) => {
107
+ // select option on enter or space
108
+ if (e.key === 'Enter' || e.key === ' ') {
109
+ e.preventDefault()
110
+ const itemValue = (e.target as HTMLElement).getAttribute('data-value')
111
+ const item = props.data.find(i => String(i.value) === itemValue)
112
+ item && selectItem(item)
115
113
  }
116
114
  }
117
115
  </script>
118
116
 
119
117
  <style lang="scss">
120
- @import '../../styles/colors';
121
- @import '../../styles/breakpoints';
118
+ @use '@/styles/breakpoints' as *;
119
+ @use '@/styles/colors' as *;
122
120
 
123
121
  .uikit-radio {
124
122
  &__label {
@@ -23,7 +23,7 @@ defineProps<{
23
23
  </template>
24
24
 
25
25
  <style lang="scss" scoped>
26
- @import '../../styles/colors';
26
+ @use '@/styles/colors' as *;
27
27
 
28
28
  .uikit-radio-btn {
29
29
  width: 18px;
@@ -163,6 +163,7 @@ interface IItem {
163
163
  * @see [Designs for Inputs](https://marvelapp.com/adf8ab3/screen/70331421)
164
164
  */
165
165
  @Component({
166
+ name: 'PocketSelect',
166
167
  components: {
167
168
  Icon,
168
169
  },
@@ -447,8 +448,8 @@ export default class Select extends Vue {
447
448
  </script>
448
449
 
449
450
  <style lang="scss">
450
- @import '../../styles/colors';
451
- @import '../../styles/breakpoints';
451
+ @use '@/styles/breakpoints' as *;
452
+ @use '@/styles/colors' as *;
452
453
 
453
454
  .uikit-select {
454
455
  position: relative;
@@ -595,13 +596,13 @@ export default class Select extends Vue {
595
596
  margin: 4px 0 0 0;
596
597
 
597
598
  &--dark {
598
- &--hover {
599
- background-color: $charcoal;
600
- }
601
-
602
599
  border-color: $pewter;
603
600
  color: $fog;
604
601
  caret-color: $banana-bread;
602
+
603
+ &--hover {
604
+ background-color: $charcoal;
605
+ }
605
606
  }
606
607
  }
607
608
 
@@ -100,8 +100,8 @@ export default class Textarea extends Vue {
100
100
  </script>
101
101
 
102
102
  <style lang="scss">
103
- @import '../../styles/colors';
104
- @import '../../styles/breakpoints';
103
+ @use '@/styles/breakpoints' as *;
104
+ @use '@/styles/colors' as *;
105
105
 
106
106
  .uikit-textarea {
107
107
  &__container {
@@ -148,6 +148,7 @@ import IconPresent from './IconPresent.vue'
148
148
  import IconLink from './IconLink.vue'
149
149
 
150
150
  @Component({
151
+ name: 'Icon',
151
152
  components: {
152
153
  IconAdd,
153
154
  IconEdit,
@@ -14,8 +14,10 @@
14
14
  <script lang="ts">
15
15
  import { Component, Vue, Prop } from 'vue-facing-decorator'
16
16
 
17
- @Component
17
+ @Component({
18
+ name: 'IconEdit',
19
+ })
18
20
  export default class IconEdit extends Vue {
19
21
  @Prop() title!: string
20
22
  }
21
- </script>
23
+ </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <!-- eslint-disable -->
3
3
  <svg width="28px" height="20px" viewBox="0 0 28 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4
- <title>icon/full view toggle active</title>
4
+ <title>{{ title }}</title>
5
5
  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6
6
  <g transform="translate(-50.000000, -9.000000)">
7
7
  <g transform="translate(52.000000, 10.500000)">
@@ -15,7 +15,7 @@ export default class IconLoading2 extends Vue {
15
15
  </script>
16
16
 
17
17
  <style lang="scss">
18
- @import '../../styles/colors';
18
+ @use '@/styles/colors' as *;
19
19
 
20
20
  .uikit-loading {
21
21
  height: 100%;
@@ -40,12 +40,10 @@ export default class IconLoading2 extends Vue {
40
40
 
41
41
  @keyframes spin {
42
42
  from {
43
- -webkit-transform: rotate(0deg);
44
43
  transform: rotate(0deg);
45
44
  }
46
45
 
47
46
  to {
48
- -webkit-transform: rotate(359deg);
49
47
  transform: rotate(359deg);
50
48
  }
51
49
  }
@@ -12,8 +12,8 @@ export default class SkeletonLoader extends Vue {}
12
12
  </script>
13
13
 
14
14
  <style lang="scss" scoped>
15
- @import '../../styles/breakpoints';
16
- @import '../../styles/colors';
15
+ @use '@/styles/breakpoints' as *;
16
+ @use '@/styles/colors' as *;
17
17
 
18
18
  .uikit-skeleton-loader {
19
19
  // Using width and height of parent
@@ -14,8 +14,8 @@ defineProps<{
14
14
  </template>
15
15
 
16
16
  <style lang="scss" scoped>
17
- @import '../../styles/breakpoints';
18
- @import '../../styles/colors';
17
+ @use '@/styles/breakpoints' as *;
18
+ @use '@/styles/colors' as *;
19
19
 
20
20
  .info-message {
21
21
  padding: 11px 16px;
@@ -51,8 +51,8 @@ export default class Modal extends Vue {
51
51
  </script>
52
52
 
53
53
  <style lang="scss">
54
- @import '../../styles/colors';
55
- @import '../../styles/breakpoints';
54
+ @use '@/styles/breakpoints' as *;
55
+ @use '@/styles/colors' as *;
56
56
 
57
57
  .uikit-modal {
58
58
  border-radius: 12px;
@@ -163,8 +163,8 @@ export default class ModalContainer extends Vue {
163
163
  </script>
164
164
 
165
165
  <style lang="scss">
166
- @import '../../styles/colors';
167
- @import '../../styles/breakpoints';
166
+ @use '@/styles/breakpoints' as *;
167
+ @use '@/styles/colors' as *;
168
168
 
169
169
  .uikit-modal-container {
170
170
  position: absolute;
@@ -84,7 +84,7 @@ export default class EmailAuth extends Vue {
84
84
  }
85
85
  }
86
86
 
87
- async submitSignIn () {
87
+ submitSignIn () {
88
88
  this.isLoading = true
89
89
  this.errorMessage = ''
90
90
 
@@ -99,7 +99,7 @@ export default class EmailAuth extends Vue {
99
99
  this.isLoading = false
100
100
  }
101
101
 
102
- async resendEmail () {
102
+ resendEmail () {
103
103
  this.errorMessage = ''
104
104
  this.isResending = true
105
105
  this.emitResend({ email: this.email })
@@ -107,7 +107,7 @@ export default class EmailAuth extends Vue {
107
107
  }
108
108
 
109
109
  @Emit('submit')
110
- emitSubmit (results: { email: string; code: string}) {
110
+ emitSubmit (results: { email: string; code: string }) {
111
111
  return results
112
112
  }
113
113
 
@@ -124,8 +124,8 @@ export default class EmailAuth extends Vue {
124
124
  </script>
125
125
 
126
126
  <style lang="scss">
127
- @import '../../styles/colors';
128
- @import '../../styles/breakpoints';
127
+ @use '@/styles/breakpoints' as *;
128
+ @use '@/styles/colors' as *;
129
129
 
130
130
  .uikit-email-auth {
131
131
  &__form {
@@ -42,8 +42,8 @@ export default class MagicCodeEntry extends Vue {
42
42
  mounted () {
43
43
  // Ensure proper letter spacing for magic code in case of a11y browser extension overrides
44
44
  setTimeout(() => {
45
- const codeInputEl = document.querySelector('.uikit-magic-code__code-input') as HTMLElement | null
46
- if (codeInputEl) {
45
+ const codeInputEl = document.querySelector('.uikit-magic-code__code-input')
46
+ if (codeInputEl instanceof HTMLElement) {
47
47
  codeInputEl.style.letterSpacing = '35.5px'
48
48
  }
49
49
  }, 500)
@@ -127,7 +127,7 @@ export default class MagicCodeEntry extends Vue {
127
127
  </script>
128
128
 
129
129
  <style lang="scss">
130
- @import '../../styles/colors';
130
+ @use '@/styles/colors' as *;
131
131
 
132
132
  .uikit-magic-code {
133
133
  position: relative;
@@ -184,7 +184,6 @@ export default class MagicCodeEntry extends Vue {
184
184
  appearance: none;
185
185
 
186
186
  &::selection {
187
- color: none;
188
187
  background: none;
189
188
  }
190
189
  }
@@ -40,37 +40,39 @@
40
40
  </div>
41
41
  </template>
42
42
 
43
- <script lang="ts">
44
- import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
43
+ <script setup lang="ts">
44
+ import { computed } from 'vue'
45
45
  import Icon from '../Icons/Icon.vue'
46
46
 
47
- @Component({
48
- components: {
49
- Icon,
50
- },
47
+ const props = withDefaults(defineProps<{
48
+ currentPage?: number
49
+ total?: number
50
+ }>(), {
51
+ currentPage: 0,
52
+ total: 0,
51
53
  })
52
- export default class QuestionReviewPagination extends Vue {
53
- @Prop({ default: 0 }) currentPage!: number
54
- @Prop() total!: number
55
54
 
56
- get nextPageDisabled () {
57
- return this.currentPage >= Math.floor(this.total - 1)
58
- }
55
+ const emit = defineEmits<{
56
+ changePage: [ pageNum: number ]
57
+ }>()
59
58
 
60
- @Emit('changePage')
61
- changePage (direction: 'next' | 'previous') {
62
- if (direction === 'next') {
63
- return this.nextPageDisabled ? this.currentPage : this.currentPage + 1
64
- } else {
65
- return Math.max(0, this.currentPage - 1)
66
- }
59
+ const nextPageDisabled = computed(() => {
60
+ return props.currentPage >= Math.floor(props.total - 1)
61
+ })
62
+
63
+ const changePage = (direction: 'next' | 'previous') => {
64
+ if (direction === 'next') {
65
+ const pageNum = nextPageDisabled.value ? props.currentPage : props.currentPage + 1
66
+ emit('changePage', pageNum)
67
+ } else {
68
+ emit('changePage', Math.max(0, props.currentPage - 1))
67
69
  }
68
70
  }
69
71
  </script>
70
72
 
71
73
  <style lang="scss" scoped>
72
- @import '../../styles/breakpoints';
73
- @import '../../styles/colors';
74
+ @use '@/styles/breakpoints' as *;
75
+ @use '@/styles/colors' as *;
74
76
 
75
77
  .uikit-question-review-pagination {
76
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;