mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[@types/carbon-components-react] [NEW] New types package for carbon-components-react. (#37442)
* Init carbon-components-react. * Fix tsconfig. * Add missing file. * Fix test + read only array. * Fix test.
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
ade88e13fd
commit
e33970c0fd
@@ -0,0 +1,90 @@
|
||||
import * as React from 'react';
|
||||
import { DataTable, DataTableHeader, DataTableRow } from 'carbon-components-react';
|
||||
|
||||
interface Row1 extends DataTableRow {
|
||||
rowProp: string;
|
||||
}
|
||||
|
||||
interface Header1 extends DataTableHeader {
|
||||
headerProp: number;
|
||||
}
|
||||
|
||||
interface ExtraStuff {
|
||||
extra1: string;
|
||||
extra2?: number;
|
||||
}
|
||||
|
||||
const t1 = (
|
||||
<DataTable<Row1, Header1>
|
||||
headers={[{ key: 'h1', header: <div />, headerProp: 2 }]}
|
||||
rows={[{ id: 'r1', rowProp: 'row1' }]}
|
||||
/>
|
||||
);
|
||||
|
||||
const t2 = (
|
||||
<DataTable<Row1, Header1>
|
||||
filterRows={data => {
|
||||
const headers: ReadonlyArray<Header1> = data.headers;
|
||||
const rowIds: ReadonlyArray<string> = data.rowIds;
|
||||
return [headers[0].key];
|
||||
}}
|
||||
headers={[{ key: 'h1', header: <div />, headerProp: 2 }]}
|
||||
rows={[{ id: 'r1', rowProp: 'row1' }]}
|
||||
render={props => {
|
||||
props.expandRow('asdf');
|
||||
|
||||
let bap = props.getBatchActionProps();
|
||||
bap.onCancel();
|
||||
let x = bap.totalSelected;
|
||||
|
||||
let bap2 = props.getBatchActionProps<ExtraStuff>({ extra1: 'extra' });
|
||||
let s = bap2.extra1;
|
||||
|
||||
let hp = props.getHeaderProps({ header: { key: 'k', header: 'Test' } });
|
||||
let k = hp.key;
|
||||
|
||||
let hp2 = props.getHeaderProps<ExtraStuff>({ header: { key: 'k', header: 'Test' }, extra1: 'asdf' });
|
||||
let k2 = hp.key;
|
||||
let e = hp2.extra1;
|
||||
|
||||
let rp = props.getRowProps({ row: { id: 'r1' } });
|
||||
k = rp.key;
|
||||
|
||||
let rp2 = props.getRowProps<ExtraStuff>({ row: { id: 'r1' }, extra1: 'asdf' });
|
||||
k = rp2.key;
|
||||
e = rp2.extra1;
|
||||
|
||||
let sp = props.getSelectionProps();
|
||||
let c = sp.checked;
|
||||
|
||||
let sp2 = props.getSelectionProps({ extra1: 't2', extra3: 'asdf' });
|
||||
c = sp2.checked;
|
||||
e = sp2.extra1;
|
||||
e = sp2.extra3;
|
||||
|
||||
let tp = props.getTableProps();
|
||||
let size = tp.size;
|
||||
|
||||
props.selectAll();
|
||||
props.selectRow('qwerty');
|
||||
props.sortBy('zxcv');
|
||||
|
||||
return <div />;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
// No types explicitly set on DataTable props
|
||||
const row = { id: '2', someRandomRowProp: 'test' };
|
||||
const t3 = (
|
||||
<DataTable
|
||||
headers={[{ key: '1', header: 'Test', someRandomHeaderProp: 'test' }]}
|
||||
rows={[row]}
|
||||
render={data => {
|
||||
let rowProps = data.getRowProps({ row, extra1: 'qwerty', ...row });
|
||||
let a = rowProps.extra1;
|
||||
let b = rowProps.someRandomRowProp;
|
||||
return <div />;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface AccordionSkeletonProps {
|
||||
count?: number,
|
||||
open?: boolean,
|
||||
uid?: any,
|
||||
}
|
||||
|
||||
declare const AccordionSkeleton: React.FC<AccordionSkeletonProps>;
|
||||
|
||||
export default AccordionSkeleton;
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps {
|
||||
children?: ReactAttr["children"],
|
||||
className?: ReactAttr["className"],
|
||||
}
|
||||
|
||||
export interface AccordionProps extends InheritedProps { }
|
||||
|
||||
declare const Accordion: React.FC<AccordionProps>;
|
||||
|
||||
export default Accordion;
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactLIAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactLIAttr, EmbeddedIconProps { }
|
||||
|
||||
export interface HeadingClickData {
|
||||
event: React.MouseEvent<HTMLElement>;
|
||||
isOpen: boolean;
|
||||
}
|
||||
|
||||
export interface AccordionItemProps extends InheritedProps {
|
||||
onHeadingClick?(data: HeadingClickData): void,
|
||||
open?: boolean,
|
||||
renderExpando?: React.ReactNode,
|
||||
}
|
||||
|
||||
declare class AccordionItem extends React.Component<AccordionItemProps> { }
|
||||
|
||||
export default AccordionItem;
|
||||
@@ -0,0 +1,7 @@
|
||||
export * from "./Accordion";
|
||||
export * from "./Accordion.Skeleton";
|
||||
export * from "./AccordionItem";
|
||||
|
||||
export { default } from "./Accordion";
|
||||
export { default as AccordingItem } from "./AccordionItem";
|
||||
export { default as AccordionSkeleton } from "./Accordion.Skeleton";
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "../Accordion/AccordionItem";
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "../Accordion/AccordionItem";
|
||||
@@ -0,0 +1,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface BreadcrumbSkeletonProps { }
|
||||
|
||||
declare class BreadcrumbSkeleton extends React.Component<BreadcrumbSkeletonProps> { }
|
||||
|
||||
export default BreadcrumbSkeleton;
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAttr { }
|
||||
|
||||
export interface BreadcrumbProps extends InheritedProps {
|
||||
noTrailingSlash?: boolean,
|
||||
}
|
||||
|
||||
declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
||||
|
||||
export default Breadcrumb;
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
import { LinkProps } from "../Link";
|
||||
|
||||
interface InheritedProps extends ReactDivAttr {
|
||||
href?: LinkProps["href"],
|
||||
}
|
||||
|
||||
export interface BreadcrumbItemProps extends InheritedProps {
|
||||
isCurrentPage?: boolean,
|
||||
}
|
||||
|
||||
declare const BreadcrumbItem: React.FC<BreadcrumbItemProps>;
|
||||
|
||||
export default BreadcrumbItem;
|
||||
@@ -0,0 +1,11 @@
|
||||
import Breadcrumb from "./Breadcrumb";
|
||||
import BreadcrumbSkeleton from "./Breadcrumb.Skeleton";
|
||||
import BreadcrumbItem from "./BreadcrumbItem";
|
||||
|
||||
export * from "./Breadcrumb";
|
||||
export * from "./Breadcrumb.Skeleton";
|
||||
export * from "./BreadcrumbItem";
|
||||
|
||||
export { Breadcrumb, BreadcrumbItem, BreadcrumbSkeleton };
|
||||
|
||||
export { default } from "./Breadcrumb";
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from '../Breadcrumb/BreadcrumbItem';
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as React from "react";
|
||||
import { ReactAnchorAttr, SizingProps } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends SizingProps {
|
||||
className?: ReactAnchorAttr["className"],
|
||||
href?: ReactAnchorAttr["href"],
|
||||
}
|
||||
|
||||
export interface ButtonSkeletonProps extends InheritedProps { }
|
||||
|
||||
declare const ButtonSkeleton: React.FC<ButtonSkeletonProps>;
|
||||
|
||||
export default ButtonSkeleton;
|
||||
@@ -0,0 +1,30 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, EmbeddedTooltipProps, ReactAnchorAttr, ReactButtonAttr, ReactCreateElementParam, RenderIconProps, SizingProps, } from "../../typings/shared";
|
||||
|
||||
export type ButtonKind = "danger" | "danger--primary" | "ghost" | "primary" | "secondary" | "tertiary";
|
||||
export type ButtonSize = "default" | "field" | "small";
|
||||
|
||||
interface InheritedButtonProps extends ReactButtonAttr { }
|
||||
|
||||
interface InheritedAnchorProps extends ReactAnchorAttr { }
|
||||
|
||||
interface SharedProps extends
|
||||
EmbeddedIconProps,
|
||||
EmbeddedTooltipProps,
|
||||
RenderIconProps,
|
||||
SizingProps
|
||||
{
|
||||
as?: ReactCreateElementParam,
|
||||
hasOnlyIcon?: boolean,
|
||||
kind?: ButtonKind, // required but has default value
|
||||
size?: ButtonSize,
|
||||
}
|
||||
|
||||
export interface ButtonProps extends SharedProps, InheritedButtonProps { }
|
||||
|
||||
export interface ButtonAnchorProps extends SharedProps, InheritedAnchorProps { }
|
||||
|
||||
export type AllButtonProps = ButtonAnchorProps | ButtonProps;
|
||||
declare const Button: React.RefForwardingComponent<HTMLElement, AllButtonProps>;
|
||||
|
||||
export default Button;
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./Button";
|
||||
export * from "./Button.Skeleton";
|
||||
export { default } from './Button';
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactLabelAttr } from "../../typings/shared";
|
||||
|
||||
export interface CheckboxSkeletonProps {
|
||||
id?: ReactLabelAttr["htmlFor"],
|
||||
}
|
||||
|
||||
declare class CheckboxSkeleton extends React.Component<CheckboxSkeletonProps> { }
|
||||
|
||||
export default CheckboxSkeleton;
|
||||
@@ -0,0 +1,21 @@
|
||||
import * as React from "react";
|
||||
import { ReactInputAttr, RequiresIdProps } from "../../typings/shared";
|
||||
|
||||
type ExcludedAttributes = "id" | "onChange" | "type";
|
||||
interface InheritedProps extends
|
||||
Omit<ReactInputAttr, ExcludedAttributes>,
|
||||
RequiresIdProps
|
||||
{ }
|
||||
|
||||
export interface CheckboxProps extends InheritedProps {
|
||||
defaultChecked?: boolean,
|
||||
hideLabel?: boolean,
|
||||
indeterminate?: boolean,
|
||||
labelText: NonNullable<React.ReactNode>,
|
||||
onChange?(checked: boolean, id: string, event: React.ChangeEvent<HTMLInputElement>): void,
|
||||
wrapperClassName?: string,
|
||||
}
|
||||
|
||||
declare const Checkbox: React.RefForwardingComponent<HTMLInputElement, CheckboxProps>;
|
||||
|
||||
export default Checkbox;
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./Checkbox";
|
||||
export * from "./Checkbox.Skeleton";
|
||||
export { default } from "./Checkbox";
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends Omit<ReactDivAttr, "children"> { }
|
||||
|
||||
export interface CodeSnippetSkeletonProps extends InheritedProps {
|
||||
type?: "multi" | "single",
|
||||
}
|
||||
|
||||
declare class CodeSnippetSkeleton extends React.Component<CodeSnippetSkeletonProps> { }
|
||||
|
||||
export default CodeSnippetSkeleton;
|
||||
@@ -0,0 +1,28 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr, ThemeProps } from "../../typings/shared";
|
||||
import { CopyProps } from "../Copy";
|
||||
|
||||
interface InheritedDivProps extends Omit<ReactDivAttr, "children"> { }
|
||||
interface InheritedInlineProps extends Omit<CopyProps, "children"> { }
|
||||
|
||||
interface SharedProps extends ThemeProps {
|
||||
children?: string,
|
||||
copyLabel?: string,
|
||||
copyButtonDescription?: string,
|
||||
feedback?: CopyProps["feedback"],
|
||||
showLessText?: string,
|
||||
showMoreText?: string,
|
||||
}
|
||||
|
||||
export interface CodeSnippetDivProps extends SharedProps, InheritedDivProps {
|
||||
type?: 'single' | 'multi' | null;
|
||||
}
|
||||
|
||||
export interface CodeSnippetInlineProps extends SharedProps, InheritedInlineProps {
|
||||
type: "inline",
|
||||
}
|
||||
|
||||
export type AllCodeSnippetProps = CodeSnippetDivProps | CodeSnippetInlineProps;
|
||||
declare class CodeSnippet extends React.Component<AllCodeSnippetProps> { }
|
||||
|
||||
export default CodeSnippet;
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./CodeSnippet";
|
||||
export * from "./CodeSnippet.Skeleton";
|
||||
export { default } from "./CodeSnippet";
|
||||
@@ -0,0 +1,32 @@
|
||||
import * as React from "react";
|
||||
import { DownshiftTypedProps, InternationalProps, ReactInputAttr, RequiresIdProps, ThemeProps, ValidityProps } from "../../typings/shared";
|
||||
import { ListBoxProps } from "../ListBox";
|
||||
import { ListBoxMenuIconTranslationKey } from "../ListBox/ListBoxMenuIcon";
|
||||
import { ListBoxSelectionTranslationKey } from "../ListBox/ListBoxSelection";
|
||||
|
||||
type ExcludedAttributes = "id" | "onChange" | "placeholder" | "ref";
|
||||
interface InheritedProps<ItemType> extends
|
||||
Omit<ReactInputAttr, ExcludedAttributes>,
|
||||
DownshiftTypedProps<ItemType>,
|
||||
InternationalProps<ListBoxMenuIconTranslationKey | ListBoxSelectionTranslationKey>,
|
||||
RequiresIdProps,
|
||||
ThemeProps,
|
||||
ValidityProps
|
||||
{
|
||||
ariaLabel?: React.AriaAttributes["aria-label"],
|
||||
placeholder: NonNullable<ReactInputAttr["placeholder"]>,
|
||||
type?: ListBoxProps["type"],
|
||||
}
|
||||
|
||||
export interface ComboBoxProps<ItemType = string> extends InheritedProps<ItemType> {
|
||||
downshiftProps: any, // TODO
|
||||
initialSelectedItem?: ItemType;
|
||||
items: ItemType[],
|
||||
onChange?(selectedItem?: ItemType): void,
|
||||
onInputChange?(inputValue?: string): void,
|
||||
shouldFilterItem?(item: ItemType, itemToString?: ComboBoxProps<ItemType>["itemToString"], inputValue?: string): void,
|
||||
}
|
||||
|
||||
declare class ComboBox<T = string> extends React.Component<ComboBoxProps<T>> { }
|
||||
|
||||
export default ComboBox;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./ComboBox";
|
||||
export { default } from './ComboBox';
|
||||
@@ -0,0 +1,64 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactDivAttr } from "../../typings/shared";
|
||||
import { ButtonProps } from "../Button";
|
||||
|
||||
// ComposedModal
|
||||
|
||||
type ExcludedAttributes = "onBlur" | "onClick" | "onTransitionEnd" | "ref" | "role" | "tabIndex";
|
||||
interface ComposedModalInheritedProps extends Omit<ReactDivAttr, ExcludedAttributes> { }
|
||||
|
||||
export interface ComposedModalProps extends ComposedModalInheritedProps {
|
||||
containerClassName?: string,
|
||||
onClose?(): boolean | void,
|
||||
open?: boolean,
|
||||
selectedPrimaryFocus?: string,
|
||||
}
|
||||
|
||||
declare class ComposedModal extends React.Component<ComposedModalProps> { }
|
||||
|
||||
// Header
|
||||
|
||||
interface ModalHeaderInheritedProps extends
|
||||
Omit<ReactDivAttr, "title">,
|
||||
EmbeddedIconProps
|
||||
{ }
|
||||
|
||||
export interface ModalHeaderProps extends ModalHeaderInheritedProps {
|
||||
buttonOnClick?(): void,
|
||||
closeClassName?: string,
|
||||
closeIconClassName?: string,
|
||||
closeModal?(): void,
|
||||
label?: React.ReactNode,
|
||||
labelClassName?: string,
|
||||
title?: React.ReactNode,
|
||||
titleClassName?: string,
|
||||
}
|
||||
|
||||
export declare class ModalHeader extends React.Component<ModalHeaderProps> { }
|
||||
|
||||
// Body
|
||||
|
||||
interface ModalBodyInheritedProps extends ReactDivAttr { }
|
||||
|
||||
export interface ModalBodyProps extends ModalBodyInheritedProps { }
|
||||
|
||||
export declare class ModalBody extends React.Component<ModalBodyProps> { }
|
||||
|
||||
// Footer
|
||||
|
||||
interface ModalFooterInheritedProps extends ReactDivAttr { }
|
||||
|
||||
export interface ModalFooterProps extends ModalFooterInheritedProps {
|
||||
closeModal?(): void,
|
||||
primaryClassName?: string,
|
||||
primaryButtonText?: string,
|
||||
primaryButtonDisabled?: string,
|
||||
secondaryClassName?: string,
|
||||
secondaryButtonText?: string,
|
||||
onRequestClose?: ButtonProps["onClick"],
|
||||
onRequestSubmit?: ButtonProps["onClick"],
|
||||
}
|
||||
|
||||
export declare class ModalFooter extends React.Component<ModalFooterProps> { }
|
||||
|
||||
export default ComposedModal;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./ComposedModal";
|
||||
export { default } from "./ComposedModal";
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
import { SwitchProps } from "./Switch";
|
||||
|
||||
interface InheritedProps extends Omit<ReactDivAttr, "onChange"> {
|
||||
onChange: NonNullable<SwitchProps["onClick"]>,
|
||||
}
|
||||
|
||||
export interface ContentSwitcherProps extends InheritedProps {
|
||||
selectedIndex?: number,
|
||||
}
|
||||
|
||||
declare const ContentSwitcher: React.FC<ContentSwitcherProps>;
|
||||
|
||||
export default ContentSwitcher;
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { ReactButtonAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends Omit<ReactButtonAttr, "onClick"> { }
|
||||
|
||||
export interface SwitchProps extends InheritedProps {
|
||||
index?: number,
|
||||
onClick(event: React.MouseEvent<HTMLButtonElement>, index?: SwitchProps["index"]): void,
|
||||
selected?: boolean,
|
||||
text: string,
|
||||
}
|
||||
|
||||
declare const Switch: React.RefForwardingComponent<HTMLButtonElement, SwitchProps>;
|
||||
|
||||
export default Switch;
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from "./ContentSwitcher";
|
||||
export * from "./Switch";
|
||||
export { default as Switch } from "./Switch";
|
||||
export { default } from "./ContentSwitcher";
|
||||
@@ -0,0 +1,18 @@
|
||||
import * as React from "react";
|
||||
import { ReactButtonAttr } from "../../typings/shared";
|
||||
|
||||
export interface FeedbackProps {
|
||||
feedback?: string,
|
||||
feedbackTimeout?: number,
|
||||
}
|
||||
|
||||
interface InheritedProps extends
|
||||
Omit<ReactButtonAttr, "type">,
|
||||
FeedbackProps
|
||||
{ }
|
||||
|
||||
export interface CopyProps extends InheritedProps { }
|
||||
|
||||
declare class Copy extends React.Component<CopyProps> { }
|
||||
|
||||
export default Copy;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./Copy";
|
||||
export { default } from './Copy';
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactButtonAttr } from "../../typings/shared";
|
||||
import { FeedbackProps } from "../Copy";
|
||||
|
||||
interface InheritedProps extends
|
||||
ReactButtonAttr,
|
||||
EmbeddedIconProps,
|
||||
FeedbackProps
|
||||
{ }
|
||||
|
||||
export interface CopyButtonProps extends InheritedProps { }
|
||||
|
||||
declare class CopyButton extends React.Component<CopyButtonProps> { }
|
||||
|
||||
export default CopyButton;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./CopyButton";
|
||||
export { default } from './CopyButton';
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ButtonProps } from "../Button";
|
||||
|
||||
interface InheritedProps extends Omit<ButtonProps, "kind"> { }
|
||||
|
||||
export interface DangerButtonProps extends InheritedProps { }
|
||||
|
||||
declare const DangerButton: React.FC<DangerButtonProps>;
|
||||
|
||||
export default DangerButton;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./DangerButton";
|
||||
export { default } from "./DangerButton";
|
||||
@@ -0,0 +1,217 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps, ShapeOf } from "../../typings/shared";
|
||||
import { DataTableSortState, DataTableSortStates } from "./state/sorting";
|
||||
import Table from "./Table";
|
||||
import TableActionList from "./TableActionList";
|
||||
import TableBatchAction from "./TableBatchAction";
|
||||
import TableBatchActions from "./TableBatchActions";
|
||||
import TableBody from "./TableBody";
|
||||
import TableCell from "./TableCell";
|
||||
import TableContainer from "./TableContainer";
|
||||
import TableExpandedRow from "./TableExpandedRow";
|
||||
import TableExpandHeader from "./TableExpandHeader";
|
||||
import TableExpandRow from "./TableExpandRow";
|
||||
import TableHead from "./TableHead";
|
||||
import TableHeader from "./TableHeader";
|
||||
import TableRow from "./TableRow";
|
||||
import TableSelectAll from "./TableSelectAll";
|
||||
import TableSelectRow from "./TableSelectRow";
|
||||
import TableToolbar from "./TableToolbar";
|
||||
import TableToolbarAction from "./TableToolbarAction";
|
||||
import TableToolbarContent from "./TableToolbarContent";
|
||||
import TableToolbarMenu from "./TableToolbarMenu";
|
||||
import TableToolbarSearch from "./TableToolbarSearch";
|
||||
|
||||
// region Row Types
|
||||
|
||||
export interface DataTableRow {
|
||||
disabled?: boolean,
|
||||
id: string,
|
||||
isExpanded?: boolean,
|
||||
isSelected?: boolean,
|
||||
}
|
||||
|
||||
export interface SortRowData {
|
||||
compare(a: any, b: any, locale?: string): number,
|
||||
key: string,
|
||||
locale?: string,
|
||||
sortDirection: DataTableSortState,
|
||||
sortStates: DataTableSortStates,
|
||||
}
|
||||
|
||||
export interface FilterRowsData<R extends DataTableRow = DataTableRow, H extends DataTableHeader = DataTableHeader> {
|
||||
cellsById: { [cellId: string]: DataTableCell };
|
||||
headers: ReadonlyArray<H>;
|
||||
inputValue: string;
|
||||
rowIds: ReadonlyArray<R['id']>;
|
||||
}
|
||||
|
||||
export type DenormalizedRow<R extends DataTableRow = DataTableRow> =
|
||||
R & { cells: DataTableCell[] };
|
||||
|
||||
export interface DataTableCustomRowData<R extends DataTableRow = DataTableRow> {
|
||||
onClick?(event: React.MouseEvent<HTMLElement>): void,
|
||||
row: R,
|
||||
}
|
||||
|
||||
export interface DataTableCustomRowProps<R extends DataTableRow = DataTableRow> {
|
||||
ariaLabel?: string,
|
||||
disabled: R["disabled"],
|
||||
isExpanded: R["isExpanded"],
|
||||
isSelected: R["isSelected"],
|
||||
key: R["id"],
|
||||
onExpand(event: React.MouseEvent<HTMLElement>): void,
|
||||
}
|
||||
|
||||
export interface DataTableCustomSelectionData<R extends DataTableRow = DataTableRow> {
|
||||
onClick?(event: React.MouseEvent<HTMLElement>): void,
|
||||
row?: R,
|
||||
}
|
||||
|
||||
export interface DataTableCustomSelectionProps<R extends DataTableRow = DataTableRow> {
|
||||
ariaLabel?: string,
|
||||
checked: R extends never ? boolean : R["isSelected"],
|
||||
disabled: R extends never ? never : R["disabled"],
|
||||
id: string,
|
||||
indeterminate: R extends never ? boolean : never,
|
||||
name: string,
|
||||
onSelect(event: React.MouseEvent<HTMLElement>): void,
|
||||
radio: R extends never ? never : (Extract<DataTableProps["radio"], true> | null),
|
||||
}
|
||||
|
||||
// endregion Row Types
|
||||
|
||||
// region Header Types
|
||||
|
||||
export interface DataTableHeader {
|
||||
header: NonNullable<React.ReactNode>,
|
||||
key: string,
|
||||
}
|
||||
|
||||
export interface DataTableCustomHeaderData<H extends DataTableHeader = DataTableHeader> {
|
||||
header: H,
|
||||
isSortable?: boolean,
|
||||
onClick?(event: React.MouseEvent<HTMLElement>): void,
|
||||
}
|
||||
|
||||
export interface DataTableCustomHeaderProps<H extends DataTableHeader = DataTableHeader> {
|
||||
isSortable?: boolean,
|
||||
isSortHeader: boolean,
|
||||
key: H["key"],
|
||||
onClick(event: React.MouseEvent<HTMLElement>): void,
|
||||
sortDirection: DataTableSortState,
|
||||
}
|
||||
|
||||
// endregion Header Types
|
||||
|
||||
// region Cell Types
|
||||
|
||||
export interface DataTableCell {
|
||||
value?: any,
|
||||
}
|
||||
|
||||
// endregion CellTypes
|
||||
|
||||
// region Batch Action Types
|
||||
|
||||
export interface DataTableCustomBatchActionsData { }
|
||||
|
||||
export interface DataTableCustomBatchActionsProps {
|
||||
onCancel(): void,
|
||||
shouldShowBatchActions?: boolean,
|
||||
totalSelected: number,
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region DataTable
|
||||
|
||||
export type DataTableSize = "compact" | "normal" | "short" | "tall";
|
||||
export interface DataTableExposedProps {
|
||||
isSortable?: boolean,
|
||||
shouldShowBorder?: boolean,
|
||||
size?: DataTableSize,
|
||||
useStaticWidth?: boolean,
|
||||
useZebraStyles?: boolean,
|
||||
}
|
||||
|
||||
// Custom Render Props
|
||||
export interface DataTableCustomRenderProps<
|
||||
R extends DataTableRow = DataTableRow,
|
||||
H extends DataTableHeader = DataTableHeader
|
||||
> {
|
||||
expandRow(rowId: R['id']): void;
|
||||
getBatchActionProps<E extends object = {}>(
|
||||
data?: ShapeOf<DataTableCustomBatchActionsData, E>
|
||||
): ShapeOf<DataTableCustomBatchActionsProps, E>;
|
||||
getHeaderProps<E extends object = {}>(
|
||||
data: ShapeOf<DataTableCustomHeaderData<H>, E>
|
||||
): ShapeOf<DataTableCustomHeaderProps<H>, E>;
|
||||
getRowProps<E extends object = {}>(
|
||||
data: ShapeOf<DataTableCustomRowData<R>, E>
|
||||
): ShapeOf<DataTableCustomRowProps<R>, E>;
|
||||
getSelectionProps<E extends object = {}>(
|
||||
data?: ShapeOf<DataTableCustomSelectionData<R>, E>
|
||||
): ShapeOf<DataTableCustomSelectionProps<R>, E> | ShapeOf<DataTableCustomSelectionProps<never>, E>;
|
||||
getTableProps(): DataTableExposedProps;
|
||||
headers: DataTableProps<R, H>['headers'];
|
||||
onInputChange(event: React.SyntheticEvent<HTMLInputElement>): void;
|
||||
radio?: DataTableProps<R, H>['radio'];
|
||||
rows: ReadonlyArray<DenormalizedRow<R>>;
|
||||
selectAll(): void;
|
||||
selectedRows: ReadonlyArray<DenormalizedRow<R>>;
|
||||
selectRow(rowId: R['id']): void;
|
||||
sortBy(headerKey: H['key']): void;
|
||||
}
|
||||
|
||||
export type DataTableTranslationKey =
|
||||
"carbon.table.row.expand"
|
||||
| "carbon.table.row.collapse"
|
||||
| "carbon.table.all.select"
|
||||
| "carbon.table.all.unselect"
|
||||
| "carbon.table.row.select"
|
||||
| "carbon.table.row.unselect";
|
||||
|
||||
interface DataTableInheritedProps extends InternationalProps<DataTableTranslationKey>, DataTableExposedProps { }
|
||||
|
||||
export interface DataTableProps<R extends DataTableRow = DataTableRow, H extends DataTableHeader = DataTableHeader>
|
||||
extends DataTableInheritedProps {
|
||||
filterRows?(data: FilterRowsData<R, H>): Array<R['id']>;
|
||||
headers: H[];
|
||||
locale?: string;
|
||||
radio?: boolean;
|
||||
render?(props: DataTableCustomRenderProps): React.ReactNode;
|
||||
rows: R[];
|
||||
sortRow?(cellA: any, cellB: any, data: SortRowData): number;
|
||||
}
|
||||
|
||||
declare class DataTable<
|
||||
R extends DataTableRow = DataTableRow,
|
||||
H extends DataTableHeader = DataTableHeader,
|
||||
> extends React.Component<DataTableProps<R, H>> {
|
||||
static readonly translationKeys: ReadonlyArray<DataTableTranslationKey>;
|
||||
static readonly Table: typeof Table;
|
||||
static readonly TableActionList: typeof TableActionList;
|
||||
static readonly TableBatchAction: typeof TableBatchAction;
|
||||
static readonly TableBatchActions: typeof TableBatchActions;
|
||||
static readonly TableBody: typeof TableBody;
|
||||
static readonly TableCell: typeof TableCell;
|
||||
static readonly TableContainer: typeof TableContainer;
|
||||
static readonly TableExpandHeader: typeof TableExpandHeader;
|
||||
static readonly TableExpandRow: typeof TableExpandRow;
|
||||
static readonly TableExpandedRow: typeof TableExpandedRow;
|
||||
static readonly TableHead: typeof TableHead;
|
||||
static readonly TableHeader: typeof TableHeader;
|
||||
static readonly TableRow: typeof TableRow;
|
||||
static readonly TableSelectAll: typeof TableSelectAll;
|
||||
static readonly TableSelectRow: typeof TableSelectRow;
|
||||
static readonly TableToolbar: typeof TableToolbar;
|
||||
static readonly TableToolbarAction: typeof TableToolbarAction;
|
||||
static readonly TableToolbarContent: typeof TableToolbarContent;
|
||||
static readonly TableToolbarSearch: typeof TableToolbarSearch;
|
||||
static readonly TableToolbarMenu: typeof TableToolbarMenu;
|
||||
}
|
||||
|
||||
// endregion DataTable
|
||||
|
||||
export default DataTable;
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface InheritedProps extends React.TableHTMLAttributes<HTMLTableElement> { }
|
||||
|
||||
export interface TableProps extends InheritedProps {
|
||||
isSortable?: boolean,
|
||||
shouldShowBorder?: boolean,
|
||||
size?: "compact" | "normal" | "small" | "tall",
|
||||
useStaticWidth?: boolean,
|
||||
useZebraStyles?: boolean,
|
||||
}
|
||||
|
||||
declare const Table: React.FC<TableProps>;
|
||||
|
||||
export default Table;
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactDivAttr { }
|
||||
|
||||
export interface TableActionListProps extends InheritedProps { }
|
||||
|
||||
declare const TableActionList: React.FC<TableActionListProps>;
|
||||
|
||||
export default TableActionList;
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ButtonProps } from "../Button";
|
||||
|
||||
interface InheritedProps extends ButtonProps { }
|
||||
|
||||
export interface TableBatchActionProps extends InheritedProps { }
|
||||
|
||||
declare const TableBatchAction: React.FC<TableBatchActionProps>;
|
||||
|
||||
export default TableBatchAction;
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps, ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
export type TableBatchActionsTranslationKey = "carbon.table.batch.cancel" | "carbon.table.batch.items.selected" | "carbon.table.batch.item.selected";
|
||||
interface InheritedProps extends ReactDivAttr, InternationalProps<TableBatchActionsTranslationKey> { }
|
||||
|
||||
export interface TableBatchActionsProps extends InheritedProps {
|
||||
onCancel(event: React.MouseEvent<HTMLButtonElement>): void,
|
||||
shouldShowBatchActions?: boolean,
|
||||
totalSelected: number,
|
||||
}
|
||||
|
||||
interface TableBatchActionsFC extends React.FC<TableBatchActionsProps> {
|
||||
readonly translationKeys: ReadonlyArray<TableBatchActionsTranslationKey>;
|
||||
}
|
||||
|
||||
declare const TableBatchActions: TableBatchActionsFC;
|
||||
|
||||
export default TableBatchActions;
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAttr<HTMLTableSectionElement> { }
|
||||
|
||||
export interface TableBodyProps extends InheritedProps { }
|
||||
|
||||
declare const TableBody: React.FC<TableBodyProps>;
|
||||
|
||||
export default TableBody;
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface InheritedProps extends React.TdHTMLAttributes<HTMLTableDataCellElement> { }
|
||||
|
||||
export interface TableCellProps extends InheritedProps { }
|
||||
|
||||
declare const TableCell: React.FC<TableCellProps>;
|
||||
|
||||
export default TableCell;
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends Omit<ReactDivAttr, "title"> { }
|
||||
|
||||
export interface TableContainerProps extends InheritedProps {
|
||||
description?: React.ReactNode,
|
||||
title?: React.ReactNode,
|
||||
}
|
||||
|
||||
declare const TableContainer: React.FC<TableContainerProps>;
|
||||
|
||||
export default TableContainer;
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface InheritedProps extends React.ThHTMLAttributes<HTMLTableHeaderCellElement> { }
|
||||
|
||||
export interface TableExpandHeaderProps extends InheritedProps { }
|
||||
|
||||
declare const TableExpandHeader: React.FC<TableExpandHeaderProps>;
|
||||
|
||||
export default TableExpandHeader;
|
||||
@@ -0,0 +1,17 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAttr<HTMLTableRowElement> {
|
||||
ariaLabel: NonNullable<React.AriaAttributes["aria-label"]>,
|
||||
}
|
||||
|
||||
export interface TableExpandRowProps extends InheritedProps {
|
||||
expandHeader?: string,
|
||||
expandIconDescription?: string,
|
||||
isExpanded: boolean,
|
||||
onExpand(event: React.MouseEvent<HTMLButtonElement>): void,
|
||||
}
|
||||
|
||||
declare const TableExpandRow: React.FC<TableExpandRowProps>;
|
||||
|
||||
export default TableExpandRow;
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAttr<HTMLTableRowElement> { }
|
||||
|
||||
export interface TableExpandedRowProps extends InheritedProps {
|
||||
colSpan: number,
|
||||
}
|
||||
|
||||
declare const TableExpandedRow: React.FC<TableExpandedRowProps>;
|
||||
|
||||
export default TableExpandedRow;
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAttr<HTMLTableSectionElement> { }
|
||||
|
||||
export interface TableHeadProps extends InheritedProps { }
|
||||
|
||||
declare const TableHead: React.FC<TableHeadProps>;
|
||||
|
||||
export default TableHead;
|
||||
@@ -0,0 +1,25 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps, ReactButtonAttr } from "../../typings/shared";
|
||||
|
||||
export type TableHeaderTranslationKey = "carbon.table.header.icon.description";
|
||||
interface InheritedProps extends
|
||||
ReactButtonAttr,
|
||||
InternationalProps<TableHeaderTranslationKey>
|
||||
{
|
||||
scope?: React.ThHTMLAttributes<any>["scope"],
|
||||
}
|
||||
|
||||
export type SortDirection = "ascending" | "descending" | "none";
|
||||
export interface TableHeaderProps extends InheritedProps {
|
||||
isSortable?: boolean,
|
||||
isSortHeader?: boolean,
|
||||
sortDirection?: SortDirection,
|
||||
}
|
||||
|
||||
interface TableHeaderFC extends React.FC<TableHeaderProps> {
|
||||
readonly translationKeys: ReadonlyArray<TableHeaderTranslationKey>,
|
||||
}
|
||||
|
||||
declare const TableHeader: TableHeaderFC;
|
||||
|
||||
export default TableHeader;
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAttr<HTMLTableRowElement> { }
|
||||
|
||||
export interface TableRowProps extends InheritedProps { }
|
||||
|
||||
declare const TableRow: React.FC<TableRowProps>;
|
||||
|
||||
export default TableRow;
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
import { InlineCheckboxProps } from "../InlineCheckbox";
|
||||
|
||||
interface InheritedProps {
|
||||
ariaLabel?: InlineCheckboxProps["ariaLabel"], // required but has default value
|
||||
checked: NonNullable<InlineCheckboxProps["checked"]>,
|
||||
className?: ReactAttr["className"],
|
||||
id: NonNullable<InlineCheckboxProps["id"]>,
|
||||
indeterminate?: InlineCheckboxProps["indeterminate"],
|
||||
name: NonNullable<InlineCheckboxProps["name"]>
|
||||
onSelect: NonNullable<InlineCheckboxProps["onSelect"]>,
|
||||
}
|
||||
|
||||
export interface TableSelectAllProps extends InheritedProps { }
|
||||
|
||||
declare const TableSelectAll: React.FC<TableSelectAllProps>;
|
||||
|
||||
export default TableSelectAll;
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr, ReactInputAttr, RequiresIdProps } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends RequiresIdProps {
|
||||
ariaLabel?: React.AriaAttributes["aria-label"],
|
||||
checked: NonNullable<ReactInputAttr["checked"]>,
|
||||
className?: ReactAttr["className"],
|
||||
disabled?: ReactInputAttr["disabled"],
|
||||
name: NonNullable<ReactInputAttr["name"]>,
|
||||
}
|
||||
|
||||
export interface TableSelectRowProps extends InheritedProps {
|
||||
radio?: boolean,
|
||||
onSelect(event: React.MouseEvent<HTMLInputElement>): void,
|
||||
}
|
||||
|
||||
declare const TableSelectRow: React.FC<TableSelectRowProps>;
|
||||
|
||||
export default TableSelectRow;
|
||||
@@ -0,0 +1,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface TableToolbarProps { }
|
||||
|
||||
declare const TableToolbar: React.FC<TableToolbarProps>;
|
||||
|
||||
export default TableToolbar;
|
||||
@@ -0,0 +1,7 @@
|
||||
import * as React from "react";
|
||||
import { OverflowMenuItemAnchorProps, OverflowMenuItemButtonProps } from "../OverflowMenuItem";
|
||||
|
||||
export type AllTableToolbarActionProps = OverflowMenuItemAnchorProps | OverflowMenuItemButtonProps;
|
||||
declare const TableToolbarAction: React.FC<AllTableToolbarActionProps>;
|
||||
|
||||
export default TableToolbarAction;
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactDivAttr { }
|
||||
|
||||
export interface TableToolbarContentProps extends InheritedProps { }
|
||||
|
||||
declare const TableToolbarContent: React.FC<TableToolbarContentProps>;
|
||||
|
||||
export default TableToolbarContent;
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as React from "react";
|
||||
import { RequiresChildrenProps } from "../../typings/shared";
|
||||
import { OverflowMenuProps } from "../OverflowMenu";
|
||||
|
||||
interface InheritedProps extends
|
||||
Omit<OverflowMenuProps, "children">,
|
||||
RequiresChildrenProps
|
||||
{ }
|
||||
|
||||
export interface TableToolbarMenuProps extends InheritedProps { }
|
||||
|
||||
declare const TableToolbarMenu: React.FC<TableToolbarMenuProps>;
|
||||
|
||||
export default TableToolbarMenu;
|
||||
@@ -0,0 +1,25 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps, ReactAttr } from "../../typings/shared";
|
||||
import { SearchProps } from "../Search";
|
||||
|
||||
type ExcludedAttributes = "aria-hidden" | "labelText" | "small";
|
||||
export type TableToolbarTranslationKey = "carbon.table.toolbar.search.label" | "carbon.table.toolbar.search.placeholder";
|
||||
interface InheritedProps extends
|
||||
Omit<SearchProps, ExcludedAttributes>,
|
||||
InternationalProps<TableToolbarTranslationKey>
|
||||
{
|
||||
labelText?: React.ReactNode,
|
||||
}
|
||||
|
||||
export interface TableToolbarSearchProps extends InheritedProps {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
persistant?: boolean,
|
||||
persistent?: boolean,
|
||||
searchContainerClasses?: ReactAttr["className"],
|
||||
}
|
||||
|
||||
declare const TableToolbarSearch: React.FC<TableToolbarSearchProps>;
|
||||
|
||||
export default TableToolbarSearch;
|
||||
@@ -0,0 +1,68 @@
|
||||
import DataTable from "./DataTable";
|
||||
import Table from "./Table";
|
||||
import TableActionList from "./TableActionList";
|
||||
import TableBatchAction from "./TableBatchAction";
|
||||
import TableBatchActions from "./TableBatchActions";
|
||||
import TableBody from "./TableBody";
|
||||
import TableCell from "./TableCell";
|
||||
import TableContainer from "./TableContainer";
|
||||
import TableExpandedRow from "./TableExpandedRow";
|
||||
import TableExpandHeader from "./TableExpandHeader";
|
||||
import TableExpandRow from "./TableExpandRow";
|
||||
import TableHead from "./TableHead";
|
||||
import TableHeader from "./TableHeader";
|
||||
import TableRow from "./TableRow";
|
||||
import TableSelectAll from "./TableSelectAll";
|
||||
import TableSelectRow from "./TableSelectRow";
|
||||
import TableToolbar from "./TableToolbar";
|
||||
import TableToolbarAction from "./TableToolbarAction";
|
||||
import TableToolbarContent from "./TableToolbarContent";
|
||||
import TableToolbarMenu from "./TableToolbarMenu";
|
||||
import TableToolbarSearch from "./TableToolbarSearch";
|
||||
|
||||
export * from "./DataTable";
|
||||
export * from "./Table";
|
||||
export * from "./TableActionList";
|
||||
export * from "./TableBatchAction";
|
||||
export * from "./TableBatchActions";
|
||||
export * from "./TableBody";
|
||||
export * from "./TableCell";
|
||||
export * from "./TableContainer";
|
||||
export * from "./TableExpandHeader";
|
||||
export * from "./TableExpandRow";
|
||||
export * from "./TableExpandedRow";
|
||||
export * from "./TableHead";
|
||||
export * from "./TableHeader";
|
||||
export * from "./TableRow";
|
||||
export * from "./TableSelectAll";
|
||||
export * from "./TableSelectRow";
|
||||
export * from "./TableToolbar";
|
||||
export * from "./TableToolbarAction";
|
||||
export * from "./TableToolbarContent";
|
||||
export * from "./TableToolbarSearch";
|
||||
export * from "./TableToolbarMenu";
|
||||
|
||||
export {
|
||||
Table,
|
||||
TableActionList,
|
||||
TableBatchAction,
|
||||
TableBatchActions,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableExpandHeader,
|
||||
TableExpandRow,
|
||||
TableExpandedRow,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
TableSelectAll,
|
||||
TableSelectRow,
|
||||
TableToolbar,
|
||||
TableToolbarAction,
|
||||
TableToolbarContent,
|
||||
TableToolbarSearch,
|
||||
TableToolbarMenu,
|
||||
};
|
||||
|
||||
export default DataTable;
|
||||
@@ -0,0 +1,10 @@
|
||||
export type DataTableSortState = "ASC" | "DESC" | "NONE";
|
||||
|
||||
export type DataTableSortStates = Readonly<{
|
||||
ASC: Extract<DataTableSortState, "ASC">,
|
||||
DESC: Extract<DataTableSortState, "DESC">,
|
||||
NONE: Extract<DataTableSortState, "NONE">,
|
||||
}>;
|
||||
|
||||
export declare const sortStates: DataTableSortStates;
|
||||
export declare const initialSortState: Extract<DataTableSortState, "NONE">;
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import * as React from "react";
|
||||
import { ShapeOf } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends React.TableHTMLAttributes<HTMLTableElement> { }
|
||||
|
||||
export interface HeaderType {
|
||||
key?: string;
|
||||
header?: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface DataTableSkeletonProps extends InheritedProps {
|
||||
compact?: boolean;
|
||||
columnCount?: number;
|
||||
headers?: ReadonlyArray<string> | ReadonlyArray<ShapeOf<HeaderType>>;
|
||||
rowCount?: number;
|
||||
zebra?: boolean;
|
||||
}
|
||||
|
||||
declare const DataTableSkeleton: React.FC<DataTableSkeletonProps>;
|
||||
|
||||
export default DataTableSkeleton;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./DataTableSkeleton";
|
||||
export { default } from './DataTableSkeleton';
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps {
|
||||
id?: ReactAttr["id"],
|
||||
}
|
||||
|
||||
export interface DatePickerSkeletonProps extends InheritedProps {
|
||||
range?: boolean,
|
||||
}
|
||||
|
||||
declare const DatePickerSkeleton: React.FC<DatePickerSkeletonProps>;
|
||||
|
||||
export default DatePickerSkeleton;
|
||||
@@ -0,0 +1,25 @@
|
||||
import { key as LocaleKey } from "flatpickr/dist/types/locale";
|
||||
import { DateOption, Hook } from "flatpickr/dist/types/options";
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr, ThemeProps } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends
|
||||
Omit<ReactDivAttr, "onChange">,
|
||||
ThemeProps
|
||||
{ }
|
||||
|
||||
export interface DatePickerProps extends InheritedProps {
|
||||
appendTo?: string | HTMLElement,
|
||||
dateFormat?: string,
|
||||
datePickerType?: "range" | "single" | "simple",
|
||||
locale?: LocaleKey,
|
||||
maxDate?: DateOption,
|
||||
minDate?: DateOption,
|
||||
onChange?: Hook,
|
||||
short?: boolean,
|
||||
value?: DateOption | DateOption[],
|
||||
}
|
||||
|
||||
declare class DatePicker extends React.Component<DatePickerProps> { }
|
||||
|
||||
export default DatePicker;
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./DatePicker";
|
||||
export * from "./DatePicker.Skeleton";
|
||||
export { default } from './DatePicker';
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactInputAttr, RequiresIdProps, ValidityProps } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends
|
||||
Omit<ReactInputAttr, "className" | "id">,
|
||||
EmbeddedIconProps,
|
||||
RequiresIdProps,
|
||||
ValidityProps
|
||||
{ }
|
||||
|
||||
export interface DatePickerInputProps extends InheritedProps {
|
||||
labelText: NonNullable<React.ReactNode>,
|
||||
openCalendar?: React.MouseEventHandler,
|
||||
pattern?: string,
|
||||
}
|
||||
|
||||
declare class DatePickerInput extends React.Component<DatePickerInputProps> { }
|
||||
|
||||
export default DatePickerInput;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./DatePickerInput";
|
||||
export { default } from './DatePickerInput';
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface DropdownSkeletonProps {
|
||||
inline?: boolean,
|
||||
}
|
||||
|
||||
declare const DropdownSkeleton: React.FC<DropdownSkeletonProps>;
|
||||
|
||||
export default DropdownSkeleton;
|
||||
@@ -0,0 +1,33 @@
|
||||
import * as React from "react";
|
||||
import { DownshiftTypedProps, InternationalProps, ReactInputAttr, ThemeProps, ValidityProps } from "../../typings/shared";
|
||||
import { ListBoxProps } from "../ListBox";
|
||||
import { ListBoxMenuIconTranslationKey } from "../ListBox/ListBoxMenuIcon";
|
||||
|
||||
interface InheritedProps<ItemType> extends
|
||||
DownshiftTypedProps<ItemType>,
|
||||
InternationalProps<ListBoxMenuIconTranslationKey>,
|
||||
ThemeProps,
|
||||
ValidityProps
|
||||
{
|
||||
ariaLabel: React.AriaAttributes["aria-label"],
|
||||
disabled?: ReactInputAttr["disabled"],
|
||||
type?: ListBoxProps["type"],
|
||||
}
|
||||
|
||||
export interface OnChangeData<ItemType = string> {
|
||||
selectedItem?: ItemType;
|
||||
}
|
||||
|
||||
export interface DropdownProps<ItemType = string> extends InheritedProps<ItemType> {
|
||||
initialSelectedItem?: ItemType,
|
||||
inline?: boolean,
|
||||
helperText?: React.ReactNode,
|
||||
items: ItemType[],
|
||||
itemToElement?(item: ItemType): React.ComponentType<any>,
|
||||
label: NonNullable<React.ReactNode>,
|
||||
onChange?(data: OnChangeData<ItemType>): void,
|
||||
selectedItem?: ItemType,
|
||||
titleText: NonNullable<React.ReactNode>,
|
||||
}
|
||||
|
||||
export default class Dropdown<ItemType = string> extends React.Component<DropdownProps<ItemType>> { }
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./Dropdown";
|
||||
export * from "./Dropdown.Skeleton";
|
||||
export { default } from './Dropdown';
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface FileUploaderSkeletonProps { }
|
||||
|
||||
declare class FileUploaderSkeleton extends React.Component<FileUploaderSkeletonProps> { }
|
||||
|
||||
export default FileUploaderSkeleton;
|
||||
@@ -0,0 +1,69 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactDivAttr, ReactInputAttr, ReactLabelAttr } from "../../typings/shared";
|
||||
import { ButtonKind } from "../Button";
|
||||
|
||||
interface SharedProps {
|
||||
accept?: string[],
|
||||
buttonKind?: ButtonKind,
|
||||
disabled?: ReactInputAttr["disabled"],
|
||||
disableLabelChanges?: boolean,
|
||||
labelText?: string
|
||||
listFiles?: boolean,
|
||||
multiple?: boolean,
|
||||
}
|
||||
|
||||
export type FileStatus = "complete" | "edit" | "uploading";
|
||||
|
||||
// FileUploaderButton
|
||||
|
||||
interface FileUploaderButtonInheritedProps extends
|
||||
Omit<ReactLabelAttr, "onChange">,
|
||||
SharedProps
|
||||
{
|
||||
onChange?(event: React.ChangeEvent<HTMLInputElement>): void,
|
||||
}
|
||||
|
||||
export interface FileUploaderButtonProps extends FileUploaderButtonInheritedProps { }
|
||||
|
||||
export declare class FileUploaderButton extends React.Component<FileUploaderButtonProps> { }
|
||||
|
||||
// Filename
|
||||
|
||||
interface FilenameDivInheritedProps extends ReactDivAttr { }
|
||||
interface FilenameIconInheritedProps extends
|
||||
React.SVGAttributes<SVGSVGElement>,
|
||||
EmbeddedIconProps
|
||||
{ }
|
||||
|
||||
export interface FilenameDivProps extends FilenameDivInheritedProps {
|
||||
status: Extract<FileStatus, "uploading">,
|
||||
}
|
||||
|
||||
export interface FilenameIconProps extends FilenameIconInheritedProps {
|
||||
status: Extract<FileStatus, "complete" | "edit">,
|
||||
}
|
||||
|
||||
export interface FilenameEmptyProps extends FilenameDivInheritedProps {
|
||||
status?: null;
|
||||
}
|
||||
|
||||
export type AllFilenameProps = FilenameDivProps | FilenameIconProps | FilenameEmptyProps;
|
||||
export declare class Filename extends React.Component<AllFilenameProps> { }
|
||||
|
||||
// FileUploader
|
||||
|
||||
interface FileUploaderInheritedProps extends
|
||||
Omit<ReactLabelAttr, "onChange">,
|
||||
EmbeddedIconProps,
|
||||
SharedProps
|
||||
{ }
|
||||
|
||||
export interface FileUploaderProps extends FileUploaderInheritedProps {
|
||||
buttonLabel?: string,
|
||||
filenameStatus?: FileStatus, // required but has default value
|
||||
labelDescription?: string,
|
||||
}
|
||||
|
||||
export declare class FileUploader extends React.Component<FileUploaderProps> { }
|
||||
|
||||
export default FileUploader;
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./FileUploader";
|
||||
export * from "./FileUploader.Skeleton";
|
||||
export { default } from './FileUploader';
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface InheritedProps extends React.FormHTMLAttributes<HTMLFormElement> { }
|
||||
|
||||
export interface FormProps extends InheritedProps { }
|
||||
|
||||
declare const Form: React.FC<FormProps>;
|
||||
|
||||
export default Form;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./Form";
|
||||
export { default } from './Form';
|
||||
@@ -0,0 +1,16 @@
|
||||
import * as React from "react";
|
||||
import { ValidityProps } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends React.FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
||||
invalid?: ValidityProps["invalid"],
|
||||
}
|
||||
|
||||
export interface FormGroupProps extends InheritedProps {
|
||||
legendText: string,
|
||||
message?: boolean,
|
||||
messageText?: string,
|
||||
}
|
||||
|
||||
declare const FormGroup: React.FC<FormGroupProps>;
|
||||
|
||||
export default FormGroup;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./FormGroup";
|
||||
export { default } from './FormGroup';
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactDivAttr { }
|
||||
|
||||
export interface FormItemProps extends InheritedProps { }
|
||||
|
||||
declare const FormItem: React.FC<FormItemProps>;
|
||||
|
||||
export default FormItem;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./FormItem";
|
||||
export { default } from './FormItem';
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactLabelAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends Omit<ReactLabelAttr, "htmlFor"> { }
|
||||
|
||||
export interface FormLabelProps extends InheritedProps { }
|
||||
|
||||
declare const FormLabel: React.FC<FormLabelProps>;
|
||||
|
||||
export default FormLabel;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./FormLabel";
|
||||
export { default } from './FormLabel';
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import { ReactAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps {
|
||||
style?: ReactAttr["style"],
|
||||
}
|
||||
|
||||
export interface IconSkeletonProps extends InheritedProps { }
|
||||
|
||||
declare const IconSkeleton: React.FC<IconSkeletonProps>;
|
||||
|
||||
export default IconSkeleton;
|
||||
@@ -0,0 +1,34 @@
|
||||
import * as React from "react";
|
||||
|
||||
type SVGAttr = React.SVGAttributes<SVGSVGElement>;
|
||||
|
||||
interface SVGInheritedProps {
|
||||
className?: SVGAttr["className"],
|
||||
fill?: SVGAttr["fill"],
|
||||
fillRule?: SVGAttr["fillRule"],
|
||||
height?: SVGAttr["height"],
|
||||
role?: SVGAttr["role"],
|
||||
style?: SVGAttr["style"],
|
||||
viewBox?: SVGAttr["viewBox"],
|
||||
width?: SVGAttr["width"],
|
||||
}
|
||||
|
||||
export interface IconData {
|
||||
width?: string;
|
||||
height?: string;
|
||||
viewBox: string;
|
||||
svgData: any;
|
||||
}
|
||||
|
||||
export interface IconProps extends SVGInheritedProps {
|
||||
description: string,
|
||||
icon?: IconData,
|
||||
iconRef?: React.Ref<HTMLElement>,
|
||||
iconTitle?: string
|
||||
}
|
||||
|
||||
declare const Icon: React.FC<IconProps>;
|
||||
|
||||
// TODO: icons
|
||||
|
||||
export default Icon;
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./Icon";
|
||||
export * from "./Icon.Skeleton";
|
||||
export { default } from "./Icon";
|
||||
@@ -0,0 +1,21 @@
|
||||
import * as React from "react";
|
||||
import { ReactInputAttr, RequiresIdProps } from "../../typings/shared";
|
||||
|
||||
type ExcludedAttributes = "aria-label" | "className" | "id" | "onChange" | "ref" | "type";
|
||||
|
||||
interface InheritedProps extends
|
||||
Omit<ReactInputAttr, ExcludedAttributes>,
|
||||
RequiresIdProps
|
||||
{
|
||||
ariaLabel?: ReactInputAttr["aria-label"],
|
||||
}
|
||||
|
||||
export interface InlineCheckboxProps extends InheritedProps {
|
||||
indeterminate?: boolean,
|
||||
innerRef?: React.Ref<HTMLInputElement>;
|
||||
onChange?(checked: boolean, id: string, event: React.ChangeEvent<HTMLInputElement>): void,
|
||||
}
|
||||
|
||||
declare const InlineCheckbox: React.RefForwardingComponent<HTMLInputElement, InlineCheckboxProps>;
|
||||
|
||||
export default InlineCheckbox;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./InlineCheckbox";
|
||||
export { default } from './InlineCheckbox';
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactDivAttr, EmbeddedIconProps { }
|
||||
|
||||
export interface InlineLoadingProps extends InheritedProps {
|
||||
description?: string,
|
||||
onSuccess?(): void,
|
||||
success?: boolean,
|
||||
successDelay?: number,
|
||||
}
|
||||
|
||||
declare const InlineLoading: React.FC<InlineLoadingProps>;
|
||||
|
||||
export default InlineLoading;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./InlineLoading";
|
||||
export { default } from './InlineLoading';
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as React from "react";
|
||||
import { ReactAnchorAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactAnchorAttr { }
|
||||
|
||||
export interface LinkProps extends InheritedProps {
|
||||
disabled?: boolean,
|
||||
}
|
||||
|
||||
declare const Link: React.FC<LinkProps>;
|
||||
|
||||
export default Link;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./Link";
|
||||
export { default } from './Link';
|
||||
@@ -0,0 +1,29 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
import { ListBoxFieldComponent } from "./ListBoxField";
|
||||
import { ListBoxMenuComponent } from "./ListBoxMenu";
|
||||
import { ListBoxMenuIconComponent } from "./ListBoxMenuIcon";
|
||||
import { ListBoxMenuItemComponent } from "./ListBoxMenuItem";
|
||||
import { ListBoxType } from "./ListBoxPropTypes";
|
||||
import { ListBoxSelectionComponent } from "./ListBoxSelection";
|
||||
|
||||
type ExcludedAttributes = "onKeyDown" | "onKeyPress" | "ref" | "role" | "tabIndex";
|
||||
interface InheritedProps extends Omit<ReactDivAttr, ExcludedAttributes> { }
|
||||
|
||||
export interface ListBoxProps extends InheritedProps {
|
||||
disabled?: boolean, // required but has default value
|
||||
innerRef?: React.Ref<HTMLDivElement>, // required but has default value
|
||||
type?: ListBoxType, // required but has default value
|
||||
}
|
||||
|
||||
export interface ListBoxComponent extends React.FC<ListBoxProps> {
|
||||
readonly Field: ListBoxFieldComponent,
|
||||
readonly Menu: ListBoxMenuComponent,
|
||||
readonly MenuIcon: ListBoxMenuIconComponent,
|
||||
readonly MenuItem: ListBoxMenuItemComponent,
|
||||
readonly Selection: ListBoxSelectionComponent,
|
||||
}
|
||||
|
||||
declare const ListBox: ListBoxComponent;
|
||||
|
||||
export default ListBox;
|
||||
@@ -0,0 +1,17 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps, ReactDivAttr, RequiresIdProps } from "../../typings/shared";
|
||||
|
||||
export type ListBoxFieldTranslationKey = "close.menu" | "open.menu";
|
||||
interface InheritedProps extends
|
||||
Omit<ReactDivAttr, "id">,
|
||||
InternationalProps<ListBoxFieldTranslationKey>,
|
||||
RequiresIdProps
|
||||
{ }
|
||||
|
||||
export interface ListBoxFieldProps extends InheritedProps { }
|
||||
|
||||
export interface ListBoxFieldComponent extends React.FC<ListBoxFieldProps> { }
|
||||
|
||||
declare const ListBoxField: ListBoxFieldComponent;
|
||||
|
||||
export default ListBoxField;
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr, RequiresIdProps } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends
|
||||
Omit<ReactDivAttr, "id">,
|
||||
RequiresIdProps
|
||||
{ }
|
||||
|
||||
export interface ListBoxMenuProps extends InheritedProps { }
|
||||
|
||||
export interface ListBoxMenuComponent extends React.FC<ListBoxMenuProps> { }
|
||||
|
||||
declare const ListBoxMenu: ListBoxMenuComponent;
|
||||
|
||||
export default ListBoxMenu;
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps } from "../../typings/shared";
|
||||
|
||||
export type ListBoxMenuIconTranslationKey = "close.menu" | "open.menu";
|
||||
interface InheritedProps extends InternationalProps<ListBoxMenuIconTranslationKey> { }
|
||||
|
||||
export interface ListBoxMenuIconProps extends InheritedProps {
|
||||
isOpen: boolean,
|
||||
}
|
||||
|
||||
export interface ListBoxMenuIconComponent extends React.FC<ListBoxMenuIconProps> { }
|
||||
|
||||
declare const ListBoxMenuIcon: ListBoxMenuIconComponent;
|
||||
|
||||
export default ListBoxMenuIcon;
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactDivAttr { }
|
||||
|
||||
export interface ListBoxMenuItemProps extends InheritedProps {
|
||||
isActive?: boolean, // required but has default value
|
||||
isHighlighted?: boolean, // required but has default value
|
||||
}
|
||||
|
||||
export interface ListBoxMenuItemComponent extends React.FC<ListBoxMenuItemProps> { }
|
||||
|
||||
declare const ListBoxMenuItem: ListBoxMenuItemComponent;
|
||||
|
||||
export default ListBoxMenuItem;
|
||||
@@ -0,0 +1 @@
|
||||
export type ListBoxType = "default" | "inline";
|
||||
@@ -0,0 +1,16 @@
|
||||
import * as React from "react";
|
||||
import { InternationalProps } from "../../typings/shared";
|
||||
|
||||
export type ListBoxSelectionTranslationKey = "clear.all" | "clear.selection";
|
||||
interface InheritedProps extends InternationalProps<ListBoxSelectionTranslationKey> { }
|
||||
|
||||
export interface ListBoxSelectionProps extends InheritedProps {
|
||||
clearSelection(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>): void,
|
||||
selectionCount?: number,
|
||||
}
|
||||
|
||||
export interface ListBoxSelectionComponent extends React.FC<ListBoxSelectionProps> { }
|
||||
|
||||
declare const ListBoxSelection: ListBoxSelectionComponent;
|
||||
|
||||
export default ListBoxSelection;
|
||||
@@ -0,0 +1,5 @@
|
||||
import * as PropTypes from "./ListBoxPropTypes";
|
||||
|
||||
export * from "./ListBox";
|
||||
export { PropTypes };
|
||||
export { default } from './ListBox';
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as React from "react";
|
||||
import { ReactLIAttr } from "../../typings/shared";
|
||||
|
||||
interface InheritedProps extends ReactLIAttr { }
|
||||
|
||||
export interface ListItemProps extends InheritedProps { }
|
||||
|
||||
declare const ListItem: React.FC<ListItemProps>;
|
||||
|
||||
export default ListItem;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./ListItem";
|
||||
export { default } from './ListItem';
|
||||
@@ -0,0 +1,18 @@
|
||||
import * as React from "react";
|
||||
import { ReactDivAttr, SizingProps } from "../../typings/shared";
|
||||
|
||||
type ExcludedAttributes = "aria-label" | "aria-live";
|
||||
interface InheritedProps extends
|
||||
Omit<ReactDivAttr, ExcludedAttributes>,
|
||||
SizingProps
|
||||
{ }
|
||||
|
||||
export interface LoadingProps extends InheritedProps {
|
||||
active?: boolean,
|
||||
description?: string,
|
||||
withOverlay?: boolean,
|
||||
}
|
||||
|
||||
declare class Loading extends React.Component<LoadingProps> { }
|
||||
|
||||
export default Loading;
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from "./Loading";
|
||||
export { default } from './Loading';
|
||||
@@ -0,0 +1,31 @@
|
||||
import * as React from "react";
|
||||
import { EmbeddedIconProps, ReactDivAttr } from "../../typings/shared";
|
||||
|
||||
type ExcludedAttributes = "role" | "tabIndex" | "onBlur" | "onClick" | "onKeyDown" | "onTransitionEnd" | "ref";
|
||||
interface InheritedProps extends
|
||||
Omit<ReactDivAttr, ExcludedAttributes>,
|
||||
EmbeddedIconProps
|
||||
{ }
|
||||
|
||||
export interface ModalProps extends InheritedProps {
|
||||
danger?: boolean,
|
||||
focusTrap?: boolean,
|
||||
modalAriaLabel?: string,
|
||||
modalHeading?: React.ReactNode,
|
||||
modalLabel?: React.ReactNode,
|
||||
open?: boolean,
|
||||
onRequestClose?(event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLDivElement>): void,
|
||||
onRequestSubmit?(event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLDivElement>): void,
|
||||
onSecondarySubmit?: ModalProps["onRequestClose"],
|
||||
passiveModal?: boolean,
|
||||
primaryButtonDisabled?: boolean,
|
||||
primaryButtonText?: string,
|
||||
secondaryButtonText?: string,
|
||||
selectorPrimaryFocus?: string,
|
||||
selectorsFloatingMenus?: string[],
|
||||
shouldSubmitOnEnter?: boolean,
|
||||
}
|
||||
|
||||
declare class Modal extends React.Component<ModalProps> { }
|
||||
|
||||
export default Modal;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user