@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,192 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a
|
|
3
|
+
v-dark="isDarkMode"
|
|
4
|
+
class="uikit-link"
|
|
5
|
+
:class="{
|
|
6
|
+
[`uikit-link--${type}`]: true,
|
|
7
|
+
'uikit-link--has-icon': hasIcon,
|
|
8
|
+
'uikit-link--disabled': disabled,
|
|
9
|
+
}"
|
|
10
|
+
:href="href"
|
|
11
|
+
:target="target"
|
|
12
|
+
@click="clicked"
|
|
13
|
+
@mousedown.prevent
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</a>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
|
|
21
|
+
import { dark } from '../../directives'
|
|
22
|
+
|
|
23
|
+
type TLinkType = 'tertiary' | 'tertiary-red' | 'tertiary-small'
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @see [Designs for Buttons](https://marvelapp.com/adf8ab3/screen/68221507)
|
|
27
|
+
*/
|
|
28
|
+
@Component({
|
|
29
|
+
directives: {
|
|
30
|
+
dark,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
export default class Link extends Vue {
|
|
34
|
+
@Prop({ default: 'tertiary' }) readonly type!: TLinkType
|
|
35
|
+
@Prop({ default: '#' }) readonly href!: string
|
|
36
|
+
@Prop({ default: '_self' }) readonly target!: string
|
|
37
|
+
@Prop({ default: false }) readonly disabled!: boolean
|
|
38
|
+
@Prop({ default: false }) readonly hasIcon!: boolean
|
|
39
|
+
@Prop({ default: false }) readonly isDarkMode!: boolean
|
|
40
|
+
|
|
41
|
+
@Emit('click')
|
|
42
|
+
clicked (event: MouseEvent) {
|
|
43
|
+
if (this.href === '#') {
|
|
44
|
+
event.preventDefault()
|
|
45
|
+
}
|
|
46
|
+
return event
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style lang="scss">
|
|
52
|
+
@import '../../styles/colors';
|
|
53
|
+
|
|
54
|
+
.uikit-link {
|
|
55
|
+
outline: none;
|
|
56
|
+
position: relative;
|
|
57
|
+
|
|
58
|
+
&:focus::before {
|
|
59
|
+
content: '';
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: -3px;
|
|
62
|
+
top: 0;
|
|
63
|
+
height: 100%;
|
|
64
|
+
width: calc(100% + 4px);
|
|
65
|
+
border: 1px solid $brand-blue;
|
|
66
|
+
border-radius: 4px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&--dark:focus::before {
|
|
70
|
+
border-color: $butterscotch;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&--tertiary,
|
|
74
|
+
&--tertiary-red,
|
|
75
|
+
&--tertiary-small {
|
|
76
|
+
line-height: 20px;
|
|
77
|
+
background-color: transparent;
|
|
78
|
+
user-select: none;
|
|
79
|
+
outline: none;
|
|
80
|
+
text-decoration: none;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&--tertiary,
|
|
85
|
+
&--tertiary-red {
|
|
86
|
+
font-size: 15px;
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
line-height: 18px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&--tertiary-small {
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&--tertiary,
|
|
97
|
+
&--tertiary-small {
|
|
98
|
+
color: $brand-blue;
|
|
99
|
+
|
|
100
|
+
&:not(.uikit-link--disabled) {
|
|
101
|
+
&:hover {
|
|
102
|
+
text-decoration: underline;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:hover,
|
|
106
|
+
&:focus {
|
|
107
|
+
color: mix($brand-blue, black, 90%);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:active {
|
|
111
|
+
color: mix($brand-blue, black, 80%);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&--dark {
|
|
116
|
+
color: $banana-bread;
|
|
117
|
+
|
|
118
|
+
&:not(.uikit-link--disabled) {
|
|
119
|
+
&:hover {
|
|
120
|
+
color: $butterscotch !important;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:focus {
|
|
124
|
+
color: $butterscotch;
|
|
125
|
+
|
|
126
|
+
&::before {
|
|
127
|
+
border-color: $butterscotch;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--tertiary-red {
|
|
135
|
+
color: $pepper;
|
|
136
|
+
|
|
137
|
+
&:not(.uikit-link--disabled) {
|
|
138
|
+
&:hover {
|
|
139
|
+
text-decoration: underline;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:hover,
|
|
143
|
+
&:focus {
|
|
144
|
+
color: mix($pepper, black, 90%);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:focus::before {
|
|
148
|
+
border-color: mix($pepper, black, 90%);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:active {
|
|
152
|
+
color: mix($pepper, black, 80%);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&--dark {
|
|
157
|
+
color: $rosa;
|
|
158
|
+
|
|
159
|
+
&:not(.uikit-link--disabled) {
|
|
160
|
+
&:hover,
|
|
161
|
+
&:focus {
|
|
162
|
+
color: mix($rosa, black, 90%);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&:focus::before {
|
|
166
|
+
border-color: mix($rosa, black, 90%);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&--has-icon {
|
|
173
|
+
&:focus::before {
|
|
174
|
+
height: 26px;
|
|
175
|
+
width: calc(100% + 12px);
|
|
176
|
+
top: 50%;
|
|
177
|
+
left: -4px;
|
|
178
|
+
margin-top: -14px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&:hover {
|
|
182
|
+
text-decoration: none !important;
|
|
183
|
+
color: $brand-black;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&--disabled {
|
|
188
|
+
opacity: 0.4;
|
|
189
|
+
cursor: default;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="light">
|
|
5
|
+
<Tab :active="isActive" @click="isActive = !isActive">All Studying</Tab>
|
|
6
|
+
<Tab :disabled="true">Disabled Tab</Tab>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="dark">
|
|
9
|
+
<Tab :isDarkMode="true" :active="isActive" @click="isActive = !isActive">All Studying</Tab>
|
|
10
|
+
<Tab :isDarkMode="true" :disabled="true">Disabled Tab</Tab>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
data () {
|
|
18
|
+
return {
|
|
19
|
+
isActive: false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style>
|
|
26
|
+
.dark,
|
|
27
|
+
.light {
|
|
28
|
+
padding: 30px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dark {
|
|
32
|
+
background-color: #1f3545;
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
35
|
+
```
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-dark="isDarkMode"
|
|
4
|
+
class="uikit-tab"
|
|
5
|
+
:class="{ 'uikit-tab--disabled': disabled, 'uikit-tab--active': active }"
|
|
6
|
+
:tabindex="disabled ? -1 : 0"
|
|
7
|
+
@click="emitClick()"
|
|
8
|
+
@keydown.enter="emitClick()"
|
|
9
|
+
@mousedown.prevent
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
|
|
17
|
+
import { dark } from '../../directives'
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
directives: {
|
|
21
|
+
dark,
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
export default class Tab extends Vue {
|
|
25
|
+
@Prop({ default: false }) disabled!: boolean
|
|
26
|
+
@Prop({ default: false }) active!: boolean
|
|
27
|
+
@Prop({ default: false }) isDarkMode!: boolean
|
|
28
|
+
|
|
29
|
+
@Emit('click')
|
|
30
|
+
emitClick () {
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss">
|
|
37
|
+
@import '../../styles/breakpoints';
|
|
38
|
+
@import '../../styles/colors';
|
|
39
|
+
|
|
40
|
+
.uikit-tab {
|
|
41
|
+
color: $brand-blue;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
line-height: 17px;
|
|
44
|
+
position: relative;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
outline: none;
|
|
48
|
+
padding: 0 3px 3px;
|
|
49
|
+
|
|
50
|
+
@media (hover: hover) {
|
|
51
|
+
&:hover {
|
|
52
|
+
color: mix($brand-blue, black, 90%);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:focus::before {
|
|
57
|
+
content: '';
|
|
58
|
+
border: 1px solid $brand-blue;
|
|
59
|
+
border-radius: 4px;
|
|
60
|
+
left: -1px;
|
|
61
|
+
top: -3px;
|
|
62
|
+
position: absolute;
|
|
63
|
+
height: 21px;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&--disabled {
|
|
68
|
+
opacity: 0.6;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--active {
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
|
|
74
|
+
&::after {
|
|
75
|
+
content: '';
|
|
76
|
+
left: 0;
|
|
77
|
+
bottom: -2px;
|
|
78
|
+
height: 2px;
|
|
79
|
+
width: 100%;
|
|
80
|
+
background: $brand-blue;
|
|
81
|
+
position: absolute;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&--dark {
|
|
86
|
+
color: $banana-bread;
|
|
87
|
+
|
|
88
|
+
@media (hover: hover) {
|
|
89
|
+
&:hover {
|
|
90
|
+
color: $butterscotch;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:focus::before {
|
|
95
|
+
border-color: $butterscotch;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&::after {
|
|
99
|
+
background: $banana-bread;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
Selected Date: {{ calendar }}
|
|
5
|
+
<Calendar label="Scheduled Exam Date" placeholder="Set Exam Date" v-model="calendar" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
calendar: null,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
```
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="uikit-calendar">
|
|
3
|
+
<Input
|
|
4
|
+
v-model="dateString"
|
|
5
|
+
:label="label"
|
|
6
|
+
class="uikit-calendar__input"
|
|
7
|
+
:placeholder="placeholder"
|
|
8
|
+
:is-dark-mode="isDarkMode"
|
|
9
|
+
disabled
|
|
10
|
+
@update:modelValue="processDateString"
|
|
11
|
+
@click="calendar && calendar.show()"
|
|
12
|
+
/>
|
|
13
|
+
<div
|
|
14
|
+
ref="calendarToggle"
|
|
15
|
+
v-dark="isDarkMode"
|
|
16
|
+
class="uikit-calendar__icon"
|
|
17
|
+
:class="{ 'uikit-calendar__icon--hover': hover, 'uikit-calendar__icon--focus': focus }"
|
|
18
|
+
tabindex="0"
|
|
19
|
+
@keydown.stop.prevent.enter="calendar && calendar.show()"
|
|
20
|
+
@click="calendar && calendar.show()"
|
|
21
|
+
>
|
|
22
|
+
<Icon type="calendar" />
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
ref="calendar"
|
|
26
|
+
class="uikit-calendar__trigger"
|
|
27
|
+
:tabindex="-1"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import type { ComponentPublicInstance } from 'vue'
|
|
34
|
+
import { Vue, Component, Prop, Emit } from 'vue-facing-decorator'
|
|
35
|
+
import Input from '../Forms/Input.vue'
|
|
36
|
+
import Icon from '../Icons/Icon.vue'
|
|
37
|
+
import Litepicker from 'litepicker'
|
|
38
|
+
import 'litepicker/dist/plugins/keyboardnav'
|
|
39
|
+
import type { DateTime } from 'litepicker/dist/types/datetime'
|
|
40
|
+
import { dark } from '../../directives'
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
directives: {
|
|
44
|
+
dark,
|
|
45
|
+
},
|
|
46
|
+
components: {
|
|
47
|
+
Input,
|
|
48
|
+
Icon,
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
export default class Calendar extends Vue {
|
|
52
|
+
@Prop() label!: string
|
|
53
|
+
@Prop({ default: '' }) placeholder!: string
|
|
54
|
+
@Prop() modelValue!: Date | null
|
|
55
|
+
@Prop({ default: false }) isDarkMode!: boolean
|
|
56
|
+
|
|
57
|
+
calendar: null | Litepicker = null
|
|
58
|
+
calendarInput = this.modelValue
|
|
59
|
+
dateString = this.modelValue ? this.modelValue.toLocaleDateString() : ''
|
|
60
|
+
hover = false
|
|
61
|
+
focus = false
|
|
62
|
+
afterCalendarTab = -1
|
|
63
|
+
|
|
64
|
+
beforeUnmount () {
|
|
65
|
+
this.calendar?.destroy()
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
mounted () {
|
|
69
|
+
this.calendar = new Litepicker({
|
|
70
|
+
element: this.$refs.calendar as HTMLElement,
|
|
71
|
+
plugins: [ 'keyboardnav' ],
|
|
72
|
+
firstDay: 0,
|
|
73
|
+
setup: picker => {
|
|
74
|
+
picker.on('selected', (date: DateTime) => {
|
|
75
|
+
this.calendarInput = date.toJSDate()
|
|
76
|
+
this.dateString = this.calendarInput.toLocaleDateString()
|
|
77
|
+
this.emitUpdateModelValue(this.calendarInput)
|
|
78
|
+
})
|
|
79
|
+
picker.on('show', () => {
|
|
80
|
+
this.$nextTick(() => {
|
|
81
|
+
const calendarEls = Array.from<HTMLElement>(document.querySelectorAll('.litepicker'))
|
|
82
|
+
const visibleCalendarEl = calendarEls.find(el => el.getBoundingClientRect().height)
|
|
83
|
+
const focusableEl = visibleCalendarEl?.querySelector(
|
|
84
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
85
|
+
) as HTMLElement
|
|
86
|
+
focusableEl.focus()
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
picker.on('hide', () => {
|
|
90
|
+
const calendarToggle = ((
|
|
91
|
+
this.$refs['calendarToggle'] as ComponentPublicInstance | undefined
|
|
92
|
+
)?.$el)
|
|
93
|
+
calendarToggle?.focus()
|
|
94
|
+
calendarToggle?.blur()
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
processDateString () {
|
|
101
|
+
const inputDate = new Date(this.dateString)
|
|
102
|
+
if (inputDate && inputDate.toLocaleDateString() !== this.calendarInput?.toLocaleDateString()) {
|
|
103
|
+
this.calendarInput = inputDate
|
|
104
|
+
this.emitUpdateModelValue(this.calendarInput)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@Emit('update:modelValue')
|
|
109
|
+
emitUpdateModelValue (calendarInput: Date) {
|
|
110
|
+
return calendarInput
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
</script>
|
|
114
|
+
|
|
115
|
+
<style lang="scss">
|
|
116
|
+
@import '../../styles/breakpoints';
|
|
117
|
+
@import '../../styles/colors';
|
|
118
|
+
|
|
119
|
+
.uikit-calendar {
|
|
120
|
+
position: relative;
|
|
121
|
+
|
|
122
|
+
&__trigger {
|
|
123
|
+
width: 1px;
|
|
124
|
+
height: 1px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__icon {
|
|
128
|
+
position: absolute;
|
|
129
|
+
right: 8px;
|
|
130
|
+
bottom: 8px;
|
|
131
|
+
width: 20px;
|
|
132
|
+
height: 20px;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
color: $brand-blue;
|
|
135
|
+
outline: none;
|
|
136
|
+
|
|
137
|
+
&:focus::before {
|
|
138
|
+
content: '';
|
|
139
|
+
left: -1px;
|
|
140
|
+
top: -1px;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
position: absolute;
|
|
144
|
+
border: 1px solid $brand-blue;
|
|
145
|
+
border-radius: 5px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--dark {
|
|
149
|
+
color: $banana-bread;
|
|
150
|
+
|
|
151
|
+
&:focus::before {
|
|
152
|
+
border-color: $banana-bread;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
svg {
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: 100%;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
</style>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div class="bar-example">
|
|
4
|
+
<div class="light">
|
|
5
|
+
<div class="bar-container">
|
|
6
|
+
<Bar
|
|
7
|
+
title="Multiple Column Percent Chart"
|
|
8
|
+
type="percent"
|
|
9
|
+
size="small"
|
|
10
|
+
:data="[{
|
|
11
|
+
'y': 50
|
|
12
|
+
}, {
|
|
13
|
+
'y': 0
|
|
14
|
+
}, {
|
|
15
|
+
'y': 100
|
|
16
|
+
}, {
|
|
17
|
+
'y': 90
|
|
18
|
+
}, {
|
|
19
|
+
'y': 70
|
|
20
|
+
}, {
|
|
21
|
+
'y': 80
|
|
22
|
+
}]"
|
|
23
|
+
/>
|
|
24
|
+
<div class="bar-x-axis-multi">
|
|
25
|
+
<span>Oldest</span>
|
|
26
|
+
<span>Most Recent</span>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="bar-container">
|
|
30
|
+
<Bar
|
|
31
|
+
title="Single Column Percent Chart"
|
|
32
|
+
type="percent"
|
|
33
|
+
size="small"
|
|
34
|
+
:data="[{
|
|
35
|
+
info: '05.25.1992',
|
|
36
|
+
'y': 50
|
|
37
|
+
}]"
|
|
38
|
+
/>
|
|
39
|
+
<div class="bar-x-axis-single">
|
|
40
|
+
<span>12/31</span>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="dark">
|
|
45
|
+
<div class="bar-container">
|
|
46
|
+
<Bar
|
|
47
|
+
title="Multiple Column Percent Chart"
|
|
48
|
+
type="percent"
|
|
49
|
+
:isDarkMode="true"
|
|
50
|
+
size="small"
|
|
51
|
+
:data="[{
|
|
52
|
+
'y': 50
|
|
53
|
+
}, {
|
|
54
|
+
'y': 0
|
|
55
|
+
}, {
|
|
56
|
+
'y': 100
|
|
57
|
+
}, {
|
|
58
|
+
'y': 90
|
|
59
|
+
}, {
|
|
60
|
+
'y': 70
|
|
61
|
+
}, {
|
|
62
|
+
'y': 80
|
|
63
|
+
}]"
|
|
64
|
+
/>
|
|
65
|
+
<div class="bar-x-axis-multi">
|
|
66
|
+
<span>Oldest</span>
|
|
67
|
+
<span>Most Recent</span>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="bar-container">
|
|
71
|
+
<Bar
|
|
72
|
+
title="Single Column Percent Chart"
|
|
73
|
+
type="percent"
|
|
74
|
+
size="small"
|
|
75
|
+
:isDarkMode="true"
|
|
76
|
+
:data="[{
|
|
77
|
+
info: '05.25.1992',
|
|
78
|
+
'y': 50
|
|
79
|
+
}]"
|
|
80
|
+
/>
|
|
81
|
+
<div class="bar-x-axis-single">
|
|
82
|
+
<span>12/31</span>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<style>
|
|
90
|
+
.bar-container {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
align-items: center;
|
|
94
|
+
width: 40%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.bar-x-axis-multi {
|
|
98
|
+
width: 85%;
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
margin-right: 45px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bar-x-axis-single {
|
|
105
|
+
width: 100%;
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
padding-right: 45px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.dark,
|
|
112
|
+
.light {
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: space-around;
|
|
115
|
+
height: 350px;
|
|
116
|
+
padding: 30px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.dark {
|
|
120
|
+
background-color: #1f3545;
|
|
121
|
+
}
|
|
122
|
+
</style>
|
|
123
|
+
```
|