@hydralms/components 0.1.0
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/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/assessment-toolbar/assessment-toolbar.d.ts +2 -0
- package/dist/assessment-toolbar/index.d.ts +4 -0
- package/dist/assessment-toolbar/question-navigator.d.ts +2 -0
- package/dist/assessment-toolbar/timer-display.d.ts +2 -0
- package/dist/assessment-toolbar/types.d.ts +89 -0
- package/dist/common/confirm-dialog.d.ts +2 -0
- package/dist/common/due-date-display.d.ts +2 -0
- package/dist/common/empty-state.d.ts +2 -0
- package/dist/common/index.d.ts +6 -0
- package/dist/common/search-input.d.ts +2 -0
- package/dist/common/status-badge.d.ts +2 -0
- package/dist/common/types.d.ts +124 -0
- package/dist/components.css +1 -0
- package/dist/content/content-block.d.ts +2 -0
- package/dist/content/file-upload-zone.d.ts +2 -0
- package/dist/content/index.d.ts +3 -0
- package/dist/content/types.d.ts +95 -0
- package/dist/curriculum/curriculum-item.d.ts +2 -0
- package/dist/curriculum/curriculum-tree.d.ts +2 -0
- package/dist/curriculum/index.d.ts +4 -0
- package/dist/curriculum/learning-object-icon.d.ts +2 -0
- package/dist/curriculum/types.d.ts +79 -0
- package/dist/feedback/feedback-banner.d.ts +2 -0
- package/dist/feedback/index.d.ts +4 -0
- package/dist/feedback/likert-scale.d.ts +2 -0
- package/dist/feedback/star-rating.d.ts +2 -0
- package/dist/feedback/types.d.ts +83 -0
- package/dist/flashcards/flashcard-deck.d.ts +2 -0
- package/dist/flashcards/flashcard.d.ts +2 -0
- package/dist/flashcards/index.d.ts +3 -0
- package/dist/flashcards/types.d.ts +58 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +159 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/progress/grade-indicator.d.ts +2 -0
- package/dist/progress/index.d.ts +4 -0
- package/dist/progress/progress-ring.d.ts +2 -0
- package/dist/progress/stat-card.d.ts +2 -0
- package/dist/progress/types.d.ts +73 -0
- package/dist/provider/HydraProvider.d.ts +9 -0
- package/dist/provider/index.d.ts +2 -0
- package/dist/questions/choice.d.ts +11 -0
- package/dist/questions/essay.d.ts +11 -0
- package/dist/questions/fill-in-the-blank.d.ts +11 -0
- package/dist/questions/index.d.ts +7 -0
- package/dist/questions/multiple-choice.d.ts +11 -0
- package/dist/questions/question-renderer.d.ts +12 -0
- package/dist/questions/true-false.d.ts +11 -0
- package/dist/questions/types.d.ts +47 -0
- package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +2 -0
- package/dist/sections/AnnouncementFeed/types.d.ts +52 -0
- package/dist/sections/AssessmentReview/AssessmentReview.d.ts +2 -0
- package/dist/sections/AssessmentReview/types.d.ts +58 -0
- package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +2 -0
- package/dist/sections/AssignmentSubmission/types.d.ts +65 -0
- package/dist/sections/CertificateViewer/CertificateViewer.d.ts +2 -0
- package/dist/sections/CertificateViewer/types.d.ts +47 -0
- package/dist/sections/CourseOutline/CourseOutline.d.ts +2 -0
- package/dist/sections/CourseOutline/types.d.ts +49 -0
- package/dist/sections/DiscussionThread/DiscussionThread.d.ts +2 -0
- package/dist/sections/DiscussionThread/types.d.ts +74 -0
- package/dist/sections/ExamSession/ExamSession.d.ts +2 -0
- package/dist/sections/ExamSession/types.d.ts +62 -0
- package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +2 -0
- package/dist/sections/FlashcardStudySession/types.d.ts +40 -0
- package/dist/sections/GradebookTable/GradebookTable.d.ts +2 -0
- package/dist/sections/GradebookTable/types.d.ts +71 -0
- package/dist/sections/LecturePlayer/LecturePlayer.d.ts +2 -0
- package/dist/sections/LecturePlayer/types.d.ts +47 -0
- package/dist/sections/LessonPage/LessonPage.d.ts +2 -0
- package/dist/sections/LessonPage/types.d.ts +40 -0
- package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +2 -0
- package/dist/sections/PracticeQuiz/types.d.ts +42 -0
- package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +2 -0
- package/dist/sections/ProgressDashboard/types.d.ts +73 -0
- package/dist/sections/QuizSession/QuizSession.d.ts +2 -0
- package/dist/sections/QuizSession/types.d.ts +46 -0
- package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +2 -0
- package/dist/sections/ResourceLibrary/types.d.ts +58 -0
- package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +2 -0
- package/dist/sections/ScrollableQuiz/types.d.ts +42 -0
- package/dist/sections/SurveyForm/SurveyForm.d.ts +2 -0
- package/dist/sections/SurveyForm/types.d.ts +69 -0
- package/dist/sections/index.d.ts +34 -0
- package/dist/sections.cjs +1 -0
- package/dist/sections.js +1898 -0
- package/dist/social/index.d.ts +3 -0
- package/dist/social/post-card.d.ts +2 -0
- package/dist/social/types.d.ts +59 -0
- package/dist/social/user-avatar.d.ts +2 -0
- package/dist/table-CW4_BYny.js +9869 -0
- package/dist/table-DSBBqb9X.cjs +56 -0
- package/dist/ui/alert-dialog.d.ts +14 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/avatar.d.ts +5 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/button.d.ts +10 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/index.d.ts +15 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/progress.d.ts +13 -0
- package/dist/ui/separator.d.ts +6 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/slot.d.ts +8 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/tooltip.d.ts +8 -0
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/format-duration.d.ts +2 -0
- package/dist/video/index.d.ts +2 -0
- package/dist/video/types.d.ts +37 -0
- package/dist/video/video-player.d.ts +2 -0
- package/package.json +94 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CurriculumTree component for rendering a hierarchical course curriculum with expand/collapse support.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* <CurriculumTree
|
|
6
|
+
* items={curriculum}
|
|
7
|
+
* progress={userProgress}
|
|
8
|
+
* activeItemUid={currentLessonUid}
|
|
9
|
+
* onItemClick={(item) => navigate(item.uid)}
|
|
10
|
+
* showProgress
|
|
11
|
+
* />
|
|
12
|
+
*/
|
|
13
|
+
export interface CurriculumTreeProps {
|
|
14
|
+
/** Hierarchical curriculum items to display */
|
|
15
|
+
items: CurriculumItem[];
|
|
16
|
+
/** User progress data for completion indicators */
|
|
17
|
+
progress?: CurriculumItemProgress[];
|
|
18
|
+
/** UID of the currently active item */
|
|
19
|
+
activeItemUid?: string;
|
|
20
|
+
/** Called when the user clicks a curriculum item */
|
|
21
|
+
onItemClick?: (item: CurriculumItem) => void;
|
|
22
|
+
/** When true, disables item click interactions */
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
/** Whether to show estimated duration for each item */
|
|
25
|
+
showDuration?: boolean;
|
|
26
|
+
/** Whether to show learning object type icons */
|
|
27
|
+
showIcons?: boolean;
|
|
28
|
+
/** Whether to show completion progress indicators */
|
|
29
|
+
showProgress?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* CurriculumItemRow renders a single row in the curriculum tree.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* <CurriculumItemRow
|
|
36
|
+
* item={item}
|
|
37
|
+
* level={0}
|
|
38
|
+
* isActive
|
|
39
|
+
* hasChildren={false}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
export interface CurriculumItemRowProps {
|
|
43
|
+
item: CurriculumItem;
|
|
44
|
+
level: number;
|
|
45
|
+
isActive?: boolean;
|
|
46
|
+
isCompleted?: boolean;
|
|
47
|
+
isExpanded?: boolean;
|
|
48
|
+
hasChildren: boolean;
|
|
49
|
+
onToggleExpand?: () => void;
|
|
50
|
+
onClick?: () => void;
|
|
51
|
+
showDuration?: boolean;
|
|
52
|
+
showIcon?: boolean;
|
|
53
|
+
showProgress?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* LearningObjectIcon renders the appropriate icon for a given learning object type.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* <LearningObjectIcon type="video" size={18} />
|
|
60
|
+
*/
|
|
61
|
+
export interface LearningObjectIconProps {
|
|
62
|
+
/** Learning object type string (e.g. "video", "quiz", "document") */
|
|
63
|
+
type: string;
|
|
64
|
+
/** Icon size in pixels */
|
|
65
|
+
size?: number;
|
|
66
|
+
}
|
|
67
|
+
export interface CurriculumItem {
|
|
68
|
+
uid: string;
|
|
69
|
+
name: string;
|
|
70
|
+
type: string;
|
|
71
|
+
duration: number;
|
|
72
|
+
sequence: number;
|
|
73
|
+
children?: CurriculumItem[];
|
|
74
|
+
}
|
|
75
|
+
export interface CurriculumItemProgress {
|
|
76
|
+
resourceUid: string;
|
|
77
|
+
isCompleted: boolean;
|
|
78
|
+
timeSpent?: number;
|
|
79
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeedbackBanner shows a correct/incorrect status banner with an optional
|
|
3
|
+
* explanation and retry button after answering a question.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <FeedbackBanner
|
|
7
|
+
* isCorrect={false}
|
|
8
|
+
* explanation="The correct answer is React because it uses a virtual DOM."
|
|
9
|
+
* onRetry={() => resetAnswer()}
|
|
10
|
+
* />
|
|
11
|
+
*/
|
|
12
|
+
export interface FeedbackBannerProps {
|
|
13
|
+
/** Whether the answer was correct */
|
|
14
|
+
isCorrect: boolean;
|
|
15
|
+
/** Explanation text shown below the status */
|
|
16
|
+
explanation?: string;
|
|
17
|
+
/** Called when the user clicks the retry button */
|
|
18
|
+
onRetry?: () => void;
|
|
19
|
+
/** Label for the retry button */
|
|
20
|
+
retryLabel?: string;
|
|
21
|
+
/** CSS class name for the root element */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Inline styles for the root element */
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* LikertScale renders a horizontal 5 or 7 point agreement scale
|
|
28
|
+
* commonly used in surveys and feedback forms.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* <LikertScale
|
|
32
|
+
* value={3}
|
|
33
|
+
* onChange={(v) => setRating(v)}
|
|
34
|
+
* lowLabel="Strongly Disagree"
|
|
35
|
+
* highLabel="Strongly Agree"
|
|
36
|
+
* />
|
|
37
|
+
*/
|
|
38
|
+
export interface LikertScaleProps {
|
|
39
|
+
/** Currently selected value (1-based), or null if none selected */
|
|
40
|
+
value: number | null;
|
|
41
|
+
/** Called when the user selects a point */
|
|
42
|
+
onChange: (value: number) => void;
|
|
43
|
+
/** Number of scale points */
|
|
44
|
+
points?: 5 | 7;
|
|
45
|
+
/** Label for the low end of the scale */
|
|
46
|
+
lowLabel?: string;
|
|
47
|
+
/** Label for the high end of the scale */
|
|
48
|
+
highLabel?: string;
|
|
49
|
+
/** Whether the input is disabled */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/** When true, disables interaction */
|
|
52
|
+
readOnly?: boolean;
|
|
53
|
+
/** CSS class name for the root element */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Inline styles for the root element */
|
|
56
|
+
style?: React.CSSProperties;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* StarRating renders a 1–5 star rating input with hover preview.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* <StarRating value={4} onChange={(v) => setRating(v)} />
|
|
63
|
+
*/
|
|
64
|
+
export interface StarRatingProps {
|
|
65
|
+
/** Current rating value */
|
|
66
|
+
value: number;
|
|
67
|
+
/** Called when the user selects a rating */
|
|
68
|
+
onChange: (value: number) => void;
|
|
69
|
+
/** Maximum number of stars */
|
|
70
|
+
maxStars?: number;
|
|
71
|
+
/** Whether to allow half-star increments */
|
|
72
|
+
allowHalf?: boolean;
|
|
73
|
+
/** Star size */
|
|
74
|
+
size?: "small" | "medium" | "large";
|
|
75
|
+
/** Whether the input is disabled */
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
/** When true, disables interaction */
|
|
78
|
+
readOnly?: boolean;
|
|
79
|
+
/** CSS class name for the root element */
|
|
80
|
+
className?: string;
|
|
81
|
+
/** Inline styles for the root element */
|
|
82
|
+
style?: React.CSSProperties;
|
|
83
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flashcard component with 3D flip animation. Supports controlled and uncontrolled flip state.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* <Flashcard
|
|
6
|
+
* card={{ uid: "1", front: "What is React?", back: "A JavaScript library for building UIs", color: "color1" }}
|
|
7
|
+
* size="medium"
|
|
8
|
+
* />
|
|
9
|
+
*/
|
|
10
|
+
export interface FlashcardProps {
|
|
11
|
+
/** The flashcard data to display */
|
|
12
|
+
card: FlashcardData;
|
|
13
|
+
/** Controlled flip state — if provided, flip state is managed externally */
|
|
14
|
+
isFlipped?: boolean;
|
|
15
|
+
/** Called when the card is flipped */
|
|
16
|
+
onFlip?: () => void;
|
|
17
|
+
/** When true, disables the flip interaction */
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
/** Card size variant */
|
|
20
|
+
size?: "small" | "medium" | "large";
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* FlashcardDeck component for navigating through a collection of flashcards.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <FlashcardDeck
|
|
27
|
+
* cards={cards}
|
|
28
|
+
* deckName="React Fundamentals"
|
|
29
|
+
* showProgress
|
|
30
|
+
* onComplete={() => alert('Deck complete!')}
|
|
31
|
+
* />
|
|
32
|
+
*/
|
|
33
|
+
export interface FlashcardDeckProps {
|
|
34
|
+
/** Array of flashcard data to display */
|
|
35
|
+
cards: FlashcardData[];
|
|
36
|
+
/** Title shown above the deck */
|
|
37
|
+
deckName?: string;
|
|
38
|
+
/** Description shown below the deck name */
|
|
39
|
+
deckDescription?: string;
|
|
40
|
+
/** Controlled current card index */
|
|
41
|
+
currentIndex?: number;
|
|
42
|
+
/** Called when the user navigates to a different card */
|
|
43
|
+
onNavigate?: (index: number) => void;
|
|
44
|
+
/** Called when the user finishes the last card */
|
|
45
|
+
onComplete?: () => void;
|
|
46
|
+
/** When true, disables card flipping */
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
/** Whether to show the progress bar and counter */
|
|
49
|
+
showProgress?: boolean;
|
|
50
|
+
/** Whether to shuffle the cards randomly */
|
|
51
|
+
shuffled?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface FlashcardData {
|
|
54
|
+
uid: string;
|
|
55
|
+
front: string;
|
|
56
|
+
back: string;
|
|
57
|
+
color: string;
|
|
58
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./table-DSBBqb9X.cjs"),r=require("react/jsx-runtime");function i({children:a,colorMode:t,className:l,style:o}){return r.jsx("div",{className:`hydra-root${t==="dark"?" dark":""}${l?` ${l}`:""}`,style:o,children:a})}function n({className:a,...t}){return r.jsx("span",{"data-slot":"avatar",className:e.cn("relative flex size-9 shrink-0 overflow-hidden rounded-full",a),...t})}function s({className:a,onError:t,...l}){return r.jsx("img",{"data-slot":"avatar-image",className:e.cn("aspect-square size-full object-cover",a),onError:t,...l})}function d({className:a,...t}){return r.jsx("span",{"data-slot":"avatar-fallback",className:e.cn("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-xs font-medium",a),...t})}function c({className:a,...t}){return r.jsx("div",{"data-slot":"skeleton",className:e.cn("bg-muted animate-pulse rounded-md",a),...t})}exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogBackdrop=e.AlertDialogBackdrop;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogPortal=e.AlertDialogPortal;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.AssessmentToolbar=e.AssessmentToolbar;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardAction=e.CardAction;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Choice=e.Choice;exports.ConfirmDialog=e.ConfirmDialog;exports.ContentBlock=e.ContentBlock;exports.CurriculumItemRow=e.CurriculumItemRow;exports.CurriculumTree=e.CurriculumTree;exports.DueDateDisplay=e.DueDateDisplay;exports.EmptyState=e.EmptyState;exports.Essay=e.Essay;exports.FeedbackBanner=e.FeedbackBanner;exports.FileUploadZone=e.FileUploadZone;exports.FillInTheBlank=e.FillInTheBlank;exports.Flashcard=e.Flashcard;exports.FlashcardDeck=e.FlashcardDeck;exports.GradeIndicator=e.GradeIndicator;exports.Input=e.Input;exports.LearningObjectIcon=e.LearningObjectIcon;exports.LikertScale=e.LikertScale;exports.MultipleChoice=e.MultipleChoice;exports.PostCard=e.PostCard;exports.Progress=e.Progress;exports.ProgressRing=e.ProgressRing;exports.QuestionNavigator=e.QuestionNavigator;exports.QuestionRenderer=e.QuestionRenderer;exports.SearchInput=e.SearchInput;exports.Separator=e.Separator;exports.StarRating=e.StarRating;exports.StatCard=e.StatCard;exports.StatusBadge=e.StatusBadge;exports.Table=e.Table;exports.TableBody=e.TableBody;exports.TableCaption=e.TableCaption;exports.TableCell=e.TableCell;exports.TableFooter=e.TableFooter;exports.TableHead=e.TableHead;exports.TableHeader=e.TableHeader;exports.TableRow=e.TableRow;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.TimerDisplay=e.TimerDisplay;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipTrigger=e.TooltipTrigger;exports.TrueFalse=e.TrueFalse;exports.UserAvatar=e.UserAvatar;exports.VideoPlayer=e.VideoPlayer;exports.alertVariants=e.alertVariants;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.cn=e.cn;exports.progressVariants=e.progressVariants;exports.Avatar=n;exports.AvatarFallback=d;exports.AvatarImage=s;exports.HydraProvider=i;exports.Skeleton=c;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './questions';
|
|
2
|
+
export * from './assessment-toolbar';
|
|
3
|
+
export * from './flashcards';
|
|
4
|
+
export * from './curriculum';
|
|
5
|
+
export * from './video';
|
|
6
|
+
export * from './common';
|
|
7
|
+
export * from './feedback';
|
|
8
|
+
export * from './progress';
|
|
9
|
+
export * from './social';
|
|
10
|
+
export * from './content';
|
|
11
|
+
export * from './provider';
|
|
12
|
+
export * from './ui';
|
|
13
|
+
export { cn } from './lib/utils';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { c as r } from "./table-CW4_BYny.js";
|
|
2
|
+
import { A as p, a as b, b as C, d as f, e as A, f as D, g as k, h as v, i as h, j as F, k as x, l as y, m as B, n as S, o as I, B as P, p as j, C as H, q as N, r as R, s as V, t as w, u as z, v as L, w as $, x as E, y as Q, z as U, D as q, E as G, F as M, G as O, H as Z, I as J, J as K, K as W, L as X, M as Y, N as _, O as aa, P as ea, Q as sa, R as ta, S as ra, T as oa, U as la, V as ia, W as na, X as da, Y as ua, Z as ca, _ as ga, $ as ma, a0 as Ta, a1 as pa, a2 as ba, a3 as Ca, a4 as fa, a5 as Aa, a6 as Da, a7 as ka, a8 as va, a9 as ha, aa as Fa, ab as xa, ac as ya, ad as Ba, ae as Sa, af as Ia, ag as Pa, ah as ja, ai as Ha, aj as Na, ak as Ra, al as Va, am as wa } from "./table-CW4_BYny.js";
|
|
3
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
+
function n({
|
|
5
|
+
children: a,
|
|
6
|
+
colorMode: e,
|
|
7
|
+
className: t,
|
|
8
|
+
style: o
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ s(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: `hydra-root${e === "dark" ? " dark" : ""}${t ? ` ${t}` : ""}`,
|
|
14
|
+
style: o,
|
|
15
|
+
children: a
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function d({
|
|
20
|
+
className: a,
|
|
21
|
+
...e
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ s(
|
|
24
|
+
"span",
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "avatar",
|
|
27
|
+
className: r(
|
|
28
|
+
"relative flex size-9 shrink-0 overflow-hidden rounded-full",
|
|
29
|
+
a
|
|
30
|
+
),
|
|
31
|
+
...e
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function u({
|
|
36
|
+
className: a,
|
|
37
|
+
onError: e,
|
|
38
|
+
...t
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ s(
|
|
41
|
+
"img",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "avatar-image",
|
|
44
|
+
className: r("aspect-square size-full object-cover", a),
|
|
45
|
+
onError: e,
|
|
46
|
+
...t
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function c({
|
|
51
|
+
className: a,
|
|
52
|
+
...e
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ s(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "avatar-fallback",
|
|
58
|
+
className: r(
|
|
59
|
+
"bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-xs font-medium",
|
|
60
|
+
a
|
|
61
|
+
),
|
|
62
|
+
...e
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function g({ className: a, ...e }) {
|
|
67
|
+
return /* @__PURE__ */ s(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "skeleton",
|
|
71
|
+
className: r("bg-muted animate-pulse rounded-md", a),
|
|
72
|
+
...e
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
p as Alert,
|
|
78
|
+
b as AlertDescription,
|
|
79
|
+
C as AlertDialog,
|
|
80
|
+
f as AlertDialogAction,
|
|
81
|
+
A as AlertDialogBackdrop,
|
|
82
|
+
D as AlertDialogCancel,
|
|
83
|
+
k as AlertDialogContent,
|
|
84
|
+
v as AlertDialogDescription,
|
|
85
|
+
h as AlertDialogFooter,
|
|
86
|
+
F as AlertDialogHeader,
|
|
87
|
+
x as AlertDialogPortal,
|
|
88
|
+
y as AlertDialogTitle,
|
|
89
|
+
B as AlertDialogTrigger,
|
|
90
|
+
S as AlertTitle,
|
|
91
|
+
I as AssessmentToolbar,
|
|
92
|
+
d as Avatar,
|
|
93
|
+
c as AvatarFallback,
|
|
94
|
+
u as AvatarImage,
|
|
95
|
+
P as Badge,
|
|
96
|
+
j as Button,
|
|
97
|
+
H as Card,
|
|
98
|
+
N as CardAction,
|
|
99
|
+
R as CardContent,
|
|
100
|
+
V as CardDescription,
|
|
101
|
+
w as CardFooter,
|
|
102
|
+
z as CardHeader,
|
|
103
|
+
L as CardTitle,
|
|
104
|
+
$ as Choice,
|
|
105
|
+
E as ConfirmDialog,
|
|
106
|
+
Q as ContentBlock,
|
|
107
|
+
U as CurriculumItemRow,
|
|
108
|
+
q as CurriculumTree,
|
|
109
|
+
G as DueDateDisplay,
|
|
110
|
+
M as EmptyState,
|
|
111
|
+
O as Essay,
|
|
112
|
+
Z as FeedbackBanner,
|
|
113
|
+
J as FileUploadZone,
|
|
114
|
+
K as FillInTheBlank,
|
|
115
|
+
W as Flashcard,
|
|
116
|
+
X as FlashcardDeck,
|
|
117
|
+
Y as GradeIndicator,
|
|
118
|
+
n as HydraProvider,
|
|
119
|
+
_ as Input,
|
|
120
|
+
aa as LearningObjectIcon,
|
|
121
|
+
ea as LikertScale,
|
|
122
|
+
sa as MultipleChoice,
|
|
123
|
+
ta as PostCard,
|
|
124
|
+
ra as Progress,
|
|
125
|
+
oa as ProgressRing,
|
|
126
|
+
la as QuestionNavigator,
|
|
127
|
+
ia as QuestionRenderer,
|
|
128
|
+
na as SearchInput,
|
|
129
|
+
da as Separator,
|
|
130
|
+
g as Skeleton,
|
|
131
|
+
ua as StarRating,
|
|
132
|
+
ca as StatCard,
|
|
133
|
+
ga as StatusBadge,
|
|
134
|
+
ma as Table,
|
|
135
|
+
Ta as TableBody,
|
|
136
|
+
pa as TableCaption,
|
|
137
|
+
ba as TableCell,
|
|
138
|
+
Ca as TableFooter,
|
|
139
|
+
fa as TableHead,
|
|
140
|
+
Aa as TableHeader,
|
|
141
|
+
Da as TableRow,
|
|
142
|
+
ka as Tabs,
|
|
143
|
+
va as TabsContent,
|
|
144
|
+
ha as TabsList,
|
|
145
|
+
Fa as TabsTrigger,
|
|
146
|
+
xa as Textarea,
|
|
147
|
+
ya as TimerDisplay,
|
|
148
|
+
Ba as Tooltip,
|
|
149
|
+
Sa as TooltipContent,
|
|
150
|
+
Ia as TooltipTrigger,
|
|
151
|
+
Pa as TrueFalse,
|
|
152
|
+
ja as UserAvatar,
|
|
153
|
+
Ha as VideoPlayer,
|
|
154
|
+
Na as alertVariants,
|
|
155
|
+
Ra as badgeVariants,
|
|
156
|
+
Va as buttonVariants,
|
|
157
|
+
r as cn,
|
|
158
|
+
wa as progressVariants
|
|
159
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ProgressRing renders a circular SVG progress indicator with a centered label.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <ProgressRing value={75} size={120} />
|
|
7
|
+
*/
|
|
8
|
+
export interface ProgressRingProps {
|
|
9
|
+
/** Progress value from 0 to 100 */
|
|
10
|
+
value: number;
|
|
11
|
+
/** Diameter of the ring in pixels */
|
|
12
|
+
size?: number;
|
|
13
|
+
/** Stroke width in pixels */
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
/** Override text in the center of the ring */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Ring color — defaults to the theme primary */
|
|
18
|
+
color?: string;
|
|
19
|
+
/** CSS class name for the root element */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Inline styles for the root element */
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* GradeIndicator displays a grade as a circular or linear percentage badge
|
|
26
|
+
* with pass/fail coloring based on a configurable threshold.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <GradeIndicator percentage={85} letterGrade="B+" passingThreshold={70} />
|
|
30
|
+
*/
|
|
31
|
+
export interface GradeIndicatorProps {
|
|
32
|
+
/** Grade percentage from 0 to 100 */
|
|
33
|
+
percentage: number;
|
|
34
|
+
/** Optional letter grade label */
|
|
35
|
+
letterGrade?: string;
|
|
36
|
+
/** Display variant */
|
|
37
|
+
variant?: "circular" | "linear";
|
|
38
|
+
/** Component size */
|
|
39
|
+
size?: "small" | "medium" | "large";
|
|
40
|
+
/** Below this percentage the indicator shows warning/error colors */
|
|
41
|
+
passingThreshold?: number;
|
|
42
|
+
/** Whether to show the percentage label */
|
|
43
|
+
showLabel?: boolean;
|
|
44
|
+
/** CSS class name for the root element */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** Inline styles for the root element */
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* StatCard displays a single key-value statistic with an icon and optional trend indicator.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* <StatCard label="Lessons Completed" value={12} />
|
|
54
|
+
*/
|
|
55
|
+
export interface StatCardProps {
|
|
56
|
+
/** Optional icon displayed at the top */
|
|
57
|
+
icon?: ReactNode;
|
|
58
|
+
/** Stat label */
|
|
59
|
+
label: string;
|
|
60
|
+
/** Stat value */
|
|
61
|
+
value: string | number;
|
|
62
|
+
/** Secondary text below the value */
|
|
63
|
+
subtitle?: string;
|
|
64
|
+
/** Optional trend data */
|
|
65
|
+
trend?: {
|
|
66
|
+
value: number;
|
|
67
|
+
direction: "up" | "down" | "flat";
|
|
68
|
+
};
|
|
69
|
+
/** CSS class name for the root element */
|
|
70
|
+
className?: string;
|
|
71
|
+
/** Inline styles for the root element */
|
|
72
|
+
style?: React.CSSProperties;
|
|
73
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface HydraProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Controls dark mode. When "dark", sets the .dark class on the root element. */
|
|
5
|
+
colorMode?: "light" | "dark";
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
export declare function HydraProvider({ children, colorMode, className, style, }: HydraProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QuestionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Choice renders a single-answer question using radio buttons.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <Choice
|
|
7
|
+
* question={question}
|
|
8
|
+
* onAnswer={(answers) => handleAnswer(answers)}
|
|
9
|
+
* />
|
|
10
|
+
*/
|
|
11
|
+
export declare const Choice: ({ question, sessionAnswers, onAnswer, readOnly, showCorrectAnswers, disabled, }: QuestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QuestionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Essay renders a long-form text input question with a multiline textarea.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <Essay
|
|
7
|
+
* question={question}
|
|
8
|
+
* onAnswer={(answers) => handleAnswer(answers)}
|
|
9
|
+
* />
|
|
10
|
+
*/
|
|
11
|
+
export declare const Essay: ({ question, sessionAnswers, onAnswer, readOnly, disabled, }: QuestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QuestionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* FillInTheBlank renders a short text input question with debounced answer submission.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <FillInTheBlank
|
|
7
|
+
* question={question}
|
|
8
|
+
* onAnswer={(answers) => handleAnswer(answers)}
|
|
9
|
+
* />
|
|
10
|
+
*/
|
|
11
|
+
export declare const FillInTheBlank: ({ question, sessionAnswers, onAnswer, readOnly, showCorrectAnswers, disabled, }: QuestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { QuestionRenderer } from './question-renderer';
|
|
2
|
+
export { MultipleChoice } from './multiple-choice';
|
|
3
|
+
export { Choice } from './choice';
|
|
4
|
+
export { TrueFalse } from './true-false';
|
|
5
|
+
export { FillInTheBlank } from './fill-in-the-blank';
|
|
6
|
+
export { Essay } from './essay';
|
|
7
|
+
export type { QuestionProps, QuestionData, QuestionTypeEnum, AnswerOption, SessionAnswer, } from './types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QuestionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* MultipleChoice renders a question with multiple correct answers using checkboxes.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <MultipleChoice
|
|
7
|
+
* question={question}
|
|
8
|
+
* onAnswer={(answers) => handleAnswer(answers)}
|
|
9
|
+
* />
|
|
10
|
+
*/
|
|
11
|
+
export declare const MultipleChoice: ({ question, sessionAnswers, onAnswer, readOnly, showCorrectAnswers, disabled, }: QuestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QuestionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* QuestionRenderer dispatches to the appropriate question component based on question type.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <QuestionRenderer
|
|
7
|
+
* question={question}
|
|
8
|
+
* sessionAnswers={answers}
|
|
9
|
+
* onAnswer={handleAnswer}
|
|
10
|
+
* />
|
|
11
|
+
*/
|
|
12
|
+
export declare const QuestionRenderer: (props: QuestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QuestionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* TrueFalse renders a true/false question with two radio button options.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* <TrueFalse
|
|
7
|
+
* question={question}
|
|
8
|
+
* onAnswer={(answers) => handleAnswer(answers)}
|
|
9
|
+
* />
|
|
10
|
+
*/
|
|
11
|
+
export declare const TrueFalse: ({ question, sessionAnswers, onAnswer, readOnly, showCorrectAnswers, disabled, }: QuestionProps) => import("react/jsx-runtime").JSX.Element;
|