@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,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CircleCheckButtonProps } from '../../types';
|
|
3
|
+
import { CheckmarkSvg } from '../RoundedPill';
|
|
4
|
+
|
|
5
|
+
export const CircleCheckButton: React.FC<CircleCheckButtonProps> = ({
|
|
6
|
+
checked,
|
|
7
|
+
onClick,
|
|
8
|
+
bgColor,
|
|
9
|
+
className = '',
|
|
10
|
+
}) => {
|
|
11
|
+
const backgroundColor = checked ? 'bg-emerald-700' : bgColor ? bgColor : 'bg-gray-50';
|
|
12
|
+
|
|
13
|
+
const handleClick = () => {
|
|
14
|
+
onClick?.();
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<button
|
|
19
|
+
type="button"
|
|
20
|
+
onClick={handleClick}
|
|
21
|
+
className={`w-[32px] h-[32px] flex items-center justify-center border-4 border-gray-50 rounded-full text-gray-700 ${backgroundColor} ${className}`}
|
|
22
|
+
>
|
|
23
|
+
<CheckmarkSvg color="#ffffff" />
|
|
24
|
+
</button>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default CircleCheckButton;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import numeral from 'numeral';
|
|
3
|
+
import CircleSpinner, { CircleLoadingState } from '../Loading/CircleSpinner';
|
|
4
|
+
import { Icons } from '../../types';
|
|
5
|
+
import { ICONS_TO_SOURCE } from '../../constants/icons';
|
|
6
|
+
|
|
7
|
+
export type CircleIconProps = {
|
|
8
|
+
iconSrc?: string;
|
|
9
|
+
count?: string | number;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
bgColor?: string;
|
|
12
|
+
innerPadding?: string;
|
|
13
|
+
size?: string;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
iconCircleClass?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type CountCircleProps = {
|
|
20
|
+
size?: string;
|
|
21
|
+
count?: string | number;
|
|
22
|
+
innerPadding?: string;
|
|
23
|
+
onClick?: () => {};
|
|
24
|
+
bgColor?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const CountCircle: React.FC<CountCircleProps> = ({
|
|
30
|
+
size = 'auto',
|
|
31
|
+
count = '28',
|
|
32
|
+
innerPadding = '3px 5px',
|
|
33
|
+
onClick = () => {},
|
|
34
|
+
bgColor = 'bg-grayscale-50',
|
|
35
|
+
loading,
|
|
36
|
+
}) => {
|
|
37
|
+
const _count = Number(count) >= 1000 ? numeral(Number(count)).format('0.0a') : count;
|
|
38
|
+
const circleLoadingState = loading ? CircleLoadingState.spin : CircleLoadingState.stop;
|
|
39
|
+
const style = {
|
|
40
|
+
width: size,
|
|
41
|
+
height: size,
|
|
42
|
+
padding: !loading ? innerPadding : '0px',
|
|
43
|
+
backgroundColor: bgColor,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const spinnerStyle = {
|
|
47
|
+
transform: 'translateX(-2px) translateY(1px)',
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<section onClick={onClick} className={`text-grayscale-50 rounded-full`} style={style}>
|
|
52
|
+
{!loading && count && <p className="">{_count}</p>}
|
|
53
|
+
{loading && (
|
|
54
|
+
<div style={spinnerStyle}>
|
|
55
|
+
<CircleSpinner loadingState={circleLoadingState} thickness={3} size={20} />
|
|
56
|
+
</div>
|
|
57
|
+
)}
|
|
58
|
+
</section>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const CircleIcon: React.FC<CircleIconProps> = ({
|
|
63
|
+
iconSrc = ICONS_TO_SOURCE[Icons.coinsIcon],
|
|
64
|
+
size = '52px',
|
|
65
|
+
count = '28',
|
|
66
|
+
onClick = () => {},
|
|
67
|
+
loading,
|
|
68
|
+
iconCircleClass = '',
|
|
69
|
+
}) => {
|
|
70
|
+
const style = {
|
|
71
|
+
width: size,
|
|
72
|
+
height: size,
|
|
73
|
+
backgroundColor: `rgba(24, 34, 78, 0.85)`,
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div style={style} className={`rounded-full ${iconCircleClass}`}>
|
|
78
|
+
<section
|
|
79
|
+
onClick={onClick}
|
|
80
|
+
className={`flex flex-row-reverse justify-between items-center rounded-full relative overflow-hidden w-16 `}
|
|
81
|
+
style={{ ...style, backgroundColor: 'transparent' }}
|
|
82
|
+
>
|
|
83
|
+
<CountCircle count={count} loading={loading} />
|
|
84
|
+
<img src={iconSrc ?? ''} alt="Icon image" />
|
|
85
|
+
</section>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export default CircleIcon;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import userEvent from '@testing-library/user-event';
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
import CircleIcon from '../CircleIcon';
|
|
7
|
+
|
|
8
|
+
describe('Running Tests for CircleIcon', () => {
|
|
9
|
+
it('Renders important props', () => {
|
|
10
|
+
render(<CircleIcon hideCount={false} iconSrc="iconSrcProp" count="count text" />);
|
|
11
|
+
|
|
12
|
+
const img = screen.getByAltText('Icon image');
|
|
13
|
+
expect(img).toHaveAttribute('src', 'iconSrcProp');
|
|
14
|
+
|
|
15
|
+
const countText = screen.getByText('count text');
|
|
16
|
+
expect(countText).toBeInTheDocument();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// it('Uses the given styles', () => {
|
|
20
|
+
// const { container } = render(<CircleIcon size="22px" innerPadding="2px" />);
|
|
21
|
+
|
|
22
|
+
// const containerStyle = container.firstChild.style;
|
|
23
|
+
// expect(containerStyle.height).toBe('22px');
|
|
24
|
+
// expect(containerStyle.width).toBe('22px');
|
|
25
|
+
// expect(containerStyle.padding).toBe('2px');
|
|
26
|
+
// });
|
|
27
|
+
|
|
28
|
+
// it('calls onClick', async () => {
|
|
29
|
+
// const handleOnClick = jest.fn();
|
|
30
|
+
// const user = userEvent.setup();
|
|
31
|
+
|
|
32
|
+
// const { container } = render(<CircleIcon onClick={handleOnClick} />);
|
|
33
|
+
|
|
34
|
+
// expect(handleOnClick).not.toBeCalled();
|
|
35
|
+
// await user.click(container.firstChild);
|
|
36
|
+
// expect(handleOnClick).toBeCalled();
|
|
37
|
+
// });
|
|
38
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import CourseCard from './CourseCard';
|
|
5
|
+
import { CourseCardProps } from '../../types';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Course Card',
|
|
9
|
+
component: CourseCard,
|
|
10
|
+
argTypes: {},
|
|
11
|
+
} as Meta<typeof CourseCard>;
|
|
12
|
+
|
|
13
|
+
const Template: Story<CourseCardProps> = args => <CourseCard {...args} />;
|
|
14
|
+
|
|
15
|
+
export const CourseCardTest = Template.bind({});
|
|
16
|
+
CourseCardTest.args = {
|
|
17
|
+
status: 'Enrolled',
|
|
18
|
+
title: 'MECH 1340 Digital Fundamentals and Programmable Logic Controllers',
|
|
19
|
+
semester: 'Fall 2022',
|
|
20
|
+
jobCount: 1,
|
|
21
|
+
achievementCount: 4,
|
|
22
|
+
skillCount: 9,
|
|
23
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CourseCardProps } from '../../types';
|
|
3
|
+
import CourseCardPlaceholder from '../../assets/images/lhplaceholder.png';
|
|
4
|
+
|
|
5
|
+
import MiniTrophyIcon from '../../assets/images/minitrophy.svg';
|
|
6
|
+
import MiniJobIcon from '../../assets/images/minijob.svg';
|
|
7
|
+
import MiniPuzzleIcon from '../../assets/images/minipuzzle.svg';
|
|
8
|
+
|
|
9
|
+
const TYPE_TO_COURSE_MINI_ICON: any = {
|
|
10
|
+
['job']: MiniJobIcon,
|
|
11
|
+
['achievement']: MiniTrophyIcon,
|
|
12
|
+
['skill']: MiniPuzzleIcon,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const TYPE_TO_COLOR: any = {
|
|
16
|
+
['job']: 'bg-emerald-700',
|
|
17
|
+
['achievement']: 'bg-spice-500',
|
|
18
|
+
['skill']: 'bg-indigo-500',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type CourseCardStatBubbleProps = {
|
|
22
|
+
count: number | string;
|
|
23
|
+
type: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const CourseCardStatBubble: React.FC<CourseCardStatBubbleProps> = ({
|
|
28
|
+
count = 0,
|
|
29
|
+
type = 'job',
|
|
30
|
+
className,
|
|
31
|
+
}) => {
|
|
32
|
+
const imgSrc = TYPE_TO_COURSE_MINI_ICON[type];
|
|
33
|
+
const bgColor = TYPE_TO_COLOR[type];
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
className={`course-card-stat-bubble px-[10px] rounded-[30px] flex ${bgColor} min-w-[48px] max-w-[80px] h-[30px] items-center ${className}`}
|
|
38
|
+
>
|
|
39
|
+
<img src={imgSrc} className="pr-[5px]" />
|
|
40
|
+
<span className="flex items-center text-sm text-white">{count}</span>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const CourseCard: React.FC<CourseCardProps> = ({
|
|
46
|
+
status = 'Enrolled',
|
|
47
|
+
title = 'MECH 1340 Digital Fundamentals and Programmable Logic Controllers',
|
|
48
|
+
semester = 'Fall 2022',
|
|
49
|
+
jobCount = 1,
|
|
50
|
+
achievementCount = 4,
|
|
51
|
+
thumbSrc,
|
|
52
|
+
hideHeader = false,
|
|
53
|
+
skillCount = 9,
|
|
54
|
+
className,
|
|
55
|
+
onClick = () => {},
|
|
56
|
+
}) => {
|
|
57
|
+
return (
|
|
58
|
+
<div
|
|
59
|
+
onClick={onClick}
|
|
60
|
+
className={`flex shadow-[0_0_8px_0px_rgba(0,0,0,0.2)] relative $ py-[10px] px-[15px] max-w-[400px] h-[130px] rounded-[20px] ${className}`}
|
|
61
|
+
>
|
|
62
|
+
<img
|
|
63
|
+
src={CourseCardPlaceholder}
|
|
64
|
+
className="course-card-img w-[100px] h-[111px] mr-[10px]"
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<div className="course-card-detail-info flex flex-col justify-between">
|
|
68
|
+
{!hideHeader && (
|
|
69
|
+
<div className="text-sm">
|
|
70
|
+
<span className="text-emerald-700 font-semibold">{status}</span>
|
|
71
|
+
<span className="spacer-dot mx-[3px]">•</span>
|
|
72
|
+
<span className="text-grayscale-500">{semester}</span>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
<p className="course-card-title text-sm font-semibold line-clamp-2">{title}</p>
|
|
76
|
+
<div className="course-card-counts-container flex items-center mt-[5px]">
|
|
77
|
+
<CourseCardStatBubble type={'job'} count={jobCount} className={'mr-[5px]'} />
|
|
78
|
+
<CourseCardStatBubble
|
|
79
|
+
type={'achievement'}
|
|
80
|
+
count={achievementCount}
|
|
81
|
+
className={'mr-[5px]'}
|
|
82
|
+
/>
|
|
83
|
+
<CourseCardStatBubble
|
|
84
|
+
type={'skill'}
|
|
85
|
+
count={skillCount}
|
|
86
|
+
className={'mr-[0px]'}
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default CourseCard;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import CourseVerticalCard from './CourseVerticalCard';
|
|
5
|
+
import { CourseCardVerticalProps } from '../../types';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Course Vertical Card',
|
|
9
|
+
component: CourseVerticalCard,
|
|
10
|
+
argTypes: {},
|
|
11
|
+
} as Meta<typeof CourseVerticalCard>;
|
|
12
|
+
|
|
13
|
+
const Template: Story<CourseCardVerticalProps> = args => <CourseVerticalCard {...args} />;
|
|
14
|
+
|
|
15
|
+
export const CourseVerticalCardTest = Template.bind({});
|
|
16
|
+
CourseVerticalCardTest.args = {
|
|
17
|
+
status: 'Enrolled',
|
|
18
|
+
title: 'MECH 1340 Digital Fundamentals and Programmable Logic Controllers',
|
|
19
|
+
semester: 'Fall 2022',
|
|
20
|
+
jobCount: 1,
|
|
21
|
+
achievementCount: 4,
|
|
22
|
+
showChecked: true,
|
|
23
|
+
showStatus: true,
|
|
24
|
+
onClick: () => {
|
|
25
|
+
console.log('//check button click');
|
|
26
|
+
},
|
|
27
|
+
onCheckClick: () => {
|
|
28
|
+
console.log('///onCircle Click');
|
|
29
|
+
},
|
|
30
|
+
skillCount: 9,
|
|
31
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CourseCardVerticalProps } from '../../types';
|
|
3
|
+
import { CircleCheckButton } from '../CircleCheckButton';
|
|
4
|
+
import CourseCardPlaceholder from '../../assets/images/lhplaceholder.png';
|
|
5
|
+
import { RoundedPill } from '../RoundedPill';
|
|
6
|
+
import MiniTrophyIcon from '../../assets/images/minitrophy.svg';
|
|
7
|
+
import MiniJobIcon from '../../assets/images/minijob.svg';
|
|
8
|
+
import MiniPuzzleIcon from '../../assets/images/minipuzzle.svg';
|
|
9
|
+
import { LCSubtypes } from '../../types';
|
|
10
|
+
|
|
11
|
+
const TYPE_TO_COURSE_MINI_ICON: any = {
|
|
12
|
+
['job']: MiniJobIcon,
|
|
13
|
+
['achievement']: MiniTrophyIcon,
|
|
14
|
+
['skill']: MiniPuzzleIcon,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const TYPE_TO_COLOR: any = {
|
|
18
|
+
['job']: 'bg-emerald-700',
|
|
19
|
+
['achievement']: 'bg-spice-500',
|
|
20
|
+
['skill']: 'bg-indigo-500',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type CourseCardStatBubbleProps = {
|
|
24
|
+
count: number | string;
|
|
25
|
+
type: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const CourseCardStatBubble: React.FC<CourseCardStatBubbleProps> = ({
|
|
30
|
+
count = 0,
|
|
31
|
+
type = LCSubtypes.job,
|
|
32
|
+
className,
|
|
33
|
+
}) => {
|
|
34
|
+
const imgSrc = TYPE_TO_COURSE_MINI_ICON[type];
|
|
35
|
+
const bgColor = TYPE_TO_COLOR[type];
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
className={`course-card-stat-bubble px-[10px] rounded-[30px] flex ${bgColor} min-w-[48px] max-w-[80px] h-[30px] items-center ${className}`}
|
|
40
|
+
>
|
|
41
|
+
<img src={imgSrc} className="pr-[5px]" />
|
|
42
|
+
<span className="flex items-center text-sm text-white">{count}</span>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const CourseVerticalCard: React.FC<CourseCardVerticalProps> = ({
|
|
48
|
+
className,
|
|
49
|
+
title,
|
|
50
|
+
thumbImgSrc,
|
|
51
|
+
showStatus,
|
|
52
|
+
claimStatus = false,
|
|
53
|
+
achievementCount = 0,
|
|
54
|
+
skillCount = 0,
|
|
55
|
+
checked,
|
|
56
|
+
showChecked,
|
|
57
|
+
showSubCount,
|
|
58
|
+
onCheckClick,
|
|
59
|
+
onClick,
|
|
60
|
+
}) => {
|
|
61
|
+
const claimBtnStatusType = claimStatus ? LCSubtypes.course : LCSubtypes.locked;
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div
|
|
65
|
+
onClick={onClick}
|
|
66
|
+
className={`flex flex-col shadow-[0_0_8px_0px_rgba(0,0,0,0.2)] relative $ py-[8px] px-[8px] w-[190px] h-[285px] rounded-[20px] ${className}`}
|
|
67
|
+
>
|
|
68
|
+
<section
|
|
69
|
+
className={`relative flex h-[120px] flex-col justify-center items-center w-full rounded-[20px]`}
|
|
70
|
+
>
|
|
71
|
+
<img
|
|
72
|
+
src={CourseCardPlaceholder}
|
|
73
|
+
className="course-card-img h-full w-full object-cover rounded-[20px]"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
{showChecked && (
|
|
77
|
+
<CircleCheckButton
|
|
78
|
+
checked={checked}
|
|
79
|
+
onClick={onCheckClick}
|
|
80
|
+
className="absolute top-[5px] left-[5px]"
|
|
81
|
+
/>
|
|
82
|
+
)}
|
|
83
|
+
</section>
|
|
84
|
+
|
|
85
|
+
<div className="course-card-detail-info flex flex-col justify-between">
|
|
86
|
+
<p className="course-card-title text-sm text-center font-semibold line-clamp-2 mt-[4px]">
|
|
87
|
+
{title}
|
|
88
|
+
</p>
|
|
89
|
+
{showSubCount && (
|
|
90
|
+
<div className="course-card-counts-container flex items-center justify-center my-[5px]">
|
|
91
|
+
<CourseCardStatBubble
|
|
92
|
+
type={'achievement'}
|
|
93
|
+
count={achievementCount}
|
|
94
|
+
className={'mr-[5px]'}
|
|
95
|
+
/>
|
|
96
|
+
<CourseCardStatBubble
|
|
97
|
+
type={'skill'}
|
|
98
|
+
count={skillCount}
|
|
99
|
+
className={'mr-[0px]'}
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
{showStatus && (
|
|
105
|
+
<div className="course-card-footer absolute bottom-[6px] left-[5px]">
|
|
106
|
+
<RoundedPill
|
|
107
|
+
onClick={onClick}
|
|
108
|
+
showCheckmark
|
|
109
|
+
type={claimBtnStatusType}
|
|
110
|
+
statusText={'Passed'}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default CourseVerticalCard;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
export type FlippyCardProps = {
|
|
4
|
+
children: React.ReactChild[];
|
|
5
|
+
flipState?: 'front' | 'back' | string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const FlippyCard: React.FC<FlippyCardProps> = ({ children, flipState = 'front' }) => {
|
|
9
|
+
if (children?.length > 3) {
|
|
10
|
+
console.warn('More than two children passed into Flippy Card! 😳😳😳 Picking first two...');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (!children) return <></>;
|
|
14
|
+
|
|
15
|
+
const frontCard = children?.[0] as React.ReactNode;
|
|
16
|
+
const backCard = (children?.[1] as React.ReactNode) || (children?.[0] as React.ReactNode);
|
|
17
|
+
|
|
18
|
+
const flipCardCSSClass = flipState === 'front' ? 'flippy-card' : 'flippy-card is-flipped';
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div data-testid="flippy-card-wrapper" className="flippy-wrapper-container">
|
|
22
|
+
<div data-testid="flippy-card" className={flipCardCSSClass}>
|
|
23
|
+
<section data-testid="flippy-card-front" className="card-face card-face--front">
|
|
24
|
+
{frontCard}
|
|
25
|
+
</section>
|
|
26
|
+
<section data-testid="flippy-card-back" className="card-face card-face--back">
|
|
27
|
+
{backCard}
|
|
28
|
+
</section>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default FlippyCard;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
import FlippyCard from '../FlippyCard';
|
|
7
|
+
|
|
8
|
+
describe('FlippyCard', () => {
|
|
9
|
+
it('should not render without children', () => {
|
|
10
|
+
render(<FlippyCard></FlippyCard>);
|
|
11
|
+
expect(screen.queryByTestId('flippy-card-wrapper')).not.toBe();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('should render the first and second child as the front and back face', async () => {
|
|
15
|
+
render(
|
|
16
|
+
<FlippyCard>
|
|
17
|
+
<div>Front Side</div>
|
|
18
|
+
<div>Back Side</div>
|
|
19
|
+
</FlippyCard>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
expect(screen.getByTestId('flippy-card-front')).toContainHTML('<div>Front Side</div>');
|
|
23
|
+
expect(screen.getByTestId('flippy-card-back')).toContainHTML('<div>Back Side</div>');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('should not render extra children components', async () => {
|
|
27
|
+
render(
|
|
28
|
+
<FlippyCard>
|
|
29
|
+
<div>Front Side</div>
|
|
30
|
+
<div>Back Side</div>
|
|
31
|
+
<div>Extra Child</div>
|
|
32
|
+
</FlippyCard>
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
expect(screen.getByTestId('flippy-card-front')).not.toContainHTML('<div>Extra Child</div>');
|
|
36
|
+
expect(screen.getByTestId('flippy-card-back')).not.toContainHTML('<div>Extra Child</div>');
|
|
37
|
+
expect(screen.getByTestId('flippy-card-wrapper')).not.toContainHTML(
|
|
38
|
+
'<div>Extra Child</div>'
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
import GenericCard from './GenericCard';
|
|
4
|
+
import { GenericCardProps, WalletCategoryTypes } from '../../types';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Generic Card',
|
|
8
|
+
component: GenericCard,
|
|
9
|
+
argTypes: {},
|
|
10
|
+
} as Meta<typeof GenericCard>;
|
|
11
|
+
|
|
12
|
+
const Template: Story<GenericCardProps> = args => <GenericCard {...args} />;
|
|
13
|
+
|
|
14
|
+
export const GenericCardTest = Template.bind({});
|
|
15
|
+
GenericCardTest.args = {
|
|
16
|
+
title: 'Title Title Title',
|
|
17
|
+
type: WalletCategoryTypes.skills,
|
|
18
|
+
thumbImgSrc: '',
|
|
19
|
+
onClick: () => {
|
|
20
|
+
console.log('//goodbye world');
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GenericCardProps, WalletCategoryTypes } from '../../types';
|
|
3
|
+
import { TYPE_TO_IMG_SRC, TYPE_TO_WALLET_DARK_COLOR } from '../../constants';
|
|
4
|
+
import { CircleCheckButton } from '../CircleCheckButton';
|
|
5
|
+
import BadgeThumbnailImg from '../BadgeThumbnailImg/BadgeThumbnailImg';
|
|
6
|
+
|
|
7
|
+
export const GenericCard: React.FC<GenericCardProps> = ({
|
|
8
|
+
title = 'Title Lorem Ipsum',
|
|
9
|
+
thumbImgSrc,
|
|
10
|
+
customThumbClass = '',
|
|
11
|
+
customHeaderClass = '',
|
|
12
|
+
type = WalletCategoryTypes.achievements,
|
|
13
|
+
className,
|
|
14
|
+
onClick = () => {},
|
|
15
|
+
showChecked,
|
|
16
|
+
checkStatus,
|
|
17
|
+
flipped,
|
|
18
|
+
}) => {
|
|
19
|
+
const thumbClass = TYPE_TO_WALLET_DARK_COLOR[type]
|
|
20
|
+
? `bg-${TYPE_TO_WALLET_DARK_COLOR[type]}`
|
|
21
|
+
: 'bg-grayscale-50';
|
|
22
|
+
const defaultThumbClass = `flex h-[110px] m-auto ${thumbClass} w-[140px] overflow-hidden flex-col justify-center items-center w-full rounded-[20px] ${customThumbClass}`;
|
|
23
|
+
const imgSrc = thumbImgSrc?.trim() !== '' ? thumbImgSrc : TYPE_TO_IMG_SRC[type];
|
|
24
|
+
const headerBgColor = TYPE_TO_WALLET_DARK_COLOR[type]
|
|
25
|
+
? `bg-${TYPE_TO_WALLET_DARK_COLOR[type]}`
|
|
26
|
+
: 'bg-grayscale-900';
|
|
27
|
+
const checkBtnClass = checkStatus ? 'generic-vc-card checked' : 'generic-vc-card unchecked';
|
|
28
|
+
const defaultHeaderClass = `flex generic-card-title w-full flex justify-center items-center h-[76px] ${headerBgColor} ${customHeaderClass}`;
|
|
29
|
+
const flippedClass = flipped ? 'flex-col-reverse' : 'flex-col';
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
onClick={onClick}
|
|
34
|
+
className={`flex generic-display-card-simple bg-white ${flippedClass} shadow-[0_0_8px_0px_rgba(0,0,0,0.2)] relative $ py-[0px] px-[0px] w-[160px] h-[215px] rounded-[20px] overflow-hidden ${className}`}
|
|
35
|
+
>
|
|
36
|
+
<section className={defaultHeaderClass}>
|
|
37
|
+
<p className="relative z-[100] text-[14px] px-[10px] py-[0px] font-bold mt-[10px] text-center text-white line-clamp-2">
|
|
38
|
+
{title}
|
|
39
|
+
</p>
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<section className={defaultThumbClass}>
|
|
43
|
+
{thumbImgSrc && thumbImgSrc?.trim() !== '' && (
|
|
44
|
+
<BadgeThumbnailImg
|
|
45
|
+
className="generic-display-card-img h-full w-full w-[140px] h-[119px] rounded-[20px] object-cover overflow-hidden"
|
|
46
|
+
src={thumbImgSrc ?? ''}
|
|
47
|
+
alt="Credential Achievement Image"
|
|
48
|
+
/>
|
|
49
|
+
)}
|
|
50
|
+
{(!thumbImgSrc || thumbImgSrc?.trim() === '') && (
|
|
51
|
+
<img
|
|
52
|
+
className="max-w-[130px] w-full h-full p-[10px] object-contain"
|
|
53
|
+
src={imgSrc}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
56
|
+
</section>
|
|
57
|
+
|
|
58
|
+
<section className="generic-card-footer"></section>
|
|
59
|
+
{showChecked && (
|
|
60
|
+
<div className="check-btn-overlay absolute top-[5px] left-[5px]">
|
|
61
|
+
<CircleCheckButton
|
|
62
|
+
checked={checkStatus}
|
|
63
|
+
onClick={onClick}
|
|
64
|
+
className={checkBtnClass}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default GenericCard;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
import JobHistoryCard from './JobHistoryCard';
|
|
4
|
+
import { JobHistoryCardProps } from '../../types';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Job History Card',
|
|
8
|
+
component: JobHistoryCard,
|
|
9
|
+
argTypes: {},
|
|
10
|
+
} as Meta<typeof JobHistoryCard>;
|
|
11
|
+
|
|
12
|
+
const Template: Story<JobHistoryCardProps> = args => <JobHistoryCard {...args} />;
|
|
13
|
+
|
|
14
|
+
export const JobHistoryCardTest = Template.bind({});
|
|
15
|
+
JobHistoryCardTest.args = {
|
|
16
|
+
className: 'job-history-card',
|
|
17
|
+
title: 'Title of Job',
|
|
18
|
+
company: 'Taco Bell',
|
|
19
|
+
jobType: 'Full-Time',
|
|
20
|
+
showArrow: false,
|
|
21
|
+
dateRange: 'JUL 2021 - JAN 2022',
|
|
22
|
+
description: 'Job description history lorum ipsum potato tomato wee',
|
|
23
|
+
onClick: () => {
|
|
24
|
+
console.log('clicked');
|
|
25
|
+
},
|
|
26
|
+
};
|