@local-civics/hub-ui 0.1.240 → 0.1.242

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
@@ -1627,6 +1627,24 @@ type CommentsProps = {
1627
1627
  */
1628
1628
  declare const Comments: (props: CommentsProps) => JSX.Element;
1629
1629
 
1630
+ /**
1631
+ * SubmissionReviewHeaderProps
1632
+ */
1633
+ type SubmissionReviewHeaderProps = {
1634
+ name?: string;
1635
+ email?: string;
1636
+ };
1637
+ /**
1638
+ * A compact identity strip shown above a single-student badge/lesson preview, so an educator
1639
+ * always knows exactly whose submission they're looking at and that the view is read-only -
1640
+ * distinct from EducatorPageShell's own generic "You're viewing this as an educator." subtitle,
1641
+ * which says nothing about *who*. Deliberately simple (name + email + a "Preview" pill) rather
1642
+ * than a full profile card - the page below already carries the actual submission content.
1643
+ * @param props
1644
+ * @constructor
1645
+ */
1646
+ declare const SubmissionReviewHeader: (props: SubmissionReviewHeaderProps) => JSX.Element | null;
1647
+
1630
1648
  /**
1631
1649
  * AuthLayoutProps
1632
1650
  */
@@ -1674,4 +1692,4 @@ type HomeLayoutProps = {
1674
1692
  */
1675
1693
  declare const HomeLayout: (props: HomeLayoutProps) => JSX.Element;
1676
1694
 
1677
- export { AboutWidget, AboutWidgetProps, AchievementWidget, AchievementWidgetProps, ActivityCard, ActivityCardProps, ActivityItem, ActivityItemProps, ActivityList, ActivityListProps, ActivityReflection, ActivityReflectionProps, AuthLayout, AuthLayoutProps, Badge, BadgeActivityMenu, BadgeActivityMenuProps, BadgeDetail, BadgeDetailProps, BadgeFilterOption, BadgeProps, BadgeSection, BadgeSectionProps, BadgeSuccessDialog, BadgeSuccessDialogProps, BadgesCard, BadgesCardProps, BadgesList, BadgesListProps, Board, BoardProps, Button, ButtonBorder, ButtonColor, ButtonFilter, ButtonJustify, ButtonProps, ButtonSize, ButtonSpacing, ButtonTheme, Card, CardProps, Comments, CommentsItem, CommentsProps, CtaListProps, DashboardShell, DashboardShellProps, DashboardSidebar, DashboardSidebarIdentity, DashboardSidebarLinks, DashboardSidebarProps, DashboardSidebarTabName, DashboardTopBar, DashboardTopBarBreadcrumbSegment, DashboardTopBarProps, DateSelection, DateSelectionProps, DaySelectionOptionProps, EventItem, EventItemProps, EventList, EventListProps, FileList, FileListItem, FileListProps, FileLocker, FileLockerBadge, FileLockerPathway, FileLockerProps, Footer, FooterProps, Home, HomeLayout, HomeLayoutProps, Icon, IconName, IconProps, ImpactWidget, ImpactWidgetProps, LearningForm, LearningFormProps, Loader, LoaderProps, LogServiceButton, LogServiceButtonProps, Logo, Modal, ModalProps, NavBar, NavBarProps, NavLink, NavLinkName, NavLinkProps, NotFound, NotFoundProps, Onboarding, OnboardingProps, Overlay, OverlayProps, Pathway, PathwayButton, PathwayButtonProps, PathwayDetail, PathwayDetailProps, PathwayFilter, PathwayFilterOption, PathwayFilterProps, PathwayItem, PathwayProgress, PathwayProgressHeight, PathwayProgressProps, PathwayProps, PathwaySection, PathwaySectionProps, PathwayTranscript, PathwayWidget, PathwayWidgetProps, PathwaysCard, PathwaysCardProps, PathwaysList, PathwaysListProps, Pill, PillAccent, PillProps, ProfileHeroCard, ProfileHeroCardProps, ProfileWidget, Progress, ProgressProps, ResidentWidgetProps, Search, SearchButton, SearchButtonProps, SearchProps, SearchResult, SearchResultProps, SettingsCard, SettingsCardProps, SortableHeader, SortableHeaderProps, StatTile, StatTileAccent, StatTileProps, StatTileRow, StatTileRowProps, Stopwatch, StopwatchProps, SubmissionItem, Tab, TabProps, TagFilter, TagFilterProps, TaskItem, TaskItemProps, TaskList, TaskListProps, Widget, WidgetBody, WidgetBodyProps, WidgetHeader, WidgetHeaderLink, WidgetHeaderLinkProps, WidgetHeaderProps, WidgetProps, WidgetTitle, WidgetTitleProps };
1695
+ export { AboutWidget, AboutWidgetProps, AchievementWidget, AchievementWidgetProps, ActivityCard, ActivityCardProps, ActivityItem, ActivityItemProps, ActivityList, ActivityListProps, ActivityReflection, ActivityReflectionProps, AuthLayout, AuthLayoutProps, Badge, BadgeActivityMenu, BadgeActivityMenuProps, BadgeDetail, BadgeDetailProps, BadgeFilterOption, BadgeProps, BadgeSection, BadgeSectionProps, BadgeSuccessDialog, BadgeSuccessDialogProps, BadgesCard, BadgesCardProps, BadgesList, BadgesListProps, Board, BoardProps, Button, ButtonBorder, ButtonColor, ButtonFilter, ButtonJustify, ButtonProps, ButtonSize, ButtonSpacing, ButtonTheme, Card, CardProps, Comments, CommentsItem, CommentsProps, CtaListProps, DashboardShell, DashboardShellProps, DashboardSidebar, DashboardSidebarIdentity, DashboardSidebarLinks, DashboardSidebarProps, DashboardSidebarTabName, DashboardTopBar, DashboardTopBarBreadcrumbSegment, DashboardTopBarProps, DateSelection, DateSelectionProps, DaySelectionOptionProps, EventItem, EventItemProps, EventList, EventListProps, FileList, FileListItem, FileListProps, FileLocker, FileLockerBadge, FileLockerPathway, FileLockerProps, Footer, FooterProps, Home, HomeLayout, HomeLayoutProps, Icon, IconName, IconProps, ImpactWidget, ImpactWidgetProps, LearningForm, LearningFormProps, Loader, LoaderProps, LogServiceButton, LogServiceButtonProps, Logo, Modal, ModalProps, NavBar, NavBarProps, NavLink, NavLinkName, NavLinkProps, NotFound, NotFoundProps, Onboarding, OnboardingProps, Overlay, OverlayProps, Pathway, PathwayButton, PathwayButtonProps, PathwayDetail, PathwayDetailProps, PathwayFilter, PathwayFilterOption, PathwayFilterProps, PathwayItem, PathwayProgress, PathwayProgressHeight, PathwayProgressProps, PathwayProps, PathwaySection, PathwaySectionProps, PathwayTranscript, PathwayWidget, PathwayWidgetProps, PathwaysCard, PathwaysCardProps, PathwaysList, PathwaysListProps, Pill, PillAccent, PillProps, ProfileHeroCard, ProfileHeroCardProps, ProfileWidget, Progress, ProgressProps, ResidentWidgetProps, Search, SearchButton, SearchButtonProps, SearchProps, SearchResult, SearchResultProps, SettingsCard, SettingsCardProps, SortableHeader, SortableHeaderProps, StatTile, StatTileAccent, StatTileProps, StatTileRow, StatTileRowProps, Stopwatch, StopwatchProps, SubmissionItem, SubmissionReviewHeader, SubmissionReviewHeaderProps, Tab, TabProps, TagFilter, TagFilterProps, TaskItem, TaskItemProps, TaskList, TaskListProps, Widget, WidgetBody, WidgetBodyProps, WidgetHeader, WidgetHeaderLink, WidgetHeaderLinkProps, WidgetHeaderProps, WidgetProps, WidgetTitle, WidgetTitleProps };
package/dist/index.js CHANGED
@@ -7281,6 +7281,25 @@ const CommentCard = (props) => {
7281
7281
  ));
7282
7282
  };
