@learncard/react 2.6.67 → 2.6.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/cjs/{CertificateDisplayCard-054609a1.js → CertificateDisplayCard-9ecac9b3.js} +45 -8
  2. package/dist/cjs/CertificateDisplayCard-9ecac9b3.js.map +1 -0
  3. package/dist/cjs/{VCCard-250f02a9.js → VCCard-709efb41.js} +2 -2
  4. package/dist/cjs/{VCCard-250f02a9.js.map → VCCard-709efb41.js.map} +1 -1
  5. package/dist/cjs/{VCDisplayCard2-669eaefa.js → VCDisplayCard2-5114e7f7.js} +37 -31
  6. package/dist/cjs/VCDisplayCard2-5114e7f7.js.map +1 -0
  7. package/dist/cjs/index.js +3 -3
  8. package/dist/cjs/index13.js +3 -3
  9. package/dist/cjs/index36.js +3 -3
  10. package/dist/cjs/index39.js +2 -2
  11. package/dist/cjs/index6.js +1 -1
  12. package/dist/esm/{CertificateDisplayCard-2d4eb309.js → CertificateDisplayCard-d1488463.js} +45 -9
  13. package/dist/esm/CertificateDisplayCard-d1488463.js.map +1 -0
  14. package/dist/esm/{VCCard-a6f686c1.js → VCCard-163f1933.js} +2 -2
  15. package/dist/esm/{VCCard-a6f686c1.js.map → VCCard-163f1933.js.map} +1 -1
  16. package/dist/esm/{VCDisplayCard2-508c6d13.js → VCDisplayCard2-e46c580d.js} +35 -29
  17. package/dist/esm/VCDisplayCard2-e46c580d.js.map +1 -0
  18. package/dist/esm/index.js +3 -3
  19. package/dist/esm/index13.js +3 -3
  20. package/dist/esm/index36.js +3 -3
  21. package/dist/esm/index39.js +2 -2
  22. package/dist/esm/index6.js +1 -1
  23. package/dist/index.d.ts +11 -0
  24. package/dist/main.css +1 -1
  25. package/dist/main.js +1 -1
  26. package/package.json +1 -1
  27. package/dist/cjs/CertificateDisplayCard-054609a1.js.map +0 -1
  28. package/dist/cjs/VCDisplayCard2-669eaefa.js.map +0 -1
  29. package/dist/esm/CertificateDisplayCard-2d4eb309.js.map +0 -1
  30. package/dist/esm/VCDisplayCard2-508c6d13.js.map +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('react');
6
6
  require('./CaretRightFilled.svg');
7
- var CertificateDisplayCard = require('./CertificateDisplayCard-054609a1.js');
7
+ var CertificateDisplayCard = require('./CertificateDisplayCard-9ecac9b3.js');
8
8
  require('./VCVerificationPill-0b0f6894.js');
9
9
  require('./icons-9878f84c.js');
10
10
  require('./index-503d0d98.js');
@@ -136,6 +136,20 @@ const IssuerSeal = ({ className = "" }) => {
136
136
  }));
137
137
  };
138
138
 
