@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,131 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="docs-quiz-progress-bar__controls">
|
|
5
|
+
<div class="docs-quiz-progress-bar__slider">
|
|
6
|
+
Answered
|
|
7
|
+
<Slider class="docs-quiz-progress-bar__slider-input" v-model="numAnswered" :max="numBars" />
|
|
8
|
+
</div>
|
|
9
|
+
<div class="docs-quiz-progress-bar__slider">
|
|
10
|
+
Selected
|
|
11
|
+
<Slider class="docs-quiz-progress-bar__slider-input" v-model="indexOfSelected" :max="numBars" />
|
|
12
|
+
</div>
|
|
13
|
+
<div class="docs-quiz-progress-bar__slider">
|
|
14
|
+
Total
|
|
15
|
+
<Slider class="docs-quiz-progress-bar__slider-input" v-model="numBars" min="1" max="100" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="docs-quiz-progress-bar__container">
|
|
19
|
+
<div class="docs-quiz-progress-bar__context">
|
|
20
|
+
<div>Answered: {{ numAnswered }}</div>
|
|
21
|
+
<div>Selected: {{ indexOfSelected }}</div>
|
|
22
|
+
<div>Total: {{ numBars }}</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="docs-quiz-progress-bar" :style="{ width: fullBarWidth + 'px'}">
|
|
25
|
+
<QuizProgressBar
|
|
26
|
+
v-for="n in numBars"
|
|
27
|
+
:key="n"
|
|
28
|
+
:is-answered="n <= numAnswered"
|
|
29
|
+
:is-selected="Number(n) === Number(indexOfSelected)"
|
|
30
|
+
:style="{
|
|
31
|
+
maxWidth: barWidthString,
|
|
32
|
+
marginRight: n === numBars ? '0' : barMarginString,
|
|
33
|
+
height: (numBars >= 50 && n === indexOfSelected) ? '8px' : '4px',
|
|
34
|
+
}"
|
|
35
|
+
@click="clickedBar(n)"
|
|
36
|
+
@keydown.enter="clickedBar(n)"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
export default {
|
|
45
|
+
data () {
|
|
46
|
+
return {
|
|
47
|
+
fullBarWidth: 334,
|
|
48
|
+
numAnswered: 0,
|
|
49
|
+
indexOfSelected: 0,
|
|
50
|
+
numBars: 10,
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
computed: {
|
|
54
|
+
barWidth () {
|
|
55
|
+
const numGaps = this.numBars - 1
|
|
56
|
+
const widthOfAllGaps = numGaps * this.barMargin
|
|
57
|
+
const availableWidth = this.fullBarWidth - widthOfAllGaps
|
|
58
|
+
const barWidth = Math.max(Math.floor(availableWidth / this.numBars), 1)
|
|
59
|
+
return this.numBars < 50 ? barWidth : Math.min(barWidth, 2)
|
|
60
|
+
},
|
|
61
|
+
barMargin () {
|
|
62
|
+
return this.numBars < 50 ? 4 : 2
|
|
63
|
+
},
|
|
64
|
+
barWidthString () {
|
|
65
|
+
return `${this.barWidth}px`
|
|
66
|
+
},
|
|
67
|
+
barMarginString () {
|
|
68
|
+
return `${this.barMargin}px`
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
watch: {
|
|
72
|
+
numBars (newVal) {
|
|
73
|
+
if (this.numAnswered > newVal) {
|
|
74
|
+
this.numAnswered = newVal
|
|
75
|
+
}
|
|
76
|
+
if (this.indexOfSelected > newVal) {
|
|
77
|
+
this.indexOfSelected = newVal
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
methods: {
|
|
82
|
+
clickedBar(index) {
|
|
83
|
+
this.indexOfSelected = index
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<style>
|
|
90
|
+
.docs-quiz-progress-bar__controls {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-wrap: wrap;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.docs-quiz-progress-bar__slider {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
width: 380px;
|
|
101
|
+
margin: 5px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.docs-quiz-progress-bar__slider-input {
|
|
105
|
+
width: 300px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.docs-quiz-progress-bar__container {
|
|
109
|
+
width: 100%;
|
|
110
|
+
background-color: #1f3545;
|
|
111
|
+
height: 200px;
|
|
112
|
+
display: flex;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
align-items: center;
|
|
115
|
+
position: relative;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.docs-quiz-progress-bar__context {
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 12px;
|
|
121
|
+
right: 12px;
|
|
122
|
+
color: white;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.docs-quiz-progress-bar {
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
align-items: center;
|
|
129
|
+
}
|
|
130
|
+
</style>
|
|
131
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-breakpoint="{ small: 2 }"
|
|
4
|
+
class="uikit-quiz-progress-bar"
|
|
5
|
+
:class="{
|
|
6
|
+
'uikit-quiz-progress-bar--selected': isSelected,
|
|
7
|
+
'uikit-quiz-progress-bar--answered': isAnswered,
|
|
8
|
+
}"
|
|
9
|
+
:tabindex="isFocusable ? '0' : '-1'"
|
|
10
|
+
@click="emitClick($event)"
|
|
11
|
+
@keydown="emitKeydown($event)"
|
|
12
|
+
@mousedown.prevent
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { Component, Emit, Prop, Vue } from 'vue-facing-decorator'
|
|
18
|
+
import { breakpoint } from '../../directives'
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
directives: {
|
|
22
|
+
breakpoint,
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
export default class QuizProgressBar extends Vue {
|
|
26
|
+
@Prop({ default: false }) isSelected!: boolean
|
|
27
|
+
@Prop({ default: false }) isAnswered!: boolean
|
|
28
|
+
@Prop({ default: true }) isFocusable!: boolean
|
|
29
|
+
|
|
30
|
+
@Emit('click')
|
|
31
|
+
emitClick (event: MouseEvent) {
|
|
32
|
+
return event
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@Emit('keydown')
|
|
36
|
+
emitKeydown (event: KeyboardEvent) {
|
|
37
|
+
return event
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss">
|
|
43
|
+
@import '../../styles/colors';
|
|
44
|
+
@import '../../styles/breakpoints';
|
|
45
|
+
|
|
46
|
+
.uikit-quiz-progress-bar {
|
|
47
|
+
flex: 1;
|
|
48
|
+
background-color: rgba($white, 0.4);
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
position: relative;
|
|
51
|
+
outline: none;
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
background-color: rgba($white, 0.7);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:focus::before {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: -6px;
|
|
61
|
+
bottom: -6px;
|
|
62
|
+
left: -3px;
|
|
63
|
+
right: -3px;
|
|
64
|
+
border: 1px solid $butterscotch;
|
|
65
|
+
border-radius: 8px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--small:focus::before {
|
|
69
|
+
top: -3px;
|
|
70
|
+
bottom: -3px;
|
|
71
|
+
left: -2px;
|
|
72
|
+
right: -2px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--answered {
|
|
76
|
+
background-color: rgba($white, 0.85);
|
|
77
|
+
|
|
78
|
+
&:hover {
|
|
79
|
+
background-color: $white;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&--selected {
|
|
84
|
+
background-color: $banana-bread;
|
|
85
|
+
|
|
86
|
+
&:hover {
|
|
87
|
+
background-color: $butterscotch;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.uikit-quiz-progress-bar--small:focus::before {
|
|
91
|
+
top: -2px;
|
|
92
|
+
bottom: -2px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="light">
|
|
5
|
+
<Pill>Not Interactable</Pill>
|
|
6
|
+
<Pill @click="showPill1 = false" v-if="showPill1" :show-close="true">Interactable</Pill>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="dark">
|
|
9
|
+
<Pill :is-dark-mode="true">Not Interactable</Pill>
|
|
10
|
+
<Pill @click="showPill2 = false" v-if="showPill2" :is-dark-mode="true" :show-close="true">Interactable</Pill>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
data () {
|
|
18
|
+
return {
|
|
19
|
+
showPill1: true,
|
|
20
|
+
showPill2: true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style>
|
|
27
|
+
.light,
|
|
28
|
+
.dark {
|
|
29
|
+
display: flex;
|
|
30
|
+
padding: 15px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dark {
|
|
34
|
+
background: #1f3545;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-dark="isDarkMode"
|
|
4
|
+
class="uikit-pill"
|
|
5
|
+
:class="{ 'uikit-pill--show-close': showClose }"
|
|
6
|
+
:tabindex="showClose ? 0 : -1"
|
|
7
|
+
@click="showClose && emitClick()"
|
|
8
|
+
@keydown.enter="showClose && emitClick()"
|
|
9
|
+
@mousedown.prevent
|
|
10
|
+
>
|
|
11
|
+
<div class="uikit-pill__label">
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
<Icon v-if="showClose" type="close" />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
|
|
20
|
+
import Icon from '../Icons/Icon.vue'
|
|
21
|
+
import { dark } from '../../directives'
|
|
22
|
+
|
|
23
|
+
@Component({
|
|
24
|
+
components: {
|
|
25
|
+
Icon,
|
|
26
|
+
},
|
|
27
|
+
directives: {
|
|
28
|
+
dark,
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
export default class Pill extends Vue {
|
|
32
|
+
@Prop({ default: false }) showClose!: boolean
|
|
33
|
+
@Prop({ default: false }) isDarkMode!: boolean
|
|
34
|
+
|
|
35
|
+
@Emit('click')
|
|
36
|
+
emitClick () {
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss">
|
|
43
|
+
@import '../../styles/breakpoints';
|
|
44
|
+
@import '../../styles/colors';
|
|
45
|
+
|
|
46
|
+
.uikit-pill {
|
|
47
|
+
background: $brand-black;
|
|
48
|
+
border-radius: 4px;
|
|
49
|
+
height: 22px;
|
|
50
|
+
line-height: 22px;
|
|
51
|
+
padding: 0 6px;
|
|
52
|
+
font-size: 13px;
|
|
53
|
+
color: $white;
|
|
54
|
+
display: inline-block;
|
|
55
|
+
position: relative;
|
|
56
|
+
user-select: none;
|
|
57
|
+
margin-right: 4px;
|
|
58
|
+
margin-bottom: 4px;
|
|
59
|
+
outline: none;
|
|
60
|
+
vertical-align: middle;
|
|
61
|
+
cursor: default;
|
|
62
|
+
|
|
63
|
+
&--show-close {
|
|
64
|
+
padding-right: 24px;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
|
|
67
|
+
&:focus::before {
|
|
68
|
+
content: '';
|
|
69
|
+
position: absolute;
|
|
70
|
+
left: -2px;
|
|
71
|
+
top: -2px;
|
|
72
|
+
border: 1px solid $brand-blue;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
width: calc(100% + 2px);
|
|
75
|
+
height: calc(100% + 2px);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:hover {
|
|
79
|
+
background: $pickled-bluewood;
|
|
80
|
+
|
|
81
|
+
svg {
|
|
82
|
+
color: $banana-bread;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&--dark {
|
|
87
|
+
&:focus::before {
|
|
88
|
+
border-color: $banana-bread;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
background: $jet;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&--dark {
|
|
98
|
+
background: $charcoal;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__label {
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
display: inline-block;
|
|
106
|
+
max-width: 180px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
svg {
|
|
110
|
+
width: 13px;
|
|
111
|
+
height: 13px;
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 4.5px;
|
|
114
|
+
right: 4.5px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="search" :class="{ dark: isDarkMode }">
|
|
5
|
+
<Button @click="isDarkMode = !isDarkMode">{{ isDarkMode ? 'Disable' : 'Enable' }} Dark Mode</Button>
|
|
6
|
+
<Search :isDarkMode="isDarkMode" v-model="searchVal1" placeholder="Search with gray background" />
|
|
7
|
+
<Search :isDarkMode="isDarkMode" v-model="searchVal2" type="white" placeholder="Search with white background" />
|
|
8
|
+
<Search :isDarkMode="isDarkMode" v-model="searchVal2" type="white" placeholder="Disabled search" :disabled="true" />
|
|
9
|
+
<Search :isDarkMode="isDarkMode" searchResultInfo="15 Results" v-model="searchVal3" type="white" placeholder="Search with white background and result info" />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
searchVal1: null,
|
|
19
|
+
searchVal2: null,
|
|
20
|
+
searchVal3: null,
|
|
21
|
+
isDarkMode: false,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style lang="scss">
|
|
28
|
+
.search {
|
|
29
|
+
padding: 30px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dark {
|
|
33
|
+
background-color: #1f3545;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.uikit-btn {
|
|
37
|
+
margin-bottom: 30px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.uikit-search {
|
|
41
|
+
margin-bottom: 15px;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
```
|