@tumaet/prompt-ui-components 1.0.10 → 1.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 +106 -0
- package/dist/components/DynamicIcon.js +34 -0
- package/dist/components/DynamicIcon.js.map +1 -0
- package/dist/components/ExportedApplicationAnswerTable.js +15 -0
- package/dist/components/ExportedApplicationAnswerTable.js.map +1 -0
- package/dist/components/FileList.js +43 -0
- package/dist/components/FileList.js.map +1 -0
- package/dist/components/FileUpload.js +76 -0
- package/dist/components/FileUpload.js.map +1 -0
- package/dist/components/FilterBadge.js +7 -0
- package/dist/components/FilterBadge.js.map +1 -0
- package/dist/components/MissingConfig.js +10 -0
- package/dist/components/MissingConfig.js.map +1 -0
- package/dist/components/MissingSettings.js +8 -0
- package/dist/components/MissingSettings.js.map +1 -0
- package/dist/components/ScoreLevelSelector.js +2 -5
- package/dist/components/ScoreLevelSelector.js.map +1 -1
- package/dist/components/SettingsCard.js +7 -0
- package/dist/components/SettingsCard.js.map +1 -0
- package/dist/components/StudentAvatar.js +11 -0
- package/dist/components/StudentAvatar.js.map +1 -0
- package/dist/components/StudentProfile.js +12 -0
- package/dist/components/StudentProfile.js.map +1 -0
- package/dist/components/StudentProfilePicture.js +13 -0
- package/dist/components/StudentProfilePicture.js.map +1 -0
- package/dist/components/ThemeToggle.js +9 -0
- package/dist/components/ThemeToggle.js.map +1 -0
- package/dist/components/index.js +26 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.js +3 -3
- package/dist/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.js.map +1 -1
- package/dist/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.js +8 -1
- package/dist/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.js.map +1 -1
- package/dist/components/minimal-tiptap/extensions/image/image.js +7 -2
- package/dist/components/minimal-tiptap/extensions/image/image.js.map +1 -1
- package/dist/components/minimal-tiptap/extensions/link/link.js +12 -1
- package/dist/components/minimal-tiptap/extensions/link/link.js.map +1 -1
- package/dist/components/minimal-tiptap/extensions/selection/selection.js.map +1 -1
- package/dist/components/pages/CoursePhaseParticipationsTable/CoursePhaseParticipationsTable.js +17 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/CoursePhaseParticipationsTable.js.map +1 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationActions.js +46 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationActions.js.map +1 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationColumns.js +37 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationColumns.js.map +1 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationFilters.js +22 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationFilters.js.map +1 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationRow.js +27 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/table/participationRow.js.map +1 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/utils/downloadParticipations.js +72 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/utils/downloadParticipations.js.map +1 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/utils/updateBatch.js +19 -0
- package/dist/components/pages/CoursePhaseParticipationsTable/utils/updateBatch.js.map +1 -0
- package/dist/components/pages/Mailing/CoursePhaseMailing.js +87 -0
- package/dist/components/pages/Mailing/CoursePhaseMailing.js.map +1 -0
- package/dist/components/pages/Mailing/components/AvailableMailPlaceholders.js +60 -0
- package/dist/components/pages/Mailing/components/AvailableMailPlaceholders.js.map +1 -0
- package/dist/components/pages/Mailing/components/ConfirmSendEmailDialog.js +43 -0
- package/dist/components/pages/Mailing/components/ConfirmSendEmailDialog.js.map +1 -0
- package/dist/components/pages/Mailing/components/MailingEditor.js +25 -0
- package/dist/components/pages/Mailing/components/MailingEditor.js.map +1 -0
- package/dist/components/pages/Mailing/components/ManualMailSending.js +33 -0
- package/dist/components/pages/Mailing/components/ManualMailSending.js.map +1 -0
- package/dist/components/pages/Mailing/components/SettingsCard.js +13 -0
- package/dist/components/pages/Mailing/components/SettingsCard.js.map +1 -0
- package/dist/components/table/GroupActionDialog.js +7 -0
- package/dist/components/table/GroupActionDialog.js.map +1 -0
- package/dist/components/table/PromptTable/filters/TableFiltersMenu.js +1 -1
- package/dist/components/table/PromptTable/filters/TableFiltersMenu.js.map +1 -1
- package/dist/components/table/SortableHeader.js +6 -0
- package/dist/components/table/SortableHeader.js.map +1 -0
- package/dist/contexts/DarkModeProvider.js +56 -0
- package/dist/contexts/DarkModeProvider.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/formatFileSize.js +9 -0
- package/dist/lib/formatFileSize.js.map +1 -0
- package/dist/lib/getCountries.js +15 -0
- package/dist/lib/getCountries.js.map +1 -0
- package/dist/lib/getGravatarUrl.js +7 -0
- package/dist/lib/getGravatarUrl.js.map +1 -0
- package/dist/lib/getStatusBadge.js +27 -0
- package/dist/lib/getStatusBadge.js.map +1 -0
- package/dist/lib/getStatusColor.js +13 -0
- package/dist/lib/getStatusColor.js.map +1 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/openFileDownload.js +17 -0
- package/dist/lib/openFileDownload.js.map +1 -0
- package/dist/lib/translations.json +18 -0
- package/dist/types/components/DynamicIcon.d.ts +6 -0
- package/dist/types/components/ExportedApplicationAnswerTable.d.ts +6 -0
- package/dist/types/components/FileList.d.ts +9 -0
- package/dist/types/components/FileUpload.d.ts +13 -0
- package/dist/types/components/FilterBadge.d.ts +6 -0
- package/dist/types/components/MissingConfig.d.ts +13 -0
- package/dist/types/components/MissingSettings.d.ts +11 -0
- package/dist/types/components/MultiSelect.d.ts +1 -1
- package/dist/types/components/SettingsCard.d.ts +8 -0
- package/dist/types/components/StudentAvatar.d.ts +17 -0
- package/dist/types/components/StudentProfile.d.ts +7 -0
- package/dist/types/components/StudentProfilePicture.d.ts +9 -0
- package/dist/types/components/ThemeToggle.d.ts +1 -0
- package/dist/types/components/index.d.ts +26 -0
- package/dist/types/components/minimal-tiptap/extensions/color/color.d.ts +1 -1
- package/dist/types/components/minimal-tiptap/extensions/image/image.d.ts +1 -1
- package/dist/types/components/minimal-tiptap/extensions/link/link.d.ts +1 -1
- package/dist/types/components/minimal-tiptap/hooks/use-minimal-tiptap.d.ts +1 -1
- package/dist/types/components/pages/CoursePhaseParticipationsTable/CoursePhaseParticipationsTable.d.ts +15 -0
- package/dist/types/components/pages/CoursePhaseParticipationsTable/table/participationActions.d.ts +11 -0
- package/dist/types/components/pages/CoursePhaseParticipationsTable/table/participationColumns.d.ts +3 -0
- package/dist/types/components/pages/CoursePhaseParticipationsTable/table/participationFilters.d.ts +2 -0
- package/dist/types/components/pages/CoursePhaseParticipationsTable/table/participationRow.d.ts +35 -0
- package/dist/types/components/pages/CoursePhaseParticipationsTable/utils/downloadParticipations.d.ts +3 -0
- package/dist/types/components/pages/CoursePhaseParticipationsTable/utils/updateBatch.d.ts +5 -0
- package/dist/types/components/pages/Mailing/CoursePhaseMailing.d.ts +6 -0
- package/dist/types/components/pages/Mailing/components/AvailableMailPlaceholders.d.ts +12 -0
- package/dist/types/components/pages/Mailing/components/ConfirmSendEmailDialog.d.ts +8 -0
- package/dist/types/components/pages/Mailing/components/MailingEditor.d.ts +12 -0
- package/dist/types/components/pages/Mailing/components/ManualMailSending.d.ts +7 -0
- package/dist/types/components/pages/Mailing/components/SettingsCard.d.ts +7 -0
- package/dist/types/components/table/GroupActionDialog.d.ts +11 -0
- package/dist/types/components/table/SortableHeader.d.ts +4 -0
- package/dist/types/components/ui/alert.d.ts +1 -1
- package/dist/types/components/ui/badge.d.ts +1 -1
- package/dist/types/components/ui/button.d.ts +1 -1
- package/dist/types/components/ui/label.d.ts +1 -1
- package/dist/types/components/ui/sheet.d.ts +1 -1
- package/dist/types/components/ui/sidebar.d.ts +1 -1
- package/dist/types/components/ui/toast.d.ts +1 -1
- package/dist/types/components/ui/toggle-group.d.ts +2 -2
- package/dist/types/components/ui/toggle.d.ts +2 -2
- package/dist/types/contexts/DarkModeProvider.d.ts +11 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/formatFileSize.d.ts +1 -0
- package/dist/types/lib/getCountries.d.ts +5 -0
- package/dist/types/lib/getGravatarUrl.d.ts +1 -0
- package/dist/types/lib/getStatusBadge.d.ts +3 -0
- package/dist/types/lib/getStatusColor.d.ts +2 -0
- package/dist/types/lib/index.d.ts +6 -0
- package/dist/types/lib/openFileDownload.d.ts +6 -0
- package/package.json +54 -36
- package/tailwind-config.js +50 -0
- package/readme.md +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Color: import("@tiptap/core").Extension<import("@tiptap/extension-
|
|
1
|
+
export declare const Color: import("@tiptap/core").Extension<import("@tiptap/extension-text-style").ColorOptions, any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const Link: import("@tiptap/
|
|
1
|
+
export declare const Link: import("@tiptap/core").Mark<import("@tiptap/extension-link").LinkOptions, any>;
|
|
2
2
|
export default Link;
|
|
@@ -9,5 +9,5 @@ export interface UseMinimalTiptapEditorProps extends UseEditorOptions {
|
|
|
9
9
|
onUpdate?: (content: Content) => void;
|
|
10
10
|
onBlur?: (content: Content) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const useMinimalTiptapEditor: ({ value, output, placeholder, editorClassName, throttleDelay, onUpdate, onBlur, ...props }: UseMinimalTiptapEditorProps) => Editor
|
|
12
|
+
export declare const useMinimalTiptapEditor: ({ value, output, placeholder, editorClassName, throttleDelay, onUpdate, onBlur, ...props }: UseMinimalTiptapEditorProps) => Editor;
|
|
13
13
|
export default useMinimalTiptapEditor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExtraParticipantColumn, ParticipantRow } from './table/participationRow';
|
|
2
|
+
import { ExportDeps } from './table/participationActions';
|
|
3
|
+
import { RowAction, TableFilter } from '../../../../components';
|
|
4
|
+
import { CoursePhaseParticipationWithStudent } from '@tumaet/prompt-shared-state';
|
|
5
|
+
interface CoursePhaseParticipationsTablePageProps {
|
|
6
|
+
phaseId: string;
|
|
7
|
+
participants: CoursePhaseParticipationWithStudent[];
|
|
8
|
+
extraColumns?: ExtraParticipantColumn<any>[];
|
|
9
|
+
extraFilters?: TableFilter[];
|
|
10
|
+
extraActions?: RowAction<ParticipantRow>[];
|
|
11
|
+
exportDeps?: ExportDeps;
|
|
12
|
+
onClickRowAction?: (row: ParticipantRow) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const CoursePhaseParticipationsTable: ({ phaseId, participants, extraColumns, extraFilters, extraActions, exportDeps, onClickRowAction, }: CoursePhaseParticipationsTablePageProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
package/dist/types/components/pages/CoursePhaseParticipationsTable/table/participationActions.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExtraParticipantColumn, ParticipantRow } from './participationRow';
|
|
2
|
+
import { RowAction } from '../../../../../components';
|
|
3
|
+
export interface ExportDeps {
|
|
4
|
+
prevDataKeys?: string[];
|
|
5
|
+
restrictedDataKeys?: string[];
|
|
6
|
+
studentReadableDataKeys?: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function getParticipantActions(actions: {
|
|
9
|
+
setPassed: (rows: ParticipantRow[]) => void;
|
|
10
|
+
setFailed: (rows: ParticipantRow[]) => void;
|
|
11
|
+
}, extraActions: RowAction<ParticipantRow>[], exportDeps: ExportDeps, extraColumns?: ExtraParticipantColumn<any>[]): RowAction<ParticipantRow>[];
|
package/dist/types/components/pages/CoursePhaseParticipationsTable/table/participationRow.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import type { AccessorFn, SortingFn, FilterFn } from '@tanstack/react-table';
|
|
3
|
+
import { CoursePhaseParticipationWithStudent, PassStatus, Student } from '@tumaet/prompt-shared-state';
|
|
4
|
+
export interface ParticipantRow {
|
|
5
|
+
id: string;
|
|
6
|
+
coursePhaseID: string;
|
|
7
|
+
courseParticipationID: string;
|
|
8
|
+
passStatus: PassStatus;
|
|
9
|
+
restrictedData: Record<string, any>;
|
|
10
|
+
studentReadableData?: Record<string, any>;
|
|
11
|
+
prevData?: Record<string, any>;
|
|
12
|
+
student: Student;
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
email?: string;
|
|
16
|
+
matriculationNumber?: string;
|
|
17
|
+
universityLogin?: string;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface ExtraParticipantColumn<TValue> {
|
|
21
|
+
id: string;
|
|
22
|
+
header: string;
|
|
23
|
+
accessorFn?: AccessorFn<ParticipantRow, TValue>;
|
|
24
|
+
cell?: ColumnDef<ParticipantRow, TValue>['cell'];
|
|
25
|
+
enableSorting?: boolean;
|
|
26
|
+
sortingFn?: SortingFn<ParticipantRow>;
|
|
27
|
+
enableColumnFilter?: boolean;
|
|
28
|
+
filterFn?: FilterFn<ParticipantRow>;
|
|
29
|
+
extraData: {
|
|
30
|
+
courseParticipationID: string;
|
|
31
|
+
value: TValue;
|
|
32
|
+
stringValue?: string;
|
|
33
|
+
}[];
|
|
34
|
+
}
|
|
35
|
+
export declare function buildParticipantRows(participants: CoursePhaseParticipationWithStudent[], extraColumns: ExtraParticipantColumn<any>[]): ParticipantRow[];
|
package/dist/types/components/pages/CoursePhaseParticipationsTable/utils/downloadParticipations.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CoursePhaseParticipationWithStudent } from '@tumaet/prompt-shared-state';
|
|
2
|
+
import { ExtraParticipantColumn } from '../table/participationRow';
|
|
3
|
+
export declare const downloadParticipations: (data: CoursePhaseParticipationWithStudent[], prevDataKeys: string[], restrictedDataKeys: string[], studentReadableDataKeys: string[], extraColumns?: ExtraParticipantColumn<any>[], filename?: string) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CoursePhaseWithMetaData } from '@tumaet/prompt-shared-state';
|
|
2
|
+
interface CoursePhaseMailingProps {
|
|
3
|
+
coursePhase: CoursePhaseWithMetaData | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare const CoursePhaseMailing: ({ coursePhase }: CoursePhaseMailingProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface AvailableMailPlaceholdersProps {
|
|
2
|
+
customAdditionalPlaceholders?: {
|
|
3
|
+
placeholder: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}[];
|
|
6
|
+
}
|
|
7
|
+
export declare const availablePlaceholders: {
|
|
8
|
+
placeholder: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}[];
|
|
11
|
+
export declare const AvailableMailPlaceholders: ({ customAdditionalPlaceholders, }: AvailableMailPlaceholdersProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PassStatus } from '@tumaet/prompt-shared-state';
|
|
2
|
+
interface ConfirmSendEmailDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
emailType: PassStatus;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConfirmSendEmailDialog: ({ isOpen, onClose, emailType, }: ConfirmSendEmailDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EmailTemplateEditorProps {
|
|
3
|
+
subject: string;
|
|
4
|
+
content: string;
|
|
5
|
+
onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
label: string;
|
|
7
|
+
subjectHTMLLabel: string;
|
|
8
|
+
contentHTMLLabel: string;
|
|
9
|
+
placeholders: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare const EmailTemplateEditor: ({ subject, content, onInputChange, label, subjectHTMLLabel, contentHTMLLabel, placeholders, }: EmailTemplateEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CoursePhaseMailingConfigData } from '@tumaet/prompt-shared-state';
|
|
2
|
+
interface ManualMailSendingProps {
|
|
3
|
+
mailingMetaData: CoursePhaseMailingConfigData | null;
|
|
4
|
+
isModified: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ManualMailSending: ({ mailingMetaData, isModified }: ManualMailSendingProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CoursePhaseMailingConfigData } from '@tumaet/prompt-shared-state';
|
|
2
|
+
interface SettingsCardProps {
|
|
3
|
+
mailingMetaData: CoursePhaseMailingConfigData;
|
|
4
|
+
isModified: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const SettingsCard: ({ mailingMetaData, isModified }: SettingsCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ActionDialogProps {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
confirmLabel: string;
|
|
5
|
+
confirmVariant?: 'default' | 'destructive';
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ActionDialog: ({ title, description, confirmLabel, confirmVariant, isOpen, onClose, onConfirm, }: ActionDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
7
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
8
|
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
8
8
|
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
5
|
export { Label };
|
|
@@ -8,7 +8,7 @@ declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
|
8
8
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const sheetVariants: (props?: ({
|
|
10
10
|
side?: "top" | "bottom" | "right" | "left" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
13
|
}
|
|
14
14
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -47,7 +47,7 @@ declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<React.Clas
|
|
|
47
47
|
} & VariantProps<(props?: ({
|
|
48
48
|
variant?: "default" | "outline" | null | undefined;
|
|
49
49
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
50
|
-
} & import("class-variance-authority/
|
|
50
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
51
51
|
declare const SidebarMenuAction: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
52
52
|
asChild?: boolean;
|
|
53
53
|
showOnHover?: boolean;
|
|
@@ -5,7 +5,7 @@ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
|
5
5
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
6
|
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
7
|
variant?: "default" | "destructive" | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
9
9
|
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,9 +4,9 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
9
|
variant?: "default" | "outline" | null | undefined;
|
|
10
10
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -4,9 +4,9 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
9
|
variant?: "default" | "outline" | null | undefined;
|
|
10
10
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Theme = 'light' | 'dark' | 'system';
|
|
3
|
+
interface DarkModeContextProps {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
setTheme: (theme: Theme) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useDarkMode: () => DarkModeContextProps;
|
|
8
|
+
declare const DarkModeProvider: React.FC<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
export default DarkModeProvider;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatFileSize: (bytes: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getGravatarUrl: (email: string, size?: number) => string;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tumaet/prompt-ui-components",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
|
-
"url": "git+https://github.com/
|
|
6
|
+
"url": "git+https://github.com/prompt-edu/prompt-lib.git"
|
|
7
7
|
},
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"module": "./dist/index.js",
|
|
@@ -12,11 +12,13 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": "./dist/index.js",
|
|
14
14
|
"./index.css": "./dist/index.css",
|
|
15
|
-
"./minimal-tiptap/index.css": "./dist/components/minimal-tiptap/styles/index.css"
|
|
15
|
+
"./minimal-tiptap/index.css": "./dist/components/minimal-tiptap/styles/index.css",
|
|
16
|
+
"./tailwind-config": "./tailwind-config.js"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"dist",
|
|
19
20
|
"tailwind",
|
|
21
|
+
"tailwind-config.js",
|
|
20
22
|
"src/index.css",
|
|
21
23
|
"src/components/minimal-tiptap/styles/index.css"
|
|
22
24
|
],
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
"build": "yarn build:esm && yarn build:copy-css",
|
|
27
29
|
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\""
|
|
28
30
|
},
|
|
29
|
-
"packageManager": "yarn@4.
|
|
31
|
+
"packageManager": "yarn@4.14.1",
|
|
30
32
|
"dependencies": {
|
|
31
33
|
"@hookform/resolvers": "^5.2.2",
|
|
32
34
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
@@ -51,54 +53,70 @@
|
|
|
51
53
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
52
54
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
53
55
|
"@tanstack/react-table": "^8.21.3",
|
|
54
|
-
"@tiptap/core": "
|
|
55
|
-
"@tiptap/extension-
|
|
56
|
-
"@tiptap/extension-code-block
|
|
57
|
-
"@tiptap/extension-
|
|
58
|
-
"@tiptap/extension-
|
|
59
|
-
"@tiptap/extension-
|
|
60
|
-
"@tiptap/extension-
|
|
61
|
-
"@tiptap/extension-
|
|
62
|
-
"@tiptap/extension-
|
|
63
|
-
"@tiptap/extension-
|
|
64
|
-
"@tiptap/extension-
|
|
65
|
-
"@tiptap/extension-
|
|
66
|
-
"@tiptap/
|
|
67
|
-
"@tiptap/
|
|
68
|
-
"@tiptap/
|
|
69
|
-
"@
|
|
56
|
+
"@tiptap/core": "3.22.4",
|
|
57
|
+
"@tiptap/extension-bubble-menu": "3.22.4",
|
|
58
|
+
"@tiptap/extension-code-block": "3.22.4",
|
|
59
|
+
"@tiptap/extension-code-block-lowlight": "3.22.4",
|
|
60
|
+
"@tiptap/extension-color": "3.22.4",
|
|
61
|
+
"@tiptap/extension-heading": "3.22.4",
|
|
62
|
+
"@tiptap/extension-horizontal-rule": "3.22.4",
|
|
63
|
+
"@tiptap/extension-image": "3.22.4",
|
|
64
|
+
"@tiptap/extension-link": "3.22.4",
|
|
65
|
+
"@tiptap/extension-placeholder": "3.22.4",
|
|
66
|
+
"@tiptap/extension-text-style": "3.22.4",
|
|
67
|
+
"@tiptap/extension-typography": "3.22.4",
|
|
68
|
+
"@tiptap/extension-underline": "3.22.4",
|
|
69
|
+
"@tiptap/extensions": "3.22.4",
|
|
70
|
+
"@tiptap/pm": "3.22.4",
|
|
71
|
+
"@tiptap/react": "3.22.4",
|
|
72
|
+
"@tiptap/starter-kit": "3.22.4",
|
|
70
73
|
"class-variance-authority": "^0.7.1",
|
|
71
74
|
"clsx": "^2.1.1",
|
|
72
75
|
"cmdk": "1.1.1",
|
|
73
76
|
"date-fns": "^4.1.0",
|
|
77
|
+
"file-saver": "^2.0.5",
|
|
74
78
|
"highlight.js": "^11.11.1",
|
|
79
|
+
"i18n-iso-countries": "^7.14.0",
|
|
80
|
+
"js-sha256": "^0.11.1",
|
|
75
81
|
"lowlight": "^3.3.0",
|
|
76
|
-
"lucide-react": "^1.0
|
|
77
|
-
"postcss": "^8.5.
|
|
78
|
-
"postcss-preset-env": "^11.2.
|
|
79
|
-
"react": "^19.2.4",
|
|
82
|
+
"lucide-react": "^1.8.0",
|
|
83
|
+
"postcss": "^8.5.10",
|
|
84
|
+
"postcss-preset-env": "^11.2.1",
|
|
80
85
|
"react-day-picker": "8.10.1",
|
|
81
|
-
"react-
|
|
82
|
-
"react-
|
|
83
|
-
"
|
|
84
|
-
"react-router-dom": "^7.13.2",
|
|
85
|
-
"recharts": "^3.8.0",
|
|
86
|
+
"react-hook-form": "^7.73.1",
|
|
87
|
+
"react-medium-image-zoom": "^5.4.3",
|
|
88
|
+
"recharts": "^3.8.1",
|
|
86
89
|
"sonner": "^2.0.7",
|
|
87
|
-
"tailwind-merge": "^
|
|
90
|
+
"tailwind-merge": "^3.5.0",
|
|
88
91
|
"tsc-alias": "^1.8.16",
|
|
89
92
|
"typescript": "^5.9.3"
|
|
90
93
|
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"@tanstack/react-query": "^5.99.2",
|
|
96
|
+
"@tumaet/prompt-shared-state": "^1.1.1",
|
|
97
|
+
"react": "^19.2.5",
|
|
98
|
+
"react-dom": "^19.2.5",
|
|
99
|
+
"react-router-dom": "^7.14.1"
|
|
100
|
+
},
|
|
91
101
|
"devDependencies": {
|
|
92
|
-
"@eslint/compat": "^2.0.
|
|
102
|
+
"@eslint/compat": "^2.0.5",
|
|
103
|
+
"@tanstack/react-query": "^5.99.2",
|
|
104
|
+
"@tumaet/prompt-shared-state": "1.1.1",
|
|
105
|
+
"@types/file-saver": "^2.0.7",
|
|
93
106
|
"@types/react": "^19.2.14",
|
|
94
|
-
"@
|
|
95
|
-
"@typescript-eslint/
|
|
96
|
-
"eslint": "^
|
|
107
|
+
"@types/react-dom": "^19.2.3",
|
|
108
|
+
"@typescript-eslint/eslint-plugin": "^8.59.0",
|
|
109
|
+
"@typescript-eslint/parser": "^8.59.0",
|
|
110
|
+
"eslint": "^9.39.2",
|
|
97
111
|
"eslint-plugin-prettier": "^5.5.5",
|
|
98
112
|
"eslint-plugin-react": "^7.37.5",
|
|
99
|
-
"eslint-plugin-react-hooks": "^7.
|
|
113
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
114
|
+
"globals": "^16.5.0",
|
|
100
115
|
"postcss-cli": "^11.0.1",
|
|
101
|
-
"prettier": "^3.8.
|
|
116
|
+
"prettier": "^3.8.3",
|
|
117
|
+
"react": "^19.2.5",
|
|
118
|
+
"react-dom": "^19.2.5",
|
|
119
|
+
"react-router-dom": "^7.14.1"
|
|
102
120
|
},
|
|
103
121
|
"resolutions": {
|
|
104
122
|
"tar": "^7.5.13"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
const config = {
|
|
3
|
+
darkMode: ['class'],
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
border: 'hsl(var(--border))',
|
|
8
|
+
input: 'hsl(var(--input))',
|
|
9
|
+
ring: 'hsl(var(--ring))',
|
|
10
|
+
background: 'hsl(var(--background))',
|
|
11
|
+
foreground: 'hsl(var(--foreground))',
|
|
12
|
+
primary: {
|
|
13
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
14
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
15
|
+
},
|
|
16
|
+
secondary: {
|
|
17
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
18
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
19
|
+
},
|
|
20
|
+
destructive: {
|
|
21
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
22
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
23
|
+
},
|
|
24
|
+
muted: {
|
|
25
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
26
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
27
|
+
},
|
|
28
|
+
accent: {
|
|
29
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
30
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
31
|
+
},
|
|
32
|
+
popover: {
|
|
33
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
34
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
35
|
+
},
|
|
36
|
+
card: {
|
|
37
|
+
DEFAULT: 'hsl(var(--card))',
|
|
38
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
borderRadius: {
|
|
42
|
+
lg: 'var(--radius)',
|
|
43
|
+
md: 'calc(var(--radius) - 2px)',
|
|
44
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default config
|
package/readme.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# prompt-ui-components
|
|
2
|
-
|
|
3
|
-
A shared library for the **AET Prompt2** system that provides common UI components.
|
|
4
|
-
|
|
5
|
-
These components are built using [shadcn/ui](https://ui.shadcn.dev/) and are maintained centrally to enable loading via **Module Federation** as a **singleton**.
|
|
6
|
-
This ensures:
|
|
7
|
-
- A **consistent UI experience** across microfrontends
|
|
8
|
-
- **Reduced bundle size** by avoiding duplicate component loading
|
|
9
|
-
- **Unified UI state management** (e.g., for global toast notifications)
|
|
10
|
-
|
|
11
|
-
## Overview
|
|
12
|
-
|
|
13
|
-
The **prompt-ui-components-lib** package is designed to allow multiple microfrontends to share:
|
|
14
|
-
- **Common, reusable UI components** with a unified look and feel
|
|
15
|
-
- **Shared UI state**, such as toasts and modals, across independently deployed apps
|
|
16
|
-
|
|
17
|
-
By using this library, all microfrontends rely on the same component instances and styling, preventing UI inconsistencies and improving maintainability.
|
|
18
|
-
|
|
19
|
-
## Features
|
|
20
|
-
|
|
21
|
-
- **Reusable UI Components**: Built on shadcn/ui, styled and configured for the Prompt2 system
|
|
22
|
-
- **Shared UI State**: Centralized management for features like toast notifications
|
|
23
|
-
- **Module Federation Ready**: Components are loaded as a singleton, preventing duplication
|
|
24
|
-
- **Consistent Design System**: Ensures the same visual language across all microfrontends
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
Install the package with your preferred package manager:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Using Yarn
|
|
32
|
-
yarn add @tumaet/prompt-ui-components-lib
|
|
33
|
-
|
|
34
|
-
# Or using npm
|
|
35
|
-
npm install @tumaet/prompt-ui-components-lib
|
|
36
|
-
```
|