{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "dropdown-field", "type": "registry:component", "title": "Dropdown Field", "description": "Field component for dropdown selection inputs with validation and error handling", "dependencies": [ "react", "@registry/react" ], "registryDependencies": [ "https://components.thgaltitude.com/r/react/field-wrapper", "https://components.thgaltitude.com/r/react/dropdown" ], "files": [ { "path": "registry/react/component/fields/dropdown-field.tsx", "content": "import Dropdown from \"@registry/react/ui/dropdown/dropdown\";\nimport FieldWrapper from \"@registry/react/component/field-wrapper\";\nimport type { FieldProps } from \"@registry/react/component/field-wrapper\";\n\nimport type { SelectHTMLAttributes } from \"react\";\n\n// Extract dropdown-specific props that aren't in FieldProps\ntype DropdownSpecificProps = {\n options?: string[];\n enableSearch?: boolean;\n noOptionsMessage?: string;\n searchPlaceholder?: string;\n value?: string;\n error?: boolean;\n};\n\ninterface DropdownFieldProps\n extends FieldProps,\n DropdownSpecificProps,\n Omit<\n SelectHTMLAttributes,\n | \"id\"\n | \"name\"\n | \"placeholder\"\n | \"disabled\"\n | \"required\"\n | \"aria-invalid\"\n | \"onChange\"\n | \"value\"\n > {\n onChange?: (e: any) => void;\n}\n\nconst DropdownField: React.FC = ({\n id,\n name,\n label,\n helperText,\n errorMessage,\n placeholder,\n required = false,\n \"aria-invalid\": ariaInvalid = false,\n disabled = false,\n options = [],\n enableSearch = false,\n noOptionsMessage = \"No options available\",\n searchPlaceholder = \"Search...\",\n onChange,\n value,\n ...restProps\n}) => {\n return (\n
\n \n \n \n
\n );\n};\n\nexport default DropdownField;\n", "type": "registry:component", "target": "react/component/fields/dropdown-field.tsx" } ] }