7283
7283
 
7284
+ const initialsFor = (name, email) => {
7285
+ var _a;
7286
+ const trimmedName = (name || "").trim();
7287
+ if (trimmedName) {
7288
+ const parts = trimmedName.split(/\s+/).filter(Boolean);
7289
+ const first = ((_a = parts[0]) == null ? void 0 : _a.charAt(0)) || "";
7290
+ const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : "";
7291
+ return (first + last).toUpperCase() || "?";
7292
+ }
7293
+ return (email || "?").charAt(0).toUpperCase();
7294
+ };
7295
+ const SubmissionReviewHeader = (props) => {
7296
+ if (!props.name && !props.email) {
7297
+ return null;
7298
+ }
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"));
7301
+ };
7302
+
7284
7303
  const AuthLayout = (props) => {
7285
7304
  return /* @__PURE__ */ React.createElement("main", { className: "relative h-screen w-full bg-white font-proxima" }, /* @__PURE__ */ React.createElement(Loader, { isLoading: props.isLoading }, props.topNav !== false && /* @__PURE__ */ React.createElement(NavBar, null, /* @__PURE__ */ React.createElement(NavLink, { disabled: !props.onHome || props.disabled, name: "home", onClick: props.onHome }), props.onProfile && /* @__PURE__ */ React.createElement(
7286
7305
  NavLink,
@@ -7372,6 +7391,7 @@ exports.SortableHeader = SortableHeader;
7372
7391
  exports.StatTile = StatTile;
7373
7392
  exports.StatTileRow = StatTileRow;
7374
7393
  exports.Stopwatch = Stopwatch;
7394
+ exports.SubmissionReviewHeader = SubmissionReviewHeader;
7375
7395
  exports.Tab = Tab;
7376
7396
  exports.TagFilter = TagFilter;
7377
7397
  exports.TaskItem = TaskItem;