stp-ui-kit 0.0.86 → 0.0.88

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.
@@ -1,7 +1,8 @@
1
- import { default as React } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  export type ProgressColor = "blue" | "violet" | "fuchsia" | "lime" | "teal" | "indigo" | "red" | "amber" | "green";
3
3
  export interface ProgressBarAlternativeProps {
4
4
  percent: number;
5
+ extra?: ReactNode;
5
6
  color?: ProgressColor;
6
7
  className?: string;
7
8
  }
@@ -7,6 +7,7 @@ export type RangeValue = RangeTuple | null;
7
7
  export type BaseProps = {
8
8
  multiMonth?: boolean;
9
9
  onCard?: boolean;
10
+ locale?: string;
10
11
  initialMonth?: Dayjs;
11
12
  minDate?: Dayjs;
12
13
  maxDate?: Dayjs;
@@ -1,2 +1,6 @@
1
- declare const CalendarDayHeader: () => import("react/jsx-runtime").JSX.Element;
1
+ interface CalendarDayHeaderProps {
2
+ locale?: string;
3
+ weekStartsOn?: 0 | 1;
4
+ }
5
+ declare const CalendarDayHeader: ({ locale, weekStartsOn, }: CalendarDayHeaderProps) => import("react/jsx-runtime").JSX.Element;
2
6
  export default CalendarDayHeader;
@@ -18,4 +18,4 @@ export interface CalendarMonthProps {
18
18
  prevDisabled?: boolean;
19
19
  nextDisabled?: boolean;
20
20
  }
21
- export declare const CalendarMonth: import('react').MemoExoticComponent<({ monthDate, weekStartsOn, minDate, maxDate, onSelectDay, isInRange, isSelected, cornerType, allowRange, showPrev, showNext, onPrev, onNext, prevDisabled, nextDisabled, }: CalendarMonthProps) => import("react/jsx-runtime").JSX.Element>;
21
+ export declare const CalendarMonth: import('react').MemoExoticComponent<({ monthDate, weekStartsOn, locale, minDate, maxDate, onSelectDay, isInRange, isSelected, cornerType, allowRange, showPrev, showNext, onPrev, onNext, prevDisabled, nextDisabled, }: CalendarMonthProps) => import("react/jsx-runtime").JSX.Element>;
@@ -8,5 +8,7 @@ export interface PageHeaderProps {
8
8
  isStretched?: TopBarProps["isStretched"];
9
9
  extra?: ReactNode;
10
10
  message?: string;
11
+ type?: "primary" | "secondary";
12
+ onBack?: () => void;
11
13
  }
12
- export declare const PageHeader: ({ title, sections, activeTab, onTabSelect, isStretched, extra, message, }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const PageHeader: ({ title, sections, activeTab, onTabSelect, isStretched, extra, message, type, onBack, }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export interface TimerProps {
2
+ deadline: string;
3
+ onTimeEnd?: () => void;
4
+ }
5
+ export declare const Timer: import('react').MemoExoticComponent<({ deadline, onTimeEnd }: TimerProps) => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ import { QuestionState, QuestionType } from '../types/question.types';
3
+ export declare const stateIcon: Record<Exclude<QuestionState, undefined>, ReactNode>;
4
+ export declare const questionStateIcon: Record<Exclude<QuestionState, undefined>, ReactNode>;
5
+ export declare const stateText: Record<Exclude<QuestionState, undefined>, string>;
6
+ export declare const instructionMap: Record<QuestionType, string>;
@@ -0,0 +1,49 @@
1
+ export type QuestionState = "answered" | "correct" | "incorrect" | "partial" | undefined;
2
+ export type Question = OneChoiceQuestionType | MultipleChoiceQuestionType | MatchingQuestionType;
3
+ export type QuestionType = "one_choice" | "multiple_choice" | "matching";
4
+ export interface BaseQuestion {
5
+ progress_question_id: number;
6
+ question_type: QuestionType;
7
+ text: string;
8
+ context_text: string | null;
9
+ context_image: string | null;
10
+ explanation_text: string | null;
11
+ explanation_image: string | null;
12
+ weight: number;
13
+ earned_score: number | null;
14
+ }
15
+ export interface Option {
16
+ text: string;
17
+ image: string | null;
18
+ is_correct?: boolean;
19
+ }
20
+ export interface OneChoiceQuestionType extends BaseQuestion {
21
+ question_type: "one_choice";
22
+ config: {
23
+ options: Record<string, Option>;
24
+ };
25
+ user_answer: string | null;
26
+ }
27
+ export interface MultipleChoiceQuestionType extends BaseQuestion {
28
+ question_type: "multiple_choice";
29
+ config: {
30
+ options: Record<string, Option>;
31
+ };
32
+ user_answer: string[] | null;
33
+ }
34
+ export interface MatchingStatement {
35
+ text: string;
36
+ image: string | null;
37
+ correct_answer: string;
38
+ }
39
+ export interface MatchingQuestionType extends BaseQuestion {
40
+ question_type: "matching";
41
+ config: {
42
+ options: Record<string, {
43
+ text: string;
44
+ }>;
45
+ statements: Record<string, MatchingStatement>;
46
+ };
47
+ user_answer: Record<string, string> | null;
48
+ }
49
+ export type ExamStatuses = "finished" | "in_progress";