Questionnaire Page
v0.1.4Questionnaire page: pipeline questions with single-choice answers, free-text custom answers, an additional-context field, and answered-count progress, with empty, confirmed and submitting states.
Preview
Install & usage
npx shadcn@latest add @signalos/questionnaire-01Pulls the page source plus its widget dependencies (@signalos/tokens, @signalos/utils, @signalos/button, @signalos/page-header, @signalos/textarea, @signalos/badge, @signalos/checkbox, @signalos/command, @signalos/dialog, @signalos/input, @signalos/label, @signalos/popover, @signalos/progress, @signalos/select, @signalos/skeleton, @signalos/tooltip) into your app - you own the copy. Requires access.
usage
// after: npx shadcn@latest add @signalos/questionnaire-01
// mount the pulled page in a route, e.g. src/app/semantics-details/page.tsx
import { Questionnaire } from "@/components/blocks/questionnaire-01/Questionnaire"
export default function Page() {
return <Questionnaire />
}Props
QuestionnaireOption
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| value* | string | - | |
| label* | string | - |
QuestionnaireQuestion
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| question* | string | - | |
| context | string | null | undefined | - | |
| category | string | null | undefined | - | |
| options* | QuestionnaireOption[] | - | |
| selected_answer | string | null | undefined | - | |
| custom_answer | string | null | undefined | - |
QuestionnaireData
| Prop | Type | Default | Description |
|---|---|---|---|
| questions* | QuestionnaireQuestion[] | - |
QuestionnaireAnswer
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | - | |
| category | string | undefined | - | |
| question | string | undefined | - | |
| selected_option | string | undefined | - | |
| selected_option_label | string | undefined | - | |
| custom_answer | string | undefined | - |
QuestionnaireFdeInput
| Prop | Type | Default | Description |
|---|---|---|---|
| answers* | QuestionnaireAnswer[] | - | |
| additional_context | string | undefined | - |
SubmitQuestionnairePayload
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | "retry" | "submit" | - | |
| answers | QuestionnaireAnswer[] | undefined | - | |
| additional_context | string | undefined | - |
QuestionnaireViewProps
| Prop | Type | Default | Description |
|---|---|---|---|
| questions* | QuestionnaireQuestion[] | - | |
| selectedAnswers* | Record<string, string> | - | |
| customAnswers* | Record<string, string> | - | |
| additionalContext* | string | - | |
| answeredCount* | number | - | |
| isConfirmed | boolean | undefined | - | |
| isSubmitting | boolean | undefined | - | |
| isNavigating | boolean | undefined | - | |
| onSelectOption* | (qid: string, value: string) => void | - | |
| onSelectCustom* | (qid: string) => void | - | |
| onCustomTextChange* | (qid: string, text: string) => void | - | |
| onAdditionalContextChange* | (context: string) => void | - | |
| onSubmit* | (action: "retry" | "submit") => void | - | |
| headerActions | ReactNode | - | |
| confirmedBanner | ReactNode | - | |
| className | string | undefined | - | |
| data-testid | string | undefined | - |
More Semantics Stages variants
Changelog
0.1.4
- Replace the copied placeholder description with one that actually describes this block; the registry description is what the agent skill shows as "pick it when".
0.1.3
Questionnaire: replacePageHeaderLeftused as a title withPageHeaderTitlefor correct semantic markup.Questionnaire: adddata-testid="questionnaire-question"to each question containerdiv.Questionnaire: add hiddenquestionnaire-retry-buttonalongside the submit button for consistency with other stage blocks.Questionnaire: wrap submit and retry buttons in agap-2flex row.Questionnaire.types.ts: allownullforcontext,category,selected_answer, andcustom_answerfields onQuestionnaireQuestion.
0.1.2
- Content updates.
semantics-details-01
0.1.1
0.4.0
- Register all 54 component files in
registry-item.jsonso consumers receive the full component tree on install.
0.3.0
- Remove legacy
components/semantics/folder; all components now live in per-stage directories (glossary/,relationships/,cross-source/,metrics/,signal-rules/,equilibrium/,content-profile/). - Register all migrated component files in
registry-item.jsonso consumers receive the full component tree.
0.2.0
- Lift navigation out of card sub-components:
ReviewQueueCard,SharedStageCard, andCompletedStageCardno longer calluseRouter— they now accept anonNavigate: (path: string) => voidprop and call it instead. - Add
onNavigatetoReviewQueueViewProps;ReviewQueueViewthreads it throughQueueSectionto each card. - Replace
@/typesimports in card components andStepProgresswith relative imports from../../pipeline.types(removes the forbidden app-level alias from shipped files). - Remove
StageActionDialogimport fromSharedStageCard(pointed to@/components/features/…, a forbidden app-side path).
0.1.0
- Initial block: review queue view with per-source and shared stage sections, tab navigation, and questionnaire view.