{"version":3,"file":"FileInput.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/FileInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAsBtD,MAAM,IAAI,GAAG,WAAW,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAA8B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link FileInput} component.\n *\n * @property name - The name of the file input field. This is used to identify\n * the file input field in the form data.\n * @property label - The label of the file input field.\n * @property accept - The file types that the file input field accepts. If not\n * specified, the file input field accepts all file types.\n * @property compact - Whether the file input field is compact. Default is\n * `false`.\n * @property disabled - whether the file input is disabled.\n * @category Component Props\n */\nexport type FileInputProps = {\n  name: string;\n  accept?: string[] | undefined;\n  compact?: boolean | undefined;\n  disabled?: boolean | undefined;\n};\n\nconst TYPE = 'FileInput';\n\n/**\n * A file input component, which is used to create a file input field. This\n * component can only be used as a child of the {@link Field} component.\n *\n * The total size of the files that can be uploaded may not exceed 64 MB.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the file input field. This is used to\n * identify the file input field in the form data.\n * @param props.accept - The file types that the file input field accepts. If\n * not specified, the file input field accepts all file types. For examples of\n * valid values, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept).\n * @param props.compact - Whether the file input field is compact. Default is\n * `false`.\n * @param props.disabled - Whether the file input is disabled.\n * @returns A file input element.\n * @example\n * <FileInput name=\"file\" accept={['image/*']} />\n * @example\n * <FileInput name=\"file\" compact />\n * @example\n * <Field label=\"Upload file\">\n *   <FileInput name=\"file\" />\n * </Field>\n * @category Components\n */\nexport const FileInput = createSnapComponent<FileInputProps, typeof TYPE>(TYPE);\n\n/**\n * A file input element.\n *\n * @see {@link FileInput}\n * @category Elements\n */\nexport type FileInputElement = ReturnType<typeof FileInput>;\n"]}