question-bank-framework 0.5.0 → 0.5.1
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.
|
@@ -142,18 +142,18 @@ export function PairingResponse({
|
|
|
142
142
|
{matching && (
|
|
143
143
|
<div className="mt-3 rounded-lg border border-gray-200 bg-gray-50 p-3">
|
|
144
144
|
<p className="m-0 text-xs font-semibold uppercase tracking-wide text-gray-500">Options</p>
|
|
145
|
-
<ol className="m-0 mt-2 grid list-none gap-x-6 gap-y-1 p-0 sm:grid-cols-2">
|
|
145
|
+
<ol className="m-0 mt-2 grid list-none grid-cols-[minmax(0,1fr)] gap-x-6 gap-y-1 p-0 sm:grid-cols-[repeat(2,minmax(0,1fr))]">
|
|
146
146
|
{(question.options ?? []).map((option, index) => (
|
|
147
147
|
<li key={option.id} className="flex items-start gap-2 text-sm text-gray-800">
|
|
148
148
|
<span className="w-5 shrink-0 font-semibold text-gray-500">{optionLetter(index)}.</span>
|
|
149
|
-
<MarkdownContent inline content={option.text} className="min-w-0 flex-1" />
|
|
149
|
+
<MarkdownContent inline content={option.text} className="min-w-0 flex-1 overflow-x-auto" />
|
|
150
150
|
</li>
|
|
151
151
|
))}
|
|
152
152
|
</ol>
|
|
153
153
|
</div>
|
|
154
154
|
)}
|
|
155
155
|
|
|
156
|
-
<ol aria-labelledby={`quiz-pairing-label-${question.id}`} className="m-0 mt-3 grid list-none gap-2 p-0">
|
|
156
|
+
<ol aria-labelledby={`quiz-pairing-label-${question.id}`} className="m-0 mt-3 grid list-none grid-cols-[minmax(0,1fr)] gap-2 p-0">
|
|
157
157
|
{slots.map((slot, index) => {
|
|
158
158
|
const chosen = pairings[slot.id];
|
|
159
159
|
const isCorrect = chosen === slot.correctId;
|
|
@@ -174,7 +174,7 @@ export function PairingResponse({
|
|
|
174
174
|
>
|
|
175
175
|
<div className="flex min-w-0 flex-1 items-start gap-2">
|
|
176
176
|
<span className="mt-0.5 w-6 shrink-0 text-sm font-semibold tabular-nums text-gray-500">{index + 1}.</span>
|
|
177
|
-
<label htmlFor={selectId} className="min-w-0 flex-1 text-base leading-7 text-gray-900">
|
|
177
|
+
<label htmlFor={selectId} className="min-w-0 flex-1 overflow-x-auto text-base leading-7 text-gray-900">
|
|
178
178
|
<MarkdownContent inline content={label} />
|
|
179
179
|
</label>
|
|
180
180
|
</div>
|
|
@@ -358,7 +358,7 @@ export function QuizPage() {
|
|
|
358
358
|
<p id="quiz-choices-label" className="text-sm font-semibold text-gray-900">
|
|
359
359
|
{kind === 'single' ? 'Choose one answer' : 'Choose all that apply'}
|
|
360
360
|
</p>
|
|
361
|
-
<div role={kind === 'single' ? 'radiogroup' : 'group'} aria-labelledby="quiz-choices-label" className="mt-2 grid gap-2">
|
|
361
|
+
<div role={kind === 'single' ? 'radiogroup' : 'group'} aria-labelledby="quiz-choices-label" className="mt-2 grid grid-cols-[minmax(0,1fr)] gap-2">
|
|
362
362
|
{(activeQuestion.options ?? []).map((option, index) => {
|
|
363
363
|
const selected = selectedIds.includes(option.id);
|
|
364
364
|
const isCorrectOption = correctIds.includes(option.id);
|
|
@@ -398,7 +398,7 @@ export function QuizPage() {
|
|
|
398
398
|
>
|
|
399
399
|
{optionLetter(index)}
|
|
400
400
|
</span>
|
|
401
|
-
<MarkdownContent content={option.text} className="min-w-0 flex-1 text-base leading-7" />
|
|
401
|
+
<MarkdownContent content={option.text} className="min-w-0 flex-1 overflow-x-auto text-base leading-7" />
|
|
402
402
|
{showCorrectness && isCorrectOption && (
|
|
403
403
|
<Badge variant="outline" className="shrink-0 border-green-600 bg-white text-green-800">
|
|
404
404
|
Correct
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "question-bank-framework",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
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",
|