@local-civics/hub-ui 0.1.209 → 0.1.211

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
@@ -166,7 +166,7 @@ type BadgeActivityProps = {
166
166
  /**
167
167
  * CriterionProps
168
168
  */
169
- type CriterionProps$1 = {
169
+ type CriterionProps$2 = {
170
170
  criterionId?: string;
171
171
  displayName?: string;
172
172
  namespace?: string;
@@ -183,7 +183,7 @@ type BadgeCardProps = {
183
183
  imageURL?: string;
184
184
  level?: number;
185
185
  summary?: string;
186
- criteria?: CriterionProps$1[];
186
+ criteria?: CriterionProps$2[];
187
187
  choices?: BadgeActivityProps[];
188
188
  canSubmit?: boolean;
189
189
  finishedAt?: string;
@@ -214,7 +214,7 @@ declare const Badge: (props: BadgeProps) => JSX.Element;
214
214
  /**
215
215
  * CriterionProps
216
216
  */
217
- type CriterionProps = {
217
+ type CriterionProps$1 = {
218
218
  criterionId?: string;
219
219
  displayName?: string;
220
220
  namespace?: string;
@@ -225,7 +225,7 @@ type CriterionProps = {
225
225
  * BadgeActivityMenuProps
226
226
  */
227
227
  type BadgeActivityMenuProps = {
228
- criteria?: CriterionProps[];
228
+ criteria?: CriterionProps$1[];
229
229
  onBack?: () => void;
230
230
  };
231
231
  /**
@@ -274,6 +274,65 @@ type BadgeSuccessDialogProps = {
274
274
  */
275
275
  declare const BadgeSuccessDialog: (props: BadgeSuccessDialogProps) => JSX.Element;
276
276
 
277
+ /**
278
+ * BadgesListProps
279
+ */
280
+ type BadgesListProps = {
281
+ badges: BadgeProps[];
282
+ isLoading?: boolean;
283
+ list?: boolean;
284
+ onToggleLayout?: (next: boolean) => void;
285
+ };
286
+ /**
287
+ * The full-page "My Badges" grid — the expanded sibling of the Home page's `BadgesCard` widget.
288
+ * Purely presentational, same as `BadgesCard`: each card's `onOpen` (already supplied by
289
+ * `useBadges` in the hub app) is expected to navigate to the existing badge detail page, which
290
+ * already drills into the existing lesson page — this component only needs to get the grid right.
291
+ * Grid/list toggle mirrors `PathwaysCard`/`BadgesCard`'s existing controlled/uncontrolled `list`
292
+ * prop pattern. List rows omit the mockup's progress bar and points figure — both are sourced
293
+ * from lesson-level data that isn't available at this list's data granularity.
294
+ * @param props
295
+ * @constructor
296
+ */
297
+ declare const BadgesList: (props: BadgesListProps) => JSX.Element;
298
+
299
+ /**
300
+ * CriterionProps
301
+ */
302
+ type CriterionProps = {
303
+ criterionId?: string;
304
+ displayName?: string;
305
+ namespace?: string;
306
+ options?: BadgeActivityProps[];
307
+ };
308
+ /**
309
+ * BadgeDetailProps
310
+ */
311
+ type BadgeDetailProps = {
312
+ icon?: IconName$1;
313
+ iconURL?: string;
314
+ imageURL?: string;
315
+ displayName?: string;
316
+ level?: number;
317
+ summary?: string;
318
+ criteria?: CriterionProps[];
319
+ choices?: BadgeActivityProps[];
320
+ canSubmit?: boolean;
321
+ finishedAt?: string;
322
+ onBack?: () => void;
323
+ onSubmit?: () => void;
324
+ };
325
+ /**
326
+ * The full-page single-badge detail — the mockup's "Badge Detail" screen. Data-wiring (criteria/
327
+ * choice cross-reference, Start/Continue/Review button state, Submit gating) mirrors the existing
328
+ * `BadgeCard` verbatim; only the markup/styling is new. Each criterion row's button reuses
329
+ * `choice.onClick`, already wired (in the hub app's `useBadge`/`withLessons`) to navigate to the
330
+ * matching lesson — this component doesn't need to know about that.
331
+ * @param props
332
+ * @constructor
333
+ */
334
+ declare const BadgeDetail: (props: BadgeDetailProps) => JSX.Element;
335
+
277
336
  /**
278
337
  * List of icons available
279
338
  */
@@ -812,7 +871,7 @@ type ProgressProps = {
812
871
  start: number;
813
872
  end: number;
814
873
  rounded?: boolean;
815
- color?: "green" | "sky-blue";
874
+ color?: "green" | "sky-blue" | "mint" | "gold";
816
875
  };
817
876
  /**
818
877
  * A component for displaying progress.
@@ -884,40 +943,6 @@ type LogServiceButtonProps = {
884
943
  */
885
944
  declare const LogServiceButton: (props: LogServiceButtonProps) => JSX.Element;
886
945
 
887
- /**
888
- * The name of a sidebar tab.
889
- */
890
- type SidebarTabName = "profile" | "pathways" | "badges" | "file-locker" | "transcript" | "portfolio";
891
- /**
892
- * A tab's live destination. Tabs with no entry here render disabled.
893
- */
894
- type SidebarLinks = Partial<Record<SidebarTabName, {
895
- href: string;
896
- }>>;
897
- /**
898
- * The signed-in student shown above the nav.
899
- */
900
- type SidebarIdentity = {
901
- avatarURL?: string;
902
- name: string;
903
- subtitle?: string;
904
- };
905
- /**
906
- * The properties for the sidebar.
907
- */
908
- type SidebarProps = {
909
- active?: SidebarTabName;
910
- links: SidebarLinks;
911
- identity?: SidebarIdentity;
912
- settingsHref?: string;
913
- disabled?: boolean;
914
- onLogout?: () => void;
915
- };
916
- /**
917
- * A component for navigating between the student's home page sections.
918
- */
919
- declare const Sidebar: (props: SidebarProps) => JSX.Element;
920
-
921
946
  /**
922
947
  * StopwatchProps
923
948
  */
@@ -1124,6 +1149,243 @@ type PathwayButtonProps = {
1124
1149
  };
1125
1150
  declare const PathwayButton: (props: PathwayButtonProps) => JSX.Element;
1126
1151
 
1152
+ /**
1153
+ * A single pathway as rendered by the dashboard - the same shape `PathwaySection` already
1154
+ * consumes (see `usePathways` in the hub app), so this is a drop-in replacement for the data.
1155
+ */
1156
+ type PathwayItem = PathwayCardProps & {
1157
+ pathwayId?: string;
1158
+ onClick?: () => void;
1159
+ };
1160
+ /**
1161
+ * PathwaysCardProps
1162
+ */
1163
+ type PathwaysCardProps = {
1164
+ pathways: PathwayItem[];
1165
+ isLoading?: boolean;
1166
+ list?: boolean;
1167
+ onToggleLayout?: (next: boolean) => void;
1168
+ };
1169
+ /**
1170
+ * The student dashboard's "My Pathways & Seals" card - a presentational replacement for
1171
+ * `PathwaySection` scoped to the Home page. Keeps the same list/grid-toggle behavior; the
1172
+ * in-progress/completed/available/locked grouping isn't reproduced because `PathwaySection`'s
1173
+ * own grouping is currently stubbed (everything lands in "in progress"), so a flat grid is
1174
+ * behaviorally equivalent to what ships today.
1175
+ * @param props
1176
+ * @constructor
1177
+ */
1178
+ declare const PathwaysCard: (props: PathwaysCardProps) => JSX.Element;
1179
+
1180
+ /**
1181
+ * PathwaysListProps
1182
+ */
1183
+ type PathwaysListProps = {
1184
+ pathways: PathwayItem[];
1185
+ };
1186
+ /**
1187
+ * The full-page "My Pathways & Seals" list — the expanded, grid-of-large-cards sibling of the
1188
+ * Home page's `PathwaysCard` widget. Purely presentational, same as `PathwaysCard`: each card's
1189
+ * `onClick` (already supplied by `usePathways` in the hub app) is expected to navigate to the
1190
+ * existing pathway detail page, not open an in-page detail view.
1191
+ * @param props
1192
+ * @constructor
1193
+ */
1194
+ declare const PathwaysList: (props: PathwaysListProps) => JSX.Element;
1195
+
1196
+ /**
1197
+ * PathwayDetailProps
1198
+ */
1199
+ type PathwayDetailProps = PathwayCardProps & {
1200
+ onBack?: () => void;
1201
+ };
1202
+ /**
1203
+ * The full-page single-pathway detail — the mockup's "Pathway Detail" screen. Data-wiring
1204
+ * (category progress/filter, badge checklist Start/Continue/Review state) mirrors the existing
1205
+ * `PathwayOverview` verbatim; only the markup/styling is new. Each badge row's button reuses the
1206
+ * badge's own `onClick`, already wired (in the hub app's `usePathway`/`withBadges`) to navigate to
1207
+ * the matching badge detail page — this component doesn't need to know about that.
1208
+ * @param props
1209
+ * @constructor
1210
+ */
1211
+ declare const PathwayDetail: (props: PathwayDetailProps) => JSX.Element;
1212
+
1213
+ declare const PathwayTranscript: (props: PathwayCardProps) => JSX.Element;
1214
+
1215
+ /**
1216
+ * The accent cycled across dashboard pills.
1217
+ */
1218
+ type PillAccent = "cyan" | "mint" | "gold" | "slate";
1219
+ /**
1220
+ * PillProps
1221
+ */
1222
+ type PillProps = {
1223
+ label: string;
1224
+ accent?: PillAccent;
1225
+ };
1226
+ /**
1227
+ * A small accent-tinted label used for level/XP style tags across the student dashboard.
1228
+ * @param props
1229
+ * @constructor
1230
+ */
1231
+ declare const Pill: (props: PillProps) => JSX.Element;
1232
+
1233
+ /**
1234
+ * The accent cycled across dashboard stat tiles.
1235
+ */
1236
+ type StatTileAccent = "cyan" | "mint" | "gold" | "slate";
1237
+ /**
1238
+ * StatTileProps
1239
+ */
1240
+ type StatTileProps = {
1241
+ icon: IconName;
1242
+ value: string | number;
1243
+ label: string;
1244
+ accent?: StatTileAccent;
1245
+ };
1246
+ /**
1247
+ * A single icon + number + label stat tile, meant to appear in a StatTileRow.
1248
+ * @param props
1249
+ * @constructor
1250
+ */
1251
+ declare const StatTile: (props: StatTileProps) => JSX.Element;
1252
+ /**
1253
+ * StatTileRowProps
1254
+ */
1255
+ type StatTileRowProps = {
1256
+ children: React.ReactNode;
1257
+ };
1258
+ /**
1259
+ * A row layout for a set of StatTiles.
1260
+ * @param props
1261
+ * @constructor
1262
+ */
1263
+ declare const StatTileRow: (props: StatTileRowProps) => JSX.Element;
1264
+
1265
+ /**
1266
+ * ProfileHeroCardProps
1267
+ */
1268
+ type ProfileHeroCardProps = {
1269
+ isLoading?: boolean;
1270
+ avatarURL?: string;
1271
+ givenName?: string;
1272
+ familyName?: string;
1273
+ createdAt?: string;
1274
+ online?: boolean;
1275
+ impactStatement?: string;
1276
+ placeName?: string;
1277
+ communityName?: string;
1278
+ level?: number;
1279
+ xp?: number;
1280
+ nextXP?: number;
1281
+ onEdit?: () => void;
1282
+ };
1283
+ /**
1284
+ * The student dashboard's profile summary: avatar/name/meta (formerly `ProfileWidget`), bio and
1285
+ * place/community (formerly `AboutWidget`), and level/XP progress (formerly `ImpactWidget`)
1286
+ * consolidated into a single card, matching Mockup I's layout and color treatment.
1287
+ * @param props
1288
+ * @constructor
1289
+ */
1290
+ declare const ProfileHeroCard: (props: ProfileHeroCardProps) => JSX.Element;
1291
+
1292
+ /**
1293
+ * BadgesCardProps
1294
+ */
1295
+ type BadgesCardProps = {
1296
+ badges: BadgeProps[];
1297
+ isLoading?: boolean;
1298
+ list?: boolean;
1299
+ onToggleLayout?: (next: boolean) => void;
1300
+ };
1301
+ /**
1302
+ * The student dashboard's "Badges" card - a presentational replacement for `BadgeSection`
1303
+ * scoped to the Home page. Ports `BadgeSection`'s real state classification (in
1304
+ * progress/completed/available/locked, driven by `finishedAt`/`isLocked`/`startedAt`) and its
1305
+ * grid/list toggle, but shows one state at a time via a single-select tab strip
1306
+ * (`Board`'s `Tab` `secondary` variant) to match the mockup's tab look, rather than
1307
+ * `BadgeSection`'s original multi-select filter pills.
1308
+ * @param props
1309
+ * @constructor
1310
+ */
1311
+ declare const BadgesCard: (props: BadgesCardProps) => JSX.Element;
1312
+
1313
+ /**
1314
+ * DashboardShellProps
1315
+ */
1316
+ type DashboardShellProps = {
1317
+ sidebar: React.ReactNode;
1318
+ topBar?: React.ReactNode;
1319
+ isLoading?: boolean;
1320
+ children?: React.ReactNode;
1321
+ };
1322
+ /**
1323
+ * The student-facing app's page shell: a full-height row with the sidebar and content pane as
1324
+ * siblings, so the content pane (with its own top bar) can scroll independently of the sidebar.
1325
+ * Used across the student side of the app (Home, Pathway/Badge detail pages, etc.) in place of
1326
+ * bare `AuthLayout` usage — `AuthLayout` itself is untouched, still used for non-student surfaces.
1327
+ * Renders the shared `Footer` at the bottom of the scrollable content, pinned to the viewport
1328
+ * bottom on short pages and pushed below content on long ones (standard sticky-footer behavior).
1329
+ * @param props
1330
+ * @constructor
1331
+ */
1332
+ declare const DashboardShell: (props: DashboardShellProps) => JSX.Element;
1333
+
1334
+ /**
1335
+ * The name of a dashboard sidebar tab.
1336
+ */
1337
+ type DashboardSidebarTabName = "profile" | "pathways" | "badges" | "file-locker" | "transcript" | "portfolio" | "comments";
1338
+ /**
1339
+ * A tab's live destination. Tabs with no entry here render disabled.
1340
+ */
1341
+ type DashboardSidebarLinks = Partial<Record<DashboardSidebarTabName, {
1342
+ href: string;
1343
+ }>>;
1344
+ /**
1345
+ * The signed-in student shown above the nav.
1346
+ */
1347
+ type DashboardSidebarIdentity = {
1348
+ avatarURL?: string;
1349
+ name: string;
1350
+ subtitle?: string;
1351
+ online?: boolean;
1352
+ };
1353
+ /**
1354
+ * The properties for the dashboard sidebar.
1355
+ */
1356
+ type DashboardSidebarProps = {
1357
+ active?: DashboardSidebarTabName;
1358
+ links: DashboardSidebarLinks;
1359
+ identity?: DashboardSidebarIdentity;
1360
+ disabled?: boolean;
1361
+ onSwitchAccount?: () => void;
1362
+ onLogout?: () => void;
1363
+ };
1364
+ /**
1365
+ * The single left nav used across the whole student side of the app (Home, Pathway/Badge detail
1366
+ * pages, and any future page that adopts `DashboardShell`) — never render a page-specific copy of
1367
+ * this. Tabs with no matching `links` entry render disabled, which is how not-yet-built
1368
+ * destinations (File Locker, Transcript, Portfolio, Comments) show up today.
1369
+ */
1370
+ declare const DashboardSidebar: (props: DashboardSidebarProps) => JSX.Element;
1371
+
1372
+ /**
1373
+ * DashboardTopBarProps
1374
+ */
1375
+ type DashboardTopBarProps = {
1376
+ eyebrow?: string;
1377
+ title: string;
1378
+ children?: React.ReactNode;
1379
+ onNotifications?: () => void;
1380
+ };
1381
+ /**
1382
+ * The persistent bar above the dashboard's scrollable content: a page heading on the left,
1383
+ * notifications and a primary action slot (e.g. LogServiceButton) on the right.
1384
+ * @param props
1385
+ * @constructor
1386
+ */
1387
+ declare const DashboardTopBar: (props: DashboardTopBarProps) => JSX.Element;
1388
+
1127
1389
  /**
1128
1390
  * AuthLayoutProps
1129
1391
  */
@@ -1171,24 +1433,4 @@ type HomeLayoutProps = {
1171
1433
  */
1172
1434
  declare const HomeLayout: (props: HomeLayoutProps) => JSX.Element;
1173
1435
 
1174
- /**
1175
- * SidebarLayoutProps
1176
- */
1177
- type SidebarLayoutProps = Omit<AuthLayoutProps, "sidebar" | "children" | "topNav" | "page" | "onProfile"> & {
1178
- active?: SidebarTabName;
1179
- links: SidebarLinks;
1180
- identity?: SidebarIdentity;
1181
- settingsHref?: string;
1182
- sidebarExtra?: React__default.ReactNode;
1183
- };
1184
- /**
1185
- * SidebarLayout
1186
- *
1187
- * AuthLayout with the student home-page Sidebar pre-wired into its sidebar slot.
1188
- * Reused by every page that adopts the new left nav, not just one page - the
1189
- * caller still supplies header/subheader/main the same way it would for AuthLayout directly.
1190
- * @constructor
1191
- */
1192
- declare const SidebarLayout: (props: SidebarLayoutProps) => JSX.Element;
1193
-
1194
- export { AboutWidget, AboutWidgetProps, AchievementWidget, AchievementWidgetProps, ActivityCard, ActivityCardProps, ActivityItem, ActivityItemProps, ActivityList, ActivityListProps, ActivityReflection, ActivityReflectionProps, AuthLayout, AuthLayoutProps, Badge, BadgeActivityMenu, BadgeActivityMenuProps, BadgeFilterOption, BadgeProps, BadgeSection, BadgeSectionProps, BadgeSuccessDialog, BadgeSuccessDialogProps, Board, BoardProps, Button, ButtonBorder, ButtonColor, ButtonFilter, ButtonJustify, ButtonProps, ButtonSize, ButtonSpacing, ButtonTheme, Card, CardProps, CtaListProps, DateSelection, DateSelectionProps, DaySelectionOptionProps, EventItem, EventItemProps, EventList, EventListProps, Footer, 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, PathwayFilter, PathwayFilterOption, PathwayFilterProps, PathwayProgress, PathwayProgressHeight, PathwayProgressProps, PathwayProps, PathwaySection, PathwaySectionProps, PathwayWidget, PathwayWidgetProps, ProfileWidget, Progress, ProgressProps, ResidentWidgetProps, Search, SearchButton, SearchButtonProps, SearchProps, SearchResult, SearchResultProps, SettingsCard, SettingsCardProps, Sidebar, SidebarIdentity, SidebarLayout, SidebarLayoutProps, SidebarLinks, SidebarProps, SidebarTabName, Stopwatch, StopwatchProps, Tab, TabProps, TagFilter, TagFilterProps, TaskItem, TaskItemProps, TaskList, TaskListProps, Widget, WidgetBody, WidgetBodyProps, WidgetHeader, WidgetHeaderLink, WidgetHeaderLinkProps, WidgetHeaderProps, WidgetProps, WidgetTitle, WidgetTitleProps };
1436
+ 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, CtaListProps, DashboardShell, DashboardShellProps, DashboardSidebar, DashboardSidebarIdentity, DashboardSidebarLinks, DashboardSidebarProps, DashboardSidebarTabName, DashboardTopBar, DashboardTopBarProps, DateSelection, DateSelectionProps, DaySelectionOptionProps, EventItem, EventItemProps, EventList, EventListProps, Footer, 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, StatTile, StatTileAccent, StatTileProps, StatTileRow, StatTileRowProps, Stopwatch, StopwatchProps, Tab, TabProps, TagFilter, TagFilterProps, TaskItem, TaskItemProps, TaskList, TaskListProps, Widget, WidgetBody, WidgetBodyProps, WidgetHeader, WidgetHeaderLink, WidgetHeaderLinkProps, WidgetHeaderProps, WidgetProps, WidgetTitle, WidgetTitleProps };