stp-ui-kit 0.0.104 → 0.0.107
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/README.md +90 -19
- package/dist/components/data/Table/Table.d.ts +12 -11
- package/dist/components/display/Chip/Chip.d.ts +2 -2
- package/dist/components/display/InputChip/InputChip.d.ts +6 -0
- package/dist/components/display/OptionList/OptionList.d.ts +10 -1
- package/dist/components/display/OptionList/index.d.ts +2 -0
- package/dist/components/display/index.d.ts +1 -0
- package/dist/components/feedback/Info/Info.d.ts +2 -2
- package/dist/components/feedback/Modal/Modal.d.ts +1 -1
- package/dist/components/feedback/Window/Window.d.ts +0 -1
- package/dist/components/form/Select/Select.d.ts +2 -2
- package/dist/components/icons/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/icons/Plus.svg +3 -0
- package/dist/icons/X.svg +3 -0
- package/dist/stp-ui-kit.es.js +12678 -5060
- package/dist/stp-ui-kit.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/tokens.d.ts +112 -0
- package/dist/vite-env.d.ts +6 -6
- package/package.json +20 -9
- package/src/styles/_variables.scss +907 -282
- package/src/styles/tokens.d.ts +112 -0
- package/src/styles/tokens.js +94 -0
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/lib/exam/constants/index.d.ts +0 -6
- package/dist/lib/exam/types/question.types.d.ts +0 -49
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCSS Design Tokens - Auto-generated type definitions
|
|
3
|
+
* Import these tokens in your consuming project for full TypeScript support
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface SpacingTokens {
|
|
7
|
+
spacing: string;
|
|
8
|
+
"space-0": string;
|
|
9
|
+
"space-025": string;
|
|
10
|
+
"space-050": string;
|
|
11
|
+
"space-100": string;
|
|
12
|
+
"space-150": string;
|
|
13
|
+
"space-200": string;
|
|
14
|
+
"space-250": string;
|
|
15
|
+
"space-300": string;
|
|
16
|
+
"space-350": string;
|
|
17
|
+
"space-400": string;
|
|
18
|
+
"space-450": string;
|
|
19
|
+
"space-500": string;
|
|
20
|
+
"space-550": string;
|
|
21
|
+
"space-600": string;
|
|
22
|
+
"space-650": string;
|
|
23
|
+
"space-750": string;
|
|
24
|
+
"space-800": string;
|
|
25
|
+
"space-850": string;
|
|
26
|
+
"space-900": string;
|
|
27
|
+
"space-950": string;
|
|
28
|
+
"space-1000": string;
|
|
29
|
+
"space-1100": string;
|
|
30
|
+
"space-1200": string;
|
|
31
|
+
"space-1300": string;
|
|
32
|
+
"space-1600": string;
|
|
33
|
+
"space-2000": string;
|
|
34
|
+
"space-2400": string;
|
|
35
|
+
"space-3200": string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface BreakpointTokens {
|
|
39
|
+
lg: string;
|
|
40
|
+
md: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
mobile: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface BorderTokens {
|
|
46
|
+
"border-radius-0": string;
|
|
47
|
+
"border-radius-50": string;
|
|
48
|
+
"border-radius-100": string;
|
|
49
|
+
"border-radius-200": string;
|
|
50
|
+
"border-radius-full": string;
|
|
51
|
+
"border-width-025": string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface TypographyTokens {
|
|
55
|
+
"font-family-sans": string;
|
|
56
|
+
"font-weight-regular": number;
|
|
57
|
+
"font-weight-medium": number;
|
|
58
|
+
"font-weight-semibold": number;
|
|
59
|
+
"font-weight-bold": number;
|
|
60
|
+
"font-letter-spacing-denser": string;
|
|
61
|
+
"font-letter-spacing-dense": string;
|
|
62
|
+
"font-letter-spacing-normal": string;
|
|
63
|
+
"font-size-300": string;
|
|
64
|
+
"font-size-350": string;
|
|
65
|
+
"font-size-400": string;
|
|
66
|
+
"font-size-500": string;
|
|
67
|
+
"font-size-600": string;
|
|
68
|
+
"font-size-750": string;
|
|
69
|
+
"font-line-height-400": string;
|
|
70
|
+
"font-line-height-500": string;
|
|
71
|
+
"font-line-height-550": string;
|
|
72
|
+
"font-line-height-600": string;
|
|
73
|
+
"font-line-height-650": string;
|
|
74
|
+
"font-line-height-700": string;
|
|
75
|
+
"font-line-height-800": string;
|
|
76
|
+
"font-line-height-1000": string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ColorTokens {
|
|
80
|
+
"color-neutral-alpha": string;
|
|
81
|
+
"color-neutral-00": string;
|
|
82
|
+
"color-neutral-50": string;
|
|
83
|
+
"color-neutral-100": string;
|
|
84
|
+
"color-neutral-150": string;
|
|
85
|
+
"color-neutral-200": string;
|
|
86
|
+
"color-neutral-250": string;
|
|
87
|
+
"color-neutral-300": string;
|
|
88
|
+
"color-neutral-350": string;
|
|
89
|
+
"color-neutral-400": string;
|
|
90
|
+
"color-neutral-450": string;
|
|
91
|
+
"color-neutral-500": string;
|
|
92
|
+
"color-neutral-550": string;
|
|
93
|
+
"color-neutral-600": string;
|
|
94
|
+
"color-neutral-650": string;
|
|
95
|
+
"color-neutral-700": string;
|
|
96
|
+
"color-neutral-750": string;
|
|
97
|
+
"color-neutral-800": string;
|
|
98
|
+
"color-neutral-850": string;
|
|
99
|
+
"color-neutral-900": string;
|
|
100
|
+
"color-neutral-950": string;
|
|
101
|
+
"color-neutral-1000": string;
|
|
102
|
+
// Add other color tokens as needed
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type DesignTokens = SpacingTokens &
|
|
106
|
+
BreakpointTokens &
|
|
107
|
+
BorderTokens &
|
|
108
|
+
TypographyTokens &
|
|
109
|
+
ColorTokens;
|
|
110
|
+
|
|
111
|
+
declare const tokens: DesignTokens;
|
|
112
|
+
export default tokens;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCSS Design Tokens - JavaScript Export
|
|
3
|
+
* Use this file to access SCSS variables in JavaScript/TypeScript
|
|
4
|
+
*
|
|
5
|
+
* Usage in your project:
|
|
6
|
+
* import { spacing, breakpoints, colors } from 'stp-ui-kit/tokens';
|
|
7
|
+
*
|
|
8
|
+
* Or import SCSS variables directly:
|
|
9
|
+
* @use 'stp-ui-kit/styles/variables' as stp;
|
|
10
|
+
* .my-class { padding: stp.$space-400; }
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const spacing = {
|
|
14
|
+
spacing: '4px',
|
|
15
|
+
'space-0': '0px',
|
|
16
|
+
'space-025': '1px',
|
|
17
|
+
'space-050': '2px',
|
|
18
|
+
'space-100': '4px',
|
|
19
|
+
'space-150': '6px',
|
|
20
|
+
'space-200': '8px',
|
|
21
|
+
'space-250': '10px',
|
|
22
|
+
'space-300': '12px',
|
|
23
|
+
'space-350': '14px',
|
|
24
|
+
'space-400': '16px',
|
|
25
|
+
'space-450': '18px',
|
|
26
|
+
'space-500': '20px',
|
|
27
|
+
'space-550': '22px',
|
|
28
|
+
'space-600': '24px',
|
|
29
|
+
'space-650': '26px',
|
|
30
|
+
'space-750': '30px',
|
|
31
|
+
'space-800': '32px',
|
|
32
|
+
'space-850': '34px',
|
|
33
|
+
'space-900': '36px',
|
|
34
|
+
'space-950': '38px',
|
|
35
|
+
'space-1000': '40px',
|
|
36
|
+
'space-1100': '44px',
|
|
37
|
+
'space-1200': '48px',
|
|
38
|
+
'space-1300': '52px',
|
|
39
|
+
'space-1600': '64px',
|
|
40
|
+
'space-2000': '80px',
|
|
41
|
+
'space-2400': '96px',
|
|
42
|
+
'space-3200': '128px',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const breakpoints = {
|
|
46
|
+
lg: '1200px',
|
|
47
|
+
md: '1000px',
|
|
48
|
+
sm: '700px',
|
|
49
|
+
mobile: '480px',
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const border = {
|
|
53
|
+
'border-radius-0': '0px',
|
|
54
|
+
'border-radius-50': '2px',
|
|
55
|
+
'border-radius-100': '4px',
|
|
56
|
+
'border-radius-200': '8px',
|
|
57
|
+
'border-radius-full': '50%',
|
|
58
|
+
'border-width-025': '1px',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const typography = {
|
|
62
|
+
'font-family-sans': 'Inter',
|
|
63
|
+
'font-weight-regular': 450,
|
|
64
|
+
'font-weight-medium': 550,
|
|
65
|
+
'font-weight-semibold': 650,
|
|
66
|
+
'font-weight-bold': 700,
|
|
67
|
+
'font-letter-spacing-denser': '-0.3px',
|
|
68
|
+
'font-letter-spacing-dense': '-0.2px',
|
|
69
|
+
'font-letter-spacing-normal': '0px',
|
|
70
|
+
'font-size-300': '12px',
|
|
71
|
+
'font-size-350': '14px',
|
|
72
|
+
'font-size-400': '16px',
|
|
73
|
+
'font-size-500': '20px',
|
|
74
|
+
'font-size-600': '24px',
|
|
75
|
+
'font-size-750': '30px',
|
|
76
|
+
'font-line-height-400': '16px',
|
|
77
|
+
'font-line-height-500': '20px',
|
|
78
|
+
'font-line-height-550': '22px',
|
|
79
|
+
'font-line-height-600': '24px',
|
|
80
|
+
'font-line-height-650': '26px',
|
|
81
|
+
'font-line-height-700': '28px',
|
|
82
|
+
'font-line-height-800': '32px',
|
|
83
|
+
'font-line-height-1000': '40px',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// Export all tokens as a single object
|
|
87
|
+
export const tokens = {
|
|
88
|
+
...spacing,
|
|
89
|
+
...breakpoints,
|
|
90
|
+
...border,
|
|
91
|
+
...typography,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default tokens;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -1,6 +0,0 @@
|
|
|
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>;
|
|
@@ -1,49 +0,0 @@
|
|
|
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";
|