@local-civics/hub-ui 0.1.256 → 0.1.258

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
@@ -4739,7 +4739,7 @@ const LearningForm = (props) => {
4739
4739
  }), /* @__PURE__ */ React__default.createElement(
4740
4740
  FormItem,
4741
4741
  {
4742
- displayName: /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("p", null, "Optional: What is one takeaway from this lesson?")),
4742
+ displayName: "Optional: What is one takeaway from this lesson?",
4743
4743
  description: "",
4744
4744
  format: "question",
4745
4745
  questionType: "text",
@@ -4747,7 +4747,7 @@ const LearningForm = (props) => {
4747
4747
  onResponseChange: onReflectionChange,
4748
4748
  paragraph: true,
4749
4749
  minText: MIN_REFLECTION_LENGTH,
4750
- responses: reflection ? [reflection] : ["My Reflection: "]
4750
+ responses: reflection ? [reflection] : []
4751
4751
  }
4752
4752
  ), /* @__PURE__ */ React__default.createElement(FormItem, null, /* @__PURE__ */ React__default.createElement(Rating, { disabled: !canReflect || !!props.preview, rating, setRating })), !props.preview && /* @__PURE__ */ React__default.createElement("div", { className: "w-max m-auto" }, /* @__PURE__ */ React__default.createElement(
4753
4753
  "button",
@@ -6127,7 +6127,7 @@ const PathwayTranscript = (props) => {
6127
6127
  })));
6128
6128
  }));
6129
6129
  };
