@learncard/react 2.10.3 → 2.10.4

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 (495) hide show
  1. package/README.md +10 -10
  2. package/dist/base.css +1 -1
  3. package/dist/base.js +1 -1
  4. package/dist/cjs/{BoostGenericCard-0f68947f.js → BoostGenericCard-5a07339f.js} +2 -2
  5. package/dist/cjs/{BoostGenericCard-0f68947f.js.map → BoostGenericCard-5a07339f.js.map} +1 -1
  6. package/dist/cjs/{CertificateDisplayCard-6c30f6e6.js → CertificateDisplayCard-a7940558.js} +4 -4
  7. package/dist/cjs/{CertificateDisplayCard-6c30f6e6.js.map → CertificateDisplayCard-a7940558.js.map} +1 -1
  8. package/dist/cjs/CircleIcon-f0fa68c7.js.map +1 -1
  9. package/dist/cjs/{LearnCardCreditCardFrontFace-aca1b7bc.js → LearnCardCreditCardFrontFace-75fb4e44.js} +2 -2
  10. package/dist/cjs/{LearnCardCreditCardFrontFace-aca1b7bc.js.map → LearnCardCreditCardFrontFace-75fb4e44.js.map} +1 -1
  11. package/dist/cjs/{MeritBadgeDisplayCard-535853f5.js → MeritBadgeDisplayCard-1c614da9.js} +4 -4
  12. package/dist/cjs/{MeritBadgeDisplayCard-535853f5.js.map → MeritBadgeDisplayCard-1c614da9.js.map} +1 -1
  13. package/dist/cjs/{MeritBadgeSkillsCount-5cc7d16e.js → MeritBadgeSkillsCount-4dabf982.js} +2 -2
  14. package/dist/cjs/{MeritBadgeSkillsCount-5cc7d16e.js.map → MeritBadgeSkillsCount-4dabf982.js.map} +1 -1
  15. package/dist/cjs/{QRCodeCard-f0079bd9.js → QRCodeCard-2378411e.js} +2 -2
  16. package/dist/cjs/{QRCodeCard-f0079bd9.js.map → QRCodeCard-2378411e.js.map} +1 -1
  17. package/dist/cjs/{SchoolIDCard-e22d0d80.js → SchoolIDCard-2d3cbb2c.js} +13 -1189
  18. package/dist/cjs/SchoolIDCard-2d3cbb2c.js.map +1 -0
  19. package/dist/cjs/{VCCard-deabc204.js → VCCard-5bb95d29.js} +3 -3
  20. package/dist/cjs/{VCCard-deabc204.js.map → VCCard-5bb95d29.js.map} +1 -1
  21. package/dist/cjs/{VCDisplayBackFace-a15d5252.js → VCDisplayBackFace-864c35d5.js} +3 -3
  22. package/dist/cjs/{VCDisplayBackFace-a15d5252.js.map → VCDisplayBackFace-864c35d5.js.map} +1 -1
  23. package/dist/cjs/{VCDisplayCard-a64fa405.js → VCDisplayCard-15af27c6.js} +3 -3
  24. package/dist/cjs/{VCDisplayCard-a64fa405.js.map → VCDisplayCard-15af27c6.js.map} +1 -1
  25. package/dist/cjs/{VCDisplayCard2-6c87eade.js → VCDisplayCard2-f3f5c6c4.js} +28 -22
  26. package/dist/cjs/VCDisplayCard2-f3f5c6c4.js.map +1 -0
  27. package/dist/cjs/{VCVerificationPill-e1cc6be2.js → VCVerificationPill-20ed4d3c.js} +2 -2
  28. package/dist/cjs/{VCVerificationPill-e1cc6be2.js.map → VCVerificationPill-20ed4d3c.js.map} +1 -1
  29. package/dist/cjs/{VerifierStateBadgeAndText-5229da1a.js → VerifierStateBadgeAndText-de5bd85f.js} +9 -11
  30. package/dist/cjs/VerifierStateBadgeAndText-de5bd85f.js.map +1 -0
  31. package/dist/cjs/{credential.helpers-473e89c5.js → credential.helpers-b4d27c8a.js} +3 -3
  32. package/dist/cjs/credential.helpers-b4d27c8a.js.map +1 -0
  33. package/dist/cjs/{index-ec1d26f1.js → index-330dcb9c.js} +1 -1
  34. package/dist/cjs/index-330dcb9c.js.map +1 -0
  35. package/dist/cjs/index-47efbf5b.js +1186 -0
  36. package/dist/cjs/index-47efbf5b.js.map +1 -0
  37. package/dist/cjs/{index-0cac2c5b.js → index-da255c9a.js} +1 -1
  38. package/dist/cjs/index-da255c9a.js.map +1 -0
  39. package/dist/cjs/index.js +18 -17
  40. package/dist/cjs/index.js.map +1 -1
  41. package/dist/cjs/index14.js +18 -17
  42. package/dist/cjs/index14.js.map +1 -1
  43. package/dist/cjs/index18.js +2 -2
  44. package/dist/cjs/index22.js +6 -6
  45. package/dist/cjs/index28.js +2 -2
  46. package/dist/cjs/index31.js +2 -1
  47. package/dist/cjs/index31.js.map +1 -1
  48. package/dist/cjs/index39.js +12 -11
  49. package/dist/cjs/index39.js.map +1 -1
  50. package/dist/cjs/index4.js +4 -4
  51. package/dist/cjs/index40.js +5 -5
  52. package/dist/cjs/index41.js +6 -6
  53. package/dist/cjs/index42.js +8 -7
  54. package/dist/cjs/index42.js.map +1 -1
  55. package/dist/cjs/index43.js +2 -2
  56. package/dist/cjs/index46.js +2 -2
  57. package/dist/cjs/index7.js +5 -5
  58. package/dist/cjs/{types.esm-12bb5eed.js → types.esm-40b77196.js} +3 -2
  59. package/dist/cjs/types.esm-40b77196.js.map +1 -0
  60. package/dist/esm/{BoostGenericCard-b332a829.js → BoostGenericCard-997af0f5.js} +2 -2
  61. package/dist/esm/{BoostGenericCard-b332a829.js.map → BoostGenericCard-997af0f5.js.map} +1 -1
  62. package/dist/esm/{CertificateDisplayCard-fc148ca0.js → CertificateDisplayCard-d764151e.js} +4 -4
  63. package/dist/esm/{CertificateDisplayCard-fc148ca0.js.map → CertificateDisplayCard-d764151e.js.map} +1 -1
  64. package/dist/esm/CircleIcon-abd5ff06.js.map +1 -1
  65. package/dist/esm/{LearnCardCreditCardFrontFace-b7c917f5.js → LearnCardCreditCardFrontFace-13d29504.js} +2 -2
  66. package/dist/esm/{LearnCardCreditCardFrontFace-b7c917f5.js.map → LearnCardCreditCardFrontFace-13d29504.js.map} +1 -1
  67. package/dist/esm/{MeritBadgeDisplayCard-da9de0b8.js → MeritBadgeDisplayCard-907627ed.js} +4 -4
  68. package/dist/esm/{MeritBadgeDisplayCard-da9de0b8.js.map → MeritBadgeDisplayCard-907627ed.js.map} +1 -1
  69. package/dist/esm/{MeritBadgeSkillsCount-01e2756e.js → MeritBadgeSkillsCount-9474bd51.js} +2 -2
  70. package/dist/esm/{MeritBadgeSkillsCount-01e2756e.js.map → MeritBadgeSkillsCount-9474bd51.js.map} +1 -1
  71. package/dist/esm/{QRCodeCard-8f29c3c7.js → QRCodeCard-3abf9f33.js} +2 -2
  72. package/dist/esm/{QRCodeCard-8f29c3c7.js.map → QRCodeCard-3abf9f33.js.map} +1 -1
  73. package/dist/esm/{SchoolIDCard-8b151cd3.js → SchoolIDCard-fbd1cf6c.js} +12 -1188
  74. package/dist/esm/SchoolIDCard-fbd1cf6c.js.map +1 -0
  75. package/dist/esm/{VCCard-94dbe6bf.js → VCCard-ce4b451d.js} +3 -3
  76. package/dist/esm/{VCCard-94dbe6bf.js.map → VCCard-ce4b451d.js.map} +1 -1
  77. package/dist/esm/{VCDisplayBackFace-9c5b383f.js → VCDisplayBackFace-e347145c.js} +3 -3
  78. package/dist/esm/{VCDisplayBackFace-9c5b383f.js.map → VCDisplayBackFace-e347145c.js.map} +1 -1
  79. package/dist/esm/{VCDisplayCard-bd4d15e1.js → VCDisplayCard-3002776b.js} +3 -3
  80. package/dist/esm/{VCDisplayCard-bd4d15e1.js.map → VCDisplayCard-3002776b.js.map} +1 -1
  81. package/dist/esm/{VCDisplayCard2-c6a81e42.js → VCDisplayCard2-db880bbb.js} +28 -22
  82. package/dist/esm/VCDisplayCard2-db880bbb.js.map +1 -0
  83. package/dist/esm/{VCVerificationPill-d073557c.js → VCVerificationPill-5a05423b.js} +2 -2
  84. package/dist/esm/{VCVerificationPill-d073557c.js.map → VCVerificationPill-5a05423b.js.map} +1 -1
  85. package/dist/esm/{VerifierStateBadgeAndText-6946e820.js → VerifierStateBadgeAndText-bd1b0131.js} +9 -11
  86. package/dist/esm/VerifierStateBadgeAndText-bd1b0131.js.map +1 -0
  87. package/dist/esm/{credential.helpers-ff461699.js → credential.helpers-26e1a359.js} +3 -3
  88. package/dist/esm/credential.helpers-26e1a359.js.map +1 -0
  89. package/dist/esm/{index-2ef835bd.js → index-bc6b8b0b.js} +1 -1
  90. package/dist/{cjs/index-ec1d26f1.js.map → esm/index-bc6b8b0b.js.map} +1 -1
  91. package/dist/esm/{index-eae3ca64.js → index-cb3a593b.js} +1 -1
  92. package/dist/esm/index-cb3a593b.js.map +1 -0
  93. package/dist/esm/index-cbd2e9db.js +1184 -0
  94. package/dist/esm/index-cbd2e9db.js.map +1 -0
  95. package/dist/esm/index.js +18 -17
  96. package/dist/esm/index.js.map +1 -1
  97. package/dist/esm/index14.js +18 -17
  98. package/dist/esm/index14.js.map +1 -1
  99. package/dist/esm/index18.js +2 -2
  100. package/dist/esm/index22.js +6 -6
  101. package/dist/esm/index28.js +2 -2
  102. package/dist/esm/index31.js +2 -1
  103. package/dist/esm/index31.js.map +1 -1
  104. package/dist/esm/index39.js +12 -11
  105. package/dist/esm/index39.js.map +1 -1
  106. package/dist/esm/index4.js +4 -4
  107. package/dist/esm/index40.js +5 -5
  108. package/dist/esm/index41.js +6 -6
  109. package/dist/esm/index42.js +8 -7
  110. package/dist/esm/index42.js.map +1 -1
  111. package/dist/esm/index43.js +2 -2
  112. package/dist/esm/index46.js +2 -2
  113. package/dist/esm/index7.js +5 -5
  114. package/dist/esm/{types.esm-f32fc00a.js → types.esm-13bb929b.js} +3 -2
  115. package/dist/esm/types.esm-13bb929b.js.map +1 -0
  116. package/dist/main.css +1 -1
  117. package/dist/main.js +1 -1
  118. package/package.json +102 -87
  119. package/src/assets/icons/accommodationsIcon.svg +5 -0
  120. package/src/assets/icons/accomplishmentsIcon.svg +4 -0
  121. package/src/assets/icons/achievementsIcon.svg +7 -0
  122. package/src/assets/icons/coursesIcon.svg +5 -0
  123. package/src/assets/icons/eventsIcon.svg +6 -0
  124. package/src/assets/icons/experiencesIcon.svg +4 -0
  125. package/src/assets/icons/goalsIcon.svg +5 -0
  126. package/src/assets/icons/idIcon.svg +4 -0
  127. package/src/assets/icons/membershipsIcon.svg +4 -0
  128. package/src/assets/icons/relationshipsIcon.svg +6 -0
  129. package/src/assets/icons/skillsIcon.svg +3 -0
  130. package/src/assets/icons/socialBadgesIcon.svg +7 -0
  131. package/src/assets/images/Accommodation-Hands.png +0 -0
  132. package/src/assets/images/ArrowArcLeft.svg +4 -0
  133. package/src/assets/images/ArrowArcRight.svg +4 -0
  134. package/src/assets/images/CaretRight.svg +3 -0
  135. package/src/assets/images/CaretRightFilled.svg +3 -0
  136. package/src/assets/images/DotsThreeOutline.svg +5 -0
  137. package/src/assets/images/GreenCheckCircle.svg +4 -0
  138. package/src/assets/images/RedXCircle.svg +5 -0
  139. package/src/assets/images/X.svg +4 -0
  140. package/src/assets/images/YellowWarningCircle.svg +4 -0
  141. package/src/assets/images/addawardlight.svg +8 -0
  142. package/src/assets/images/agriculture.png +0 -0
  143. package/src/assets/images/apple.png +0 -0
  144. package/src/assets/images/athletics.png +0 -0
  145. package/src/assets/images/award.svg +3 -0
  146. package/src/assets/images/backpack.png +0 -0
  147. package/src/assets/images/badge.png +0 -0
  148. package/src/assets/images/briefcase.svg +6 -0
  149. package/src/assets/images/business.png +0 -0
  150. package/src/assets/images/card-chip.svg +26 -0
  151. package/src/assets/images/check.svg +17 -0
  152. package/src/assets/images/coins.svg +3 -0
  153. package/src/assets/images/contactless-symbol.svg +3 -0
  154. package/src/assets/images/creative.png +0 -0
  155. package/src/assets/images/digital.png +0 -0
  156. package/src/assets/images/durable.png +0 -0
  157. package/src/assets/images/emptystate-death.png +0 -0
  158. package/src/assets/images/emptystate-dinocandle.png +0 -0
  159. package/src/assets/images/emptystate-ghost1.png +0 -0
  160. package/src/assets/images/eventsGraphic.png +0 -0
  161. package/src/assets/images/experience-mountain.png +0 -0
  162. package/src/assets/images/goals-target.png +0 -0
  163. package/src/assets/images/gradcaplight.svg +3 -0
  164. package/src/assets/images/graduation.svg +3 -0
  165. package/src/assets/images/icon.green.fat-arrow.png +0 -0
  166. package/src/assets/images/id-purple.png +0 -0
  167. package/src/assets/images/id-sleeve.png +0 -0
  168. package/src/assets/images/key-icon.svg +4 -0
  169. package/src/assets/images/lhplaceholder.png +0 -0
  170. package/src/assets/images/lightbulb.svg +3 -0
  171. package/src/assets/images/loveyou-icon.svg +5 -0
  172. package/src/assets/images/master-card-logo.svg +20 -0
  173. package/src/assets/images/medical.png +0 -0
  174. package/src/assets/images/membership-graphic.png +0 -0
  175. package/src/assets/images/membership-key.svg +9 -0
  176. package/src/assets/images/minigradcapcolored.svg +3 -0
  177. package/src/assets/images/minijob.svg +5 -0
  178. package/src/assets/images/minipuzzle.svg +3 -0
  179. package/src/assets/images/minipuzzlecolored.svg +3 -0
  180. package/src/assets/images/minitrophy.svg +3 -0
  181. package/src/assets/images/minitrophycolored.svg +3 -0
  182. package/src/assets/images/motlow-buckcard-bg.svg +32 -0
  183. package/src/assets/images/mountains-icon.svg +4 -0
  184. package/src/assets/images/photoplaceholder.png +0 -0
  185. package/src/assets/images/puzzle-icon.svg +3 -0
  186. package/src/assets/images/relationships-cats.png +0 -0
  187. package/src/assets/images/sample-badge.png +0 -0
  188. package/src/assets/images/skillgraph.svg +29 -0
  189. package/src/assets/images/skillplaceholder.png +0 -0
  190. package/src/assets/images/social-badge-2.png +0 -0
  191. package/src/assets/images/social-badge.png +0 -0
  192. package/src/assets/images/social-icon.svg +7 -0
  193. package/src/assets/images/social.png +0 -0
  194. package/src/assets/images/stem.png +0 -0
  195. package/src/assets/images/target-icon.svg +5 -0
  196. package/src/assets/images/trade.png +0 -0
  197. package/src/assets/images/trophy.svg +3 -0
  198. package/src/assets/images/user.svg +4 -0
  199. package/src/assets/images/users-icon.svg +6 -0
  200. package/src/assets/images/vc.check.svg +10 -0
  201. package/src/assets/images/verified-check.png +0 -0
  202. package/src/assets/images/walletTrophy.png +0 -0
  203. package/src/assets/images/walletcurrency.webp +0 -0
  204. package/src/assets/images/walletids.webp +0 -0
  205. package/src/assets/images/walletjobhistory.webp +0 -0
  206. package/src/assets/images/walletskills.webp +0 -0
  207. package/src/assets/styles/base.css +2 -0
  208. package/src/assets/styles/main.css +475 -0
  209. package/src/components/AchievementCard/AchievementCard.stories.tsx +31 -0
  210. package/src/components/AchievementCard/AchievementCard.tsx +88 -0
  211. package/src/components/AchievementCard/index.ts +5 -0
  212. package/src/components/BadgeThumbnailImg/BadgeThumbnailImg.test.tsx +47 -0
  213. package/src/components/BadgeThumbnailImg/BadgeThumbnailImg.tsx +72 -0
  214. package/src/components/BadgeThumbnailImg/index.ts +5 -0
  215. package/src/components/BoostGenericCard/AlignmentSkillsCount.tsx +54 -0
  216. package/src/components/BoostGenericCard/BoostGenericCard.stories.tsx +39 -0
  217. package/src/components/BoostGenericCard/BoostGenericCard.tsx +177 -0
  218. package/src/components/BoostGenericCard/index.ts +6 -0
  219. package/src/components/BoostSmallCard/BoostSmallCard.stories.tsx +57 -0
  220. package/src/components/BoostSmallCard/BoostSmallCard.tsx +178 -0
  221. package/src/components/BoostSmallCard/index.ts +5 -0
  222. package/src/components/Button/Button.stories.tsx +20 -0
  223. package/src/components/Button/Button.test.tsx +15 -0
  224. package/src/components/Button/Button.tsx +21 -0
  225. package/src/components/Button/index.ts +5 -0
  226. package/src/components/CertificateDisplayCard/AlignmentRow.tsx +26 -0
  227. package/src/components/CertificateDisplayCard/AlignmentsBox.tsx +70 -0
  228. package/src/components/CertificateDisplayCard/CertDisplayCardSkillsCount.tsx +66 -0
  229. package/src/components/CertificateDisplayCard/CertificateBackFace.tsx +130 -0
  230. package/src/components/CertificateDisplayCard/CertificateCornerIcon.tsx +48 -0
  231. package/src/components/CertificateDisplayCard/CertificateDisplayCard.stories.tsx +21 -0
  232. package/src/components/CertificateDisplayCard/CertificateDisplayCard.tsx +180 -0
  233. package/src/components/CertificateDisplayCard/CertificateFrontFace.tsx +308 -0
  234. package/src/components/CertificateDisplayCard/CertificateImageDisplay.test.tsx +43 -0
  235. package/src/components/CertificateDisplayCard/CertificateImageDisplay.tsx +68 -0
  236. package/src/components/CertificateDisplayCard/CertificateProfileImageDisplay.test.tsx +66 -0
  237. package/src/components/CertificateDisplayCard/CertificateProfileImageDisplay.tsx +64 -0
  238. package/src/components/CertificateDisplayCard/CertificateRibbon.tsx +43 -0
  239. package/src/components/CertificateDisplayCard/InfoBox.tsx +30 -0
  240. package/src/components/CertificateDisplayCard/MediaAttachmentsBox.tsx +347 -0
  241. package/src/components/CertificateDisplayCard/TruncateTextBox.tsx +73 -0
  242. package/src/components/CertificateDisplayCard/VerificationRow.tsx +67 -0
  243. package/src/components/CertificateDisplayCard/VerificationsBox.tsx +44 -0
  244. package/src/components/CertificateDisplayCard/VerifierStateBadgeAndText.tsx +100 -0
  245. package/src/components/CertificateDisplayCard/index.ts +20 -0
  246. package/src/components/CircleCheckButton/CircleCheckButton.stories.tsx +21 -0
  247. package/src/components/CircleCheckButton/CircleCheckButton.tsx +28 -0
  248. package/src/components/CircleCheckButton/index.ts +5 -0
  249. package/src/components/CircleIcon/CircleIcon.tsx +90 -0
  250. package/src/components/CircleIcon/__tests__/CircleIcon.test.tsx +38 -0
  251. package/src/components/CircleIcon/ci new +0 -0
  252. package/src/components/CircleIcon/index.ts +5 -0
  253. package/src/components/CourseCard/CourseCard.stories.tsx +23 -0
  254. package/src/components/CourseCard/CourseCard.tsx +94 -0
  255. package/src/components/CourseCard/index.ts +5 -0
  256. package/src/components/CourseVerticalCard/CourseVerticalCard.stories.tsx +31 -0
  257. package/src/components/CourseVerticalCard/CourseVerticalCard.tsx +118 -0
  258. package/src/components/CourseVerticalCard/index.ts +5 -0
  259. package/src/components/FlippyCard/FlippyCard.tsx +34 -0
  260. package/src/components/FlippyCard/__tests__/FlippyCard.test.tsx +41 -0
  261. package/src/components/FlippyCard/index.ts +5 -0
  262. package/src/components/GenericCard/GenericCard.stories.tsx +22 -0
  263. package/src/components/GenericCard/GenericCard.tsx +72 -0
  264. package/src/components/GenericCard/index.ts +5 -0
  265. package/src/components/JobHistoryCard/JobHistoryCard.stories.tsx +26 -0
  266. package/src/components/JobHistoryCard/JobHistoryCard.tsx +44 -0
  267. package/src/components/JobHistoryCard/index.ts +5 -0
  268. package/src/components/JobListCard/JobListCard.stories.tsx +54 -0
  269. package/src/components/JobListCard/JobListCard.tsx +162 -0
  270. package/src/components/JobListCard/index.ts +5 -0
  271. package/src/components/LearnCardCreditCardBackFace/LearnCardCreditCardBackFace.stories.tsx +31 -0
  272. package/src/components/LearnCardCreditCardBackFace/LearnCardCreditCardBackFace.tsx +104 -0
  273. package/src/components/LearnCardCreditCardBackFace/__tests__/LearnCardCreditCardBackFace.test.tsx +64 -0
  274. package/src/components/LearnCardCreditCardBackFace/index.ts +6 -0
  275. package/src/components/LearnCardCreditCardBackFace/types.ts +45 -0
  276. package/src/components/LearnCardCreditCardFrontFace/LearnCardCreditCardFrontFace.stories.tsx +28 -0
  277. package/src/components/LearnCardCreditCardFrontFace/LearnCardCreditCardFrontFace.tsx +102 -0
  278. package/src/components/LearnCardCreditCardFrontFace/__tests__/LearnCardCreditCardFrontFace.test.tsx +48 -0
  279. package/src/components/LearnCardCreditCardFrontFace/index.ts +6 -0
  280. package/src/components/LearnCardCreditCardFrontFace/types.ts +42 -0
  281. package/src/components/LearnPill/LearnPill.stories.tsx +20 -0
  282. package/src/components/LearnPill/LearnPill.tsx +35 -0
  283. package/src/components/LearnPill/index.ts +5 -0
  284. package/src/components/Lightbox/Lightbox.tsx +133 -0
  285. package/src/components/Lightbox/index.ts +5 -0
  286. package/src/components/Loading/CircleSpinner.tsx +52 -0
  287. package/src/components/Loading/index.ts +5 -0
  288. package/src/components/MeritBadgeDisplayCard/AlignmentRow.tsx +26 -0
  289. package/src/components/MeritBadgeDisplayCard/AlignmentsBox.tsx +70 -0
  290. package/src/components/MeritBadgeDisplayCard/InfoBox.tsx +30 -0
  291. package/src/components/MeritBadgeDisplayCard/MediaAttachmentsBox.tsx +347 -0
  292. package/src/components/MeritBadgeDisplayCard/MeritBadgeBackFace.tsx +130 -0
  293. package/src/components/MeritBadgeDisplayCard/MeritBadgeCornerIcon.tsx +46 -0
  294. package/src/components/MeritBadgeDisplayCard/MeritBadgeDisplayCard.tsx +177 -0
  295. package/src/components/MeritBadgeDisplayCard/MeritBadgeFrontFace.tsx +292 -0
  296. package/src/components/MeritBadgeDisplayCard/MeritBadgeImageDisplay.tsx +22 -0
  297. package/src/components/MeritBadgeDisplayCard/MeritBadgeProfileImageDisplay.test.tsx +70 -0
  298. package/src/components/MeritBadgeDisplayCard/MeritBadgeProfileImageDisplay.tsx +66 -0
  299. package/src/components/MeritBadgeDisplayCard/MeritBadgeRibbon.tsx +185 -0
  300. package/src/components/MeritBadgeDisplayCard/MeritBadgeSkillsCount.tsx +47 -0
  301. package/src/components/MeritBadgeDisplayCard/TruncateTextBox.tsx +73 -0
  302. package/src/components/MeritBadgeDisplayCard/VerificationRow.tsx +67 -0
  303. package/src/components/MeritBadgeDisplayCard/VerificationsBox.tsx +44 -0
  304. package/src/components/MeritBadgeDisplayCard/VerifierStateBadgeAndText.tsx +57 -0
  305. package/src/components/MeritBadgeDisplayCard/index.ts +20 -0
  306. package/src/components/MiniVCThumbnail/ MiniVCThumbnail.css +18 -0
  307. package/src/components/MiniVCThumbnail/ MiniVCThumbnail.stories.tsx +24 -0
  308. package/src/components/MiniVCThumbnail/MiniVCThumbnail.tsx +83 -0
  309. package/src/components/MiniVCThumbnail/__tests__/MiniVCThumbnail.test.tsx +59 -0
  310. package/src/components/MiniVCThumbnail/index.ts +6 -0
  311. package/src/components/MiniVCThumbnail/types.ts +32 -0
  312. package/src/components/Notification/Notification.stories.tsx +25 -0
  313. package/src/components/Notification/Notification.tsx +115 -0
  314. package/src/components/Notification/__tests__/Notification.test.tsx +111 -0
  315. package/src/components/Notification/index.ts +6 -0
  316. package/src/components/Notification/types.ts +97 -0
  317. package/src/components/NotificationBoostCard/NotificationBoostCard.stories.tsx +54 -0
  318. package/src/components/NotificationBoostCard/NotificationBoostCard.tsx +153 -0
  319. package/src/components/NotificationBoostCard/index.ts +6 -0
  320. package/src/components/NotificationBoostCard/types.ts +25 -0
  321. package/src/components/NotificationUserAcceptedBoostCard/NotificationUserAcceptedBoostCard.stories.tsx +28 -0
  322. package/src/components/NotificationUserAcceptedBoostCard/NotificationUserAcceptedBoostCard.tsx +96 -0
  323. package/src/components/NotificationUserAcceptedBoostCard/index.ts +6 -0
  324. package/src/components/NotificationUserAcceptedBoostCard/types.ts +13 -0
  325. package/src/components/NotificationUserCard/NotificationUserCard.stories.tsx +26 -0
  326. package/src/components/NotificationUserCard/NotificationUserCard.tsx +121 -0
  327. package/src/components/NotificationUserCard/index.ts +6 -0
  328. package/src/components/NotificationUserCard/types.ts +43 -0
  329. package/src/components/QRCodeCard/QRCodeCard.stories.tsx +26 -0
  330. package/src/components/QRCodeCard/QRCodeCard.tsx +54 -0
  331. package/src/components/QRCodeCard/__tests__/QRCodeCard.test.tsx +31 -0
  332. package/src/components/QRCodeCard/index.ts +6 -0
  333. package/src/components/QRCodeCard/types.ts +22 -0
  334. package/src/components/RoundedPill/RoundedPill.stories.tsx +21 -0
  335. package/src/components/RoundedPill/RoundedPill.tsx +137 -0
  336. package/src/components/RoundedPill/index.ts +5 -0
  337. package/src/components/RoundedSquare/RoundedSquare.stories.tsx +28 -0
  338. package/src/components/RoundedSquare/RoundedSquare.tsx +69 -0
  339. package/src/components/RoundedSquare/__tests__/RoundedSquare.test.tsx +35 -0
  340. package/src/components/RoundedSquare/constants.ts +63 -0
  341. package/src/components/RoundedSquare/index.ts +6 -0
  342. package/src/components/RoundedSquare/roudnedquarenew +0 -0
  343. package/src/components/SchoolIdCard/SchoolIDCard.stories.tsx +30 -0
  344. package/src/components/SchoolIdCard/SchoolIDCard.tsx +81 -0
  345. package/src/components/SchoolIdCard/index.ts +6 -0
  346. package/src/components/SchoolIdCard/types.ts +42 -0
  347. package/src/components/SkillTabCard/SkillTabCard.stories.tsx +25 -0
  348. package/src/components/SkillTabCard/SkillTabCard.tsx +44 -0
  349. package/src/components/SkillTabCard/index.ts +5 -0
  350. package/src/components/SkillVerticalCard/SkillVerticalCard.stories.tsx +20 -0
  351. package/src/components/SkillVerticalCard/SkillVerticalCard.tsx +32 -0
  352. package/src/components/SkillVerticalCard/index.ts +5 -0
  353. package/src/components/SkillsCard/SkillsCard.stories.tsx +24 -0
  354. package/src/components/SkillsCard/SkillsCard.tsx +68 -0
  355. package/src/components/SkillsCard/index.ts +5 -0
  356. package/src/components/SkillsStatsCard/SkillsStatsCard.stories.tsx +63 -0
  357. package/src/components/SkillsStatsCard/SkillsStatsCard.tsx +92 -0
  358. package/src/components/SkillsStatsCard/index.ts +5 -0
  359. package/src/components/SmallAchievementCard/SmallAchievementCard.stories.tsx +23 -0
  360. package/src/components/SmallAchievementCard/SmallAchievementCard.tsx +50 -0
  361. package/src/components/SmallAchievementCard/index.ts +5 -0
  362. package/src/components/UserProfilePicture/UserProfilePicture.test.tsx +44 -0
  363. package/src/components/UserProfilePicture/UserProfilePicture.tsx +119 -0
  364. package/src/components/UserProfilePicture/index.ts +5 -0
  365. package/src/components/VCCard/VCCard.stories.tsx +64 -0
  366. package/src/components/VCCard/VCCard.tsx +84 -0
  367. package/src/components/VCCard/index.ts +5 -0
  368. package/src/components/VCDisplayBackFace/VCDisplayBackFace.tsx +112 -0
  369. package/src/components/VCDisplayBackFace/index.ts +5 -0
  370. package/src/components/VCDisplayCard/VCDisplayCard.stories.tsx +167 -0
  371. package/src/components/VCDisplayCard/VCDisplayCard.tsx +98 -0
  372. package/src/components/VCDisplayCard/index.ts +5 -0
  373. package/src/components/VCDisplayCard2/FitText.tsx +85 -0
  374. package/src/components/VCDisplayCard2/InfoBox.tsx +30 -0
  375. package/src/components/VCDisplayCard2/IssueHistoryBox.tsx +50 -0
  376. package/src/components/VCDisplayCard2/MediaAttachmentsBox.tsx +306 -0
  377. package/src/components/VCDisplayCard2/RibbonEnd.tsx +67 -0
  378. package/src/components/VCDisplayCard2/SelectedSkills.tsx +70 -0
  379. package/src/components/VCDisplayCard2/SkillsBox.tsx +53 -0
  380. package/src/components/VCDisplayCard2/Subskill.tsx +50 -0
  381. package/src/components/VCDisplayCard2/TopLevelSkill.tsx +63 -0
  382. package/src/components/VCDisplayCard2/TruncateTextBox.tsx +89 -0
  383. package/src/components/VCDisplayCard2/VC2BackFace.tsx +185 -0
  384. package/src/components/VCDisplayCard2/VC2FrontFaceInfo.tsx +279 -0
  385. package/src/components/VCDisplayCard2/VCDisplayCard2.stories.tsx +191 -0
  386. package/src/components/VCDisplayCard2/VCDisplayCard2.tsx +526 -0
  387. package/src/components/VCDisplayCard2/VCDisplayCard2AvatarFallbacks.stories.tsx +312 -0
  388. package/src/components/VCDisplayCard2/VCDisplayCardCategoryType.tsx +19 -0
  389. package/src/components/VCDisplayCard2/VCDisplayCardSkillsCount.tsx +46 -0
  390. package/src/components/VCDisplayCard2/VCIDDIsplayCard.tsx +159 -0
  391. package/src/components/VCDisplayCard2/VCIDDisplayFrontFace.tsx +213 -0
  392. package/src/components/VCDisplayCard2/VerificationRow.tsx +69 -0
  393. package/src/components/VCDisplayCard2/VerificationsBox.tsx +44 -0
  394. package/src/components/VCDisplayCard2/__tests__/VC2FrontFaceInfo.test.tsx +134 -0
  395. package/src/components/VCDisplayCard2/index.ts +23 -0
  396. package/src/components/VCDisplayFrontFace/VCDisplayFrontFace.tsx +143 -0
  397. package/src/components/VCDisplayFrontFace/index.ts +5 -0
  398. package/src/components/VCThumbnail/VCThumbnail.stories.tsx +32 -0
  399. package/src/components/VCThumbnail/VCThumbnail.tsx +182 -0
  400. package/src/components/VCThumbnail/__tests__/VCThumbnail.test.tsx +114 -0
  401. package/src/components/VCThumbnail/index.ts +6 -0
  402. package/src/components/VCThumbnail/types.ts +46 -0
  403. package/src/components/VCVerificationCheck/VCVerificationCheck.tsx +89 -0
  404. package/src/components/VCVerificationCheck/index.ts +5 -0
  405. package/src/components/VCVerificationPill/VCVerificationPill.tsx +85 -0
  406. package/src/components/VCVerificationPill/index.ts +5 -0
  407. package/src/components/index.ts +48 -0
  408. package/src/components/svgs/AccommodationsIcon.tsx +38 -0
  409. package/src/components/svgs/AccomplishmentsIcon.tsx +34 -0
  410. package/src/components/svgs/AchievementWithTitle.tsx +137 -0
  411. package/src/components/svgs/AcuteCheckmark.tsx +25 -0
  412. package/src/components/svgs/AwardDisplayIcon.tsx +37 -0
  413. package/src/components/svgs/AwardRibbon.tsx +29 -0
  414. package/src/components/svgs/BadgeDisplayIcon.tsx +31 -0
  415. package/src/components/svgs/Briefcase.tsx +48 -0
  416. package/src/components/svgs/Camera.tsx +25 -0
  417. package/src/components/svgs/CertificateDisplayIcon.tsx +56 -0
  418. package/src/components/svgs/Checkmark.tsx +59 -0
  419. package/src/components/svgs/CircleWithText.tsx +36 -0
  420. package/src/components/svgs/Coins.tsx +14 -0
  421. package/src/components/svgs/CourseDisplayIcon.tsx +43 -0
  422. package/src/components/svgs/DownRightArrow.tsx +29 -0
  423. package/src/components/svgs/ExclamationPoint.tsx +25 -0
  424. package/src/components/svgs/ExperienceIcon.tsx +34 -0
  425. package/src/components/svgs/FatArrow.tsx +44 -0
  426. package/src/components/svgs/GenericArrow.tsx +29 -0
  427. package/src/components/svgs/GenericDocumentIcon.tsx +26 -0
  428. package/src/components/svgs/Graduation.tsx +24 -0
  429. package/src/components/svgs/IDDisplayIcon.tsx +63 -0
  430. package/src/components/svgs/IDIcon.tsx +59 -0
  431. package/src/components/svgs/IDSleeve.tsx +21 -0
  432. package/src/components/svgs/InfoIcon.tsx +26 -0
  433. package/src/components/svgs/IssuerSeal.tsx +26 -0
  434. package/src/components/svgs/KeyIcon.tsx +31 -0
  435. package/src/components/svgs/LeftArrow.tsx +27 -0
  436. package/src/components/svgs/Lightbulb.tsx +14 -0
  437. package/src/components/svgs/Line.tsx +22 -0
  438. package/src/components/svgs/LinkIcon.tsx +35 -0
  439. package/src/components/svgs/PdfIcon.tsx +38 -0
  440. package/src/components/svgs/PersonBadge.tsx +55 -0
  441. package/src/components/svgs/PuzzlePiece.tsx +89 -0
  442. package/src/components/svgs/QRCodeIcon.tsx +21 -0
  443. package/src/components/svgs/RedFlag.tsx +41 -0
  444. package/src/components/svgs/RoundedCorner.tsx +28 -0
  445. package/src/components/svgs/RoundedX.tsx +35 -0
  446. package/src/components/svgs/ScoutsLogo.tsx +41 -0
  447. package/src/components/svgs/ScoutsPledge.tsx +33 -0
  448. package/src/components/svgs/ShieldChevron.tsx +24 -0
  449. package/src/components/svgs/Smiley.tsx +43 -0
  450. package/src/components/svgs/SocialBadgesIcon.tsx +43 -0
  451. package/src/components/svgs/ThreeDotVertical.tsx +41 -0
  452. package/src/components/svgs/Trophy.tsx +25 -0
  453. package/src/components/svgs/UnknownVerifierBadge.tsx +25 -0
  454. package/src/components/svgs/User.tsx +34 -0
  455. package/src/components/svgs/VerifiedBadge.tsx +37 -0
  456. package/src/components/svgs/VideoIcon.tsx +28 -0
  457. package/src/components/svgs/X.tsx +35 -0
  458. package/src/components/svgs/index.ts +54 -0
  459. package/src/constants/icons.ts +87 -0
  460. package/src/constants/index.ts +109 -0
  461. package/src/constants/notifications.ts +14 -0
  462. package/src/constants/skills.ts +2202 -0
  463. package/src/declaration.d.ts +21 -0
  464. package/src/helpers/__tests__/credentialFormat.helpers.test.ts +100 -0
  465. package/src/helpers/color.helpers.ts +35 -0
  466. package/src/helpers/credential.helpers.test.ts +108 -0
  467. package/src/helpers/credential.helpers.tsx +249 -0
  468. package/src/helpers/credentialFormat.helpers.ts +68 -0
  469. package/src/helpers/did-display.helpers.ts +230 -0
  470. package/src/helpers/display.helpers.ts +53 -0
  471. package/src/helpers/string.helpers.ts +7 -0
  472. package/src/helpers/test.helpers.ts +680 -0
  473. package/src/helpers/url.helpers.ts +3 -0
  474. package/src/helpers/useHorizontalPages.ts +130 -0
  475. package/src/helpers/useOnMomentumScrollEnd.ts +28 -0
  476. package/src/helpers/useScrollBorders.ts +59 -0
  477. package/src/helpers/video.helpers.ts +125 -0
  478. package/src/hooks/useCredentialFormat.tsx +23 -0
  479. package/src/hooks/useParsedSdJwtVc.tsx +64 -0
  480. package/src/index.ts +16 -0
  481. package/src/types/index.ts +390 -0
  482. package/LICENSE +0 -21
  483. package/dist/cjs/SchoolIDCard-e22d0d80.js.map +0 -1
  484. package/dist/cjs/VCDisplayCard2-6c87eade.js.map +0 -1
  485. package/dist/cjs/VerifierStateBadgeAndText-5229da1a.js.map +0 -1
  486. package/dist/cjs/credential.helpers-473e89c5.js.map +0 -1
  487. package/dist/cjs/index-0cac2c5b.js.map +0 -1
  488. package/dist/cjs/types.esm-12bb5eed.js.map +0 -1
  489. package/dist/esm/SchoolIDCard-8b151cd3.js.map +0 -1
  490. package/dist/esm/VCDisplayCard2-c6a81e42.js.map +0 -1
  491. package/dist/esm/VerifierStateBadgeAndText-6946e820.js.map +0 -1
  492. package/dist/esm/credential.helpers-ff461699.js.map +0 -1
  493. package/dist/esm/index-2ef835bd.js.map +0 -1
  494. package/dist/esm/index-eae3ca64.js.map +0 -1
  495. package/dist/esm/types.esm-f32fc00a.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ import { NotificationTypeEnum } from '../../constants/notifications';
