@local-civics/hub-ui 0.1.210 → 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 +128 -34
- package/dist/index.js +729 -330
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +726 -332
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ type BadgeActivityProps = {
|
|
|
166
166
|
/**
|
|
167
167
|
* CriterionProps
|
|
168
168
|
*/
|
|
169
|
-
type CriterionProps$
|
|
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$
|
|
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.
|
|
@@ -1090,6 +1149,69 @@ type PathwayButtonProps = {
|
|
|
1090
1149
|
};
|
|
1091
1150
|
declare const PathwayButton: (props: PathwayButtonProps) => JSX.Element;
|
|
1092
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
|
+
|
|
1093
1215
|
/**
|
|
1094
1216
|
* The accent cycled across dashboard pills.
|
|
1095
1217
|
*/
|
|
@@ -1167,34 +1289,6 @@ type ProfileHeroCardProps = {
|
|
|
1167
1289
|
*/
|
|
1168
1290
|
declare const ProfileHeroCard: (props: ProfileHeroCardProps) => JSX.Element;
|
|
1169
1291
|
|
|
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
1292
|
/**
|
|
1199
1293
|
* BadgesCardProps
|
|
1200
1294
|
*/
|
|
@@ -1339,4 +1433,4 @@ type HomeLayoutProps = {
|
|
|
1339
1433
|
*/
|
|
1340
1434
|
declare const HomeLayout: (props: HomeLayoutProps) => JSX.Element;
|
|
1341
1435
|
|
|
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 };
|
|
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 };
|