@pocketprep/ui-kit 2.0.40 → 3.0.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/{.eslintrc.js → .eslintrc.cjs} +16 -17
- package/dist/@pocketprep/ui-kit.js +18856 -0
- package/dist/@pocketprep/ui-kit.js.map +1 -0
- package/dist/@pocketprep/ui-kit.umd.cjs +28 -0
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -0
- package/dist/style.css +1 -0
- package/lib/SVGDefinitions.vue +85 -0
- package/lib/assets/emojis/tada.png +0 -0
- package/lib/assets/halftones/halftone-black.png +0 -0
- package/lib/assets/halftones/halftone-blue.png +0 -0
- package/lib/assets/halftones/halftone-green.png +0 -0
- package/lib/assets/halftones/halftone-purple.png +0 -0
- package/lib/assets/halftones/halftone-red.png +0 -0
- package/lib/assets/halftones/halftone-yellow.png +0 -0
- package/lib/assets/question/paywall-dark.png +0 -0
- package/lib/assets/question/paywall-light.png +0 -0
- package/lib/components/Banners/Banner.md +41 -0
- package/lib/components/Banners/Banner.vue +87 -0
- package/lib/components/BundleIcons/AMTA.vue +134 -0
- package/lib/components/BundleIcons/BundleIcon.md +60 -0
- package/lib/components/BundleIcons/BundleIcon.vue +111 -0
- package/lib/components/Bundles/BundleList.md +63 -0
- package/lib/components/Bundles/BundleList.vue +170 -0
- package/lib/components/Bundles/BundleSearch.md +195 -0
- package/lib/components/Bundles/BundleSearch.vue +573 -0
- package/lib/components/Bundles/PremiumPill.md +23 -0
- package/lib/components/Bundles/PremiumPill.vue +43 -0
- package/lib/components/Buttons/Button.md +99 -0
- package/lib/components/Buttons/Button.vue +496 -0
- package/lib/components/Buttons/Link.md +58 -0
- package/lib/components/Buttons/Link.vue +192 -0
- package/lib/components/Buttons/Tab.md +35 -0
- package/lib/components/Buttons/Tab.vue +103 -0
- package/lib/components/Calendar/Calendar.md +18 -0
- package/lib/components/Calendar/Calendar.vue +162 -0
- package/lib/components/Charts/Bar.md +123 -0
- package/lib/components/Charts/Bar.vue +364 -0
- package/lib/components/Charts/Pie.md +23 -0
- package/lib/components/Charts/Pie.vue +105 -0
- package/lib/components/Controls/SegmentControl.md +47 -0
- package/lib/components/Controls/SegmentControl.vue +117 -0
- package/lib/components/Controls/Slider.md +67 -0
- package/lib/components/Controls/Slider.vue +358 -0
- package/lib/components/Controls/ToggleSwitch.md +56 -0
- package/lib/components/Controls/ToggleSwitch.vue +160 -0
- package/lib/components/Exams/ExamCard.md +45 -0
- package/lib/components/Exams/ExamCard.vue +257 -0
- package/lib/components/Exams/ExamMenuCard.md +90 -0
- package/lib/components/Exams/ExamMenuCard.vue +218 -0
- package/lib/components/Filters/FilterDropdown.md +59 -0
- package/lib/components/Filters/FilterDropdown.vue +176 -0
- package/lib/components/Filters/FilterOptions.md +65 -0
- package/lib/components/Filters/FilterOptions.vue +265 -0
- package/lib/components/Filters/filterOptions.d.ts +10 -0
- package/lib/components/Forms/Checkbox.md +52 -0
- package/lib/components/Forms/Checkbox.vue +184 -0
- package/lib/components/Forms/CheckboxOption.md +37 -0
- package/lib/components/Forms/CheckboxOption.vue +173 -0
- package/lib/components/Forms/Errors.md +23 -0
- package/lib/components/Forms/Errors.vue +109 -0
- package/lib/components/Forms/Input.md +63 -0
- package/lib/components/Forms/Input.vue +310 -0
- package/lib/components/Forms/Radio.md +66 -0
- package/lib/components/Forms/Radio.vue +312 -0
- package/lib/components/Forms/Select.md +133 -0
- package/lib/components/Forms/Select.vue +670 -0
- package/lib/components/Forms/Textarea.md +57 -0
- package/lib/components/Forms/Textarea.vue +157 -0
- package/lib/components/Icons/Icon.md +146 -0
- package/lib/components/Icons/Icon.vue +192 -0
- package/lib/components/Icons/IconAccordionArrow.md +7 -0
- package/lib/components/Icons/IconAccordionArrow.vue +23 -0
- package/lib/components/Icons/IconActivity.md +7 -0
- package/lib/components/Icons/IconActivity.vue +21 -0
- package/lib/components/Icons/IconAdd.md +7 -0
- package/lib/components/Icons/IconAdd.vue +19 -0
- package/lib/components/Icons/IconAddCircle.md +7 -0
- package/lib/components/Icons/IconAddCircle.vue +22 -0
- package/lib/components/Icons/IconArrow.md +7 -0
- package/lib/components/Icons/IconArrow.vue +21 -0
- package/lib/components/Icons/IconBarChart.md +7 -0
- package/lib/components/Icons/IconBarChart.vue +23 -0
- package/lib/components/Icons/IconCalendar.md +7 -0
- package/lib/components/Icons/IconCalendar.vue +19 -0
- package/lib/components/Icons/IconCheck.md +7 -0
- package/lib/components/Icons/IconCheck.vue +21 -0
- package/lib/components/Icons/IconClose.md +7 -0
- package/lib/components/Icons/IconClose.vue +23 -0
- package/lib/components/Icons/IconCorrect.md +7 -0
- package/lib/components/Icons/IconCorrect.vue +19 -0
- package/lib/components/Icons/IconEdit.md +7 -0
- package/lib/components/Icons/IconEdit.vue +21 -0
- package/lib/components/Icons/IconExam.md +7 -0
- package/lib/components/Icons/IconExam.vue +34 -0
- package/lib/components/Icons/IconExternalLink.md +7 -0
- package/lib/components/Icons/IconExternalLink.vue +30 -0
- package/lib/components/Icons/IconEyeHide.md +7 -0
- package/lib/components/Icons/IconEyeHide.vue +21 -0
- package/lib/components/Icons/IconEyeShow.md +7 -0
- package/lib/components/Icons/IconEyeShow.vue +21 -0
- package/lib/components/Icons/IconFilter.md +7 -0
- package/lib/components/Icons/IconFilter.vue +19 -0
- package/lib/components/Icons/IconFilterActive.md +7 -0
- package/lib/components/Icons/IconFilterActive.vue +20 -0
- package/lib/components/Icons/IconFlag.md +7 -0
- package/lib/components/Icons/IconFlag.vue +25 -0
- package/lib/components/Icons/IconFlagFeedback.md +11 -0
- package/lib/components/Icons/IconFlagFeedback.vue +24 -0
- package/lib/components/Icons/IconFlagFilled.md +7 -0
- package/lib/components/Icons/IconFlagFilled.vue +22 -0
- package/lib/components/Icons/IconFullView.md +7 -0
- package/lib/components/Icons/IconFullView.vue +30 -0
- package/lib/components/Icons/IconFullViewActive.md +7 -0
- package/lib/components/Icons/IconFullViewActive.vue +28 -0
- package/lib/components/Icons/IconHandle.md +7 -0
- package/lib/components/Icons/IconHandle.vue +23 -0
- package/lib/components/Icons/IconHeart.md +7 -0
- package/lib/components/Icons/IconHeart.vue +19 -0
- package/lib/components/Icons/IconHelp.md +7 -0
- package/lib/components/Icons/IconHelp.vue +25 -0
- package/lib/components/Icons/IconHourglass.md +7 -0
- package/lib/components/Icons/IconHourglass.vue +22 -0
- package/lib/components/Icons/IconImage.md +7 -0
- package/lib/components/Icons/IconImage.vue +21 -0
- package/lib/components/Icons/IconIncorrect.md +7 -0
- package/lib/components/Icons/IconIncorrect.vue +21 -0
- package/lib/components/Icons/IconInfo.md +7 -0
- package/lib/components/Icons/IconInfo.vue +24 -0
- package/lib/components/Icons/IconKeyboard.md +7 -0
- package/lib/components/Icons/IconKeyboard.vue +25 -0
- package/lib/components/Icons/IconLaunch.md +7 -0
- package/lib/components/Icons/IconLaunch.vue +25 -0
- package/lib/components/Icons/IconLightning.md +7 -0
- package/lib/components/Icons/IconLightning.vue +21 -0
- package/lib/components/Icons/IconList.md +7 -0
- package/lib/components/Icons/IconList.vue +26 -0
- package/lib/components/Icons/IconLoading.md +7 -0
- package/lib/components/Icons/IconLoading.vue +65 -0
- package/lib/components/Icons/IconLoading2.md +7 -0
- package/lib/components/Icons/IconLoading2.vue +52 -0
- package/lib/components/Icons/IconLock.md +7 -0
- package/lib/components/Icons/IconLock.vue +23 -0
- package/lib/components/Icons/IconMissedQuestions.md +7 -0
- package/lib/components/Icons/IconMissedQuestions.vue +22 -0
- package/lib/components/Icons/IconMoon.md +7 -0
- package/lib/components/Icons/IconMoon.vue +25 -0
- package/lib/components/Icons/IconPaginationArrow.md +7 -0
- package/lib/components/Icons/IconPaginationArrow.vue +23 -0
- package/lib/components/Icons/IconPassage.md +7 -0
- package/lib/components/Icons/IconPassage.vue +22 -0
- package/lib/components/Icons/IconPencil.md +7 -0
- package/lib/components/Icons/IconPencil.vue +19 -0
- package/lib/components/Icons/IconPeople.md +7 -0
- package/lib/components/Icons/IconPeople.vue +25 -0
- package/lib/components/Icons/IconQuestions.md +7 -0
- package/lib/components/Icons/IconQuestions.vue +25 -0
- package/lib/components/Icons/IconQuick10.md +7 -0
- package/lib/components/Icons/IconQuick10.vue +23 -0
- package/lib/components/Icons/IconRemoveCircle.md +7 -0
- package/lib/components/Icons/IconRemoveCircle.vue +22 -0
- package/lib/components/Icons/IconReviewFlag.md +7 -0
- package/lib/components/Icons/IconReviewFlag.vue +32 -0
- package/lib/components/Icons/IconSearch.md +7 -0
- package/lib/components/Icons/IconSearch.vue +23 -0
- package/lib/components/Icons/IconShare.md +7 -0
- package/lib/components/Icons/IconShare.vue +31 -0
- package/lib/components/Icons/IconSideBar.md +7 -0
- package/lib/components/Icons/IconSideBar.vue +26 -0
- package/lib/components/Icons/IconSideBarActive.md +7 -0
- package/lib/components/Icons/IconSideBarActive.vue +28 -0
- package/lib/components/Icons/IconStopwatch.md +7 -0
- package/lib/components/Icons/IconStopwatch.vue +22 -0
- package/lib/components/Icons/IconStrike.md +60 -0
- package/lib/components/Icons/IconStrike.vue +23 -0
- package/lib/components/Icons/IconSubject.md +7 -0
- package/lib/components/Icons/IconSubject.vue +22 -0
- package/lib/components/Icons/IconText.md +7 -0
- package/lib/components/Icons/IconText.vue +22 -0
- package/lib/components/Icons/IconWarning.md +7 -0
- package/lib/components/Icons/IconWarning.vue +22 -0
- package/lib/components/Modal/Modal.md +31 -0
- package/lib/components/Modal/Modal.vue +133 -0
- package/lib/components/Modal/ModalContainer.md +96 -0
- package/lib/components/Modal/ModalContainer.vue +208 -0
- package/lib/components/Onboarding/EmailAuth.md +40 -0
- package/lib/components/Onboarding/EmailAuth.vue +218 -0
- package/lib/components/Onboarding/MagicCodeEntry.md +20 -0
- package/lib/components/Onboarding/MagicCodeEntry.vue +189 -0
- package/lib/components/PhonePerson/PhonePerson.md +36 -0
- package/lib/components/PhonePerson/PhonePerson.vue +48 -0
- package/lib/components/PhonePerson/phoneperson-IT@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-auto@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-behavioralhealth@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-emt@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-essentials@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-finance@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-fitness@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-medical@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-nursing@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-nursingschool@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-professional@2x.png +0 -0
- package/lib/components/PhonePerson/phoneperson-skilledtrades@2x.png +0 -0
- package/lib/components/Quiz/FlagToggle.md +37 -0
- package/lib/components/Quiz/FlagToggle.vue +124 -0
- package/lib/components/Quiz/GlobalMetricsToggle.md +46 -0
- package/lib/components/Quiz/GlobalMetricsToggle.vue +124 -0
- package/lib/components/Quiz/KeyboardShortcutsButton.md +18 -0
- package/lib/components/Quiz/KeyboardShortcutsButton.vue +102 -0
- package/lib/components/Quiz/KeyboardShortcutsModal.md +71 -0
- package/lib/components/Quiz/KeyboardShortcutsModal.vue +261 -0
- package/lib/components/Quiz/Question.md +579 -0
- package/lib/components/Quiz/Question.vue +3262 -0
- package/lib/components/Quiz/QuizContainer.md +91 -0
- package/lib/components/Quiz/QuizContainer.vue +207 -0
- package/lib/components/Quiz/QuizProgress.md +122 -0
- package/lib/components/Quiz/QuizProgress.vue +188 -0
- package/lib/components/Quiz/QuizProgressBar.md +131 -0
- package/lib/components/Quiz/QuizProgressBar.vue +96 -0
- package/lib/components/Search/Pill.md +37 -0
- package/lib/components/Search/Pill.vue +117 -0
- package/lib/components/Search/Search.md +44 -0
- package/lib/components/Search/Search.vue +341 -0
- package/lib/components/SidePanels/SidePanel.md +126 -0
- package/lib/components/SidePanels/SidePanel.vue +592 -0
- package/lib/components/Tables/StudyTable.md +136 -0
- package/lib/components/Tables/Table.vue +497 -0
- package/lib/components/Tables/TableActions.vue +199 -0
- package/lib/components/Tables/TablePagination.md +19 -0
- package/lib/components/Tables/TablePagination.vue +109 -0
- package/lib/components/Tables/TeachTable.md +696 -0
- package/lib/components/Toasts/Toast.md +35 -0
- package/lib/components/Toasts/Toast.vue +213 -0
- package/lib/components/Tooltips/OverflowTooltip.md +14 -0
- package/lib/components/Tooltips/OverflowTooltip.vue +68 -0
- package/lib/components/Tooltips/Tooltip.md +72 -0
- package/lib/components/Tooltips/Tooltip.vue +143 -0
- package/lib/directives.ts +213 -0
- package/lib/index.ts +108 -0
- package/{pocketprep-export.module.scss → lib/pocketprep-export.module.scss} +2 -2
- package/{pocketprep.scss → lib/pocketprep.scss} +16 -18
- package/{styles → lib/styles}/_colors.scss +1 -1
- package/lib/styles/fonts.css +149 -0
- package/lib/utils.ts +53 -0
- package/package.json +75 -56
- package/{stylelint.config.js → stylelint.config.cjs} +6 -3
- package/assets/Fonts.md +0 -114
- package/assets/Images.md +0 -2
- package/assets/Styleguidist.vue +0 -11
- package/dist/@pocketprep/ui-kit.common.js +0 -29726
- package/dist/@pocketprep/ui-kit.common.js.map +0 -1
- package/dist/@pocketprep/ui-kit.umd.js +0 -29745
- package/dist/@pocketprep/ui-kit.umd.js.map +0 -1
- package/dist/@pocketprep/ui-kit.umd.min.js +0 -33
- package/dist/@pocketprep/ui-kit.umd.min.js.map +0 -1
- package/dist/demo.html +0 -1
- package/index.d.ts +0 -63
- package/src/directives.d.ts +0 -2
- package/src/shims.d.ts +0 -19
- package/src/utils.d.ts +0 -51
- package/styles/Colors.md +0 -53
- package/styles/Styles.md +0 -4
- package/styles/_fonts.scss +0 -149
- package/tests/shims-test.d.ts +0 -9
- /package/{assets → lib/assets}/fonts/muli/muli-400.eot +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400.svg +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400.ttf +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400.woff +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400.woff2 +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400italic.eot +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400italic.svg +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400italic.ttf +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400italic.woff +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-400italic.woff2 +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600.eot +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600.svg +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600.ttf +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600.woff +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600.woff2 +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600italic.eot +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600italic.svg +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600italic.ttf +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600italic.woff +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-600italic.woff2 +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700.eot +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700.svg +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700.ttf +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700.woff +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700.woff2 +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700italic.eot +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700italic.svg +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700italic.ttf +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700italic.woff +0 -0
- /package/{assets → lib/assets}/fonts/muli/muli-700italic.woff2 +0 -0
- /package/{assets → lib/assets}/images/amta.svg +0 -0
- /package/{assets → lib/assets}/images/favicon.ico +0 -0
- /package/{assets → lib/assets}/images/thumb-large-dark.svg +0 -0
- /package/{assets → lib/assets}/images/thumb-large.svg +0 -0
- /package/{assets → lib/assets}/images/thumb-small-dark.svg +0 -0
- /package/{assets → lib/assets}/images/thumb-small.svg +0 -0
- /package/{src → lib}/components/BundleIcons/bundleIcon.d.ts +0 -0
- /package/{src → lib}/components/Icons/icon.d.ts +0 -0
- /package/{src → lib}/components/PhonePerson/phonePerson.d.ts +0 -0
- /package/{src → lib}/components/Tables/table.d.ts +0 -0
- /package/{styles → lib/styles}/_breakpoints.scss +0 -0
- /package/{styles/_normalize.scss → lib/styles/normalize.css} +0 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import type { Directive, DirectiveBinding } from 'vue'
|
|
2
|
+
import MediaBreakpoints from './pocketprep-export.module.scss'
|
|
3
|
+
import { ResizeObserver as ResizeObserverPonyFill } from 'resize-observer'
|
|
4
|
+
|
|
5
|
+
type TBreakpoints = { [breakpointName: string]: number }
|
|
6
|
+
|
|
7
|
+
const updateBreakpointClasses = (el: HTMLElement, breakpoints?: TBreakpoints, container?: HTMLElement) => {
|
|
8
|
+
// calculate screen width
|
|
9
|
+
const mediaBreakpoints: string[] = []
|
|
10
|
+
if (window.matchMedia(`(max-width: ${MediaBreakpoints.blackBear}px)`).matches) {
|
|
11
|
+
mediaBreakpoints.push('black-bear')
|
|
12
|
+
}
|
|
13
|
+
if (window.matchMedia(`(max-width: ${MediaBreakpoints.brownBear}px)`).matches) {
|
|
14
|
+
mediaBreakpoints.push('brown-bear')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// calculate element width
|
|
18
|
+
const breakpointSuffixes = [ 'black-bear', 'brown-bear' ]
|
|
19
|
+
const elWidth = container ? container.getBoundingClientRect().width : el.getBoundingClientRect().width
|
|
20
|
+
const customBreakpoints: string[] = []
|
|
21
|
+
|
|
22
|
+
// If no custom breakpoints passed, use default breakpoints that match design's
|
|
23
|
+
if (!breakpoints) {
|
|
24
|
+
breakpoints = {
|
|
25
|
+
'mobile': Number(MediaBreakpoints.blackBear),
|
|
26
|
+
'tablet-portrait': Number(MediaBreakpoints.brownBear),
|
|
27
|
+
'tablet-landscape': Number(MediaBreakpoints.grizzlyBear),
|
|
28
|
+
'desktop': Number(MediaBreakpoints.polarBear),
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (breakpoints) {
|
|
33
|
+
Object.entries(breakpoints)
|
|
34
|
+
.forEach(([ name, width ]) => {
|
|
35
|
+
breakpointSuffixes.push(name)
|
|
36
|
+
if (elWidth <= width) {
|
|
37
|
+
customBreakpoints.push(name)
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const classes = el.getAttribute('class')?.split(' ') || []
|
|
43
|
+
const nonModifierClasses = classes.filter(className => !className.includes('--'))
|
|
44
|
+
const updatedClasses = classes.filter(c => {
|
|
45
|
+
const classSegments = c.split('--')
|
|
46
|
+
const lastSegment = classSegments[classSegments.length - 1]
|
|
47
|
+
return !(lastSegment && breakpointSuffixes.includes(lastSegment))
|
|
48
|
+
})
|
|
49
|
+
nonModifierClasses.forEach(className => {
|
|
50
|
+
if (className) {
|
|
51
|
+
updatedClasses.push(...mediaBreakpoints.map(bp => `${className}--${bp}`))
|
|
52
|
+
updatedClasses.push(...customBreakpoints.map(bp => `${className}--${bp}`))
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
classes.sort()
|
|
57
|
+
updatedClasses.sort()
|
|
58
|
+
|
|
59
|
+
const needToUpdateClasses =
|
|
60
|
+
classes.length !== updatedClasses.length
|
|
61
|
+
|| classes.some((oldClass, index) => oldClass !== updatedClasses[index])
|
|
62
|
+
|
|
63
|
+
if (needToUpdateClasses) {
|
|
64
|
+
el.setAttribute('class', updatedClasses.join(' '))
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const getCustomContainer = (binding: DirectiveBinding) => {
|
|
69
|
+
const bindingArg = binding.arg
|
|
70
|
+
const container = bindingArg && binding.instance && binding.instance[bindingArg as keyof typeof binding.instance]
|
|
71
|
+
return container
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const eventListeners: Partial<Record<string, () => void>> = {}
|
|
75
|
+
const mutationObservers: Partial<Record<string, MutationObserver>> = {}
|
|
76
|
+
const resizeObservers: Partial<Record<string, ResizeObserver>> = {}
|
|
77
|
+
|
|
78
|
+
export const fixed: Directive = {
|
|
79
|
+
beforeMount: el => {
|
|
80
|
+
if (!el.dataset.breakpointId) {
|
|
81
|
+
const { top, left } = el.getBoundingClientRect()
|
|
82
|
+
|
|
83
|
+
const scrollListener = () => {
|
|
84
|
+
const scrollX = window.scrollX
|
|
85
|
+
const scrollY = window.scrollY
|
|
86
|
+
|
|
87
|
+
el.style.top = `${top + scrollY}px`
|
|
88
|
+
el.style.left = `${left + scrollX}px`
|
|
89
|
+
}
|
|
90
|
+
scrollListener()
|
|
91
|
+
|
|
92
|
+
const eventId = Math.floor(Math.random() * 1e8)
|
|
93
|
+
eventListeners[eventId] = scrollListener
|
|
94
|
+
el.dataset.eventId = String(eventId)
|
|
95
|
+
document.addEventListener('scroll', scrollListener)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
unmounted: el => {
|
|
99
|
+
const eventId = el.dataset.eventId
|
|
100
|
+
const eventListener = eventId && eventListeners[eventId]
|
|
101
|
+
if (eventId && eventListener) {
|
|
102
|
+
document.removeEventListener('scroll', eventListener)
|
|
103
|
+
delete eventListeners[eventId]
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const breakpoint: Directive = {
|
|
109
|
+
beforeMount (el, binding) {
|
|
110
|
+
if (!el.dataset.breakpointId) {
|
|
111
|
+
binding.instance?.$nextTick(() => {
|
|
112
|
+
const breakpointId = el.dataset.breakpointId || Math.floor(Math.random() * 1e8)
|
|
113
|
+
el.dataset.breakpointId = String(breakpointId)
|
|
114
|
+
|
|
115
|
+
// Set resize event listener
|
|
116
|
+
const resizeEventListener = () => {
|
|
117
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
118
|
+
}
|
|
119
|
+
eventListeners[breakpointId] = resizeEventListener
|
|
120
|
+
window.addEventListener('resize', resizeEventListener)
|
|
121
|
+
|
|
122
|
+
// Set mutation observer
|
|
123
|
+
const mutationObserver = new MutationObserver(() => {
|
|
124
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
125
|
+
})
|
|
126
|
+
mutationObservers[breakpointId] = mutationObserver
|
|
127
|
+
mutationObserver.observe(el, { attributes: true })
|
|
128
|
+
|
|
129
|
+
// Set resize observer
|
|
130
|
+
const container = getCustomContainer(binding)
|
|
131
|
+
if (container) {
|
|
132
|
+
const resizeObserver = window.ResizeObserver
|
|
133
|
+
? new ResizeObserver(() => {
|
|
134
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
135
|
+
})
|
|
136
|
+
: new ResizeObserverPonyFill(() => {
|
|
137
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
138
|
+
})
|
|
139
|
+
resizeObservers[breakpointId] = resizeObserver
|
|
140
|
+
resizeObserver.observe(container)
|
|
141
|
+
} else {
|
|
142
|
+
const resizeObserver = window.ResizeObserver
|
|
143
|
+
? new ResizeObserver(() => {
|
|
144
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
145
|
+
})
|
|
146
|
+
: new ResizeObserverPonyFill(() => {
|
|
147
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
148
|
+
})
|
|
149
|
+
resizeObservers[breakpointId] = resizeObserver
|
|
150
|
+
resizeObserver.observe(el)
|
|
151
|
+
}
|
|
152
|
+
})
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
mounted: (el, binding) => {
|
|
156
|
+
binding.instance?.$nextTick(() => {
|
|
157
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
updated: (el, binding) => {
|
|
161
|
+
binding.instance?.$nextTick(() => {
|
|
162
|
+
updateBreakpointClasses(el, binding.value, getCustomContainer(binding))
|
|
163
|
+
})
|
|
164
|
+
},
|
|
165
|
+
unmounted: (el) => {
|
|
166
|
+
const breakpointId = el.dataset.breakpointId
|
|
167
|
+
if (breakpointId) {
|
|
168
|
+
// Remove event listener
|
|
169
|
+
const eventListener = eventListeners[breakpointId]
|
|
170
|
+
if (eventListener) {
|
|
171
|
+
window.removeEventListener('resize', eventListener)
|
|
172
|
+
delete eventListeners[breakpointId]
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Disconnect mutation observer
|
|
176
|
+
const mutationObserver = mutationObservers[breakpointId]
|
|
177
|
+
if (mutationObserver) {
|
|
178
|
+
mutationObserver.disconnect()
|
|
179
|
+
delete mutationObservers[breakpointId]
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Disconnect resize observer
|
|
183
|
+
const resizeObserver = resizeObservers[breakpointId]
|
|
184
|
+
if (resizeObserver) {
|
|
185
|
+
resizeObserver.disconnect()
|
|
186
|
+
delete resizeObservers[breakpointId]
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
delete el.dataset.breakpointId
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export const dark: Directive<HTMLElement> = (el, { value }: { value?: boolean }) => {
|
|
195
|
+
const isDarkMode = !!value
|
|
196
|
+
const classes = (typeof el.className === 'string'
|
|
197
|
+
? el.className
|
|
198
|
+
: (el.className as unknown as { baseVal: string }).baseVal).split(' ')
|
|
199
|
+
if (isDarkMode) {
|
|
200
|
+
if (classes.find(c => c.endsWith('--dark'))) {
|
|
201
|
+
return
|
|
202
|
+
}
|
|
203
|
+
classes.forEach(className => {
|
|
204
|
+
el.classList.add(`${className}--dark`)
|
|
205
|
+
})
|
|
206
|
+
} else {
|
|
207
|
+
classes.forEach(className => {
|
|
208
|
+
if (className.includes('--dark')) {
|
|
209
|
+
el.classList.remove(className)
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
}
|
|
213
|
+
}
|
package/lib/index.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import './pocketprep.scss'
|
|
2
|
+
|
|
3
|
+
import Banner from './components/Banners/Banner.vue'
|
|
4
|
+
import Bar from './components/Charts/Bar.vue'
|
|
5
|
+
import Pie from './components/Charts/Pie.vue'
|
|
6
|
+
import SegmentControl from './components/Controls/SegmentControl.vue'
|
|
7
|
+
import ToggleSwitch from './components/Controls/ToggleSwitch.vue'
|
|
8
|
+
import Slider from './components/Controls/Slider.vue'
|
|
9
|
+
import Button from './components/Buttons/Button.vue'
|
|
10
|
+
import FilterOptions from './components/Filters/FilterOptions.vue'
|
|
11
|
+
import FilterDropdown from './components/Filters/FilterDropdown.vue'
|
|
12
|
+
import Link from './components/Buttons/Link.vue'
|
|
13
|
+
import Tab from './components/Buttons/Tab.vue'
|
|
14
|
+
import Select from './components/Forms/Select.vue'
|
|
15
|
+
import Radio from './components/Forms/Radio.vue'
|
|
16
|
+
import Checkbox from './components/Forms/Checkbox.vue'
|
|
17
|
+
import CheckboxOption from './components/Forms/CheckboxOption.vue'
|
|
18
|
+
import Input from './components/Forms/Input.vue'
|
|
19
|
+
import Textarea from './components/Forms/Textarea.vue'
|
|
20
|
+
import Icon from './components/Icons/Icon.vue'
|
|
21
|
+
import BundleIcon from './components/BundleIcons/BundleIcon.vue'
|
|
22
|
+
import Table from './components/Tables/Table.vue'
|
|
23
|
+
import TableActions from './components/Tables/TableActions.vue'
|
|
24
|
+
import TablePagination from './components/Tables/TablePagination.vue'
|
|
25
|
+
import Search from './components/Search/Search.vue'
|
|
26
|
+
import Pill from './components/Search/Pill.vue'
|
|
27
|
+
import PhonePerson from './components/PhonePerson/PhonePerson.vue'
|
|
28
|
+
import Tooltip from './components/Tooltips/Tooltip.vue'
|
|
29
|
+
import OverflowTooltip from './components/Tooltips/OverflowTooltip.vue'
|
|
30
|
+
import Modal from './components/Modal/Modal.vue'
|
|
31
|
+
import ModalContainer from './components/Modal/ModalContainer.vue'
|
|
32
|
+
import EmailAuth from './components/Onboarding/EmailAuth.vue'
|
|
33
|
+
import MagicCodeEntry from './components/Onboarding/MagicCodeEntry.vue'
|
|
34
|
+
import BundleSearch from './components/Bundles/BundleSearch.vue'
|
|
35
|
+
import BundleList from './components/Bundles/BundleList.vue'
|
|
36
|
+
import ExamCard from './components/Exams/ExamCard.vue'
|
|
37
|
+
import ExamMenuCard from './components/Exams/ExamMenuCard.vue'
|
|
38
|
+
import Errors from './components/Forms/Errors.vue'
|
|
39
|
+
import SVGDefinitions from './SVGDefinitions.vue'
|
|
40
|
+
import SidePanel from './components/SidePanels/SidePanel.vue'
|
|
41
|
+
import Calendar from './components/Calendar/Calendar.vue'
|
|
42
|
+
import Question from './components/Quiz/Question.vue'
|
|
43
|
+
import QuizContainer from './components/Quiz/QuizContainer.vue'
|
|
44
|
+
import QuizProgress from './components/Quiz/QuizProgress.vue'
|
|
45
|
+
import QuizProgressBar from './components/Quiz/QuizProgressBar.vue'
|
|
46
|
+
import KeyboardShortcutsButton from './components/Quiz/KeyboardShortcutsButton.vue'
|
|
47
|
+
import KeyboardShortcutsModal from './components/Quiz/KeyboardShortcutsModal.vue'
|
|
48
|
+
import FlagToggle from './components/Quiz/FlagToggle.vue'
|
|
49
|
+
import GlobalMetricsToggle from './components/Quiz/GlobalMetricsToggle.vue'
|
|
50
|
+
import PremiumPill from './components/Bundles/PremiumPill.vue'
|
|
51
|
+
import Toast from './components/Toasts/Toast.vue'
|
|
52
|
+
|
|
53
|
+
export * as directives from './directives'
|
|
54
|
+
export * as utils from './utils'
|
|
55
|
+
|
|
56
|
+
const components = {
|
|
57
|
+
Banner,
|
|
58
|
+
Bar,
|
|
59
|
+
Pie,
|
|
60
|
+
Button,
|
|
61
|
+
FilterOptions,
|
|
62
|
+
FilterDropdown,
|
|
63
|
+
Link,
|
|
64
|
+
SegmentControl,
|
|
65
|
+
ToggleSwitch,
|
|
66
|
+
Slider,
|
|
67
|
+
Select,
|
|
68
|
+
Radio,
|
|
69
|
+
Checkbox,
|
|
70
|
+
CheckboxOption,
|
|
71
|
+
Input,
|
|
72
|
+
Textarea,
|
|
73
|
+
Icon,
|
|
74
|
+
BundleIcon,
|
|
75
|
+
Table,
|
|
76
|
+
TableActions,
|
|
77
|
+
TablePagination,
|
|
78
|
+
Search,
|
|
79
|
+
Pill,
|
|
80
|
+
PhonePerson,
|
|
81
|
+
Tooltip,
|
|
82
|
+
OverflowTooltip,
|
|
83
|
+
Modal,
|
|
84
|
+
ModalContainer,
|
|
85
|
+
EmailAuth,
|
|
86
|
+
MagicCodeEntry,
|
|
87
|
+
BundleSearch,
|
|
88
|
+
BundleList,
|
|
89
|
+
ExamCard,
|
|
90
|
+
ExamMenuCard,
|
|
91
|
+
Errors,
|
|
92
|
+
SVGDefinitions,
|
|
93
|
+
SidePanel,
|
|
94
|
+
Calendar,
|
|
95
|
+
Question,
|
|
96
|
+
QuizContainer,
|
|
97
|
+
QuizProgress,
|
|
98
|
+
QuizProgressBar,
|
|
99
|
+
KeyboardShortcutsButton,
|
|
100
|
+
KeyboardShortcutsModal,
|
|
101
|
+
FlagToggle,
|
|
102
|
+
GlobalMetricsToggle,
|
|
103
|
+
Tab,
|
|
104
|
+
PremiumPill,
|
|
105
|
+
Toast,
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default components
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
@import 'styles/
|
|
2
|
-
@import 'styles/
|
|
3
|
-
@import 'styles/colors';
|
|
4
|
-
@import 'styles/breakpoints';
|
|
1
|
+
@import './styles/breakpoints';
|
|
2
|
+
@import './styles/colors';
|
|
5
3
|
|
|
6
4
|
body,
|
|
7
5
|
html {
|
|
8
|
-
font-family: 'Avenir Next',
|
|
6
|
+
font-family: 'Avenir Next', Muli, sans-serif;
|
|
9
7
|
width: 100%;
|
|
10
8
|
min-height: 100%;
|
|
11
9
|
color: $brand-black;
|
|
12
10
|
font-weight: 500;
|
|
13
|
-
text-rendering:
|
|
11
|
+
text-rendering: optimizelegibility;
|
|
14
12
|
-webkit-font-smoothing: antialiased;
|
|
15
13
|
-moz-osx-font-smoothing: grayscale;
|
|
16
14
|
}
|
|
@@ -28,30 +26,30 @@ textarea {
|
|
|
28
26
|
.uikit-slider__slide-input {
|
|
29
27
|
&:focus {
|
|
30
28
|
&::-webkit-slider-thumb {
|
|
31
|
-
background-image: url(
|
|
29
|
+
background-image: url("./assets/images/thumb-small.svg") !important;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
&::-moz-range-thumb {
|
|
35
|
-
background-image: url(
|
|
33
|
+
background-image: url("./assets/images/thumb-small.svg") !important;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
&::-ms-thumb {
|
|
39
|
-
background-image: url(
|
|
37
|
+
background-image: url("./assets/images/thumb-small.svg") !important;
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
&--dark {
|
|
44
42
|
&:focus {
|
|
45
43
|
&::-webkit-slider-thumb {
|
|
46
|
-
background-image: url(
|
|
44
|
+
background-image: url("./assets/images/thumb-small-dark.svg") !important;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
&::-moz-range-thumb {
|
|
50
|
-
background-image: url(
|
|
48
|
+
background-image: url("./assets/images/thumb-small-dark.svg") !important;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
&::-ms-thumb {
|
|
54
|
-
background-image: url(
|
|
52
|
+
background-image: url("./assets/images/thumb-small-dark.svg") !important;
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
}
|
|
@@ -63,30 +61,30 @@ textarea {
|
|
|
63
61
|
.uikit-slider__slide-input {
|
|
64
62
|
&:focus {
|
|
65
63
|
&::-webkit-slider-thumb {
|
|
66
|
-
background-image: url(
|
|
64
|
+
background-image: url("./assets/images/thumb-large.svg") !important;
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
&::-moz-range-thumb {
|
|
70
|
-
background-image: url(
|
|
68
|
+
background-image: url("./assets/images/thumb-large.svg") !important;
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
&::-ms-thumb {
|
|
74
|
-
background-image: url(
|
|
72
|
+
background-image: url("./assets/images/thumb-large.svg") !important;
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
&--dark {
|
|
79
77
|
&:focus {
|
|
80
78
|
&::-webkit-slider-thumb {
|
|
81
|
-
background-image: url(
|
|
79
|
+
background-image: url("./assets/images/thumb-large-dark.svg") !important;
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
&::-moz-range-thumb {
|
|
85
|
-
background-image: url(
|
|
83
|
+
background-image: url("./assets/images/thumb-large-dark.svg") !important;
|
|
86
84
|
}
|
|
87
85
|
|
|
88
86
|
&::-ms-thumb {
|
|
89
|
-
background-image: url(
|
|
87
|
+
background-image: url("./assets/images/thumb-large-dark.svg") !important;
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
These custom font faces were added in order to reconcile differences between
|
|
3
|
+
the Muli and Avenir Next font weights. Muli is a thinner font. For example,
|
|
4
|
+
Muli's 700 weight font is equivalent to Avenir Next's 600 weight font.
|
|
5
|
+
|
|
6
|
+
To fix these issues, this file creates the following weight "aliases":
|
|
7
|
+
Avenir Next 400 / Muli 400 = font-weight: 400 / normal
|
|
8
|
+
Avenir Next 500 / Muli 600 = font-weight: 500 / medium
|
|
9
|
+
Avenir Next 600 / Muli 700 = font-weight: 600 / demi-bold
|
|
10
|
+
**/
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: "Avenir Next";
|
|
13
|
+
font-style: normal;
|
|
14
|
+
src: local("Avenir Next Regular"), local("AvenirNext-Regular");
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: "Avenir Next";
|
|
20
|
+
font-style: normal;
|
|
21
|
+
src: local("Avenir Next Medium"), local("AvenirNext-Medium");
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: "Avenir Next";
|
|
27
|
+
font-style: normal;
|
|
28
|
+
src: local("Avenir Next Demi Bold"), local("AvenirNext-DemiBold");
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@font-face {
|
|
33
|
+
font-family: "Avenir Next";
|
|
34
|
+
font-style: normal;
|
|
35
|
+
src: local("Avenir Next Bold"), local("AvenirNext-Bold");
|
|
36
|
+
font-weight: 700;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@font-face {
|
|
40
|
+
font-family: "Avenir Next";
|
|
41
|
+
font-style: italic;
|
|
42
|
+
src: local("Avenir Next Italic"), local("AvenirNext-Italic");
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@font-face {
|
|
47
|
+
font-family: "Avenir Next";
|
|
48
|
+
font-style: italic;
|
|
49
|
+
src: local("Avenir Next Medium Italic"), local("AvenirNext-MediumItalic");
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: "Avenir Next";
|
|
55
|
+
font-style: italic;
|
|
56
|
+
src: local("Avenir Next Demi Bold Italic"), local("AvenirNext-DemiBoldItalic");
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@font-face {
|
|
61
|
+
font-family: "Avenir Next";
|
|
62
|
+
font-style: italic;
|
|
63
|
+
src: local("Avenir Next Bold Italic"), local("AvenirNext-BoldItalic");
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@font-face {
|
|
68
|
+
font-family: Muli;
|
|
69
|
+
font-style: normal;
|
|
70
|
+
font-weight: 400;
|
|
71
|
+
src: url('../assets/fonts/muli/muli-400.eot');
|
|
72
|
+
src:
|
|
73
|
+
local(''),
|
|
74
|
+
url('../assets/fonts/muli/muli-400.eot?#iefix') format('embedded-opentype'),
|
|
75
|
+
url('../assets/fonts/muli/muli-400.woff2') format('woff2'),
|
|
76
|
+
url('../assets/fonts/muli/muli-400.woff') format('woff'),
|
|
77
|
+
url('../assets/fonts/muli/muli-400.ttf') format('truetype'),
|
|
78
|
+
url('../assets/fonts/muli/muli-400.svg#Muli') format('svg');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@font-face {
|
|
82
|
+
font-family: Muli;
|
|
83
|
+
font-style: normal;
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
src: url('../assets/fonts/muli/muli-600.eot');
|
|
86
|
+
src:
|
|
87
|
+
local(''),
|
|
88
|
+
url('../assets/fonts/muli/muli-600.eot?#iefix') format('embedded-opentype'),
|
|
89
|
+
url('../assets/fonts/muli/muli-600.woff2') format('woff2'),
|
|
90
|
+
url('../assets/fonts/muli/muli-600.woff') format('woff'),
|
|
91
|
+
url('../assets/fonts/muli/muli-600.ttf') format('truetype'),
|
|
92
|
+
url('../assets/fonts/muli/muli-600.svg#Muli') format('svg');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@font-face {
|
|
96
|
+
font-family: Muli;
|
|
97
|
+
font-style: normal;
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
src: url('../assets/fonts/muli/muli-700.eot');
|
|
100
|
+
src:
|
|
101
|
+
local(''),
|
|
102
|
+
url('../assets/fonts/muli/muli-700.eot?#iefix') format('embedded-opentype'),
|
|
103
|
+
url('../assets/fonts/muli/muli-700.woff2') format('woff2'),
|
|
104
|
+
url('../assets/fonts/muli/muli-700.woff') format('woff'),
|
|
105
|
+
url('../assets/fonts/muli/muli-700.ttf') format('truetype'),
|
|
106
|
+
url('../assets/fonts/muli/muli-700.svg#Muli') format('svg');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@font-face {
|
|
110
|
+
font-family: Muli;
|
|
111
|
+
font-style: italic;
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
src: url('../assets/fonts/muli/muli-400italic.eot');
|
|
114
|
+
src:
|
|
115
|
+
local(''),
|
|
116
|
+
url('../assets/fonts/muli/muli-400italic.eot?#iefix') format('embedded-opentype'),
|
|
117
|
+
url('../assets/fonts/muli/muli-400italic.woff2') format('woff2'),
|
|
118
|
+
url('../assets/fonts/muli/muli-400italic.woff') format('woff'),
|
|
119
|
+
url('../assets/fonts/muli/muli-400italic.ttf') format('truetype'),
|
|
120
|
+
url('../assets/fonts/muli/muli-400italic.svg#Muli') format('svg');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@font-face {
|
|
124
|
+
font-family: Muli;
|
|
125
|
+
font-style: italic;
|
|
126
|
+
font-weight: 500;
|
|
127
|
+
src: url('../assets/fonts/muli/muli-600italic.eot');
|
|
128
|
+
src:
|
|
129
|
+
local(''),
|
|
130
|
+
url('../assets/fonts/muli/muli-600italic.eot?#iefix') format('embedded-opentype'),
|
|
131
|
+
url('../assets/fonts/muli/muli-600italic.woff2') format('woff2'),
|
|
132
|
+
url('../assets/fonts/muli/muli-600italic.woff') format('woff'),
|
|
133
|
+
url('../assets/fonts/muli/muli-600italic.ttf') format('truetype'),
|
|
134
|
+
url('../assets/fonts/muli/muli-600italic.svg#Muli') format('svg');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@font-face {
|
|
138
|
+
font-family: Muli;
|
|
139
|
+
font-style: italic;
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
src: url('../assets/fonts/muli/muli-700italic.eot');
|
|
142
|
+
src:
|
|
143
|
+
local(''),
|
|
144
|
+
url('../assets/fonts/muli/muli-700italic.eot?#iefix') format('embedded-opentype'),
|
|
145
|
+
url('../assets/fonts/muli/muli-700italic.woff2') format('woff2'),
|
|
146
|
+
url('../assets/fonts/muli/muli-700italic.woff') format('woff'),
|
|
147
|
+
url('../assets/fonts/muli/muli-700italic.ttf') format('truetype'),
|
|
148
|
+
url('../assets/fonts/muli/muli-700italic.svg#Muli') format('svg');
|
|
149
|
+
}
|
package/lib/utils.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import BrandColors from './pocketprep-export.module.scss'
|
|
2
|
+
|
|
3
|
+
export const studyModes = {
|
|
4
|
+
'-1': {
|
|
5
|
+
name: 'Question of the Day',
|
|
6
|
+
shortName: 'qotd',
|
|
7
|
+
icon: 'calendar',
|
|
8
|
+
iconColor: BrandColors.cadaverous,
|
|
9
|
+
iconColorDM: BrandColors.jungleGreen,
|
|
10
|
+
},
|
|
11
|
+
'0': {
|
|
12
|
+
name: 'Quick 10',
|
|
13
|
+
shortName: 'quick10',
|
|
14
|
+
icon: 'quick10',
|
|
15
|
+
iconColor: BrandColors.cosmos,
|
|
16
|
+
iconColorDM: BrandColors.orchid,
|
|
17
|
+
},
|
|
18
|
+
'2': {
|
|
19
|
+
name: 'Missed Questions',
|
|
20
|
+
shortName: 'missed',
|
|
21
|
+
icon: 'missedQuestions',
|
|
22
|
+
iconColor: '#EC0000',
|
|
23
|
+
iconColorDM: BrandColors.rosa,
|
|
24
|
+
},
|
|
25
|
+
'3': {
|
|
26
|
+
name: 'Weakest Subject',
|
|
27
|
+
shortName: 'weakest',
|
|
28
|
+
icon: 'subject',
|
|
29
|
+
iconColor: '#EC0000',
|
|
30
|
+
iconColorDM: BrandColors.rosa,
|
|
31
|
+
},
|
|
32
|
+
'4': {
|
|
33
|
+
name: 'Timed Quiz',
|
|
34
|
+
shortName: 'timed',
|
|
35
|
+
icon: 'stopwatch',
|
|
36
|
+
iconColor: BrandColors.brandBlue,
|
|
37
|
+
iconColorDM: '#4C92FF',
|
|
38
|
+
},
|
|
39
|
+
'5': {
|
|
40
|
+
name: 'Mock Exam',
|
|
41
|
+
shortName: 'mockExam',
|
|
42
|
+
icon: 'exam',
|
|
43
|
+
iconColor: BrandColors.cadaverous,
|
|
44
|
+
iconColorDM: BrandColors.jungleGreen,
|
|
45
|
+
},
|
|
46
|
+
'10': {
|
|
47
|
+
name: 'Build Your Own',
|
|
48
|
+
shortName: 'custom',
|
|
49
|
+
icon: 'pencil',
|
|
50
|
+
iconColor: BrandColors.slate,
|
|
51
|
+
iconColorDM: BrandColors.pewter,
|
|
52
|
+
},
|
|
53
|
+
} as const
|