2
+
3
+ export interface NotificationIssuerMeta {
4
+ image?: string;
5
+ fullName?: string;
6
+ profileId?: string;
7
+ displayName?: string;
8
+ }
9
+
10
+ export type NotificationBoostCardProps = {
11
+ className?: string;
12
+ thumbImage?: string;
13
+ customThumbComponent?: React.ReactNode;
14
+ notificationType: NotificationTypeEnum;
15
+ issuerInfo?: NotificationIssuerMeta;
16
+ issueDate?: string;
17
+ handleButtonClick?: () => void;
18
+ handleCancelClick?: () => void;
19
+ handleCardClick?: () => void;
20
+ claimStatus: boolean;
21
+ loadingState?: boolean;
22
+ showIssuerInfo?: boolean;
23
+ title?: string;
24
+ isArchived?: boolean;
25
+ };
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Story, Meta } from '@storybook/react';
3
+
4
+ import NotificationUserAcceptedBoostCard from './NotificationUserAcceptedBoostCard';
5
+ import { NotificationUserAcceptedBoostCardProps } from './types';
6
+ import { UserNotificationTypeEnum } from '../../constants/notifications';
7
+
8
+ export default {
9
+ title: 'NotificationUserAcceptedBoostCard',
10
+ component: NotificationUserAcceptedBoostCard,
11
+ argTypes: {},
12
+ } as Meta<typeof NotificationUserAcceptedBoostCard>;
13
+
14
+ const Template: Story<NotificationUserAcceptedBoostCardProps> = args => (
15
+ <NotificationUserAcceptedBoostCard {...args} />
16
+ );
17
+
18
+ export const NotificationUserAcceptedBoostCardTest = Template.bind({});
19
+
20
+ NotificationUserAcceptedBoostCardTest.args = {
21
+ title: 'Bobby Brown accepted your boost Ice Cream Achievement',
22
+ thumbImage: 'https://picsum.photos/300',
23
+ className: 'notification-boost-card-user-accepted-test',
24
+ issueDate: 'Apr 04 2022',
25
+ notificationType: UserNotificationTypeEnum.AcceptedBoost,
26
+ handleCancelClick: () => console.log('///CANCEL CLICK'),
27
+ isArchived: false,
28
+ };
@@ -0,0 +1,96 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import X from '../../assets/images/X.svg';
3
+ import { NotificationUserAcceptedBoostCardProps } from './types';
4
+ import { UserNotificationTypeStyles } from '../NotificationUserCard/types';
5
+
6
+ import { UserNotificationTypeEnum } from '../../constants/notifications';
7
+ import ArrowArcLeft from '../../assets/images/ArrowArcLeft.svg';
8
+
9
+ export const NotificationUserAcceptedBoostCard: React.FC<
10
+ NotificationUserAcceptedBoostCardProps
11
+ > = ({
12
+ title,
13
+ customThumbComponent,
14
+ className,
15
+ thumbImage,
16
+ notificationType = UserNotificationTypeEnum.AcceptedBoost,
17
+ issueDate,
18
+ loadingState = false,
19
+ handleCancelClick,
20
+ isArchived,
21
+ }) => {
22
+ const [isLoading, setIsLoading] = useState<boolean>(loadingState || false);
23
+
24
+ useEffect(() => {
25
+ setIsLoading(loadingState);
26
+ }, [loadingState]);
27
+
28
+ const { textStyles, viewButtonStyles, typeText } = UserNotificationTypeStyles[notificationType];
29
+
30
+ return (
31
+ <div
32
+ className={`flex justify-start max-w-[600px] items-start relative w-full rounded-3xl shadow-bottom py-[10px] px-[10px] bg-white ${className}`}
33
+ >
34
+ <div className="notification-card-left-side px-[0px] flex">
35
+ {!customThumbComponent && (
36
+ <div
37
+ className={`overflow-hidden w-[50px] h-[50px] rounded-full flex items-start notification-card-thumbnail`}
38
+ >
39
+ <img
40
+ src={thumbImage}
41
+ alt="Notification Thumb"
42
+ className="w-full h-full w-[50px] h-[50px] object-cover"
43
+ />
44
+ </div>
45
+ )}
46
+ {customThumbComponent && customThumbComponent}
47
+ </div>
48
+ <div className="flex flex-col justify-center items-start relative w-full">
49
+ <div className="text-left ml-3 flex flex-col items-start justify-start w-full">
50
+ <h4
51
+ className="font-bold tracking-wide line-clamp-2 text-black text-[14px] pr-[20px] notification-card-title"
52
+ data-testid="notification-title"
53
+ >
54
+ {title}
55
+ </h4>
56
+ <p
57
+ className={`font-semibold p-0 mt-[10px] leading-none tracking-wide line-clamp-1 text-[12px] notification-card-type-text ${textStyles}`}
58
+ data-testid="notification-type"
59
+ >
60
+ {typeText}{' '}
61
+ {issueDate && (
62
+ <span
63
+ className="text-grayscale-600 normal-case font-normal text-[12px] notification-card-type-issue-date"
64
+ data-testid="notification-cred-issue-date"
65
+ >
66
+ {typeText && '•'} {issueDate}
67
+ </span>
68
+ )}
69
+ </p>
70
+
71
+ <div className="flex items-center justify-end w-full mt-3">
72
+ <button
73
+ onClick={handleCancelClick}
74
+ className={`rounded-[24px] flex items-center justify-center h-[42px] w-[42px] shadow-bottom bg-white font-semibold mr-2 p-[0px] tracking-wide ${viewButtonStyles}`}
75
+ role="button"
76
+ name="notification-view-button"
77
+ >
78
+ {!isArchived && (
79
+ <img src={X ?? ''} alt="Cancel" className="notification-card-x" />
80
+ )}
81
+ {isArchived && (
82
+ <img
83
+ src={ArrowArcLeft ?? ''}
84
+ alt="Cancel"
85
+ className="notification-card-x"
86
+ />
87
+ )}
88
+ </button>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ );
94
+ };
95
+
96
+ export default NotificationUserAcceptedBoostCard;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+
5
+ export * from './NotificationUserAcceptedBoostCard';
6
+ export * from './types';
@@ -0,0 +1,13 @@
1
+ import { UserNotificationTypeEnum } from '../../constants/notifications';
2
+
3
+ export type NotificationUserAcceptedBoostCardProps = {
4
+ className?: string;
5
+ thumbImage?: string;
6
+ customThumbComponent?: React.ReactNode;
7
+ notificationType?: UserNotificationTypeEnum.AcceptedBoost;
8
+ issueDate?: string;
9
+ handleCancelClick?: () => void;
10
+ loadingState?: boolean;
11
+ title?: string;
12
+ isArchived?: boolean;
13
+ };
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { Story, Meta } from '@storybook/react';
3
+
4
+ import NotificationUserCard from './NotificationUserCard';
5
+ import { NotificationUserCardProps } from './types';
6
+
7
+ export default {
8
+ title: 'NotificationUserCard',
9
+ component: NotificationUserCard,
10
+ argTypes: {},
11
+ } as Meta<typeof NotificationUserCard>;
12
+
13
+ const Template: Story<NotificationUserCardProps> = args => <NotificationUserCard {...args} />;
14
+
15
+ export const NotificationUserCardTest = Template.bind({});
16
+
17
+ NotificationUserCardTest.args = {
18
+ title: 'Bobby Brown sent you a connection request',
19
+ thumbImage: 'https://picsum.photos/300',
20
+ className: 'notification-boost-card-user-test',
21
+ issueDate: 'Apr 04 2022',
22
+ acceptStatus: false,
23
+ handleButtonClick: () => console.log('BUTTON CLICK'),
24
+ handleCancelClick: () => console.log('///CANCEL CLICK'),
25
+ isArchived: false,
26
+ };
@@ -0,0 +1,121 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import X from '../../assets/images/X.svg';
3
+ import { NotificationUserCardProps, UserNotificationTypeStyles } from './types';
4
+
5
+ import { UserNotificationTypeEnum } from '../../constants/notifications';
6
+ import Checkmark from '../svgs/Checkmark';
7
+ import ArrowArcLeft from '../../assets/images/ArrowArcLeft.svg';
8
+
9
+ export const NotificationUserCard: React.FC<NotificationUserCardProps> = ({
10
+ title,
11
+ customThumbComponent,
12
+ className,
13
+ thumbImage,
14
+ issueDate,
15
+ acceptStatus = false,
16
+ loadingState = false,
17
+ handleButtonClick,
18
+ handleCancelClick,
19
+ isArchived,
20
+ }) => {
21
+ const [isAccepted, setisAccepted] = useState<boolean>(acceptStatus || false);
22
+ const [isLoading, setIsLoading] = useState<boolean>(loadingState || false);
23
+
24
+ useEffect(() => {
25
+ setisAccepted(acceptStatus);
26
+ }, [acceptStatus]);
27
+
28
+ useEffect(() => {
29
+ setIsLoading(loadingState);
30
+ }, [loadingState]);
31
+
32
+ const { textStyles, viewButtonStyles, claimedButtonStyles, unclaimedButtonStyles, typeText } =
33
+ UserNotificationTypeStyles[UserNotificationTypeEnum.ConnectionRequest];
34
+
35
+ const claimButtonStyles = isAccepted ? claimedButtonStyles : unclaimedButtonStyles;
36
+
37
+ let buttonText: string = '';
38
+
39
+ if (isAccepted) {
40
+ buttonText = 'Accepted';
41
+ } else if (!isAccepted) {
42
+ buttonText = 'Accept';
43
+ }
44
+
45
+ return (
46
+ <div
47
+ className={`flex justify-start max-w-[600px] items-start relative w-full rounded-3xl shadow-bottom py-[10px] px-[10px] bg-white ${className}`}
48
+ >
49
+ <div className="notification-card-left-side px-[0px] flex">
50
+ {!customThumbComponent && (
51
+ <div
52
+ className={`overflow-hidden cursor-pointer w-[68px] h-[68px] rounded-full flex items-start notification-card-thumbnail`}
53
+ >
54
+ <img
55
+ src={thumbImage}
56
+ alt="Notification Thumb"
57
+ className="w-full h-full w-[68px] h-[68px] object-cover"
58
+ />
59
+ </div>
60
+ )}
61
+ {customThumbComponent && customThumbComponent}
62
+ </div>
63
+ <div className="flex flex-col justify-center items-start relative w-full">
64
+ <div className="text-left ml-3 flex flex-col items-start justify-start w-full">
65
+ <h4
66
+ className="cursor-pointer font-bold tracking-wide line-clamp-2 text-black text-[14px] pr-[20px] notification-card-title"
67
+ data-testid="notification-title"
68
+ >
69
+ {title}
70
+ </h4>
71
+ <p
72
+ className={`font-semibold p-0 mt-[10px] leading-none tracking-wide line-clamp-1 text-[12px] notification-card-type-text ${textStyles}`}
73
+ data-testid="notification-type"
74
+ >
75
+ {typeText}{' '}
76
+ {issueDate && (
77
+ <span
78
+ className="text-grayscale-600 normal-case font-normal text-[12px] notification-card-type-issue-date"
79
+ data-testid="notification-cred-issue-date"
80
+ >
81
+ • {issueDate}
82
+ </span>
83
+ )}
84
+ </p>
85
+
86
+ <div className="flex items-center justify-between mt-3 w-full">
87
+ <button
88
+ className={`notification-claim-btn flex items-center mr-[15px] w-[143px] justify-center flex-1 rounded-[24px] border-2 border-solid font-semibold py-2 px-3 tracking-wide ${claimButtonStyles}`}
89
+ onClick={handleButtonClick}
90
+ role="button"
91
+ name="notification-claim-button"
92
+ >
93
+ {isAccepted && <Checkmark className="h-[24px] p-0 m-0" />}{' '}
94
+ {isLoading ? 'Loading...' : buttonText}
95
+ </button>
96
+
97
+ <button
98
+ onClick={handleCancelClick}
99
+ className={`rounded-[24px] flex items-center justify-center h-[42px] w-[42px] shadow-bottom bg-white font-semibold mr-2 p-[0px] tracking-wide ${viewButtonStyles}`}
100
+ role="button"
101
+ name="notification-view-button"
102
+ >
103
+ {!isArchived && (
104
+ <img src={X ?? ''} alt="Cancel" className="notification-card-x" />
105
+ )}
106
+ {isArchived && (
107
+ <img
108
+ src={ArrowArcLeft ?? ''}
109
+ alt="Cancel"
110
+ className="notification-card-x"
111
+ />
112
+ )}
113
+ </button>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ );
119
+ };
120
+
121
+ export default NotificationUserCard;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+
5
+ export * from './NotificationUserCard';
6
+ export * from './types';
@@ -0,0 +1,43 @@
1
+ import { UserNotificationTypeEnum } from '../../constants/notifications';
2
+
3
+ export type NotificationUserCardProps = {
4
+ className?: string;
5
+ thumbImage?: string;
6
+ customThumbComponent?: React.ReactNode;
7
+ issueDate?: string;
8
+ handleButtonClick?: () => void;
9
+ handleCancelClick?: () => void;
10
+ handleCardClick?: () => void;
11
+ acceptStatus: boolean;
12
+ loadingState?: boolean;
13
+ title?: string;
14
+ isArchived?: boolean;
15
+ };
16
+
17
+ export const UserNotificationTypeStyles: {
18
+ [key: UserNotificationTypeEnum | string]: {
19
+ viewButtonStyles: string;
20
+ unclaimedButtonStyles: string;
21
+ claimedButtonStyles: string;
22
+ textStyles: string;
23
+ iconCircleStyles: string;
24
+ typeText?: string;
25
+ };
26
+ } = {
27
+ [UserNotificationTypeEnum.ConnectionRequest]: {
28
+ viewButtonStyles: 'border-indigo-600 text-indigo-400',
29
+ unclaimedButtonStyles: 'text-white bg-indigo-600 border-indigo-600 shadow-bottom',
30
+ claimedButtonStyles: 'text-indigo-600 bg-indigo-50 border-indigo-50',
31
+ textStyles: 'text-indigo-600 capitalize',
32
+ iconCircleStyles: 'bg-indigo-600',
33
+ typeText: 'Invitation',
34
+ },
35
+ [UserNotificationTypeEnum.AcceptedBoost]: {
36
+ viewButtonStyles: 'border-indigo-600 text-indigo-400',
37
+ unclaimedButtonStyles: 'text-white bg-indigo-600 border-indigo-600 shadow-bottom',
38
+ claimedButtonStyles: 'text-indigo-600 bg-indigo-50 border-indigo-50',
39
+ textStyles: 'text-indigo-600 capitalize',
40
+ iconCircleStyles: 'bg-indigo-600',
41
+ typeText: 'Boost',
42
+ },
43
+ };
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { Story, Meta } from '@storybook/react';
3
+
4
+ import QRCodeCard from './QRCodeCard';
5
+
6
+ import { QRCodeCardProps } from './types';
7
+
8
+ export default {
9
+ title: 'QRCodeCard',
10
+ component: QRCodeCard,
11
+ argTypes: {},
12
+ } as Meta<typeof QRCodeCard>;
13
+
14
+ const Template: Story<QRCodeCardProps> = args => <QRCodeCard {...args} />;
15
+
16
+ export const QRCodeCardTest = Template.bind({});
17
+ QRCodeCardTest.args = {
18
+ userHandle: '@janetyoon',
19
+ qrCodeValue: 'https://www.npmjs.com/package/@learncard/react',
20
+ className: '',
21
+ text: (
22
+ <p className="flex items-center justify-center w-full text-xl text-black font-bold tracking-[9px]">
23
+ LEARNCARD
24
+ </p>
25
+ ),
26
+ };
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import { QRCodeSVG } from 'qrcode.react';
3
+
4
+ import { QRCodeCardProps } from './types';
5
+
6
+ export const QRCodeCard: React.FC<QRCodeCardProps> = ({
7
+ userHandle,
8
+ qrCodeValue,
9
+ className,
10
+ text = null,
11
+ }) => {
12
+ let textEl: React.ReactNode | null = null;
13
+ if (typeof text === 'string') {
14
+ textEl = (
15
+ <p className="flex items-center justify-center w-full text-xl text-black font-bold tracking-[9px]">
16
+ {text}
17
+ </p>
18
+ );
19
+ } else {
20
+ textEl = text;
21
+ }
22
+
23
+ return (
24
+ <div
25
+ className={`flex flex-col justify-center items-start pt-9 rounded-[20px] shadow-3xl max-w-[400px] bg-white relative pb-8 overflow-hidden ${className}`}
26
+ >
27
+ {qrCodeValue && (
28
+ <div className="flex justify-center items-center w-full relative px-8 mb-5">
29
+ <div className="max-w-[90%] w-full h-auto relative">
30
+ <QRCodeSVG
31
+ className="h-full w-full"
32
+ value={qrCodeValue}
33
+ data-testid="qrcode-card"
34
+ bgColor="transparent"
35
+ />
36
+ </div>
37
+ </div>
38
+ )}
39
+
40
+ {userHandle && (
41
+ <p
42
+ className="flex items-center justify-center text-center w-full mb-3 font-semibold text-lg text-gray-500"
43
+ data-testid="qrcode-card-user-handle"
44
+ >
45
+ {userHandle}
46
+ </p>
47
+ )}
48
+
49
+ {textEl}
50
+ </div>
51
+ );
52
+ };
53
+
54
+ export default QRCodeCard;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import '@testing-library/jest-dom';
3
+ import { render, screen } from '@testing-library/react';
4
+
5
+ import QRCodeCard from '../QRCodeCard';
6
+
7
+ describe('QRCodeCard', () => {
8
+ test('Checks QRCodeCard renders with props', () => {
9
+ const userHandle = '@janetyoon';
10
+
11
+ render(
12
+ <QRCodeCard
13
+ userHandle={userHandle}
14
+ qrCodeValue="https://www.npmjs.com/package/@learncard/react"
15
+ />
16
+ );
17
+
18
+ const userHandleEl = screen.getByText(userHandle);
19
+ expect(userHandleEl).toBeInTheDocument();
20
+
21
+ const qrcodeCard = screen.queryByTestId('qrcode-card');
22
+ expect(qrcodeCard).toBeInTheDocument();
23
+ });
24
+
25
+ test('Checks QRCodeCard renders without props', () => {
26
+ render(<QRCodeCard />);
27
+
28
+ expect(screen.queryByTestId('qrcode-card-user-handle')).not.toBeInTheDocument();
29
+ expect(screen.queryByTestId('qrcode-card')).not.toBeInTheDocument();
30
+ });
31
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+
5
+ export * from './QRCodeCard';
6
+ export * from './types';
@@ -0,0 +1,22 @@
1
+ export type QRCodeCardProps = {
2
+ /**
3
+ * user handle
4
+ * @type {string}
5
+ */
6
+ userHandle?: string;
7
+ /**
8
+ * qr code value
9
+ * @type {string}
10
+ */
11
+ qrCodeValue: string;
12
+ /**
13
+ * text to display on the card
14
+ * @type {React.ReactNode | null}
15
+ */
16
+ text?: string;
17
+ /**
18
+ * custom className
19
+ * @type {string}
20
+ */
21
+ className?: string;
22
+ };
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { Story, Meta } from '@storybook/react';
3
+
4
+ import RoundedPill from './RoundedPill';
5
+ import { RoundedPillProps } from '../../types';
6
+
7
+ export default {
8
+ title: 'Rounded Pill',
9
+ component: RoundedPill,
10
+ argTypes: {},
11
+ } as Meta<typeof RoundedPill>;
12
+
13
+ const Template: Story<RoundedPillProps> = args => <RoundedPill {...args} />;
14
+
15
+ export const RoundedPillTest = Template.bind({});
16
+ RoundedPillTest.args = {
17
+ statusText: 'Earned',
18
+ type: 'achievement',
19
+ showCheckmark: true,
20
+ onClick: () => console.log('clicked!'),
21
+ };
@@ -0,0 +1,137 @@
1
+ import React from 'react';
2
+ import { TYPE_TO_ICON } from '../../constants/icons';
3
+ import { RoundedPillProps } from '../../types';
4
+
5
+ const TYPE_TO_BG_COLOR_CLASS: any = {
6
+ skill: 'indigo-50',
7
+ achievement: 'spice-50',
8
+ course: 'emerald-50',
9
+ locked: 'grayscale-100',
10
+ };
11
+
12
+ const TYPE_TO_FOREGROUND_COLOR: any = {
13
+ skill: 'indigo-500',
14
+ achievement: 'spice-500',
15
+ course: 'emerald-700',
16
+ locked: 'grayscale-700',
17
+ };
18
+
19
+ const TYPE_TO_CHECKMARK_COLOR: any = {
20
+ skill: '#6366F1',
21
+ achievement: '#FF5820',
22
+ course: '#00BA88',
23
+ locked: '#52597A',
24
+ };
25
+
26
+ type InlineSVGProps = {
27
+ color?: string;
28
+ size?: string | number;
29
+ };
30
+
31
+ export const CheckmarkSvg: React.FC<InlineSVGProps> = ({ color = '#00BA88', size = '20' }) => {
32
+ return (
33
+ <svg
34
+ width={size}
35
+ height={size}
36
+ viewBox="0 0 20 20"
37
+ fill="none"
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ >
40
+ <path
41
+ d="M16.875 5.62537L8.125 14.375L3.75 10.0004"
42
+ stroke={color}
43
+ strokeWidth="3"
44
+ strokeLinecap="round"
45
+ strokeLinejoin="round"
46
+ />
47
+ </svg>
48
+ );
49
+ };
50
+
51
+ const LockedIcon: React.FC<InlineSVGProps> = ({ color = '#52597A', size = '20' }) => {
52
+ return (
53
+ <svg
54
+ width={size}
55
+ height={size}
56
+ viewBox="0 0 20 20"
57
+ fill="none"
58
+ xmlns="http://www.w3.org/2000/svg"
59
+ >
60
+ <path
61
+ d="M16.25 6.875H3.75C3.40482 6.875 3.125 7.15482 3.125 7.5V16.25C3.125 16.5952 3.40482 16.875 3.75 16.875H16.25C16.5952 16.875 16.875 16.5952 16.875 16.25V7.5C16.875 7.15482 16.5952 6.875 16.25 6.875Z"
62
+ stroke={color}
63
+ strokeWidth="2"
64
+ strokeLinecap="round"
65
+ strokeLinejoin="round"
66
+ />
67
+ <path
68
+ d="M7.1875 6.875V4.0625C7.1875 3.31658 7.48382 2.60121 8.01126 2.07376C8.53871 1.54632 9.25408 1.25 10 1.25C10.7459 1.25 11.4613 1.54632 11.9887 2.07376C12.5162 2.60121 12.8125 3.31658 12.8125 4.0625V6.875"
69
+ stroke={color}
70
+ strokeWidth="2"
71
+ strokeLinecap="round"
72
+ strokeLinejoin="round"
73
+ />
74
+ <path
75
+ d="M10 13.125C10.6904 13.125 11.25 12.5654 11.25 11.875C11.25 11.1846 10.6904 10.625 10 10.625C9.30964 10.625 8.75 11.1846 8.75 11.875C8.75 12.5654 9.30964 13.125 10 13.125Z"
76
+ fill={color}
77
+ />
78
+ </svg>
79
+ );
80
+ };
81
+
82
+ export const RoundedPill: React.FC<RoundedPillProps> = ({
83
+ statusText,
84
+ type = 'skill',
85
+ onClick,
86
+ showCheckmark = false,
87
+ }) => {
88
+ const backgroundColor = `bg-${TYPE_TO_BG_COLOR_CLASS[type]}`;
89
+ const iconBgColor = `bg-${TYPE_TO_FOREGROUND_COLOR[type]}`;
90
+ const circleClass = `flex w-full items-center justify-center icon-display h-[40px] w-[40px] rounded-full ${iconBgColor} absolute flex-shrink-0 `;
91
+
92
+ const handleClick = () => {
93
+ onClick?.();
94
+ };
95
+
96
+ const iconSrc = TYPE_TO_ICON[type];
97
+ const textColor = `text-${TYPE_TO_FOREGROUND_COLOR[type]}`;
98
+ const checkColor = TYPE_TO_CHECKMARK_COLOR[type];
99
+ const locked = type === 'locked';
100
+
101
+ const displayText = !locked ? statusText : 'Locked';
102
+
103
+ return (
104
+ <button
105
+ onClick={handleClick}
106
+ className={`flex relative ${backgroundColor} items-center px-[5px] py-[2px] w-[180px] h-[46px] rounded-[40px] rounded-pill-el`}
107
+ >
108
+ {!locked && (
109
+ <div className={circleClass}>
110
+ <img
111
+ className="h-full w-full object-cover max-h-[24px] max-w-[24px] flex-shrink-0 "
112
+ src={iconSrc ?? ''}
113
+ alt="Icon image"
114
+ />
115
+ </div>
116
+ )}
117
+ <span
118
+ className={`font-semibold ${textColor} w-full flex items-center justify-center text-[14px]`}
119
+ >
120
+ {showCheckmark && !locked && (
121
+ <span className="rounded-pill-checkmark mr-[5px]">
122
+ <CheckmarkSvg color={checkColor} />
123
+ </span>
124
+ )}
125
+ {locked && (
126
+ <span className="rounded-pill-checkmark mr-[5px]">
127
+ <LockedIcon />
128
+ </span>
129
+ )}
130
+
131
+ {displayText}
132
+ </span>
133
+ </button>
134
+ );
135
+ };
136
+
137
+ export default RoundedPill;