@local-civics/hub-ui 0.1.226 → 0.1.228
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 +29 -3
- package/dist/index.js +87 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -605,6 +605,18 @@ declare const LearningForm: (props: LearningFormProps) => JSX.Element;
|
|
|
605
605
|
type LoaderProps = {
|
|
606
606
|
isLoading?: boolean;
|
|
607
607
|
children: React__default.ReactNode;
|
|
608
|
+
/** Spinner width/height in px. Defaults to 35 (the original, small size) when omitted. */
|
|
609
|
+
size?: number;
|
|
610
|
+
/** Tailwind stroke color class for the spinner. Defaults to "stroke-sky-300" (the original, low-contrast color) when omitted. */
|
|
611
|
+
strokeClassName?: string;
|
|
612
|
+
/**
|
|
613
|
+
* Optional contextual text rendered beneath the spinner (e.g. "Loading dashboard activity...").
|
|
614
|
+
* Omitting it preserves the original bare-spinner layout exactly; passing it switches to a
|
|
615
|
+
* centered column with a min-height floor, so the spinner+text pair reliably centers within the
|
|
616
|
+
* content pane instead of drifting toward whatever height the (still-loading, mostly empty)
|
|
617
|
+
* content happens to compute to.
|
|
618
|
+
*/
|
|
619
|
+
label?: string;
|
|
608
620
|
};
|
|
609
621
|
/**
|
|
610
622
|
* A component for content that is not ready to be displayed.
|
|
@@ -1128,6 +1140,10 @@ type BadgeItem = {
|
|
|
1128
1140
|
weight: number;
|
|
1129
1141
|
iconURL?: string;
|
|
1130
1142
|
onClick?: () => void;
|
|
1143
|
+
lessonIds?: string[];
|
|
1144
|
+
inProgress?: boolean;
|
|
1145
|
+
submittedLessons?: number;
|
|
1146
|
+
totalLessons?: number;
|
|
1131
1147
|
};
|
|
1132
1148
|
type PathwayCriteria = Record<string, number>;
|
|
1133
1149
|
type PathwayCategory = {
|
|
@@ -1268,9 +1284,9 @@ declare const PathwayDetail: (props: PathwayDetailProps) => JSX.Element;
|
|
|
1268
1284
|
* shown on `PathwayDetail`, condensed into a record-style layout. Toggled alongside
|
|
1269
1285
|
* `PathwayDetail` from `Pathway.tsx`, not a routed page of its own.
|
|
1270
1286
|
*
|
|
1271
|
-
* In-progress
|
|
1272
|
-
* `
|
|
1273
|
-
*
|
|
1287
|
+
* In-progress badges are cross-referenced against this student's own submitted lesson answers
|
|
1288
|
+
* (`badge.inProgress`/`submittedLessons`/`totalLessons`, computed in hub's `usePathway()`) rather
|
|
1289
|
+
* than the badge's own possibly-unset `startedAt` flag alone.
|
|
1274
1290
|
* @param props
|
|
1275
1291
|
* @constructor
|
|
1276
1292
|
*/
|
|
@@ -1381,6 +1397,12 @@ type DashboardShellProps = {
|
|
|
1381
1397
|
sidebar: React.ReactNode;
|
|
1382
1398
|
topBar?: React.ReactNode;
|
|
1383
1399
|
isLoading?: boolean;
|
|
1400
|
+
/** Contextual text shown beneath the loading spinner (e.g. "Loading dashboard activity..."). Omit to keep the original bare-spinner loading state. */
|
|
1401
|
+
loadingLabel?: string;
|
|
1402
|
+
/** Spinner width/height in px while loading. Omit to keep the original small (35px) spinner. */
|
|
1403
|
+
loadingSize?: number;
|
|
1404
|
+
/** Tailwind stroke color class for the loading spinner. Omit to keep the original low-contrast default. */
|
|
1405
|
+
loadingStrokeClassName?: string;
|
|
1384
1406
|
children?: React.ReactNode;
|
|
1385
1407
|
};
|
|
1386
1408
|
/**
|
|
@@ -1390,6 +1412,10 @@ type DashboardShellProps = {
|
|
|
1390
1412
|
* bare `AuthLayout` usage — `AuthLayout` itself is untouched, still used for non-student surfaces.
|
|
1391
1413
|
* Renders the shared `Footer` at the bottom of the scrollable content, pinned to the viewport
|
|
1392
1414
|
* bottom on short pages and pushed below content on long ones (standard sticky-footer behavior).
|
|
1415
|
+
* On print (`window.print()`), the sidebar/topbar/footer chrome is hidden and the fixed-viewport
|
|
1416
|
+
* height/overflow constraints are relaxed so the page content paginates naturally instead of being
|
|
1417
|
+
* clipped to one screen's worth of height - no page opts into this, it's a universal print rule
|
|
1418
|
+
* since no legitimate use case wants nav chrome printed alongside a page's content.
|
|
1393
1419
|
* @param props
|
|
1394
1420
|
* @constructor
|
|
1395
1421
|
*/
|