@learncard/react 2.10.3 → 2.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/base.css +1 -1
- package/dist/base.js +1 -1
- package/dist/cjs/{BoostGenericCard-0f68947f.js → BoostGenericCard-5a07339f.js} +2 -2
- package/dist/cjs/{BoostGenericCard-0f68947f.js.map → BoostGenericCard-5a07339f.js.map} +1 -1
- package/dist/cjs/{CertificateDisplayCard-6c30f6e6.js → CertificateDisplayCard-a7940558.js} +4 -4
- package/dist/cjs/{CertificateDisplayCard-6c30f6e6.js.map → CertificateDisplayCard-a7940558.js.map} +1 -1
- package/dist/cjs/CircleIcon-f0fa68c7.js.map +1 -1
- package/dist/cjs/{LearnCardCreditCardFrontFace-aca1b7bc.js → LearnCardCreditCardFrontFace-75fb4e44.js} +2 -2
- package/dist/cjs/{LearnCardCreditCardFrontFace-aca1b7bc.js.map → LearnCardCreditCardFrontFace-75fb4e44.js.map} +1 -1
- package/dist/cjs/{MeritBadgeDisplayCard-535853f5.js → MeritBadgeDisplayCard-1c614da9.js} +4 -4
- package/dist/cjs/{MeritBadgeDisplayCard-535853f5.js.map → MeritBadgeDisplayCard-1c614da9.js.map} +1 -1
- package/dist/cjs/{MeritBadgeSkillsCount-5cc7d16e.js → MeritBadgeSkillsCount-4dabf982.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-5cc7d16e.js.map → MeritBadgeSkillsCount-4dabf982.js.map} +1 -1
- package/dist/cjs/{QRCodeCard-f0079bd9.js → QRCodeCard-2378411e.js} +2 -2
- package/dist/cjs/{QRCodeCard-f0079bd9.js.map → QRCodeCard-2378411e.js.map} +1 -1
- package/dist/cjs/{SchoolIDCard-e22d0d80.js → SchoolIDCard-10796199.js} +11 -6
- package/dist/cjs/SchoolIDCard-10796199.js.map +1 -0
- package/dist/cjs/{VCCard-deabc204.js → VCCard-bf6dc47f.js} +3 -3
- package/dist/cjs/{VCCard-deabc204.js.map → VCCard-bf6dc47f.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-a15d5252.js → VCDisplayBackFace-864c35d5.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-a15d5252.js.map → VCDisplayBackFace-864c35d5.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-a64fa405.js → VCDisplayCard-15af27c6.js} +3 -3
- package/dist/cjs/{VCDisplayCard-a64fa405.js.map → VCDisplayCard-15af27c6.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-6c87eade.js → VCDisplayCard2-a55da96b.js} +27 -22
- package/dist/cjs/VCDisplayCard2-a55da96b.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-e1cc6be2.js → VCVerificationPill-20ed4d3c.js} +2 -2
- package/dist/cjs/{VCVerificationPill-e1cc6be2.js.map → VCVerificationPill-20ed4d3c.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-5229da1a.js → VerifierStateBadgeAndText-de5bd85f.js} +9 -11
- package/dist/cjs/VerifierStateBadgeAndText-de5bd85f.js.map +1 -0
- package/dist/cjs/{credential.helpers-473e89c5.js → credential.helpers-b4d27c8a.js} +3 -3
- package/dist/cjs/credential.helpers-b4d27c8a.js.map +1 -0
- package/dist/cjs/{index-ec1d26f1.js → index-330dcb9c.js} +1 -1
- package/dist/cjs/index-330dcb9c.js.map +1 -0
- package/dist/cjs/{index-0cac2c5b.js → index-da255c9a.js} +1 -1
- package/dist/cjs/index-da255c9a.js.map +1 -0
- package/dist/cjs/index.js +17 -17
- package/dist/cjs/index14.js +17 -17
- package/dist/cjs/index18.js +2 -2
- package/dist/cjs/index22.js +6 -6
- package/dist/cjs/index28.js +2 -2
- package/dist/cjs/index31.js +1 -1
- package/dist/cjs/index39.js +11 -11
- package/dist/cjs/index4.js +4 -4
- package/dist/cjs/index40.js +5 -5
- package/dist/cjs/index41.js +6 -6
- package/dist/cjs/index42.js +7 -7
- package/dist/cjs/index43.js +2 -2
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index7.js +5 -5
- package/dist/cjs/{types.esm-12bb5eed.js → types.esm-40b77196.js} +3 -2
- package/dist/cjs/types.esm-40b77196.js.map +1 -0
- package/dist/esm/{BoostGenericCard-b332a829.js → BoostGenericCard-997af0f5.js} +2 -2
- package/dist/esm/{BoostGenericCard-b332a829.js.map → BoostGenericCard-997af0f5.js.map} +1 -1
- package/dist/esm/{CertificateDisplayCard-fc148ca0.js → CertificateDisplayCard-d764151e.js} +4 -4
- package/dist/esm/{CertificateDisplayCard-fc148ca0.js.map → CertificateDisplayCard-d764151e.js.map} +1 -1
- package/dist/esm/CircleIcon-abd5ff06.js.map +1 -1
- package/dist/esm/{LearnCardCreditCardFrontFace-b7c917f5.js → LearnCardCreditCardFrontFace-13d29504.js} +2 -2
- package/dist/esm/{LearnCardCreditCardFrontFace-b7c917f5.js.map → LearnCardCreditCardFrontFace-13d29504.js.map} +1 -1
- package/dist/esm/{MeritBadgeDisplayCard-da9de0b8.js → MeritBadgeDisplayCard-907627ed.js} +4 -4
- package/dist/esm/{MeritBadgeDisplayCard-da9de0b8.js.map → MeritBadgeDisplayCard-907627ed.js.map} +1 -1
- package/dist/esm/{MeritBadgeSkillsCount-01e2756e.js → MeritBadgeSkillsCount-9474bd51.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-01e2756e.js.map → MeritBadgeSkillsCount-9474bd51.js.map} +1 -1
- package/dist/esm/{QRCodeCard-8f29c3c7.js → QRCodeCard-3abf9f33.js} +2 -2
- package/dist/esm/{QRCodeCard-8f29c3c7.js.map → QRCodeCard-3abf9f33.js.map} +1 -1
- package/dist/esm/{SchoolIDCard-8b151cd3.js → SchoolIDCard-f82e40bc.js} +11 -6
- package/dist/esm/SchoolIDCard-f82e40bc.js.map +1 -0
- package/dist/esm/{VCCard-94dbe6bf.js → VCCard-2f075558.js} +3 -3
- package/dist/esm/{VCCard-94dbe6bf.js.map → VCCard-2f075558.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-9c5b383f.js → VCDisplayBackFace-e347145c.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-9c5b383f.js.map → VCDisplayBackFace-e347145c.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-bd4d15e1.js → VCDisplayCard-3002776b.js} +3 -3
- package/dist/esm/{VCDisplayCard-bd4d15e1.js.map → VCDisplayCard-3002776b.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-c6a81e42.js → VCDisplayCard2-758f3307.js} +27 -22
- package/dist/esm/VCDisplayCard2-758f3307.js.map +1 -0
- package/dist/esm/{VCVerificationPill-d073557c.js → VCVerificationPill-5a05423b.js} +2 -2
- package/dist/esm/{VCVerificationPill-d073557c.js.map → VCVerificationPill-5a05423b.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-6946e820.js → VerifierStateBadgeAndText-bd1b0131.js} +9 -11
- package/dist/esm/VerifierStateBadgeAndText-bd1b0131.js.map +1 -0
- package/dist/esm/{credential.helpers-ff461699.js → credential.helpers-26e1a359.js} +3 -3
- package/dist/esm/credential.helpers-26e1a359.js.map +1 -0
- package/dist/esm/{index-2ef835bd.js → index-bc6b8b0b.js} +1 -1
- package/dist/{cjs/index-ec1d26f1.js.map → esm/index-bc6b8b0b.js.map} +1 -1
- package/dist/esm/{index-eae3ca64.js → index-cb3a593b.js} +1 -1
- package/dist/esm/index-cb3a593b.js.map +1 -0
- package/dist/esm/index.js +17 -17
- package/dist/esm/index14.js +17 -17
- package/dist/esm/index18.js +2 -2
- package/dist/esm/index22.js +6 -6
- package/dist/esm/index28.js +2 -2
- package/dist/esm/index31.js +1 -1
- package/dist/esm/index39.js +11 -11
- package/dist/esm/index4.js +4 -4
- package/dist/esm/index40.js +5 -5
- package/dist/esm/index41.js +6 -6
- package/dist/esm/index42.js +7 -7
- package/dist/esm/index43.js +2 -2
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index7.js +5 -5
- package/dist/esm/{types.esm-f32fc00a.js → types.esm-13bb929b.js} +3 -2
- package/dist/esm/types.esm-13bb929b.js.map +1 -0
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +102 -87
- package/src/assets/icons/accommodationsIcon.svg +5 -0
- package/src/assets/icons/accomplishmentsIcon.svg +4 -0
- package/src/assets/icons/achievementsIcon.svg +7 -0
- package/src/assets/icons/coursesIcon.svg +5 -0
- package/src/assets/icons/eventsIcon.svg +6 -0
- package/src/assets/icons/experiencesIcon.svg +4 -0
- package/src/assets/icons/goalsIcon.svg +5 -0
- package/src/assets/icons/idIcon.svg +4 -0
- package/src/assets/icons/membershipsIcon.svg +4 -0
- package/src/assets/icons/relationshipsIcon.svg +6 -0
- package/src/assets/icons/skillsIcon.svg +3 -0
- package/src/assets/icons/socialBadgesIcon.svg +7 -0
- package/src/assets/images/Accommodation-Hands.png +0 -0
- package/src/assets/images/ArrowArcLeft.svg +4 -0
- package/src/assets/images/ArrowArcRight.svg +4 -0
- package/src/assets/images/CaretRight.svg +3 -0
- package/src/assets/images/CaretRightFilled.svg +3 -0
- package/src/assets/images/DotsThreeOutline.svg +5 -0
- package/src/assets/images/GreenCheckCircle.svg +4 -0
- package/src/assets/images/RedXCircle.svg +5 -0
- package/src/assets/images/X.svg +4 -0
- package/src/assets/images/YellowWarningCircle.svg +4 -0
- package/src/assets/images/addawardlight.svg +8 -0
- package/src/assets/images/agriculture.png +0 -0
- package/src/assets/images/apple.png +0 -0
- package/src/assets/images/athletics.png +0 -0
- package/src/assets/images/award.svg +3 -0
- package/src/assets/images/backpack.png +0 -0
- package/src/assets/images/badge.png +0 -0
- package/src/assets/images/briefcase.svg +6 -0
- package/src/assets/images/business.png +0 -0
- package/src/assets/images/card-chip.svg +26 -0
- package/src/assets/images/check.svg +17 -0
- package/src/assets/images/coins.svg +3 -0
- package/src/assets/images/contactless-symbol.svg +3 -0
- package/src/assets/images/creative.png +0 -0
- package/src/assets/images/digital.png +0 -0
- package/src/assets/images/durable.png +0 -0
- package/src/assets/images/emptystate-death.png +0 -0
- package/src/assets/images/emptystate-dinocandle.png +0 -0
- package/src/assets/images/emptystate-ghost1.png +0 -0
- package/src/assets/images/eventsGraphic.png +0 -0
- package/src/assets/images/experience-mountain.png +0 -0
- package/src/assets/images/goals-target.png +0 -0
- package/src/assets/images/gradcaplight.svg +3 -0
- package/src/assets/images/graduation.svg +3 -0
- package/src/assets/images/icon.green.fat-arrow.png +0 -0
- package/src/assets/images/id-purple.png +0 -0
- package/src/assets/images/id-sleeve.png +0 -0
- package/src/assets/images/key-icon.svg +4 -0
- package/src/assets/images/lhplaceholder.png +0 -0
- package/src/assets/images/lightbulb.svg +3 -0
- package/src/assets/images/loveyou-icon.svg +5 -0
- package/src/assets/images/master-card-logo.svg +20 -0
- package/src/assets/images/medical.png +0 -0
- package/src/assets/images/membership-graphic.png +0 -0
- package/src/assets/images/membership-key.svg +9 -0
- package/src/assets/images/minigradcapcolored.svg +3 -0
- package/src/assets/images/minijob.svg +5 -0
- package/src/assets/images/minipuzzle.svg +3 -0
- package/src/assets/images/minipuzzlecolored.svg +3 -0
- package/src/assets/images/minitrophy.svg +3 -0
- package/src/assets/images/minitrophycolored.svg +3 -0
- package/src/assets/images/motlow-buckcard-bg.svg +32 -0
- package/src/assets/images/mountains-icon.svg +4 -0
- package/src/assets/images/photoplaceholder.png +0 -0
- package/src/assets/images/puzzle-icon.svg +3 -0
- package/src/assets/images/relationships-cats.png +0 -0
- package/src/assets/images/sample-badge.png +0 -0
- package/src/assets/images/skillgraph.svg +29 -0
- package/src/assets/images/skillplaceholder.png +0 -0
- package/src/assets/images/social-badge-2.png +0 -0
- package/src/assets/images/social-badge.png +0 -0
- package/src/assets/images/social-icon.svg +7 -0
- package/src/assets/images/social.png +0 -0
- package/src/assets/images/stem.png +0 -0
- package/src/assets/images/target-icon.svg +5 -0
- package/src/assets/images/trade.png +0 -0
- package/src/assets/images/trophy.svg +3 -0
- package/src/assets/images/user.svg +4 -0
- package/src/assets/images/users-icon.svg +6 -0
- package/src/assets/images/vc.check.svg +10 -0
- package/src/assets/images/verified-check.png +0 -0
- package/src/assets/images/walletTrophy.png +0 -0
- package/src/assets/images/walletcurrency.webp +0 -0
- package/src/assets/images/walletids.webp +0 -0
- package/src/assets/images/walletjobhistory.webp +0 -0
- package/src/assets/images/walletskills.webp +0 -0
- package/src/assets/styles/base.css +2 -0
- package/src/assets/styles/main.css +475 -0
- package/src/components/AchievementCard/AchievementCard.stories.tsx +31 -0
- package/src/components/AchievementCard/AchievementCard.tsx +88 -0
- package/src/components/AchievementCard/index.ts +5 -0
- package/src/components/BadgeThumbnailImg/BadgeThumbnailImg.test.tsx +47 -0
- package/src/components/BadgeThumbnailImg/BadgeThumbnailImg.tsx +72 -0
- package/src/components/BadgeThumbnailImg/index.ts +5 -0
- package/src/components/BoostGenericCard/AlignmentSkillsCount.tsx +54 -0
- package/src/components/BoostGenericCard/BoostGenericCard.stories.tsx +39 -0
- package/src/components/BoostGenericCard/BoostGenericCard.tsx +177 -0
- package/src/components/BoostGenericCard/index.ts +6 -0
- package/src/components/BoostSmallCard/BoostSmallCard.stories.tsx +57 -0
- package/src/components/BoostSmallCard/BoostSmallCard.tsx +178 -0
- package/src/components/BoostSmallCard/index.ts +5 -0
- package/src/components/Button/Button.stories.tsx +20 -0
- package/src/components/Button/Button.test.tsx +15 -0
- package/src/components/Button/Button.tsx +21 -0
- package/src/components/Button/index.ts +5 -0
- package/src/components/CertificateDisplayCard/AlignmentRow.tsx +26 -0
- package/src/components/CertificateDisplayCard/AlignmentsBox.tsx +70 -0
- package/src/components/CertificateDisplayCard/CertDisplayCardSkillsCount.tsx +66 -0
- package/src/components/CertificateDisplayCard/CertificateBackFace.tsx +130 -0
- package/src/components/CertificateDisplayCard/CertificateCornerIcon.tsx +48 -0
- package/src/components/CertificateDisplayCard/CertificateDisplayCard.stories.tsx +21 -0
- package/src/components/CertificateDisplayCard/CertificateDisplayCard.tsx +180 -0
- package/src/components/CertificateDisplayCard/CertificateFrontFace.tsx +308 -0
- package/src/components/CertificateDisplayCard/CertificateImageDisplay.test.tsx +43 -0
- package/src/components/CertificateDisplayCard/CertificateImageDisplay.tsx +68 -0
- package/src/components/CertificateDisplayCard/CertificateProfileImageDisplay.test.tsx +66 -0
- package/src/components/CertificateDisplayCard/CertificateProfileImageDisplay.tsx +64 -0
- package/src/components/CertificateDisplayCard/CertificateRibbon.tsx +43 -0
- package/src/components/CertificateDisplayCard/InfoBox.tsx +30 -0
- package/src/components/CertificateDisplayCard/MediaAttachmentsBox.tsx +347 -0
- package/src/components/CertificateDisplayCard/TruncateTextBox.tsx +73 -0
- package/src/components/CertificateDisplayCard/VerificationRow.tsx +67 -0
- package/src/components/CertificateDisplayCard/VerificationsBox.tsx +44 -0
- package/src/components/CertificateDisplayCard/VerifierStateBadgeAndText.tsx +100 -0
- package/src/components/CertificateDisplayCard/index.ts +20 -0
- package/src/components/CircleCheckButton/CircleCheckButton.stories.tsx +21 -0
- package/src/components/CircleCheckButton/CircleCheckButton.tsx +28 -0
- package/src/components/CircleCheckButton/index.ts +5 -0
- package/src/components/CircleIcon/CircleIcon.tsx +90 -0
- package/src/components/CircleIcon/__tests__/CircleIcon.test.tsx +38 -0
- package/src/components/CircleIcon/ci new +0 -0
- package/src/components/CircleIcon/index.ts +5 -0
- package/src/components/CourseCard/CourseCard.stories.tsx +23 -0
- package/src/components/CourseCard/CourseCard.tsx +94 -0
- package/src/components/CourseCard/index.ts +5 -0
- package/src/components/CourseVerticalCard/CourseVerticalCard.stories.tsx +31 -0
- package/src/components/CourseVerticalCard/CourseVerticalCard.tsx +118 -0
- package/src/components/CourseVerticalCard/index.ts +5 -0
- package/src/components/FlippyCard/FlippyCard.tsx +34 -0
- package/src/components/FlippyCard/__tests__/FlippyCard.test.tsx +41 -0
- package/src/components/FlippyCard/index.ts +5 -0
- package/src/components/GenericCard/GenericCard.stories.tsx +22 -0
- package/src/components/GenericCard/GenericCard.tsx +72 -0
- package/src/components/GenericCard/index.ts +5 -0
- package/src/components/JobHistoryCard/JobHistoryCard.stories.tsx +26 -0
- package/src/components/JobHistoryCard/JobHistoryCard.tsx +44 -0
- package/src/components/JobHistoryCard/index.ts +5 -0
- package/src/components/JobListCard/JobListCard.stories.tsx +54 -0
- package/src/components/JobListCard/JobListCard.tsx +162 -0
- package/src/components/JobListCard/index.ts +5 -0
- package/src/components/LearnCardCreditCardBackFace/LearnCardCreditCardBackFace.stories.tsx +31 -0
- package/src/components/LearnCardCreditCardBackFace/LearnCardCreditCardBackFace.tsx +104 -0
- package/src/components/LearnCardCreditCardBackFace/__tests__/LearnCardCreditCardBackFace.test.tsx +64 -0
- package/src/components/LearnCardCreditCardBackFace/index.ts +6 -0
- package/src/components/LearnCardCreditCardBackFace/types.ts +45 -0
- package/src/components/LearnCardCreditCardFrontFace/LearnCardCreditCardFrontFace.stories.tsx +28 -0
- package/src/components/LearnCardCreditCardFrontFace/LearnCardCreditCardFrontFace.tsx +102 -0
- package/src/components/LearnCardCreditCardFrontFace/__tests__/LearnCardCreditCardFrontFace.test.tsx +48 -0
- package/src/components/LearnCardCreditCardFrontFace/index.ts +6 -0
- package/src/components/LearnCardCreditCardFrontFace/types.ts +42 -0
- package/src/components/LearnPill/LearnPill.stories.tsx +20 -0
- package/src/components/LearnPill/LearnPill.tsx +35 -0
- package/src/components/LearnPill/index.ts +5 -0
- package/src/components/Lightbox/Lightbox.tsx +133 -0
- package/src/components/Lightbox/index.ts +5 -0
- package/src/components/Loading/CircleSpinner.tsx +52 -0
- package/src/components/Loading/index.ts +5 -0
- package/src/components/MeritBadgeDisplayCard/AlignmentRow.tsx +26 -0
- package/src/components/MeritBadgeDisplayCard/AlignmentsBox.tsx +70 -0
- package/src/components/MeritBadgeDisplayCard/InfoBox.tsx +30 -0
- package/src/components/MeritBadgeDisplayCard/MediaAttachmentsBox.tsx +347 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeBackFace.tsx +130 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeCornerIcon.tsx +46 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeDisplayCard.tsx +177 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeFrontFace.tsx +292 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeImageDisplay.tsx +22 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeProfileImageDisplay.test.tsx +70 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeProfileImageDisplay.tsx +66 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeRibbon.tsx +185 -0
- package/src/components/MeritBadgeDisplayCard/MeritBadgeSkillsCount.tsx +47 -0
- package/src/components/MeritBadgeDisplayCard/TruncateTextBox.tsx +73 -0
- package/src/components/MeritBadgeDisplayCard/VerificationRow.tsx +67 -0
- package/src/components/MeritBadgeDisplayCard/VerificationsBox.tsx +44 -0
- package/src/components/MeritBadgeDisplayCard/VerifierStateBadgeAndText.tsx +57 -0
- package/src/components/MeritBadgeDisplayCard/index.ts +20 -0
- package/src/components/MiniVCThumbnail/ MiniVCThumbnail.css +18 -0
- package/src/components/MiniVCThumbnail/ MiniVCThumbnail.stories.tsx +24 -0
- package/src/components/MiniVCThumbnail/MiniVCThumbnail.tsx +83 -0
- package/src/components/MiniVCThumbnail/__tests__/MiniVCThumbnail.test.tsx +59 -0
- package/src/components/MiniVCThumbnail/index.ts +6 -0
- package/src/components/MiniVCThumbnail/types.ts +32 -0
- package/src/components/Notification/Notification.stories.tsx +25 -0
- package/src/components/Notification/Notification.tsx +115 -0
- package/src/components/Notification/__tests__/Notification.test.tsx +111 -0
- package/src/components/Notification/index.ts +6 -0
- package/src/components/Notification/types.ts +97 -0
- package/src/components/NotificationBoostCard/NotificationBoostCard.stories.tsx +54 -0
- package/src/components/NotificationBoostCard/NotificationBoostCard.tsx +153 -0
- package/src/components/NotificationBoostCard/index.ts +6 -0
- package/src/components/NotificationBoostCard/types.ts +25 -0
- package/src/components/NotificationUserAcceptedBoostCard/NotificationUserAcceptedBoostCard.stories.tsx +28 -0
- package/src/components/NotificationUserAcceptedBoostCard/NotificationUserAcceptedBoostCard.tsx +96 -0
- package/src/components/NotificationUserAcceptedBoostCard/index.ts +6 -0
- package/src/components/NotificationUserAcceptedBoostCard/types.ts +13 -0
- package/src/components/NotificationUserCard/NotificationUserCard.stories.tsx +26 -0
- package/src/components/NotificationUserCard/NotificationUserCard.tsx +121 -0
- package/src/components/NotificationUserCard/index.ts +6 -0
- package/src/components/NotificationUserCard/types.ts +43 -0
- package/src/components/QRCodeCard/QRCodeCard.stories.tsx +26 -0
- package/src/components/QRCodeCard/QRCodeCard.tsx +54 -0
- package/src/components/QRCodeCard/__tests__/QRCodeCard.test.tsx +31 -0
- package/src/components/QRCodeCard/index.ts +6 -0
- package/src/components/QRCodeCard/types.ts +22 -0
- package/src/components/RoundedPill/RoundedPill.stories.tsx +21 -0
- package/src/components/RoundedPill/RoundedPill.tsx +137 -0
- package/src/components/RoundedPill/index.ts +5 -0
- package/src/components/RoundedSquare/RoundedSquare.stories.tsx +28 -0
- package/src/components/RoundedSquare/RoundedSquare.tsx +69 -0
- package/src/components/RoundedSquare/__tests__/RoundedSquare.test.tsx +35 -0
- package/src/components/RoundedSquare/constants.ts +63 -0
- package/src/components/RoundedSquare/index.ts +6 -0
- package/src/components/RoundedSquare/roudnedquarenew +0 -0
- package/src/components/SchoolIdCard/SchoolIDCard.stories.tsx +30 -0
- package/src/components/SchoolIdCard/SchoolIDCard.tsx +81 -0
- package/src/components/SchoolIdCard/index.ts +6 -0
- package/src/components/SchoolIdCard/types.ts +42 -0
- package/src/components/SkillTabCard/SkillTabCard.stories.tsx +25 -0
- package/src/components/SkillTabCard/SkillTabCard.tsx +44 -0
- package/src/components/SkillTabCard/index.ts +5 -0
- package/src/components/SkillVerticalCard/SkillVerticalCard.stories.tsx +20 -0
- package/src/components/SkillVerticalCard/SkillVerticalCard.tsx +32 -0
- package/src/components/SkillVerticalCard/index.ts +5 -0
- package/src/components/SkillsCard/SkillsCard.stories.tsx +24 -0
- package/src/components/SkillsCard/SkillsCard.tsx +68 -0
- package/src/components/SkillsCard/index.ts +5 -0
- package/src/components/SkillsStatsCard/SkillsStatsCard.stories.tsx +63 -0
- package/src/components/SkillsStatsCard/SkillsStatsCard.tsx +92 -0
- package/src/components/SkillsStatsCard/index.ts +5 -0
- package/src/components/SmallAchievementCard/SmallAchievementCard.stories.tsx +23 -0
- package/src/components/SmallAchievementCard/SmallAchievementCard.tsx +50 -0
- package/src/components/SmallAchievementCard/index.ts +5 -0
- package/src/components/UserProfilePicture/UserProfilePicture.test.tsx +44 -0
- package/src/components/UserProfilePicture/UserProfilePicture.tsx +119 -0
- package/src/components/UserProfilePicture/index.ts +5 -0
- package/src/components/VCCard/VCCard.stories.tsx +64 -0
- package/src/components/VCCard/VCCard.tsx +84 -0
- package/src/components/VCCard/index.ts +5 -0
- package/src/components/VCDisplayBackFace/VCDisplayBackFace.tsx +112 -0
- package/src/components/VCDisplayBackFace/index.ts +5 -0
- package/src/components/VCDisplayCard/VCDisplayCard.stories.tsx +167 -0
- package/src/components/VCDisplayCard/VCDisplayCard.tsx +98 -0
- package/src/components/VCDisplayCard/index.ts +5 -0
- package/src/components/VCDisplayCard2/FitText.tsx +85 -0
- package/src/components/VCDisplayCard2/InfoBox.tsx +30 -0
- package/src/components/VCDisplayCard2/IssueHistoryBox.tsx +50 -0
- package/src/components/VCDisplayCard2/MediaAttachmentsBox.tsx +306 -0
- package/src/components/VCDisplayCard2/RibbonEnd.tsx +67 -0
- package/src/components/VCDisplayCard2/SelectedSkills.tsx +70 -0
- package/src/components/VCDisplayCard2/SkillsBox.tsx +53 -0
- package/src/components/VCDisplayCard2/Subskill.tsx +50 -0
- package/src/components/VCDisplayCard2/TopLevelSkill.tsx +63 -0
- package/src/components/VCDisplayCard2/TruncateTextBox.tsx +89 -0
- package/src/components/VCDisplayCard2/VC2BackFace.tsx +185 -0
- package/src/components/VCDisplayCard2/VC2FrontFaceInfo.tsx +279 -0
- package/src/components/VCDisplayCard2/VCDisplayCard2.stories.tsx +191 -0
- package/src/components/VCDisplayCard2/VCDisplayCard2.tsx +526 -0
- package/src/components/VCDisplayCard2/VCDisplayCard2AvatarFallbacks.stories.tsx +312 -0
- package/src/components/VCDisplayCard2/VCDisplayCardCategoryType.tsx +19 -0
- package/src/components/VCDisplayCard2/VCDisplayCardSkillsCount.tsx +46 -0
- package/src/components/VCDisplayCard2/VCIDDIsplayCard.tsx +159 -0
- package/src/components/VCDisplayCard2/VCIDDisplayFrontFace.tsx +213 -0
- package/src/components/VCDisplayCard2/VerificationRow.tsx +69 -0
- package/src/components/VCDisplayCard2/VerificationsBox.tsx +44 -0
- package/src/components/VCDisplayCard2/__tests__/VC2FrontFaceInfo.test.tsx +134 -0
- package/src/components/VCDisplayCard2/index.ts +23 -0
- package/src/components/VCDisplayFrontFace/VCDisplayFrontFace.tsx +143 -0
- package/src/components/VCDisplayFrontFace/index.ts +5 -0
- package/src/components/VCThumbnail/VCThumbnail.stories.tsx +32 -0
- package/src/components/VCThumbnail/VCThumbnail.tsx +182 -0
- package/src/components/VCThumbnail/__tests__/VCThumbnail.test.tsx +114 -0
- package/src/components/VCThumbnail/index.ts +6 -0
- package/src/components/VCThumbnail/types.ts +46 -0
- package/src/components/VCVerificationCheck/VCVerificationCheck.tsx +89 -0
- package/src/components/VCVerificationCheck/index.ts +5 -0
- package/src/components/VCVerificationPill/VCVerificationPill.tsx +85 -0
- package/src/components/VCVerificationPill/index.ts +5 -0
- package/src/components/index.ts +48 -0
- package/src/components/svgs/AccommodationsIcon.tsx +38 -0
- package/src/components/svgs/AccomplishmentsIcon.tsx +34 -0
- package/src/components/svgs/AchievementWithTitle.tsx +137 -0
- package/src/components/svgs/AcuteCheckmark.tsx +25 -0
- package/src/components/svgs/AwardDisplayIcon.tsx +37 -0
- package/src/components/svgs/AwardRibbon.tsx +29 -0
- package/src/components/svgs/BadgeDisplayIcon.tsx +31 -0
- package/src/components/svgs/Briefcase.tsx +48 -0
- package/src/components/svgs/Camera.tsx +25 -0
- package/src/components/svgs/CertificateDisplayIcon.tsx +56 -0
- package/src/components/svgs/Checkmark.tsx +59 -0
- package/src/components/svgs/CircleWithText.tsx +36 -0
- package/src/components/svgs/Coins.tsx +14 -0
- package/src/components/svgs/CourseDisplayIcon.tsx +43 -0
- package/src/components/svgs/DownRightArrow.tsx +29 -0
- package/src/components/svgs/ExclamationPoint.tsx +25 -0
- package/src/components/svgs/ExperienceIcon.tsx +34 -0
- package/src/components/svgs/FatArrow.tsx +44 -0
- package/src/components/svgs/GenericArrow.tsx +29 -0
- package/src/components/svgs/GenericDocumentIcon.tsx +26 -0
- package/src/components/svgs/Graduation.tsx +24 -0
- package/src/components/svgs/IDDisplayIcon.tsx +63 -0
- package/src/components/svgs/IDIcon.tsx +59 -0
- package/src/components/svgs/IDSleeve.tsx +21 -0
- package/src/components/svgs/InfoIcon.tsx +26 -0
- package/src/components/svgs/IssuerSeal.tsx +26 -0
- package/src/components/svgs/KeyIcon.tsx +31 -0
- package/src/components/svgs/LeftArrow.tsx +27 -0
- package/src/components/svgs/Lightbulb.tsx +14 -0
- package/src/components/svgs/Line.tsx +22 -0
- package/src/components/svgs/LinkIcon.tsx +35 -0
- package/src/components/svgs/PdfIcon.tsx +38 -0
- package/src/components/svgs/PersonBadge.tsx +55 -0
- package/src/components/svgs/PuzzlePiece.tsx +89 -0
- package/src/components/svgs/QRCodeIcon.tsx +21 -0
- package/src/components/svgs/RedFlag.tsx +41 -0
- package/src/components/svgs/RoundedCorner.tsx +28 -0
- package/src/components/svgs/RoundedX.tsx +35 -0
- package/src/components/svgs/ScoutsLogo.tsx +41 -0
- package/src/components/svgs/ScoutsPledge.tsx +33 -0
- package/src/components/svgs/ShieldChevron.tsx +24 -0
- package/src/components/svgs/Smiley.tsx +43 -0
- package/src/components/svgs/SocialBadgesIcon.tsx +43 -0
- package/src/components/svgs/ThreeDotVertical.tsx +41 -0
- package/src/components/svgs/Trophy.tsx +25 -0
- package/src/components/svgs/UnknownVerifierBadge.tsx +25 -0
- package/src/components/svgs/User.tsx +34 -0
- package/src/components/svgs/VerifiedBadge.tsx +37 -0
- package/src/components/svgs/VideoIcon.tsx +28 -0
- package/src/components/svgs/X.tsx +35 -0
- package/src/components/svgs/index.ts +54 -0
- package/src/constants/icons.ts +87 -0
- package/src/constants/index.ts +109 -0
- package/src/constants/notifications.ts +14 -0
- package/src/constants/skills.ts +2202 -0
- package/src/declaration.d.ts +21 -0
- package/src/helpers/__tests__/credentialFormat.helpers.test.ts +100 -0
- package/src/helpers/color.helpers.ts +35 -0
- package/src/helpers/credential.helpers.test.ts +108 -0
- package/src/helpers/credential.helpers.tsx +249 -0
- package/src/helpers/credentialFormat.helpers.ts +68 -0
- package/src/helpers/did-display.helpers.ts +230 -0
- package/src/helpers/display.helpers.ts +53 -0
- package/src/helpers/string.helpers.ts +7 -0
- package/src/helpers/test.helpers.ts +680 -0
- package/src/helpers/url.helpers.ts +3 -0
- package/src/helpers/useHorizontalPages.ts +130 -0
- package/src/helpers/useOnMomentumScrollEnd.ts +28 -0
- package/src/helpers/useScrollBorders.ts +59 -0
- package/src/helpers/video.helpers.ts +125 -0
- package/src/hooks/useCredentialFormat.tsx +23 -0
- package/src/hooks/useParsedSdJwtVc.tsx +64 -0
- package/src/index.ts +16 -0
- package/src/types/index.ts +390 -0
- package/LICENSE +0 -21
- package/dist/cjs/SchoolIDCard-e22d0d80.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-6c87eade.js.map +0 -1
- package/dist/cjs/VerifierStateBadgeAndText-5229da1a.js.map +0 -1
- package/dist/cjs/credential.helpers-473e89c5.js.map +0 -1
- package/dist/cjs/index-0cac2c5b.js.map +0 -1
- package/dist/cjs/types.esm-12bb5eed.js.map +0 -1
- package/dist/esm/SchoolIDCard-8b151cd3.js.map +0 -1
- package/dist/esm/VCDisplayCard2-c6a81e42.js.map +0 -1
- package/dist/esm/VerifierStateBadgeAndText-6946e820.js.map +0 -1
- package/dist/esm/credential.helpers-ff461699.js.map +0 -1
- package/dist/esm/index-2ef835bd.js.map +0 -1
- package/dist/esm/index-eae3ca64.js.map +0 -1
- package/dist/esm/types.esm-f32fc00a.js.map +0 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import FatArrow from '../../assets/images/icon.green.fat-arrow.png';
|
|
4
|
+
import VerifiedCheck from '../../assets/images/verified-check.png';
|
|
5
|
+
|
|
6
|
+
import { VCThumbnailProps } from './types';
|
|
7
|
+
|
|
8
|
+
export const VCThumbnail: React.FC<VCThumbnailProps> = ({
|
|
9
|
+
title,
|
|
10
|
+
createdAt,
|
|
11
|
+
issuerImage,
|
|
12
|
+
userImage,
|
|
13
|
+
userImageComponent,
|
|
14
|
+
badgeImage,
|
|
15
|
+
className = '',
|
|
16
|
+
listView = false,
|
|
17
|
+
onClick = () => {},
|
|
18
|
+
}) => {
|
|
19
|
+
let imageElement: React.ReactNode | null = null;
|
|
20
|
+
let userImageEl: React.ReactNode | null = null;
|
|
21
|
+
|
|
22
|
+
if (issuerImage) {
|
|
23
|
+
imageElement = (
|
|
24
|
+
<img className="h-full w-full object-cover" src={issuerImage} alt="issuer image" />
|
|
25
|
+
);
|
|
26
|
+
} else if (badgeImage) {
|
|
27
|
+
imageElement = (
|
|
28
|
+
<img className="h-full w-full object-cover" src={badgeImage} alt="badge image" />
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (userImage) {
|
|
33
|
+
userImageEl = (
|
|
34
|
+
<div className="inline-block relative overflow-hidden rounded-full shadow-3xl h-0 bg-white w-1/4 pb-25pct">
|
|
35
|
+
<img
|
|
36
|
+
className="w-full h-full absolute rounded-full object-cover border-solid border-4 border-white"
|
|
37
|
+
src={userImage}
|
|
38
|
+
alt="user image"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
} else if (!userImage && userImageComponent) {
|
|
43
|
+
userImageEl = userImageComponent;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const titleClass =
|
|
47
|
+
issuerImage || badgeImage
|
|
48
|
+
? 'items-start justify-center w-3/4 text-left'
|
|
49
|
+
: 'item-center justify-center w-full text-center';
|
|
50
|
+
|
|
51
|
+
if (listView) {
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
onClick={onClick}
|
|
55
|
+
className={`flex flex-col items-center justify-between relative py-3 px-3 rounded-3xl shadow-3xl bg-emerald-700 max-w-sm vc-thumbnail-listview-container ${className}`}
|
|
56
|
+
data-testid="vc-thumbnail-list-view"
|
|
57
|
+
>
|
|
58
|
+
<div className="flex flex-row items-center justify-between mb-3 z-10">
|
|
59
|
+
{imageElement && (
|
|
60
|
+
<div
|
|
61
|
+
className="flex flex-row justify-center items-center w-1/4 text-center"
|
|
62
|
+
data-testid="vc-thumbnail-image"
|
|
63
|
+
>
|
|
64
|
+
<div className="h-16 w-16 border-solid border-2 border-black bg-white">
|
|
65
|
+
{imageElement}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
69
|
+
|
|
70
|
+
<div className={`flex flex-col ${titleClass}`}>
|
|
71
|
+
<h2
|
|
72
|
+
className="ml-1 sm:ml-0 md:ml-0 lg:ml-0 text-base tracking-wide leading-snug text-left line-clamp-2"
|
|
73
|
+
data-testid="vc-thumbnail-title"
|
|
74
|
+
>
|
|
75
|
+
{title ?? ''}
|
|
76
|
+
</h2>
|
|
77
|
+
<p
|
|
78
|
+
className="ml-1 sm:ml-0 md:ml-0 lg:ml-0 text-sm font-light text-center line-clamp-1"
|
|
79
|
+
data-testid="vc-thumbnail-createdAt"
|
|
80
|
+
>
|
|
81
|
+
{createdAt ?? ''}
|
|
82
|
+
</p>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div className="flex items-center justify-center w-full mt-3 vc-thumbnail-footer">
|
|
86
|
+
<h3 className="text-white text-sm text-right font-normal tracking-wide leading-tight flex-1">
|
|
87
|
+
Verified
|
|
88
|
+
</h3>
|
|
89
|
+
<div className="flex items-center justify-center my-0 mx-1 h-10 w-10 rounded-full bg-white overflow-hidden">
|
|
90
|
+
<div className="flex items-center justify-center h-5/6 w-10/12 bg-white rounded-full border-solid border-4 border-emerald-700 overflow-hidden">
|
|
91
|
+
<img
|
|
92
|
+
className="h-full w-full object-cover"
|
|
93
|
+
src={VerifiedCheck ?? ''}
|
|
94
|
+
alt="credential icon"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<h3 className="text-white text-sm text-left font-normal tracking-wide leading-tight flex-1">
|
|
99
|
+
Credential
|
|
100
|
+
</h3>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const vcThumbNailAltContainerClass = !badgeImage ? 'vc-thumbnail-alt-container' : '';
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<div
|
|
110
|
+
onClick={onClick}
|
|
111
|
+
className={`relative py-3 xxsm:py-1 rounded-3xl shadow-3xl bg-emerald-700 vc-thumbnail-container ${vcThumbNailAltContainerClass} ${className}`}
|
|
112
|
+
data-testid="vc-thumbnail"
|
|
113
|
+
>
|
|
114
|
+
<div className="h-full w-full absolute">
|
|
115
|
+
<div className="flex flex-col items-center justify-center z-10 text-center w-full">
|
|
116
|
+
<div className="flex flex-row items-center justify-center w-full px-2">
|
|
117
|
+
<div className="flex flex-row items-center justify-center w-full">
|
|
118
|
+
<h2
|
|
119
|
+
className="text-base tracking-wide leading-snug text-center line-clamp-2"
|
|
120
|
+
data-testid="vc-thumbnail-title"
|
|
121
|
+
>
|
|
122
|
+
{title ?? ''}
|
|
123
|
+
</h2>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div className="w-full mt-2">
|
|
127
|
+
<p
|
|
128
|
+
className="text-sm font-light text-center line-clamp-1"
|
|
129
|
+
data-testid="vc-thumbnail-createdAt"
|
|
130
|
+
>
|
|
131
|
+
{createdAt ?? ''}
|
|
132
|
+
</p>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div className="flex flex-row items-center justify-center mt-3 xxsm:mt-1 w-full">
|
|
136
|
+
<div className="inline-block relative overflow-hidden rounded-full shadow-3xl h-0 bg-white w-1/4 pb-25pct">
|
|
137
|
+
<img
|
|
138
|
+
className="h-5/6 w-10/12 left-1 top-1 absolute rounded-full object-cover"
|
|
139
|
+
src={issuerImage}
|
|
140
|
+
alt="issuer image"
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<img
|
|
145
|
+
className="h-8 w-8 my-0 mx-4"
|
|
146
|
+
src={FatArrow ?? ''}
|
|
147
|
+
alt="fat arrow icon"
|
|
148
|
+
/>
|
|
149
|
+
{userImageEl}
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
{badgeImage && (
|
|
154
|
+
<div className="flex items-center justify-center w-full mt-4 xxxsm:mt-0">
|
|
155
|
+
<div
|
|
156
|
+
className="border-solid border-2 border-black bg-white relative w-1/4 h-0 overflow-hidden pt-25pct pb-0 px-0"
|
|
157
|
+
data-testid="vc-thumbnail-badge"
|
|
158
|
+
>
|
|
159
|
+
<img
|
|
160
|
+
className="h-full w-full object-cover absolute top-0 left-0"
|
|
161
|
+
src={badgeImage}
|
|
162
|
+
alt="badge image"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
)}
|
|
167
|
+
|
|
168
|
+
<div className="flex items-center justify-center absolute right-2 bottom-5 xxsm:bottom-3 xxxsm:bottom-3 h-8 w-8 rounded-full bg-white overflow-hidden">
|
|
169
|
+
<div className="flex items-center justify-center h-5/6 w-10/12 bg-white rounded-full border-solid border-2 border-emerald-700 overflow-hidden">
|
|
170
|
+
<img
|
|
171
|
+
className="h-full w-full object-cover"
|
|
172
|
+
src={VerifiedCheck ?? ''}
|
|
173
|
+
alt="credential icon"
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export default VCThumbnail;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
|
+
import { render, fireEvent } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
import VCThumbnail from '../VCThumbnail';
|
|
7
|
+
|
|
8
|
+
describe('Running Tests for VCThumbnail Full View', () => {
|
|
9
|
+
test('Checks VCThumbnail renders with props', () => {
|
|
10
|
+
const handleOnClick = vi.fn();
|
|
11
|
+
|
|
12
|
+
const { getByTestId, getByAltText } = render(
|
|
13
|
+
<VCThumbnail
|
|
14
|
+
title="This is a title!"
|
|
15
|
+
createdAt="05/01/2022"
|
|
16
|
+
issuerImage="https://issuerimage.png"
|
|
17
|
+
userImage="https://userimage.png"
|
|
18
|
+
badgeImage="https://badgeimage.png"
|
|
19
|
+
listView={false}
|
|
20
|
+
onClick={handleOnClick}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
fireEvent.click(getByTestId('vc-thumbnail'));
|
|
25
|
+
expect(handleOnClick).toHaveBeenCalledTimes(1);
|
|
26
|
+
|
|
27
|
+
const title = getByTestId('vc-thumbnail-title');
|
|
28
|
+
expect(title).toHaveTextContent('This is a title!');
|
|
29
|
+
|
|
30
|
+
const createdAt = getByTestId('vc-thumbnail-createdAt');
|
|
31
|
+
expect(createdAt).toHaveTextContent('05/01/2022');
|
|
32
|
+
|
|
33
|
+
const issuerImage = getByAltText('issuer image');
|
|
34
|
+
expect(issuerImage).toHaveAttribute('src', 'https://issuerimage.png');
|
|
35
|
+
|
|
36
|
+
const userImage = getByAltText('user image');
|
|
37
|
+
expect(userImage).toHaveAttribute('src', 'https://userimage.png');
|
|
38
|
+
|
|
39
|
+
const badgeImage = getByAltText('badge image');
|
|
40
|
+
expect(badgeImage).toHaveAttribute('src', 'https://badgeimage.png');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test('Checks VCThumbnail renders without props', () => {
|
|
44
|
+
const handleOnClick = vi.fn();
|
|
45
|
+
|
|
46
|
+
const { getByTestId, getByAltText, queryByTestId, queryByAltText } = render(
|
|
47
|
+
<VCThumbnail />
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
fireEvent.click(getByTestId('vc-thumbnail'));
|
|
51
|
+
expect(handleOnClick).not.toHaveBeenCalledTimes(1);
|
|
52
|
+
|
|
53
|
+
const title = getByTestId('vc-thumbnail-title');
|
|
54
|
+
expect(title).toBeEmptyDOMElement();
|
|
55
|
+
|
|
56
|
+
const createdAt = getByTestId('vc-thumbnail-createdAt');
|
|
57
|
+
expect(createdAt).toBeEmptyDOMElement();
|
|
58
|
+
|
|
59
|
+
const issuerImage = getByAltText('issuer image');
|
|
60
|
+
expect(issuerImage).not.toHaveAttribute('src');
|
|
61
|
+
|
|
62
|
+
const userImage = queryByAltText('user image');
|
|
63
|
+
expect(userImage).not.toBeInTheDocument();
|
|
64
|
+
|
|
65
|
+
const imageElement = queryByTestId('vc-thumbnail-badge');
|
|
66
|
+
expect(imageElement).not.toBeInTheDocument();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
describe('Running Tests for VCThumbnail List View', () => {
|
|
71
|
+
test('Checks VCThumbnail List View renders with props', () => {
|
|
72
|
+
const handleOnClick = vi.fn();
|
|
73
|
+
|
|
74
|
+
const { getByTestId, getByAltText } = render(
|
|
75
|
+
<VCThumbnail
|
|
76
|
+
title="This is a title!"
|
|
77
|
+
createdAt="05/01/2022"
|
|
78
|
+
issuerImage="https://issuerimage.png"
|
|
79
|
+
listView
|
|
80
|
+
onClick={handleOnClick}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
fireEvent.click(getByTestId('vc-thumbnail-list-view'));
|
|
85
|
+
expect(handleOnClick).toHaveBeenCalledTimes(1);
|
|
86
|
+
|
|
87
|
+
const title = getByTestId('vc-thumbnail-title');
|
|
88
|
+
expect(title).toHaveTextContent('This is a title!');
|
|
89
|
+
|
|
90
|
+
const createdAt = getByTestId('vc-thumbnail-createdAt');
|
|
91
|
+
expect(createdAt).toHaveTextContent('05/01/2022');
|
|
92
|
+
|
|
93
|
+
const issuerImage = getByAltText('issuer image');
|
|
94
|
+
expect(issuerImage).toHaveAttribute('src', 'https://issuerimage.png');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('Checks VCThumbnail List View renders without props', () => {
|
|
98
|
+
const handleOnClick = vi.fn();
|
|
99
|
+
|
|
100
|
+
const { getByTestId, queryByTestId } = render(<VCThumbnail listView />);
|
|
101
|
+
|
|
102
|
+
fireEvent.click(getByTestId('vc-thumbnail-list-view'));
|
|
103
|
+
expect(handleOnClick).not.toHaveBeenCalledTimes(1);
|
|
104
|
+
|
|
105
|
+
const title = getByTestId('vc-thumbnail-title');
|
|
106
|
+
expect(title).toBeEmptyDOMElement();
|
|
107
|
+
|
|
108
|
+
const createdAt = getByTestId('vc-thumbnail-createdAt');
|
|
109
|
+
expect(createdAt).toBeEmptyDOMElement();
|
|
110
|
+
|
|
111
|
+
const imageElement = queryByTestId('vc-thumbnail-image');
|
|
112
|
+
expect(imageElement).not.toBeInTheDocument();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export type VCThumbnailProps = {
|
|
4
|
+
/**
|
|
5
|
+
* thumbnail title
|
|
6
|
+
* @type {string}
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* issue date
|
|
11
|
+
* @type {string}
|
|
12
|
+
*/
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* issuer image
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
issuerImage?: string;
|
|
19
|
+
/**
|
|
20
|
+
* user image
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
userImage?: string;
|
|
24
|
+
userImageComponent?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* badge image
|
|
27
|
+
* @type {string}
|
|
28
|
+
*/
|
|
29
|
+
badgeImage?: string;
|
|
30
|
+
/**
|
|
31
|
+
* custom className
|
|
32
|
+
* @type {string}
|
|
33
|
+
*/
|
|
34
|
+
className?: string;
|
|
35
|
+
/**
|
|
36
|
+
* condensed or full view of the thumbnail
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @param {boolean=} false - shows full view by default.
|
|
39
|
+
*/
|
|
40
|
+
listView?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {function}
|
|
44
|
+
*/
|
|
45
|
+
onClick?: () => void;
|
|
46
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import VerificationCheckDisplay from '../../assets/images/vc.check.svg';
|
|
3
|
+
import CircleSpinner, { CircleLoadingState } from '../Loading/CircleSpinner';
|
|
4
|
+
|
|
5
|
+
export type VCVerificationCheckProps = {
|
|
6
|
+
size?: string | number;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const VCVerificationCheck: React.FC<VCVerificationCheckProps> = ({ size = '44px' }) => {
|
|
11
|
+
const imageSize = {
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
};
|
|
15
|
+
return (
|
|
16
|
+
<div className="vc-verification-wrapper" style={{ position: 'relative' }}>
|
|
17
|
+
<div className="flex items-center justify-center bg-white rounded-full overflow-hidden">
|
|
18
|
+
<img
|
|
19
|
+
className="h-full w-full object-contain p-1"
|
|
20
|
+
src={VerificationCheckDisplay ?? ''}
|
|
21
|
+
style={imageSize}
|
|
22
|
+
alt="Verification Icon"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default VCVerificationCheck;
|
|
30
|
+
|
|
31
|
+
export const VCVerificationCheckWithSpinner: React.FC<
|
|
32
|
+
VCVerificationCheckProps & { spinnerSize?: string; withBorder?: boolean }
|
|
33
|
+
> = ({ size = '44px', spinnerSize = '60px', loading = true, withBorder = false }) => {
|
|
34
|
+
const loadingState = loading ? CircleLoadingState.spin : CircleLoadingState.stop;
|
|
35
|
+
|
|
36
|
+
const spinnerStyle: React.CSSProperties = {
|
|
37
|
+
position: 'absolute',
|
|
38
|
+
top: 0,
|
|
39
|
+
left: 0,
|
|
40
|
+
height: spinnerSize,
|
|
41
|
+
width: spinnerSize,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const spinnerSizeNumber = parseInt(spinnerSize.replace('px', ''));
|
|
45
|
+
const offset = spinnerSizeNumber > 50 ? 3 : 2;
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
style={{ width: spinnerSize, height: spinnerSize, position: 'relative' }}
|
|
50
|
+
className={`flex items-center justify-center bg-white rounded-full overflow-hidden select-none ${withBorder ? ' ml-3 mr-3' : ''
|
|
51
|
+
}`}
|
|
52
|
+
>
|
|
53
|
+
<VCVerificationCheck size={size} loading={loading} />
|
|
54
|
+
<div className="vc-verification-spinner-overlay" style={spinnerStyle}>
|
|
55
|
+
<CircleSpinner
|
|
56
|
+
loadingState={loadingState}
|
|
57
|
+
size={spinnerSizeNumber}
|
|
58
|
+
marginOffset={offset}
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const VCVerificationCheckWithText: React.FC<
|
|
66
|
+
VCVerificationCheckProps & { spinnerSize?: string }
|
|
67
|
+
> = ({ size = '44px', spinnerSize = '60px', loading = true }) => {
|
|
68
|
+
const [defaultLoading, setDefaultLoading] = useState(true);
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
let timer1 = setTimeout(() => setDefaultLoading(false), 3 * 1000);
|
|
72
|
+
return () => {
|
|
73
|
+
clearTimeout(timer1);
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<div className="flex justify-center items-center translate-x-[10px] w-full vc-verification-full-wrapper">
|
|
79
|
+
<span className="text-white font-bold tracking-wider">Verified</span>
|
|
80
|
+
<VCVerificationCheckWithSpinner
|
|
81
|
+
size={size}
|
|
82
|
+
spinnerSize={spinnerSize}
|
|
83
|
+
loading={loading || defaultLoading}
|
|
84
|
+
withBorder
|
|
85
|
+
/>
|
|
86
|
+
<span className="text-white font-bold tracking-wider">Credential</span>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VerificationStatus, VerificationStatusEnum } from '@learncard/types';
|
|
3
|
+
|
|
4
|
+
import VerificationFailedIcon from '../../assets/images/RedXCircle.svg';
|
|
5
|
+
import VerificationPassedIcon from '../../assets/images/GreenCheckCircle.svg';
|
|
6
|
+
import VerificationWarningIcon from '../../assets/images/YellowWarningCircle.svg';
|
|
7
|
+
|
|
8
|
+
type VerificationDisplayItemProps = {
|
|
9
|
+
status?: VerificationStatus;
|
|
10
|
+
message?: string;
|
|
11
|
+
details?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type VerifiableStateIndicatorProps = {
|
|
15
|
+
status: VerificationStatus;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const StatusToBgColor = {
|
|
19
|
+
[VerificationStatusEnum.Success]: 'bg-emerald-500',
|
|
20
|
+
[VerificationStatusEnum.Failed]: 'bg-yellow-400',
|
|
21
|
+
[VerificationStatusEnum.Error]: 'bg-rose-600',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const StatusToTextColor = {
|
|
25
|
+
[VerificationStatusEnum.Success]: 'text-emerald-700',
|
|
26
|
+
[VerificationStatusEnum.Failed]: 'text-yellow-400',
|
|
27
|
+
[VerificationStatusEnum.Error]: 'text-rose-600',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const StatusToIcon = {
|
|
31
|
+
[VerificationStatusEnum.Success]: VerificationPassedIcon,
|
|
32
|
+
[VerificationStatusEnum.Failed]: VerificationWarningIcon,
|
|
33
|
+
[VerificationStatusEnum.Error]: VerificationFailedIcon,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const StatusToText = {
|
|
37
|
+
[VerificationStatusEnum.Success]: 'Verification Success',
|
|
38
|
+
[VerificationStatusEnum.Error]: 'Verification Error ',
|
|
39
|
+
[VerificationStatusEnum.Failed]: 'Verification Failed',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const ValidationStateIndicator: React.FC<VerifiableStateIndicatorProps> = ({ status }) => {
|
|
43
|
+
const bgColor = StatusToBgColor[status];
|
|
44
|
+
const source = StatusToIcon[status];
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div className={`relative rounded-full w-[30px] h-[30px] ${bgColor}`}>
|
|
48
|
+
<div className="relative w-[100%] h-[100%] flex items-center justify-center rounded-[50%] bg-white rounded-full overflow-hidden">
|
|
49
|
+
<img
|
|
50
|
+
className="h-full w-full object-contain p-1"
|
|
51
|
+
src={source ?? ''}
|
|
52
|
+
alt="Verification Status Icon"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const VCVerificationPill: React.FC<VerificationDisplayItemProps> = ({
|
|
60
|
+
message = '',
|
|
61
|
+
details,
|
|
62
|
+
status = VerificationStatusEnum.Success,
|
|
63
|
+
}) => {
|
|
64
|
+
const statusColor = StatusToTextColor[status];
|
|
65
|
+
const statusInfoText = StatusToText[status];
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<section className="flex width-full bg-white p-2 px-5 my-3.5 justify-between items-center relative vc-verification-checklist-pill rounded-[22px]">
|
|
69
|
+
<div className="vc-pill-left">
|
|
70
|
+
<p className={`text-[10px] font-bold status-text uppercase ${statusColor}`}>
|
|
71
|
+
{statusInfoText}
|
|
72
|
+
</p>
|
|
73
|
+
|
|
74
|
+
<p className="text-[12px] text-grayscale-900 vc-pill-text">{message}</p>
|
|
75
|
+
|
|
76
|
+
{details && <p className="text-[12px] text-gray-600"> {details}</p>}
|
|
77
|
+
</div>
|
|
78
|
+
<div className="vc-pill-right">
|
|
79
|
+
<ValidationStateIndicator status={status} />
|
|
80
|
+
</div>
|
|
81
|
+
</section>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default VCVerificationPill;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './AchievementCard/index';
|
|
6
|
+
export * from './BadgeThumbnailImg/index';
|
|
7
|
+
export * from './BoostGenericCard/index';
|
|
8
|
+
export * from './BoostSmallCard/index';
|
|
9
|
+
export * from './Button/index';
|
|
10
|
+
export * from './CertificateDisplayCard/index';
|
|
11
|
+
export * from './CircleCheckButton/index';
|
|
12
|
+
export * from './CircleIcon/index';
|
|
13
|
+
export * from './CourseCard/index';
|
|
14
|
+
export * from './CourseVerticalCard/index';
|
|
15
|
+
export * from './FlippyCard/index';
|
|
16
|
+
export * from './GenericCard/index';
|
|
17
|
+
export * from './JobHistoryCard/index';
|
|
18
|
+
export * from './JobListCard/index';
|
|
19
|
+
export * from './LearnCardCreditCardBackFace/index';
|
|
20
|
+
export * from './LearnCardCreditCardFrontFace/index';
|
|
21
|
+
export * from './LearnPill/index';
|
|
22
|
+
export * from './Lightbox/index';
|
|
23
|
+
export * from './Loading/index';
|
|
24
|
+
export * from './MeritBadgeDisplayCard/index';
|
|
25
|
+
export * from './MiniVCThumbnail/index';
|
|
26
|
+
export * from './Notification/index';
|
|
27
|
+
export * from './NotificationBoostCard/index';
|
|
28
|
+
export * from './NotificationUserAcceptedBoostCard/index';
|
|
29
|
+
export * from './NotificationUserCard/index';
|
|
30
|
+
export * from './QRCodeCard/index';
|
|
31
|
+
export * from './RoundedPill/index';
|
|
32
|
+
export * from './RoundedSquare/index';
|
|
33
|
+
export * from './SchoolIdCard/index';
|
|
34
|
+
export * from './SkillTabCard/index';
|
|
35
|
+
export * from './SkillVerticalCard/index';
|
|
36
|
+
export * from './SkillsCard/index';
|
|
37
|
+
export * from './SkillsStatsCard/index';
|
|
38
|
+
export * from './SmallAchievementCard/index';
|
|
39
|
+
export * from './UserProfilePicture/index';
|
|
40
|
+
export * from './VCCard/index';
|
|
41
|
+
export * from './VCDisplayBackFace/index';
|
|
42
|
+
export * from './VCDisplayCard/index';
|
|
43
|
+
export * from './VCDisplayCard2/index';
|
|
44
|
+
export * from './VCDisplayFrontFace/index';
|
|
45
|
+
export * from './VCThumbnail/index';
|
|
46
|
+
export * from './VCVerificationCheck/index';
|
|
47
|
+
export * from './VCVerificationPill/index';
|
|
48
|
+
export * from './svgs/index';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const AccommodationsIcon: React.FC<{ className?: string; size?: string }> = ({
|
|
4
|
+
className = '',
|
|
5
|
+
size = '21',
|
|
6
|
+
}) => {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width={size}
|
|
10
|
+
height={size}
|
|
11
|
+
viewBox="0 0 25 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
className={className}
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d="M13.7468 11.7616V4.65432C13.7468 3.74053 14.4872 3 15.4008 3C16.3145 3 17.0549 3.74053 17.0549 4.65432V13.4226L18.6758 11.8013C19.3224 11.1546 20.3695 11.1546 21.015 11.8013C21.6617 12.4481 21.6617 13.4954 21.015 14.141L15.9305 19.2265C14.9617 20.3147 13.5515 21 11.9814 21H9.73258C6.81294 21 4.445 18.6327 4.445 15.7115V5.46438C4.445 4.55058 5.18539 3.81006 6.09903 3.81006C7.01266 3.81006 7.75305 4.55058 7.75305 5.46438V11.8996"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
strokeWidth="1.5"
|
|
20
|
+
strokeMiterlimit="10"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
d="M10.751 9.32244C10.751 8.49473 11.4216 7.82373 12.2489 7.82373C13.0762 7.82373 13.7468 8.49473 13.7468 9.32244V12.2636C13.7468 13.0913 13.0762 13.7623 12.2489 13.7623C11.4216 13.7623 10.751 13.0913 10.751 12.2636V9.32244Z"
|
|
24
|
+
stroke="currentColor"
|
|
25
|
+
strokeWidth="1.5"
|
|
26
|
+
strokeMiterlimit="10"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M7.75527 9.32244C7.75527 8.49473 8.4259 7.82373 9.25316 7.82373C10.0804 7.82373 10.7511 8.49473 10.7511 9.32244V12.2636C10.7511 13.0913 10.0804 13.7623 9.25316 13.7623C8.4259 13.7623 7.75527 13.0913 7.75527 12.2636V9.32244Z"
|
|
30
|
+
stroke="currentColor"
|
|
31
|
+
strokeWidth="1.5"
|
|
32
|
+
strokeMiterlimit="10"
|
|
33
|
+
/>
|
|
34
|
+
</svg>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default AccommodationsIcon;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const AccomplishmentsIcon: React.FC<{ className?: string; size?: string }> = ({
|
|
4
|
+
className = '',
|
|
5
|
+
size = '21',
|
|
6
|
+
}) => {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width={size}
|
|
10
|
+
height={size}
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
className={className}
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d="M9.55107 11.5523L12.6845 14.6763L21.2944 6.06641"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
strokeWidth="2"
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
strokeLinejoin="round"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M19.2562 15.1049C17.5418 18.9907 12.9988 20.7527 9.11295 19.0384C5.22709 17.324 3.46511 12.781 5.17947 8.89511C6.89382 5.00925 11.4368 3.24728 15.3227 4.96163"
|
|
25
|
+
stroke="currentColor"
|
|
26
|
+
strokeWidth="1.5"
|
|
27
|
+
strokeLinecap="round"
|
|
28
|
+
strokeLinejoin="round"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default AccomplishmentsIcon;
|