139
+ const LeftArrow = ({ className = "", size = "20" }) => {
140
+ return /* @__PURE__ */ React.createElement("svg", {
141
+ width: size,
142
+ height: size,
143
+ viewBox: "0 0 20 20",
144
+ fill: "none",
145
+ xmlns: "http://www.w3.org/2000/svg",
146
+ className
147
+ }, /* @__PURE__ */ React.createElement("path", {
148
+ d: "M8.93299 17.942L1.43299 10.442C1.31582 10.3247 1.25 10.1657 1.25 9.99999C1.25 9.83423 1.31582 9.67526 1.43299 9.55802L8.93299 2.05802C9.02041 1.97062 9.13178 1.91111 9.25301 1.887C9.37425 1.8629 9.49991 1.87528 9.61412 1.92258C9.72832 1.96989 9.82593 2.04999 9.89461 2.15277C9.96329 2.25554 9.99995 2.37638 9.99996 2.49999V5.62499H16.25C16.5814 5.62537 16.8991 5.75718 17.1334 5.99152C17.3678 6.22586 17.4996 6.54358 17.5 6.87499V13.125C17.4996 13.4564 17.3678 13.7741 17.1334 14.0085C16.8991 14.2428 16.5814 14.3746 16.25 14.375H9.99996V17.5C9.99995 17.6236 9.96329 17.7444 9.89461 17.8472C9.82593 17.95 9.72832 18.0301 9.61412 18.0774C9.49991 18.1247 9.37425 18.1371 9.25301 18.113C9.13178 18.0889 9.02041 18.0294 8.93299 17.942Z",
149
+ fill: "currentColor"
150
+ }));
151
+ };
152
+
139
153
  const Line = ({ className = "", width = "109" }) => {
140
154
  return /* @__PURE__ */ React.createElement("svg", {
141
155
  width,
@@ -2715,7 +2729,9 @@ const CertificateBackFace = ({
2715
2729
  getFileMetadata,
2716
2730
  getVideoMetadata,
2717
2731
  onMediaAttachmentClick,
2718
- enableLightbox
2732
+ enableLightbox,
2733
+ showBackButton,
2734
+ handleViewFrontFace
2719
2735
  }) => {
2720
2736
  var _a, _b, _c, _d, _e, _f, _g;
2721
2737
  const { createdAt, credentialSubject } = getInfoFromCredential(credential, "MMM dd, yyyy", {
@@ -2733,7 +2749,15 @@ const CertificateBackFace = ({
2733
2749
  }
2734
2750
  return /* @__PURE__ */ React.createElement("div", {
2735
2751
  className: `flex flex-col gap-[15px] items-center border-[5px] border-solid border-grayscale-200 py-[30px] px-[20px] rounded-[25px] ${bgColor}`
2736
- }, /* @__PURE__ */ React.createElement("h1", {
2752
+ }, showBackButton ? /* @__PURE__ */ React.createElement("div", {
2753
+ className: "w-full"
2754
+ }, /* @__PURE__ */ React.createElement("button", {
2755
+ className: "vc-card-back-button rounded-full h-[50px] px-[15px] flex items-center justify-center gap-[5px] z-50 text-[30px] text-white select-none",
2756
+ onClick: () => handleViewFrontFace == null ? void 0 : handleViewFrontFace()
2757
+ }, /* @__PURE__ */ React.createElement(LeftArrow, {
2758
+ className: "text-white",
2759
+ size: "25"
2760
+ }), "Details")) : /* @__PURE__ */ React.createElement("h1", {
2737
2761
  className: "text-white text-center text-[22px] font-jacques"
2738
2762
  }, "Details"), /* @__PURE__ */ React.createElement(TruncateTextBox, {
2739
2763
  headerText: "About",
@@ -2887,6 +2911,7 @@ const VERIFIER_STATES = {
2887
2911
  untrustedVerifier: "Untrusted Verifier"
2888
2912
  };
2889
2913
  const CertificateFrontFace = ({
2914
+ isFront,
2890
2915
  credential,
2891
2916
  categoryType,
2892
2917
  issuerOverride,
@@ -2896,7 +2921,8 @@ const CertificateFrontFace = ({
2896
2921
  issuerImageComponent,
2897
2922
  customBodyCardComponent,
2898
2923
  hideIssueDate,
2899
- handleViewBackFace
2924
+ handleViewBackFace,
2925
+ showDetailsBtn = false
2900
2926
  }) => {
2901
2927
  var _a, _b;
2902
2928
  const {
@@ -2988,7 +3014,11 @@ const CertificateFrontFace = ({
2988
3014
  }, description), /* @__PURE__ */ React.createElement(VCDisplayCardSkillsCount, {
2989
3015
  skills: (_b = credential == null ? void 0 : credential.skills) != null ? _b : [],
2990
3016
  onClick: handleViewBackFace
2991
- })), /* @__PURE__ */ React.createElement("div", {
3017
+ }), isFront && showDetailsBtn && /* @__PURE__ */ React.createElement("button", {
3018
+ type: "button",
3019
+ className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[25px] w-fit select-none",
3020
+ onClick: () => handleViewBackFace == null ? void 0 : handleViewBackFace()
3021
+ }, "Details")), /* @__PURE__ */ React.createElement("div", {
2992
3022
  className: "flex flex-col gap-[5px] items-center w-full"
2993
3023
  }, /* @__PURE__ */ React.createElement("span", {
2994
3024
  className: "font-jacques text-[12px] text-grayscale-800"
@@ -3044,7 +3074,9 @@ const CertificateDisplayCard = ({
3044
3074
  onDotsClick,
3045
3075
  isFrontOverride,
3046
3076
  setIsFrontOverride,
3047
- hideNavButtons
3077
+ hideNavButtons,
3078
+ showBackButton = false,
3079
+ showDetailsBtn = false
3048
3080
  }) => {
3049
3081
  const [_isFront, _setIsFront] = useState(isFrontOverride != null ? isFrontOverride : true);
3050
3082
  const isFront = isFrontOverride != null ? isFrontOverride : _isFront;
@@ -3076,7 +3108,9 @@ const CertificateDisplayCard = ({
3076
3108
  issuerImageComponent,
3077
3109
  customBodyCardComponent,
3078
3110
  hideIssueDate,
3079
- handleViewBackFace: () => setIsFront(!isFront)
3111
+ handleViewBackFace: () => setIsFront(!isFront),
3112
+ isFront,
3113
+ showDetailsBtn
3080
3114
  }), !isFront && /* @__PURE__ */ React.createElement(CertificateBackFace, {
3081
3115
  credential,
3082
3116
  categoryType,
@@ -3084,7 +3118,9 @@ const CertificateDisplayCard = ({
3084
3118
  getFileMetadata,
3085
3119
  getVideoMetadata,
3086
3120
  onMediaAttachmentClick,
3087
- enableLightbox
3121
+ enableLightbox,
3122
+ showBackButton: showBackButton && !hideNavButtons || showDetailsBtn,
3123
+ handleViewFrontFace: () => setIsFront(!isFront)
3088
3124
  }), onDotsClick && /* @__PURE__ */ React.createElement("button", {
3089
3125
  className: "absolute right-[-20px] top-[-52px] bg-white rounded-full p-[10px] shadow-bottom",
3090
3126
  onClick: onDotsClick
@@ -3095,5 +3131,5 @@ const CertificateDisplayCard = ({
3095
3131
  })));
3096
3132
  };
3097
3133
 
3098
- export { AcuteCheckmark as A, CertificateBackFace as C, ExclamationPoint as E, GenericDocumentIcon as G, InfoIcon as I, LinkIcon as L, PersonBadge as P, RedFlag as R, SelectedSkills as S, UnknownVerifierBadge as U, VCDisplayCardSkillsCount as V, X, CertificateDisplayCard as a, CertificateFrontFace as b, VideoIcon as c, Camera as d, capitalize as e, SkillsBox as f, getBaseUrl as g, AlignmentsBox as h, VerifiedBadge as i, prettyBytes as p, truncateWithEllipsis as t };
3099
- //# sourceMappingURL=CertificateDisplayCard-2d4eb309.js.map
3134
+ export { AcuteCheckmark as A, CertificateBackFace as C, ExclamationPoint as E, GenericDocumentIcon as G, InfoIcon as I, LinkIcon as L, PersonBadge as P, RedFlag as R, SelectedSkills as S, UnknownVerifierBadge as U, VCDisplayCardSkillsCount as V, X, CertificateDisplayCard as a, CertificateFrontFace as b, VideoIcon as c, Camera as d, capitalize as e, LeftArrow as f, getBaseUrl as g, SkillsBox as h, AlignmentsBox as i, VerifiedBadge as j, prettyBytes as p, truncateWithEllipsis as t };
3135
+ //# sourceMappingURL=CertificateDisplayCard-d1488463.js.map