@mostra/kit 0.0.0-stage → 0.19.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 +43 -2
- package/css/kit.css +59 -0
- package/css/shadcn.css +638 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +60 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +112 -0
- package/dist/layout.js.map +1 -0
- package/dist/questionnaire.d.ts +100 -0
- package/dist/questionnaire.d.ts.map +1 -0
- package/dist/questionnaire.js +632 -0
- package/dist/questionnaire.js.map +1 -0
- package/package.json +120 -3
- package/registry/LICENSE.md +21 -0
- package/registry/base/accordion.json +19 -0
- package/registry/base/alert-dialog.json +21 -0
- package/registry/base/alert.json +18 -0
- package/registry/base/aspect-ratio.json +17 -0
- package/registry/base/attachment.json +22 -0
- package/registry/base/avatar.json +18 -0
- package/registry/base/badge.json +19 -0
- package/registry/base/breadcrumb.json +19 -0
- package/registry/base/bubble.json +19 -0
- package/registry/base/button-group.json +22 -0
- package/registry/base/button.json +19 -0
- package/registry/base/calendar.json +22 -0
- package/registry/base/card.json +17 -0
- package/registry/base/carousel.json +22 -0
- package/registry/base/chart.json +21 -0
- package/registry/base/checkbox.json +19 -0
- package/registry/base/code-block.json +23 -0
- package/registry/base/collapsible.json +17 -0
- package/registry/base/combobox.json +23 -0
- package/registry/base/command.json +23 -0
- package/registry/base/components/mostra/layout.tsx +221 -0
- package/registry/base/components/mostra/questionnaire.tsx +1005 -0
- package/registry/base/components/ui/accordion.tsx +71 -0
- package/registry/base/components/ui/alert-dialog.tsx +187 -0
- package/registry/base/components/ui/alert.tsx +75 -0
- package/registry/base/components/ui/aspect-ratio.tsx +22 -0
- package/registry/base/components/ui/attachment.tsx +207 -0
- package/registry/base/components/ui/avatar.tsx +108 -0
- package/registry/base/components/ui/badge.tsx +54 -0
- package/registry/base/components/ui/breadcrumb.tsx +124 -0
- package/registry/base/components/ui/bubble.tsx +127 -0
- package/registry/base/components/ui/button-group.tsx +87 -0
- package/registry/base/components/ui/button.tsx +57 -0
- package/registry/base/components/ui/calendar.tsx +221 -0
- package/registry/base/components/ui/card.tsx +102 -0
- package/registry/base/components/ui/carousel.tsx +242 -0
- package/registry/base/components/ui/chart.tsx +372 -0
- package/registry/base/components/ui/checkbox.tsx +28 -0
- package/registry/base/components/ui/code-block.tsx +249 -0
- package/registry/base/components/ui/collapsible.tsx +21 -0
- package/registry/base/components/ui/combobox.tsx +297 -0
- package/registry/base/components/ui/command.tsx +196 -0
- package/registry/base/components/ui/context-menu.tsx +270 -0
- package/registry/base/components/ui/dialog.tsx +160 -0
- package/registry/base/components/ui/direction.tsx +6 -0
- package/registry/base/components/ui/drawer.tsx +227 -0
- package/registry/base/components/ui/dropdown-menu.tsx +267 -0
- package/registry/base/components/ui/empty.tsx +103 -0
- package/registry/base/components/ui/field.tsx +238 -0
- package/registry/base/components/ui/hover-card.tsx +50 -0
- package/registry/base/components/ui/input-group.tsx +158 -0
- package/registry/base/components/ui/input-otp.tsx +86 -0
- package/registry/base/components/ui/input.tsx +19 -0
- package/registry/base/components/ui/item.tsx +201 -0
- package/registry/base/components/ui/kbd.tsx +26 -0
- package/registry/base/components/ui/label.tsx +19 -0
- package/registry/base/components/ui/marker.tsx +70 -0
- package/registry/base/components/ui/menubar.tsx +280 -0
- package/registry/base/components/ui/message-scroller.tsx +131 -0
- package/registry/base/components/ui/message.tsx +91 -0
- package/registry/base/components/ui/native-select.tsx +60 -0
- package/registry/base/components/ui/navigation-menu.tsx +167 -0
- package/registry/base/components/ui/pagination.tsx +130 -0
- package/registry/base/components/ui/popover.tsx +89 -0
- package/registry/base/components/ui/progress.tsx +82 -0
- package/registry/base/components/ui/questionnaire.tsx +324 -0
- package/registry/base/components/ui/radio-group.tsx +37 -0
- package/registry/base/components/ui/resizable.tsx +49 -0
- package/registry/base/components/ui/scroll-area.tsx +53 -0
- package/registry/base/components/ui/select.tsx +200 -0
- package/registry/base/components/ui/separator.tsx +24 -0
- package/registry/base/components/ui/sheet.tsx +138 -0
- package/registry/base/components/ui/sidebar.tsx +723 -0
- package/registry/base/components/ui/skeleton.tsx +13 -0
- package/registry/base/components/ui/slider.tsx +51 -0
- package/registry/base/components/ui/sonner.tsx +65 -0
- package/registry/base/components/ui/spinner.tsx +10 -0
- package/registry/base/components/ui/switch.tsx +31 -0
- package/registry/base/components/ui/table.tsx +116 -0
- package/registry/base/components/ui/tabs.tsx +85 -0
- package/registry/base/components/ui/textarea.tsx +17 -0
- package/registry/base/components/ui/toast.tsx +234 -0
- package/registry/base/components/ui/toggle-group.tsx +89 -0
- package/registry/base/components/ui/toggle.tsx +44 -0
- package/registry/base/components/ui/tooltip.tsx +65 -0
- package/registry/base/components/ui/trace.tsx +162 -0
- package/registry/base/context-menu.json +19 -0
- package/registry/base/dialog.json +22 -0
- package/registry/base/direction.json +17 -0
- package/registry/base/drawer.json +18 -0
- package/registry/base/dropdown-menu.json +19 -0
- package/registry/base/empty.json +18 -0
- package/registry/base/field.json +22 -0
- package/registry/base/hooks/use-highlighted-code.ts +75 -0
- package/registry/base/hooks/use-mobile.ts +19 -0
- package/registry/base/hover-card.json +18 -0
- package/registry/base/input-group.json +23 -0
- package/registry/base/input-otp.json +19 -0
- package/registry/base/input.json +18 -0
- package/registry/base/item.json +22 -0
- package/registry/base/kbd.json +17 -0
- package/registry/base/label.json +17 -0
- package/registry/base/lib/highlighter.tsx +124 -0
- package/registry/base/lib/utils.ts +1 -0
- package/registry/base/marker.json +19 -0
- package/registry/base/menubar.json +22 -0
- package/registry/base/message-scroller.json +22 -0
- package/registry/base/message.json +17 -0
- package/registry/base/mostra-layout.json +20 -0
- package/registry/base/mostra-questionnaire.json +22 -0
- package/registry/base/native-select.json +18 -0
- package/registry/base/navigation-menu.json +20 -0
- package/registry/base/pagination.json +21 -0
- package/registry/base/popover.json +18 -0
- package/registry/base/progress.json +18 -0
- package/registry/base/questionnaire.json +22 -0
- package/registry/base/radio-group.json +18 -0
- package/registry/base/registry.json +287 -0
- package/registry/base/resizable.json +18 -0
- package/registry/base/scroll-area.json +18 -0
- package/registry/base/select.json +19 -0
- package/registry/base/separator.json +18 -0
- package/registry/base/sheet.json +22 -0
- package/registry/base/sidebar.json +29 -0
- package/registry/base/skeleton.json +17 -0
- package/registry/base/slider.json +18 -0
- package/registry/base/sonner.json +18 -0
- package/registry/base/spinner.json +18 -0
- package/registry/base/switch.json +18 -0
- package/registry/base/table.json +17 -0
- package/registry/base/tabs.json +19 -0
- package/registry/base/textarea.json +17 -0
- package/registry/base/toast.json +22 -0
- package/registry/base/toggle-group.json +22 -0
- package/registry/base/toggle.json +19 -0
- package/registry/base/tooltip.json +18 -0
- package/registry/base/trace.json +21 -0
- package/registry/base/use-highlighted-code.json +21 -0
- package/registry/base/use-mobile.json +14 -0
- package/registry/base/utils.json +17 -0
- package/registry/radix/accordion.json +19 -0
- package/registry/radix/alert-dialog.json +21 -0
- package/registry/radix/alert.json +18 -0
- package/registry/radix/aspect-ratio.json +17 -0
- package/registry/radix/attachment.json +22 -0
- package/registry/radix/avatar.json +18 -0
- package/registry/radix/badge.json +19 -0
- package/registry/radix/breadcrumb.json +19 -0
- package/registry/radix/bubble.json +19 -0
- package/registry/radix/button-group.json +22 -0
- package/registry/radix/button.json +19 -0
- package/registry/radix/calendar.json +22 -0
- package/registry/radix/card.json +17 -0
- package/registry/radix/carousel.json +22 -0
- package/registry/radix/chart.json +18 -0
- package/registry/radix/checkbox.json +19 -0
- package/registry/radix/code-block.json +23 -0
- package/registry/radix/collapsible.json +17 -0
- package/registry/radix/combobox.json +23 -0
- package/registry/radix/command.json +23 -0
- package/registry/radix/components/mostra/layout.tsx +221 -0
- package/registry/radix/components/mostra/questionnaire.tsx +1005 -0
- package/registry/radix/components/ui/accordion.tsx +80 -0
- package/registry/radix/components/ui/alert-dialog.tsx +199 -0
- package/registry/radix/components/ui/alert.tsx +75 -0
- package/registry/radix/components/ui/aspect-ratio.tsx +11 -0
- package/registry/radix/components/ui/attachment.tsx +204 -0
- package/registry/radix/components/ui/avatar.tsx +111 -0
- package/registry/radix/components/ui/badge.tsx +51 -0
- package/registry/radix/components/ui/breadcrumb.tsx +121 -0
- package/registry/radix/components/ui/bubble.tsx +124 -0
- package/registry/radix/components/ui/button-group.tsx +83 -0
- package/registry/radix/components/ui/button.tsx +66 -0
- package/registry/radix/components/ui/calendar.tsx +222 -0
- package/registry/radix/components/ui/card.tsx +102 -0
- package/registry/radix/components/ui/carousel.tsx +242 -0
- package/registry/radix/components/ui/chart.tsx +372 -0
- package/registry/radix/components/ui/checkbox.tsx +32 -0
- package/registry/radix/components/ui/code-block.tsx +249 -0
- package/registry/radix/components/ui/collapsible.tsx +33 -0
- package/registry/radix/components/ui/combobox.tsx +299 -0
- package/registry/radix/components/ui/command.tsx +195 -0
- package/registry/radix/components/ui/context-menu.tsx +262 -0
- package/registry/radix/components/ui/dialog.tsx +168 -0
- package/registry/radix/components/ui/direction.tsx +22 -0
- package/registry/radix/components/ui/drawer.tsx +133 -0
- package/registry/radix/components/ui/dropdown-menu.tsx +268 -0
- package/registry/radix/components/ui/empty.tsx +103 -0
- package/registry/radix/components/ui/field.tsx +238 -0
- package/registry/radix/components/ui/hover-card.tsx +43 -0
- package/registry/radix/components/ui/input-group.tsx +156 -0
- package/registry/radix/components/ui/input-otp.tsx +86 -0
- package/registry/radix/components/ui/input.tsx +18 -0
- package/registry/radix/components/ui/item.tsx +196 -0
- package/registry/radix/components/ui/kbd.tsx +26 -0
- package/registry/radix/components/ui/label.tsx +23 -0
- package/registry/radix/components/ui/marker.tsx +68 -0
- package/registry/radix/components/ui/menubar.tsx +279 -0
- package/registry/radix/components/ui/message-scroller.tsx +131 -0
- package/registry/radix/components/ui/message.tsx +91 -0
- package/registry/radix/components/ui/native-select.tsx +60 -0
- package/registry/radix/components/ui/navigation-menu.tsx +163 -0
- package/registry/radix/components/ui/pagination.tsx +129 -0
- package/registry/radix/components/ui/popover.tsx +88 -0
- package/registry/radix/components/ui/progress.tsx +30 -0
- package/registry/radix/components/ui/questionnaire.tsx +324 -0
- package/registry/radix/components/ui/radio-group.tsx +43 -0
- package/registry/radix/components/ui/resizable.tsx +49 -0
- package/registry/radix/components/ui/scroll-area.tsx +54 -0
- package/registry/radix/components/ui/select.tsx +191 -0
- package/registry/radix/components/ui/separator.tsx +27 -0
- package/registry/radix/components/ui/sheet.tsx +147 -0
- package/registry/radix/components/ui/sidebar.tsx +702 -0
- package/registry/radix/components/ui/skeleton.tsx +13 -0
- package/registry/radix/components/ui/slider.tsx +62 -0
- package/registry/radix/components/ui/sonner.tsx +65 -0
- package/registry/radix/components/ui/spinner.tsx +10 -0
- package/registry/radix/components/ui/switch.tsx +32 -0
- package/registry/radix/components/ui/table.tsx +116 -0
- package/registry/radix/components/ui/tabs.tsx +129 -0
- package/registry/radix/components/ui/textarea.tsx +17 -0
- package/registry/radix/components/ui/toggle-group.tsx +89 -0
- package/registry/radix/components/ui/toggle.tsx +46 -0
- package/registry/radix/components/ui/tooltip.tsx +56 -0
- package/registry/radix/components/ui/trace.tsx +162 -0
- package/registry/radix/context-menu.json +19 -0
- package/registry/radix/dialog.json +22 -0
- package/registry/radix/direction.json +17 -0
- package/registry/radix/drawer.json +18 -0
- package/registry/radix/dropdown-menu.json +19 -0
- package/registry/radix/empty.json +18 -0
- package/registry/radix/field.json +22 -0
- package/registry/radix/hooks/use-highlighted-code.ts +75 -0
- package/registry/radix/hooks/use-mobile.ts +19 -0
- package/registry/radix/hover-card.json +18 -0
- package/registry/radix/input-group.json +23 -0
- package/registry/radix/input-otp.json +19 -0
- package/registry/radix/input.json +17 -0
- package/registry/radix/item.json +22 -0
- package/registry/radix/kbd.json +17 -0
- package/registry/radix/label.json +18 -0
- package/registry/radix/lib/highlighter.tsx +124 -0
- package/registry/radix/lib/utils.ts +1 -0
- package/registry/radix/marker.json +19 -0
- package/registry/radix/menubar.json +19 -0
- package/registry/radix/message-scroller.json +22 -0
- package/registry/radix/message.json +17 -0
- package/registry/radix/mostra-layout.json +20 -0
- package/registry/radix/mostra-questionnaire.json +22 -0
- package/registry/radix/native-select.json +18 -0
- package/registry/radix/navigation-menu.json +20 -0
- package/registry/radix/pagination.json +21 -0
- package/registry/radix/popover.json +18 -0
- package/registry/radix/progress.json +18 -0
- package/registry/radix/questionnaire.json +22 -0
- package/registry/radix/radio-group.json +18 -0
- package/registry/radix/registry.json +283 -0
- package/registry/radix/resizable.json +18 -0
- package/registry/radix/scroll-area.json +18 -0
- package/registry/radix/select.json +19 -0
- package/registry/radix/separator.json +18 -0
- package/registry/radix/sheet.json +22 -0
- package/registry/radix/sidebar.json +29 -0
- package/registry/radix/skeleton.json +17 -0
- package/registry/radix/slider.json +18 -0
- package/registry/radix/sonner.json +18 -0
- package/registry/radix/spinner.json +18 -0
- package/registry/radix/switch.json +18 -0
- package/registry/radix/table.json +17 -0
- package/registry/radix/tabs.json +19 -0
- package/registry/radix/textarea.json +17 -0
- package/registry/radix/toggle-group.json +22 -0
- package/registry/radix/toggle.json +19 -0
- package/registry/radix/tooltip.json +18 -0
- package/registry/radix/trace.json +21 -0
- package/registry/radix/use-highlighted-code.json +21 -0
- package/registry/radix/use-mobile.json +14 -0
- package/registry/radix/utils.json +17 -0
- package/src/index.ts +15 -0
- package/src/layout.tsx +221 -0
- package/src/questionnaire.tsx +1005 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionnaire.js","names":[],"sources":["../src/questionnaire.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * The questionnaire (ROUND-3 §1.4, KT-05): questions people answer, each answer a field\n * (`<questionnaire>.<question>`, D52) saved as they go, labelled in results with the options the\n * person saw and whether they took the one recommended. Choices (one or several, with an answer of\n * their own), scales, rankings and text; a comment on any question; required questions, which the\n * trusted Submit waits for; sections; progress; on one page or a step at a time.\n *\n * Ordinary React on native inputs, so it works in either base and anywhere React runs; every part\n * reads the theme's tokens and takes `className`, and `mostra add mostra-questionnaire` copies it\n * into the artifact for editing, where the copy then wins (D68, KT-10).\n */\n\nimport { useField } from \"@mostra/react\";\nimport { cn } from \"cn\";\nimport { ArrowDown, ArrowUp, Check, X } from \"lucide-react\";\nimport * as React from \"react\";\n\n/* -------------------------------------------------------------------------------------------- */\n/* The questionnaire */\n\ninterface QuestionnaireContextValue {\n readonly id: string;\n /** Each question's number on the page, by its ID, in reading order. */\n readonly numbers: ReadonlyMap<string, number>;\n readonly report: (question: string, answered: boolean) => void;\n}\n\nconst QuestionnaireContext = React.createContext<QuestionnaireContextValue | null>(null);\n\nfunction useQuestionnaire(part: string): QuestionnaireContextValue {\n const context = React.useContext(QuestionnaireContext);\n if (context === null) throw new Error(`<${part}> belongs inside a <Questionnaire>.`);\n return context;\n}\n\n/** The `id`s of the questions under `children`, in reading order, through sections and fragments. */\nfunction questionIds(children: React.ReactNode): string[] {\n const ids: string[] = [];\n React.Children.forEach(children, (child) => {\n if (!React.isValidElement(child)) return;\n const props = child.props as { id?: unknown; children?: React.ReactNode };\n if (child.type === Question && typeof props.id === \"string\") ids.push(props.id);\n else if (child.type === Section || child.type === React.Fragment) {\n ids.push(...questionIds(props.children));\n }\n });\n return ids;\n}\n\ninterface QuestionnaireProps extends Omit<React.ComponentProps<\"div\">, \"id\" | \"title\"> {\n /** The questionnaire's ID: every answer is the field `<id>.<question>`. */\n readonly id: string;\n readonly title?: React.ReactNode;\n readonly description?: React.ReactNode;\n /** `page` (the default): every question at once. `steps`: a section, or a question, at a time. */\n readonly mode?: \"page\" | \"steps\";\n /** Show how many questions are answered (the default). */\n readonly progress?: boolean;\n}\n\nfunction Questionnaire({\n id,\n title,\n description,\n mode = \"page\",\n progress = true,\n className,\n children,\n ...props\n}: QuestionnaireProps): React.JSX.Element {\n const ids = questionIds(children);\n const numbers = new Map(ids.map((question, index) => [question, index + 1]));\n const [answered, setAnswered] = React.useState<ReadonlySet<string>>(new Set());\n const report = React.useCallback((question: string, isAnswered: boolean) => {\n setAnswered((current) => {\n if (current.has(question) === isAnswered) return current;\n const next = new Set(current);\n if (isAnswered) next.add(question);\n else next.delete(question);\n return next;\n });\n }, []);\n const context: QuestionnaireContextValue = { id, numbers, report };\n const numbered = numberSections(children);\n const steps = React.Children.toArray(numbered).filter(React.isValidElement);\n const [step, setStep] = React.useState(0);\n const current = Math.min(step, Math.max(steps.length - 1, 0));\n const count = ids.filter((question) => answered.has(question)).length;\n\n return (\n <QuestionnaireContext.Provider value={context}>\n <div\n data-slot=\"questionnaire\"\n data-mode={mode}\n className={cn(\"flex flex-col gap-(--stack-gap)\", className)}\n {...props}\n >\n {(title !== undefined || description !== undefined || progress) && (\n <header data-slot=\"questionnaire-header\" className=\"flex flex-col gap-3\">\n {title !== undefined && <h1>{title}</h1>}\n {description !== undefined && (\n <p className=\"max-w-prose text-pretty text-muted-foreground\">{description}</p>\n )}\n {progress && ids.length > 0 && <AnswerProgress answered={count} total={ids.length} />}\n </header>\n )}\n {mode === \"page\"\n ? numbered\n : steps.map((child, index) => (\n // Every step stays mounted, so a required question on a later step still waits for\n // its answer and a submit sends what each step holds (D110).\n <div\n key={child.key ?? index}\n data-slot=\"questionnaire-step\"\n hidden={index !== current}\n >\n {child}\n </div>\n ))}\n {mode === \"steps\" && steps.length > 1 && (\n <nav\n data-slot=\"questionnaire-steps\"\n aria-label=\"Steps\"\n className=\"flex items-center justify-between gap-4 border-t border-border pt-5\"\n >\n <span className=\"text-sm text-muted-foreground tabular-nums\">\n Step {current + 1} of {steps.length}\n </span>\n <span className=\"flex gap-2\">\n <button\n type=\"button\"\n disabled={current === 0}\n onClick={() => setStep(current - 1)}\n className={stepButton(\"secondary\")}\n >\n Previous\n </button>\n <button\n type=\"button\"\n disabled={current === steps.length - 1}\n onClick={() => setStep(current + 1)}\n className={stepButton(\"primary\")}\n >\n Next\n </button>\n </span>\n </nav>\n )}\n </div>\n </QuestionnaireContext.Provider>\n );\n}\n\nfunction stepButton(kind: \"primary\" | \"secondary\"): string {\n return cn(\n \"press inline-flex h-(--control-h-sm) items-center rounded-button px-4 text-sm font-medium outline-none focus-visible:ring-3 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-40\",\n kind === \"primary\"\n ? \"bg-primary text-primary-foreground shadow-button hover:bg-[color-mix(in_oklab,var(--primary),var(--foreground)_14%)]\"\n : \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--secondary),var(--foreground)_6%)]\",\n );\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Sections */\n\ninterface SectionProps extends Omit<React.ComponentProps<\"section\">, \"title\"> {\n readonly title: React.ReactNode;\n readonly description?: React.ReactNode;\n /** Its number, which the questionnaire gives each of its sections in order. */\n readonly index?: number;\n}\n\nfunction Section({\n title,\n description,\n index,\n className,\n children,\n ...props\n}: SectionProps): React.JSX.Element {\n const headingId = React.useId();\n return (\n <section\n data-slot=\"questionnaire-section\"\n aria-labelledby={headingId}\n className={cn(\n \"flex flex-col gap-8 rounded-(--section-radius) bg-(--section-bg) p-(--section-pad) shadow-(--section-shadow) [border-top:var(--section-rule)]\",\n className,\n )}\n {...props}\n >\n <header className=\"flex flex-col gap-1.5\">\n <h2 id={headingId} className=\"flex items-center gap-[0.6em]\">\n {index !== undefined && (\n <span\n data-slot=\"section-index\"\n aria-hidden\n className=\"grid size-(--section-index-size) shrink-0 place-items-center rounded-full bg-(--section-index-bg) text-[0.8em] text-(--section-index-color) tabular-nums\"\n >\n {index}\n </span>\n )}\n <span>{title}</span>\n </h2>\n {description !== undefined && (\n <p className=\"max-w-prose text-pretty text-muted-foreground\">{description}</p>\n )}\n </header>\n {children}\n </section>\n );\n}\n\n/** The questionnaire's sections, numbered in order: those it holds directly or in fragments. */\nfunction numberSections(children: React.ReactNode, next = { value: 1 }): React.ReactNode {\n return React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) return child;\n if (child.type === Section) {\n const props = child.props as SectionProps;\n return props.index !== undefined\n ? child\n : React.cloneElement(child as React.ReactElement<SectionProps>, { index: next.value++ });\n }\n if (child.type === React.Fragment) {\n const props = child.props as { children?: React.ReactNode };\n return (\n <React.Fragment key={child.key}>{numberSections(props.children, next)}</React.Fragment>\n );\n }\n return child;\n });\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Questions */\n\ninterface QuestionContextValue {\n /** The answer's field: `<questionnaire>.<question>`. */\n readonly field: string;\n readonly label: string | undefined;\n readonly required: boolean;\n readonly multiple: boolean;\n readonly titleId: string;\n readonly descriptionId: string | undefined;\n readonly report: (answered: boolean) => void;\n}\n\nconst QuestionContext = React.createContext<QuestionContextValue | null>(null);\n\nfunction useQuestion(part: string): QuestionContextValue {\n const context = React.useContext(QuestionContext);\n if (context === null) throw new Error(`<${part}> belongs inside a <Question>.`);\n return context;\n}\n\n/** The text of a title, for results' labels, when it is text. */\nfunction textOf(node: React.ReactNode): string | undefined {\n if (typeof node === \"string\") return node;\n if (typeof node === \"number\") return String(node);\n return undefined;\n}\n\ninterface QuestionProps extends Omit<React.ComponentProps<\"fieldset\">, \"id\" | \"title\"> {\n /** The question's ID inside its questionnaire: the answer is `<questionnaire>.<id>`. */\n readonly id: string;\n readonly title: React.ReactNode;\n /** What results call it, when the title isn't plain text. */\n readonly label?: string;\n readonly description?: React.ReactNode;\n /** The trusted Submit waits until it is answered. */\n readonly required?: boolean;\n /** Its choices take several answers. */\n readonly multiple?: boolean;\n /** A comment beside the answer: the field `<questionnaire>.<id>.comment`. */\n readonly comments?: boolean;\n}\n\nfunction Question({\n id,\n title,\n label,\n description,\n required = false,\n multiple = false,\n comments = false,\n className,\n children,\n ...props\n}: QuestionProps): React.JSX.Element {\n const questionnaire = useQuestionnaire(\"Question\");\n const field = `${questionnaire.id}.${id}`;\n const titleId = React.useId();\n const descriptionId = React.useId();\n const reportTo = questionnaire.report;\n const report = React.useCallback((answered: boolean) => reportTo(id, answered), [reportTo, id]);\n const context = React.useMemo<QuestionContextValue>(\n () => ({\n field,\n label: label ?? textOf(title),\n required,\n multiple,\n titleId,\n descriptionId: description === undefined ? undefined : descriptionId,\n report,\n }),\n [field, label, title, required, multiple, titleId, description, descriptionId, report],\n );\n const choices = React.Children.toArray(children).some(\n (child) => React.isValidElement(child) && (child.type === Choice || child.type === Other),\n );\n const number = questionnaire.numbers.get(id);\n return (\n <QuestionContext.Provider value={context}>\n <fieldset\n data-slot=\"question\"\n aria-describedby={description === undefined ? undefined : descriptionId}\n className={cn(\"m-0 flex min-w-0 flex-col gap-4 border-0 p-0\", className)}\n {...props}\n >\n <legend id={titleId} className=\"contents\">\n <span className=\"flex items-baseline gap-3 font-heading text-[1.0625rem] leading-snug font-(--heading-weight) tracking-(--heading-tracking) text-balance\">\n {number !== undefined && (\n <span\n data-slot=\"question-number\"\n aria-hidden\n className=\"font-sans text-sm font-semibold text-(--question-number-color) tabular-nums\"\n >\n {number}\n </span>\n )}\n <span>\n {title}\n {required ? (\n <span className=\"ml-2 align-middle font-sans text-xs font-medium text-muted-foreground\">\n Required\n </span>\n ) : null}\n </span>\n </span>\n </legend>\n {description !== undefined && (\n <p id={descriptionId} className=\"-mt-2 text-sm text-pretty text-muted-foreground\">\n {description}\n </p>\n )}\n {choices ? <ChoiceAnswer>{children}</ChoiceAnswer> : children}\n {comments && <Comment />}\n </fieldset>\n </QuestionContext.Provider>\n );\n}\n\n/** Reports to the questionnaire whether the question is answered. */\nfunction useAnswered(report: (answered: boolean) => void, answered: boolean): void {\n React.useEffect(() => report(answered), [report, answered]);\n React.useEffect(() => () => report(false), [report]);\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Choices */\n\ninterface ChoiceProps {\n /** The value the answer holds when this is chosen. */\n readonly value: string;\n readonly children: React.ReactNode;\n /** What results call it, when its children aren't plain text. */\n readonly label?: string;\n readonly description?: React.ReactNode;\n /** The option the page recommends, marked; a string names the mark (\"Our pick\"). */\n readonly recommended?: boolean | string;\n /** A figure beside it: a price, a count. */\n readonly meta?: React.ReactNode;\n /** A picture above it: a sketch, a screenshot. */\n readonly media?: React.ReactNode;\n readonly className?: string;\n}\n\n/** A choice of a question: rendered by its question, which owns the answer. */\nfunction Choice(_props: ChoiceProps): React.ReactNode {\n return null;\n}\n\ninterface OtherProps {\n /** Its label: \"Something else\" unless given. */\n readonly children?: React.ReactNode;\n readonly placeholder?: string;\n readonly className?: string;\n}\n\n/** The value an answer of the person's own holds; the text is `<question>.other`. */\nconst OTHER = \"other\";\n\n/** An answer of the person's own: chosen, then written. */\nfunction Other(_props: OtherProps): React.ReactNode {\n return null;\n}\n\nfunction ChoiceAnswer({ children }: { readonly children: React.ReactNode }) {\n const question = useQuestion(\"Choice\");\n const items = React.Children.toArray(children).filter(React.isValidElement) as React.ReactElement<\n ChoiceProps | OtherProps\n >[];\n const choices = items.filter((item) => item.type === Choice) as React.ReactElement<ChoiceProps>[];\n const other = items.find((item) => item.type === Other) as\n | React.ReactElement<OtherProps>\n | undefined;\n const otherLabel = textOf(other?.props.children) ?? \"Something else\";\n const options = [\n ...choices.map((choice) => ({\n value: choice.props.value,\n ...((choice.props.label ?? textOf(choice.props.children)) !== undefined\n ? { label: (choice.props.label ?? textOf(choice.props.children)) as string }\n : {}),\n ...(choice.props.recommended ? { recommended: true } : {}),\n })),\n ...(other ? [{ value: OTHER, label: otherLabel }] : []),\n ];\n const fieldOptions = {\n ...(question.label !== undefined ? { label: question.label } : {}),\n required: question.required,\n options,\n };\n return question.multiple ? (\n <ManyChoices choices={choices} other={other} otherLabel={otherLabel} options={fieldOptions} />\n ) : (\n <OneChoice choices={choices} other={other} otherLabel={otherLabel} options={fieldOptions} />\n );\n}\n\ninterface ChoiceListProps {\n readonly choices: readonly React.ReactElement<ChoiceProps>[];\n readonly other: React.ReactElement<OtherProps> | undefined;\n readonly otherLabel: string;\n readonly options: {\n readonly label?: string;\n readonly required: boolean;\n readonly options: readonly { value: string; label?: string; recommended?: boolean }[];\n };\n}\n\nfunction OneChoice({ choices, other, otherLabel, options }: ChoiceListProps) {\n const question = useQuestion(\"Choice\");\n const [value, setValue] = useField<string>(question.field, \"\", options);\n useAnswered(question.report, value !== \"\");\n const media = choices.some((choice) => choice.props.media !== undefined);\n return (\n <div className=\"flex flex-col gap-3\">\n <div\n role=\"radiogroup\"\n aria-labelledby={question.titleId}\n aria-required={question.required || undefined}\n className={cn(\"grid gap-2.5\", media && \"sm:grid-cols-2\")}\n >\n {choices.map((choice) => (\n <ChoiceCard\n key={choice.props.value}\n type=\"radio\"\n name={question.field}\n checked={value === choice.props.value}\n onChange={() => setValue(choice.props.value)}\n {...choice.props}\n />\n ))}\n {other && (\n <ChoiceCard\n type=\"radio\"\n name={question.field}\n value={OTHER}\n checked={value === OTHER}\n onChange={() => setValue(OTHER)}\n className={other.props.className}\n >\n {otherLabel}\n </ChoiceCard>\n )}\n </div>\n {other && value === OTHER && (\n <OtherText placeholder={other.props.placeholder} label={otherLabel} />\n )}\n {!question.required && value !== \"\" && (\n <button\n type=\"button\"\n onClick={() => setValue(\"\")}\n aria-label={question.label ? `Clear my answer to “${question.label}”` : \"Clear my answer\"}\n className=\"press inline-flex w-fit items-center gap-1.5 rounded-button px-2 py-1 text-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40\"\n >\n <X aria-hidden className=\"size-3.5\" />\n Clear my answer\n </button>\n )}\n </div>\n );\n}\n\nfunction ManyChoices({ choices, other, otherLabel, options }: ChoiceListProps) {\n const question = useQuestion(\"Choice\");\n const [value, setValue] = useField<string[]>(question.field, [], options);\n useAnswered(question.report, value.length > 0);\n const toggle = (choice: string, on: boolean) =>\n setValue((current) =>\n on ? [...current.filter((v) => v !== choice), choice] : current.filter((v) => v !== choice),\n );\n const media = choices.some((choice) => choice.props.media !== undefined);\n return (\n <div className=\"flex flex-col gap-3\">\n <div className={cn(\"grid gap-2.5\", media && \"sm:grid-cols-2\")}>\n {choices.map((choice) => (\n <ChoiceCard\n key={choice.props.value}\n type=\"checkbox\"\n name={question.field}\n checked={value.includes(choice.props.value)}\n onChange={(event) => toggle(choice.props.value, event.currentTarget.checked)}\n {...choice.props}\n />\n ))}\n {other && (\n <ChoiceCard\n type=\"checkbox\"\n name={question.field}\n value={OTHER}\n checked={value.includes(OTHER)}\n onChange={(event) => toggle(OTHER, event.currentTarget.checked)}\n className={other.props.className}\n >\n {otherLabel}\n </ChoiceCard>\n )}\n </div>\n {other && value.includes(OTHER) && (\n <OtherText placeholder={other.props.placeholder} label={otherLabel} />\n )}\n </div>\n );\n}\n\nfunction OtherText({\n placeholder,\n label,\n}: {\n readonly placeholder?: string | undefined;\n readonly label: string;\n}) {\n const question = useQuestion(\"Other\");\n const [text, setText] = useField<string>(`${question.field}.other`, \"\", {\n label: question.label !== undefined ? `${question.label}: ${label}` : label,\n });\n return (\n <input\n type=\"text\"\n data-slot=\"question-other\"\n aria-label={label}\n value={text}\n placeholder={placeholder ?? \"Say what you'd choose\"}\n onChange={(event) => setText(event.currentTarget.value)}\n className={fieldClasses}\n />\n );\n}\n\ninterface ChoiceCardProps extends Omit<ChoiceProps, \"children\" | \"value\" | \"label\" | \"className\"> {\n readonly type: \"radio\" | \"checkbox\";\n readonly name: string;\n readonly value: string;\n readonly checked: boolean;\n readonly onChange: React.ChangeEventHandler<HTMLInputElement>;\n readonly children: React.ReactNode;\n readonly label?: string;\n readonly className?: string | undefined;\n}\n\nfunction ChoiceCard({\n type,\n name,\n value,\n checked,\n onChange,\n children,\n description,\n recommended,\n meta,\n media,\n className,\n}: ChoiceCardProps) {\n const descriptionId = React.useId();\n const body = (\n <>\n <AnswerMark shape={type === \"radio\" ? \"circle\" : \"square\"} />\n <span className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span className=\"flex flex-wrap items-center gap-x-2.5 gap-y-1\">\n <span className=\"font-medium\">{children}</span>\n {recommended ? (\n <span\n data-slot=\"recommended\"\n className=\"inline-flex items-center gap-1.5 text-xs font-semibold text-highlight group-data-[checked=true]/choice:text-(--choice-selected-fg)\"\n >\n <span\n aria-hidden\n className=\"size-1.5 rounded-full bg-highlight group-data-[checked=true]/choice:bg-answer\"\n />\n {typeof recommended === \"string\" ? recommended : \"Recommended\"}\n </span>\n ) : null}\n </span>\n {description !== undefined && (\n <span\n id={descriptionId}\n className=\"text-sm text-muted-foreground group-data-[checked=true]/choice:text-(--choice-selected-muted)\"\n >\n {description}\n </span>\n )}\n {media !== undefined && meta !== undefined && (\n <span className=\"pt-1 text-sm font-medium tabular-nums\">{meta}</span>\n )}\n </span>\n {media === undefined && meta !== undefined && (\n <span className=\"shrink-0 text-sm text-muted-foreground tabular-nums group-data-[checked=true]/choice:text-(--choice-selected-muted)\">\n {meta}\n </span>\n )}\n </>\n );\n return (\n <label\n data-slot=\"choice\"\n data-checked={checked}\n className={cn(\n \"group/choice press relative flex w-full cursor-pointer rounded-choice bg-(--choice-bg) p-4 text-left shadow-choice transition-[background-color,box-shadow,color] duration-(--state-ms)\",\n media !== undefined ? \"flex-col gap-4\" : \"items-start gap-3.5\",\n \"hover:bg-(--choice-hover-bg) has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/40\",\n \"data-[checked=true]:bg-(--choice-selected-bg) data-[checked=true]:text-(--choice-selected-fg) data-[checked=true]:shadow-(--choice-selected-shadow) data-[checked=true]:hover:bg-(--choice-selected-hover-bg)\",\n className,\n )}\n >\n <input\n type={type}\n name={name}\n value={value}\n checked={checked}\n onChange={onChange}\n aria-describedby={description !== undefined ? descriptionId : undefined}\n className=\"absolute inset-0 z-10 m-0 size-full cursor-pointer appearance-none rounded-[inherit] opacity-0\"\n />\n {media !== undefined ? (\n <>\n <span data-slot=\"choice-media\" className=\"block w-full\">\n {media}\n </span>\n <span className=\"flex items-start gap-3.5\">{body}</span>\n </>\n ) : (\n body\n )}\n </label>\n );\n}\n\n/** The mark of an answer: a giallo dot that drops in, the theme's signature move (D181 item 1). */\nfunction AnswerMark({\n shape = \"circle\",\n}: {\n readonly shape?: \"circle\" | \"square\";\n}): React.JSX.Element {\n return (\n <span\n data-slot=\"answer-mark\"\n aria-hidden\n className={cn(\n \"relative mt-px grid size-5 shrink-0 place-items-center border-[1.5px] border-input bg-card transition-colors duration-(--state-ms)\",\n \"group-data-[checked=true]/choice:border-foreground group-data-[checked=true]/choice:bg-answer\",\n shape === \"circle\" ? \"rounded-full\" : \"rounded-[5px]\",\n )}\n >\n {shape === \"circle\" ? (\n <span className=\"animate-answer hidden size-2 rounded-full bg-foreground group-data-[checked=true]/choice:block\" />\n ) : (\n <Check\n strokeWidth={3}\n className=\"animate-answer hidden size-3.5 text-foreground group-data-[checked=true]/choice:block\"\n />\n )}\n </span>\n );\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Scales */\n\ninterface ScaleProps {\n readonly min?: number;\n readonly max?: number;\n /** The words at either end (\"Airy\", \"Dense\"). */\n readonly labels?: readonly [string, string];\n readonly className?: string;\n}\n\nfunction Scale({ min = 1, max = 5, labels, className }: ScaleProps): React.JSX.Element {\n const question = useQuestion(\"Scale\");\n const steps = Array.from({ length: Math.max(0, max - min + 1) }, (_, index) => min + index);\n const [value, setValue] = useField<number | null>(question.field, null, {\n ...(question.label !== undefined ? { label: question.label } : {}),\n required: question.required,\n options: steps.map((step, index) => ({\n value: step,\n label:\n labels !== undefined && index === 0\n ? `${step} (${labels[0]})`\n : labels !== undefined && index === steps.length - 1\n ? `${step} (${labels[1]})`\n : String(step),\n })),\n });\n useAnswered(question.report, value !== null);\n return (\n <div data-slot=\"scale\" className={cn(\"flex flex-col gap-2.5\", className)}>\n <div\n role=\"radiogroup\"\n aria-labelledby={question.titleId}\n className=\"grid gap-1.5\"\n style={{ gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }}\n >\n {steps.map((step, index) => (\n <label\n key={step}\n data-slot=\"scale-step\"\n data-checked={value === step}\n className={cn(\n \"press relative grid h-12 cursor-pointer place-items-center rounded-control bg-(--choice-bg) text-[0.9375rem] font-medium tabular-nums shadow-choice transition-[background-color,box-shadow] duration-(--state-ms)\",\n \"hover:bg-(--choice-hover-bg) has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/40\",\n \"data-[checked=true]:bg-(--scale-selected-bg) data-[checked=true]:text-(--scale-selected-fg) data-[checked=true]:shadow-(--scale-selected-shadow)\",\n )}\n >\n <input\n type=\"radio\"\n name={question.field}\n value={step}\n checked={value === step}\n onChange={() => setValue(step)}\n aria-label={\n labels !== undefined && index === 0\n ? `${step}, ${labels[0]}`\n : labels !== undefined && index === steps.length - 1\n ? `${step}, ${labels[1]}`\n : String(step)\n }\n className=\"absolute inset-0 z-10 m-0 size-full cursor-pointer appearance-none rounded-[inherit] opacity-0\"\n />\n <span aria-hidden>{step}</span>\n </label>\n ))}\n </div>\n {labels !== undefined && (\n <div aria-hidden className=\"flex justify-between text-sm text-muted-foreground\">\n <span>{labels[0]}</span>\n <span>{labels[1]}</span>\n </div>\n )}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Rankings */\n\ntype RankItem = string | { readonly value: string; readonly label: string };\n\ninterface RankProps {\n /** What to put in order, in the order shown first. */\n readonly items: readonly RankItem[];\n readonly className?: string;\n}\n\nfunction Rank({ items, className }: RankProps): React.JSX.Element {\n const question = useQuestion(\"Rank\");\n const all = items.map((item) => (typeof item === \"string\" ? { value: item, label: item } : item));\n const [order, setOrder] = useField<string[] | null>(question.field, null, {\n ...(question.label !== undefined ? { label: question.label } : {}),\n required: question.required,\n options: all.map((item) => ({ value: item.value, label: item.label })),\n });\n useAnswered(question.report, order !== null);\n // An order kept from before keeps what is still offered, then adds what is new at the end.\n const shown =\n order === null\n ? all\n : [\n ...order.flatMap((value) => all.filter((item) => item.value === value)),\n ...all.filter((item) => !order.includes(item.value)),\n ];\n const move = (from: number, to: number) => {\n if (to < 0 || to >= shown.length) return;\n const next = shown.map((item) => item.value);\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved as string);\n setOrder(next);\n };\n return (\n <div data-slot=\"rank\" className={cn(\"flex flex-col gap-3\", className)}>\n <ol aria-labelledby={question.titleId} className=\"flex flex-col gap-2\">\n {shown.map((item, index) => (\n <li\n key={item.value}\n data-slot=\"rank-item\"\n className=\"flex items-center gap-3 rounded-choice bg-(--choice-bg) py-2 pr-2 pl-4 shadow-choice\"\n >\n <span className=\"w-5 text-sm font-semibold text-muted-foreground tabular-nums\">\n {index + 1}\n </span>\n <span className=\"flex-1 font-medium\">{item.label}</span>\n <span className=\"flex gap-1\">\n <button\n type=\"button\"\n aria-label={`Move ${item.label} up`}\n disabled={index === 0}\n onClick={() => move(index, index - 1)}\n className=\"press grid size-9 place-items-center rounded-button text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 disabled:opacity-30\"\n >\n <ArrowUp aria-hidden className=\"size-4\" />\n </button>\n <button\n type=\"button\"\n aria-label={`Move ${item.label} down`}\n disabled={index === shown.length - 1}\n onClick={() => move(index, index + 1)}\n className=\"press grid size-9 place-items-center rounded-button text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 disabled:opacity-30\"\n >\n <ArrowDown aria-hidden className=\"size-4\" />\n </button>\n </span>\n </li>\n ))}\n </ol>\n {order === null && (\n <button\n type=\"button\"\n onClick={() => setOrder(shown.map((item) => item.value))}\n className={cn(stepButton(\"secondary\"), \"w-fit\")}\n >\n Keep this order\n </button>\n )}\n </div>\n );\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Text */\n\nconst fieldClasses =\n \"w-full min-w-0 rounded-control border border-input bg-(--field) px-3.5 text-base shadow-control outline-none transition-[border-color,box-shadow] duration-(--state-ms) placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 h-(--control-h)\";\n\ninterface TextAnswerProps {\n /** Several lines (the default), or one. */\n readonly multiline?: boolean;\n /** For one line: what kind of text, so phones offer the right keys. */\n readonly type?: \"text\" | \"email\" | \"number\" | \"url\" | \"tel\" | \"date\" | \"time\";\n readonly placeholder?: string;\n readonly className?: string;\n}\n\nfunction TextAnswer({\n multiline = true,\n type = \"text\",\n placeholder,\n className,\n}: TextAnswerProps): React.JSX.Element {\n const question = useQuestion(\"TextAnswer\");\n const [text, setText] = useField<string>(question.field, \"\", {\n ...(question.label !== undefined ? { label: question.label } : {}),\n required: question.required,\n });\n useAnswered(question.report, text.trim() !== \"\");\n const shared = {\n \"aria-labelledby\": question.titleId,\n \"aria-describedby\": question.descriptionId,\n \"aria-required\": question.required || undefined,\n value: text,\n placeholder,\n };\n return multiline ? (\n <textarea\n data-slot=\"text-answer\"\n {...shared}\n onChange={(event) => setText(event.currentTarget.value)}\n className={cn(\n fieldClasses,\n \"h-auto min-h-28 py-3 leading-relaxed field-sizing-content\",\n className,\n )}\n />\n ) : (\n <input\n data-slot=\"text-answer\"\n type={type}\n {...shared}\n onChange={(event) => setText(event.currentTarget.value)}\n className={cn(fieldClasses, className)}\n />\n );\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Comments */\n\nfunction Comment() {\n const question = useQuestion(\"Question\");\n const [comment, setComment] = useField<string>(`${question.field}.comment`, \"\", {\n label: question.label !== undefined ? `${question.label}: comment` : \"Comment\",\n });\n const [open, setOpen] = React.useState(false);\n if (!open && comment === \"\") {\n return (\n <button\n type=\"button\"\n onClick={() => setOpen(true)}\n className=\"press inline-flex w-fit items-center rounded-button px-2 py-1 text-sm text-muted-foreground underline-offset-4 outline-none hover:text-foreground hover:underline focus-visible:ring-3 focus-visible:ring-ring/40\"\n >\n Add a comment\n </button>\n );\n }\n return (\n <textarea\n data-slot=\"question-comment\"\n aria-label={question.label !== undefined ? `Comment on “${question.label}”` : \"Comment\"}\n value={comment}\n placeholder=\"Anything to add?\"\n // biome-ignore lint/a11y/noAutofocus: it opens because the person asked to write.\n autoFocus={open && comment === \"\"}\n onChange={(event) => setComment(event.currentTarget.value)}\n className={cn(\n fieldClasses,\n \"h-auto min-h-20 py-2.5 text-[0.9375rem] leading-relaxed field-sizing-content\",\n )}\n />\n );\n}\n\n/* -------------------------------------------------------------------------------------------- */\n/* Progress */\n\ninterface AnswerProgressProps extends React.ComponentProps<\"div\"> {\n readonly answered: number;\n readonly total: number;\n}\n\n/** How many questions are answered: a dot for each, giallo once answered. */\nfunction AnswerProgress({\n answered,\n total,\n className,\n ...props\n}: AnswerProgressProps): React.JSX.Element {\n return (\n <div\n data-slot=\"answer-progress\"\n className={cn(\"flex items-center gap-3 text-sm text-muted-foreground\", className)}\n {...props}\n >\n <span aria-hidden className=\"flex flex-wrap gap-1.5\">\n {Array.from({ length: total }, (_, index) => (\n <span\n // biome-ignore lint/suspicious/noArrayIndexKey: the dots are positions, not items.\n key={index}\n className={cn(\n \"size-2.5 rounded-full border-[1.5px] border-input transition-colors duration-(--state-ms)\",\n index < answered && \"animate-answer border-foreground bg-answer\",\n )}\n />\n ))}\n </span>\n <span aria-live=\"polite\" className=\"tabular-nums\">\n {answered} of {total} answered\n </span>\n </div>\n );\n}\n\nexport type {\n AnswerProgressProps,\n ChoiceProps,\n OtherProps,\n QuestionnaireProps,\n QuestionProps,\n RankItem,\n RankProps,\n ScaleProps,\n SectionProps,\n TextAnswerProps,\n};\nexport {\n AnswerMark,\n AnswerProgress,\n Choice,\n Other,\n Question,\n Questionnaire,\n Rank,\n Scale,\n Section,\n TextAnswer,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,uBAAuB,MAAM,cAAgD,IAAI;AAEvF,SAAS,iBAAiB,MAAyC;CACjE,MAAM,UAAU,MAAM,WAAW,oBAAoB;CACrD,IAAI,YAAY,MAAM,MAAM,IAAI,MAAM,IAAI,KAAK,oCAAoC;CACnF,OAAO;AACT;;AAGA,SAAS,YAAY,UAAqC;CACxD,MAAM,MAAgB,CAAC;CACvB,MAAM,SAAS,QAAQ,WAAW,UAAU;EAC1C,IAAI,CAAC,MAAM,eAAe,KAAK,GAAG;EAClC,MAAM,QAAQ,MAAM;EACpB,IAAI,MAAM,SAAS,YAAY,OAAO,MAAM,OAAO,UAAU,IAAI,KAAK,MAAM,EAAE;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AAA;CAGZ,OACE,oBAAC,YAAD;EACE,aAAU;EACV,cAAY,SAAS,UAAU,KAAA,IAAY,eAAe,SAAS,MAAM,KAAK;EAC9E,OAAO;EACP,aAAY;EAEZ,WAAW,QAAQ,YAAY;EAC/B,WAAW,UAAU,WAAW,MAAM,cAAc,KAAK;EACzD,WAAW,GACT,cACA,8EACF;CACD,CAAA;AAEL;;AAWA,SAAS,eAAe,EACtB,UACA,OACA,WACA,GAAG,SACsC;CACzC,OACE,qBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;EAHN,UAAA,CAKE,oBAAC,QAAD;GAAM,eAAA;GAAY,WAAU;GACzB,UAAA,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,UACjC,oBAAC,QAAD,EAGE,WAAW,GACT,6FACA,QAAQ,YAAY,4CACtB,EACD,GALM,KAKN,CACF;EACG,CAAA,GACN,qBAAC,QAAD;GAAM,aAAU;GAAS,WAAU;GAAnC,UAAA;IACG;IAAS;IAAK;IAAM;GACjB;EACH,CAAA,CAAA;;AAET"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mostra/kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.19.0",
|
|
4
|
+
"description": "Mostra's kit: shadcn components for the Base UI and Radix bases, shaped by the themes' tokens, and the questionnaire and form parts that save as fields.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "The Mostra Authors",
|
|
7
|
+
"homepage": "https://github.com/mostra-dev/mostra/tree/main/packages/kit#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/mostra-dev/mostra.git",
|
|
11
|
+
"directory": "packages/kit"
|
|
12
|
+
},
|
|
13
|
+
"bugs": "https://github.com/mostra-dev/mostra/issues",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"*.css"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"@mostra/source": "./src/index.ts",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./questionnaire": {
|
|
25
|
+
"@mostra/source": "./src/questionnaire.tsx",
|
|
26
|
+
"types": "./dist/questionnaire.d.ts",
|
|
27
|
+
"default": "./dist/questionnaire.js"
|
|
28
|
+
},
|
|
29
|
+
"./layout": {
|
|
30
|
+
"@mostra/source": "./src/layout.tsx",
|
|
31
|
+
"types": "./dist/layout.d.ts",
|
|
32
|
+
"default": "./dist/layout.js"
|
|
33
|
+
},
|
|
34
|
+
"./css/*": "./css/*",
|
|
35
|
+
"./registry/*": "./registry/*",
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"src",
|
|
41
|
+
"!src/**/*.test.ts",
|
|
42
|
+
"css",
|
|
43
|
+
"registry"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=24"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"provenance": true
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@base-ui/react": "1.9.0",
|
|
54
|
+
"@mostra/react": "0.19.0",
|
|
55
|
+
"@shadcn/react": "0.3.1",
|
|
56
|
+
"class-variance-authority": "0.7.1",
|
|
57
|
+
"cmdk": "1.1.1",
|
|
58
|
+
"cn": "0.5.0",
|
|
59
|
+
"embla-carousel-react": "8.6.0",
|
|
60
|
+
"input-otp": "1.5.0",
|
|
61
|
+
"lucide-react": "1.59.0",
|
|
62
|
+
"radix-ui": "1.8.1",
|
|
63
|
+
"react-day-picker": "10.0.2",
|
|
64
|
+
"react-resizable-panels": "4.14.7",
|
|
65
|
+
"recharts": "3.10.1",
|
|
66
|
+
"shiki": "4.5.0",
|
|
67
|
+
"sonner": "2.0.8",
|
|
68
|
+
"tw-animate-css": "1.4.0",
|
|
69
|
+
"vaul": "1.1.2"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"react": "^19"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@mostra/tools": "0.0.0",
|
|
76
|
+
"@size-limit/preset-small-lib": "14.2.0",
|
|
77
|
+
"@types/node": "24.19.2",
|
|
78
|
+
"@types/react": "19.3.0",
|
|
79
|
+
"@types/react-dom": "19.3.0",
|
|
80
|
+
"react": "19.3.1",
|
|
81
|
+
"react-dom": "19.3.1",
|
|
82
|
+
"size-limit": "14.2.0",
|
|
83
|
+
"tsdown": "0.23.1",
|
|
84
|
+
"typescript": "7.0.2",
|
|
85
|
+
"vitest": "5.0.5"
|
|
86
|
+
},
|
|
87
|
+
"size-limit": [
|
|
88
|
+
{
|
|
89
|
+
"name": "@mostra/kit/questionnaire (React, the client runtime and the icons excluded)",
|
|
90
|
+
"path": "dist/questionnaire.js",
|
|
91
|
+
"import": "*",
|
|
92
|
+
"ignore": [
|
|
93
|
+
"react",
|
|
94
|
+
"react-dom",
|
|
95
|
+
"@mostra/react",
|
|
96
|
+
"lucide-react",
|
|
97
|
+
"cn"
|
|
98
|
+
],
|
|
99
|
+
"limit": "5 kB"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "@mostra/kit/layout (React excluded)",
|
|
103
|
+
"path": "dist/layout.js",
|
|
104
|
+
"import": "*",
|
|
105
|
+
"ignore": [
|
|
106
|
+
"react",
|
|
107
|
+
"react-dom",
|
|
108
|
+
"@mostra/react",
|
|
109
|
+
"lucide-react",
|
|
110
|
+
"cn"
|
|
111
|
+
],
|
|
112
|
+
"limit": "1.5 kB"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"scripts": {
|
|
116
|
+
"build": "tsdown",
|
|
117
|
+
"typecheck": "tsc -b",
|
|
118
|
+
"test": "vitest run",
|
|
119
|
+
"api": "mostra-tools api",
|
|
120
|
+
"generate": "node --conditions @mostra/source scripts/generate.ts",
|
|
121
|
+
"size": "size-limit"
|
|
122
|
+
}
|
|
6
123
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 shadcn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "accordion",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"cn",
|
|
8
|
+
"lucide-react"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/ui/accordion.tsx",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"mostra": {
|
|
17
|
+
"base": "base"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "alert-dialog",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"cn"
|
|
8
|
+
],
|
|
9
|
+
"registryDependencies": [
|
|
10
|
+
"button"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "components/ui/alert-dialog.tsx",
|
|
15
|
+
"type": "registry:ui"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"mostra": {
|
|
19
|
+
"base": "base"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "alert",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"class-variance-authority",
|
|
7
|
+
"cn"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/ui/alert.tsx",
|
|
12
|
+
"type": "registry:ui"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"mostra": {
|
|
16
|
+
"base": "base"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "aspect-ratio",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"cn"
|
|
7
|
+
],
|
|
8
|
+
"files": [
|
|
9
|
+
{
|
|
10
|
+
"path": "components/ui/aspect-ratio.tsx",
|
|
11
|
+
"type": "registry:ui"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"mostra": {
|
|
15
|
+
"base": "base"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "attachment",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"class-variance-authority",
|
|
8
|
+
"cn"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"button"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/ui/attachment.tsx",
|
|
16
|
+
"type": "registry:ui"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"mostra": {
|
|
20
|
+
"base": "base"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "avatar",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"cn"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
{
|
|
11
|
+
"path": "components/ui/avatar.tsx",
|
|
12
|
+
"type": "registry:ui"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"mostra": {
|
|
16
|
+
"base": "base"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "badge",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"class-variance-authority",
|
|
8
|
+
"cn"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/ui/badge.tsx",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"mostra": {
|
|
17
|
+
"base": "base"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "breadcrumb",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"cn",
|
|
8
|
+
"lucide-react"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/ui/breadcrumb.tsx",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"mostra": {
|
|
17
|
+
"base": "base"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "bubble",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"class-variance-authority",
|
|
8
|
+
"cn"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/ui/bubble.tsx",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"mostra": {
|
|
17
|
+
"base": "base"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "button-group",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"class-variance-authority",
|
|
8
|
+
"cn"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"separator"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/ui/button-group.tsx",
|
|
16
|
+
"type": "registry:ui"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"mostra": {
|
|
20
|
+
"base": "base"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "button",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"class-variance-authority",
|
|
8
|
+
"cn"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/ui/button.tsx",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"mostra": {
|
|
17
|
+
"base": "base"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "calendar",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"cn",
|
|
7
|
+
"lucide-react",
|
|
8
|
+
"react-day-picker"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"button"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/ui/calendar.tsx",
|
|
16
|
+
"type": "registry:ui"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"mostra": {
|
|
20
|
+
"base": "base"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "card",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"cn"
|
|
7
|
+
],
|
|
8
|
+
"files": [
|
|
9
|
+
{
|
|
10
|
+
"path": "components/ui/card.tsx",
|
|
11
|
+
"type": "registry:ui"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"mostra": {
|
|
15
|
+
"base": "base"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "carousel",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"cn",
|
|
7
|
+
"embla-carousel-react",
|
|
8
|
+
"lucide-react"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"button"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "components/ui/carousel.tsx",
|
|
16
|
+
"type": "registry:ui"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"mostra": {
|
|
20
|
+
"base": "base"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chart",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"cn",
|
|
7
|
+
"recharts"
|
|
8
|
+
],
|
|
9
|
+
"registryDependencies": [
|
|
10
|
+
"card"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "components/ui/chart.tsx",
|
|
15
|
+
"type": "registry:ui"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"mostra": {
|
|
19
|
+
"base": "base"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "checkbox",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react",
|
|
7
|
+
"cn",
|
|
8
|
+
"lucide-react"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "components/ui/checkbox.tsx",
|
|
13
|
+
"type": "registry:ui"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"mostra": {
|
|
17
|
+
"base": "base"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "code-block",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"class-variance-authority",
|
|
7
|
+
"cn",
|
|
8
|
+
"lucide-react"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"button",
|
|
12
|
+
"use-highlighted-code"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "components/ui/code-block.tsx",
|
|
17
|
+
"type": "registry:ui"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"mostra": {
|
|
21
|
+
"base": "base"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "collapsible",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"dependencies": [
|
|
6
|
+
"@base-ui/react"
|
|
7
|
+
],
|
|
8
|
+
"files": [
|
|
9
|
+
{
|
|
10
|
+
"path": "components/ui/collapsible.tsx",
|
|
11
|
+
"type": "registry:ui"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"mostra": {
|
|
15
|
+
"base": "base"
|
|
16
|
+
}
|
|
17
|
+
}
|