@local-civics/hub-ui 0.1.209 → 0.1.210
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 +203 -55
- package/dist/index.js +748 -533
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +741 -533
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -884,40 +884,6 @@ type LogServiceButtonProps = {
|
|
|
884
884
|
*/
|
|
885
885
|
declare const LogServiceButton: (props: LogServiceButtonProps) => JSX.Element;
|
|
886
886
|
|
|
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
887
|
/**
|
|
922
888
|
* StopwatchProps
|
|
923
889
|
*/
|
|
@@ -1124,6 +1090,208 @@ type PathwayButtonProps = {
|
|
|
1124
1090
|
};
|
|
1125
1091
|
declare const PathwayButton: (props: PathwayButtonProps) => JSX.Element;
|
|
1126
1092
|
|
|
1093
|
+
/**
|
|
1094
|
+
* The accent cycled across dashboard pills.
|
|
1095
|
+
*/
|
|
1096
|
+
type PillAccent = "cyan" | "mint" | "gold" | "slate";
|
|
1097
|
+
/**
|
|
1098
|
+
* PillProps
|
|
1099
|
+
*/
|
|
1100
|
+
type PillProps = {
|
|
1101
|
+
label: string;
|
|
1102
|
+
accent?: PillAccent;
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* A small accent-tinted label used for level/XP style tags across the student dashboard.
|
|
1106
|
+
* @param props
|
|
1107
|
+
* @constructor
|
|
1108
|
+
*/
|
|
1109
|
+
declare const Pill: (props: PillProps) => JSX.Element;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* The accent cycled across dashboard stat tiles.
|
|
1113
|
+
*/
|
|
1114
|
+
type StatTileAccent = "cyan" | "mint" | "gold" | "slate";
|
|
1115
|
+
/**
|
|
1116
|
+
* StatTileProps
|
|
1117
|
+
*/
|
|
1118
|
+
type StatTileProps = {
|
|
1119
|
+
icon: IconName;
|
|
1120
|
+
value: string | number;
|
|
1121
|
+
label: string;
|
|
1122
|
+
accent?: StatTileAccent;
|
|
1123
|
+
};
|
|
1124
|
+
/**
|
|
1125
|
+
* A single icon + number + label stat tile, meant to appear in a StatTileRow.
|
|
1126
|
+
* @param props
|
|
1127
|
+
* @constructor
|
|
1128
|
+
*/
|
|
1129
|
+
declare const StatTile: (props: StatTileProps) => JSX.Element;
|
|
1130
|
+
/**
|
|
1131
|
+
* StatTileRowProps
|
|
1132
|
+
*/
|
|
1133
|
+
type StatTileRowProps = {
|
|
1134
|
+
children: React.ReactNode;
|
|
1135
|
+
};
|
|
1136
|
+
/**
|
|
1137
|
+
* A row layout for a set of StatTiles.
|
|
1138
|
+
* @param props
|
|
1139
|
+
* @constructor
|
|
1140
|
+
*/
|
|
1141
|
+
declare const StatTileRow: (props: StatTileRowProps) => JSX.Element;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* ProfileHeroCardProps
|
|
1145
|
+
*/
|
|
1146
|
+
type ProfileHeroCardProps = {
|
|
1147
|
+
isLoading?: boolean;
|
|
1148
|
+
avatarURL?: string;
|
|
1149
|
+
givenName?: string;
|
|
1150
|
+
familyName?: string;
|
|
1151
|
+
createdAt?: string;
|
|
1152
|
+
online?: boolean;
|
|
1153
|
+
impactStatement?: string;
|
|
1154
|
+
placeName?: string;
|
|
1155
|
+
communityName?: string;
|
|
1156
|
+
level?: number;
|
|
1157
|
+
xp?: number;
|
|
1158
|
+
nextXP?: number;
|
|
1159
|
+
onEdit?: () => void;
|
|
1160
|
+
};
|
|
1161
|
+
/**
|
|
1162
|
+
* The student dashboard's profile summary: avatar/name/meta (formerly `ProfileWidget`), bio and
|
|
1163
|
+
* place/community (formerly `AboutWidget`), and level/XP progress (formerly `ImpactWidget`)
|
|
1164
|
+
* consolidated into a single card, matching Mockup I's layout and color treatment.
|
|
1165
|
+
* @param props
|
|
1166
|
+
* @constructor
|
|
1167
|
+
*/
|
|
1168
|
+
declare const ProfileHeroCard: (props: ProfileHeroCardProps) => JSX.Element;
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* A single pathway as rendered by the dashboard - the same shape `PathwaySection` already
|
|
1172
|
+
* consumes (see `usePathways` in the hub app), so this is a drop-in replacement for the data.
|
|
1173
|
+
*/
|
|
1174
|
+
type PathwayItem = PathwayCardProps & {
|
|
1175
|
+
pathwayId?: string;
|
|
1176
|
+
onClick?: () => void;
|
|
1177
|
+
};
|
|
1178
|
+
/**
|
|
1179
|
+
* PathwaysCardProps
|
|
1180
|
+
*/
|
|
1181
|
+
type PathwaysCardProps = {
|
|
1182
|
+
pathways: PathwayItem[];
|
|
1183
|
+
isLoading?: boolean;
|
|
1184
|
+
list?: boolean;
|
|
1185
|
+
onToggleLayout?: (next: boolean) => void;
|
|
1186
|
+
};
|
|
1187
|
+
/**
|
|
1188
|
+
* The student dashboard's "My Pathways & Seals" card - a presentational replacement for
|
|
1189
|
+
* `PathwaySection` scoped to the Home page. Keeps the same list/grid-toggle behavior; the
|
|
1190
|
+
* in-progress/completed/available/locked grouping isn't reproduced because `PathwaySection`'s
|
|
1191
|
+
* own grouping is currently stubbed (everything lands in "in progress"), so a flat grid is
|
|
1192
|
+
* behaviorally equivalent to what ships today.
|
|
1193
|
+
* @param props
|
|
1194
|
+
* @constructor
|
|
1195
|
+
*/
|
|
1196
|
+
declare const PathwaysCard: (props: PathwaysCardProps) => JSX.Element;
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* BadgesCardProps
|
|
1200
|
+
*/
|
|
1201
|
+
type BadgesCardProps = {
|
|
1202
|
+
badges: BadgeProps[];
|
|
1203
|
+
isLoading?: boolean;
|
|
1204
|
+
list?: boolean;
|
|
1205
|
+
onToggleLayout?: (next: boolean) => void;
|
|
1206
|
+
};
|
|
1207
|
+
/**
|
|
1208
|
+
* The student dashboard's "Badges" card - a presentational replacement for `BadgeSection`
|
|
1209
|
+
* scoped to the Home page. Ports `BadgeSection`'s real state classification (in
|
|
1210
|
+
* progress/completed/available/locked, driven by `finishedAt`/`isLocked`/`startedAt`) and its
|
|
1211
|
+
* grid/list toggle, but shows one state at a time via a single-select tab strip
|
|
1212
|
+
* (`Board`'s `Tab` `secondary` variant) to match the mockup's tab look, rather than
|
|
1213
|
+
* `BadgeSection`'s original multi-select filter pills.
|
|
1214
|
+
* @param props
|
|
1215
|
+
* @constructor
|
|
1216
|
+
*/
|
|
1217
|
+
declare const BadgesCard: (props: BadgesCardProps) => JSX.Element;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* DashboardShellProps
|
|
1221
|
+
*/
|
|
1222
|
+
type DashboardShellProps = {
|
|
1223
|
+
sidebar: React.ReactNode;
|
|
1224
|
+
topBar?: React.ReactNode;
|
|
1225
|
+
isLoading?: boolean;
|
|
1226
|
+
children?: React.ReactNode;
|
|
1227
|
+
};
|
|
1228
|
+
/**
|
|
1229
|
+
* The student-facing app's page shell: a full-height row with the sidebar and content pane as
|
|
1230
|
+
* siblings, so the content pane (with its own top bar) can scroll independently of the sidebar.
|
|
1231
|
+
* Used across the student side of the app (Home, Pathway/Badge detail pages, etc.) in place of
|
|
1232
|
+
* bare `AuthLayout` usage — `AuthLayout` itself is untouched, still used for non-student surfaces.
|
|
1233
|
+
* Renders the shared `Footer` at the bottom of the scrollable content, pinned to the viewport
|
|
1234
|
+
* bottom on short pages and pushed below content on long ones (standard sticky-footer behavior).
|
|
1235
|
+
* @param props
|
|
1236
|
+
* @constructor
|
|
1237
|
+
*/
|
|
1238
|
+
declare const DashboardShell: (props: DashboardShellProps) => JSX.Element;
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* The name of a dashboard sidebar tab.
|
|
1242
|
+
*/
|
|
1243
|
+
type DashboardSidebarTabName = "profile" | "pathways" | "badges" | "file-locker" | "transcript" | "portfolio" | "comments";
|
|
1244
|
+
/**
|
|
1245
|
+
* A tab's live destination. Tabs with no entry here render disabled.
|
|
1246
|
+
*/
|
|
1247
|
+
type DashboardSidebarLinks = Partial<Record<DashboardSidebarTabName, {
|
|
1248
|
+
href: string;
|
|
1249
|
+
}>>;
|
|
1250
|
+
/**
|
|
1251
|
+
* The signed-in student shown above the nav.
|
|
1252
|
+
*/
|
|
1253
|
+
type DashboardSidebarIdentity = {
|
|
1254
|
+
avatarURL?: string;
|
|
1255
|
+
name: string;
|
|
1256
|
+
subtitle?: string;
|
|
1257
|
+
online?: boolean;
|
|
1258
|
+
};
|
|
1259
|
+
/**
|
|
1260
|
+
* The properties for the dashboard sidebar.
|
|
1261
|
+
*/
|
|
1262
|
+
type DashboardSidebarProps = {
|
|
1263
|
+
active?: DashboardSidebarTabName;
|
|
1264
|
+
links: DashboardSidebarLinks;
|
|
1265
|
+
identity?: DashboardSidebarIdentity;
|
|
1266
|
+
disabled?: boolean;
|
|
1267
|
+
onSwitchAccount?: () => void;
|
|
1268
|
+
onLogout?: () => void;
|
|
1269
|
+
};
|
|
1270
|
+
/**
|
|
1271
|
+
* The single left nav used across the whole student side of the app (Home, Pathway/Badge detail
|
|
1272
|
+
* pages, and any future page that adopts `DashboardShell`) — never render a page-specific copy of
|
|
1273
|
+
* this. Tabs with no matching `links` entry render disabled, which is how not-yet-built
|
|
1274
|
+
* destinations (File Locker, Transcript, Portfolio, Comments) show up today.
|
|
1275
|
+
*/
|
|
1276
|
+
declare const DashboardSidebar: (props: DashboardSidebarProps) => JSX.Element;
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* DashboardTopBarProps
|
|
1280
|
+
*/
|
|
1281
|
+
type DashboardTopBarProps = {
|
|
1282
|
+
eyebrow?: string;
|
|
1283
|
+
title: string;
|
|
1284
|
+
children?: React.ReactNode;
|
|
1285
|
+
onNotifications?: () => void;
|
|
1286
|
+
};
|
|
1287
|
+
/**
|
|
1288
|
+
* The persistent bar above the dashboard's scrollable content: a page heading on the left,
|
|
1289
|
+
* notifications and a primary action slot (e.g. LogServiceButton) on the right.
|
|
1290
|
+
* @param props
|
|
1291
|
+
* @constructor
|
|
1292
|
+
*/
|
|
1293
|
+
declare const DashboardTopBar: (props: DashboardTopBarProps) => JSX.Element;
|
|
1294
|
+
|
|
1127
1295
|
/**
|
|
1128
1296
|
* AuthLayoutProps
|
|
1129
1297
|
*/
|
|
@@ -1171,24 +1339,4 @@ type HomeLayoutProps = {
|
|
|
1171
1339
|
*/
|
|
1172
1340
|
declare const HomeLayout: (props: HomeLayoutProps) => JSX.Element;
|
|
1173
1341
|
|
|
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 };
|
|
1342
|
+
export { AboutWidget, AboutWidgetProps, AchievementWidget, AchievementWidgetProps, ActivityCard, ActivityCardProps, ActivityItem, ActivityItemProps, ActivityList, ActivityListProps, ActivityReflection, ActivityReflectionProps, AuthLayout, AuthLayoutProps, Badge, BadgeActivityMenu, BadgeActivityMenuProps, BadgeFilterOption, BadgeProps, BadgeSection, BadgeSectionProps, BadgeSuccessDialog, BadgeSuccessDialogProps, BadgesCard, BadgesCardProps, 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, PathwayFilter, PathwayFilterOption, PathwayFilterProps, PathwayItem, PathwayProgress, PathwayProgressHeight, PathwayProgressProps, PathwayProps, PathwaySection, PathwaySectionProps, PathwayWidget, PathwayWidgetProps, PathwaysCard, PathwaysCardProps, 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 };
|