@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.
- package/dist/@pocketprep/ui-kit.css +1 -1
- package/dist/@pocketprep/ui-kit.js +14469 -17731
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +19 -29
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/eslint.config.ts +38 -11
- package/lib/SVGDefinitions.vue +32 -35
- package/lib/components/Banners/Banner.vue +10 -14
- package/lib/components/Blobs/Blob.vue +6 -14
- package/lib/components/Blobs/BlobEmptyState.vue +9 -8
- package/lib/components/Blobs/blob.d.ts +1 -1
- package/lib/components/BundleIcons/BundleIcon.vue +36 -63
- package/lib/components/BundleIcons/bundleIcon.d.ts +1 -1
- package/lib/components/Bundles/BundleList.vue +71 -59
- package/lib/components/Bundles/BundleSearch.vue +93 -117
- package/lib/components/Bundles/PremiumPill.vue +6 -12
- package/lib/components/Buttons/Button.vue +32 -35
- package/lib/components/Buttons/Link.vue +32 -31
- package/lib/components/Buttons/Tab.vue +14 -17
- package/lib/components/Calendar/Calendar.vue +87 -85
- package/lib/components/Charts/Bar.vue +192 -263
- package/lib/components/Charts/Pie.vue +55 -61
- package/lib/components/Charts/highcharts-wrap.ts +81 -0
- package/lib/components/Controls/SegmentControl.vue +26 -24
- package/lib/components/Controls/Slider.vue +51 -47
- package/lib/components/Controls/ToggleSwitch.vue +33 -31
- package/lib/components/EmptyStates/EmptyState.vue +69 -73
- package/lib/components/Exams/ExamCard.vue +59 -47
- package/lib/components/Exams/ExamMenuCard.vue +30 -28
- package/lib/components/Filters/FilterDropdown.vue +83 -86
- package/lib/components/Filters/FilterOptions.vue +83 -88
- package/lib/components/Forms/Checkbox.vue +27 -27
- package/lib/components/Forms/CheckboxOption.vue +30 -30
- package/lib/components/Forms/Errors.vue +21 -24
- package/lib/components/Forms/Input.vue +71 -59
- package/lib/components/Forms/Radio.vue +2 -2
- package/lib/components/Forms/RadioButton.vue +8 -8
- package/lib/components/Forms/Select.vue +265 -257
- package/lib/components/Forms/Textarea.vue +49 -35
- package/lib/components/Icons/IconAccordionArrow.vue +7 -9
- package/lib/components/Icons/IconActivity.vue +7 -9
- package/lib/components/Icons/IconAdd.vue +7 -11
- package/lib/components/Icons/IconAddCircle.vue +7 -9
- package/lib/components/Icons/IconArrow.vue +7 -9
- package/lib/components/Icons/IconBarChart.vue +7 -9
- package/lib/components/Icons/IconCalendar.vue +7 -9
- package/lib/components/Icons/IconCalendarPicker.vue +7 -9
- package/lib/components/Icons/IconChat.vue +7 -9
- package/lib/components/Icons/IconCheck.vue +7 -9
- package/lib/components/Icons/IconClose.vue +7 -9
- package/lib/components/Icons/IconConcept.vue +1 -1
- package/lib/components/Icons/IconCorrect.vue +7 -9
- package/lib/components/Icons/IconEdit.vue +7 -11
- package/lib/components/Icons/IconExam.vue +7 -9
- package/lib/components/Icons/IconExternalLink.vue +7 -9
- package/lib/components/Icons/IconEyeHide.vue +7 -9
- package/lib/components/Icons/IconEyeShow.vue +7 -9
- package/lib/components/Icons/IconFilter.vue +7 -9
- package/lib/components/Icons/IconFilterActive.vue +7 -9
- package/lib/components/Icons/IconFlag.vue +7 -9
- package/lib/components/Icons/IconFlagContent.vue +8 -9
- package/lib/components/Icons/IconFlagFeedback.vue +8 -10
- package/lib/components/Icons/IconFlagFilled.vue +7 -9
- package/lib/components/Icons/IconFullView.vue +7 -9
- package/lib/components/Icons/IconFullViewActive.vue +7 -9
- package/lib/components/Icons/IconGridDrag.vue +2 -2
- package/lib/components/Icons/IconHandle.vue +7 -9
- package/lib/components/Icons/IconHeart.vue +7 -9
- package/lib/components/Icons/IconHelp.vue +7 -9
- package/lib/components/Icons/IconHighlight.vue +2 -2
- package/lib/components/Icons/IconHourglass.vue +7 -9
- package/lib/components/Icons/IconImage.vue +7 -9
- package/lib/components/Icons/IconIncorrect.vue +7 -9
- package/lib/components/Icons/IconInfo.vue +7 -9
- package/lib/components/Icons/IconKeyboard.vue +7 -9
- package/lib/components/Icons/IconLaunch.vue +7 -9
- package/lib/components/Icons/IconLevelUp.vue +7 -9
- package/lib/components/Icons/IconLightbulb.vue +7 -9
- package/lib/components/Icons/IconLightning.vue +7 -9
- package/lib/components/Icons/IconLink.vue +7 -9
- package/lib/components/Icons/IconList.vue +7 -9
- package/lib/components/Icons/IconLoading.vue +7 -9
- package/lib/components/Icons/IconLoading2.vue +11 -11
- package/lib/components/Icons/IconLock.vue +7 -9
- package/lib/components/Icons/IconMissedQuestions.vue +7 -9
- package/lib/components/Icons/IconMoon.vue +7 -9
- package/lib/components/Icons/IconPaginationArrow.vue +7 -9
- package/lib/components/Icons/IconPaginationArrowDouble.vue +7 -9
- package/lib/components/Icons/IconPassage.vue +7 -9
- package/lib/components/Icons/IconPencil.vue +7 -9
- package/lib/components/Icons/IconPeople.vue +7 -9
- package/lib/components/Icons/IconPercent.vue +7 -9
- package/lib/components/Icons/IconPerson.vue +8 -9
- package/lib/components/Icons/IconPresent.vue +7 -9
- package/lib/components/Icons/IconPreview.vue +7 -9
- package/lib/components/Icons/IconQuestions.vue +7 -9
- package/lib/components/Icons/IconQuick10.vue +7 -9
- package/lib/components/Icons/IconQuickActions.vue +2 -2
- package/lib/components/Icons/IconRecommendedFilter.vue +1 -1
- package/lib/components/Icons/IconRemoveCircle.vue +7 -9
- package/lib/components/Icons/IconReviewFlag.vue +7 -9
- package/lib/components/Icons/IconSearch.vue +7 -9
- package/lib/components/Icons/IconShare.vue +7 -9
- package/lib/components/Icons/IconSideBar.vue +7 -9
- package/lib/components/Icons/IconSideBarActive.vue +7 -9
- package/lib/components/Icons/IconStar.vue +1 -1
- package/lib/components/Icons/IconStopwatch.vue +7 -9
- package/lib/components/Icons/IconStrike.vue +7 -9
- package/lib/components/Icons/IconSubject.vue +7 -9
- package/lib/components/Icons/IconText.vue +7 -9
- package/lib/components/Icons/IconTimer.vue +8 -9
- package/lib/components/Icons/IconWarning.vue +7 -9
- package/lib/components/Icons/icon.d.ts +1 -1
- package/lib/components/Loaders/SkeletonLoader.vue +1 -5
- package/lib/components/Modal/Modal.vue +23 -29
- package/lib/components/Modal/ModalContainer.vue +135 -133
- package/lib/components/Onboarding/EmailAuth.vue +66 -70
- package/lib/components/Onboarding/MagicCodeEntry.vue +88 -83
- package/lib/components/Pagination/QuestionReviewPagination.vue +3 -3
- package/lib/components/Pagination/TablePagination.vue +47 -44
- package/lib/components/PhonePerson/PhonePerson.vue +18 -18
- package/lib/components/PhonePerson/phonePerson.d.ts +1 -1
- package/lib/components/Quiz/FlagToggle.vue +45 -44
- package/lib/components/Quiz/GlobalMetricsToggle.vue +29 -28
- package/lib/components/Quiz/KeyboardShortcutsButton.vue +16 -23
- package/lib/components/Quiz/KeyboardShortcutsModal.vue +36 -37
- package/lib/components/Quiz/Question/BuildListChoicesContainer.vue +65 -65
- package/lib/components/Quiz/Question/ChoicesContainer.vue +5 -5
- package/lib/components/Quiz/Question/DropdownExplanation.vue +5 -5
- package/lib/components/Quiz/Question/Explanation.vue +6 -6
- package/lib/components/Quiz/Question/MPMCChoicesContainer.vue +17 -17
- package/lib/components/Quiz/Question/MPMCRadioGroup.vue +2 -2
- package/lib/components/Quiz/Question/MatrixChoicesContainer.vue +39 -39
- package/lib/components/Quiz/Question/MatrixRadioGroup.vue +6 -6
- package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +27 -28
- package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +2 -2
- package/lib/components/Quiz/Question/PassageAndImage.vue +3 -3
- package/lib/components/Quiz/Question/PassageAndImageDropdown.vue +7 -7
- package/lib/components/Quiz/Question/Paywall.vue +2 -2
- package/lib/components/Quiz/Question/QuestionContext.vue +1 -1
- package/lib/components/Quiz/Question/StatsSummary.vue +2 -2
- package/lib/components/Quiz/Question/Summary.vue +11 -11
- package/lib/components/Quiz/Question.vue +90 -82
- package/lib/components/Quiz/QuizContainer.vue +1 -1
- package/lib/components/Quiz/QuizProgressBar.vue +23 -23
- package/lib/components/Quiz/question.d.ts +3 -3
- package/lib/components/Search/Pill.vue +16 -19
- package/lib/components/Search/Search.vue +52 -47
- package/lib/components/SidePanels/SidePanel.vue +168 -174
- package/lib/components/Tables/Table.vue +135 -122
- package/lib/components/Tables/TableActions.vue +81 -76
- package/lib/components/Tables/table.d.ts +1 -1
- package/lib/components/Tags/Tag.vue +49 -39
- package/lib/components/Toasts/Toast.vue +44 -42
- package/lib/components/Tooltips/OverflowTooltip.vue +39 -45
- package/lib/components/Tooltips/Tooltip.vue +69 -70
- package/lib/directives.ts +4 -4
- package/lib/utils.ts +13 -12
- package/package.json +27 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-breakpoint="{ small: 2 }"
|
|
3
|
+
v-breakpoint="{ breakpoints: { small: 2 } }"
|
|
4
4
|
class="uikit-quiz-progress-bar"
|
|
5
5
|
:class="{
|
|
6
6
|
'uikit-quiz-progress-bar--selected': isSelected,
|
|
@@ -13,30 +13,30 @@
|
|
|
13
13
|
/>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import {
|
|
18
|
-
import { breakpoint } from '../../directives'
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import { breakpoint as vBreakpoint } from '../../directives'
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@Prop({ default: true }) isFocusable!: boolean
|
|
19
|
+
const {
|
|
20
|
+
isSelected = false,
|
|
21
|
+
isAnswered = false,
|
|
22
|
+
isFocusable = true,
|
|
23
|
+
} = defineProps<{
|
|
24
|
+
isSelected?: boolean
|
|
25
|
+
isAnswered?: boolean
|
|
26
|
+
isFocusable?: boolean
|
|
27
|
+
}>()
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const emit = defineEmits<{
|
|
30
|
+
'click': [event: MouseEvent]
|
|
31
|
+
'keydown': [event: KeyboardEvent]
|
|
32
|
+
}>()
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const emitClick = (event: MouseEvent) => {
|
|
35
|
+
emit('click', event)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const emitKeydown = (event: KeyboardEvent) => {
|
|
39
|
+
emit('keydown', event)
|
|
40
40
|
}
|
|
41
41
|
</script>
|
|
42
42
|
|
|
@@ -94,4 +94,4 @@ export default class QuizProgressBar extends Vue {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
</style>
|
|
97
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Ref = HTMLElement | null
|
|
2
2
|
|
|
3
3
|
export type TChoiceKey = `${'a' | 'd'}${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`
|
|
4
|
-
export type TMatrixChoiceKey = `${'a' | 'd'}${1 | 2 | 3
|
|
4
|
+
export type TMatrixChoiceKey = `${'a' | 'd'}${1 | 2 | 3}_${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}`
|
|
5
5
|
export type TBuildListChoiceKey = `a${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`
|
|
6
6
|
|
|
7
7
|
export type TQuizMode = 'qotd' | 'quick10' | 'timed' | 'weakest' | 'missed' | 'custom'
|
|
@@ -17,7 +17,7 @@ export type TBreakPointsObject = {
|
|
|
17
17
|
|
|
18
18
|
export type TChoice = { text?: string; key: TChoiceKey }
|
|
19
19
|
export type TBuildListChoice = { text?: string; key: TBuildListChoiceKey }
|
|
20
|
-
export type TMPMCChoice = {
|
|
20
|
+
export type TMPMCChoice = {
|
|
21
21
|
text?: string
|
|
22
22
|
id?: string
|
|
23
23
|
isCorrect?: boolean
|
|
@@ -67,4 +67,4 @@ export interface IRadioOptions {
|
|
|
67
67
|
|
|
68
68
|
export interface IScenarioSerial {
|
|
69
69
|
serial: string
|
|
70
|
-
}
|
|
70
|
+
}
|
|
@@ -15,27 +15,24 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
|
-
<script lang="ts">
|
|
19
|
-
import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
|
|
18
|
+
<script setup lang="ts">
|
|
20
19
|
import Icon from '../Icons/Icon.vue'
|
|
21
|
-
import { dark } from '../../directives'
|
|
20
|
+
import { dark as vDark } from '../../directives'
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
export default class Pill extends Vue {
|
|
32
|
-
@Prop({ default: false }) showClose!: boolean
|
|
33
|
-
@Prop({ default: false }) isDarkMode!: boolean
|
|
22
|
+
const {
|
|
23
|
+
showClose = false,
|
|
24
|
+
isDarkMode = false,
|
|
25
|
+
} = defineProps<{
|
|
26
|
+
showClose?: boolean
|
|
27
|
+
isDarkMode?: boolean
|
|
28
|
+
}>()
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
'click': [event: Event]
|
|
32
|
+
}>()
|
|
33
|
+
|
|
34
|
+
const emitClick = (event: Event) => {
|
|
35
|
+
emit('click', event)
|
|
39
36
|
}
|
|
40
37
|
</script>
|
|
41
38
|
|
|
@@ -114,4 +111,4 @@ export default class Pill extends Vue {
|
|
|
114
111
|
right: 4.5px;
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
|
-
</style>
|
|
114
|
+
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@mouseout="hover = false"
|
|
6
6
|
>
|
|
7
7
|
<div @click="focusInput">
|
|
8
|
-
<Icon
|
|
8
|
+
<Icon
|
|
9
9
|
v-dark="isDarkMode"
|
|
10
10
|
type="search"
|
|
11
11
|
class="uikit-search__icon"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
ref="search__field"
|
|
23
23
|
v-dark="isDarkMode"
|
|
24
24
|
class="uikit-search__input"
|
|
25
|
-
:class="{
|
|
25
|
+
:class="{
|
|
26
26
|
[`uikit-search__input--${type}`]: true,
|
|
27
27
|
'uikit-search__input--show-results-info': !!searchResultInfo,
|
|
28
28
|
'uikit-search__input--hover': hover,
|
|
@@ -70,56 +70,61 @@
|
|
|
70
70
|
</div>
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
|
-
<script lang="ts">
|
|
74
|
-
import { Component, Vue, Prop, Emit } from 'vue-facing-decorator'
|
|
73
|
+
<script setup lang="ts">
|
|
75
74
|
import Icon from '../Icons/Icon.vue'
|
|
76
|
-
import { dark } from '../../directives'
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
75
|
+
import { dark as vDark } from '../../directives'
|
|
76
|
+
import { ref, useTemplateRef } from 'vue'
|
|
77
|
+
|
|
78
|
+
const {
|
|
79
|
+
type = 'gray',
|
|
80
|
+
placeholder = undefined,
|
|
81
|
+
maxlength = '524288', // the default input field length
|
|
82
|
+
modelValue = null,
|
|
83
|
+
autoFocus = false,
|
|
84
|
+
searchResultInfo = '',
|
|
85
|
+
isDarkMode = false,
|
|
86
|
+
disabled = false,
|
|
87
|
+
} = defineProps<{
|
|
88
|
+
type?: 'white' | 'gray'
|
|
89
|
+
placeholder?: string
|
|
90
|
+
maxlength?: string
|
|
91
|
+
modelValue?: string | null
|
|
92
|
+
autoFocus?: boolean
|
|
93
|
+
searchResultInfo?: string
|
|
94
|
+
isDarkMode?: boolean
|
|
95
|
+
disabled?: boolean
|
|
96
|
+
}>()
|
|
97
|
+
|
|
98
|
+
const emit = defineEmits<{
|
|
99
|
+
'update:modelValue': [modelVal: string]
|
|
100
|
+
}>()
|
|
101
|
+
|
|
102
|
+
const hover = ref(false)
|
|
103
|
+
const focus = ref(false)
|
|
104
|
+
const clearHover = ref(false)
|
|
105
|
+
const clearFocus = ref(false)
|
|
106
|
+
|
|
107
|
+
const searchFieldRef = useTemplateRef<HTMLElement>('search__field')
|
|
108
|
+
|
|
109
|
+
const keyDownClearSearch = (e: KeyboardEvent) => {
|
|
110
|
+
// select option on enter or space
|
|
111
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
112
|
+
e.preventDefault()
|
|
113
|
+
clearSearch()
|
|
107
114
|
}
|
|
115
|
+
}
|
|
108
116
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
const focusInput = () => {
|
|
118
|
+
searchFieldRef.value?.focus()
|
|
119
|
+
}
|
|
112
120
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
121
|
+
const valueChange = ($event: Event) => {
|
|
122
|
+
emit('update:modelValue', ($event.target as HTMLInputElement | undefined)?.value || '')
|
|
123
|
+
}
|
|
117
124
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return ''
|
|
122
|
-
}
|
|
125
|
+
const clearSearch = () => {
|
|
126
|
+
emit('update:modelValue', '')
|
|
127
|
+
focusInput()
|
|
123
128
|
}
|
|
124
129
|
</script>
|
|
125
130
|
|