import React, { CSSProperties, ReactNode } from "react"; /** Simple spinner */ export declare function Spinner(): import("react/jsx-runtime").JSX.Element; /** Standard button */ export declare class Button extends React.Component<{ /** "default" gets mapped to "secondary" */ type: string; onClick?: () => void; disabled?: boolean; active?: boolean; /** xs is deprecated. TODO how to handle */ size?: "sm" | "xs" | "lg"; title?: string; children?: ReactNode; }> { static defaultProps: { type: string; }; render(): import("react/jsx-runtime").JSX.Element; } /** Icon, font-awesome v4 */ export declare class Icon extends React.Component<{ id: string; style?: CSSProperties; }> { render(): import("react/jsx-runtime").JSX.Element | null; } /** Indented form group with a label, optional help text. Label and indented contents */ export declare class FormGroup extends React.Component<{ /** Label to display */ label: ReactNode; /** True to mute label */ labelMuted?: boolean; /** Hint to append to label. Makes label faded if only hint presented */ hint?: ReactNode; /** Help block at bottom */ help?: ReactNode; /** Appends a red required star */ required?: boolean; /** @deprecated True to display as success */ hasSuccess?: boolean; /** @deprecated True to display as warning */ hasWarnings?: boolean; /** @deprecated True to display as error */ hasErrors?: boolean; /** True to display horizontal */ horizontal?: boolean; children?: ReactNode; }> { render(): import("react/jsx-runtime").JSX.Element; } export interface CheckboxProps { value: boolean | null | undefined; onChange?: (value: boolean) => void; inline?: boolean; /** Uses null for false */ nullForFalse?: boolean; disabled?: boolean; displayAs?: "checkbox" | "switch"; children?: ReactNode; } export declare class Checkbox extends React.Component { id: string; constructor(props: CheckboxProps); handleChange: (ev: any) => void; render(): import("react/jsx-runtime").JSX.Element; } export interface RadioProps { /** Value to display */ value: any; /** Value that radio button represents. If equal to value, button is checked */ radioValue: any; /** Called with radio value */ onChange: (value: any) => void; /** Makes horizontal */ inline?: boolean; disabled?: boolean; children?: ReactNode; } export declare class Radio extends React.Component { id: string; constructor(props: RadioProps); render(): import("react/jsx-runtime").JSX.Element; } /** Select dropdown. Note: stringifies the value of the option so that null, strings, numbers, booleans etc. * all work as possible options.*/ export declare class Select extends React.Component<{ value: T | null; onChange?: (value: T | null) => void; options: Array<{ value: T | null; label: string; }>; size?: "lg" | "sm"; nullLabel?: string; style?: object; inline?: boolean; disabled?: boolean; }> { handleChange: (ev: any) => void; render(): import("react/jsx-runtime").JSX.Element; } export type TextInputProps = TextInputPropsNull | TextInputPropsNoNull; export interface TextInputPropsNoNull { value: string | null; onChange?: (value: string) => void; placeholder?: string; size?: "sm" | "lg"; emptyNull?: false; style?: object; /** Show a search magnifying glass icon */ searchIcon?: boolean; } export interface TextInputPropsNull { value: string | null; onChange?: (value: string | null) => void; placeholder?: string; size?: "sm" | "lg"; emptyNull: true; style?: object; /** Show a search magnifying glass icon */ searchIcon?: boolean; } export declare class TextInput extends React.Component { input?: HTMLInputElement | null; handleChange: (ev: any) => void; focus(): void | undefined; render(): import("react/jsx-runtime").JSX.Element; } export type RestrictedStyle = Pick; export interface NumberInputProps { decimal: boolean; value?: number | null; onChange?: (value: number | null) => void; style?: RestrictedStyle; size?: "sm" | "lg"; onTab?: (ev: React.KeyboardEvent) => void; onEnter?: (ev: React.KeyboardEvent) => void; /** Force an exact number of decimal places, rounding value as necessary */ decimalPlaces?: number; placeholder?: string; min?: number; max?: number; } /** Imperative handle interface for NumberInput component */ export interface NumberInputHandle { focus: () => void; isValid: () => boolean; } /** Number input component that handles parsing and maintains state when number is invalid */ export declare const NumberInput: React.ForwardRefExoticComponent>; export interface CollapsibleSectionProps { initiallyOpen?: boolean; /** Label to display */ label: ReactNode; /** True to mute label */ labelMuted?: boolean; /** Hint to append to label. Makes label faded if only hint presented */ hint?: ReactNode; /** True to not make label bold */ labelPlain?: boolean; children?: ReactNode; } /** Indented section than can be opened and closed. Defaults closed */ export declare class CollapsibleSection extends React.Component { constructor(props: CollapsibleSectionProps); handleToggle: () => void; render(): import("react/jsx-runtime").JSX.Element; } export declare class NavPills extends React.Component<{ pills: { id: string; label: ReactNode; href?: string; }[]; activePill?: string; onPillClick?: (id: string) => void; }> { render(): import("react/jsx-runtime").JSX.Element; } /** Props of the button toggle */ export interface ToggleProps { /** Currently selected value */ value: T | null; /** Called with the newly selected value (null when reset) */ onChange?: (value: T | null) => void; /** Options to show, in order */ options: Array<{ value: T | null; label: ReactNode; }>; /** Button size. xs is deprecated */ size?: "xs" | "sm" | "lg"; /** True to allow clicking the selected option to clear the value */ allowReset?: boolean; /** True to disable all buttons */ disabled?: boolean; } /** * Button toggle component. Renders as a joined button group when it fits its container and * falls back to individually rounded buttons that wrap onto several lines when it does not. */ export declare class Toggle extends React.Component, { wrap: boolean; }> { /** The button container, measured against its parent */ groupRef: React.RefObject; /** Re-measures when the parent resizes */ resizeObserver?: ResizeObserver; state: { wrap: boolean; }; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; /** Times of recent wrap flips, to detect a layout that can never settle */ flipTimes: number[]; /** Wraps when the buttons laid out in one row would not fit the parent's width */ measure: () => void; renderOption: (option: { value: T | null; label: ReactNode; }, index: number) => import("react/jsx-runtime").JSX.Element; render(): import("react/jsx-runtime").JSX.Element; } /** Panel that can be opened and closed */ export declare function CollapsiblePanel(props: { title: ReactNode; hint?: ReactNode; children: any; /** Indicates if the panel is initially closed (for uncontrolled) */ initiallyClosed?: boolean; /** Indicates if the panel is currently closed (for controlled) */ closed?: boolean; /** Function to be called when the closed state changes (for controlled) */ onClosedChange?: (closed: boolean) => void; }): import("react/jsx-runtime").JSX.Element;