@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.
- 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-2d3cbb2c.js} +13 -1189
- package/dist/cjs/SchoolIDCard-2d3cbb2c.js.map +1 -0
- package/dist/cjs/{VCCard-deabc204.js → VCCard-5bb95d29.js} +3 -3
- package/dist/cjs/{VCCard-deabc204.js.map → VCCard-5bb95d29.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-f3f5c6c4.js} +28 -22
- package/dist/cjs/VCDisplayCard2-f3f5c6c4.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-47efbf5b.js +1186 -0
- package/dist/cjs/index-47efbf5b.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 +18 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index14.js +18 -17
- package/dist/cjs/index14.js.map +1 -1
- 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 +2 -1
- package/dist/cjs/index31.js.map +1 -1
- package/dist/cjs/index39.js +12 -11
- package/dist/cjs/index39.js.map +1 -1
- 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 +8 -7
- package/dist/cjs/index42.js.map +1 -1
- 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-fbd1cf6c.js} +12 -1188
- package/dist/esm/SchoolIDCard-fbd1cf6c.js.map +1 -0
- package/dist/esm/{VCCard-94dbe6bf.js → VCCard-ce4b451d.js} +3 -3
- package/dist/esm/{VCCard-94dbe6bf.js.map → VCCard-ce4b451d.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-db880bbb.js} +28 -22
- package/dist/esm/VCDisplayCard2-db880bbb.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-cbd2e9db.js +1184 -0
- package/dist/esm/index-cbd2e9db.js.map +1 -0
- package/dist/esm/index.js +18 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index14.js +18 -17
- package/dist/esm/index14.js.map +1 -1
- 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 +2 -1
- package/dist/esm/index31.js.map +1 -1
- package/dist/esm/index39.js +12 -11
- package/dist/esm/index39.js.map +1 -1
- 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 +8 -7
- package/dist/esm/index42.js.map +1 -1
- 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,213 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Flipper, Flipped as UntypedFlipped } from 'react-flip-toolkit';
|
|
3
|
+
|
|
4
|
+
import IDIcon from '../svgs/IDIcon';
|
|
5
|
+
import IDSleeve from '../../assets/images/id-sleeve.png';
|
|
6
|
+
import QRCodeIcon from '../svgs/QRCodeIcon';
|
|
7
|
+
import UnknownVerifierBadge from '../svgs/UnknownVerifierBadge';
|
|
8
|
+
import VerifiedBadge from '../svgs/VerifiedBadge';
|
|
9
|
+
import PersonBadge from '../svgs/PersonBadge';
|
|
10
|
+
import RedFlag from '../svgs/RedFlag';
|
|
11
|
+
|
|
12
|
+
import { getInfoFromCredential } from '../../helpers/credential.helpers';
|
|
13
|
+
import { isAppDidWeb } from '@learncard/helpers';
|
|
14
|
+
|
|
15
|
+
import { VC } from '@learncard/types';
|
|
16
|
+
import { BoostAchievementCredential } from '../../types';
|
|
17
|
+
import TruncateTextBox from './TruncateTextBox';
|
|
18
|
+
import { KnownDIDRegistryType } from '../../types';
|
|
19
|
+
import {
|
|
20
|
+
VerifierState,
|
|
21
|
+
VERIFIER_STATES,
|
|
22
|
+
} from '../CertificateDisplayCard/VerifierStateBadgeAndText';
|
|
23
|
+
|
|
24
|
+
type FlippedComponentProps = React.PropsWithChildren<{
|
|
25
|
+
flipId?: string;
|
|
26
|
+
inverseFlipId?: string;
|
|
27
|
+
scale?: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
|
|
30
|
+
const Flipped = UntypedFlipped as unknown as React.FC<FlippedComponentProps>;
|
|
31
|
+
|
|
32
|
+
type VCIDDisplayFrontFaceProps = {
|
|
33
|
+
isFront: boolean;
|
|
34
|
+
setIsFront: (value: boolean) => void;
|
|
35
|
+
showDetailsBtn?: boolean;
|
|
36
|
+
credential: VC | BoostAchievementCredential;
|
|
37
|
+
knownDIDRegistry?: KnownDIDRegistryType;
|
|
38
|
+
customThumbComponent?: React.ReactNode;
|
|
39
|
+
hideQRCode?: boolean;
|
|
40
|
+
qrCodeOnClick?: () => void;
|
|
41
|
+
customIDDescription?: React.ReactNode;
|
|
42
|
+
unknownVerifierTitle?: string;
|
|
43
|
+
onVerifierClick?: (
|
|
44
|
+
event: React.MouseEvent<HTMLButtonElement>,
|
|
45
|
+
verifierState: VerifierState
|
|
46
|
+
) => void;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const VCIDDisplayFrontFace: React.FC<VCIDDisplayFrontFaceProps> = ({
|
|
50
|
+
isFront,
|
|
51
|
+
setIsFront,
|
|
52
|
+
showDetailsBtn,
|
|
53
|
+
credential,
|
|
54
|
+
knownDIDRegistry,
|
|
55
|
+
customThumbComponent,
|
|
56
|
+
hideQRCode = false,
|
|
57
|
+
qrCodeOnClick,
|
|
58
|
+
customIDDescription,
|
|
59
|
+
unknownVerifierTitle,
|
|
60
|
+
onVerifierClick,
|
|
61
|
+
}) => {
|
|
62
|
+
const { credentialSubject } = getInfoFromCredential(credential, 'MMM dd, yyyy', {
|
|
63
|
+
uppercaseDate: false,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const issuerDid =
|
|
67
|
+
typeof credential.issuer === 'string' ? credential.issuer : credential.issuer.id;
|
|
68
|
+
const isAppIssuerDid = isAppDidWeb(issuerDid);
|
|
69
|
+
|
|
70
|
+
let verifierState: VerifierState;
|
|
71
|
+
if (credentialSubject?.id === issuerDid && issuerDid && issuerDid !== 'did:example:123') {
|
|
72
|
+
// the extra "&& issuerDid" is so that the credential preview doesn't say "Self Verified"
|
|
73
|
+
// the did:example:123 condition is so that we don't show this status from the Manage Boosts tab
|
|
74
|
+
verifierState = VERIFIER_STATES.selfVerified;
|
|
75
|
+
} else if (unknownVerifierTitle) {
|
|
76
|
+
verifierState = VERIFIER_STATES.trustedVerifier;
|
|
77
|
+
} else {
|
|
78
|
+
if (knownDIDRegistry?.source === 'trusted') {
|
|
79
|
+
verifierState = VERIFIER_STATES.trustedVerifier;
|
|
80
|
+
} else if (knownDIDRegistry?.source === 'untrusted') {
|
|
81
|
+
verifierState = VERIFIER_STATES.untrustedVerifier;
|
|
82
|
+
} else if (knownDIDRegistry?.source === 'unknown') {
|
|
83
|
+
verifierState = isAppIssuerDid
|
|
84
|
+
? VERIFIER_STATES.appIssuer
|
|
85
|
+
: VERIFIER_STATES.unknownVerifier;
|
|
86
|
+
} else {
|
|
87
|
+
verifierState = isAppIssuerDid
|
|
88
|
+
? VERIFIER_STATES.appIssuer
|
|
89
|
+
: VERIFIER_STATES.unknownVerifier;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const isSelfVerified = verifierState === VERIFIER_STATES.selfVerified;
|
|
93
|
+
|
|
94
|
+
const achievement =
|
|
95
|
+
'achievement' in credential?.credentialSubject
|
|
96
|
+
? credential?.credentialSubject?.achievement
|
|
97
|
+
: undefined;
|
|
98
|
+
const description = achievement?.description;
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Flipper className="w-full" flipKey={isFront}>
|
|
102
|
+
<Flipped flipId="face">
|
|
103
|
+
<section className="vc-front-face w-full flex flex-col items-center gap-[15px]">
|
|
104
|
+
{/* <div className="w-[380px] h-[211px] bg-red-300" /> */}
|
|
105
|
+
|
|
106
|
+
<Flipped inverseFlipId="face">{customThumbComponent}</Flipped>
|
|
107
|
+
|
|
108
|
+
<Flipped inverseFlipId="face">
|
|
109
|
+
<div className="text-white w-full flex items-center justify-center font-poppins">
|
|
110
|
+
<IDIcon className="text-white mr-1" /> ID
|
|
111
|
+
</div>
|
|
112
|
+
</Flipped>
|
|
113
|
+
|
|
114
|
+
<Flipped inverseFlipId="face">
|
|
115
|
+
<div className="w-full relative">
|
|
116
|
+
{!hideQRCode && (
|
|
117
|
+
<button
|
|
118
|
+
onClick={e => {
|
|
119
|
+
e.stopPropagation();
|
|
120
|
+
qrCodeOnClick?.();
|
|
121
|
+
}}
|
|
122
|
+
className="text-grayscale-900 bg-white rounded-full p-[10px] absolute top-[-10px] right-[45%]"
|
|
123
|
+
>
|
|
124
|
+
<QRCodeIcon className="text-grayscale-900 " />
|
|
125
|
+
</button>
|
|
126
|
+
)}
|
|
127
|
+
<img src={IDSleeve} alt="id-sleeve" className="w-full object-cover" />
|
|
128
|
+
</div>
|
|
129
|
+
</Flipped>
|
|
130
|
+
|
|
131
|
+
<Flipped inverseFlipId="face">
|
|
132
|
+
<div className="w-full bg-white relative mt-[-70px] px-6 pb-4 pt-4">
|
|
133
|
+
{description && !customIDDescription && (
|
|
134
|
+
<>
|
|
135
|
+
<TruncateTextBox
|
|
136
|
+
text={description}
|
|
137
|
+
className="description-box"
|
|
138
|
+
containerClassName="!p-0 !shadow-none !text-center !w-full"
|
|
139
|
+
textClassName="!font-poppins !text-base !text-grayscale-700 !text-center !w-full"
|
|
140
|
+
truncateThreshold={204}
|
|
141
|
+
/>
|
|
142
|
+
</>
|
|
143
|
+
)}
|
|
144
|
+
|
|
145
|
+
{customIDDescription && customIDDescription}
|
|
146
|
+
|
|
147
|
+
{isFront && showDetailsBtn && (
|
|
148
|
+
<button
|
|
149
|
+
type="button"
|
|
150
|
+
className="vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[24px] py-[8px] rounded-[40px] text-[16px] font-poppins font-medium leading-normal mt-[25px] w-fit select-none"
|
|
151
|
+
onClick={() => setIsFront(!isFront)}
|
|
152
|
+
>
|
|
153
|
+
Details
|
|
154
|
+
</button>
|
|
155
|
+
)}
|
|
156
|
+
|
|
157
|
+
<div className="w-full flex items-center justify-center mt-4">
|
|
158
|
+
<div className="h-[2px] w-full bg-gray-200" />
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<button
|
|
162
|
+
type="button"
|
|
163
|
+
className="w-full flex items-center justify-center mt-2 appearance-none bg-transparent p-0"
|
|
164
|
+
onClick={event => {
|
|
165
|
+
event.stopPropagation();
|
|
166
|
+
onVerifierClick?.(event, verifierState);
|
|
167
|
+
}}
|
|
168
|
+
onMouseDown={event => event.stopPropagation()}
|
|
169
|
+
aria-haspopup="dialog"
|
|
170
|
+
aria-label={`Open issuer details for ${
|
|
171
|
+
unknownVerifierTitle ?? verifierState
|
|
172
|
+
}`}
|
|
173
|
+
>
|
|
174
|
+
{isSelfVerified && (
|
|
175
|
+
<span className="uppercase font-poppins text-base font-[500] text-green-dark flex gap-[3px] items-center">
|
|
176
|
+
<PersonBadge className="w-[20px] h-[20px]" />
|
|
177
|
+
Self Issued
|
|
178
|
+
</span>
|
|
179
|
+
)}
|
|
180
|
+
{verifierState === VERIFIER_STATES.trustedVerifier && (
|
|
181
|
+
<span className="uppercase font-poppins text-base font-[500] text-blue-light flex gap-[3px] items-center text-center">
|
|
182
|
+
<VerifiedBadge className="w-[20px] h-[20px]" />
|
|
183
|
+
{unknownVerifierTitle ?? 'Trusted Issuer'}
|
|
184
|
+
</span>
|
|
185
|
+
)}
|
|
186
|
+
{verifierState === VERIFIER_STATES.unknownVerifier && (
|
|
187
|
+
<span className="uppercase font-poppins text-base font-[500] text-orange-500 flex gap-[3px] items-center">
|
|
188
|
+
<UnknownVerifierBadge className="w-[20px] h-[20px]" />
|
|
189
|
+
Unknown Issuer
|
|
190
|
+
</span>
|
|
191
|
+
)}
|
|
192
|
+
{verifierState === VERIFIER_STATES.appIssuer && (
|
|
193
|
+
<span className="uppercase font-poppins text-base font-[500] text-cyan-600 flex gap-[3px] items-center">
|
|
194
|
+
<VerifiedBadge className="w-[20px] h-[20px]" />
|
|
195
|
+
App Issuer
|
|
196
|
+
</span>
|
|
197
|
+
)}
|
|
198
|
+
{verifierState === VERIFIER_STATES.untrustedVerifier && (
|
|
199
|
+
<span className="uppercase font-poppins text-base font-[500] text-red-mastercard flex gap-[3px] items-center">
|
|
200
|
+
<RedFlag className="w-[20px] h-[20px]" />
|
|
201
|
+
Untrusted Issuer
|
|
202
|
+
</span>
|
|
203
|
+
)}
|
|
204
|
+
</button>
|
|
205
|
+
</div>
|
|
206
|
+
</Flipped>
|
|
207
|
+
</section>
|
|
208
|
+
</Flipped>
|
|
209
|
+
</Flipper>
|
|
210
|
+
);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export default VCIDDisplayFrontFace;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { VerificationItem, VerificationStatusEnum } from '@learncard/types';
|
|
3
|
+
import { getColorForVerificationStatus } from '../../helpers/credential.helpers';
|
|
4
|
+
|
|
5
|
+
import InfoBox from './InfoBox';
|
|
6
|
+
import InfoIcon from '../svgs/InfoIcon';
|
|
7
|
+
import AcuteCheckmark from '../svgs/AcuteCheckmark';
|
|
8
|
+
import ExclamationPoint from '../svgs/ExclamationPoint';
|
|
9
|
+
import X from '../svgs/X';
|
|
10
|
+
import { capitalize } from '../../helpers/string.helpers';
|
|
11
|
+
|
|
12
|
+
type VerificationRowProps = {
|
|
13
|
+
verification: VerificationItem;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const VerificationRow: React.FC<VerificationRowProps> = ({ verification }) => {
|
|
17
|
+
const [showInfo, setShowInfo] = useState(false);
|
|
18
|
+
const statusColor = getColorForVerificationStatus(verification.status);
|
|
19
|
+
|
|
20
|
+
const getIcon = () => {
|
|
21
|
+
switch (verification.status) {
|
|
22
|
+
case VerificationStatusEnum.Success:
|
|
23
|
+
return <AcuteCheckmark />;
|
|
24
|
+
case VerificationStatusEnum.Error:
|
|
25
|
+
return <ExclamationPoint />;
|
|
26
|
+
case VerificationStatusEnum.Failed:
|
|
27
|
+
return <X className="w-[15px] h-[15px]" />;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
let primaryText = verification.check
|
|
32
|
+
? `${verification.check}: ${verification.message}`
|
|
33
|
+
: verification.message;
|
|
34
|
+
if (verification.status === VerificationStatusEnum.Failed) {
|
|
35
|
+
primaryText = verification.message ?? verification.details ?? '';
|
|
36
|
+
}
|
|
37
|
+
primaryText = capitalize(primaryText);
|
|
38
|
+
|
|
39
|
+
const infoText = ''; // if we want certain verifications to have extra explanation, we can set this variable
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className="verification-row flex flex-col gap-[5px] font-poppins border-b-[1px] border-grayscale-200 border-solid w-full py-[10px] last:border-0 last:pb-0">
|
|
43
|
+
<span
|
|
44
|
+
className="font-[700] text-[11px] leading-[16px] uppercase flex items-center gap-[3px] select-none"
|
|
45
|
+
style={{ color: statusColor }}
|
|
46
|
+
>
|
|
47
|
+
{getIcon()}
|
|
48
|
+
{verification.status}
|
|
49
|
+
{infoText && (
|
|
50
|
+
<button className="ml-auto" onClick={() => setShowInfo(!showInfo)}>
|
|
51
|
+
<InfoIcon color={statusColor} />
|
|
52
|
+
</button>
|
|
53
|
+
)}
|
|
54
|
+
</span>
|
|
55
|
+
{showInfo && infoText && (
|
|
56
|
+
<InfoBox
|
|
57
|
+
text={infoText}
|
|
58
|
+
handleClose={() => setShowInfo(false)}
|
|
59
|
+
backgroundColor={statusColor}
|
|
60
|
+
/>
|
|
61
|
+
)}
|
|
62
|
+
<span className="font-[400] text-[14px] leading-[21px] text-grayscale-900">
|
|
63
|
+
{primaryText}
|
|
64
|
+
</span>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export default VerificationRow;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import VerificationRow from './VerificationRow';
|
|
4
|
+
import InfoIcon from '../svgs/InfoIcon';
|
|
5
|
+
import InfoBox from './InfoBox';
|
|
6
|
+
|
|
7
|
+
import { VerificationItem } from '@learncard/types';
|
|
8
|
+
|
|
9
|
+
type VerificationsBoxProps = {
|
|
10
|
+
verificationItems: VerificationItem[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const VerificationsBox: React.FC<VerificationsBoxProps> = ({ verificationItems }) => {
|
|
14
|
+
const [showInfo, setShowInfo] = useState(false);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className="verifications-box bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full relative">
|
|
18
|
+
<h3 className="text-[20px] leading-[20px] text-grayscale-900">
|
|
19
|
+
Credential Verifications
|
|
20
|
+
</h3>
|
|
21
|
+
<button
|
|
22
|
+
className="absolute top-[17px] right-[17px]"
|
|
23
|
+
onClick={e => {
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
setShowInfo(!showInfo);
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
<InfoIcon color={showInfo ? '#6366F1' : undefined} />
|
|
29
|
+
</button>
|
|
30
|
+
{showInfo && (
|
|
31
|
+
<InfoBox
|
|
32
|
+
text="Credential verifications check the cryptographic proof of digital credentials to ensure their authenticity and accuracy."
|
|
33
|
+
handleClose={() => setShowInfo(false)}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
36
|
+
|
|
37
|
+
{verificationItems.map((verification, index) => (
|
|
38
|
+
<VerificationRow key={index} verification={verification} />
|
|
39
|
+
))}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default VerificationsBox;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { render } from '@testing-library/react';
|
|
5
|
+
import { describe, expect, test, vi } from 'vitest';
|
|
6
|
+
|
|
7
|
+
vi.mock('react-flip-toolkit', () => ({
|
|
8
|
+
Flipped: ({ children }: { children: React.ReactNode }) => <>{children}</>,
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
vi.mock('../../CertificateDisplayCard/VerifierStateBadgeAndText', () => ({
|
|
12
|
+
__esModule: true,
|
|
13
|
+
default: () => <div data-testid="verifier-state-badge" />,
|
|
14
|
+
VERIFIER_STATES: {
|
|
15
|
+
selfVerified: 'selfVerified',
|
|
16
|
+
trustedVerifier: 'trustedVerifier',
|
|
17
|
+
untrustedVerifier: 'untrustedVerifier',
|
|
18
|
+
appIssuer: 'appIssuer',
|
|
19
|
+
unknownVerifier: 'unknownVerifier',
|
|
20
|
+
},
|
|
21
|
+
}));
|
|
22
|
+
|
|
23
|
+
import VC2FrontFaceInfo from '../VC2FrontFaceInfo';
|
|
24
|
+
|
|
25
|
+
describe('VC2FrontFaceInfo', () => {
|
|
26
|
+
test('uses a 43px issuee silhouette and a 22px issuer silhouette for badge fallback', () => {
|
|
27
|
+
const credential = {
|
|
28
|
+
issuer: '',
|
|
29
|
+
issuanceDate: '2026-05-15T00:00:00.000Z',
|
|
30
|
+
credentialSubject: {
|
|
31
|
+
id: '',
|
|
32
|
+
achievement: {
|
|
33
|
+
name: 'Badge Title',
|
|
34
|
+
description: 'Badge description',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
display: {
|
|
38
|
+
displayType: 'badge',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const { container } = render(
|
|
43
|
+
<VC2FrontFaceInfo
|
|
44
|
+
credential={credential as any}
|
|
45
|
+
issuee=""
|
|
46
|
+
issuer=""
|
|
47
|
+
title="Badge Title"
|
|
48
|
+
createdAt="May 15, 2026"
|
|
49
|
+
knownDIDRegistry={{ source: 'unknown', results: {} }}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const silhouettes = Array.from(container.querySelectorAll('svg'));
|
|
54
|
+
const issueeSilhouette = silhouettes.find(svg => svg.classList.contains('h-[43px]'));
|
|
55
|
+
const issuerSilhouette = silhouettes.find(svg => svg.classList.contains('h-[22px]'));
|
|
56
|
+
|
|
57
|
+
expect(issueeSilhouette).not.toBeUndefined();
|
|
58
|
+
expect(issueeSilhouette?.classList.contains('w-[43px]')).toBe(true);
|
|
59
|
+
expect(issuerSilhouette).not.toBeUndefined();
|
|
60
|
+
expect(issuerSilhouette?.classList.contains('w-[22px]')).toBe(true);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('uses a 43px issuee fingerprint and a 22px issuer fingerprint for badge fallback', () => {
|
|
64
|
+
const credential = {
|
|
65
|
+
issuer: 'did:key:z6MkpX1aYzR3uN8bQ5cT7vH2jL9mF6sD4',
|
|
66
|
+
issuanceDate: '2026-05-15T00:00:00.000Z',
|
|
67
|
+
credentialSubject: {
|
|
68
|
+
id: 'did:key:z6Mkq4C8nT1pV7xY2dH9jL6sR3wM5aZ8c',
|
|
69
|
+
achievement: {
|
|
70
|
+
name: 'Badge Title',
|
|
71
|
+
description: 'Badge description',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
display: {
|
|
75
|
+
displayType: 'badge',
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const { container } = render(
|
|
80
|
+
<VC2FrontFaceInfo
|
|
81
|
+
credential={credential as any}
|
|
82
|
+
issuee="did:key:z6Mkq4C8nT1pV7xY2dH9jL6sR3wM5aZ8c"
|
|
83
|
+
issuer="did:key:z6MkpX1aYzR3uN8bQ5cT7vH2jL9mF6sD4"
|
|
84
|
+
title="Badge Title"
|
|
85
|
+
createdAt="May 15, 2026"
|
|
86
|
+
knownDIDRegistry={{ source: 'unknown', results: {} }}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const fingerprints = Array.from(container.querySelectorAll('svg'));
|
|
91
|
+
const issueeFingerprint = fingerprints.find(svg => svg.classList.contains('h-[43px]'));
|
|
92
|
+
const issuerFingerprint = fingerprints.find(svg => svg.classList.contains('h-[22px]'));
|
|
93
|
+
|
|
94
|
+
expect(issueeFingerprint).not.toBeUndefined();
|
|
95
|
+
expect(issueeFingerprint?.classList.contains('w-[43px]')).toBe(true);
|
|
96
|
+
expect(issuerFingerprint).not.toBeUndefined();
|
|
97
|
+
expect(issuerFingerprint?.classList.contains('w-[22px]')).toBe(true);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('wraps and clamps long issuer names instead of overflowing the card', () => {
|
|
101
|
+
const longIssuerName = 'Versace Academy of Leadership and Entrepreneurship';
|
|
102
|
+
const credential = {
|
|
103
|
+
issuer: { name: longIssuerName },
|
|
104
|
+
issuanceDate: '2026-05-15T00:00:00.000Z',
|
|
105
|
+
credentialSubject: {
|
|
106
|
+
id: '',
|
|
107
|
+
achievement: { name: 'Badge Title', description: 'Badge description' },
|
|
108
|
+
},
|
|
109
|
+
display: { displayType: 'badge' },
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const { container, getByText } = render(
|
|
113
|
+
<VC2FrontFaceInfo
|
|
114
|
+
credential={credential as any}
|
|
115
|
+
issuee=""
|
|
116
|
+
issuer={{ name: longIssuerName } as any}
|
|
117
|
+
title="Badge Title"
|
|
118
|
+
createdAt="May 15, 2026"
|
|
119
|
+
knownDIDRegistry={{ source: 'unknown', results: {} }}
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
const issuedBy = container.querySelector('.issued-by');
|
|
124
|
+
expect(issuedBy).not.toBeNull();
|
|
125
|
+
// The bug was whitespace-nowrap forcing one line that overflowed the card.
|
|
126
|
+
expect(issuedBy?.className).not.toContain('whitespace-nowrap');
|
|
127
|
+
expect(issuedBy?.className).toContain('break-words');
|
|
128
|
+
// line-clamp-2 only clamps on a block/-webkit-box, not a flex container,
|
|
129
|
+
// so the container must NOT be `flex` (the original review-miss).
|
|
130
|
+
expect(issuedBy?.className).toContain('line-clamp-2');
|
|
131
|
+
expect(issuedBy?.className).not.toContain('flex');
|
|
132
|
+
expect(getByText(longIssuerName)).not.toBeNull();
|
|
133
|
+
});
|
|
134
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './FitText';
|
|
6
|
+
export * from './InfoBox';
|
|
7
|
+
export * from './IssueHistoryBox';
|
|
8
|
+
export * from './MediaAttachmentsBox';
|
|
9
|
+
export * from './RibbonEnd';
|
|
10
|
+
export * from './SelectedSkills';
|
|
11
|
+
export * from './SkillsBox';
|
|
12
|
+
export * from './Subskill';
|
|
13
|
+
export * from './TopLevelSkill';
|
|
14
|
+
export * from './TruncateTextBox';
|
|
15
|
+
export * from './VC2BackFace';
|
|
16
|
+
export * from './VC2FrontFaceInfo';
|
|
17
|
+
export * from './VCDisplayCard2';
|
|
18
|
+
export * from './VCDisplayCardCategoryType';
|
|
19
|
+
export * from './VCDisplayCardSkillsCount';
|
|
20
|
+
export * from './VCIDDIsplayCard';
|
|
21
|
+
export * from './VCIDDisplayFrontFace';
|
|
22
|
+
export * from './VerificationRow';
|
|
23
|
+
export * from './VerificationsBox';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FatArrow from '../../assets/images/icon.green.fat-arrow.png';
|
|
3
|
+
import UserProfilePicture from '../UserProfilePicture/UserProfilePicture';
|
|
4
|
+
import { VCVerificationCheckWithText } from '../VCVerificationCheck/VCVerificationCheck';
|
|
5
|
+
import { getImageFromProfile, getNameFromProfile } from '../../helpers/credential.helpers';
|
|
6
|
+
|
|
7
|
+
import { VCDisplayCardProps } from '../../types';
|
|
8
|
+
|
|
9
|
+
const VCDisplayFrontFace: React.FC<VCDisplayCardProps> = ({
|
|
10
|
+
title,
|
|
11
|
+
createdAt,
|
|
12
|
+
issuer,
|
|
13
|
+
issuee,
|
|
14
|
+
subjectImageComponent,
|
|
15
|
+
issuerImageComponent,
|
|
16
|
+
hideProfileBubbles = false,
|
|
17
|
+
credentialSubject,
|
|
18
|
+
className = '',
|
|
19
|
+
loading,
|
|
20
|
+
handleClick,
|
|
21
|
+
overrideCardImageComponent,
|
|
22
|
+
overrideCardTitle,
|
|
23
|
+
customHeaderComponent,
|
|
24
|
+
}) => {
|
|
25
|
+
const credentialAchievementImage =
|
|
26
|
+
credentialSubject?.achievement?.image?.id || credentialSubject?.achievement?.image;
|
|
27
|
+
const issuerName = getNameFromProfile(issuer ?? '');
|
|
28
|
+
const issueeName = getNameFromProfile(issuee ?? '');
|
|
29
|
+
const issuerImage = getImageFromProfile(issuer ?? '');
|
|
30
|
+
const issueeImage = getImageFromProfile(issuee ?? '');
|
|
31
|
+
|
|
32
|
+
let issueeImageEl: React.ReactNode | null = null;
|
|
33
|
+
if (subjectImageComponent) {
|
|
34
|
+
issueeImageEl = subjectImageComponent;
|
|
35
|
+
} else {
|
|
36
|
+
issueeImageEl = (
|
|
37
|
+
<UserProfilePicture
|
|
38
|
+
customContainerClass={`object-cover h-full w-full text-4xl ${
|
|
39
|
+
!issueeImage ? 'pt-[8px]' : ''
|
|
40
|
+
}`}
|
|
41
|
+
user={{ image: issueeImage, name: issueeName }}
|
|
42
|
+
alt="Issuee image"
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let issuerImageEl: React.ReactNode | null = null;
|
|
48
|
+
|
|
49
|
+
if (issuerImageComponent) {
|
|
50
|
+
issuerImageEl = issuerImageComponent;
|
|
51
|
+
} else {
|
|
52
|
+
issuerImageEl = (
|
|
53
|
+
<UserProfilePicture
|
|
54
|
+
customContainerClass={`object-cover h-full w-full text-4xl ${
|
|
55
|
+
!issuerImage ? 'pt-[8px]' : ''
|
|
56
|
+
}`}
|
|
57
|
+
user={{ image: issuerImage, name: issuerName }}
|
|
58
|
+
alt="Issuer image"
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const credImg = credentialAchievementImage ? (
|
|
64
|
+
<img
|
|
65
|
+
className="h-full w-full object-cover"
|
|
66
|
+
src={credentialAchievementImage ?? ''}
|
|
67
|
+
alt="Credential Achievement Image"
|
|
68
|
+
/>
|
|
69
|
+
) : (
|
|
70
|
+
<></>
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const renderCardImg = overrideCardImageComponent ? overrideCardImageComponent : credImg;
|
|
74
|
+
const cardTitle = overrideCardTitle ? overrideCardTitle : title;
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div
|
|
78
|
+
className={`z-[9] vc-display-main-card-front flex overflow-hidden flex-col items-center justify-between relative max-w-[400px] h-[100%] min-h-[600px] p-7 rounded-3xl shadow-3xl bg-emerald-700 vc-display-card-full-container ${className}`}
|
|
79
|
+
>
|
|
80
|
+
<section className="bg-white rounded-bl-[50%] rounded-br-[50%] absolute top-0 w-[110%] h-[77%]"></section>
|
|
81
|
+
<section className="flex flex-col items-center justify-center z-10 text-center credential-thumb-img">
|
|
82
|
+
<section className="max-w-[100px] max-h-[100px]">{renderCardImg}</section>
|
|
83
|
+
|
|
84
|
+
<section className="flex flex-row w-full line-clamp-2">
|
|
85
|
+
<div className="flex flex-row w-full line-clamp-2 py-4 vc-flippy-card-title-front ">
|
|
86
|
+
<h3
|
|
87
|
+
className="vc-thumbnail-title w-full text-2xl line-clamp-2 tracking-wide leading-snug text-center vc-display-title text-gray-900 font-medium"
|
|
88
|
+
data-testid="vc-thumbnail-title"
|
|
89
|
+
>
|
|
90
|
+
{cardTitle ?? ''}
|
|
91
|
+
</h3>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
{customHeaderComponent && customHeaderComponent}
|
|
95
|
+
</section>
|
|
96
|
+
|
|
97
|
+
<section className="flex flex-row items-center justify-center mt-2 w-full my-2 vc-card-issuer-thumbs">
|
|
98
|
+
{!hideProfileBubbles && (
|
|
99
|
+
<>
|
|
100
|
+
<div className="flex items-center justify-center h-16 w-16 shadow-3xl rounded-full overflow-hidden bg-white">
|
|
101
|
+
{issuerImageEl}
|
|
102
|
+
</div>
|
|
103
|
+
<img
|
|
104
|
+
className="h-8 w-8 my-0 mx-4"
|
|
105
|
+
src={FatArrow ?? ''}
|
|
106
|
+
alt="fat arrow icon"
|
|
107
|
+
/>
|
|
108
|
+
<div className="flex items-center justify-center h-16 w-16 shadow-3xl rounded-full overflow-hidden bg-white">
|
|
109
|
+
{issueeImageEl}
|
|
110
|
+
</div>
|
|
111
|
+
</>
|
|
112
|
+
)}
|
|
113
|
+
</section>
|
|
114
|
+
|
|
115
|
+
<div className="w-full mt-2 vc-card-issued-to-info">
|
|
116
|
+
<p
|
|
117
|
+
className="text-sm font-light text-center line-clamp-2 vc-display-issue-details text-gray-900"
|
|
118
|
+
data-testid="vc-thumbnail-createdAt"
|
|
119
|
+
>
|
|
120
|
+
Issued to <span className="font-bold text-gray-900">{issueeName}</span> on{' '}
|
|
121
|
+
{createdAt ?? ''} by{' '}
|
|
122
|
+
<span className="font-bold text-gray-900"> {issuerName}</span>
|
|
123
|
+
</p>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<button
|
|
127
|
+
onClick={handleClick}
|
|
128
|
+
className="cursor-alias bg-white my-3 border-0 text-indigo-500 font-semibold py-2 px-4 sl"
|
|
129
|
+
>
|
|
130
|
+
<span className="flex justify-center">
|
|
131
|
+
<p className="flex items-center">View Details</p>
|
|
132
|
+
</span>
|
|
133
|
+
</button>
|
|
134
|
+
</section>
|
|
135
|
+
|
|
136
|
+
<div className="flex items-center justify-center w-full">
|
|
137
|
+
<VCVerificationCheckWithText loading={loading} />
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export default VCDisplayFrontFace;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import VCThumbnail from './VCThumbnail';
|
|
5
|
+
import { VCThumbnailProps } from './types';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'VCThumbnail',
|
|
9
|
+
component: VCThumbnail,
|
|
10
|
+
argTypes: {},
|
|
11
|
+
} as Meta<typeof VCThumbnail>;
|
|
12
|
+
|
|
13
|
+
const Template: Story<VCThumbnailProps> = args => <VCThumbnail {...args} />;
|
|
14
|
+
|
|
15
|
+
export const VCThumbnailTest = Template.bind({});
|
|
16
|
+
VCThumbnailTest.args = {
|
|
17
|
+
title: 'Our Wallet Passed JFF Plugfest #1 2022',
|
|
18
|
+
createdAt: '01 May, 2022',
|
|
19
|
+
issuerImage: 'https://kayaelle.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',
|
|
20
|
+
userImage:
|
|
21
|
+
'https://img.freepik.com/free-photo/pleasant-looking-serious-blonde-woman-with-long-hair-wears-blue-casual-sweater_273609-17050.jpg?w=2000',
|
|
22
|
+
userImageComponent: (
|
|
23
|
+
<div className="inline-block relative overflow-hidden rounded-full shadow-3xl h-0 w-1/4 pb-[25%] bg-cyan-600 text-white font-medium text-3xl">
|
|
24
|
+
<p className="pt-[20%]">LC</p>
|
|
25
|
+
</div>
|
|
26
|
+
),
|
|
27
|
+
badgeImage: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/plugfest-1-badge-image.png',
|
|
28
|
+
listView: false,
|
|
29
|
+
onClick: () => {
|
|
30
|
+
console.log('Hello World');
|
|
31
|
+
},
|
|
32
|
+
};
|