@local-civics/hub-ui 0.1.240 → 0.1.241

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
@@ -7261,6 +7261,25 @@ const CommentCard = (props) => {
7261
7261
  ));
7262
7262
  };
7263
7263
 
7264
+ const initialsFor = (name, email) => {
7265
+ var _a;
7266
+ const trimmedName = (name || "").trim();
7267
+ if (trimmedName) {
7268
+ const parts = trimmedName.split(/\s+/).filter(Boolean);
7269
+ const first = ((_a = parts[0]) == null ? void 0 : _a.charAt(0)) || "";
7270
+ const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : "";
7271
+ return (first + last).toUpperCase() || "?";
7272
+ }
7273
+ return (email || "?").charAt(0).toUpperCase();
7274
+ };
7275
+ const SubmissionReviewHeader = (props) => {
7276
+ if (!props.name && !props.email) {
7277
+ return null;
7278
+ }
7279
+ const showEmailLine = !!props.name && !!props.email && props.name !== props.email;
7280
+ return /* @__PURE__ */ React.createElement("div", { className: "mb-4 flex items-center gap-3 rounded-xl border border-slate-200 bg-white px-4 py-3" }, /* @__PURE__ */ React.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.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React.createElement("div", { className: "truncate text-sm font-extrabold text-dark-blue-400" }, props.name || props.email), showEmailLine && /* @__PURE__ */ React.createElement("div", { className: "truncate text-xs text-slate-400" }, props.email)), /* @__PURE__ */ React.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"));
7281
+ };
7282
+
7264
7283
  const AuthLayout = (props) => {
7265
7284
  return /* @__PURE__ */ React__default.createElement("main", { className: "relative h-screen w-full bg-white font-proxima" }, /* @__PURE__ */ React__default.createElement(Loader, { isLoading: props.isLoading }, props.topNav !== false && /* @__PURE__ */ React__default.createElement(NavBar, null, /* @__PURE__ */ React__default.createElement(NavLink, { disabled: !props.onHome || props.disabled, name: "home", onClick: props.onHome }), props.onProfile && /* @__PURE__ */ React__default.createElement(
7266
7285
  NavLink,
@@ -7289,5 +7308,5 @@ const HomeLayout = (props) => {
7289
7308
  return /* @__PURE__ */ React__default.createElement("main", { className: "relative h-screen w-full overflow-hidden bg-white font-proxima" }, /* @__PURE__ */ React__default.createElement(NavBar, null, /* @__PURE__ */ React__default.createElement(NavLink, { name: "home", onClick: props.onHome, active: true }), /* @__PURE__ */ React__default.createElement(NavLink, { name: "login", onClick: props.onLogin }), /* @__PURE__ */ React__default.createElement(NavLink, { name: "faq", onClick: props.onFAQ }), /* @__PURE__ */ React__default.createElement(NavLink, { name: "privacy", onClick: props.onPrivacy }), /* @__PURE__ */ React__default.createElement(NavLink, { name: "terms", onClick: props.onTerms })), /* @__PURE__ */ React__default.createElement("section", { className: "absolute top-0 left-0 h-full overflow-hidden pt-16 w-full" }, props.children));
7290
7309
  };
7291
7310
 
7292
- export { AboutWidget, AchievementWidget, ActivityCard, ActivityItem, ActivityList, ActivityReflection, AuthLayout, Badge, BadgeActivityMenu, BadgeDetail, BadgeSection, BadgeSuccessDialog, BadgesCard, BadgesList, Board, Button, Card, Comments, DashboardShell, DashboardSidebar, DashboardTopBar, DateSelection, EventItem, EventList, FileList, FileLocker, Footer, Home, HomeLayout, Icon$1 as Icon, ImpactWidget, LearningForm, Loader, LogServiceButton, Logo, Modal, NavBar, NavLink, NotFound, Onboarding, Overlay, Pathway, PathwayButton, PathwayDetail, PathwayFilter, PathwayProgress, PathwaySection, PathwayTranscript, PathwayWidget, PathwaysCard, PathwaysList, Pill, ProfileHeroCard, ProfileWidget, Progress, Search, SearchButton, SearchResult, SettingsCard, SortableHeader, StatTile, StatTileRow, Stopwatch, Tab, TagFilter, TaskItem, TaskList, Widget, WidgetBody, WidgetHeader, WidgetHeaderLink, WidgetTitle };
7311
+ export { AboutWidget, AchievementWidget, ActivityCard, ActivityItem, ActivityList, ActivityReflection, AuthLayout, Badge, BadgeActivityMenu, BadgeDetail, BadgeSection, BadgeSuccessDialog, BadgesCard, BadgesList, Board, Button, Card, Comments, DashboardShell, DashboardSidebar, DashboardTopBar, DateSelection, EventItem, EventList, FileList, FileLocker, Footer, Home, HomeLayout, Icon$1 as Icon, ImpactWidget, LearningForm, Loader, LogServiceButton, Logo, Modal, NavBar, NavLink, NotFound, Onboarding, Overlay, Pathway, PathwayButton, PathwayDetail, PathwayFilter, PathwayProgress, PathwaySection, PathwayTranscript, PathwayWidget, PathwaysCard, PathwaysList, Pill, ProfileHeroCard, ProfileWidget, Progress, Search, SearchButton, SearchResult, SettingsCard, SortableHeader, StatTile, StatTileRow, Stopwatch, SubmissionReviewHeader, Tab, TagFilter, TaskItem, TaskList, Widget, WidgetBody, WidgetHeader, WidgetHeaderLink, WidgetTitle };
7293
7312
  //# sourceMappingURL=index.mjs.map