@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.
Files changed (305) hide show
  1. package/{.eslintrc.js → .eslintrc.cjs} +16 -17
  2. package/dist/@pocketprep/ui-kit.js +18856 -0
  3. package/dist/@pocketprep/ui-kit.js.map +1 -0
  4. package/dist/@pocketprep/ui-kit.umd.cjs +28 -0
  5. package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -0
  6. package/dist/style.css +1 -0
  7. package/lib/SVGDefinitions.vue +85 -0
  8. package/lib/assets/emojis/tada.png +0 -0
  9. package/lib/assets/halftones/halftone-black.png +0 -0
  10. package/lib/assets/halftones/halftone-blue.png +0 -0
  11. package/lib/assets/halftones/halftone-green.png +0 -0
  12. package/lib/assets/halftones/halftone-purple.png +0 -0
  13. package/lib/assets/halftones/halftone-red.png +0 -0
  14. package/lib/assets/halftones/halftone-yellow.png +0 -0
  15. package/lib/assets/question/paywall-dark.png +0 -0
  16. package/lib/assets/question/paywall-light.png +0 -0
  17. package/lib/components/Banners/Banner.md +41 -0
  18. package/lib/components/Banners/Banner.vue +87 -0
  19. package/lib/components/BundleIcons/AMTA.vue +134 -0
  20. package/lib/components/BundleIcons/BundleIcon.md +60 -0
  21. package/lib/components/BundleIcons/BundleIcon.vue +111 -0
  22. package/lib/components/Bundles/BundleList.md +63 -0
  23. package/lib/components/Bundles/BundleList.vue +170 -0
  24. package/lib/components/Bundles/BundleSearch.md +195 -0
  25. package/lib/components/Bundles/BundleSearch.vue +573 -0
  26. package/lib/components/Bundles/PremiumPill.md +23 -0
  27. package/lib/components/Bundles/PremiumPill.vue +43 -0
  28. package/lib/components/Buttons/Button.md +99 -0
  29. package/lib/components/Buttons/Button.vue +496 -0
  30. package/lib/components/Buttons/Link.md +58 -0
  31. package/lib/components/Buttons/Link.vue +192 -0
  32. package/lib/components/Buttons/Tab.md +35 -0
  33. package/lib/components/Buttons/Tab.vue +103 -0
  34. package/lib/components/Calendar/Calendar.md +18 -0
  35. package/lib/components/Calendar/Calendar.vue +162 -0
  36. package/lib/components/Charts/Bar.md +123 -0
  37. package/lib/components/Charts/Bar.vue +364 -0
  38. package/lib/components/Charts/Pie.md +23 -0
  39. package/lib/components/Charts/Pie.vue +105 -0
  40. package/lib/components/Controls/SegmentControl.md +47 -0
  41. package/lib/components/Controls/SegmentControl.vue +117 -0
  42. package/lib/components/Controls/Slider.md +67 -0
  43. package/lib/components/Controls/Slider.vue +358 -0
  44. package/lib/components/Controls/ToggleSwitch.md +56 -0
  45. package/lib/components/Controls/ToggleSwitch.vue +160 -0
  46. package/lib/components/Exams/ExamCard.md +45 -0
  47. package/lib/components/Exams/ExamCard.vue +257 -0
  48. package/lib/components/Exams/ExamMenuCard.md +90 -0
  49. package/lib/components/Exams/ExamMenuCard.vue +218 -0
  50. package/lib/components/Filters/FilterDropdown.md +59 -0
  51. package/lib/components/Filters/FilterDropdown.vue +176 -0
  52. package/lib/components/Filters/FilterOptions.md +65 -0
  53. package/lib/components/Filters/FilterOptions.vue +265 -0
  54. package/lib/components/Filters/filterOptions.d.ts +10 -0
  55. package/lib/components/Forms/Checkbox.md +52 -0
  56. package/lib/components/Forms/Checkbox.vue +184 -0
  57. package/lib/components/Forms/CheckboxOption.md +37 -0
  58. package/lib/components/Forms/CheckboxOption.vue +173 -0
  59. package/lib/components/Forms/Errors.md +23 -0
  60. package/lib/components/Forms/Errors.vue +109 -0
  61. package/lib/components/Forms/Input.md +63 -0
  62. package/lib/components/Forms/Input.vue +310 -0
  63. package/lib/components/Forms/Radio.md +66 -0
  64. package/lib/components/Forms/Radio.vue +312 -0
  65. package/lib/components/Forms/Select.md +133 -0
  66. package/lib/components/Forms/Select.vue +670 -0
  67. package/lib/components/Forms/Textarea.md +57 -0
  68. package/lib/components/Forms/Textarea.vue +157 -0
  69. package/lib/components/Icons/Icon.md +146 -0
  70. package/lib/components/Icons/Icon.vue +192 -0
  71. package/lib/components/Icons/IconAccordionArrow.md +7 -0
  72. package/lib/components/Icons/IconAccordionArrow.vue +23 -0
  73. package/lib/components/Icons/IconActivity.md +7 -0
  74. package/lib/components/Icons/IconActivity.vue +21 -0
  75. package/lib/components/Icons/IconAdd.md +7 -0
  76. package/lib/components/Icons/IconAdd.vue +19 -0
  77. package/lib/components/Icons/IconAddCircle.md +7 -0
  78. package/lib/components/Icons/IconAddCircle.vue +22 -0
  79. package/lib/components/Icons/IconArrow.md +7 -0
  80. package/lib/components/Icons/IconArrow.vue +21 -0
  81. package/lib/components/Icons/IconBarChart.md +7 -0
  82. package/lib/components/Icons/IconBarChart.vue +23 -0
  83. package/lib/components/Icons/IconCalendar.md +7 -0
  84. package/lib/components/Icons/IconCalendar.vue +19 -0
  85. package/lib/components/Icons/IconCheck.md +7 -0
  86. package/lib/components/Icons/IconCheck.vue +21 -0
  87. package/lib/components/Icons/IconClose.md +7 -0
  88. package/lib/components/Icons/IconClose.vue +23 -0
  89. package/lib/components/Icons/IconCorrect.md +7 -0
  90. package/lib/components/Icons/IconCorrect.vue +19 -0
  91. package/lib/components/Icons/IconEdit.md +7 -0
  92. package/lib/components/Icons/IconEdit.vue +21 -0
  93. package/lib/components/Icons/IconExam.md +7 -0
  94. package/lib/components/Icons/IconExam.vue +34 -0
  95. package/lib/components/Icons/IconExternalLink.md +7 -0
  96. package/lib/components/Icons/IconExternalLink.vue +30 -0
  97. package/lib/components/Icons/IconEyeHide.md +7 -0
  98. package/lib/components/Icons/IconEyeHide.vue +21 -0
  99. package/lib/components/Icons/IconEyeShow.md +7 -0
  100. package/lib/components/Icons/IconEyeShow.vue +21 -0
  101. package/lib/components/Icons/IconFilter.md +7 -0
  102. package/lib/components/Icons/IconFilter.vue +19 -0
  103. package/lib/components/Icons/IconFilterActive.md +7 -0
  104. package/lib/components/Icons/IconFilterActive.vue +20 -0
  105. package/lib/components/Icons/IconFlag.md +7 -0
  106. package/lib/components/Icons/IconFlag.vue +25 -0
  107. package/lib/components/Icons/IconFlagFeedback.md +11 -0
  108. package/lib/components/Icons/IconFlagFeedback.vue +24 -0
  109. package/lib/components/Icons/IconFlagFilled.md +7 -0
  110. package/lib/components/Icons/IconFlagFilled.vue +22 -0
  111. package/lib/components/Icons/IconFullView.md +7 -0
  112. package/lib/components/Icons/IconFullView.vue +30 -0
  113. package/lib/components/Icons/IconFullViewActive.md +7 -0
  114. package/lib/components/Icons/IconFullViewActive.vue +28 -0
  115. package/lib/components/Icons/IconHandle.md +7 -0
  116. package/lib/components/Icons/IconHandle.vue +23 -0
  117. package/lib/components/Icons/IconHeart.md +7 -0
  118. package/lib/components/Icons/IconHeart.vue +19 -0
  119. package/lib/components/Icons/IconHelp.md +7 -0
  120. package/lib/components/Icons/IconHelp.vue +25 -0
  121. package/lib/components/Icons/IconHourglass.md +7 -0
  122. package/lib/components/Icons/IconHourglass.vue +22 -0
  123. package/lib/components/Icons/IconImage.md +7 -0
  124. package/lib/components/Icons/IconImage.vue +21 -0
  125. package/lib/components/Icons/IconIncorrect.md +7 -0
  126. package/lib/components/Icons/IconIncorrect.vue +21 -0
  127. package/lib/components/Icons/IconInfo.md +7 -0
  128. package/lib/components/Icons/IconInfo.vue +24 -0
  129. package/lib/components/Icons/IconKeyboard.md +7 -0
  130. package/lib/components/Icons/IconKeyboard.vue +25 -0
  131. package/lib/components/Icons/IconLaunch.md +7 -0
  132. package/lib/components/Icons/IconLaunch.vue +25 -0
  133. package/lib/components/Icons/IconLightning.md +7 -0
  134. package/lib/components/Icons/IconLightning.vue +21 -0
  135. package/lib/components/Icons/IconList.md +7 -0
  136. package/lib/components/Icons/IconList.vue +26 -0
  137. package/lib/components/Icons/IconLoading.md +7 -0
  138. package/lib/components/Icons/IconLoading.vue +65 -0
  139. package/lib/components/Icons/IconLoading2.md +7 -0
  140. package/lib/components/Icons/IconLoading2.vue +52 -0
  141. package/lib/components/Icons/IconLock.md +7 -0
  142. package/lib/components/Icons/IconLock.vue +23 -0
  143. package/lib/components/Icons/IconMissedQuestions.md +7 -0
  144. package/lib/components/Icons/IconMissedQuestions.vue +22 -0
  145. package/lib/components/Icons/IconMoon.md +7 -0
  146. package/lib/components/Icons/IconMoon.vue +25 -0
  147. package/lib/components/Icons/IconPaginationArrow.md +7 -0
  148. package/lib/components/Icons/IconPaginationArrow.vue +23 -0
  149. package/lib/components/Icons/IconPassage.md +7 -0
  150. package/lib/components/Icons/IconPassage.vue +22 -0
  151. package/lib/components/Icons/IconPencil.md +7 -0
  152. package/lib/components/Icons/IconPencil.vue +19 -0
  153. package/lib/components/Icons/IconPeople.md +7 -0
  154. package/lib/components/Icons/IconPeople.vue +25 -0
  155. package/lib/components/Icons/IconQuestions.md +7 -0
  156. package/lib/components/Icons/IconQuestions.vue +25 -0
  157. package/lib/components/Icons/IconQuick10.md +7 -0
  158. package/lib/components/Icons/IconQuick10.vue +23 -0
  159. package/lib/components/Icons/IconRemoveCircle.md +7 -0
  160. package/lib/components/Icons/IconRemoveCircle.vue +22 -0
  161. package/lib/components/Icons/IconReviewFlag.md +7 -0
  162. package/lib/components/Icons/IconReviewFlag.vue +32 -0
  163. package/lib/components/Icons/IconSearch.md +7 -0
  164. package/lib/components/Icons/IconSearch.vue +23 -0
  165. package/lib/components/Icons/IconShare.md +7 -0
  166. package/lib/components/Icons/IconShare.vue +31 -0
  167. package/lib/components/Icons/IconSideBar.md +7 -0
  168. package/lib/components/Icons/IconSideBar.vue +26 -0
  169. package/lib/components/Icons/IconSideBarActive.md +7 -0
  170. package/lib/components/Icons/IconSideBarActive.vue +28 -0
  171. package/lib/components/Icons/IconStopwatch.md +7 -0
  172. package/lib/components/Icons/IconStopwatch.vue +22 -0
  173. package/lib/components/Icons/IconStrike.md +60 -0
  174. package/lib/components/Icons/IconStrike.vue +23 -0
  175. package/lib/components/Icons/IconSubject.md +7 -0
  176. package/lib/components/Icons/IconSubject.vue +22 -0
  177. package/lib/components/Icons/IconText.md +7 -0
  178. package/lib/components/Icons/IconText.vue +22 -0
  179. package/lib/components/Icons/IconWarning.md +7 -0
  180. package/lib/components/Icons/IconWarning.vue +22 -0
  181. package/lib/components/Modal/Modal.md +31 -0
  182. package/lib/components/Modal/Modal.vue +133 -0
  183. package/lib/components/Modal/ModalContainer.md +96 -0
  184. package/lib/components/Modal/ModalContainer.vue +208 -0
  185. package/lib/components/Onboarding/EmailAuth.md +40 -0
  186. package/lib/components/Onboarding/EmailAuth.vue +218 -0
  187. package/lib/components/Onboarding/MagicCodeEntry.md +20 -0
  188. package/lib/components/Onboarding/MagicCodeEntry.vue +189 -0
  189. package/lib/components/PhonePerson/PhonePerson.md +36 -0
  190. package/lib/components/PhonePerson/PhonePerson.vue +48 -0
  191. package/lib/components/PhonePerson/phoneperson-IT@2x.png +0 -0
  192. package/lib/components/PhonePerson/phoneperson-auto@2x.png +0 -0
  193. package/lib/components/PhonePerson/phoneperson-behavioralhealth@2x.png +0 -0
  194. package/lib/components/PhonePerson/phoneperson-emt@2x.png +0 -0
  195. package/lib/components/PhonePerson/phoneperson-essentials@2x.png +0 -0
  196. package/lib/components/PhonePerson/phoneperson-finance@2x.png +0 -0
  197. package/lib/components/PhonePerson/phoneperson-fitness@2x.png +0 -0
  198. package/lib/components/PhonePerson/phoneperson-medical@2x.png +0 -0
  199. package/lib/components/PhonePerson/phoneperson-nursing@2x.png +0 -0
  200. package/lib/components/PhonePerson/phoneperson-nursingschool@2x.png +0 -0
  201. package/lib/components/PhonePerson/phoneperson-professional@2x.png +0 -0
  202. package/lib/components/PhonePerson/phoneperson-skilledtrades@2x.png +0 -0
  203. package/lib/components/Quiz/FlagToggle.md +37 -0
  204. package/lib/components/Quiz/FlagToggle.vue +124 -0
  205. package/lib/components/Quiz/GlobalMetricsToggle.md +46 -0
  206. package/lib/components/Quiz/GlobalMetricsToggle.vue +124 -0
  207. package/lib/components/Quiz/KeyboardShortcutsButton.md +18 -0
  208. package/lib/components/Quiz/KeyboardShortcutsButton.vue +102 -0
  209. package/lib/components/Quiz/KeyboardShortcutsModal.md +71 -0
  210. package/lib/components/Quiz/KeyboardShortcutsModal.vue +261 -0
  211. package/lib/components/Quiz/Question.md +579 -0
  212. package/lib/components/Quiz/Question.vue +3262 -0
  213. package/lib/components/Quiz/QuizContainer.md +91 -0
  214. package/lib/components/Quiz/QuizContainer.vue +207 -0
  215. package/lib/components/Quiz/QuizProgress.md +122 -0
  216. package/lib/components/Quiz/QuizProgress.vue +188 -0
  217. package/lib/components/Quiz/QuizProgressBar.md +131 -0
  218. package/lib/components/Quiz/QuizProgressBar.vue +96 -0
  219. package/lib/components/Search/Pill.md +37 -0
  220. package/lib/components/Search/Pill.vue +117 -0
  221. package/lib/components/Search/Search.md +44 -0
  222. package/lib/components/Search/Search.vue +341 -0
  223. package/lib/components/SidePanels/SidePanel.md +126 -0
  224. package/lib/components/SidePanels/SidePanel.vue +592 -0
  225. package/lib/components/Tables/StudyTable.md +136 -0
  226. package/lib/components/Tables/Table.vue +497 -0
  227. package/lib/components/Tables/TableActions.vue +199 -0
  228. package/lib/components/Tables/TablePagination.md +19 -0
  229. package/lib/components/Tables/TablePagination.vue +109 -0
  230. package/lib/components/Tables/TeachTable.md +696 -0
  231. package/lib/components/Toasts/Toast.md +35 -0
  232. package/lib/components/Toasts/Toast.vue +213 -0
  233. package/lib/components/Tooltips/OverflowTooltip.md +14 -0
  234. package/lib/components/Tooltips/OverflowTooltip.vue +68 -0
  235. package/lib/components/Tooltips/Tooltip.md +72 -0
  236. package/lib/components/Tooltips/Tooltip.vue +143 -0
  237. package/lib/directives.ts +213 -0
  238. package/lib/index.ts +108 -0
  239. package/{pocketprep-export.module.scss → lib/pocketprep-export.module.scss} +2 -2
  240. package/{pocketprep.scss → lib/pocketprep.scss} +16 -18
  241. package/{styles → lib/styles}/_colors.scss +1 -1
  242. package/lib/styles/fonts.css +149 -0
  243. package/lib/utils.ts +53 -0
  244. package/package.json +75 -56
  245. package/{stylelint.config.js → stylelint.config.cjs} +6 -3
  246. package/assets/Fonts.md +0 -114
  247. package/assets/Images.md +0 -2
  248. package/assets/Styleguidist.vue +0 -11
  249. package/dist/@pocketprep/ui-kit.common.js +0 -29726
  250. package/dist/@pocketprep/ui-kit.common.js.map +0 -1
  251. package/dist/@pocketprep/ui-kit.umd.js +0 -29745
  252. package/dist/@pocketprep/ui-kit.umd.js.map +0 -1
  253. package/dist/@pocketprep/ui-kit.umd.min.js +0 -33
  254. package/dist/@pocketprep/ui-kit.umd.min.js.map +0 -1
  255. package/dist/demo.html +0 -1
  256. package/index.d.ts +0 -63
  257. package/src/directives.d.ts +0 -2
  258. package/src/shims.d.ts +0 -19
  259. package/src/utils.d.ts +0 -51
  260. package/styles/Colors.md +0 -53
  261. package/styles/Styles.md +0 -4
  262. package/styles/_fonts.scss +0 -149
  263. package/tests/shims-test.d.ts +0 -9
  264. /package/{assets → lib/assets}/fonts/muli/muli-400.eot +0 -0
  265. /package/{assets → lib/assets}/fonts/muli/muli-400.svg +0 -0
  266. /package/{assets → lib/assets}/fonts/muli/muli-400.ttf +0 -0
  267. /package/{assets → lib/assets}/fonts/muli/muli-400.woff +0 -0
  268. /package/{assets → lib/assets}/fonts/muli/muli-400.woff2 +0 -0
  269. /package/{assets → lib/assets}/fonts/muli/muli-400italic.eot +0 -0
  270. /package/{assets → lib/assets}/fonts/muli/muli-400italic.svg +0 -0
  271. /package/{assets → lib/assets}/fonts/muli/muli-400italic.ttf +0 -0
  272. /package/{assets → lib/assets}/fonts/muli/muli-400italic.woff +0 -0
  273. /package/{assets → lib/assets}/fonts/muli/muli-400italic.woff2 +0 -0
  274. /package/{assets → lib/assets}/fonts/muli/muli-600.eot +0 -0
  275. /package/{assets → lib/assets}/fonts/muli/muli-600.svg +0 -0
  276. /package/{assets → lib/assets}/fonts/muli/muli-600.ttf +0 -0
  277. /package/{assets → lib/assets}/fonts/muli/muli-600.woff +0 -0
  278. /package/{assets → lib/assets}/fonts/muli/muli-600.woff2 +0 -0
  279. /package/{assets → lib/assets}/fonts/muli/muli-600italic.eot +0 -0
  280. /package/{assets → lib/assets}/fonts/muli/muli-600italic.svg +0 -0
  281. /package/{assets → lib/assets}/fonts/muli/muli-600italic.ttf +0 -0
  282. /package/{assets → lib/assets}/fonts/muli/muli-600italic.woff +0 -0
  283. /package/{assets → lib/assets}/fonts/muli/muli-600italic.woff2 +0 -0
  284. /package/{assets → lib/assets}/fonts/muli/muli-700.eot +0 -0
  285. /package/{assets → lib/assets}/fonts/muli/muli-700.svg +0 -0
  286. /package/{assets → lib/assets}/fonts/muli/muli-700.ttf +0 -0
  287. /package/{assets → lib/assets}/fonts/muli/muli-700.woff +0 -0
  288. /package/{assets → lib/assets}/fonts/muli/muli-700.woff2 +0 -0
  289. /package/{assets → lib/assets}/fonts/muli/muli-700italic.eot +0 -0
  290. /package/{assets → lib/assets}/fonts/muli/muli-700italic.svg +0 -0
  291. /package/{assets → lib/assets}/fonts/muli/muli-700italic.ttf +0 -0
  292. /package/{assets → lib/assets}/fonts/muli/muli-700italic.woff +0 -0
  293. /package/{assets → lib/assets}/fonts/muli/muli-700italic.woff2 +0 -0
  294. /package/{assets → lib/assets}/images/amta.svg +0 -0
  295. /package/{assets → lib/assets}/images/favicon.ico +0 -0
  296. /package/{assets → lib/assets}/images/thumb-large-dark.svg +0 -0
  297. /package/{assets → lib/assets}/images/thumb-large.svg +0 -0
  298. /package/{assets → lib/assets}/images/thumb-small-dark.svg +0 -0
  299. /package/{assets → lib/assets}/images/thumb-small.svg +0 -0
  300. /package/{src → lib}/components/BundleIcons/bundleIcon.d.ts +0 -0
  301. /package/{src → lib}/components/Icons/icon.d.ts +0 -0
  302. /package/{src → lib}/components/PhonePerson/phonePerson.d.ts +0 -0
  303. /package/{src → lib}/components/Tables/table.d.ts +0 -0
  304. /package/{styles → lib/styles}/_breakpoints.scss +0 -0
  305. /package/{styles/_normalize.scss → lib/styles/normalize.css} +0 -0
