@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,59 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* UserAvatar renders a user avatar image with an initials fallback
|
|
4
|
+
* and an optional role badge.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <UserAvatar displayName="Jane Smith" role="instructor" />
|
|
8
|
+
*/
|
|
9
|
+
export interface UserAvatarProps {
|
|
10
|
+
/** User's display name (used for initials fallback) */
|
|
11
|
+
displayName: string;
|
|
12
|
+
/** URL of the avatar image */
|
|
13
|
+
avatarUrl?: string;
|
|
14
|
+
/** User role — shown as a tooltip or small badge */
|
|
15
|
+
role?: "student" | "instructor" | "ta" | "admin";
|
|
16
|
+
/** Whether to show the role badge */
|
|
17
|
+
showRoleBadge?: boolean;
|
|
18
|
+
/** Avatar size */
|
|
19
|
+
size?: "small" | "medium" | "large";
|
|
20
|
+
/** CSS class name for the root element */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Inline styles for the root element */
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* PostCard renders a single discussion post or announcement with author info,
|
|
27
|
+
* timestamp, content body, and optional action buttons.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <PostCard
|
|
31
|
+
* author={{ displayName: "Jane Smith", role: "instructor" }}
|
|
32
|
+
* content="Welcome to the course!"
|
|
33
|
+
* createdAt="2025-01-15T10:30:00Z"
|
|
34
|
+
* />
|
|
35
|
+
*/
|
|
36
|
+
export interface PostCardProps {
|
|
37
|
+
/** Post author information */
|
|
38
|
+
author: {
|
|
39
|
+
displayName: string;
|
|
40
|
+
avatarUrl?: string;
|
|
41
|
+
role?: string;
|
|
42
|
+
};
|
|
43
|
+
/** Post body content */
|
|
44
|
+
content: string;
|
|
45
|
+
/** Creation timestamp as ISO string */
|
|
46
|
+
createdAt: string;
|
|
47
|
+
/** Last update timestamp */
|
|
48
|
+
updatedAt?: string;
|
|
49
|
+
/** Action buttons rendered in the card footer */
|
|
50
|
+
actions?: ReactNode;
|
|
51
|
+
/** Highlight variant for special posts */
|
|
52
|
+
highlight?: "pinned" | "answer" | "none";
|
|
53
|
+
/** Indentation level for nested replies */
|
|
54
|
+
indentLevel?: number;
|
|
55
|
+
/** CSS class name for the root element */
|
|
56
|
+
className?: string;
|
|
57
|
+
/** Inline styles for the root element */
|
|
58
|
+
style?: React.CSSProperties;
|
|
59
|
+
}
|