import { ComponentPropsWithoutRef, ReactElement } from 'react'; import { FilterAreaActionsAlign, FilterAreaRowAlign, FilterAreaSize } from '@mezzanine-ui/core/filter-area'; import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types'; import { FilterLineProps } from './FilterLine'; export interface FilterAreaProps extends Omit, 'children' | 'onSubmit' | 'onReset'> { /** * The alignment of the actions. * @default 'end' */ actionsAlign?: FilterAreaActionsAlign; /** * The content of the filter area, must be FilterLine component(s). */ children: ReactElement | ReactElement[]; /** * Whether the form has been modified from its initial state. * When false, the reset button will be disabled. * @default true */ isDirty?: boolean; /** * Callback function triggered when the form is reset. * Used to clear all filter conditions and restore to initial state. */ onReset?: () => void; /** * Callback function triggered when the submit button is clicked. * FilterArea itself does not manage form state; the parent component should collect * filter values and handle submission logic. */ onSubmit?: () => void; /** * The text of the reset button. * @default 'Reset' */ resetText?: string; /** * The size of the filter area. * @default 'main' */ size?: FilterAreaSize; /** * The text of the submit button. * @default 'Search' */ submitText?: string; /** * The type of the reset button. * @default 'button' */ resetButtonType?: ComponentPropsWithoutRef<'button'>['type']; /** * The vertical alignment of the row (cross-axis align-items). * @default 'center' */ rowAlign?: FilterAreaRowAlign; /** * The type of the submit button. * @default 'button' */ submitButtonType?: ComponentPropsWithoutRef<'button'>['type']; } /** * 篩選器容器元件,管理多個 FilterLine 的展示與收合。 * * 預設僅顯示第一行(`FilterLine`),多行時自動出現展開/收合切換按鈕。 * 透過 `size` 統一控制內部所有表單欄位的尺寸; * 透過 `actionsAlign` 調整「送出/重設」按鈕區塊的對齊; * 透過 `isDirty` 控制重設按鈕的啟用狀態(`false` 時禁用)。 * * @example * ```tsx * import { Filter, FilterArea, FilterLine } from '@mezzanine-ui/react'; * import { FormField } from '@mezzanine-ui/react'; * import Input from '@mezzanine-ui/react/Input'; * * * * * * * * * * * ``` * * @see {@link FilterLine} 用於組成 FilterArea 的單行條件列 * @see {@link Filter} 包裝單一篩選欄位的元件 */ declare const FilterArea: import("react").ForwardRefExoticComponent>; export default FilterArea;