@local-civics/hub-ui 0.1.242 → 0.1.244

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.d.ts CHANGED
@@ -329,6 +329,7 @@ type BadgeDetailProps = {
329
329
  choices?: BadgeActivityProps[];
330
330
  canSubmit?: boolean;
331
331
  finishedAt?: string;
332
+ preview?: boolean;
332
333
  onSubmit?: () => void;
333
334
  };
334
335
  /**
@@ -1633,6 +1634,8 @@ declare const Comments: (props: CommentsProps) => JSX.Element;
1633
1634
  type SubmissionReviewHeaderProps = {
1634
1635
  name?: string;
1635
1636
  email?: string;
1637
+ onViewOverview?: () => void;
1638
+ overviewLabel?: string;
1636
1639
  };
1637
1640
  /**
1638
1641
  * A compact identity strip shown above a single-student badge/lesson preview, so an educator
package/dist/index.js CHANGED
@@ -3932,7 +3932,7 @@ const BadgeDetail = (props) => {
3932
3932
  });
3933
3933
  const status = props.finishedAt ? "Completed" : anyStarted || xp > 0 ? "In Progress" : "Available";
3934
3934
  const { border, shadow, pillAccent } = STATUS_CLASSNAMES$1[status];
3935
- const showSubmit = !props.finishedAt && criteria.length > 0;
3935
+ const showSubmit = !props.preview && !props.finishedAt && criteria.length > 0;
3936
3936
  return /* @__PURE__ */ React__namespace.createElement("div", { className: "flex w-full flex-col gap-3.5" }, /* @__PURE__ */ React__namespace.createElement("div", { className: `overflow-hidden rounded-2xl border bg-white ${border} ${shadow}` }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex gap-4 p-5" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "shrink-0" }, /* @__PURE__ */ React__namespace.createElement(
3937
3937
  BadgeEmblem,
3938
3938
  {
@@ -7297,7 +7297,16 @@ const SubmissionReviewHeader = (props) => {
7297
7297
  return null;
7298
7298
  }
7299
7299
  const showEmailLine = !!props.name && !!props.email && props.name !== props.email;
7300
- return /* @__PURE__ */ React__namespace.createElement("div", { className: "mb-4 flex items-center gap-3 rounded-xl border border-slate-200 bg-white px-4 py-3" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-sky-blue-400/15 text-sm font-bold text-sky-blue-400" }, initialsFor(props.name, props.email)), /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "truncate text-sm font-extrabold text-dark-blue-400" }, props.name || props.email), showEmailLine && /* @__PURE__ */ React__namespace.createElement("div", { className: "truncate text-xs text-slate-400" }, props.email)), /* @__PURE__ */ React__namespace.createElement("span", { className: "shrink-0 rounded-full bg-slate-100 px-3 py-1 text-[10px] font-bold uppercase tracking-wide text-slate-500" }, "Preview"));
7300
+ return /* @__PURE__ */ React__namespace.createElement("div", { className: "mb-4 flex items-center gap-3 rounded-xl border border-slate-200 bg-white px-4 py-3" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-sky-blue-400/15 text-sm font-bold text-sky-blue-400" }, initialsFor(props.name, props.email)), /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "truncate text-sm font-extrabold text-dark-blue-400" }, props.name || props.email), showEmailLine && /* @__PURE__ */ React__namespace.createElement("div", { className: "truncate text-xs text-slate-400" }, props.email)), props.onViewOverview && props.overviewLabel && /* @__PURE__ */ React__namespace.createElement(
7301
+ "button",
7302
+ {
7303
+ type: "button",
7304
+ onClick: props.onViewOverview,
7305
+ className: "shrink-0 text-xs font-bold text-dark-blue-400 hover:underline"
7306
+ },
7307
+ props.overviewLabel,
7308
+ " \u2192"
7309
+ ), /* @__PURE__ */ React__namespace.createElement("span", { className: "shrink-0 rounded-full bg-slate-100 px-3 py-1 text-[10px] font-bold uppercase tracking-wide text-slate-500" }, "Preview"));
7301
7310
  };
7302
7311
 
7303
7312
  const AuthLayout = (props) => {