@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,306 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import prettyBytes from 'pretty-bytes';
|
|
3
|
+
|
|
4
|
+
import Camera from '../svgs/Camera';
|
|
5
|
+
import LinkIcon from '../svgs/LinkIcon';
|
|
6
|
+
import VideoIcon from '../svgs/VideoIcon';
|
|
7
|
+
import GenericDocumentIcon from '../svgs/GenericDocumentIcon';
|
|
8
|
+
|
|
9
|
+
import { Attachment, MediaMetadata, VideoMetadata } from '../../types';
|
|
10
|
+
import { getBaseUrl } from '../../helpers/url.helpers';
|
|
11
|
+
import { Lightbox, LightboxItem } from '../Lightbox';
|
|
12
|
+
|
|
13
|
+
type MediaAttachmentsBoxProps = {
|
|
14
|
+
attachments: Attachment[];
|
|
15
|
+
getFileMetadata?: (url: string) => MediaMetadata;
|
|
16
|
+
getVideoMetadata?: (url: string) => VideoMetadata;
|
|
17
|
+
onMediaAttachmentClick?: (url: string, type: 'photo' | 'document' | 'video' | 'link') => void;
|
|
18
|
+
enableLightbox?: boolean;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const defaultGetFileMetadata = async (url: string) => {
|
|
22
|
+
const isFilestack = url.includes('filestack');
|
|
23
|
+
if (!isFilestack) return;
|
|
24
|
+
|
|
25
|
+
const urlParams = url.split('.com/')[1]?.split('/');
|
|
26
|
+
if (!urlParams) return;
|
|
27
|
+
const handle = urlParams[urlParams.length - 1];
|
|
28
|
+
|
|
29
|
+
let fetchFailed = false;
|
|
30
|
+
const data = await fetch(`https://cdn.filestackcontent.com/${handle}/metadata`)
|
|
31
|
+
.then(res => res.json())
|
|
32
|
+
.catch(() => (fetchFailed = true));
|
|
33
|
+
|
|
34
|
+
if (fetchFailed) return;
|
|
35
|
+
|
|
36
|
+
const fileExtension = data.filename.split('.')[1];
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
fileExtension,
|
|
40
|
+
sizeInBytes: data.size,
|
|
41
|
+
numberOfPages: undefined,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const defaultGetVideoMetadata = async (url: string) => {
|
|
46
|
+
const isYoutube = url.includes('youtube');
|
|
47
|
+
if (!isYoutube) return;
|
|
48
|
+
|
|
49
|
+
const metadataUrl = `http://youtube.com/oembed?url=${url}&format=json`;
|
|
50
|
+
|
|
51
|
+
let fetchFailed = false;
|
|
52
|
+
const metadata = await fetch(metadataUrl)
|
|
53
|
+
.then(res => res.json())
|
|
54
|
+
.catch(() => (fetchFailed = true));
|
|
55
|
+
|
|
56
|
+
if (fetchFailed) return;
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
title: metadata.title,
|
|
60
|
+
imageUrl: metadata.thumbnail_url,
|
|
61
|
+
videoLength: '', // TODO figure out how to get this
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const MediaAttachmentsBox: React.FC<MediaAttachmentsBoxProps> = ({
|
|
66
|
+
attachments,
|
|
67
|
+
getFileMetadata = defaultGetFileMetadata,
|
|
68
|
+
getVideoMetadata = defaultGetVideoMetadata,
|
|
69
|
+
onMediaAttachmentClick,
|
|
70
|
+
enableLightbox = false,
|
|
71
|
+
}) => {
|
|
72
|
+
const [documentMetadata, setDocumentMetadata] = useState<{
|
|
73
|
+
[documentUrl: string]: MediaMetadata | undefined;
|
|
74
|
+
}>({});
|
|
75
|
+
const [videoMetadata, setVideoMetadata] = useState<{
|
|
76
|
+
[videoUrl: string]: VideoMetadata | undefined;
|
|
77
|
+
}>({});
|
|
78
|
+
|
|
79
|
+
const mediaAttachments: Attachment[] = [];
|
|
80
|
+
const documentsAndLinks: Attachment[] = [];
|
|
81
|
+
attachments.forEach(a => {
|
|
82
|
+
switch (a.type) {
|
|
83
|
+
case 'document':
|
|
84
|
+
case 'link':
|
|
85
|
+
documentsAndLinks.push(a);
|
|
86
|
+
break;
|
|
87
|
+
case 'photo':
|
|
88
|
+
case 'video':
|
|
89
|
+
mediaAttachments.push(a);
|
|
90
|
+
break;
|
|
91
|
+
default:
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const getMetadata = async (attachments: Attachment[]): Promise<any> => {
|
|
98
|
+
const docMetadata: { [docUrl: string]: MediaMetadata | undefined } = {};
|
|
99
|
+
const videoMetadata: { [videoUrl: string]: VideoMetadata | undefined } = {};
|
|
100
|
+
await Promise.all(
|
|
101
|
+
attachments.map(async attachment => {
|
|
102
|
+
if (attachment.type === 'document') {
|
|
103
|
+
docMetadata[attachment.url] = await getFileMetadata(attachment.url);
|
|
104
|
+
} else if (attachment.type === 'video') {
|
|
105
|
+
videoMetadata[attachment.url] = await getVideoMetadata(attachment.url);
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
setVideoMetadata(videoMetadata);
|
|
111
|
+
setDocumentMetadata(docMetadata);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const videos = attachments.filter(a => a.type === 'video');
|
|
115
|
+
getMetadata([...documentsAndLinks, ...videos]);
|
|
116
|
+
}, []);
|
|
117
|
+
|
|
118
|
+
const [currentLightboxUrl, setCurrentLightboxUrl] = useState<string | undefined>(undefined);
|
|
119
|
+
const lightboxItems = mediaAttachments.filter(
|
|
120
|
+
a => a.type === 'photo' || a.type === 'video'
|
|
121
|
+
) as LightboxItem[];
|
|
122
|
+
const handleMediaAttachmentClick = (
|
|
123
|
+
url: string,
|
|
124
|
+
type: 'photo' | 'document' | 'video' | 'link'
|
|
125
|
+
) => {
|
|
126
|
+
if (type === 'photo' || type === 'video') {
|
|
127
|
+
setCurrentLightboxUrl(url);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
onMediaAttachmentClick?.(url, type);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<div className="media-attachments-box bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full">
|
|
135
|
+
<h3 className="text-[20px] leading-[20px] text-grayscale-900">Media Attachments</h3>
|
|
136
|
+
{mediaAttachments.length > 0 && (
|
|
137
|
+
<div className="flex gap-[5px] justify-between flex-wrap w-full">
|
|
138
|
+
{enableLightbox && (
|
|
139
|
+
<Lightbox
|
|
140
|
+
items={lightboxItems}
|
|
141
|
+
currentUrl={currentLightboxUrl}
|
|
142
|
+
setCurrentUrl={setCurrentLightboxUrl}
|
|
143
|
+
/>
|
|
144
|
+
)}
|
|
145
|
+
{mediaAttachments.map((media, index) => {
|
|
146
|
+
let innerContent: React.ReactNode;
|
|
147
|
+
let title = media.title;
|
|
148
|
+
|
|
149
|
+
if (media.type === 'video') {
|
|
150
|
+
const metadata = videoMetadata[media.url];
|
|
151
|
+
title = (title || metadata?.title) ?? '';
|
|
152
|
+
const baseUrl = getBaseUrl(media.url);
|
|
153
|
+
const iconTop = title || baseUrl;
|
|
154
|
+
|
|
155
|
+
innerContent = (
|
|
156
|
+
<div
|
|
157
|
+
className="absolute top-0 left-0 right-0 bottom-0 bg-cover bg-no-repeat font-poppins text-white text-[12px] font-[400] leading-[17px] flex flex-col justify-end items-start p-[10px] text-left bg-rose-600 rounded-[15px]"
|
|
158
|
+
style={{
|
|
159
|
+
backgroundImage: metadata?.imageUrl
|
|
160
|
+
? `linear-gradient(180deg, rgba(0, 0, 0, 0) 44.20%, rgba(0, 0, 0, 0.6) 69%), url(${metadata?.imageUrl ?? ''
|
|
161
|
+
})`
|
|
162
|
+
: undefined,
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
{!metadata?.imageUrl && (
|
|
166
|
+
<VideoIcon size="60" className="m-auto" />
|
|
167
|
+
)}
|
|
168
|
+
<div
|
|
169
|
+
className={`absolute ${iconTop ? 'top-[10px]' : 'bottom-[10px]'
|
|
170
|
+
} left-[10px] z-10 flex items-center gap-[5px]`}
|
|
171
|
+
>
|
|
172
|
+
{metadata?.imageUrl && <VideoIcon />}
|
|
173
|
+
{metadata?.videoLength && (
|
|
174
|
+
<span className="leading-[23px]">
|
|
175
|
+
{metadata.videoLength}
|
|
176
|
+
</span>
|
|
177
|
+
)}
|
|
178
|
+
</div>
|
|
179
|
+
{baseUrl && <span className="font-[600]">{baseUrl}</span>}
|
|
180
|
+
{title && <span className="line-clamp-2">{title}</span>}
|
|
181
|
+
</div>
|
|
182
|
+
);
|
|
183
|
+
} else {
|
|
184
|
+
innerContent = (
|
|
185
|
+
<div className="absolute top-0 left-0 right-0 bottom-0 h-full w-full flex items-center justify-center">
|
|
186
|
+
<img className="rounded-[15px] object-cover h-full w-full" src={media.url} />
|
|
187
|
+
<Camera className="absolute bottom-[10px] left-[10px] z-10" />
|
|
188
|
+
</div>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const className = `media-attachment ${media.type} w-[49%] pt-[49%] overflow-hidden relative`;
|
|
193
|
+
|
|
194
|
+
if (onMediaAttachmentClick || enableLightbox) {
|
|
195
|
+
return (
|
|
196
|
+
<button
|
|
197
|
+
key={index}
|
|
198
|
+
className={className}
|
|
199
|
+
onClick={e => {
|
|
200
|
+
e.stopPropagation();
|
|
201
|
+
handleMediaAttachmentClick(media.url, media.type);
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
{innerContent}
|
|
205
|
+
</button>
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return (
|
|
210
|
+
<div key={index} className={className}>
|
|
211
|
+
{innerContent}
|
|
212
|
+
</div>
|
|
213
|
+
);
|
|
214
|
+
})}
|
|
215
|
+
</div>
|
|
216
|
+
)}
|
|
217
|
+
{documentsAndLinks.length > 0 && (
|
|
218
|
+
<div className="w-full flex flex-col gap-[5px]">
|
|
219
|
+
{documentsAndLinks.map((docOrLink, index) => {
|
|
220
|
+
const metadata =
|
|
221
|
+
docOrLink.type === 'document'
|
|
222
|
+
? documentMetadata[docOrLink.url]
|
|
223
|
+
: undefined;
|
|
224
|
+
const { fileExtension, sizeInBytes, numberOfPages } = metadata ?? {};
|
|
225
|
+
|
|
226
|
+
let baseUrl = '';
|
|
227
|
+
if (docOrLink.type === 'link') {
|
|
228
|
+
baseUrl = getBaseUrl(docOrLink.url);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const innerContent = (
|
|
232
|
+
<div className="flex flex-col gap-[5px]">
|
|
233
|
+
<div className="flex gap-[5px] items-center">
|
|
234
|
+
{docOrLink.type === 'document' && (
|
|
235
|
+
<GenericDocumentIcon className="shrink-0" />
|
|
236
|
+
)}
|
|
237
|
+
{docOrLink.type === 'link' && <LinkIcon className="shrink-0" />}
|
|
238
|
+
<span className="text-grayscale-900 font-[400]">
|
|
239
|
+
{docOrLink.title ?? 'No title'}
|
|
240
|
+
</span>
|
|
241
|
+
</div>
|
|
242
|
+
{docOrLink.type === 'document' && metadata && (
|
|
243
|
+
<a
|
|
244
|
+
href={docOrLink.url}
|
|
245
|
+
target="_blank"
|
|
246
|
+
rel="noreferrer"
|
|
247
|
+
className="text-grayscale-600 font-[600] px-[5px] hover:underline"
|
|
248
|
+
onClick={e => e.stopPropagation()}
|
|
249
|
+
>
|
|
250
|
+
{fileExtension && (
|
|
251
|
+
<span className="uppercase">{fileExtension}</span>
|
|
252
|
+
)}
|
|
253
|
+
{fileExtension && (numberOfPages || sizeInBytes) && ' • '}
|
|
254
|
+
{numberOfPages && (
|
|
255
|
+
<span>
|
|
256
|
+
{numberOfPages} page{numberOfPages === 1 ? '' : 's'}
|
|
257
|
+
</span>
|
|
258
|
+
)}
|
|
259
|
+
{numberOfPages && sizeInBytes && ' • '}
|
|
260
|
+
{sizeInBytes && <span>{prettyBytes(sizeInBytes)}</span>}
|
|
261
|
+
</a>
|
|
262
|
+
)}
|
|
263
|
+
{docOrLink.type === 'link' && (
|
|
264
|
+
<a
|
|
265
|
+
href={docOrLink.url}
|
|
266
|
+
target="_blank"
|
|
267
|
+
rel="noreferrer"
|
|
268
|
+
className="text-indigo-500 font-[600] px-[5px] hover:underline"
|
|
269
|
+
onClick={e => e.stopPropagation()}
|
|
270
|
+
>
|
|
271
|
+
{baseUrl}
|
|
272
|
+
</a>
|
|
273
|
+
)}
|
|
274
|
+
</div>
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
const className = `row-attachment ${docOrLink.type} bg-grayscale-100 rounded-[15px] p-[10px] w-full font-poppins text-[12px] leading-[18px] tracking-[-0.33px] text-left`;
|
|
278
|
+
|
|
279
|
+
if (onMediaAttachmentClick) {
|
|
280
|
+
return (
|
|
281
|
+
<button
|
|
282
|
+
key={index}
|
|
283
|
+
className={className}
|
|
284
|
+
onClick={e => {
|
|
285
|
+
e.stopPropagation();
|
|
286
|
+
handleMediaAttachmentClick(docOrLink.url, docOrLink.type);
|
|
287
|
+
}}
|
|
288
|
+
>
|
|
289
|
+
{innerContent}
|
|
290
|
+
</button>
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return (
|
|
295
|
+
<div key={index} className={className}>
|
|
296
|
+
{innerContent}
|
|
297
|
+
</div>
|
|
298
|
+
);
|
|
299
|
+
})}
|
|
300
|
+
</div>
|
|
301
|
+
)}
|
|
302
|
+
</div>
|
|
303
|
+
);
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export default MediaAttachmentsBox;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const RibbonEnd: React.FC<{ side: 'left' | 'right'; className?: string; height?: string }> = ({
|
|
4
|
+
side,
|
|
5
|
+
className = '',
|
|
6
|
+
height = '64',
|
|
7
|
+
}) => {
|
|
8
|
+
const halfHeight = parseInt(height) / 2;
|
|
9
|
+
return (
|
|
10
|
+
<svg
|
|
11
|
+
className={className}
|
|
12
|
+
width="30"
|
|
13
|
+
height={height}
|
|
14
|
+
viewBox={`0 0 30 ${height}`}
|
|
15
|
+
fill="none"
|
|
16
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
+
style={{ transform: `scaleX(${side === 'left' ? '1' : '-1'})` }}
|
|
18
|
+
>
|
|
19
|
+
<g filter="url(#filter0_d_4620_22659)">
|
|
20
|
+
<path d={`M0 0H30V${height}H0L6.36364 ${halfHeight}L0 0Z`} fill="white" />
|
|
21
|
+
<path
|
|
22
|
+
d={`M3.08593 2.5H27.5V${height}H3.08593L8.80922 ${halfHeight}L8.91926 30L8.80922 29.4812L3.08593 2.5Z`}
|
|
23
|
+
stroke="#EEF2FF"
|
|
24
|
+
strokeWidth="5"
|
|
25
|
+
/>
|
|
26
|
+
</g>
|
|
27
|
+
<defs>
|
|
28
|
+
<filter
|
|
29
|
+
id="filter0_d_4620_22659"
|
|
30
|
+
x="0"
|
|
31
|
+
y="0"
|
|
32
|
+
width="30"
|
|
33
|
+
height={height}
|
|
34
|
+
filterUnits="userSpaceOnUse"
|
|
35
|
+
colorInterpolationFilters="sRGB"
|
|
36
|
+
>
|
|
37
|
+
<feFlood floodOpacity="0" result="BackgroundImageFix" />
|
|
38
|
+
<feColorMatrix
|
|
39
|
+
in="SourceAlpha"
|
|
40
|
+
type="matrix"
|
|
41
|
+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
42
|
+
result="hardAlpha"
|
|
43
|
+
/>
|
|
44
|
+
<feOffset dy="4" />
|
|
45
|
+
<feComposite in2="hardAlpha" operator="out" />
|
|
46
|
+
<feColorMatrix
|
|
47
|
+
type="matrix"
|
|
48
|
+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"
|
|
49
|
+
/>
|
|
50
|
+
<feBlend
|
|
51
|
+
mode="normal"
|
|
52
|
+
in2="BackgroundImageFix"
|
|
53
|
+
result="effect1_dropShadow_4620_22659"
|
|
54
|
+
/>
|
|
55
|
+
<feBlend
|
|
56
|
+
mode="normal"
|
|
57
|
+
in="SourceGraphic"
|
|
58
|
+
in2="effect1_dropShadow_4620_22659"
|
|
59
|
+
result="shape"
|
|
60
|
+
/>
|
|
61
|
+
</filter>
|
|
62
|
+
</defs>
|
|
63
|
+
</svg>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default RibbonEnd;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import TopLevelSkill from './TopLevelSkill';
|
|
4
|
+
import Subskill from './Subskill';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
boostCMSSKillCategories,
|
|
8
|
+
BoostCMSSKillsCategoryEnum,
|
|
9
|
+
BoostCMSCategorySkillEnum,
|
|
10
|
+
BoostCMSSubSkillEnum,
|
|
11
|
+
CATEGORY_TO_SKILLS,
|
|
12
|
+
SKILLS_TO_SUBSKILLS,
|
|
13
|
+
} from '../../constants/skills';
|
|
14
|
+
|
|
15
|
+
export const SelectedSkills: React.FC<{
|
|
16
|
+
skill: {
|
|
17
|
+
id: number;
|
|
18
|
+
title: string;
|
|
19
|
+
IconComponent: React.ReactNode | string;
|
|
20
|
+
iconClassName: string;
|
|
21
|
+
iconCircleClass: string;
|
|
22
|
+
category: BoostCMSSKillsCategoryEnum | string;
|
|
23
|
+
type: BoostCMSCategorySkillEnum | string;
|
|
24
|
+
};
|
|
25
|
+
skillSelected: {
|
|
26
|
+
category: BoostCMSSKillsCategoryEnum | string;
|
|
27
|
+
skill: BoostCMSCategorySkillEnum | string;
|
|
28
|
+
subskills: BoostCMSSubSkillEnum[] | string[];
|
|
29
|
+
};
|
|
30
|
+
}> = ({ skill, skillSelected }) => {
|
|
31
|
+
const [expandSubSkills, setExandSubSkills] = useState<boolean>(false);
|
|
32
|
+
|
|
33
|
+
const handleExpandSubSkills = () => setExandSubSkills(!expandSubSkills);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<>
|
|
37
|
+
<TopLevelSkill
|
|
38
|
+
skill={skill}
|
|
39
|
+
skillSelected={skillSelected}
|
|
40
|
+
handleExpandSubSkills={handleExpandSubSkills}
|
|
41
|
+
/>
|
|
42
|
+
{skillSelected && skillSelected.subskills.length > 0 && expandSubSkills && (
|
|
43
|
+
<div className="w-full flex items-center justify-end">
|
|
44
|
+
<div className="w-[95%] flex items-center flex-col">
|
|
45
|
+
{skillSelected.subskills.map((subSkill, i) => {
|
|
46
|
+
const subskillSelected = skillSelected?.subskills?.includes(
|
|
47
|
+
subSkill as BoostCMSSubSkillEnum
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const _subSkill: any = SKILLS_TO_SUBSKILLS[
|
|
51
|
+
skill.type as BoostCMSCategorySkillEnum
|
|
52
|
+
]?.find((ss: any) => ss.type === subSkill);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Subskill
|
|
56
|
+
key={i}
|
|
57
|
+
skill={skill}
|
|
58
|
+
subSkill={_subSkill}
|
|
59
|
+
subskillSelected={subskillSelected}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
})}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
)}
|
|
66
|
+
</>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default SelectedSkills;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
boostCMSSKillCategories,
|
|
5
|
+
BoostCMSSKillsCategoryEnum,
|
|
6
|
+
CATEGORY_TO_SKILLS,
|
|
7
|
+
SKILLS_TO_SUBSKILLS,
|
|
8
|
+
} from '../../constants/skills';
|
|
9
|
+
|
|
10
|
+
import SelectedSkills from './SelectedSkills';
|
|
11
|
+
import PuzzlePiece from '../svgs/PuzzlePiece';
|
|
12
|
+
|
|
13
|
+
const SkillsBox: React.FC<{
|
|
14
|
+
skills: { category: string; skill: string; subSkills: string[] }[];
|
|
15
|
+
}> = ({ skills }) => {
|
|
16
|
+
return (
|
|
17
|
+
<div className="bg-white flex flex-col items-start gap-[10px] rounded-[20px] shadow-bottom px-[15px] py-[20px] w-full relative">
|
|
18
|
+
<div className="flex items-center justify-start">
|
|
19
|
+
<div className="bg-violet-500 rounded-full flex items-center justify-center h-[30px] w-[30px] p-1">
|
|
20
|
+
<PuzzlePiece className="text-white" fill="#fff" />
|
|
21
|
+
</div>{' '}
|
|
22
|
+
<h3 className="text-[20px] leading-[20px] text-grayscale-900 ml-2">Skills</h3>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
{skills.length > 0 && (
|
|
26
|
+
<div className="pt-0 pb-4 flex items-center justify-center flex-col w-full">
|
|
27
|
+
{skills.map((_skill, index) => {
|
|
28
|
+
const category = boostCMSSKillCategories.find(
|
|
29
|
+
c => c.type === _skill.category
|
|
30
|
+
);
|
|
31
|
+
const skill: any = CATEGORY_TO_SKILLS[
|
|
32
|
+
_skill.category as BoostCMSSKillsCategoryEnum
|
|
33
|
+
].find(s => s.type === _skill.skill);
|
|
34
|
+
const subSkills = SKILLS_TO_SUBSKILLS[_skill.skill];
|
|
35
|
+
|
|
36
|
+
const selectedSkills = skills ?? [];
|
|
37
|
+
const skillSelected: any = selectedSkills.find(s => s.skill === skill.type);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<SelectedSkills
|
|
41
|
+
key={index}
|
|
42
|
+
skill={skill}
|
|
43
|
+
skillSelected={skillSelected}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
})}
|
|
47
|
+
</div>
|
|
48
|
+
)}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default SkillsBox;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
BoostCMSCategorySkillEnum,
|
|
5
|
+
boostCMSSKillCategories,
|
|
6
|
+
BoostCMSSKillsCategoryEnum,
|
|
7
|
+
BoostCMSSubSkillEnum,
|
|
8
|
+
} from '../../constants/skills';
|
|
9
|
+
|
|
10
|
+
const Subskill: React.FC<{
|
|
11
|
+
skill: {
|
|
12
|
+
id: number;
|
|
13
|
+
title: string;
|
|
14
|
+
IconComponent: React.ReactNode | string;
|
|
15
|
+
iconClassName: string;
|
|
16
|
+
iconCircleClass: string;
|
|
17
|
+
category: BoostCMSSKillsCategoryEnum | string;
|
|
18
|
+
type: BoostCMSCategorySkillEnum | string;
|
|
19
|
+
};
|
|
20
|
+
subSkill: {
|
|
21
|
+
id: number;
|
|
22
|
+
title: string;
|
|
23
|
+
type: BoostCMSSubSkillEnum | string;
|
|
24
|
+
};
|
|
25
|
+
subskillSelected: boolean;
|
|
26
|
+
}> = ({ subskillSelected, skill, subSkill }) => {
|
|
27
|
+
const { title, IconComponent, type, category } = skill;
|
|
28
|
+
|
|
29
|
+
const _category = boostCMSSKillCategories.find(c => c.type === category);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex items-center justify-between w-full mb-4 bg-violet-100 rounded-[20px]">
|
|
33
|
+
<div className="flex items-center justify-start w-[90%] px-[6px] py-[10px] overflow-hidden">
|
|
34
|
+
<div className="rounded-full h-[50px] w-[50px]">
|
|
35
|
+
<img src={IconComponent as string} alt="skill icon" className="w-full h-full" />
|
|
36
|
+
</div>
|
|
37
|
+
<div className="flex flex-col items-start justify-center ml-2">
|
|
38
|
+
<p className="font-poppins text-left text-violet-800 font-semibold text-xs">
|
|
39
|
+
{_category?.title} / {skill?.title}
|
|
40
|
+
</p>
|
|
41
|
+
<p className="text-black font-poppins text-left text-base font-normal">
|
|
42
|
+
{subSkill?.title}
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default Subskill;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
BoostCMSCategorySkillEnum,
|
|
5
|
+
boostCMSSKillCategories,
|
|
6
|
+
BoostCMSSKillsCategoryEnum,
|
|
7
|
+
BoostCMSSubSkillEnum,
|
|
8
|
+
} from '../../constants/skills';
|
|
9
|
+
|
|
10
|
+
const TopLevelSkill: React.FC<{
|
|
11
|
+
skill: {
|
|
12
|
+
id: number;
|
|
13
|
+
title: string;
|
|
14
|
+
IconComponent: React.ReactNode | string;
|
|
15
|
+
iconClassName: string;
|
|
16
|
+
iconCircleClass: string;
|
|
17
|
+
category: BoostCMSSKillsCategoryEnum | string;
|
|
18
|
+
type: BoostCMSCategorySkillEnum | string;
|
|
19
|
+
};
|
|
20
|
+
skillSelected: {
|
|
21
|
+
category: BoostCMSSKillsCategoryEnum | string;
|
|
22
|
+
skill: BoostCMSCategorySkillEnum | string;
|
|
23
|
+
subskills: BoostCMSSubSkillEnum[] | string[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
handleExpandSubSkills?: () => void;
|
|
27
|
+
}> = ({ skillSelected, skill, handleExpandSubSkills }) => {
|
|
28
|
+
const { title, IconComponent, type, category } = skill;
|
|
29
|
+
|
|
30
|
+
const _category = boostCMSSKillCategories.find(c => c.type === category);
|
|
31
|
+
|
|
32
|
+
const subSkills = skillSelected.subskills ?? [];
|
|
33
|
+
const subSkillsCount = skillSelected.subskills.length ?? 0;
|
|
34
|
+
const isClickable = subSkills?.length > 0;
|
|
35
|
+
return (
|
|
36
|
+
<button
|
|
37
|
+
onClick={isClickable ? handleExpandSubSkills : undefined}
|
|
38
|
+
disabled={!isClickable}
|
|
39
|
+
className={`flex items-center justify-between w-full mb-4 bg-violet-100 rounded-[20px]`}
|
|
40
|
+
>
|
|
41
|
+
<div className="flex items-center justify-start w-[80%] px-[6px] py-[10px] overflow-hidden">
|
|
42
|
+
<div className="rounded-full h-[50px] w-[50px]">
|
|
43
|
+
<img src={IconComponent as string} alt="skill icon" className="w-full h-full" />
|
|
44
|
+
</div>
|
|
45
|
+
<div className="flex flex-col items-start justify-center ml-2">
|
|
46
|
+
<p className="font-poppins text-left text-violet-800 font-semibold text-xs">
|
|
47
|
+
{_category?.title}
|
|
48
|
+
</p>
|
|
49
|
+
<p className="text-black font-poppins text-left text-xs font-normal">{title}</p>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
{subSkills?.length > 0 && (
|
|
53
|
+
<div className="flex items-center justify-center rounded-full bg-white mr-4 h-[40px] w-[40px]">
|
|
54
|
+
<div className="text-black font-bold flex items-center justify-center text-center font-poppins">
|
|
55
|
+
+{subSkillsCount}
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
</button>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default TopLevelSkill;
|