/** * @file Checkbox * @author fex */ /// import React from 'react'; import { ThemeProps } from 'amis-core'; interface CheckboxProps extends ThemeProps { type: 'checkbox' | 'radio'; size?: 'sm' | 'lg' | 'small' | 'large'; label?: string; labelClassName?: string; className?: string; onChange?: (value: any, shift?: boolean) => void; value?: boolean | string | number; inline?: boolean; trueValue?: boolean | string | number; falseValue?: boolean | string | number; disabled?: boolean; readOnly?: boolean; checked?: boolean; name?: string; description?: string; partial?: boolean; optionType?: 'default' | 'button'; children?: React.ReactNode | Array; } export declare class Checkbox extends React.Component { static defaultProps: Pick; handleCheck(e: React.ChangeEvent): void; render(): React.JSX.Element; } declare const _default: { new (props: Pick, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): React.JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "label" | "name" | "value" | "children" | "description" | "size" | "disabled" | "onChange" | "labelClassName" | "inline" | "readOnly" | "checked" | "partial" | "optionType"> & { type?: "checkbox" | "radio" | undefined; trueValue?: string | number | boolean | undefined; falseValue?: string | number | boolean | undefined; } & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof Checkbox; }; export default _default;