@pocketprep/ui-kit 2.0.40 → 3.0.1
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/index.d.ts +6 -62
- 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 +76 -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/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,341 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="uikit-search"
|
|
4
|
+
@mouseover="hover = true"
|
|
5
|
+
@mouseout="hover = false"
|
|
6
|
+
>
|
|
7
|
+
<div @click="focusInput">
|
|
8
|
+
<Icon
|
|
9
|
+
v-dark="isDarkMode"
|
|
10
|
+
type="search"
|
|
11
|
+
class="uikit-search__icon"
|
|
12
|
+
aria-hidden="true"
|
|
13
|
+
:class="{
|
|
14
|
+
[`uikit-search__icon--${type}`]: true,
|
|
15
|
+
'uikit-search__icon--hover': hover,
|
|
16
|
+
'uikit-search__icon--focus': focus,
|
|
17
|
+
'uikit-search__icon--disabled': disabled,
|
|
18
|
+
}"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
<input
|
|
22
|
+
ref="search__field"
|
|
23
|
+
v-dark="isDarkMode"
|
|
24
|
+
class="uikit-search__input"
|
|
25
|
+
:class="{
|
|
26
|
+
[`uikit-search__input--${type}`]: true,
|
|
27
|
+
'uikit-search__input--show-results-info': !!searchResultInfo,
|
|
28
|
+
'uikit-search__input--hover': hover,
|
|
29
|
+
'uikit-search__input--focus': focus,
|
|
30
|
+
'uikit-search__input--disabled': disabled,
|
|
31
|
+
}"
|
|
32
|
+
:value="modelValue"
|
|
33
|
+
:maxlength="maxlength"
|
|
34
|
+
:placeholder="placeholder"
|
|
35
|
+
:autofocus="autoFocus"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
@input="valueChange"
|
|
38
|
+
@focus="focus = true"
|
|
39
|
+
@blur="focus = false"
|
|
40
|
+
>
|
|
41
|
+
<div
|
|
42
|
+
v-if="searchResultInfo"
|
|
43
|
+
v-dark="isDarkMode"
|
|
44
|
+
class="uikit-search__results"
|
|
45
|
+
>
|
|
46
|
+
{{ searchResultInfo }}
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
v-if="modelValue && !disabled"
|
|
50
|
+
v-dark="isDarkMode"
|
|
51
|
+
tabindex="0"
|
|
52
|
+
class="uikit-search__clear"
|
|
53
|
+
:class="{
|
|
54
|
+
[`uikit-search__clear--${type}`]: true,
|
|
55
|
+
'uikit-search__clear--hover': clearHover,
|
|
56
|
+
'uikit-search__clear--focus': clearFocus,
|
|
57
|
+
}"
|
|
58
|
+
aria-label="Clear search"
|
|
59
|
+
@focus="clearFocus = true"
|
|
60
|
+
@blur="clearFocus = false"
|
|
61
|
+
@mouseover="clearHover = true"
|
|
62
|
+
@mouseout="clearHover = false"
|
|
63
|
+
@click="clearSearch"
|
|
64
|
+
@keydown="keyDownClearSearch"
|
|
65
|
+
>
|
|
66
|
+
<Icon
|
|
67
|
+
type="close"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script lang="ts">
|
|
74
|
+
import { Component, Vue, Prop, Emit } from 'vue-facing-decorator'
|
|
75
|
+
import Icon from '../Icons/Icon.vue'
|
|
76
|
+
import { dark } from '../../directives'
|
|
77
|
+
|
|
78
|
+
@Component({
|
|
79
|
+
directives: {
|
|
80
|
+
dark,
|
|
81
|
+
},
|
|
82
|
+
components: {
|
|
83
|
+
Icon,
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
export default class Search extends Vue {
|
|
87
|
+
@Prop({ default: 'gray' }) type!: 'white' | 'gray'
|
|
88
|
+
@Prop() placeholder?: string
|
|
89
|
+
@Prop({ default: '524288' }) maxlength?: string // that's the default input field length
|
|
90
|
+
@Prop() modelValue!: string
|
|
91
|
+
@Prop({ default: false }) autoFocus!: boolean
|
|
92
|
+
@Prop({ default: '' }) searchResultInfo?: string
|
|
93
|
+
@Prop({ default: false }) isDarkMode!: boolean
|
|
94
|
+
@Prop({ default: false }) disabled!: boolean
|
|
95
|
+
|
|
96
|
+
hover = false
|
|
97
|
+
focus = false
|
|
98
|
+
clearHover = false
|
|
99
|
+
clearFocus = false
|
|
100
|
+
|
|
101
|
+
keyDownClearSearch (e: KeyboardEvent) {
|
|
102
|
+
// select option on enter or space
|
|
103
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
104
|
+
e.preventDefault()
|
|
105
|
+
this.clearSearch()
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
focusInput () {
|
|
110
|
+
(this.$refs['search__field'] as HTMLInputElement).focus()
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@Emit('update:modelValue')
|
|
114
|
+
valueChange ($event: Event) {
|
|
115
|
+
return ($event.target as HTMLInputElement).value
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@Emit('update:modelValue')
|
|
119
|
+
clearSearch () {
|
|
120
|
+
this.focusInput()
|
|
121
|
+
return ''
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<style lang="scss">
|
|
127
|
+
@import '../../styles/colors';
|
|
128
|
+
@import '../../styles/breakpoints';
|
|
129
|
+
|
|
130
|
+
.uikit-search {
|
|
131
|
+
position: relative;
|
|
132
|
+
|
|
133
|
+
&__icon {
|
|
134
|
+
position: absolute;
|
|
135
|
+
left: 7px;
|
|
136
|
+
top: 5px;
|
|
137
|
+
width: 15px;
|
|
138
|
+
height: 16px;
|
|
139
|
+
|
|
140
|
+
&--white {
|
|
141
|
+
top: 10px;
|
|
142
|
+
left: 8px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&--disabled,
|
|
146
|
+
&--dark {
|
|
147
|
+
color: $pewter;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&--hover {
|
|
151
|
+
&:not(.uikit-search__icon--disabled) {
|
|
152
|
+
color: $brand-blue;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&--dark {
|
|
156
|
+
:not(.uikit-search__icon--disabled) {
|
|
157
|
+
color: $banana-bread;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&--focus {
|
|
163
|
+
&:not(.uikit-search__icon--disabled) {
|
|
164
|
+
color: $brand-blue;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&--dark {
|
|
168
|
+
:not(.uikit-search__icon--disabled) {
|
|
169
|
+
color: $banana-bread;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__clear {
|
|
176
|
+
position: absolute;
|
|
177
|
+
right: 4px;
|
|
178
|
+
top: 4px;
|
|
179
|
+
width: 20px;
|
|
180
|
+
height: 20px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
user-select: none;
|
|
183
|
+
color: $slate-01;
|
|
184
|
+
outline: none;
|
|
185
|
+
border: 1px solid $white;
|
|
186
|
+
border-radius: 1px;
|
|
187
|
+
|
|
188
|
+
&--white {
|
|
189
|
+
top: 8px;
|
|
190
|
+
right: 6px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&--gray-background {
|
|
194
|
+
border-color: $gray-background;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&--disabled {
|
|
198
|
+
border-color: $gray-background;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&--dark {
|
|
202
|
+
color: rgba($white, 0.8);
|
|
203
|
+
border-color: $moonlit-ocean;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&--hover {
|
|
207
|
+
svg {
|
|
208
|
+
color: $brand-blue;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&--dark svg {
|
|
212
|
+
color: $butterscotch;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&--focus {
|
|
217
|
+
svg {
|
|
218
|
+
box-sizing: border-box;
|
|
219
|
+
border: 1px solid $brand-blue;
|
|
220
|
+
border-radius: 1px;
|
|
221
|
+
color: $brand-blue;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&--dark svg {
|
|
225
|
+
border-color: $butterscotch;
|
|
226
|
+
color: $butterscotch;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
svg {
|
|
231
|
+
height: 100%;
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&__results {
|
|
237
|
+
position: absolute;
|
|
238
|
+
top: 10px;
|
|
239
|
+
cursor: default;
|
|
240
|
+
user-select: none;
|
|
241
|
+
right: 35px;
|
|
242
|
+
font-size: 13px;
|
|
243
|
+
line-height: 18px;
|
|
244
|
+
color: $slate-01;
|
|
245
|
+
|
|
246
|
+
&--dark {
|
|
247
|
+
color: $white;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&__input {
|
|
252
|
+
background-color: $white;
|
|
253
|
+
border: 1px solid rgba($pewter, 0.85);
|
|
254
|
+
color: $brand-black;
|
|
255
|
+
border-radius: 4px;
|
|
256
|
+
caret-color: $brand-blue;
|
|
257
|
+
padding: 9px 30px;
|
|
258
|
+
font-size: 16px;
|
|
259
|
+
line-height: 15px;
|
|
260
|
+
height: 28px;
|
|
261
|
+
width: 100%;
|
|
262
|
+
box-sizing: border-box;
|
|
263
|
+
outline: none;
|
|
264
|
+
appearance: none;
|
|
265
|
+
|
|
266
|
+
&--show-results-info {
|
|
267
|
+
padding-right: 100px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&::placeholder {
|
|
271
|
+
color: $slate;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&--dark {
|
|
275
|
+
border-color: $pewter;
|
|
276
|
+
background-color: $moonlit-ocean !important;
|
|
277
|
+
caret-color: $banana-bread;
|
|
278
|
+
color: $white;
|
|
279
|
+
|
|
280
|
+
&::placeholder {
|
|
281
|
+
color: $pewter;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&--gray {
|
|
286
|
+
background: $gray-background;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
&--disabled {
|
|
290
|
+
background: $gray-background;
|
|
291
|
+
border-color: $gray-background;
|
|
292
|
+
|
|
293
|
+
&--dark {
|
|
294
|
+
background: $moonlit-ocean;
|
|
295
|
+
border-color: $moonlit-ocean;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&--white {
|
|
300
|
+
height: 36px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&--hover {
|
|
304
|
+
&:not(.uikit-search__input--disabled) {
|
|
305
|
+
border: 1px solid #a7c7ff;
|
|
306
|
+
|
|
307
|
+
&::placeholder {
|
|
308
|
+
color: $brand-blue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
&--dark {
|
|
313
|
+
&:not(.uikit-search__input--disabled) {
|
|
314
|
+
border-color: $banana-bread;
|
|
315
|
+
|
|
316
|
+
&::placeholder {
|
|
317
|
+
color: $banana-bread;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&--focus {
|
|
324
|
+
&:not(.uikit-search__input--disabled) {
|
|
325
|
+
border: 1px solid $brand-blue;
|
|
326
|
+
background: $white;
|
|
327
|
+
|
|
328
|
+
&::placeholder {
|
|
329
|
+
color: $slate-01;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&--dark {
|
|
334
|
+
&:not(.uikit-search__input--disabled) {
|
|
335
|
+
border-color: $banana-bread;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
</style>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
```vue
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<Button @click="isDarkMode = !isDarkMode">{{ isDarkMode ? 'Disable Dark Mode' : 'Enable Dark Mode' }}</Button>
|
|
5
|
+
<Button @click="showSidePanel = true">Side Panel</Button>
|
|
6
|
+
<Button @click="showSidePanelTabs = true">Side Panel w/ Tabs</Button>
|
|
7
|
+
<Button @click="showMediumSidePanelTabs = true">Medium Side Panel w/ Tabs</Button>
|
|
8
|
+
<SidePanel
|
|
9
|
+
v-if="showSidePanelTabs"
|
|
10
|
+
name="Example Panel"
|
|
11
|
+
:tabs="tabs"
|
|
12
|
+
:activeTabName="activeTab"
|
|
13
|
+
:isDarkMode="isDarkMode"
|
|
14
|
+
@close="showSidePanelTabs = false"
|
|
15
|
+
@selectTab="selectTab"
|
|
16
|
+
>
|
|
17
|
+
<template v-if="activeTab === 'Tab 1'">
|
|
18
|
+
Tab 1 tab content
|
|
19
|
+
</template>
|
|
20
|
+
<template v-if="activeTab === 'Another Tab'">
|
|
21
|
+
Tab 1 tab content<br>
|
|
22
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,<br>
|
|
23
|
+
<br>
|
|
24
|
+
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam,<br>
|
|
25
|
+
<br>
|
|
26
|
+
quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?<br>
|
|
27
|
+
<br>
|
|
28
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,<br>
|
|
29
|
+
<br>
|
|
30
|
+
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam,<br>
|
|
31
|
+
<br>
|
|
32
|
+
quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?<br>
|
|
33
|
+
<br>
|
|
34
|
+
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam,<br>
|
|
35
|
+
<br>
|
|
36
|
+
quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
|
|
37
|
+
</template>
|
|
38
|
+
<template v-if="activeTab === 'Last Tab'">
|
|
39
|
+
Last Tab tab content
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<template #action>
|
|
43
|
+
<Button :isDarkMode="isDarkMode">Submit</Button>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<template #details>
|
|
47
|
+
Custom footer text
|
|
48
|
+
</template>
|
|
49
|
+
</SidePanel>
|
|
50
|
+
<SidePanel
|
|
51
|
+
v-if="showMediumSidePanelTabs"
|
|
52
|
+
width="medium"
|
|
53
|
+
name="Example Panel Example Panel Example Panel"
|
|
54
|
+
:tabs="tabs"
|
|
55
|
+
:activeTabName="activeTab"
|
|
56
|
+
:isDarkMode="isDarkMode"
|
|
57
|
+
@close="showMediumSidePanelTabs = false"
|
|
58
|
+
@selectTab="selectTab"
|
|
59
|
+
>
|
|
60
|
+
<template v-if="activeTab === 'Tab 1'">
|
|
61
|
+
Tab 1 tab content<br>
|
|
62
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,<br>
|
|
63
|
+
<br>
|
|
64
|
+
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
|
|
65
|
+
</template>
|
|
66
|
+
<template v-if="activeTab === 'Another Tab'">
|
|
67
|
+
Another Tab tab content
|
|
68
|
+
</template>
|
|
69
|
+
<template v-if="activeTab === 'Last Tab'">
|
|
70
|
+
Last Tab tab content
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<template #action>
|
|
74
|
+
<Button :isDarkMode="isDarkMode">Submit</Button>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<template #details>
|
|
78
|
+
Custom footer text
|
|
79
|
+
</template>
|
|
80
|
+
</SidePanel>
|
|
81
|
+
<SidePanel
|
|
82
|
+
v-if="showSidePanel"
|
|
83
|
+
name="Example Panel"
|
|
84
|
+
:isDarkMode="isDarkMode"
|
|
85
|
+
@close="showSidePanel = false"
|
|
86
|
+
>
|
|
87
|
+
Side panel main content
|
|
88
|
+
|
|
89
|
+
<Calendar v-model="calendar" />
|
|
90
|
+
|
|
91
|
+
<template #action>
|
|
92
|
+
<Button :isDarkMode="isDarkMode">Submit</Button>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<template #details>
|
|
96
|
+
Custom footer text
|
|
97
|
+
</template>
|
|
98
|
+
</SidePanel>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<script>
|
|
103
|
+
export default {
|
|
104
|
+
data() {
|
|
105
|
+
return {
|
|
106
|
+
showSidePanel: false,
|
|
107
|
+
showSidePanelTabs: false,
|
|
108
|
+
showMediumSidePanelTabs: false,
|
|
109
|
+
isDarkMode: false,
|
|
110
|
+
calendar: '',
|
|
111
|
+
tabs: [
|
|
112
|
+
'Tab 1',
|
|
113
|
+
'Another Tab',
|
|
114
|
+
'Last Tab',
|
|
115
|
+
],
|
|
116
|
+
activeTab: 'Another Tab',
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
methods: {
|
|
120
|
+
selectTab (tab) {
|
|
121
|
+
this.activeTab = tab
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
</script>
|
|
126
|
+
```
|