@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,364 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :id="chartId" class="uikit-bar" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import { Component, Vue, Prop } from 'vue-facing-decorator'
|
|
7
|
+
import Highcharts, { chart } from 'highcharts'
|
|
8
|
+
import Accessibility from 'highcharts/modules/accessibility'
|
|
9
|
+
import BrandColors from '../../pocketprep-export.module.scss'
|
|
10
|
+
|
|
11
|
+
type TCustomChartOptions = Highcharts.Options & {
|
|
12
|
+
plotOptions: {
|
|
13
|
+
series: {
|
|
14
|
+
groupPadding: number
|
|
15
|
+
pointPadding: number
|
|
16
|
+
}
|
|
17
|
+
column: {
|
|
18
|
+
borderRadiusTopLeft?: number
|
|
19
|
+
borderRadiusTopRight?: number
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type TCustomSeries = Highcharts.Series & {
|
|
25
|
+
options: {
|
|
26
|
+
borderRadiusTopLeft: number
|
|
27
|
+
borderRadiusTopRight: number
|
|
28
|
+
borderRadiusBottomRight: number
|
|
29
|
+
borderRadiusBottomLeft: number
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type TShapeArgs = {
|
|
34
|
+
d?: Highcharts.SVGPathArray
|
|
35
|
+
width?: number
|
|
36
|
+
height?: number
|
|
37
|
+
x?: number
|
|
38
|
+
y?: number
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type TCustomPoint = Highcharts.Point & {
|
|
42
|
+
shapeArgs: TShapeArgs
|
|
43
|
+
shapeType: string
|
|
44
|
+
dlBox: TShapeArgs
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type TCustomHighcharts = typeof Highcharts & {
|
|
48
|
+
seriesTypes: {
|
|
49
|
+
column: {
|
|
50
|
+
prototype: Record<string, unknown>
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
Accessibility(Highcharts);
|
|
56
|
+
(function (H) {
|
|
57
|
+
H.wrap((H.seriesTypes.column.prototype), 'translate', function (this: TCustomSeries, proceed: () => void) {
|
|
58
|
+
const options = this.options
|
|
59
|
+
|
|
60
|
+
proceed.call(this);
|
|
61
|
+
|
|
62
|
+
(this.points as TCustomPoint[]).forEach(function (point) {
|
|
63
|
+
if (options.borderRadiusTopLeft || options.borderRadiusTopRight) {
|
|
64
|
+
const w = Number(point.shapeArgs.width)
|
|
65
|
+
const h = Number(point.shapeArgs.height)
|
|
66
|
+
const x = Number(point.shapeArgs.x)
|
|
67
|
+
const y = Number(point.shapeArgs.y)
|
|
68
|
+
const maxR = Math.min(w, h) / 2
|
|
69
|
+
|
|
70
|
+
let radiusTopLeft = H.relativeLength(options.borderRadiusTopLeft || 0, w)
|
|
71
|
+
let radiusTopRight = H.relativeLength(options.borderRadiusTopRight || 0, w)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
radiusTopLeft = radiusTopLeft > maxR ? maxR : radiusTopLeft
|
|
75
|
+
radiusTopRight = radiusTopRight > maxR ? maxR : radiusTopRight
|
|
76
|
+
|
|
77
|
+
point.dlBox = point.shapeArgs
|
|
78
|
+
|
|
79
|
+
point.shapeType = 'path'
|
|
80
|
+
const d = [
|
|
81
|
+
'M', x + radiusTopLeft, y,
|
|
82
|
+
'L', x + w - radiusTopRight, y,
|
|
83
|
+
'C', x + w - (radiusTopRight / 2), y, x + w, y + (radiusTopRight / 2), x + w, y + radiusTopRight,
|
|
84
|
+
'L', x + w, y + h,
|
|
85
|
+
'C', x + w, y + h, x + w, y + h, x + w, y + h,
|
|
86
|
+
'L', x, y + h,
|
|
87
|
+
'C', x, y + h, x, y + h, x, y + h,
|
|
88
|
+
'L', x, y + radiusTopLeft,
|
|
89
|
+
'C', x, y + (radiusTopLeft / 2), x + (radiusTopLeft / 2), y, x + radiusTopLeft, y,
|
|
90
|
+
'Z',
|
|
91
|
+
] as unknown as Highcharts.SVGPathArray
|
|
92
|
+
point.shapeArgs = {
|
|
93
|
+
d,
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}(Highcharts as TCustomHighcharts))
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @see [Designs for Content - Student](https://marvelapp.com/adf8ab3/screen/68221510)
|
|
103
|
+
*/
|
|
104
|
+
@Component
|
|
105
|
+
export default class Bar extends Vue {
|
|
106
|
+
@Prop({ default: '' }) title!: string
|
|
107
|
+
@Prop() data!: Highcharts.PointOptionsObject[]
|
|
108
|
+
@Prop() formatterFunc!:
|
|
109
|
+
Highcharts.FormatterCallbackFunction<Highcharts.AxisLabelsFormatterContextObject>
|
|
110
|
+
@Prop() type!: 'percent' | 'distribution'
|
|
111
|
+
@Prop({ default: null }) yAxisTitle!: string
|
|
112
|
+
@Prop({ default: null }) max!: number
|
|
113
|
+
@Prop({ default: false }) hideAverageLine!: boolean
|
|
114
|
+
@Prop({ default: 'normal' }) size!: 'normal' | 'small'
|
|
115
|
+
@Prop() barColor?: string
|
|
116
|
+
@Prop({ default: '' }) description!: string
|
|
117
|
+
@Prop({ default: false }) isDarkMode!: boolean
|
|
118
|
+
|
|
119
|
+
chartId = `chart${Math.round(Math.random() * 10000)}`
|
|
120
|
+
|
|
121
|
+
mounted () {
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
123
|
+
const self = this
|
|
124
|
+
|
|
125
|
+
const chartOptions: TCustomChartOptions = {
|
|
126
|
+
accessibility: {
|
|
127
|
+
description: this.description,
|
|
128
|
+
},
|
|
129
|
+
tooltip: {
|
|
130
|
+
formatter: function () {
|
|
131
|
+
return String(this.y)
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
legend: {
|
|
135
|
+
enabled: false,
|
|
136
|
+
},
|
|
137
|
+
credits: {
|
|
138
|
+
enabled: false,
|
|
139
|
+
},
|
|
140
|
+
chart: {
|
|
141
|
+
type: 'column',
|
|
142
|
+
spacingLeft: 0,
|
|
143
|
+
spacingRight: 0,
|
|
144
|
+
spacingBottom: 6,
|
|
145
|
+
backgroundColor: 'transparent',
|
|
146
|
+
},
|
|
147
|
+
title: {
|
|
148
|
+
text: this.title,
|
|
149
|
+
align: 'left',
|
|
150
|
+
style: {
|
|
151
|
+
color: !this.isDarkMode ? BrandColors.brandBlack : BrandColors.fog,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
xAxis: {
|
|
155
|
+
tickLength: 0,
|
|
156
|
+
type: 'category',
|
|
157
|
+
},
|
|
158
|
+
yAxis: {
|
|
159
|
+
min: 0,
|
|
160
|
+
max: this.max,
|
|
161
|
+
opposite: true,
|
|
162
|
+
labels: {
|
|
163
|
+
formatter: this.formatterFunc || function () {
|
|
164
|
+
return String(this.value)
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
title: {
|
|
168
|
+
text: this.yAxisTitle,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
colors: [
|
|
172
|
+
this.barColor
|
|
173
|
+
? this.barColor || ''
|
|
174
|
+
: this.isDarkMode
|
|
175
|
+
? BrandColors.grayBackground || ''
|
|
176
|
+
: BrandColors.brandBlack || '',
|
|
177
|
+
],
|
|
178
|
+
plotOptions: {
|
|
179
|
+
series: {
|
|
180
|
+
groupPadding: 0.1,
|
|
181
|
+
pointPadding: 0,
|
|
182
|
+
},
|
|
183
|
+
column: {
|
|
184
|
+
minPointLength: 3,
|
|
185
|
+
maxPointWidth: 100,
|
|
186
|
+
borderWidth: 0,
|
|
187
|
+
borderRadiusTopLeft: 3,
|
|
188
|
+
borderRadiusTopRight: 3,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
series: [
|
|
192
|
+
{
|
|
193
|
+
type: 'column',
|
|
194
|
+
data: this.data,
|
|
195
|
+
borderColor: this.barColor
|
|
196
|
+
? this.barColor
|
|
197
|
+
: this.isDarkMode
|
|
198
|
+
? BrandColors.grayBackground
|
|
199
|
+
: BrandColors.brandBlack,
|
|
200
|
+
states: {
|
|
201
|
+
hover: {
|
|
202
|
+
borderColor: BrandColors.bananaBread,
|
|
203
|
+
color: BrandColors.bananaBread,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (this.type === 'percent') {
|
|
211
|
+
chartOptions.tooltip = {
|
|
212
|
+
useHTML: true,
|
|
213
|
+
borderWidth: 0,
|
|
214
|
+
padding: 0,
|
|
215
|
+
borderRadius: 12,
|
|
216
|
+
backgroundColor: 'rgba(28, 47, 60, 0.95)',
|
|
217
|
+
shadow: false,
|
|
218
|
+
style: {
|
|
219
|
+
fontFamily: '\'Avenir Next\', \'Muli\', sans-serif',
|
|
220
|
+
},
|
|
221
|
+
formatter: function () {
|
|
222
|
+
const customInfo = (this.point as unknown as { info: string }).info
|
|
223
|
+
return `
|
|
224
|
+
<div class="uikit-bar__tooltip">
|
|
225
|
+
<div class="uikit-bar__tooltip-percent">${this.y}%</div>
|
|
226
|
+
${customInfo ? `<div class="uikit-bar__tooltip-date">${customInfo}</div>` : ''}
|
|
227
|
+
</div>
|
|
228
|
+
`
|
|
229
|
+
},
|
|
230
|
+
}
|
|
231
|
+
chartOptions.xAxis = {
|
|
232
|
+
tickLength: 0,
|
|
233
|
+
lineColor: !this.isDarkMode ? BrandColors.fog : BrandColors.ash,
|
|
234
|
+
labels: {
|
|
235
|
+
enabled: false,
|
|
236
|
+
},
|
|
237
|
+
}
|
|
238
|
+
chartOptions.yAxis = {
|
|
239
|
+
min: 0,
|
|
240
|
+
max: 100,
|
|
241
|
+
opposite: true,
|
|
242
|
+
gridLineColor: !this.isDarkMode ? BrandColors.fog : BrandColors.ash,
|
|
243
|
+
plotLines: (this.data.length > 1 && !this.hideAverageLine) ? [
|
|
244
|
+
{
|
|
245
|
+
dashStyle: 'Dash',
|
|
246
|
+
value: Math.round(
|
|
247
|
+
(this.data.reduce((accum, data) => accum + Number(data.y), 0) / this.data.length)
|
|
248
|
+
),
|
|
249
|
+
width: 2,
|
|
250
|
+
zIndex: 5,
|
|
251
|
+
color: BrandColors.electricViolet,
|
|
252
|
+
},
|
|
253
|
+
] : [],
|
|
254
|
+
labels: {
|
|
255
|
+
useHTML: true,
|
|
256
|
+
y: 4,
|
|
257
|
+
style: {
|
|
258
|
+
textAlign: 'right',
|
|
259
|
+
color: this.isDarkMode ? 'rgba(255, 255, 255, 0.85)' : BrandColors.ash,
|
|
260
|
+
},
|
|
261
|
+
formatter: this.formatterFunc || function () {
|
|
262
|
+
if (this.value === 0) {
|
|
263
|
+
return `${String(this.value)}%`
|
|
264
|
+
}
|
|
265
|
+
return `
|
|
266
|
+
<div>${String(this.value)}%</div>
|
|
267
|
+
<div class="
|
|
268
|
+
uikit-bar__label-circle
|
|
269
|
+
${self.getScoreColor(Number(this.value))}
|
|
270
|
+
" />
|
|
271
|
+
`
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
tickPositions: [ 0, 50, 75, 100 ],
|
|
275
|
+
title: {
|
|
276
|
+
text: null,
|
|
277
|
+
},
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (this.size === 'small') {
|
|
282
|
+
chartOptions.plotOptions.column = {
|
|
283
|
+
minPointLength: 3,
|
|
284
|
+
maxPointWidth: 100,
|
|
285
|
+
borderRadiusTopLeft: 8,
|
|
286
|
+
borderRadiusTopRight: 8,
|
|
287
|
+
}
|
|
288
|
+
chartOptions.yAxis = {
|
|
289
|
+
...(chartOptions.yAxis || {}),
|
|
290
|
+
labels: {
|
|
291
|
+
...((chartOptions.yAxis as Highcharts.YAxisOptions)?.labels),
|
|
292
|
+
formatter: function () {
|
|
293
|
+
return `${String(this.value)}%`
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const renderedChart = chart(this.chartId, chartOptions)
|
|
300
|
+
this.$nextTick(() => {
|
|
301
|
+
renderedChart.reflow()
|
|
302
|
+
})
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
getScoreColor (score: number) {
|
|
306
|
+
return score <= 50 ? 'red' : score < 75 ? 'yellow' : 'green'
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
</script>
|
|
310
|
+
|
|
311
|
+
<style lang="scss">
|
|
312
|
+
@import '../../styles/colors';
|
|
313
|
+
|
|
314
|
+
.uikit-bar {
|
|
315
|
+
max-height: 100%;
|
|
316
|
+
max-width: 100%;
|
|
317
|
+
|
|
318
|
+
&__tooltip {
|
|
319
|
+
text-align: center;
|
|
320
|
+
width: 75px;
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
justify-content: center;
|
|
324
|
+
height: 48px;
|
|
325
|
+
flex-direction: column;
|
|
326
|
+
box-shadow: 0 1px 4px 0 rgba($brand-black, 0.16);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&__tooltip-percent {
|
|
330
|
+
font-size: 14px;
|
|
331
|
+
line-height: 17px;
|
|
332
|
+
color: $white;
|
|
333
|
+
font-weight: 600;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&__tooltip-date {
|
|
337
|
+
font-size: 12px;
|
|
338
|
+
line-height: 14px;
|
|
339
|
+
color: $fog;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&__label-circle {
|
|
343
|
+
width: 7px;
|
|
344
|
+
height: 7px;
|
|
345
|
+
border-radius: 7px;
|
|
346
|
+
background: black;
|
|
347
|
+
margin-top: 5px;
|
|
348
|
+
text-align: right;
|
|
349
|
+
display: inline-block;
|
|
350
|
+
|
|
351
|
+
&.red {
|
|
352
|
+
background: $brand-red;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
&.yellow {
|
|
356
|
+
background: $butterscotch;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
&.green {
|
|
360
|
+
background: $green;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<Pie
|
|
4
|
+
:data="[{
|
|
5
|
+
'y': 10
|
|
6
|
+
}, {
|
|
7
|
+
'y': 30
|
|
8
|
+
}, {
|
|
9
|
+
'y': 5
|
|
10
|
+
}, {
|
|
11
|
+
'y': 55
|
|
12
|
+
}]"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
.uikit-pie {
|
|
18
|
+
height: 182px;
|
|
19
|
+
width: 182px;
|
|
20
|
+
display: block;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :id="chartId" class="uikit-pie" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import { Component, Vue, Prop } from 'vue-facing-decorator'
|
|
7
|
+
import Highcharts, { chart } from 'highcharts'
|
|
8
|
+
import BrandColors from '../../pocketprep-export.module.scss'
|
|
9
|
+
|
|
10
|
+
@Component
|
|
11
|
+
export default class Pie extends Vue {
|
|
12
|
+
@Prop({ default: '' }) title!: string
|
|
13
|
+
@Prop() data!: Highcharts.PointOptionsObject[]
|
|
14
|
+
@Prop() formatterFunc!:
|
|
15
|
+
Highcharts.FormatterCallbackFunction<Highcharts.AxisLabelsFormatterContextObject>
|
|
16
|
+
@Prop() type!: 'percent' | 'distribution'
|
|
17
|
+
@Prop({ default: null }) yAxisTitle!: string
|
|
18
|
+
@Prop({ default: null }) max!: number
|
|
19
|
+
@Prop({ default: 'normal' }) size!: 'normal' | 'small'
|
|
20
|
+
|
|
21
|
+
chartId = `chart${Math.round(Math.random() * 10000)}`
|
|
22
|
+
|
|
23
|
+
mounted () {
|
|
24
|
+
const chartOptions: Highcharts.Options = {
|
|
25
|
+
chart: {
|
|
26
|
+
plotShadow: false,
|
|
27
|
+
type: 'pie',
|
|
28
|
+
margin: [ 0,0,0,0 ],
|
|
29
|
+
spacing: [ 0,0,0,0 ],
|
|
30
|
+
},
|
|
31
|
+
title: undefined,
|
|
32
|
+
tooltip: {
|
|
33
|
+
enabled: false,
|
|
34
|
+
},
|
|
35
|
+
plotOptions: {
|
|
36
|
+
pie: {
|
|
37
|
+
slicedOffset: 0,
|
|
38
|
+
allowPointSelect: false,
|
|
39
|
+
size: '100%',
|
|
40
|
+
dataLabels: {
|
|
41
|
+
enabled: false,
|
|
42
|
+
},
|
|
43
|
+
states: {
|
|
44
|
+
inactive: {
|
|
45
|
+
opacity: 1,
|
|
46
|
+
},
|
|
47
|
+
hover: {
|
|
48
|
+
enabled: false,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
series: {
|
|
53
|
+
color: BrandColors.brandBlue,
|
|
54
|
+
borderWidth: 3,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
series: [{
|
|
58
|
+
colors: [
|
|
59
|
+
BrandColors.green || '',
|
|
60
|
+
BrandColors.butterscotch || '',
|
|
61
|
+
BrandColors.electricViolet || '',
|
|
62
|
+
BrandColors.brandBlue || '',
|
|
63
|
+
],
|
|
64
|
+
type: 'pie',
|
|
65
|
+
data: this.data,
|
|
66
|
+
}],
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const pieChart = chart(this.chartId, chartOptions)
|
|
70
|
+
|
|
71
|
+
this.$nextTick(() => {
|
|
72
|
+
pieChart.reflow()
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style lang="scss">
|
|
79
|
+
@import '../../styles/colors';
|
|
80
|
+
@import '../../styles/breakpoints';
|
|
81
|
+
|
|
82
|
+
.uikit-pie {
|
|
83
|
+
max-height: 100%;
|
|
84
|
+
max-width: 100%;
|
|
85
|
+
position: relative;
|
|
86
|
+
|
|
87
|
+
&::before {
|
|
88
|
+
content: '';
|
|
89
|
+
position: absolute;
|
|
90
|
+
width: 108px;
|
|
91
|
+
height: 108px;
|
|
92
|
+
border-radius: 108px;
|
|
93
|
+
background-color: $white;
|
|
94
|
+
z-index: 1;
|
|
95
|
+
left: 50%;
|
|
96
|
+
margin-left: -54px;
|
|
97
|
+
top: 50%;
|
|
98
|
+
margin-top: -54px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.highcharts-credits {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<div class="control-container">
|
|
5
|
+
<SegmentControl
|
|
6
|
+
option1="Hide"
|
|
7
|
+
option2="Show"
|
|
8
|
+
@change="changeControl1"
|
|
9
|
+
/>
|
|
10
|
+
Value: {{ control1 }}
|
|
11
|
+
</div>
|
|
12
|
+
<div class="control-container">
|
|
13
|
+
<SegmentControl
|
|
14
|
+
option1="Distribution"
|
|
15
|
+
option2="Bar Graph"
|
|
16
|
+
@change="changeControl2"
|
|
17
|
+
/>
|
|
18
|
+
Value: {{ control2 }}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
export default {
|
|
25
|
+
data () {
|
|
26
|
+
return {
|
|
27
|
+
control1: 1,
|
|
28
|
+
control2: 1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
changeControl1 (option) {
|
|
33
|
+
this.control1 = option
|
|
34
|
+
},
|
|
35
|
+
changeControl2 (option) {
|
|
36
|
+
this.control2 = option
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
.control-container {
|
|
44
|
+
padding: 10px;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="uikit-segment-control"
|
|
4
|
+
tabindex="0"
|
|
5
|
+
@keyup.enter="toggleOption"
|
|
6
|
+
@keydown.prevent.space="toggleOption"
|
|
7
|
+
@mousedown.prevent
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="uikit-segment-control__option"
|
|
11
|
+
:class="{ 'uikit-segment-control__option--active': activeOption === 1 }"
|
|
12
|
+
@click.stop="optionClicked(1)"
|
|
13
|
+
>
|
|
14
|
+
{{ option1 }}
|
|
15
|
+
</div>
|
|
16
|
+
<div
|
|
17
|
+
class="uikit-segment-control__option"
|
|
18
|
+
:class="{ 'uikit-segment-control__option--active': activeOption === 2 }"
|
|
19
|
+
@click.stop="optionClicked(2)"
|
|
20
|
+
>
|
|
21
|
+
{{ option2 }}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script lang="ts">
|
|
27
|
+
import { Component, Vue, Prop, Emit } from 'vue-facing-decorator'
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @see [Designs for Controls](https://marvelapp.com/adf8ab3/screen/69484212)
|
|
31
|
+
*/
|
|
32
|
+
@Component
|
|
33
|
+
export default class SegmentControl extends Vue {
|
|
34
|
+
@Prop({ default: 'Option 1' }) option1!: string
|
|
35
|
+
@Prop({ default: 'Option 2' }) option2!: string
|
|
36
|
+
@Prop({ default: 1 }) defaultOption!: string
|
|
37
|
+
|
|
38
|
+
activeOption = this.defaultOption || 1
|
|
39
|
+
|
|
40
|
+
@Emit('change')
|
|
41
|
+
toggleOption () {
|
|
42
|
+
this.activeOption = this.activeOption === 2 ? 1 : 2
|
|
43
|
+
return this.activeOption
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@Emit('change')
|
|
47
|
+
optionClicked (option: number) {
|
|
48
|
+
this.activeOption = option
|
|
49
|
+
return option
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style lang="scss">
|
|
55
|
+
@import '../../styles/colors';
|
|
56
|
+
|
|
57
|
+
.uikit-segment-control {
|
|
58
|
+
position: relative;
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
outline: none;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
border-radius: 4px;
|
|
63
|
+
border: 1px solid change-color($brand-blue, $alpha: 0.45);
|
|
64
|
+
color: change-color($brand-blue, $alpha: 0.45);
|
|
65
|
+
background-color: white;
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
letter-spacing: 0.2px;
|
|
69
|
+
user-select: none;
|
|
70
|
+
line-height: 16px;
|
|
71
|
+
text-align: center;
|
|
72
|
+
|
|
73
|
+
&:focus {
|
|
74
|
+
&::before {
|
|
75
|
+
content: '';
|
|
76
|
+
position: absolute;
|
|
77
|
+
z-index: 0;
|
|
78
|
+
top: -3px;
|
|
79
|
+
bottom: -3px;
|
|
80
|
+
left: -3px;
|
|
81
|
+
right: -3px;
|
|
82
|
+
border: 1px solid $brand-blue;
|
|
83
|
+
border-radius: 5px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__option {
|
|
88
|
+
position: relative;
|
|
89
|
+
z-index: 1;
|
|
90
|
+
padding: 2px 12px;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
|
|
93
|
+
&--active {
|
|
94
|
+
position: relative;
|
|
95
|
+
z-index: 2;
|
|
96
|
+
color: $white;
|
|
97
|
+
background-color: $brand-blue;
|
|
98
|
+
box-shadow: 0 0 0 1px $brand-blue;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:not(&--active) {
|
|
102
|
+
&:hover {
|
|
103
|
+
background-color: change-color($sky-blue, $alpha: 0.45);
|
|
104
|
+
color: change-color($brand-blue, $alpha: 0.75);
|
|
105
|
+
|
|
106
|
+
&:first-child {
|
|
107
|
+
box-shadow: 4px 0 0 0 change-color($sky-blue, $alpha: 0.45);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:last-child {
|
|
111
|
+
box-shadow: -4px 0 0 0 change-color($sky-blue, $alpha: 0.45);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
</style>
|