@local-civics/hub-ui 0.1.258 → 0.1.259
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 +16 -5
- package/dist/index.js +164 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +165 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -565,7 +565,7 @@ type FormItemProps = {
|
|
|
565
565
|
responses?: string[];
|
|
566
566
|
minText?: number;
|
|
567
567
|
children?: React__default.ReactNode;
|
|
568
|
-
onResponseChange?: (responses?: string[], file?: Blob) => void
|
|
568
|
+
onResponseChange?: (responses?: string[], file?: Blob) => void | Promise<unknown>;
|
|
569
569
|
onTextBlur?: () => void;
|
|
570
570
|
};
|
|
571
571
|
|
|
@@ -586,6 +586,7 @@ type LearningFormProps = {
|
|
|
586
586
|
elapsedTime?: number;
|
|
587
587
|
stopWatchStarted?: boolean;
|
|
588
588
|
stopWatch?: React__default.ReactNode;
|
|
589
|
+
submitted?: boolean;
|
|
589
590
|
onBackToBadge?: () => void;
|
|
590
591
|
backToBadgeLabel?: string;
|
|
591
592
|
onEditLesson?: () => void;
|
|
@@ -617,6 +618,12 @@ type LoaderProps = {
|
|
|
617
618
|
* content happens to compute to.
|
|
618
619
|
*/
|
|
619
620
|
label?: string;
|
|
621
|
+
/**
|
|
622
|
+
* With a label, put the spinner a quarter of the way down the screen instead of centering it in
|
|
623
|
+
* the content's full height. The content is laid out (invisibly) while loading, so a tall page
|
|
624
|
+
* would otherwise push a centered spinner below the fold. Used by DashboardShell.
|
|
625
|
+
*/
|
|
626
|
+
anchorTop?: boolean;
|
|
620
627
|
};
|
|
621
628
|
/**
|
|
622
629
|
* A component for content that is not ready to be displayed.
|
|
@@ -1383,7 +1390,8 @@ type BadgesCardProps = {
|
|
|
1383
1390
|
* progress/completed/available/locked, driven by `finishedAt`/`isLocked`/`startedAt`) and its
|
|
1384
1391
|
* grid/list toggle, but shows one state at a time via a single-select tab strip
|
|
1385
1392
|
* (`Board`'s `Tab` `secondary` variant) to match the mockup's tab look, rather than
|
|
1386
|
-
* `BadgeSection`'s original multi-select filter pills.
|
|
1393
|
+
* `BadgeSection`'s original multi-select filter pills. The body is capped at about three rows of
|
|
1394
|
+
* tiles with its own scrollbar (see ExpandableBody), so a long tab doesn't stretch the page.
|
|
1387
1395
|
* @param props
|
|
1388
1396
|
* @constructor
|
|
1389
1397
|
*/
|
|
@@ -1416,6 +1424,7 @@ type CommentsCardProps = {
|
|
|
1416
1424
|
onViewAll?: () => void;
|
|
1417
1425
|
onBadgeClick?: (badgeId: string) => void;
|
|
1418
1426
|
onLessonClick?: (lessonId: string) => void;
|
|
1427
|
+
collapsible?: boolean;
|
|
1419
1428
|
};
|
|
1420
1429
|
/**
|
|
1421
1430
|
* My Profile's "Comments" summary card - a presentational sibling to PathwaysCard/BadgesCard.
|
|
@@ -1424,6 +1433,8 @@ type CommentsCardProps = {
|
|
|
1424
1433
|
* Needs submission / Resolved), then the most recent comments themselves, each with a hyperlink
|
|
1425
1434
|
* straight to the badge/lesson it concerns. "View All" is the same destination the sidebar's own
|
|
1426
1435
|
* Comments tab already points at - this card is a summary of that page, not a replacement for it.
|
|
1436
|
+
* With `collapsible`, it starts as just the header and counts; expanding shows the full card and
|
|
1437
|
+
* scrolls it into view.
|
|
1427
1438
|
* @param props
|
|
1428
1439
|
* @constructor
|
|
1429
1440
|
*/
|
|
@@ -1436,11 +1447,11 @@ type DashboardShellProps = {
|
|
|
1436
1447
|
sidebar: React.ReactNode;
|
|
1437
1448
|
topBar?: React.ReactNode;
|
|
1438
1449
|
isLoading?: boolean;
|
|
1439
|
-
/**
|
|
1450
|
+
/** Text shown beneath the loading spinner (e.g. "Loading dashboard activity..."). Defaults to "Loading…". */
|
|
1440
1451
|
loadingLabel?: string;
|
|
1441
|
-
/** Spinner width/height in px while loading.
|
|
1452
|
+
/** Spinner width/height in px while loading. Defaults to 40. */
|
|
1442
1453
|
loadingSize?: number;
|
|
1443
|
-
/** Tailwind stroke color class for the loading spinner.
|
|
1454
|
+
/** Tailwind stroke color class for the loading spinner. Defaults to "stroke-sky-blue-400". */
|
|
1444
1455
|
loadingStrokeClassName?: string;
|
|
1445
1456
|
children?: React.ReactNode;
|
|
1446
1457
|
};
|