@plone/components
Version:
ReactJS components for Plone
56 lines (49 loc) • 3.06 kB
text/typescript
import * as react_jsx_runtime from 'react/jsx-runtime';
import React__default, { ReactNode } from 'react';
import { RadioGroupProps as RadioGroupProps$1, ValidationResult, RadioProps, SelectProps as SelectProps$1, ListBoxItemProps, ListBoxProps, SectionProps, Header } from 'react-aria-components';
interface RadioGroupProps extends Omit<RadioGroupProps$1, 'children'> {
label?: string;
children?: ReactNode;
description?: string;
errorMessage?: string | ((validation: ValidationResult) => string);
}
declare function RadioGroup(props: RadioGroupProps): react_jsx_runtime.JSX.Element;
declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
declare function CustomRadio(props: RadioProps): react_jsx_runtime.JSX.Element;
interface AlignWidgetProps extends Omit<RadioGroupProps, 'children'> {
id?: string;
actions?: string[];
actionsInfoMap?: Record<string, [React__default.ComponentType<any>, string]>;
}
declare function AlignWidget(props: AlignWidgetProps): react_jsx_runtime.JSX.Element;
interface SelectItemObject {
label: string;
value: string;
}
interface SelectBaseProps<T extends object, M extends 'single' | 'multiple'> extends Omit<SelectProps$1<T, M>, 'children'> {
label?: string;
description?: string;
errorMessage?: string | ((validation: ValidationResult) => string);
items?: Iterable<T>;
children?: React__default.ReactNode | ((item: T) => React__default.ReactNode);
}
interface SelectProps<T extends object = SelectItemObject, M extends 'single' | 'multiple' = 'single'> extends SelectBaseProps<T, M> {
}
declare function Select<T extends object = SelectItemObject, M extends 'single' | 'multiple' = 'single'>({ label, description, errorMessage, children, items, ...props }: SelectProps<T, M>): react_jsx_runtime.JSX.Element;
declare function SelectListBox<T extends object>(props: ListBoxProps<T>): react_jsx_runtime.JSX.Element;
declare function SelectItem(props: ListBoxItemProps): react_jsx_runtime.JSX.Element;
declare function SelectSection<T extends object>(props: SectionProps<T>): react_jsx_runtime.JSX.Element;
declare function SelectSectionHeader(props: React__default.ComponentProps<typeof Header>): react_jsx_runtime.JSX.Element;
interface SizeWidgetProps extends Omit<RadioGroupProps, 'children'> {
id?: string;
actions?: string[];
actionsInfoMap?: Record<string, [string, string]>;
}
declare function SizeWidget(props: SizeWidgetProps): react_jsx_runtime.JSX.Element;
interface WidthWidgetProps extends Omit<RadioGroupProps, 'children'> {
id?: string;
actions?: string[];
actionsInfoMap?: Record<string, [React__default.ComponentType<any>, string]>;
}
declare function WidthWidget(props: WidthWidgetProps): react_jsx_runtime.JSX.Element;
export { AlignWidget as A, CustomRadio as C, Radio as R, type SelectItemObject as S, WidthWidget as W, type SelectProps as a, Select as b, SelectItem as c, SelectListBox as d, SelectSection as e, SelectSectionHeader as f, SizeWidget as g, RadioGroup as h, type RadioGroupProps as i };