@learncard/react 2.3.47 → 2.3.48

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/index.js CHANGED
@@ -21,7 +21,7 @@ var Notification = require('./Notification-10b40c07.js');
21
21
  var QRCodeCard = require('./QRCodeCard-efaa58e1.js');
22
22
  var RoundedPill = require('./RoundedPill-15c0aca9.js');
23
23
  var constants = require('./constants-678d0aa9.js');
24
- var SchoolIDCard = require('./SchoolIDCard-32a47ae5.js');
24
+ var SchoolIDCard = require('./SchoolIDCard-1baf77e8.js');
25
25
  var SkillTabCard = require('./SkillTabCard-82f2fae0.js');
26
26
  var SkillVerticalCard = require('./SkillVerticalCard-3eb3a8e9.js');
27
27
  var SkillsCard = require('./SkillsCard-4b6dbb4f.js');
@@ -21,7 +21,7 @@ var Notification = require('./Notification-10b40c07.js');
21
21
  var QRCodeCard = require('./QRCodeCard-efaa58e1.js');
22
22
  var RoundedPill = require('./RoundedPill-15c0aca9.js');
23
23
  var constants = require('./constants-678d0aa9.js');
24
- var SchoolIDCard = require('./SchoolIDCard-32a47ae5.js');
24
+ var SchoolIDCard = require('./SchoolIDCard-1baf77e8.js');
25
25
  var SkillTabCard = require('./SkillTabCard-82f2fae0.js');
26
26
  var SkillVerticalCard = require('./SkillVerticalCard-3eb3a8e9.js');
27
27
  var SkillsCard = require('./SkillsCard-4b6dbb4f.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var SchoolIDCard = require('./SchoolIDCard-32a47ae5.js');
5
+ var SchoolIDCard = require('./SchoolIDCard-1baf77e8.js');
6
6
  require('react');
7
7
 
8
8
 
@@ -4666,6 +4666,9 @@ const SchoolIDCard = ({
4666
4666
  userName,
4667
4667
  text = null,
4668
4668
  extraText,
4669
+ subjectInitials,
4670
+ subjectInitialsClass,
4671
+ showBarcode = true,
4669
4672
  backgroundImage,
4670
4673
  className,
4671
4674
  containerClassName
@@ -4678,6 +4681,18 @@ const SchoolIDCard = ({
4678
4681
  } else {
4679
4682
  textEl = text;
4680
4683
  }
4684
+ let issueeImageEl = null;
4685
+ const initialsClass = `subject-initials h-[70px] w-[70px] rounded-full mr-[10px] flex flex-row items-center justify-center h-full w-full overflow-hidden bg-emerald-700 text-white font-medium text-3xl ${subjectInitialsClass}`;
4686
+ if (userImage && (userImage == null ? void 0 : userImage.trim()) !== "") {
4687
+ issueeImageEl = /* @__PURE__ */ React.createElement("div", {
4688
+ className: "h-[80px] w-[80px] rounded-full overflow-hidden bg-no-repeat bg-cover bg-center border-solid border-[2px] border-white mr-2",
4689
+ style: { backgroundImage: `url(${userImage})` }
4690
+ });
4691
+ } else if (subjectInitials && (!userImage || (userImage == null ? void 0 : userImage.trim()) === "")) {
4692
+ issueeImageEl = /* @__PURE__ */ React.createElement("div", {
4693
+ className: initialsClass
4694
+ }, subjectInitials);
4695
+ }
4681
4696
  return /* @__PURE__ */ React.createElement("div", {
4682
4697
  style: { backgroundImage: `url(${backgroundImage})` },
4683
4698
  className: `h-[200px] w-[320px] rounded-[20px] overflow-hidden ${className}`
@@ -4685,14 +4700,11 @@ const SchoolIDCard = ({
4685
4700
  className: `h-full w-full flex items-center justify-start relative ${containerClassName}`
4686
4701
  }, /* @__PURE__ */ React.createElement("div", {
4687
4702
  className: "w-full flex justify-start items-center pl-3 mt-10"
4688
- }, /* @__PURE__ */ React.createElement("div", {
4689
- className: "h-[100px] w-[80px] rounded-full overflow-hidden bg-no-repeat bg-cover bg-center border-solid border-[2px] border-white mr-2",
4690
- style: { backgroundImage: `url(${userImage})` }
4691
- }), /* @__PURE__ */ React.createElement("div", {
4703
+ }, issueeImageEl, /* @__PURE__ */ React.createElement("div", {
4692
4704
  className: "h-full flex items-start justify-center flex-col mt-7"
4693
4705
  }, userName && /* @__PURE__ */ React.createElement("p", {
4694
4706
  className: "text-sm text-black font-light"
4695
- }, userName), textEl && textEl)), /* @__PURE__ */ React.createElement("div", {
4707
+ }, userName), textEl && textEl)), showBarcode && /* @__PURE__ */ React.createElement("div", {
4696
4708
  className: "barcode-container"
4697
4709
  }, /* @__PURE__ */ React.createElement("div", {
4698
4710
  className: "barcode-wrap"
@@ -4707,4 +4719,4 @@ const SchoolIDCard = ({
4707
4719
  };
4708
4720
 
4709
4721
  export { SchoolIDCard as S };
4710
- //# sourceMappingURL=SchoolIDCard-4f56262c.js.map
4722
+ //# sourceMappingURL=SchoolIDCard-3b746226.js.map