@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,696 @@
1
+ ```vue
2
+ <template>
3
+ <div>
4
+ <div class="table-examples__summary">
5
+ Table with count, search, sort, row selection, and max height
6
+ <ul class="table-examples__list">
7
+ <li>Teach Admin - Organizations</li>
8
+ </ul>
9
+ </div>
10
+ <Table
11
+ class="table-examples__1"
12
+ name="Organizations"
13
+ rows-max-height="558px"
14
+ :count="table1.rows.length"
15
+ :rows="table1.rows"
16
+ :columns="table1.columns"
17
+ :default-selected-row-id="table1.defaultSelectedRowId"
18
+ :show-search="true"
19
+ :show-selected="true"
20
+ :grid="grid"
21
+ :table-content-styles="{
22
+ borderWidth: '1px 1px 0 1px',
23
+ borderColor: '#dfe3e7',
24
+ borderStyle: 'solid',
25
+ }"
26
+ :table-column-labels-styles="{
27
+ paddingLeft: '16px',
28
+ backgroundColor: '#f4f5f9',
29
+ }"
30
+ :table-row-styles="{
31
+ paddingLeft: '16px',
32
+ }"
33
+ @sort="table1.updateSortSettings"
34
+ @searchStringChanged="table1.searchStringChanged"
35
+ @rowClicked="table1.rowClicked"
36
+ />
37
+ <div class="table-examples__summary">
38
+ Table with actions, count, sort, row selection, and row ordering
39
+ <ul class="table-examples__list">
40
+ <li>Teach Stats Sidebar - Groups</li>
41
+ </ul>
42
+ </div>
43
+ <Table
44
+ class="table-examples__11"
45
+ name="Groups"
46
+ :count="table11.rows.length"
47
+ :actions="table11.actions"
48
+ :rows="table11.rows"
49
+ :columns="table11.columns"
50
+ :default-selected-row-id="table11.defaultSelectedRowId"
51
+ :show-drag-and-drop="table11.showDragAndDrop"
52
+ :show-selected="true"
53
+ :grid="grid"
54
+ :table-content-styles="{
55
+ borderWidth: '1px 1px 0 1px',
56
+ borderColor: '#dfe3e7',
57
+ borderStyle: 'solid',
58
+ }"
59
+ :table-column-labels-styles="{
60
+ paddingLeft: '16px',
61
+ backgroundColor: '#f4f5f9',
62
+ }"
63
+ :table-row-styles="{
64
+ paddingLeft: '16px',
65
+ }"
66
+ @rowClicked="table11.rowClicked"
67
+ @actionClicked="table11.actionClicked"
68
+ @sort="table11.updateSortSettings"
69
+ @rowMoved="table11.rowMoved"
70
+ />
71
+ <div class="table-examples__summary">
72
+ Table with actions, count and total, search, sort, filters, and row selection
73
+ <ul class="table-examples__list">
74
+ <li>Teach Stats Sidebar - Students</li>
75
+ </ul>
76
+ </div>
77
+ <Table
78
+ class="table-examples__12"
79
+ name="Students"
80
+ :count="table12.rows.length"
81
+ :total="table12.rows.length"
82
+ :actions="table12.actions"
83
+ :columns="table12.columns"
84
+ :rows="table12.rows"
85
+ :show-search="true"
86
+ :show-filters="true"
87
+ :filter-chips="table12.filterChips"
88
+ :default-sort="{ column: table12.columns[0], direction: 1 }"
89
+ :sort-toggle-order="[ 1, -1 ]"
90
+ :show-selected="true"
91
+ :default-selected-row-id="table12.defaultSelectedRowId"
92
+ :grid="grid"
93
+ :table-content-styles="{
94
+ borderWidth: '1px 1px 0 1px',
95
+ borderColor: '#dfe3e7',
96
+ borderStyle: 'solid',
97
+ }"
98
+ :table-column-labels-styles="{
99
+ paddingLeft: '16px',
100
+ backgroundColor: '#f4f5f9',
101
+ }"
102
+ :table-row-styles="{
103
+ paddingLeft: '16px',
104
+ }"
105
+ @rowClicked="table12.rowClicked"
106
+ @searchStringChanged="table12.updateSearchString"
107
+ @actionClicked="table12.actionClicked"
108
+ @sort="table12.updateSortSettings"
109
+ />
110
+ <div class="table-examples__summary">
111
+ Open Table with count, search, sort, row selection, and pagination
112
+ <ul class="table-examples__list">
113
+ <li>Teach Admin - Instructors</li>
114
+ <li>Teach Admin - Instructor's Visible Groups</li>
115
+ <li>Teach Admin - Students</li>
116
+ <li>Teach Admin - Student's Groups</li>
117
+ <li>Teach Admin - Groups</li>
118
+ <li>Teach Admin - Group's Students</li>
119
+ <li>Teach Admin - Exams</li>
120
+ <li>Teach Admin - Licenses</li>
121
+ </ul>
122
+ </div>
123
+ <Table
124
+ class="table-examples__2"
125
+ name="Open Table with count, default sort, pagination, search, and row selection"
126
+ theme="open"
127
+ :count="table2.rows.length"
128
+ :rows="table2.rows"
129
+ :columns="table2.columns"
130
+ :default-sort="{ column: table2.columns[0], direction: 1 }"
131
+ :sort-toggle-order="[ 1, -1 ]"
132
+ :show-pagination="true"
133
+ :per-page="5"
134
+ :show-search="true"
135
+ :show-selected="true"
136
+ :grid="grid"
137
+ @sort="table2.updateSortSettings"
138
+ @searchStringChanged="table2.searchStringChanged"
139
+ @rowClicked="table2.rowClicked"
140
+ />
141
+ <div class="table-examples__summary">
142
+ Open Table with sort, row edit, row segment control, and no header label
143
+ <ul class="table-examples__list">
144
+ <li>Teach Settings - Groups</li>
145
+ </ul>
146
+ </div>
147
+ <Table
148
+ class="table-examples__3"
149
+ theme="open"
150
+ :rows="table3.rows"
151
+ :columns="table3.columns"
152
+ :default-sort="{ column: table3.columns[1], direction: 1 }"
153
+ :sort-toggle-order="[ 1, -1 ]"
154
+ :show-header="false"
155
+ :show-row-edit="true"
156
+ tooltip-text="Edit Group"
157
+ :show-row-segment-control="true"
158
+ segment-control-label="Segment Control Example"
159
+ :grid="grid"
160
+ @segmentControlChange="table3.segmentControlChange"
161
+ @sort="table3.updateSortSettings"
162
+ @editClicked="table3.editClicked"
163
+ />
164
+ <div class="table-examples__summary">
165
+ Open Table with sort, row edit, and no header label
166
+ <ul class="table-examples__list">
167
+ <li>Teach Settings - Instructors</li>
168
+ </ul>
169
+ </div>
170
+ <Table
171
+ class="table-examples__4"
172
+ theme="open"
173
+ :rows="table4.rows"
174
+ :columns="table4.columns"
175
+ :default-sort="{ column: table4.columns[0], direction: 1 }"
176
+ :sort-toggle-order="[ 1, -1 ]"
177
+ :show-header="false"
178
+ :show-row-edit="true"
179
+ tooltip-text="Edit Prep"
180
+ :grid="grid"
181
+ @sort="table4.updateSortSettings"
182
+ @editClicked="table4.editClicked"
183
+ />
184
+ <div class="table-examples__summary">
185
+ Open Table with sort, row edit, checked rows, and no header label
186
+ <ul class="table-examples__list">
187
+ <li>Teach Settings - Seats</li>
188
+ </ul>
189
+ </div>
190
+ <Table
191
+ class="table-examples__5"
192
+ theme="open"
193
+ :rows="table5.rows"
194
+ :columns="table5.columns"
195
+ :default-sort="{ column: table5.columns[0], direction: 1 }"
196
+ :sort-toggle-order="[ 1, -1 ]"
197
+ :show-header="false"
198
+ :show-row-edit="true"
199
+ :show-checkboxes="true"
200
+ :disable-row-checked-color="true"
201
+ :initial-checked-rows="[ 1 ]"
202
+ tooltip-text="Edit Prep"
203
+ :grid="grid"
204
+ @sort="table5.updateSortSettings"
205
+ @checkedRowsChanged="table5.checkedRowsChanged"
206
+ />
207
+ <div class="table-examples__summary">
208
+ Open Table with search, sort, row edit, pagination, row buttons, and no header label
209
+ <ul class="table-examples__list">
210
+ <li>Teach Settings - Students</li>
211
+ </ul>
212
+ </div>
213
+ <Table
214
+ class="table-examples__6"
215
+ theme="open"
216
+ :rows="table6.rows"
217
+ :columns="table6.columns"
218
+ :default-sort="{ column: table6.columns[0], direction: 1 }"
219
+ :sort-toggle-order="[ 1, -1 ]"
220
+ :show-header="false"
221
+ :show-row-edit="true"
222
+ :show-search="true"
223
+ :show-pagination="true"
224
+ :show-row-button="true"
225
+ :row-button-styles="{ width: '102px' }"
226
+ plural-item-name="Students"
227
+ row-button-text="Cancel Invite"
228
+ tooltip-text="Edit Invite"
229
+ :grid="grid"
230
+ @sort="table6.updateSortSettings"
231
+ @searchStringChanged="table6.updateSearchString"
232
+ @editClicked="table6.editClicked"
233
+ @rowButtonClicked="table6.buttonClicked"
234
+ />
235
+ <div class="table-examples__summary">
236
+ Open Table with search, sort, checked rows, pagination, and no header label
237
+ <ul class="table-examples__list">
238
+ <li>Teach Add Group Side Panel - Add Students</li>
239
+ <li>Teach Edit Group -> Select Students Side Panel - Students</li>
240
+ <li>Teach Admin -> Add Exams Side Panel - Exams</li>
241
+ </ul>
242
+ </div>
243
+ <Table
244
+ class="table-examples__7"
245
+ theme="open"
246
+ :rows="table7.rows"
247
+ :columns="table7.columns"
248
+ :default-sort="{ column: table7.columns[0], direction: 1 }"
249
+ :sort-toggle-order="[ 1, -1 ]"
250
+ :show-header="false"
251
+ :show-search="true"
252
+ :show-pagination="true"
253
+ :show-checkboxes="true"
254
+ plural-item-name="Students"
255
+ :grid="grid"
256
+ @sort="table7.updateSortSettings"
257
+ @searchStringChanged="table7.updateSearchString"
258
+ @checkedRowsChanged="table7.updatedCheckedRows"
259
+ />
260
+ <div class="table-examples__summary">
261
+ Open Table with search, sort, row buttons, pagination, and no header label
262
+ <ul class="table-examples__list">
263
+ <li>Teach Add Group Side Panel - Preview Group</li>
264
+ <li>Teach Edit Group Side Panel - Group Students</li>
265
+ </ul>
266
+ </div>
267
+ <Table
268
+ class="table-examples__8"
269
+ theme="open"
270
+ :rows="table8.rows"
271
+ :columns="table8.columns"
272
+ :default-sort="{ column: table8.columns[0], direction: 1 }"
273
+ :sort-toggle-order="[ 1, -1 ]"
274
+ :show-header="false"
275
+ :show-search="true"
276
+ :show-pagination="true"
277
+ :show-row-button="true"
278
+ plural-item-name="Students"
279
+ row-button-text="Remove"
280
+ :grid="grid"
281
+ @sort="table8.updateSortSettings"
282
+ @searchStringChanged="table8.updateSearchString"
283
+ @rowButtonClicked="table8.rowButtonClicked"
284
+ />
285
+ <div class="table-examples__summary">
286
+ Open Table with sort and no header label
287
+ <ul class="table-examples__list">
288
+ <li>Teach Add Students Side Panel - Add Emails</li>
289
+ </ul>
290
+ </div>
291
+ <Table
292
+ class="table-examples__9"
293
+ theme="open"
294
+ :rows="table9.rows"
295
+ :columns="table9.columns"
296
+ :default-sort="{ column: table9.columns[0], direction: 1 }"
297
+ :sort-toggle-order="[ 1, -1 ]"
298
+ :show-header="false"
299
+ :grid="grid"
300
+ @sort="table9.updateSortSettings"
301
+ />
302
+ <div class="table-examples__summary">
303
+ Open Table with sort, row buttons, and no header label
304
+ <ul class="table-examples__list">
305
+ <li>Teach Edit Instructor Side Panel - Exams</li>
306
+ <li>Teach Edit Student Side Panel - Student Groups</li>
307
+ </ul>
308
+ </div>
309
+ <Table
310
+ class="table-examples__10"
311
+ theme="open"
312
+ :rows="table10.rows"
313
+ :columns="table10.columns"
314
+ :show-header="false"
315
+ :show-row-button="true"
316
+ row-button-text="Remove"
317
+ :row-button-styles="{ width: '69px' }"
318
+ :grid="grid"
319
+ @rowButtonClicked="table10.rowButtonClicked"
320
+ @sort="table10.updateSortSettings"
321
+ />
322
+ </div>
323
+ </template>
324
+
325
+ <script>
326
+ import Table from '../Tables/Table.vue'
327
+
328
+ // const grid = {
329
+ // 'display': 'inline-grid',
330
+ // 'grid-template-columns': 'repeat(2, minmax(150px, 1fr))',
331
+ // }
332
+ const grid = undefined
333
+
334
+ const rows1 = [{
335
+ id: 1,
336
+ exampleApp: 'Teach Admin',
337
+ data: 'Organizations',
338
+ }]
339
+ const columns1 = [{
340
+ name: 'App Context',
341
+ propName: 'exampleApp',
342
+ styles: {
343
+ 'min-width': '260px',
344
+ },
345
+ }, {
346
+ name: 'Data',
347
+ propName: 'data',
348
+ styles: {
349
+ 'min-width': '260px',
350
+ },
351
+ }]
352
+ const table1 = {
353
+ rows: rows1,
354
+ columns: columns1,
355
+ defaultSelectedRowId: 1,
356
+ updateSortSettings: (sortSettings) => {
357
+ // noop
358
+ },
359
+ searchStringChanged: (searchString) => {
360
+ // noop
361
+ },
362
+ rowClicked: (row) => {
363
+ // noop
364
+ }
365
+ }
366
+
367
+ const rows2 = [{
368
+ id: 1,
369
+ exampleApp: 'Teach Admin',
370
+ data: 'Instructors',
371
+ }, {
372
+ id: 2,
373
+ exampleApp: 'Teach Admin',
374
+ data: 'Instructor\'s Visible Groups',
375
+ }, {
376
+ id: 3,
377
+ exampleApp: 'Teach Admin',
378
+ data: 'Students',
379
+ }, {
380
+ id: 4,
381
+ exampleApp: 'Teach Admin',
382
+ data: 'Student\'s Groups',
383
+ }, {
384
+ id: 5,
385
+ exampleApp: 'Teach Admin',
386
+ data: 'Groups',
387
+ }, {
388
+ id: 6,
389
+ exampleApp: 'Teach Admin',
390
+ data: 'Group\'s Students',
391
+ }, {
392
+ id: 7,
393
+ exampleApp: 'Teach Admin',
394
+ data: 'Exams',
395
+ }, {
396
+ id: 8,
397
+ exampleApp: 'Teach Admin',
398
+ data: 'Licenses',
399
+ }]
400
+ const columns2 = columns1
401
+ const table2 = {
402
+ rows: rows2,
403
+ columns: columns2,
404
+ updateSortSettings: (sortSettings) => {
405
+ // noop
406
+ },
407
+ searchStringChanged: (searchString) => {
408
+ // noop
409
+ },
410
+ rowClicked: (row) => {
411
+ // noop
412
+ }
413
+ }
414
+
415
+ const rows3 = [{
416
+ id: 1,
417
+ exampleApp: 'Teach Settings',
418
+ data: 'Groups',
419
+ }]
420
+ const columns3 = columns1
421
+ const table3 = {
422
+ rows: rows3,
423
+ columns: columns3,
424
+ segmentControlChange: (controlChange) => {
425
+ // noop
426
+ },
427
+ updateSortSettings: (sortSettings) => {
428
+ // noop
429
+ },
430
+ editClicked: (row) => {
431
+ // noop
432
+ }
433
+ }
434
+
435
+ const rows4 = [{
436
+ id: 1,
437
+ exampleApp: 'Teach Settings',
438
+ data: 'Instructors',
439
+ }]
440
+ const columns4 = columns1
441
+ const table4 = {
442
+ rows: rows4,
443
+ columns: columns4,
444
+ updateSortSettings: (sortSettings) => {
445
+ // noop
446
+ },
447
+ editClicked: (row) => {
448
+ // noop
449
+ }
450
+ }
451
+
452
+ const rows5 = [{
453
+ id: 1,
454
+ exampleApp: 'Teach Settings',
455
+ data: 'Seats',
456
+ }]
457
+ const columns5 = columns1
458
+ const table5 = {
459
+ rows: rows5,
460
+ columns: columns5,
461
+ updateSortSettings: (sortSettings) => {
462
+ // noop
463
+ },
464
+ checkedRowsChanged: (checkedRows) => {
465
+ // noop
466
+ }
467
+ }
468
+
469
+ const rows6 = [{
470
+ id: 1,
471
+ exampleApp: 'Teach Settings',
472
+ data: 'Students',
473
+ }]
474
+ const columns6 = columns1
475
+ const table6 = {
476
+ rows: rows6,
477
+ columns: columns6,
478
+ updateSortSettings: (sortSettings) => {
479
+ // noop
480
+ },
481
+ updateSearchString: (searchString) => {
482
+ // noop
483
+ },
484
+ editClicked: (row) => {
485
+ // noop
486
+ },
487
+ buttonClicked: (row) => {
488
+ // noop
489
+ }
490
+ }
491
+
492
+ const rows7 = [{
493
+ id: 1,
494
+ exampleApp: 'Teach Add Group Side Panel',
495
+ data: 'Add Students',
496
+ }, {
497
+ id: 2,
498
+ exampleApp: 'Teach Edit Group -> Select Students Side Panel',
499
+ data: 'Students',
500
+ }, {
501
+ id: 3,
502
+ exampleApp: 'Teach Admin -> Add Exams Side Panel',
503
+ data: 'Exams',
504
+ }]
505
+ const columns7 = columns1
506
+ const table7 = {
507
+ rows: rows7,
508
+ columns: columns7,
509
+ updateSortSettings: (sortSettings) => {
510
+ // noop
511
+ },
512
+ updateSearchString: (searchString) => {
513
+ // noop
514
+ },
515
+ updatedCheckedRows: (checkedRows) => {
516
+ // noop
517
+ }
518
+ }
519
+
520
+ const rows8 = [{
521
+ id: 1,
522
+ exampleApp: 'Teach Add Group Side Panel',
523
+ data: 'Preview Group',
524
+ }, {
525
+ id: 2,
526
+ exampleApp: 'Teach Edit Group Side Panel',
527
+ data: 'Group Students',
528
+ }]
529
+ const columns8 = columns1
530
+ const table8 = {
531
+ rows: rows8,
532
+ columns: columns8,
533
+ updateSortSettings: (sortSettings) => {
534
+ // noop
535
+ },
536
+ updateSearchString: (searchString) => {
537
+ // noop
538
+ },
539
+ rowButtonClicked: (checkedRows) => {
540
+ // noop
541
+ }
542
+ }
543
+
544
+ const rows9 = [{
545
+ id: 1,
546
+ exampleApp: 'Teach Add Students Side Panel',
547
+ data: 'Add Emails',
548
+ }]
549
+ const columns9 = columns1
550
+ const table9 = {
551
+ rows: rows9,
552
+ columns: columns9,
553
+ updateSortSettings: (sortSettings) => {
554
+ // noop
555
+ },
556
+ }
557
+
558
+ const rows10 = [{
559
+ id: 1,
560
+ exampleApp: 'Teach Edit Instructor Side Panel',
561
+ data: 'Exams',
562
+ }, {
563
+ id: 2,
564
+ exampleApp: 'Teach Edit Student Side Panel',
565
+ data: 'Student Groups',
566
+ }]
567
+ const columns10 = columns1
568
+ const table10 = {
569
+ rows: rows10,
570
+ columns: columns10,
571
+ updateSortSettings: (sortSettings) => {
572
+ // noop
573
+ },
574
+ rowButtonClicked: (row) => {
575
+ // noop
576
+ }
577
+ }
578
+
579
+ const rows11 = [{
580
+ id: 1,
581
+ exampleApp: 'Teach Stats Sidebar',
582
+ data: 'Groups',
583
+ }]
584
+ const columns11 = columns1
585
+ const table11 = {
586
+ actions: [{
587
+ id: 1,
588
+ icon: 'edit',
589
+ text: 'Edit Groups',
590
+ }],
591
+ rows: rows11,
592
+ columns: columns11,
593
+ defaultSelectedRowId: 1,
594
+ showDragAndDrop: false,
595
+ actionClicked: (action) => {
596
+ if (action.text === 'Edit Groups') {
597
+ table11.showDragAndDrop = !table11.showDragAndDrop
598
+ }
599
+ },
600
+ rowClicked: (row) => {
601
+ // noop
602
+ },
603
+ updateSortSettings: (sortSettings) => {
604
+ // noop
605
+ },
606
+ rowMoved: (row) => {
607
+ // noop
608
+ }
609
+ }
610
+
611
+ const rows12 = [{
612
+ id: 1,
613
+ exampleApp: 'Teach Stats Sidebar',
614
+ data: 'Students',
615
+ }]
616
+ const columns12 = columns1
617
+ const table12 = {
618
+ actions: [{
619
+ id: 2,
620
+ icon: 'add',
621
+ text: 'Add Students',
622
+ }],
623
+ filterChips: [{
624
+ id: 1,
625
+ text: 'Example Filter',
626
+ }],
627
+ rows: rows12,
628
+ columns: columns12,
629
+ defaultSelectedRowId: 1,
630
+ showDragAndDrop: false,
631
+ actionClicked: (action) => {
632
+ // noop
633
+ },
634
+ rowClicked: (row) => {
635
+ // noop
636
+ },
637
+ updateSortSettings: (sortSettings) => {
638
+ // noop
639
+ },
640
+ updateSearchString: (searchString) => {
641
+ // noop
642
+ }
643
+ }
644
+
645
+ export default {
646
+ components: {
647
+ Table,
648
+ },
649
+ data () {
650
+ return {
651
+ grid,
652
+ table1,
653
+ table2,
654
+ table3,
655
+ table4,
656
+ table5,
657
+ table6,
658
+ table7,
659
+ table8,
660
+ table9,
661
+ table10,
662
+ table11,
663
+ table12,
664
+ }
665
+ },
666
+ }
667
+ </script>
668
+
669
+ <style>
670
+ .table-examples__1,
671
+ .table-examples__2,
672
+ .table-examples__3,
673
+ .table-examples__4,
674
+ .table-examples__5,
675
+ .table-examples__6,
676
+ .table-examples__7,
677
+ .table-examples__8,
678
+ .table-examples__9,
679
+ .table-examples__10,
680
+ .table-examples__11,
681
+ .table-examples__12 {
682
+ margin-bottom: 72px;
683
+ }
684
+
685
+ .table-examples__summary {
686
+ background-color: #f4f5f9;
687
+ padding: 10px;
688
+ margin-bottom: 12px;
689
+ border-radius: 6px;
690
+ }
691
+
692
+ .table-examples__list {
693
+ margin: 0;
694
+ }
695
+ </style>
696
+ ```