@@ -0,0 +1,67 @@
1
+ ```vue
2
+ <template>
3
+ <div>
4
+ <Button @click="isDarkMode = !isDarkMode">{{ isDarkMode ? 'Disable' : 'Enable' }} Dark Mode</Button>
5
+ <div class="slider" :class="{ dark: isDarkMode }">
6
+ <div class="slider-container">
7
+ Large Slider:
8
+ <Slider
9
+ min="5"
10
+ max="60"
11
+ step="5"
12
+ v-model="slider1"
13
+ :isDarkMode="isDarkMode"
14
+ />
15
+ Value: {{ slider1 }}
16
+ </div>
17
+ <div class="slider-container">
18
+ Small Slider:
19
+ <Slider
20
+ min="5"
21
+ max="60"
22
+ step="5"
23
+ v-model="slider2"
24
+ size="small"
25
+ :isDarkMode="isDarkMode"
26
+ />
27
+ Value: {{ slider2 }}
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ export default {
35
+ data () {
36
+ return {
37
+ slider1: 25,
38
+ slider2: 25,
39
+ isDarkMode: false,
40
+ }
41
+ }
42
+ }
43
+ </script>
44
+
45
+ <style>
46
+ .slider {
47
+ padding: 30px;
48
+ }
49
+
50
+ .dark {
51
+ background-color: #1f3545;
52
+ color: white;
53
+ }
54
+
55
+ .uikit-btn {
56
+ margin-bottom: 30px;
57
+ }
58
+
59
+ .slider-container {
60
+ padding: 10px 10px 40px;
61
+ }
62
+
63
+ .slider-container:last-child {
64
+ padding-bottom: 10px;
65
+ }
66
+ </style>
67
+ ```
@@ -0,0 +1,358 @@
1
+ <template>
2
+ <div
3
+ v-dark="isDarkMode"
4
+ class="uikit-slider"
5
+ :class="{ [`uikit-slider--${size}`]: true }"
6
+ >
7
+ <div v-dark="isDarkMode" class="uikit-slider__number uikit-slider__min">
8
+ {{ min }}
9
+ </div>
10
+ <div v-dark="isDarkMode" class="uikit-slider__slide">
11
+ <div
12
+ v-dark="isDarkMode"
13
+ class="uikit-slider__filled"
14
+ :style="{ width: `${filledWidth}%` }"
15
+ />
16
+ <input
17
+ :id="inputId ? inputId : undefined"
18
+ v-model.number="sliderValue"
19
+ v-dark="isDarkMode"
20
+ type="range"
21
+ :max="max"
22
+ :min="min"
23
+ :step="step"
24
+ :aria-valuemin="min"
25
+ :aria-valuemax="max"
26
+ :aria-valuenow="sliderValue"
27
+ class="uikit-slider__slide-input"
28
+ >
29
+ </div>
30
+ <div v-dark="isDarkMode" class="uikit-slider__number uikit-slider__max">
31
+ {{ max }}
32
+ </div>
33
+ </div>
34
+ </template>
35
+
36
+ <script lang="ts">
37
+ import { Vue, Component, Prop, Watch, Emit } from 'vue-facing-decorator'
38
+ import { dark } from '../../directives'
39
+
40
+ @Component({
41
+ directives: {
42
+ dark,
43
+ },
44
+ })
45
+ export default class Slider extends Vue {
46
+ @Prop({ default: 0 }) min!: number
47
+ @Prop() max!: number
48
+ @Prop({ default: 1 }) step!: number
49
+ @Prop() modelValue!: number
50
+ @Prop({ default: 'large' }) size!: 'small' | 'large'
51
+ @Prop({ default: false }) isDarkMode!: boolean
52
+ @Prop({ default: null }) inputId!: string | null
53
+
54
+ sliderValue = 0
55
+
56
+ get filledWidth () {
57
+ return ((this.modelValue - this.min) / (this.max - this.min)) * 100
58
+ }
59
+
60
+ mounted () {
61
+ this.sliderValue = this.modelValue
62
+ this.sliderValueChanged()
63
+ }
64
+
65
+ @Watch('modelValue')
66
+ valueChanged () {
67
+ this.sliderValue = this.modelValue
68
+ }
69
+
70
+ @Watch('sliderValue')
71
+ sliderValueChanged () {
72
+ if (this.sliderValue % this.step !== 0) {
73
+ this.sliderValue = Math.round(this.sliderValue / this.step) * this.step || 0
74
+ }
75
+
76
+ if (this.sliderValue > this.max) {
77
+ this.sliderValue = this.max
78
+ } else if (this.sliderValue < this.min) {
79
+ this.sliderValue = this.min
80
+ }
81
+
82
+ this.emitUpdateModelValue(this.sliderValue)
83
+ }
84
+
85
+ @Emit('update:modelValue')
86
+ emitUpdateModelValue (sliderValue: number) {
87
+ return sliderValue
88
+ }
89
+ }
90
+ </script>
91
+ <style lang="scss">
92
+ @import '../../styles/colors';
93
+
94
+ .uikit-slider {
95
+ display: flex;
96
+ justify-content: space-between;
97
+ align-items: center;
98
+
99
+ &--small {
100
+ .uikit-slider__number {
101
+ font-size: 14px;
102
+ line-height: 14px;
103
+ width: 24px;
104
+ }
105
+
106
+ .uikit-slider__min {
107
+ text-align: right;
108
+ margin-right: 10px;
109
+ }
110
+
111
+ .uikit-slider__max {
112
+ text-align: left;
113
+ margin-left: 10px;
114
+ }
115
+
116
+ .uikit-slider__filled {
117
+ top: 6px;
118
+ }
119
+
120
+ .uikit-slider__slide {
121
+ height: 15px;
122
+
123
+ .uikit-slider__slide-input {
124
+ height: 15px;
125
+
126
+ &:focus {
127
+ &::-webkit-slider-thumb {
128
+ border: 0;
129
+ background-size: 14px 14px;
130
+ }
131
+
132
+ &::-moz-range-thumb {
133
+ border: 0;
134
+ background-size: 14px 14px;
135
+ }
136
+
137
+ &::-ms-thumb {
138
+ border: 0;
139
+ background-size: 14px 14px;
140
+ }
141
+ }
142
+
143
+ &::-webkit-slider-thumb {
144
+ margin-top: -5px;
145
+ width: 14px;
146
+ height: 14px;
147
+ border-radius: 14px;
148
+ position: relative;
149
+ }
150
+
151
+ &::-moz-range-thumb {
152
+ margin-top: -5px;
153
+ width: 14px;
154
+ height: 14px;
155
+ border-radius: 14px;
156
+ }
157
+
158
+ &::-ms-thumb {
159
+ margin-top: -5px;
160
+ width: 14px;
161
+ height: 14px;
162
+ border-radius: 14px;
163
+ }
164
+ }
165
+ }
166
+ }
167
+
168
+ &__number {
169
+ font-size: 15px;
170
+ line-height: 15px;
171
+ font-weight: 600;
172
+ color: $slate-01;
173
+ width: 30px;
174
+
175
+ &--dark {
176
+ color: $pewter;
177
+ }
178
+ }
179
+
180
+ &__min {
181
+ width: 23px;
182
+ text-align: right;
183
+ margin-right: 10px;
184
+ }
185
+
186
+ &__max {
187
+ text-align: left;
188
+ margin-left: 10px;
189
+ }
190
+
191
+ &__slide {
192
+ flex: 1;
193
+ position: relative;
194
+ height: 29px;
195
+ }
196
+
197
+ &__slide-input {
198
+ height: 29px;
199
+ width: 100%;
200
+ -webkit-appearance: none;
201
+ appearance: none;
202
+ background: transparent;
203
+
204
+ &:hover {
205
+ &::-webkit-slider-thumb {
206
+ background: $brand-blue;
207
+ }
208
+
209
+ &::-moz-range-thumb {
210
+ background: $brand-blue;
211
+ }
212
+
213
+ &::-ms-thumb {
214
+ background: $brand-blue;
215
+ }
216
+ }
217
+
218
+ &:focus {
219
+ outline: none;
220
+
221
+ &::-webkit-slider-thumb {
222
+ border: 0;
223
+ background-size: 28px 29px;
224
+ }
225
+
226
+ &::-moz-range-thumb {
227
+ border: 0;
228
+ background-size: 28px 29px;
229
+ }
230
+
231
+ &::-ms-thumb {
232
+ border: 0;
233
+ background-size: 28px 29px;
234
+ }
235
+ }
236
+
237
+ &::-webkit-slider-runnable-track {
238
+ width: 100%;
239
+ height: 3px;
240
+ cursor: pointer;
241
+ background: $sky-blue;
242
+ border-radius: 3px;
243
+ }
244
+
245
+ &::-moz-range-track {
246
+ width: 100%;
247
+ height: 3px;
248
+ cursor: pointer;
249
+ background: $sky-blue;
250
+ border-radius: 3px;
251
+ }
252
+
253
+ &::-ms-track {
254
+ width: calc(100% - 5px);
255
+ height: 3px;
256
+ cursor: pointer;
257
+ background: $sky-blue;
258
+ border-radius: 3px;
259
+ }
260
+
261
+ &::-webkit-slider-thumb {
262
+ margin-top: -12px;
263
+ width: 28px;
264
+ height: 29px;
265
+ border-radius: 28px;
266
+ border: 2px solid $brand-blue;
267
+ box-sizing: border-box;
268
+ background: $white;
269
+ cursor: pointer;
270
+ -webkit-appearance: none;
271
+ position: relative;
272
+ z-index: 1;
273
+ }
274
+
275
+ &::-moz-range-thumb {
276
+ margin-top: -12px;
277
+ width: 28px;
278
+ height: 29px;
279
+ border-radius: 28px;
280
+ border: 2px solid $brand-blue;
281
+ box-sizing: border-box;
282
+ background: $white;
283
+ cursor: pointer;
284
+ position: relative;
285
+ z-index: 1;
286
+ }
287
+
288
+ &::-ms-thumb {
289
+ margin-top: -12px;
290
+ width: 28px;
291
+ height: 29px;
292
+ border-radius: 28px;
293
+ border: 2px solid $brand-blue;
294
+ box-sizing: border-box;
295
+ background: $white;
296
+ cursor: pointer;
297
+ position: relative;
298
+ z-index: 1;
299
+ }
300
+
301
+ &--dark {
302
+ &:hover {
303
+ &::-webkit-slider-thumb {
304
+ background-color: $banana-bread;
305
+ }
306
+
307
+ &::-moz-range-thumb {
308
+ background-color: $banana-bread;
309
+ }
310
+
311
+ &::-ms-thumb {
312
+ background-color: $banana-bread;
313
+ }
314
+ }
315
+
316
+ &::-webkit-slider-runnable-track {
317
+ background-color: $charcoal;
318
+ }
319
+
320
+ &::-moz-range-track {
321
+ background-color: $charcoal;
322
+ }
323
+
324
+ &::-ms-track {
325
+ background-color: $charcoal;
326
+ }
327
+
328
+ &::-webkit-slider-thumb {
329
+ border: 2px solid $banana-bread;
330
+ background-color: $brand-black;
331
+ }
332
+
333
+ &::-moz-range-thumb {
334
+ border: 2px solid $banana-bread;
335
+ background-color: $brand-black;
336
+ }
337
+
338
+ &::-ms-thumb {
339
+ border: 2px solid $banana-bread;
340
+ background-color: $brand-black;
341
+ }
342
+ }
343
+ }
344
+
345
+ &__filled {
346
+ background: $brand-blue;
347
+ height: 3px;
348
+ position: absolute;
349
+ left: 0;
350
+ top: 13px;
351
+ border-radius: 3px;
352
+
353
+ &--dark {
354
+ background: $banana-bread;
355
+ }
356
+ }
357
+ }
358
+ </style>
@@ -0,0 +1,56 @@
1
+ ```vue
2
+ <template>
3
+ <div>
4
+ <Button @click="isDarkMode = !isDarkMode">{{ isDarkMode ? 'Disable' : 'Enable' }} Dark Mode</Button>
5
+ <div class="toggles" :class="{ dark: isDarkMode }">
6
+ <ToggleSwitch :isDarkMode="isDarkMode" v-model="control" />
7
+ Value: {{ control }}<br>
8
+ <br>
9
+ <ToggleSwitch :isDarkMode="isDarkMode" v-model="control2" size="large" />
10
+ Value: {{ control2 }}
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import Button from '../Buttons/Button.vue'
17
+
18
+ export default {
19
+ components: {
20
+ Button
21
+ },
22
+ data () {
23
+ return {
24
+ control: false,
25
+ control2: true,
26
+ isDarkMode: false,
27
+ }
28
+ },
29
+ mounted () {
30
+ // This tests that the ToggleSwitch component updates when the parent component updates the v-model value
31
+ setTimeout(() => {
32
+ this.control = true
33
+ }, 1000)
34
+ }
35
+ }
36
+ </script>
37
+
38
+ <style>
39
+ .toggles {
40
+ padding: 30px;
41
+ }
42
+
43
+ .dark {
44
+ background-color: #1f3545;
45
+ color: #fff;
46
+ }
47
+
48
+ .uikit-btn {
49
+ margin-bottom: 30px;
50
+ }
51
+
52
+ .uikit-toggle-switch {
53
+ margin-bottom: 10px;
54
+ }
55
+ </style>
56
+ ```
@@ -0,0 +1,160 @@
1
+ <template>
2
+ <div
3
+ v-dark="isDarkMode"
4
+ class="uikit-toggle-switch"
5
+ :class="{
6
+ 'uikit-toggle-switch--enabled': modelValue,
7
+ [`uikit-toggle-switch--${size}`]: true
8
+ }"
9
+ tabindex="0"
10
+ role="checkbox"
11
+ :aria-checked="modelValue"
12
+ @keydown.enter="toggleOption"
13
+ @keydown.prevent.space="toggleOption"
14
+ @mousedown.prevent
15
+ @click="toggleOption"
16
+ >
17
+ <div
18
+ v-dark="isDarkMode"
19
+ class="uikit-toggle-switch__handle"
20
+ :class="{
21
+ [`uikit-toggle-switch__handle--${size}`]: true,
22
+ [`uikit-toggle-switch__handle--${size}--enabled`]: modelValue,
23
+ 'uikit-toggle-switch__handle--enabled': modelValue,
24
+ }"
25
+ />
26
+ </div>
27
+ </template>
28
+
29
+ <script lang="ts">
30
+ import { Component, Vue, Prop, Emit } from 'vue-facing-decorator'
31
+ import { dark } from '../../directives'
32
+
33
+ @Component({
34
+ directives: {
35
+ dark,
36
+ },
37
+ })
38
+ export default class ToggleSwitch extends Vue {
39
+ @Prop({ default: false }) modelValue!: boolean
40
+ @Prop({ default: false }) isDarkMode!: boolean
41
+ @Prop({ default: 'small' }) size!: 'small' | 'large'
42
+
43
+ @Emit('update:modelValue')
44
+ toggleOption () {
45
+ return !this.modelValue
46
+ }
47
+ }
48
+ </script>
49
+
50
+ <style lang="scss">
51
+ @import '../../styles/colors';
52
+
53
+ .uikit-toggle-switch {
54
+ background-color: $steel;
55
+ width: 38px;
56
+ height: 20px;
57
+ border-radius: 20px;
58
+ cursor: pointer;
59
+ user-select: none;
60
+ position: relative;
61
+ outline: none;
62
+
63
+ &:hover {
64
+ background-color: $slate;
65
+ }
66
+
67
+ &:focus::before {
68
+ content: '';
69
+ position: absolute;
70
+ z-index: 0;
71
+ width: calc(100% + 1px);
72
+ height: calc(100% + 1px);
73
+ border-radius: 28px;
74
+ top: -2px;
75
+ left: -2px;
76
+ border: 1.5px solid $brand-blue;
77
+ }
78
+
79
+ &--dark {
80
+ background-color: $steel;
81
+
82
+ &:hover {
83
+ background-color: $pewter;
84
+ }
85
+
86
+ &:focus {
87
+ background-color: rgba($pewter, 0.4);
88
+
89
+ &::before {
90
+ border-color: $butterscotch;
91
+ }
92
+ }
93
+ }
94
+
95
+ &--large {
96
+ width: 50px;
97
+ height: 26px;
98
+ border-radius: 36.5px;
99
+ }
100
+
101
+ &--enabled {
102
+ background-color: $brand-blue;
103
+
104
+ &:hover {
105
+ background-color: darken($brand-blue, 10%);
106
+ }
107
+
108
+ &--dark {
109
+ background-color: $banana-bread;
110
+
111
+ &:hover {
112
+ background-color: $butterscotch;
113
+ }
114
+
115
+ &:focus {
116
+ background-color: $banana-bread;
117
+ }
118
+ }
119
+ }
120
+
121
+ &__handle {
122
+ background-color: $white;
123
+ border: 0.5px solid rgba(0, 0, 0, 0.04);
124
+ border-radius: 100px;
125
+ box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
126
+ width: 16px;
127
+ height: 16px;
128
+ position: absolute;
129
+ top: 2px;
130
+ left: 2px;
131
+ transition: left 0.1s linear;
132
+ box-sizing: border-box;
133
+
134
+ &--dark {
135
+ background: $charcoal;
136
+ box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.1);
137
+ }
138
+
139
+ &--enabled {
140
+ box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.1), 0 2px 6px 0 rgba(0, 0, 0, 0.15);
141
+ left: 20px;
142
+ transition: left 0.1s linear;
143
+
144
+ &--dark {
145
+ box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.1), 0 3px 8px 0 rgba(0, 0, 0, 0.15);
146
+ }
147
+ }
148
+
149
+ &--large {
150
+ width: 22px;
151
+ height: 22px;
152
+
153
+ &--enabled {
154
+ left: 26px;
155
+ transition: left 0.1s linear;
156
+ }
157
+ }
158
+ }
159
+ }
160
+ </style>
@@ -0,0 +1,45 @@
1
+ ```vue
2
+ <template>
3
+ <div>
4
+ <SVGDefinitions />
5
+ <ExamCard
6
+ :exam="exam"
7
+ :bundle="bundle"
8
+ />
9
+ <ExamCard
10
+ :exam="exam"
11
+ :bundle="bundle"
12
+ :showCancelButton="true"
13
+ />
14
+ <ExamCard
15
+ :exam="exam"
16
+ :bundle="bundle"
17
+ :disableInteraction="true"
18
+ />
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ const exam = {
24
+ objectId: 'o98Hn8iUO4',
25
+ descriptiveName: 'College-level Biology Practice',
26
+ nativeAppName: 'College Biology',
27
+ itemCount: 100,
28
+ archivedCount: 2,
29
+ knowledgeAreas: ['', '']
30
+ }
31
+ const bundle = {
32
+ name: 'Nursing School',
33
+ objectId: '9970muCFGV'
34
+ }
35
+
36
+ export default {
37
+ data () {
38
+ return {
39
+ exam,
40
+ bundle
41
+ }
42
+ }
43
+ }
44
+ </script>
45
+ ```