import { type ComponentPropsWithoutRef } from 'react'; import { type TextBoxSlotRecipeVariant } from '../../styled-system/recipes'; import { type IconButtonProps } from '../IconButton/IconButton.types'; /** * The props for the FileBox component. */ export type FileBoxProps = { /** * Whether the file input is invalid or not. * This will change the style of the file box. * * @default false */ invalid?: TextBoxSlotRecipeVariant['invalid']; /** * Whether the file input is disabled or not. * If disabled, users cannot select files. * * @default false */ disabled?: boolean; /** * Allow users to select multiple files. * * @default false */ multiple?: ComponentPropsWithoutRef<'input'>['multiple']; /** * Accept attribute for the file input. * * @default undefined */ accept?: ComponentPropsWithoutRef<'input'>['accept']; /** * The text label for the file selection button. * * @default "ファイルを選択" */ buttonLabel?: string; /** * The placeholder text shown when no file is selected. * * @default "ファイルを選択してください。" */ placeholder?: string; /** * The text that appears after the count when displaying multiple files. For example, "ファイル" in Japanese or "files" in English. * * @default "ファイル" */ multipleFilesSuffixLabel?: string; /** * The properties for the clear button. * If this prop is not passed, the default values for each property will be applied. * * @property aria-label - The alternative text for the clear button. * * @default "ファイルをクリアする" */ clearButtonProps?: Pick; } & ComponentPropsWithoutRef<'input'>;