6130
- return /* @__PURE__ */ React.createElement("div", { className: "space-y-8 p-6" }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-3 gap-4 rounded-2xl border border-slate-200 bg-white p-5 text-sm shadow-sm" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-1 text-[9px] font-black uppercase tracking-widest text-slate-400" }, "Student"), /* @__PURE__ */ React.createElement("p", { className: "font-bold text-dark-blue-400" }, safeRender(props.studentName) || "Guest User"), /* @__PURE__ */ React.createElement("p", { className: "mt-0.5 text-[11px] text-slate-500" }, safeRender(props.studentEmail))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-1 text-[9px] font-black uppercase tracking-widest text-slate-400" }, "Organization"), /* @__PURE__ */ React.createElement("p", { className: "font-bold text-dark-blue-400" }, safeRender(props.schoolName) || "Not Provided"), /* @__PURE__ */ React.createElement("p", { className: "mt-0.5 text-[11px] text-slate-500" }, props.gradeLevel ? `Grade ${safeRender(props.gradeLevel)}` : "")), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-1 text-[9px] font-black uppercase tracking-widest text-slate-400" }, "Record Status"), /* @__PURE__ */ React.createElement(Pill, { label: "Verified", accent: "mint" }), /* @__PURE__ */ React.createElement("p", { className: "mt-1 text-[10px] text-slate-400" }, today))), /* @__PURE__ */ React.createElement("section", { className: "space-y-4" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React.createElement("h1", { className: "text-2xl font-extrabold tracking-tight text-dark-blue-400" }, props.title || "Untitled Pathway"), /* @__PURE__ */ React.createElement("p", { className: "max-w-3xl text-sm leading-relaxed text-slate-500" }, props.description || "No description provided for this pathway.")), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-3 gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-xl border border-slate-200 bg-white p-4 text-center shadow-sm" }, /* @__PURE__ */ React.createElement("span", { className: "text-2xl font-black text-dark-blue-400" }, totalPointsEarned.toLocaleString()), /* @__PURE__ */ React.createElement("span", { className: "mt-1 text-[10px] font-bold uppercase tracking-widest text-slate-400" }, "Total Points")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-xl border border-slate-200 bg-white p-4 text-center shadow-sm" }, /* @__PURE__ */ React.createElement("span", { className: "text-2xl font-black text-dark-blue-400" }, badgesEarnedCount), /* @__PURE__ */ React.createElement("span", { className: "mt-1 text-[10px] font-bold uppercase tracking-widest text-slate-400" }, "Badges Earned")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-xl border border-slate-200 bg-white p-4 text-center shadow-sm" }, /* @__PURE__ */ React.createElement(Pill, { label: status, accent: STATUS_PILL_ACCENT[status] }), /* @__PURE__ */ React.createElement("span", { className: "mt-1.5 text-[10px] font-bold uppercase tracking-widest text-slate-400" }, "Pathway Status")))), /* @__PURE__ */ React.createElement("section", { className: "space-y-3" }, /* @__PURE__ */ React.createElement("p", { className: "text-[10px] font-black uppercase tracking-widest text-slate-400" }, "Criteria & Progress"), /* @__PURE__ */ React.createElement("div", { className: "rounded-xl border border-slate-200 bg-white p-5 shadow-sm" }, /* @__PURE__ */ React.createElement(PathwayProgressBarChart, { targets: mappedTargets, points: mappedPoints, height: "md" }))), /* @__PURE__ */ React.createElement("section", { className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between border-b border-slate-200 pb-3" }, /* @__PURE__ */ React.createElement("p", { className: "text-[10px] font-black uppercase tracking-widest text-slate-400" }, "Activity History"), /* @__PURE__ */ React.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React.createElement(
6130
+ return /* @__PURE__ */ React.createElement("div", { className: "space-y-8 p-6" }, /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-3 gap-4 rounded-2xl border border-slate-200 bg-white p-5 text-sm shadow-sm" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-1 text-[9px] font-black uppercase tracking-widest text-slate-400" }, "Student"), /* @__PURE__ */ React.createElement("p", { className: "font-bold text-dark-blue-400" }, safeRender(props.studentName) || "Guest User"), /* @__PURE__ */ React.createElement("p", { className: "mt-0.5 text-[11px] text-slate-500" }, safeRender(props.studentEmail))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-1 text-[9px] font-black uppercase tracking-widest text-slate-400" }, "Organization"), /* @__PURE__ */ React.createElement("p", { className: "font-bold text-dark-blue-400" }, safeRender(props.schoolName) || "Not Provided"), /* @__PURE__ */ React.createElement("p", { className: "mt-0.5 text-[11px] text-slate-500" }, props.gradeLevel ? `Grade ${safeRender(props.gradeLevel)}` : "")), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { className: "mb-1 text-[9px] font-black uppercase tracking-widest text-slate-400" }, "Generated"), /* @__PURE__ */ React.createElement("p", { className: "font-bold text-dark-blue-400" }, today))), /* @__PURE__ */ React.createElement("section", { className: "space-y-4" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React.createElement("h1", { className: "text-2xl font-extrabold tracking-tight text-dark-blue-400" }, props.title || "Untitled Pathway"), /* @__PURE__ */ React.createElement("p", { className: "max-w-3xl text-sm leading-relaxed text-slate-500" }, props.description || "No description provided for this pathway.")), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-3 gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-xl border border-slate-200 bg-white p-4 text-center shadow-sm" }, /* @__PURE__ */ React.createElement("span", { className: "text-2xl font-black text-dark-blue-400" }, totalPointsEarned.toLocaleString()), /* @__PURE__ */ React.createElement("span", { className: "mt-1 text-[10px] font-bold uppercase tracking-widest text-slate-400" }, "Total Points")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-xl border border-slate-200 bg-white p-4 text-center shadow-sm" }, /* @__PURE__ */ React.createElement("span", { className: "text-2xl font-black text-dark-blue-400" }, badgesEarnedCount), /* @__PURE__ */ React.createElement("span", { className: "mt-1 text-[10px] font-bold uppercase tracking-widest text-slate-400" }, "Badges Earned")), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-xl border border-slate-200 bg-white p-4 text-center shadow-sm" }, /* @__PURE__ */ React.createElement(Pill, { label: status, accent: STATUS_PILL_ACCENT[status] }), /* @__PURE__ */ React.createElement("span", { className: "mt-1.5 text-[10px] font-bold uppercase tracking-widest text-slate-400" }, "Pathway Status")))), /* @__PURE__ */ React.createElement("section", { className: "space-y-3" }, /* @__PURE__ */ React.createElement("p", { className: "text-[10px] font-black uppercase tracking-widest text-slate-400" }, "Criteria & Progress"), /* @__PURE__ */ React.createElement("div", { className: "rounded-xl border border-slate-200 bg-white p-5 shadow-sm" }, /* @__PURE__ */ React.createElement(PathwayProgressBarChart, { targets: mappedTargets, points: mappedPoints, height: "md" }))), /* @__PURE__ */ React.createElement("section", { className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between border-b border-slate-200 pb-3" }, /* @__PURE__ */ React.createElement("p", { className: "text-[10px] font-black uppercase tracking-widest text-slate-400" }, "Activity History"), /* @__PURE__ */ React.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React.createElement(
6131
6131
  "button",
6132
6132
  {
6133
6133
  type: "button",
@@ -7309,13 +7309,14 @@ const CommentCard = (props) => {
7309
7309
  onClick: props.onBadgeClick ? () => props.onBadgeClick(comment.badgeId) : void 0
7310
7310
  } : { label: "General", kind: "general", onClick: void 0 };
7311
7311
  const needsAttention = comment.requireValidation && !comment.resolvedAt;
7312
- const actionLabel = needsAttention && target.kind === "badge" ? "Resubmit this badge" : target.kind === "badge" ? "View this badge" : target.kind === "lesson" ? "View this lesson" : void 0;
7312
+ const canResubmit = !!comment.needsSubmission;
7313
+ const actionLabel = target.kind === "badge" ? canResubmit ? "Resubmit this badge" : "View this badge" : target.kind === "lesson" ? canResubmit ? "Resubmit this lesson" : "View this lesson" : void 0;
7313
7314
  return /* @__PURE__ */ React.createElement("div", { className: `rounded-2xl border bg-white p-4 ${needsAttention ? "border-gold-400/40" : "border-slate-200"}` }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React.createElement("div", { className: "text-xs font-extrabold text-dark-blue-400" }, target.label), /* @__PURE__ */ React.createElement("div", { className: "mt-0.5 flex items-center gap-1.5 text-[11px] text-slate-400" }, comment.commenterName && /* @__PURE__ */ React.createElement("span", null, "Commenter: ", comment.commenterName), comment.commenterName && comment.createdAt && /* @__PURE__ */ React.createElement("span", null, "\xB7"), comment.createdAt && /* @__PURE__ */ React.createElement("span", null, formatDate(comment.createdAt)))), comment.requireValidation && (!comment.resolvedAt ? /* @__PURE__ */ React.createElement("span", { className: "shrink-0 rounded-full bg-gold-400/15 px-2.5 py-1 text-[10px] font-bold text-dark-blue-400" }, "Needs validation") : comment.needsSubmission ? /* @__PURE__ */ React.createElement("span", { className: "shrink-0 rounded-full bg-sky-blue-400/15 px-2.5 py-1 text-[10px] font-bold text-dark-blue-400" }, "Needs submission") : /* @__PURE__ */ React.createElement("span", { className: "flex shrink-0 items-center gap-1 rounded-full bg-mint-400/15 px-2.5 py-1 text-[10px] font-bold text-dark-blue-400" }, /* @__PURE__ */ React.createElement(IconCheck, { size: 11, stroke: 3, className: "text-mint-400" }), "Resolved"))), /* @__PURE__ */ React.createElement("p", { className: "mt-2.5 text-xs text-slate-600" }, comment.commentText), actionLabel && target.onClick && /* @__PURE__ */ React.createElement(
7314
7315
  "button",
7315
7316
  {
7316
7317
  type: "button",
7317
7318
  onClick: target.onClick,
7318
- className: `mt-3 flex items-center gap-1 rounded-lg px-3 py-1.5 text-[11px] font-extrabold ${needsAttention ? "bg-gold-400/15 text-dark-blue-400 hover:bg-gold-400/25" : "border border-slate-200 text-dark-blue-400 hover:bg-slate-50"}`
7319
+ className: `mt-3 flex items-center gap-1 rounded-lg px-3 py-1.5 text-[11px] font-extrabold ${canResubmit ? "bg-gold-400/15 text-dark-blue-400 hover:bg-gold-400/25" : "border border-slate-200 text-dark-blue-400 hover:bg-slate-50"}`
7319
7320
  },
7320
7321
  actionLabel,
7321
7322
  /* @__PURE__ */ React.createElement(IconArrowRight, { size: 12, stroke: 2.5 })