UNPKG

@plone/components

Version:

ReactJS components for Plone

339 lines (283 loc) 17.4 kB
import { S as SelectItemObject, a as SelectProps } from './WidthWidget-sGUpAqm_.js'; export { A as AlignWidget, b as Select, c as SelectItem, d as SelectListBox, e as SelectSection, f as SelectSectionHeader, g as SizeWidget, W as WidthWidget } from './WidthWidget-sGUpAqm_.js'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { ToolbarProps, BreadcrumbProps, LinkProps, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps, DateValue, CalendarProps as CalendarProps$1, ColorAreaProps, ColorFieldProps as ColorFieldProps$1, ValidationResult, ColorPickerProps as ColorPickerProps$1, ColorSliderProps as ColorSliderProps$1, ColorSwatchProps, ColorSwatchPickerProps, ColorWheelProps as ColorWheelProps$1, CheckboxProps as CheckboxProps$2, CheckboxGroupProps as CheckboxGroupProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxItemProps, DateFieldProps as DateFieldProps$1, DatePickerProps as DatePickerProps$1, DateRangePickerProps as DateRangePickerProps$1, DialogProps, DisclosureProps, DisclosureGroupProps, FormProps, GridListProps, GridListItemProps, ListBoxProps, MenuProps, MenuItemProps, MenuSectionProps, Header, SeparatorProps, MenuTriggerProps, SubmenuTriggerProps, MeterProps as MeterProps$1, ModalOverlayProps, NumberFieldProps as NumberFieldProps$1, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RadioGroupProps as RadioGroupProps$1, RangeCalendarProps as RangeCalendarProps$1, SearchFieldProps as SearchFieldProps$1, SliderProps as SliderProps$1, SwitchProps as SwitchProps$1, TableHeaderProps, TableProps as TableProps$1, RowProps, ColumnProps, TabsProps, TagProps, TagGroupProps as TagGroupProps$1, TagListProps, TextFieldProps as TextFieldProps$1, TimeValue, TimeFieldProps as TimeFieldProps$1, ToggleButtonProps, TooltipProps as TooltipProps$1, TreeProps, TreeItemProps as TreeItemProps$1, TreeItemContentProps } from 'react-aria-components'; export { DialogTrigger, Link, Radio } from 'react-aria-components'; import * as React from 'react'; import React__default, { ReactNode, ComponentProps } from 'react'; export { I as Icon, a as IconProps } from './Icon-BWLBHKLm.js'; import { Placement } from 'react-aria'; import '@react-types/shared'; declare function BlockToolbar(props: ToolbarProps): react_jsx_runtime.JSX.Element; type Breadcrumb = { '@id': string; title: string; icon?: React__default.ReactNode; }; declare function Breadcrumb(props: BreadcrumbProps & Omit<LinkProps, 'className'> & { separator?: React__default.ReactNode; value?: Breadcrumb; }): react_jsx_runtime.JSX.Element; interface BreadcrumbsProps<T extends Breadcrumb = Breadcrumb> extends BreadcrumbsProps$1<T> { /** * If we should include a root item in the breadcrumbs, we provide a Breadcrumb object. */ root?: Breadcrumb; } /** * Breadcrumbs display a hierarchy of links to the current page or resource in an application. */ declare function Breadcrumbs<T extends Breadcrumb>(props: BreadcrumbsProps<T>): react_jsx_runtime.JSX.Element; declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>; interface CalendarProps<T extends DateValue> extends CalendarProps$1<T> { errorMessage?: string; } declare function Calendar<T extends DateValue>({ errorMessage, ...props }: CalendarProps<T>): react_jsx_runtime.JSX.Element; declare function ColorArea(props: ColorAreaProps): react_jsx_runtime.JSX.Element; interface ColorFieldProps extends ColorFieldProps$1 { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function ColorField({ label, description, errorMessage, ...props }: ColorFieldProps): react_jsx_runtime.JSX.Element; interface ColorPickerProps extends Omit<ColorPickerProps$1, 'children'> { label?: string; children?: React.ReactNode; } declare function ColorPicker({ label, children, ...props }: ColorPickerProps): react_jsx_runtime.JSX.Element; interface ColorSliderProps extends ColorSliderProps$1 { label?: string; } declare function ColorSlider({ label, ...props }: ColorSliderProps): react_jsx_runtime.JSX.Element; declare function ColorSwatch(props: ColorSwatchProps): react_jsx_runtime.JSX.Element; declare function ColorSwatchPicker({ children, ...props }: ColorSwatchPickerProps): react_jsx_runtime.JSX.Element; interface ColorWheelProps extends Omit<ColorWheelProps$1, 'outerRadius' | 'innerRadius'> { } declare function ColorWheel(props: ColorWheelProps): react_jsx_runtime.JSX.Element; interface CheckboxProps$1 extends CheckboxProps$2 { label?: string; } declare function Checkbox({ children, ...props }: CheckboxProps$1): react_jsx_runtime.JSX.Element; interface CheckboxProps extends CheckboxProps$2 { label?: string; description?: string; errorMessage?: string; } declare function CheckboxField({ children, errorMessage, description, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element; interface CheckboxGroupProps extends Omit<CheckboxGroupProps$1, 'children'> { children?: React__default.ReactNode; label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function CheckboxGroup({ label, description, errorMessage, children, ...props }: CheckboxGroupProps): react_jsx_runtime.JSX.Element; interface ComboBoxProps<T extends object> extends Omit<ComboBoxProps$1<T>, 'children'> { label?: string; description?: string | null; errorMessage?: string | ((validation: ValidationResult) => string); children: React__default.ReactNode | ((item: T) => React__default.ReactNode); } declare function ComboBox<T extends object>({ label, description, errorMessage, children, ...props }: ComboBoxProps<T>): react_jsx_runtime.JSX.Element; declare function ComboBoxItem(props: ListBoxItemProps): react_jsx_runtime.JSX.Element; /** * Props Types for the Container component. * They are able to infer the props of the element type passed to the `as` prop. */ type ContainerProps<T extends React__default.ElementType> = { /** Primary content. */ children: React__default.ReactNode; /** An element type to render as (string or function). */ as?: T; /** Additional CSS classes. */ className?: string; /** Container width */ width?: 'layout' | 'default' | 'narrow' | 'full'; /** [deprecated] Layout size */ layout?: boolean; /** [deprecated] Narrow size. */ narrow?: boolean; } & React__default.ComponentPropsWithoutRef<React__default.ElementType extends T ? 'div' : T>; declare const Container: <T extends React__default.ElementType = "div">(props: ContainerProps<T>) => react_jsx_runtime.JSX.Element; interface DateFieldProps<T extends DateValue> extends DateFieldProps$1<T> { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function DateField<T extends DateValue>({ label, description, errorMessage, ...props }: DateFieldProps<T>): react_jsx_runtime.JSX.Element; interface DatePickerProps<T extends DateValue> extends DatePickerProps$1<T> { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function DatePicker<T extends DateValue>({ label, description, errorMessage, ...props }: DatePickerProps<T>): react_jsx_runtime.JSX.Element; interface DateRangePickerProps<T extends DateValue> extends DateRangePickerProps$1<T> { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function DateRangePicker<T extends DateValue>({ label, description, errorMessage, ...props }: DateRangePickerProps<T>): react_jsx_runtime.JSX.Element; declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element; /** * A Disclosure is used to show or hide content that is not visible by default. */ declare function Disclosure(props: DisclosureProps): react_jsx_runtime.JSX.Element; /** * A DisclosureGroup is used to group Disclosures together to create an accordion. */ declare function DisclosureGroup(props: DisclosureGroupProps): react_jsx_runtime.JSX.Element; declare function Form(props: FormProps): react_jsx_runtime.JSX.Element; declare function GridList<T extends object>({ children, ...props }: GridListProps<T>): react_jsx_runtime.JSX.Element; declare function GridListItem({ children, ...props }: GridListItemProps): react_jsx_runtime.JSX.Element; declare function ListBox<T extends object>({ children, ...props }: ListBoxProps<T>): react_jsx_runtime.JSX.Element; declare function ListBoxItem(props: ListBoxItemProps): react_jsx_runtime.JSX.Element; declare function Menu<T extends object>(props: MenuProps<T>): react_jsx_runtime.JSX.Element; declare function MenuItem<T extends object>(props: MenuItemProps<T>): react_jsx_runtime.JSX.Element; declare function MenuSeparator(props: SeparatorProps): react_jsx_runtime.JSX.Element; declare function MenuSection<T extends object>(props: MenuSectionProps<T>): react_jsx_runtime.JSX.Element; declare function MenuSectionHeader(props: React__default.ComponentProps<typeof Header>): react_jsx_runtime.JSX.Element; interface BasicMenuTriggerProps extends MenuTriggerProps { placement?: Placement; } declare function MenuTrigger(props: BasicMenuTriggerProps): react_jsx_runtime.JSX.Element; declare function SubmenuTrigger(props: SubmenuTriggerProps): react_jsx_runtime.JSX.Element; interface MeterProps extends MeterProps$1 { label?: string; } declare function Meter({ label, ...props }: MeterProps): react_jsx_runtime.JSX.Element; declare function Modal(props: ModalOverlayProps): react_jsx_runtime.JSX.Element; interface NumberFieldProps extends NumberFieldProps$1 { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function NumberField({ label, description, errorMessage, ...props }: NumberFieldProps): react_jsx_runtime.JSX.Element; interface PopoverProps extends Omit<PopoverProps$1, 'children'> { children: React__default.ReactNode; /** Mandatory when children don't contain a <Heading slot="title"> or dialogAriaLabelledBy */ dialogAriaLabel?: string; /** Mandatory when children don't contain a <Heading slot="title"> or dialogAriaLabel */ dialogAriaLabelledby?: string; showArrow?: boolean; } declare function Popover({ children, dialogAriaLabel, dialogAriaLabelledby, showArrow, ...props }: PopoverProps): react_jsx_runtime.JSX.Element; interface ProgressBarProps extends ProgressBarProps$1 { label?: string; } declare function ProgressBar({ label, ...props }: ProgressBarProps): react_jsx_runtime.JSX.Element; interface RadioGroupProps extends Omit<RadioGroupProps$1, 'children'> { children?: React__default.ReactNode; label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function RadioGroup({ label, description, errorMessage, children, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element; interface RangeCalendarProps<T extends DateValue> extends RangeCalendarProps$1<T> { errorMessage?: string; } declare function RangeCalendar<T extends DateValue>({ errorMessage, ...props }: RangeCalendarProps<T>): react_jsx_runtime.JSX.Element; interface SearchFieldProps extends SearchFieldProps$1 { label?: string; description?: string; placeholder?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function SearchField({ label, description, placeholder, errorMessage, ...props }: SearchFieldProps): react_jsx_runtime.JSX.Element; type SpinnerSize = 'xs' | 'sm' | 'lg'; interface SpinnerProps extends React__default.HTMLAttributes<HTMLDivElement> { size?: SpinnerSize | number | string; label?: string | null; isDecorative?: boolean; } declare function Spinner({ size, label, isDecorative, className, style, 'aria-label': ariaLabelProp, ...props }: SpinnerProps): react_jsx_runtime.JSX.Element; interface SliderProps<T> extends SliderProps$1<T> { label?: string; thumbLabels?: string[]; } declare function Slider<T extends number | number[]>({ label, thumbLabels, ...props }: SliderProps<T>): react_jsx_runtime.JSX.Element; interface SwitchProps extends Omit<SwitchProps$1, 'children'> { children: React__default.ReactNode; } declare function Switch({ children, ...props }: SwitchProps): react_jsx_runtime.JSX.Element; interface Props$1<T extends object> extends TableHeaderProps<T> { dragColumnHeader?: React__default.ReactNode; } declare function TableHeader<T extends object>({ columns, children, dragColumnHeader, }: Props$1<T>): react_jsx_runtime.JSX.Element; interface ColumnType { id: string; name: ReactNode; isRowHeader?: boolean; } interface RowType { id: string; textValue?: string; [key: string]: ReactNode; } interface TableProps<C, R> extends TableProps$1 { columns?: C[]; rows?: R[]; resizableColumns?: boolean; dragColumnHeader?: ComponentProps<typeof TableHeader>['dragColumnHeader']; } /** * A wrapper around the `react-aria-components` Table component. * * See https://react-spectrum.adobe.com/react-aria/Table.html */ declare function Table<C extends ColumnType, R extends RowType>({ columns, rows, resizableColumns, dragColumnHeader, ...otherProps }: TableProps<C, R>): react_jsx_runtime.JSX.Element; declare function Row<T extends object>({ id, columns, children, ...otherProps }: RowProps<T>): react_jsx_runtime.JSX.Element; declare function Column(props: ColumnProps): react_jsx_runtime.JSX.Element; declare function Tabs(props: TabsProps): react_jsx_runtime.JSX.Element; interface TagGroupProps<T> extends Omit<TagGroupProps$1, 'children'>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'> { label?: string; description?: string; errorMessage?: string; } declare function TagGroup<T extends object>({ label, description, errorMessage, items, children, renderEmptyState, ...props }: TagGroupProps<T>): react_jsx_runtime.JSX.Element; declare function Tag({ children, ...props }: TagProps): react_jsx_runtime.JSX.Element; interface TextAreaFieldProps extends TextFieldProps$1 { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); placeholder?: string; } declare function TextAreaField({ label, description, errorMessage, ...props }: TextAreaFieldProps): react_jsx_runtime.JSX.Element; interface TextFieldProps extends TextFieldProps$1 { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); placeholder?: string; } declare function TextField({ label, description, errorMessage, ...props }: TextFieldProps): react_jsx_runtime.JSX.Element; interface TimeFieldProps<T extends TimeValue> extends TimeFieldProps$1<T> { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } declare function TimeField<T extends TimeValue>({ label, description, errorMessage, ...props }: TimeFieldProps<T>): react_jsx_runtime.JSX.Element; interface Props { title?: string | Array<any>; content: string; info?: boolean; success?: boolean; error?: boolean; warning?: boolean; } declare function Toast(props: Props): react_jsx_runtime.JSX.Element; declare function ToggleButton(props: ToggleButtonProps): react_jsx_runtime.JSX.Element; declare function Toolbar(props: ToolbarProps): react_jsx_runtime.JSX.Element; interface TooltipProps extends Omit<TooltipProps$1, 'children'> { children: React__default.ReactNode; } declare function Tooltip({ children, ...props }: TooltipProps): react_jsx_runtime.JSX.Element; interface TreeItemProps extends Partial<TreeItemProps$1> { title: string; } declare function TreeItemContent(props: Omit<TreeItemContentProps, 'children'> & { children?: React__default.ReactNode; }): react_jsx_runtime.JSX.Element; declare function TreeItem(props: TreeItemProps): react_jsx_runtime.JSX.Element; declare function Tree<T extends object>({ children, ...props }: TreeProps<T>): react_jsx_runtime.JSX.Element; declare function QuantaTextField(props: TextFieldProps): react_jsx_runtime.JSX.Element; declare function QuantaTextAreaField(props: TextAreaFieldProps): react_jsx_runtime.JSX.Element; declare function QuantaSelect<T extends object = SelectItemObject, M extends 'single' | 'multiple' = 'single'>(props: SelectProps<T, M>): react_jsx_runtime.JSX.Element; export { BlockToolbar, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, CheckboxField, CheckboxGroup, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheel, Column, ComboBox, ComboBoxItem, Container, DateField, DatePicker, DateRangePicker, Dialog, Disclosure, DisclosureGroup, Form, GridList, GridListItem, ListBox, ListBoxItem, Menu, MenuItem, MenuSection, MenuSectionHeader, MenuSeparator, MenuTrigger, Meter, Modal, NumberField, Popover, type PopoverProps, ProgressBar, QuantaSelect, QuantaTextAreaField, QuantaTextField, RadioGroup, RangeCalendar, Row, SearchField, Slider, Spinner, SubmenuTrigger, Switch, Table, TableHeader, Tabs, Tag, TagGroup, TextAreaField, TextField, TimeField, Toast, ToggleButton, Toolbar, Tooltip, Tree, TreeItem, TreeItemContent };