@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.
- package/dist/cjs/{CertificateDisplayCard-054609a1.js → CertificateDisplayCard-9ecac9b3.js} +45 -8
- package/dist/cjs/CertificateDisplayCard-9ecac9b3.js.map +1 -0
- package/dist/cjs/{VCCard-250f02a9.js → VCCard-709efb41.js} +2 -2
- package/dist/cjs/{VCCard-250f02a9.js.map → VCCard-709efb41.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-669eaefa.js → VCDisplayCard2-5114e7f7.js} +37 -31
- package/dist/cjs/VCDisplayCard2-5114e7f7.js.map +1 -0
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index13.js +3 -3
- package/dist/cjs/index36.js +3 -3
- package/dist/cjs/index39.js +2 -2
- package/dist/cjs/index6.js +1 -1
- package/dist/esm/{CertificateDisplayCard-2d4eb309.js → CertificateDisplayCard-d1488463.js} +45 -9
- package/dist/esm/CertificateDisplayCard-d1488463.js.map +1 -0
- package/dist/esm/{VCCard-a6f686c1.js → VCCard-163f1933.js} +2 -2
- package/dist/esm/{VCCard-a6f686c1.js.map → VCCard-163f1933.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-508c6d13.js → VCDisplayCard2-e46c580d.js} +35 -29
- package/dist/esm/VCDisplayCard2-e46c580d.js.map +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index13.js +3 -3
- package/dist/esm/index36.js +3 -3
- package/dist/esm/index39.js +2 -2
- package/dist/esm/index6.js +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/CertificateDisplayCard-054609a1.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-669eaefa.js.map +0 -1
- package/dist/esm/CertificateDisplayCard-2d4eb309.js.map +0 -1
- package/dist/esm/VCDisplayCard2-508c6d13.js.map +0 -1
|
@@ -153,6 +153,20 @@ const IssuerSeal = ({ className = "" }) => {
|
|
|
153
153
|
}));
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
+
const LeftArrow = ({ className = "", size = "20" }) => {
|
|
157
|
+
return /* @__PURE__ */ React__default["default"].createElement("svg", {
|
|
158
|
+
width: size,
|
|
159
|
+
height: size,
|
|
160
|
+
viewBox: "0 0 20 20",
|
|
161
|
+
fill: "none",
|
|
162
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
163
|
+
className
|
|
164
|
+
}, /* @__PURE__ */ React__default["default"].createElement("path", {
|
|
165
|
+
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",
|
|
166
|
+
fill: "currentColor"
|
|
167
|
+
}));
|
|
168
|
+
};
|
|
169
|
+
|
|
156
170
|
const Line = ({ className = "", width = "109" }) => {
|
|
157
171
|
return /* @__PURE__ */ React__default["default"].createElement("svg", {
|
|
158
172
|
width,
|
|
@@ -2732,7 +2746,9 @@ const CertificateBackFace = ({
|
|
|
2732
2746
|
getFileMetadata,
|
|
2733
2747
|
getVideoMetadata,
|
|
2734
2748
|
onMediaAttachmentClick,
|
|
2735
|
-
enableLightbox
|
|
2749
|
+
enableLightbox,
|
|
2750
|
+
showBackButton,
|
|
2751
|
+
handleViewFrontFace
|
|
2736
2752
|
}) => {
|
|
2737
2753
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2738
2754
|
const { createdAt, credentialSubject } = credential_helpers.getInfoFromCredential(credential, "MMM dd, yyyy", {
|
|
@@ -2750,7 +2766,15 @@ const CertificateBackFace = ({
|
|
|
2750
2766
|
}
|
|
2751
2767
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
2752
2768
|
className: `flex flex-col gap-[15px] items-center border-[5px] border-solid border-grayscale-200 py-[30px] px-[20px] rounded-[25px] ${bgColor}`
|
|
2753
|
-
}, /* @__PURE__ */ React__default["default"].createElement("
|
|
2769
|
+
}, showBackButton ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
2770
|
+
className: "w-full"
|
|
2771
|
+
}, /* @__PURE__ */ React__default["default"].createElement("button", {
|
|
2772
|
+
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",
|
|
2773
|
+
onClick: () => handleViewFrontFace == null ? void 0 : handleViewFrontFace()
|
|
2774
|
+
}, /* @__PURE__ */ React__default["default"].createElement(LeftArrow, {
|
|
2775
|
+
className: "text-white",
|
|
2776
|
+
size: "25"
|
|
2777
|
+
}), "Details")) : /* @__PURE__ */ React__default["default"].createElement("h1", {
|
|
2754
2778
|
className: "text-white text-center text-[22px] font-jacques"
|
|
2755
2779
|
}, "Details"), /* @__PURE__ */ React__default["default"].createElement(TruncateTextBox, {
|
|
2756
2780
|
headerText: "About",
|
|
@@ -2904,6 +2928,7 @@ const VERIFIER_STATES = {
|
|
|
2904
2928
|
untrustedVerifier: "Untrusted Verifier"
|
|
2905
2929
|
};
|
|
2906
2930
|
const CertificateFrontFace = ({
|
|
2931
|
+
isFront,
|
|
2907
2932
|
credential,
|
|
2908
2933
|
categoryType,
|
|
2909
2934
|
issuerOverride,
|
|
@@ -2913,7 +2938,8 @@ const CertificateFrontFace = ({
|
|
|
2913
2938
|
issuerImageComponent,
|
|
2914
2939
|
customBodyCardComponent,
|
|
2915
2940
|
hideIssueDate,
|
|
2916
|
-
handleViewBackFace
|
|
2941
|
+
handleViewBackFace,
|
|
2942
|
+
showDetailsBtn = false
|
|
2917
2943
|
}) => {
|
|
2918
2944
|
var _a, _b;
|
|
2919
2945
|
const {
|
|
@@ -3005,7 +3031,11 @@ const CertificateFrontFace = ({
|
|
|
3005
3031
|
}, description), /* @__PURE__ */ React__default["default"].createElement(VCDisplayCardSkillsCount, {
|
|
3006
3032
|
skills: (_b = credential == null ? void 0 : credential.skills) != null ? _b : [],
|
|
3007
3033
|
onClick: handleViewBackFace
|
|
3008
|
-
})
|
|
3034
|
+
}), isFront && showDetailsBtn && /* @__PURE__ */ React__default["default"].createElement("button", {
|
|
3035
|
+
type: "button",
|
|
3036
|
+
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",
|
|
3037
|
+
onClick: () => handleViewBackFace == null ? void 0 : handleViewBackFace()
|
|
3038
|
+
}, "Details")), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3009
3039
|
className: "flex flex-col gap-[5px] items-center w-full"
|
|
3010
3040
|
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
3011
3041
|
className: "font-jacques text-[12px] text-grayscale-800"
|
|
@@ -3061,7 +3091,9 @@ const CertificateDisplayCard = ({
|
|
|
3061
3091
|
onDotsClick,
|
|
3062
3092
|
isFrontOverride,
|
|
3063
3093
|
setIsFrontOverride,
|
|
3064
|
-
hideNavButtons
|
|
3094
|
+
hideNavButtons,
|
|
3095
|
+
showBackButton = false,
|
|
3096
|
+
showDetailsBtn = false
|
|
3065
3097
|
}) => {
|
|
3066
3098
|
const [_isFront, _setIsFront] = React.useState(isFrontOverride != null ? isFrontOverride : true);
|
|
3067
3099
|
const isFront = isFrontOverride != null ? isFrontOverride : _isFront;
|
|
@@ -3093,7 +3125,9 @@ const CertificateDisplayCard = ({
|
|
|
3093
3125
|
issuerImageComponent,
|
|
3094
3126
|
customBodyCardComponent,
|
|
3095
3127
|
hideIssueDate,
|
|
3096
|
-
handleViewBackFace: () => setIsFront(!isFront)
|
|
3128
|
+
handleViewBackFace: () => setIsFront(!isFront),
|
|
3129
|
+
isFront,
|
|
3130
|
+
showDetailsBtn
|
|
3097
3131
|
}), !isFront && /* @__PURE__ */ React__default["default"].createElement(CertificateBackFace, {
|
|
3098
3132
|
credential,
|
|
3099
3133
|
categoryType,
|
|
@@ -3101,7 +3135,9 @@ const CertificateDisplayCard = ({
|
|
|
3101
3135
|
getFileMetadata,
|
|
3102
3136
|
getVideoMetadata,
|
|
3103
3137
|
onMediaAttachmentClick,
|
|
3104
|
-
enableLightbox
|
|
3138
|
+
enableLightbox,
|
|
3139
|
+
showBackButton: showBackButton && !hideNavButtons || showDetailsBtn,
|
|
3140
|
+
handleViewFrontFace: () => setIsFront(!isFront)
|
|
3105
3141
|
}), onDotsClick && /* @__PURE__ */ React__default["default"].createElement("button", {
|
|
3106
3142
|
className: "absolute right-[-20px] top-[-52px] bg-white rounded-full p-[10px] shadow-bottom",
|
|
3107
3143
|
onClick: onDotsClick
|
|
@@ -3121,6 +3157,7 @@ exports.CertificateFrontFace = CertificateFrontFace;
|
|
|
3121
3157
|
exports.ExclamationPoint = ExclamationPoint;
|
|
3122
3158
|
exports.GenericDocumentIcon = GenericDocumentIcon;
|
|
3123
3159
|
exports.InfoIcon = InfoIcon;
|
|
3160
|
+
exports.LeftArrow = LeftArrow;
|
|
3124
3161
|
exports.LinkIcon = LinkIcon;
|
|
3125
3162
|
exports.PersonBadge = PersonBadge;
|
|
3126
3163
|
exports.RedFlag = RedFlag;
|
|
@@ -3135,4 +3172,4 @@ exports.capitalize = capitalize;
|
|
|
3135
3172
|
exports.getBaseUrl = getBaseUrl;
|
|
3136
3173
|
exports.prettyBytes = prettyBytes;
|
|
3137
3174
|
exports.truncateWithEllipsis = truncateWithEllipsis;
|
|
3138
|
-
//# sourceMappingURL=CertificateDisplayCard-
|
|
3175
|
+
//# sourceMappingURL=CertificateDisplayCard-9ecac9b3.js.map
|