{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "choice-list", "title": "Choice List", "description": "Polaris-styled Choice List component.", "dependencies": [], "devDependencies": [ "@shopify/polaris-types" ], "registryDependencies": [ "@polaris-shadcn/theme", "@polaris-shadcn/utils" ], "files": [ { "path": "registry/templates/components/ui/choice-list.tsx", "content": "import * as React from \"react\";\nimport { cn } from \"../../lib/utils\";\n\ntype SChoiceListProps = React.ComponentPropsWithoutRef<\"s-choice-list\">;\ntype SChoiceProps = React.ComponentPropsWithoutRef<\"s-choice\">;\n\nexport interface ChoiceListProps extends SChoiceListProps {\n className?: string;\n}\n\nexport interface ChoiceProps extends SChoiceProps {\n className?: string;\n details?: React.ReactNode;\n}\n\nconst ChoiceList = React.forwardRef<\n HTMLElementTagNameMap[\"s-choice-list\"],\n ChoiceListProps\n>(\n (\n {\n className,\n name,\n label,\n details,\n multiple = false,\n disabled = false,\n error,\n values,\n labelAccessibilityVisibility,\n onChange,\n onInput,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n \n {children}\n \n );\n },\n);\nChoiceList.displayName = \"ChoiceList\";\n\nconst Choice = React.forwardRef(\n (\n {\n className,\n value,\n selected,\n defaultSelected,\n disabled = false,\n accessibilityLabel,\n children,\n details,\n ...props\n },\n ref,\n ) => {\n return (\n \n {children}\n {details && {details}}\n \n );\n },\n);\nChoice.displayName = \"Choice\";\n\nexport { ChoiceList, Choice };\n", "type": "registry:ui" } ], "type": "registry:ui" }