question-bank-framework 0.8.0 → 0.9.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/README.md +11 -7
- package/framework/components/app-shell.tsx +11 -7
- package/framework/components/exam-timer.tsx +36 -27
- package/framework/components/filter-builder.tsx +65 -63
- package/framework/components/markdown-content.tsx +15 -15
- package/framework/components/question-bank.tsx +150 -227
- package/framework/components/question-response.tsx +41 -31
- package/framework/components/quiz-list.tsx +42 -37
- package/framework/components/quiz-page.tsx +63 -62
- package/framework/components/quiz-question-editor.tsx +11 -11
- package/framework/components/ui/badge.tsx +29 -23
- package/framework/components/ui/button.tsx +24 -28
- package/framework/components/ui/card.tsx +104 -0
- package/framework/components/ui/checkbox.tsx +9 -10
- package/framework/components/ui/dropdown-menu.tsx +139 -123
- package/framework/components/ui/field.tsx +238 -0
- package/framework/components/ui/input.tsx +6 -5
- package/framework/components/ui/kbd.tsx +28 -0
- package/framework/components/ui/label.tsx +19 -0
- package/framework/components/ui/popover.tsx +35 -32
- package/framework/components/ui/select.tsx +80 -65
- package/framework/components/ui/separator.tsx +24 -0
- package/framework/components/ui/sheet.tsx +36 -39
- package/framework/components/ui/table.tsx +4 -4
- package/framework/components/ui/toast.tsx +2 -2
- package/framework/components/ui/tooltip.tsx +65 -0
- package/framework/styles/theme.css +66 -28
- package/package.json +3 -1
- package/template/src/routes/__root.tsx +1 -1
- package/template/src/routes/styles.css +0 -4
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Import this from your app stylesheet
|
|
3
|
-
* copy-pasting the tokens, so every bank inherits upstream token changes:
|
|
1
|
+
/* Design system for question-bank-framework: shadcn/ui neutral tokens + Inter.
|
|
2
|
+
* Import this from your app stylesheet after tailwindcss:
|
|
4
3
|
*
|
|
5
4
|
* @import 'tailwindcss';
|
|
6
|
-
* @source '../node_modules/question-bank-framework';
|
|
7
5
|
* @import 'question-bank-framework/framework/styles/theme.css';
|
|
8
6
|
*/
|
|
9
7
|
|
|
8
|
+
/* Generate utilities used by the framework's components (paths resolve
|
|
9
|
+
* relative to this file, so this also works when the package is linked). */
|
|
10
|
+
@source '..';
|
|
11
|
+
|
|
12
|
+
/* Inter variable with both axes (wght 100–900, opsz 14–32), upright and italic.
|
|
13
|
+
* `font-optical-sizing: auto` (below) maps opsz to the font size, so small
|
|
14
|
+
* text gets Inter Text (open spacing) and headings get Inter Display (tight
|
|
15
|
+
* spacing, finer details). Don't add negative tracking on top of it. */
|
|
16
|
+
@import '@fontsource-variable/inter/opsz.css';
|
|
17
|
+
@import '@fontsource-variable/inter/opsz-italic.css';
|
|
18
|
+
@import 'tw-animate-css';
|
|
10
19
|
/* KaTeX CSS from the framework's own katex, matching the version that renders
|
|
11
20
|
* math in MarkdownContent. Don't import katex CSS separately in your app. */
|
|
12
21
|
@import 'katex/dist/katex.min.css';
|
|
13
22
|
|
|
23
|
+
@custom-variant dark (&:is(.dark *));
|
|
24
|
+
|
|
14
25
|
@theme inline {
|
|
15
|
-
--font-sans: '
|
|
16
|
-
--font-
|
|
17
|
-
--
|
|
18
|
-
--radius-
|
|
19
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
26
|
+
--font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
|
|
27
|
+
--font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
|
|
28
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
29
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
20
30
|
--radius-lg: var(--radius);
|
|
21
|
-
--radius-xl: calc(var(--radius)
|
|
31
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
32
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
22
33
|
--color-background: var(--background);
|
|
23
34
|
--color-foreground: var(--foreground);
|
|
24
35
|
--color-card: var(--card);
|
|
@@ -34,6 +45,8 @@
|
|
|
34
45
|
--color-accent: var(--accent);
|
|
35
46
|
--color-accent-foreground: var(--accent-foreground);
|
|
36
47
|
--color-destructive: var(--destructive);
|
|
48
|
+
--color-success: var(--success);
|
|
49
|
+
--color-warning: var(--warning);
|
|
37
50
|
--color-border: var(--border);
|
|
38
51
|
--color-input: var(--input);
|
|
39
52
|
--color-ring: var(--ring);
|
|
@@ -41,22 +54,47 @@
|
|
|
41
54
|
|
|
42
55
|
:root {
|
|
43
56
|
--radius: 0.625rem;
|
|
44
|
-
--background:
|
|
45
|
-
--foreground:
|
|
46
|
-
--card:
|
|
47
|
-
--card-foreground:
|
|
48
|
-
--popover:
|
|
49
|
-
--popover-foreground:
|
|
50
|
-
--primary:
|
|
51
|
-
--primary-foreground:
|
|
52
|
-
--secondary:
|
|
53
|
-
--secondary-foreground:
|
|
54
|
-
--muted:
|
|
55
|
-
--muted-foreground:
|
|
56
|
-
--accent:
|
|
57
|
-
--accent-foreground:
|
|
58
|
-
--destructive:
|
|
59
|
-
--
|
|
60
|
-
--
|
|
61
|
-
--
|
|
57
|
+
--background: oklch(1 0 0);
|
|
58
|
+
--foreground: oklch(0.145 0 0);
|
|
59
|
+
--card: oklch(1 0 0);
|
|
60
|
+
--card-foreground: oklch(0.145 0 0);
|
|
61
|
+
--popover: oklch(1 0 0);
|
|
62
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
63
|
+
--primary: oklch(0.205 0 0);
|
|
64
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
65
|
+
--secondary: oklch(0.97 0 0);
|
|
66
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
67
|
+
--muted: oklch(0.97 0 0);
|
|
68
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
69
|
+
--accent: oklch(0.97 0 0);
|
|
70
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
71
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
72
|
+
--success: oklch(0.527 0.154 150.069);
|
|
73
|
+
--warning: oklch(0.666 0.179 58.318);
|
|
74
|
+
--border: oklch(0.922 0 0);
|
|
75
|
+
--input: oklch(0.922 0 0);
|
|
76
|
+
--ring: oklch(0.708 0 0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@layer base {
|
|
80
|
+
* {
|
|
81
|
+
@apply border-border outline-ring/50;
|
|
82
|
+
}
|
|
83
|
+
html {
|
|
84
|
+
font-optical-sizing: auto;
|
|
85
|
+
-webkit-font-smoothing: antialiased;
|
|
86
|
+
-moz-osx-font-smoothing: grayscale;
|
|
87
|
+
text-rendering: optimizeLegibility;
|
|
88
|
+
}
|
|
89
|
+
body {
|
|
90
|
+
@apply bg-background font-sans text-foreground;
|
|
91
|
+
}
|
|
92
|
+
h1,
|
|
93
|
+
h2,
|
|
94
|
+
h3 {
|
|
95
|
+
text-wrap: balance;
|
|
96
|
+
}
|
|
97
|
+
p {
|
|
98
|
+
text-wrap: pretty;
|
|
99
|
+
}
|
|
62
100
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "question-bank-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Framework-style question bank: TanStack Start + TanStack Table grid, quizzes, and filter DSL. Bring your own bank.config.ts + content/. Eject any framework/ file with `qb reveal` (Vike-style).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@base-ui/react": "^1.9.0",
|
|
36
|
+
"@fontsource-variable/inter": "^5.3.0",
|
|
36
37
|
"@tanstack/react-table": "^8.21.3",
|
|
37
38
|
"@tanstack/react-virtual": "^3.14.19",
|
|
38
39
|
"class-variance-authority": "^0.7.1",
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"remark-gfm": "^4.0.1",
|
|
45
46
|
"remark-math": "^6.0.0",
|
|
46
47
|
"tailwind-merge": "^3.7.0",
|
|
48
|
+
"tw-animate-css": "^1.4.0",
|
|
47
49
|
"zustand": "^5.0.15"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
@@ -35,7 +35,7 @@ function RootDocument({ children }: { children: ReactNode }) {
|
|
|
35
35
|
<head>
|
|
36
36
|
<HeadContent />
|
|
37
37
|
</head>
|
|
38
|
-
<body className="
|
|
38
|
+
<body className="min-h-dvh">
|
|
39
39
|
{children}
|
|
40
40
|
<Scripts />
|
|
41
41
|
</body>
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');
|
|
2
1
|
@import 'tailwindcss';
|
|
3
|
-
@import 'tw-animate-css';
|
|
4
2
|
@import 'question-bank-framework/framework/styles/theme.css';
|
|
5
|
-
|
|
6
|
-
@source '../../node_modules/question-bank-framework';
|