analytica-frontend-lib 1.2.2 → 1.2.3
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/Stepper/index.js +2 -6
- package/dist/Stepper/index.js.map +1 -1
- package/dist/Stepper/index.mjs +2 -6
- package/dist/Stepper/index.mjs.map +1 -1
- package/dist/index.css +25 -43
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +56 -3
- package/dist/index.d.ts +56 -3
- package/dist/index.js +1845 -1306
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1682 -1145
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +25 -43
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -7,8 +7,9 @@ export { default as IconRoundedButton } from './IconRoundedButton/index.mjs';
|
|
|
7
7
|
export { default as NavButton } from './NavButton/index.mjs';
|
|
8
8
|
export { default as SelectionButton } from './SelectionButton/index.mjs';
|
|
9
9
|
export { default as CheckBox } from './CheckBox/index.mjs';
|
|
10
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
11
|
import * as react from 'react';
|
|
11
|
-
import { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
12
|
+
import react__default, { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
12
13
|
import * as zustand from 'zustand';
|
|
13
14
|
import { StoreApi } from 'zustand';
|
|
14
15
|
export { default as Radio, RadioGroup, RadioGroupItem } from './Radio/index.mjs';
|
|
@@ -50,7 +51,6 @@ export { createZustandAuthAdapter } from './Auth/zustandAuthAdapter/index.mjs';
|
|
|
50
51
|
export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.mjs';
|
|
51
52
|
export { useApiConfig } from './Auth/useApiConfig/index.mjs';
|
|
52
53
|
export { Quiz, QuizContent, QuizFooter, QuizHeader, QuizQuestionList, QuizTitle } from './Quiz/index.mjs';
|
|
53
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
54
54
|
import { Question } from './Quiz/useQuizStore/index.mjs';
|
|
55
55
|
export { ANSWER_STATUS, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, QUIZ_TYPE, QuestionResult, QuizInterface, QuizState, SUBTYPE_ENUM, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.mjs';
|
|
56
56
|
export { MultipleChoiceList } from './MultipleChoice/index.mjs';
|
|
@@ -65,6 +65,38 @@ import * as zustand_middleware from 'zustand/middleware';
|
|
|
65
65
|
export { cn, getSubjectColorWithOpacity, syncDropdownState } from './utils/index.mjs';
|
|
66
66
|
import 'clsx';
|
|
67
67
|
|
|
68
|
+
interface ImageUploadProps {
|
|
69
|
+
/** File currently selected */
|
|
70
|
+
selectedFile?: File | null;
|
|
71
|
+
/** Upload progress (0-100). If not provided, progress bar won't show */
|
|
72
|
+
uploadProgress?: number;
|
|
73
|
+
/** Show progress bar even if uploadProgress is 100 */
|
|
74
|
+
showProgress?: boolean;
|
|
75
|
+
/** Callback when a file is selected */
|
|
76
|
+
onFileSelect?: (file: File) => void;
|
|
77
|
+
/** Callback when file is removed */
|
|
78
|
+
onRemoveFile?: () => void;
|
|
79
|
+
/** Custom button text when no file is selected */
|
|
80
|
+
buttonText?: string;
|
|
81
|
+
/** Custom button icon when no file is selected */
|
|
82
|
+
buttonIcon?: react__default.ReactNode;
|
|
83
|
+
/** Accept specific file types (default: "image/*") */
|
|
84
|
+
accept?: string;
|
|
85
|
+
/** Disabled state */
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
/** Custom class name */
|
|
88
|
+
className?: string;
|
|
89
|
+
/** Max file size in bytes */
|
|
90
|
+
maxSize?: number;
|
|
91
|
+
/** Callback when file size exceeds maxSize */
|
|
92
|
+
onSizeError?: (file: File, maxSize: number) => void;
|
|
93
|
+
/** Callback when invalid file type is selected */
|
|
94
|
+
onTypeError?: (file: File) => void;
|
|
95
|
+
/** Variant of the upload button */
|
|
96
|
+
variant?: 'default' | 'compact';
|
|
97
|
+
}
|
|
98
|
+
declare function ImageUpload({ selectedFile, onFileSelect, onRemoveFile, buttonText, buttonIcon, accept, disabled, className, maxSize, onSizeError, onTypeError, variant, }: Readonly<ImageUploadProps>): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
68
100
|
/**
|
|
69
101
|
* CheckboxList size variants
|
|
70
102
|
*/
|
|
@@ -152,6 +184,27 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
|
|
|
152
184
|
className?: string;
|
|
153
185
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
|
|
154
186
|
|
|
187
|
+
type Item = {
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
[key: string]: unknown;
|
|
191
|
+
};
|
|
192
|
+
type CategoryConfig = {
|
|
193
|
+
key: string;
|
|
194
|
+
label: string;
|
|
195
|
+
selectedIds?: string[];
|
|
196
|
+
dependsOn?: string[];
|
|
197
|
+
itens?: Item[];
|
|
198
|
+
filteredBy?: {
|
|
199
|
+
key: string;
|
|
200
|
+
internalField: string;
|
|
201
|
+
}[];
|
|
202
|
+
};
|
|
203
|
+
declare const CheckboxGroup: ({ categories, onCategoriesChange, }: {
|
|
204
|
+
categories: CategoryConfig[];
|
|
205
|
+
onCategoriesChange: (categories: CategoryConfig[]) => void;
|
|
206
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
207
|
+
|
|
155
208
|
/**
|
|
156
209
|
* Notification store state interface
|
|
157
210
|
*/
|
|
@@ -624,4 +677,4 @@ declare const useAppStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppState>
|
|
|
624
677
|
};
|
|
625
678
|
}>;
|
|
626
679
|
|
|
627
|
-
export { AccordionGroup, type AuthState, CheckboxList, CheckboxListItem, FetchNotificationsParams, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId };
|
|
680
|
+
export { AccordionGroup, type AuthState, type CategoryConfig, CheckboxGroup, CheckboxList, CheckboxListItem, FetchNotificationsParams, ImageUpload, type ImageUploadProps, type Item, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ export { default as IconRoundedButton } from './IconRoundedButton/index.js';
|
|
|
7
7
|
export { default as NavButton } from './NavButton/index.js';
|
|
8
8
|
export { default as SelectionButton } from './SelectionButton/index.js';
|
|
9
9
|
export { default as CheckBox } from './CheckBox/index.js';
|
|
10
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
11
|
import * as react from 'react';
|
|
11
|
-
import { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
12
|
+
import react__default, { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
12
13
|
import * as zustand from 'zustand';
|
|
13
14
|
import { StoreApi } from 'zustand';
|
|
14
15
|
export { default as Radio, RadioGroup, RadioGroupItem } from './Radio/index.js';
|
|
@@ -50,7 +51,6 @@ export { createZustandAuthAdapter } from './Auth/zustandAuthAdapter/index.js';
|
|
|
50
51
|
export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.js';
|
|
51
52
|
export { useApiConfig } from './Auth/useApiConfig/index.js';
|
|
52
53
|
export { Quiz, QuizContent, QuizFooter, QuizHeader, QuizQuestionList, QuizTitle } from './Quiz/index.js';
|
|
53
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
54
54
|
import { Question } from './Quiz/useQuizStore/index.js';
|
|
55
55
|
export { ANSWER_STATUS, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, QUIZ_TYPE, QuestionResult, QuizInterface, QuizState, SUBTYPE_ENUM, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.js';
|
|
56
56
|
export { MultipleChoiceList } from './MultipleChoice/index.js';
|
|
@@ -65,6 +65,38 @@ import * as zustand_middleware from 'zustand/middleware';
|
|
|
65
65
|
export { cn, getSubjectColorWithOpacity, syncDropdownState } from './utils/index.js';
|
|
66
66
|
import 'clsx';
|
|
67
67
|
|
|
68
|
+
interface ImageUploadProps {
|
|
69
|
+
/** File currently selected */
|
|
70
|
+
selectedFile?: File | null;
|
|
71
|
+
/** Upload progress (0-100). If not provided, progress bar won't show */
|
|
72
|
+
uploadProgress?: number;
|
|
73
|
+
/** Show progress bar even if uploadProgress is 100 */
|
|
74
|
+
showProgress?: boolean;
|
|
75
|
+
/** Callback when a file is selected */
|
|
76
|
+
onFileSelect?: (file: File) => void;
|
|
77
|
+
/** Callback when file is removed */
|
|
78
|
+
onRemoveFile?: () => void;
|
|
79
|
+
/** Custom button text when no file is selected */
|
|
80
|
+
buttonText?: string;
|
|
81
|
+
/** Custom button icon when no file is selected */
|
|
82
|
+
buttonIcon?: react__default.ReactNode;
|
|
83
|
+
/** Accept specific file types (default: "image/*") */
|
|
84
|
+
accept?: string;
|
|
85
|
+
/** Disabled state */
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
/** Custom class name */
|
|
88
|
+
className?: string;
|
|
89
|
+
/** Max file size in bytes */
|
|
90
|
+
maxSize?: number;
|
|
91
|
+
/** Callback when file size exceeds maxSize */
|
|
92
|
+
onSizeError?: (file: File, maxSize: number) => void;
|
|
93
|
+
/** Callback when invalid file type is selected */
|
|
94
|
+
onTypeError?: (file: File) => void;
|
|
95
|
+
/** Variant of the upload button */
|
|
96
|
+
variant?: 'default' | 'compact';
|
|
97
|
+
}
|
|
98
|
+
declare function ImageUpload({ selectedFile, onFileSelect, onRemoveFile, buttonText, buttonIcon, accept, disabled, className, maxSize, onSizeError, onTypeError, variant, }: Readonly<ImageUploadProps>): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
68
100
|
/**
|
|
69
101
|
* CheckboxList size variants
|
|
70
102
|
*/
|
|
@@ -152,6 +184,27 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
|
|
|
152
184
|
className?: string;
|
|
153
185
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
|
|
154
186
|
|
|
187
|
+
type Item = {
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
[key: string]: unknown;
|
|
191
|
+
};
|
|
192
|
+
type CategoryConfig = {
|
|
193
|
+
key: string;
|
|
194
|
+
label: string;
|
|
195
|
+
selectedIds?: string[];
|
|
196
|
+
dependsOn?: string[];
|
|
197
|
+
itens?: Item[];
|
|
198
|
+
filteredBy?: {
|
|
199
|
+
key: string;
|
|
200
|
+
internalField: string;
|
|
201
|
+
}[];
|
|
202
|
+
};
|
|
203
|
+
declare const CheckboxGroup: ({ categories, onCategoriesChange, }: {
|
|
204
|
+
categories: CategoryConfig[];
|
|
205
|
+
onCategoriesChange: (categories: CategoryConfig[]) => void;
|
|
206
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
207
|
+
|
|
155
208
|
/**
|
|
156
209
|
* Notification store state interface
|
|
157
210
|
*/
|
|
@@ -624,4 +677,4 @@ declare const useAppStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppState>
|
|
|
624
677
|
};
|
|
625
678
|
}>;
|
|
626
679
|
|
|
627
|
-
export { AccordionGroup, type AuthState, CheckboxList, CheckboxListItem, FetchNotificationsParams, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId };
|
|
680
|
+
export { AccordionGroup, type AuthState, type CategoryConfig, CheckboxGroup, CheckboxList, CheckboxListItem, FetchNotificationsParams, ImageUpload, type ImageUploadProps, type Item, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId };
|