@local-civics/hub-ui 0.1.155 → 0.1.157
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.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3181,7 +3181,7 @@ const BadgeCard = (props) => {
|
|
|
3181
3181
|
const buttonTheme = (choice == null ? void 0 : choice.completedAt) ? "light" : "dark";
|
|
3182
3182
|
const iconName = (choice == null ? void 0 : choice.completedAt) ? "check & circle" : "circle";
|
|
3183
3183
|
const iconColor = (choice == null ? void 0 : choice.completedAt) ? "text-green-500" : "text-zinc-300";
|
|
3184
|
-
return !!choice && /* @__PURE__ */ React__namespace.createElement("div", { key: id, className: "flex gap-x-2 items-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: `shrink-0 h-4 w-4 ${iconColor}` }, /* @__PURE__ */ React__namespace.createElement(Icon, { name: iconName })), /* @__PURE__ */ React__namespace.createElement("div", { className: "grow" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("span", { className: "font-semibold" }, choice.activityName)), /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs" }, /* @__PURE__ */ React__namespace.createElement("span", null, c.displayName), !!choice.xp && /* @__PURE__ */ React__namespace.createElement("span", { className: "ml-1 text-green-500 font-semibold whitespace-nowrap" }, choice.xp, " points"))),
|
|
3184
|
+
return !!choice && /* @__PURE__ */ React__namespace.createElement("div", { key: id, className: "flex gap-x-2 items-center" }, /* @__PURE__ */ React__namespace.createElement("div", { className: `shrink-0 h-4 w-4 ${iconColor}` }, /* @__PURE__ */ React__namespace.createElement(Icon, { name: iconName })), /* @__PURE__ */ React__namespace.createElement("div", { className: "grow" }, /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("span", { className: "font-semibold" }, choice.activityName)), /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs" }, /* @__PURE__ */ React__namespace.createElement("span", null, c.displayName), !!choice.xp && /* @__PURE__ */ React__namespace.createElement("span", { className: "ml-1 text-green-500 font-semibold whitespace-nowrap" }, choice.xp, " points"))), !props.preview && /* @__PURE__ */ React__namespace.createElement("div", { className: "shrink-0 w-full max-w-[7rem]" }, /* @__PURE__ */ React__namespace.createElement(
|
|
3185
3185
|
Button,
|
|
3186
3186
|
{
|
|
3187
3187
|
onClick: choice.onClick,
|
|
@@ -5537,7 +5537,7 @@ const TaskList = (props) => {
|
|
|
5537
5537
|
const PathwayCard = (props) => {
|
|
5538
5538
|
var _a, _b;
|
|
5539
5539
|
const badges = props.badges || [];
|
|
5540
|
-
const
|
|
5540
|
+
const completedCount = badges.filter((b) => b.completedAt).length;
|
|
5541
5541
|
const target = props.target || badges.length;
|
|
5542
5542
|
return /* @__PURE__ */ React__namespace.createElement(Card, { onClose: props.onClose }, /* @__PURE__ */ React__namespace.createElement("div", { className: "pb-5 text-zinc-600" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "pb-5 px-5 flex gap-x-2" }, /* @__PURE__ */ React__namespace.createElement(
|
|
5543
5543
|
BadgeEmblem,
|
|
@@ -5546,7 +5546,7 @@ const PathwayCard = (props) => {
|
|
|
5546
5546
|
alt: props.title,
|
|
5547
5547
|
size: "md"
|
|
5548
5548
|
}
|
|
5549
|
-
), /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-[20rem]" }, /* @__PURE__ */ React__namespace.createElement("p", { className: "font-semibold" }, props.title), /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs" }, /* @__PURE__ */ React__namespace.createElement("span", { className: "text-zinc-500 font-semibold" }, "Tags"), ((_a = props.displayTags) != null ? _a : []).length > 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "inline-block ml-1 text-green-500" }, ((_b = props.displayTags) != null ? _b : []).map((tag, index) => /* @__PURE__ */ React__namespace.createElement("span", { key: index, className: "font-semibold mr-1" }, tag)))), !!props.description && /* @__PURE__ */ React__namespace.createElement("p", { className: "mt-2 text-sm" }, props.description))), /* @__PURE__ */ React__namespace.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__namespace.createElement("p", { className: "font-semibold" }, "Pathway Badges & Criteria"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-xs" }, "This pathway is comprised of ", target, " Badges. It includes required and elective programming."), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-xs" }, "Progress: ",
|
|
5549
|
+
), /* @__PURE__ */ React__namespace.createElement("div", { className: "max-w-[20rem]" }, /* @__PURE__ */ React__namespace.createElement("p", { className: "font-semibold" }, props.title), /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs" }, /* @__PURE__ */ React__namespace.createElement("span", { className: "text-zinc-500 font-semibold" }, "Tags"), ((_a = props.displayTags) != null ? _a : []).length > 0 && /* @__PURE__ */ React__namespace.createElement("div", { className: "inline-block ml-1 text-green-500" }, ((_b = props.displayTags) != null ? _b : []).map((tag, index) => /* @__PURE__ */ React__namespace.createElement("span", { key: index, className: "font-semibold mr-1" }, tag)))), !!props.description && /* @__PURE__ */ React__namespace.createElement("p", { className: "mt-2 text-sm" }, props.description))), /* @__PURE__ */ React__namespace.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__namespace.createElement("p", { className: "font-semibold" }, "Pathway Badges & Criteria"), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-xs" }, "This pathway is comprised of ", target, " Badges. It includes required and elective programming."), /* @__PURE__ */ React__namespace.createElement("p", { className: "text-xs" }, "Progress: ", completedCount, " / ", target, " badges completed."), /* @__PURE__ */ React__namespace.createElement("div", { className: "mt-2 grid grid-cols-1 gap-y-2 max-h-[18rem] overflow-y-auto" }, badges.map((b) => {
|
|
5550
5550
|
const buttonText = b.completedAt ? "Completed" : b.startedAt ? "Continue" : "Start";
|
|
5551
5551
|
const buttonTheme = b.completedAt ? "light" : "dark";
|
|
5552
5552
|
const iconName = b.completedAt ? "check & circle" : "circle";
|