@local-civics/hub-ui 0.1.152 → 0.1.156

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/index.mjs CHANGED
@@ -5517,7 +5517,7 @@ const TaskList = (props) => {
5517
5517
  const PathwayCard = (props) => {
5518
5518
  var _a, _b;
5519
5519
  const badges = props.badges || [];
5520
- const progress = props.progress || 0;
5520
+ const completedCount = badges.filter((b) => b.completedAt).length;
5521
5521
  const target = props.target || badges.length;
5522
5522
  return /* @__PURE__ */ React.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React.createElement("div", { className: "pb-5 text-zinc-600" }, /* @__PURE__ */ React.createElement("div", { className: "pb-5 px-5 flex gap-x-2" }, /* @__PURE__ */ React.createElement(
5523
5523
  BadgeEmblem,
@@ -5526,8 +5526,8 @@ const PathwayCard = (props) => {
5526
5526
  alt: props.title,
5527
5527
  size: "md"
5528
5528
  }
5529
- ), /* @__PURE__ */ React.createElement("div", { className: "max-w-[20rem]" }, /* @__PURE__ */ React.createElement("p", { className: "font-semibold" }, props.title), /* @__PURE__ */ React.createElement("div", { className: "text-xs" }, /* @__PURE__ */ React.createElement("span", { className: "text-zinc-500 font-semibold" }, "Tags"), ((_a = props.displayTags) != null ? _a : []).length > 0 && /* @__PURE__ */ React.createElement("div", { className: "inline-block ml-1 text-green-500" }, ((_b = props.displayTags) != null ? _b : []).map((tag, index) => /* @__PURE__ */ React.createElement("span", { key: index, className: "font-semibold mr-1" }, tag)))), !!props.description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm" }, props.description))), /* @__PURE__ */ React.createElement("div", { className: "p-5 grid grid-cols-1 gap-y-3 md:min-w-[30rem] max-w-[40rem] border-t border-zinc-200" }, /* @__PURE__ */ React.createElement("p", { className: "font-semibold" }, "Pathway Badges & Criteria"), /* @__PURE__ */ React.createElement("p", { className: "text-xs" }, "This pathway is comprised of ", target, " Badges. It includes required and elective programming."), /* @__PURE__ */ React.createElement("p", { className: "text-xs" }, "Progress: ", progress, " / ", target, " badges completed."), /* @__PURE__ */ React.createElement("div", { className: "mt-2 grid grid-cols-1 gap-y-2 max-h-[18rem] overflow-y-auto" }, badges.map((b) => {
5530
- const buttonText = b.completedAt ? "Completed" : "Start";
5529
+ ), /* @__PURE__ */ React.createElement("div", { className: "max-w-[20rem]" }, /* @__PURE__ */ React.createElement("p", { className: "font-semibold" }, props.title), /* @__PURE__ */ React.createElement("div", { className: "text-xs" }, /* @__PURE__ */ React.createElement("span", { className: "text-zinc-500 font-semibold" }, "Tags"), ((_a = props.displayTags) != null ? _a : []).length > 0 && /* @__PURE__ */ React.createElement("div", { className: "inline-block ml-1 text-green-500" }, ((_b = props.displayTags) != null ? _b : []).map((tag, index) => /* @__PURE__ */ React.createElement("span", { key: index, className: "font-semibold mr-1" }, tag)))), !!props.description && /* @__PURE__ */ React.createElement("p", { className: "mt-2 text-sm" }, props.description))), /* @__PURE__ */ React.createElement("div", { className: "p-5 grid grid-cols-1 gap-y-3 md:min-w-[30rem] max-w-[40rem] border-t border-zinc-200" }, /* @__PURE__ */ React.createElement("p", { className: "font-semibold" }, "Pathway Badges & Criteria"), /* @__PURE__ */ React.createElement("p", { className: "text-xs" }, "This pathway is comprised of ", target, " Badges. It includes required and elective programming."), /* @__PURE__ */ React.createElement("p", { className: "text-xs" }, "Progress: ", completedCount, " / ", target, " badges completed."), /* @__PURE__ */ React.createElement("div", { className: "mt-2 grid grid-cols-1 gap-y-2 max-h-[18rem] overflow-y-auto" }, badges.map((b) => {
5530
+ const buttonText = b.completedAt ? "Completed" : b.startedAt ? "Continue" : "Start";
5531
5531
  const buttonTheme = b.completedAt ? "light" : "dark";
5532
5532
  const iconName = b.completedAt ? "check & circle" : "circle";
5533
5533
  const iconColor = b.completedAt ? "text-green-500" : "text-zinc-300";