mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 13:30:28 +00:00
[baseui] remove types (#36846)
This commit is contained in:
committed by
Armando Aguirre
parent
59b76c351e
commit
d4385135b0
@@ -216,6 +216,12 @@
|
||||
"sourceRepoURL": "https://github.com/brianloveswords/base64url",
|
||||
"asOfVersion": "2.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "baseui",
|
||||
"typingsPackageName": "baseui",
|
||||
"sourceRepoURL": "https://github.com/uber-web/baseui",
|
||||
"asOfVersion": "8.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "beeper",
|
||||
"typingsPackageName": "beeper",
|
||||
|
||||
Vendored
-101
@@ -1,101 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
expand: 'expand';
|
||||
}
|
||||
|
||||
export interface AccordionOverrides<T> {
|
||||
Root?: Override<T>;
|
||||
}
|
||||
|
||||
export interface SharedProps {
|
||||
$color?: string;
|
||||
$disabled?: boolean;
|
||||
$expanded?: boolean;
|
||||
$size?: string | number;
|
||||
}
|
||||
|
||||
export type StateReducer<T> = (
|
||||
stateChangeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
|
||||
nextState: T,
|
||||
currentState: T,
|
||||
) => T;
|
||||
|
||||
export interface AccordionProps {
|
||||
accordion?: boolean;
|
||||
children: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
initialState?: AccordionState;
|
||||
onChange?: (args: { expanded: React.Key[] }) => any;
|
||||
overrides?: AccordionOverrides<SharedProps & {$expanded?: never}>;
|
||||
stateReducer?: StateReducer<AccordionState>;
|
||||
}
|
||||
|
||||
export interface AccordionState {
|
||||
expanded: React.Key[];
|
||||
}
|
||||
|
||||
export class Accordion extends React.Component<AccordionProps, AccordionState> {
|
||||
onPanelChange(key: React.Key, onChange: () => any, ...args: any): void;
|
||||
internalSetState(type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: AccordionState): void;
|
||||
getItems(): React.ReactNode;
|
||||
}
|
||||
|
||||
export interface PanelOverrides<T> {
|
||||
PanelContainer?: Override<T>;
|
||||
Header?: Override<T>;
|
||||
ToggleIcon?: Override<T>;
|
||||
Content?: Override<T>;
|
||||
}
|
||||
|
||||
export interface SharedPanelProps {
|
||||
children: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
key?: React.Key;
|
||||
onChange?: (args: {expanded: boolean}) => any;
|
||||
onClick?: (e: Event) => any;
|
||||
onKeyDown?: (e: KeyboardEvent) => any;
|
||||
overrides?: PanelOverrides<SharedProps>;
|
||||
title?: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface SharedStatefulPanelContainerProps {
|
||||
initialState?: PanelState;
|
||||
onChange?: (args: { expanded: boolean}) => any;
|
||||
stateReducer?: StateReducer<PanelState>;
|
||||
}
|
||||
|
||||
export type PanelProps = SharedPanelProps & { expanded?: boolean; };
|
||||
|
||||
export class Panel extends React.Component<PanelProps> {
|
||||
onClick(e: Event): void;
|
||||
onKeyDown(e: KeyboardEvent): void;
|
||||
getSharedProps(): SharedProps;
|
||||
}
|
||||
|
||||
export type StatefulPanelProps = SharedPanelProps & SharedStatefulPanelContainerProps;
|
||||
|
||||
export const StatefulPanel: React.FC<StatefulPanelProps>;
|
||||
|
||||
export type StatefulPanelContainerProps = SharedStatefulPanelContainerProps & {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
export interface PanelState {
|
||||
expanded: boolean;
|
||||
}
|
||||
|
||||
export class StatefulPanelContainer extends React.Component<StatefulPanelContainerProps, PanelState> {
|
||||
onChange(args: any): void;
|
||||
internalSetState(type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: PanelState): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledPanelContainer: StyletronComponent<any>;
|
||||
export const StyledHeader: StyletronComponent<any>;
|
||||
export const StyledContent: StyletronComponent<any>;
|
||||
export const StyledToggleIcon: StyletronComponent<any>;
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
Vendored
-33
@@ -1,33 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface AvatarOverrides<T> {
|
||||
Avatar?: Override<T>;
|
||||
Initials?: Override<T>;
|
||||
Root?: Override<T>;
|
||||
}
|
||||
|
||||
export interface StyleProps {
|
||||
$didImageFailToLoad: boolean;
|
||||
$size?: string;
|
||||
}
|
||||
|
||||
export interface AvatarProps {
|
||||
name: string;
|
||||
overrides?: AvatarOverrides<StyleProps>;
|
||||
size?: string;
|
||||
src?: string;
|
||||
}
|
||||
|
||||
export interface AvatarState {
|
||||
noImageAvailable: boolean;
|
||||
}
|
||||
|
||||
export class Avatar extends React.Component<AvatarProps, AvatarState> {
|
||||
handleError(): void;
|
||||
}
|
||||
|
||||
export const StyledAvatar: StyletronComponent<any>;
|
||||
export const StyledInitials: StyletronComponent<any>;
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
-306
@@ -1,306 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
|
||||
export type Responsive<T> = T | T[];
|
||||
|
||||
export type AlignContent =
|
||||
| 'center'
|
||||
| 'start'
|
||||
| 'end'
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
| 'normal'
|
||||
| 'baseline'
|
||||
| 'first baseline'
|
||||
| 'last baseline'
|
||||
| 'space-between'
|
||||
| 'space-around'
|
||||
| 'space-evenly'
|
||||
| 'stretch'
|
||||
| 'safe center'
|
||||
| 'unsafe center'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type AlignItems =
|
||||
| 'normal'
|
||||
| 'stretch'
|
||||
| 'center'
|
||||
| 'start'
|
||||
| 'end'
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
| 'self-start'
|
||||
| 'self-end'
|
||||
| 'baseline'
|
||||
| 'first baseline'
|
||||
| 'last baseline'
|
||||
| 'safe center'
|
||||
| 'unsafe center'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type AlignSelf =
|
||||
| 'auto'
|
||||
| 'normal'
|
||||
| 'center'
|
||||
| 'start'
|
||||
| 'end'
|
||||
| 'self-start'
|
||||
| 'self-end'
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
| 'baseline'
|
||||
| 'first baseline'
|
||||
| 'last baseline'
|
||||
| 'stretch'
|
||||
| 'safe center'
|
||||
| 'unsafe center'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type FlexDirection =
|
||||
| 'row'
|
||||
| 'row-reverse'
|
||||
| 'column'
|
||||
| 'column-reverse'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type Flex = number | string;
|
||||
|
||||
export type Display =
|
||||
| 'block'
|
||||
| 'inline'
|
||||
| 'run-in'
|
||||
| 'flow'
|
||||
| 'flow-root'
|
||||
| 'table'
|
||||
| 'flex'
|
||||
| 'grid'
|
||||
| 'ruby'
|
||||
| 'block flow'
|
||||
| 'inline table'
|
||||
| 'flex run-in'
|
||||
| 'list-item'
|
||||
| 'list-item block'
|
||||
| 'list-item inline'
|
||||
| 'list-item flow'
|
||||
| 'list-item flow-root'
|
||||
| 'list-item block flow'
|
||||
| 'list-item block flow-root'
|
||||
| 'flow list-item block'
|
||||
| 'table-row-group'
|
||||
| 'table-header-group'
|
||||
| 'table-footer-group'
|
||||
| 'table-row'
|
||||
| 'table-cell'
|
||||
| 'table-column-group'
|
||||
| 'table-column'
|
||||
| 'table-caption'
|
||||
| 'ruby-base'
|
||||
| 'ruby-text'
|
||||
| 'ruby-base-container'
|
||||
| 'ruby-text-container'
|
||||
| 'contents'
|
||||
| 'none'
|
||||
| 'inline-block'
|
||||
| 'inline-table'
|
||||
| 'inline-flex'
|
||||
| 'inline-grid'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type GridAutoFlow =
|
||||
| 'row'
|
||||
| 'column'
|
||||
| 'dense'
|
||||
| 'row dense'
|
||||
| 'column dense'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type JustifyContent =
|
||||
| 'center'
|
||||
| 'start'
|
||||
| 'end'
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
| 'left'
|
||||
| 'right'
|
||||
| 'space-between'
|
||||
| 'space-around'
|
||||
| 'space-evenly'
|
||||
| 'stretch'
|
||||
| 'safe center'
|
||||
| 'unsafe center'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type JustifyItems =
|
||||
/* Basic keywords */
|
||||
| 'auto'
|
||||
| 'normal'
|
||||
| 'stretch'
|
||||
| 'center'
|
||||
| 'start'
|
||||
| 'end'
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
| 'self-start'
|
||||
| 'self-end'
|
||||
| 'left'
|
||||
| 'right'
|
||||
| 'baseline'
|
||||
| 'first baseline'
|
||||
| 'last baseline'
|
||||
| 'safe center'
|
||||
| 'unsafe center'
|
||||
| 'legacy right'
|
||||
| 'legacy left'
|
||||
| 'legacy center'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type JustifySelf =
|
||||
| 'auto'
|
||||
| 'normal'
|
||||
| 'stretch'
|
||||
| 'center'
|
||||
| 'start'
|
||||
| 'end'
|
||||
| 'flex-start'
|
||||
| 'flex-end'
|
||||
| 'self-start'
|
||||
| 'self-end'
|
||||
| 'left'
|
||||
| 'right'
|
||||
| 'baseline'
|
||||
| 'first baseline'
|
||||
| 'last baseline'
|
||||
| 'safe center'
|
||||
| 'unsafe center'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type Position = 'static' | 'absolute' | 'relative' | 'fixed' | 'sticky';
|
||||
|
||||
export type Overflow =
|
||||
| 'visible'
|
||||
| 'hidden'
|
||||
| 'scroll'
|
||||
| 'scrollX'
|
||||
| 'scrollY'
|
||||
| 'auto'
|
||||
| 'inherit'
|
||||
| 'initial'
|
||||
| 'unset';
|
||||
|
||||
export type Scale = 0 | string;
|
||||
|
||||
export interface BlockOverrides {
|
||||
Block?: Override<any>;
|
||||
}
|
||||
|
||||
export interface BlockProps {
|
||||
children?: React.ReactNode;
|
||||
as?: React.ElementType;
|
||||
overrides?: BlockOverrides;
|
||||
color?: Responsive<string>;
|
||||
backgroundColor?: Responsive<string>;
|
||||
font?: string | string[];
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/align-content */
|
||||
alignContent?: Responsive<AlignContent>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/align-items */
|
||||
alignItems?: Responsive<AlignItems>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/align-self */
|
||||
alignSelf?: Responsive<AlignSelf>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction */
|
||||
flexDirection?: Responsive<FlexDirection>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/display */
|
||||
display?: Responsive<Display>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/flex */
|
||||
flex?: Responsive<Flex>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid */
|
||||
grid?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area */
|
||||
gridArea?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns */
|
||||
gridAutoColumns?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow */
|
||||
gridAutoFlow?: Responsive<GridAutoFlow>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows */
|
||||
gridAutoRows?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column */
|
||||
gridColumn?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end */
|
||||
gridColumnEnd?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-gap */
|
||||
gridColumnGap?: Responsive<Scale>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start */
|
||||
gridColumnStart?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-gap */
|
||||
gridGap?: Responsive<Scale>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row */
|
||||
gridRow?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end */
|
||||
gridRowEnd?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-gap */
|
||||
gridRowGap?: Responsive<Scale>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start */
|
||||
gridRowStart?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template */
|
||||
gridTemplate?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas */
|
||||
gridTemplateAreas?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns */
|
||||
gridTemplateColumns?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows */
|
||||
gridTemplateRows?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content */
|
||||
justifyContent?: Responsive<JustifyContent>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items */
|
||||
justifyItems?: Responsive<JustifyItems>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self */
|
||||
justifySelf?: Responsive<JustifySelf>;
|
||||
position?: Responsive<Position>;
|
||||
width?: Responsive<Scale>;
|
||||
minWidth?: Responsive<Scale>;
|
||||
maxWidth?: Responsive<Scale>;
|
||||
height?: Responsive<Scale>;
|
||||
minHeight?: Responsive<Scale>;
|
||||
maxHeight?: Responsive<Scale>;
|
||||
overflow?: Responsive<Overflow>;
|
||||
margin?: Responsive<Scale>;
|
||||
marginTop?: Responsive<Scale>;
|
||||
marginRight?: Responsive<Scale>;
|
||||
marginBottom?: Responsive<Scale>;
|
||||
marginLeft?: Responsive<Scale>;
|
||||
padding?: Responsive<Scale>;
|
||||
paddingTop?: Responsive<Scale>;
|
||||
paddingRight?: Responsive<Scale>;
|
||||
paddingBottom?: Responsive<Scale>;
|
||||
paddingLeft?: Responsive<Scale>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/place-content */
|
||||
placeContent?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/place-items */
|
||||
placeItems?: Responsive<string>;
|
||||
/** available values: https://developer.mozilla.org/en-US/docs/Web/CSS/place-self */
|
||||
placeSelf?: Responsive<string>;
|
||||
flexWrap?: Responsive<boolean>;
|
||||
left?: Responsive<Scale>;
|
||||
top?: Responsive<Scale>;
|
||||
right?: Responsive<Scale>;
|
||||
bottom?: Responsive<Scale>;
|
||||
}
|
||||
|
||||
export const Block: React.FC<BlockProps>;
|
||||
Vendored
-20
@@ -1,20 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface BreadcrumbsOverrides {
|
||||
Root?: Override<any>;
|
||||
Separator?: Override<any>;
|
||||
Icon?: Override<any>;
|
||||
}
|
||||
|
||||
export interface BreadcrumbsProps {
|
||||
children?: React.ReactNode;
|
||||
overrides?: BreadcrumbsOverrides;
|
||||
ariaLabel?: string;
|
||||
}
|
||||
|
||||
export const Breadcrumbs: React.FC<BreadcrumbsProps>;
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledSeparator: StyletronComponent<any>;
|
||||
Vendored
-55
@@ -1,55 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyledFn, StyletronComponent } from 'styletron-react';
|
||||
import { SHAPE, SIZE } from '../button';
|
||||
|
||||
export interface MODE {
|
||||
checkbox: 'checkbox';
|
||||
radio: 'radio';
|
||||
}
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
|
||||
export interface ButtonGroupOverrides {
|
||||
Root?: Override<any>;
|
||||
}
|
||||
|
||||
export interface ButtonGroupProps {
|
||||
ariaLabel?: string;
|
||||
children: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
mode?: MODE[keyof MODE];
|
||||
onClick?: (event: React.MouseEventHandler<HTMLButtonElement>) => any;
|
||||
overrides?: ButtonGroupOverrides;
|
||||
selected?: number | number[];
|
||||
shape?: SHAPE[keyof SHAPE];
|
||||
size?: SIZE[keyof SIZE];
|
||||
}
|
||||
|
||||
export const ButtonGroup: React.FC<ButtonGroupProps>;
|
||||
|
||||
export interface InitialState {
|
||||
selected: number | number[];
|
||||
}
|
||||
|
||||
export interface State {
|
||||
selected: number[];
|
||||
}
|
||||
|
||||
export interface StatefulButtonGroupProps extends ButtonGroupProps {
|
||||
initialState?: InitialState;
|
||||
stateReducer?: (stateType: STATE_CHANGE_TYPE, nextState: State, currentState: State) => State;
|
||||
}
|
||||
|
||||
export const StatefulButtonGroup: React.FC<StatefulButtonGroupProps>;
|
||||
|
||||
export class StatefulContainer extends React.Component<StatefulButtonGroupProps, State> {
|
||||
changeState(nextState: State): void;
|
||||
onClick(event: React.MouseEventHandler<HTMLButtonElement>, index: number): void;
|
||||
}
|
||||
|
||||
export const MODE: MODE;
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
Vendored
-58
@@ -1,58 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyledFn, StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface KIND {
|
||||
primary: 'primary';
|
||||
secondary: 'secondary';
|
||||
tertiary: 'tertiary';
|
||||
minimal: 'minimal';
|
||||
}
|
||||
|
||||
export interface SIZE {
|
||||
compact: 'compact';
|
||||
default: 'default';
|
||||
large: 'large';
|
||||
}
|
||||
|
||||
export interface SHAPE {
|
||||
default: 'default';
|
||||
round: 'round';
|
||||
square: 'square';
|
||||
}
|
||||
|
||||
export interface ButtonOverrides {
|
||||
BaseButton?: Override<any>;
|
||||
StartEnhancer?: Override<any>;
|
||||
EndEnhancer?: Override<any>;
|
||||
LoadingSpinnerContainer?: Override<any>;
|
||||
LoadingSpinner?: Override<any>;
|
||||
}
|
||||
|
||||
export interface ButtonProps {
|
||||
children?: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
endEnhancer?: React.ReactNode;
|
||||
isLoading?: boolean;
|
||||
isSelected?: boolean;
|
||||
kind?: KIND[keyof KIND];
|
||||
onClick?: (event: React.MouseEventHandler<HTMLButtonElement>) => any;
|
||||
overrides?: ButtonOverrides;
|
||||
shape?: SHAPE[keyof SHAPE];
|
||||
size?: SIZE[keyof SIZE];
|
||||
startEnhancer?: React.ReactNode;
|
||||
}
|
||||
|
||||
export const StyledBaseButton: StyletronComponent<any>;
|
||||
export const StyledStartEnhancer: StyletronComponent<any>;
|
||||
export const StyledEndEnhancer: StyletronComponent<any>;
|
||||
export const StyledLoadingSpinner: StyletronComponent<any>;
|
||||
export const StyledLoadingSpinnerContainer: StyletronComponent<any>;
|
||||
|
||||
export class Button extends React.Component<ButtonProps> {
|
||||
internalOnClick(...args: any): void;
|
||||
}
|
||||
|
||||
export const KIND: KIND;
|
||||
export const SHAPE: SHAPE;
|
||||
export const SIZE: SIZE;
|
||||
Vendored
-33
@@ -1,33 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface CardOverrides {
|
||||
Action?: Override<any>;
|
||||
Body?: Override<any>;
|
||||
Contents?: Override<any>;
|
||||
HeaderImage?: Override<any>;
|
||||
Root?: Override<any>;
|
||||
Thumbnail?: Override<any>;
|
||||
Title?: Override<any>;
|
||||
}
|
||||
export interface CardProps {
|
||||
readonly action?: React.ReactNode;
|
||||
readonly children?: React.ReactNode;
|
||||
readonly hasThumbnail?: (props: { readonly thumbnail?: string }) => boolean;
|
||||
readonly headerImage?: string;
|
||||
readonly overrides?: CardOverrides;
|
||||
readonly thumbnail?: string;
|
||||
readonly title?: React.ReactNode;
|
||||
}
|
||||
export const Card: React.FC<CardProps>;
|
||||
export type hasThumbnail = (props: { readonly thumbnail?: string }) => boolean;
|
||||
|
||||
export const StyledAction: StyletronComponent<any>;
|
||||
export const StyledBody: StyletronComponent<any>;
|
||||
export const StyledContents: StyletronComponent<any>;
|
||||
export const StyledHeaderImage: StyletronComponent<any>;
|
||||
export const StyledThumbnail: StyletronComponent<any>;
|
||||
export const StyledTitle: StyletronComponent<any>;
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledWrapper: StyletronComponent<any>;
|
||||
Vendored
-108
@@ -1,108 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_TYPE {
|
||||
change: 'CHANGE';
|
||||
}
|
||||
export interface STYLE_TYPE {
|
||||
default: 'default';
|
||||
toggle: 'toggle';
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledCheckmark: StyletronComponent<any>;
|
||||
export const StyledLabel: StyletronComponent<any>;
|
||||
export const StyledInput: StyletronComponent<any>;
|
||||
export const StyledToggle: StyletronComponent<any>;
|
||||
export const StyledToggleInner: StyletronComponent<any>;
|
||||
export const StyledToggleTrack: StyletronComponent<any>;
|
||||
|
||||
export type StateReducer = (
|
||||
stateType: string,
|
||||
nextState: CheckboxState,
|
||||
currentState: CheckboxState,
|
||||
event: React.SyntheticEvent<HTMLInputElement>,
|
||||
) => CheckboxState;
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
overrides?: CheckboxOverrides;
|
||||
children?: React.ReactNode;
|
||||
initialState?: CheckboxState;
|
||||
stateReducer?: StateReducer;
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
||||
autoFocus?: boolean;
|
||||
}
|
||||
|
||||
export const StatefulContainer: React.FC<StatefulContainerProps>;
|
||||
|
||||
export interface StatefulCheckboxProps {
|
||||
overrides?: CheckboxOverrides;
|
||||
children?: React.ReactNode;
|
||||
initialState?: CheckboxState;
|
||||
autoFocus?: boolean;
|
||||
checkmarkType?: STYLE_TYPE[keyof STYLE_TYPE];
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
||||
}
|
||||
|
||||
export const StatefulCheckbox: React.FC<StatefulCheckboxProps>;
|
||||
|
||||
export interface CheckboxOverrides {
|
||||
Checkmark?: Override<any>;
|
||||
Label?: Override<any>;
|
||||
Root?: Override<any>;
|
||||
Input?: Override<any>;
|
||||
Toggle?: Override<any>;
|
||||
ToggleInner?: Override<any>;
|
||||
ToggleTrack?: Override<any>;
|
||||
}
|
||||
|
||||
export interface CheckboxProps {
|
||||
children?: React.ReactNode;
|
||||
overrides?: CheckboxOverrides;
|
||||
checked?: boolean;
|
||||
disabled?: boolean;
|
||||
required?: boolean;
|
||||
isError?: boolean;
|
||||
inputRef?: React.Ref<HTMLInputElement>;
|
||||
autoFocus?: boolean;
|
||||
type?: string;
|
||||
name?: string;
|
||||
value?: string;
|
||||
isIndeterminate?: boolean;
|
||||
labelPlacement?: 'top' | 'right' | 'bottom' | 'left';
|
||||
checkmarkType?: STYLE_TYPE[keyof STYLE_TYPE];
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onMouseDown?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseUp?: React.MouseEventHandler<HTMLInputElement>;
|
||||
}
|
||||
|
||||
export interface CheckboxState {
|
||||
isFocused: boolean;
|
||||
isHovered: boolean;
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
|
||||
onMouseEnter(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onMouseLeave(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onMouseDown(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onMouseUp(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onFocus(event: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
onBlur(event: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
}
|
||||
|
||||
export const STATE_TYPE: STATE_TYPE;
|
||||
export const STYLE_TYPE: STYLE_TYPE;
|
||||
Vendored
-201
@@ -1,201 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { Option } from '../select';
|
||||
import { any } from 'prop-types';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
moveUp: 'moveUp';
|
||||
moveDown: 'moveDown';
|
||||
moveLeft: 'moveLeft';
|
||||
moveRight: 'moveRight';
|
||||
mouseOver: 'mouseOver';
|
||||
mouseLeave: 'mouseLeave';
|
||||
}
|
||||
|
||||
export type onChange = (args: {date: Date | Date[]}) => any;
|
||||
export type StateReducer = (
|
||||
stateType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
|
||||
nextState: ContainerState,
|
||||
currentState: ContainerState,
|
||||
) => ContainerState;
|
||||
|
||||
export interface ContainerState {
|
||||
value?: Date | Date[];
|
||||
}
|
||||
export interface StatefulContainerProps<T> {
|
||||
children?: (args: T) => React.ReactNode;
|
||||
initialState?: ContainerState;
|
||||
stateReducer?: StateReducer;
|
||||
onChange?: onChange;
|
||||
range?: boolean;
|
||||
}
|
||||
export class StatefulContainer extends React.Component<StatefulContainerProps<CalendarProps | DatepickerProps>, ContainerState> {
|
||||
onChange(data: { date: Date | Date[] }): void;
|
||||
internalSetState(type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: ContainerState): void;
|
||||
}
|
||||
|
||||
export interface CalendarProps {
|
||||
autoFocusCalendar?: boolean;
|
||||
excludeDates?: Date[];
|
||||
quickSelect?: boolean;
|
||||
quickSelectOptions?: Array<{id: string, beginDate: Date}>;
|
||||
filterDate?: (day: Date) => boolean;
|
||||
highlightedDate?: Date;
|
||||
includeDates?: Date[];
|
||||
range?: boolean;
|
||||
// see https://github.com/date-fns/date-fns/blob/master/src/locale/index.js.flow
|
||||
locale?: any;
|
||||
maxDate?: Date;
|
||||
minDate?: Date;
|
||||
monthsShown?: number;
|
||||
onDayClick?: (args: {date: Date, event: Event}) => any;
|
||||
onDayMouseOver?: (args: {date: Date, event: Event}) => any;
|
||||
onDayMouseLeave?: (args: {date: Date, event: Event}) => any;
|
||||
onMonthChange?: (args: {date: Date}) => any;
|
||||
onYearChange?: (args: {date: Date}) => any;
|
||||
onChange?: onChange;
|
||||
overrides?: DatepickerOverrides<{}>;
|
||||
peekNextMonth?: boolean;
|
||||
timeSelectStart?: boolean;
|
||||
timeSelectEnd?: boolean;
|
||||
trapTabbing?: boolean;
|
||||
value?: Date | Date[];
|
||||
}
|
||||
export interface CalendarState {
|
||||
highlightedDate: Date;
|
||||
focused: boolean;
|
||||
date: Date;
|
||||
quickSelectId?: string;
|
||||
}
|
||||
export class Calendar extends React.Component<CalendarProps, CalendarState> {
|
||||
getSingleDate(value: Date | Date[]): Date | null;
|
||||
getDateInView(): Date;
|
||||
handleMonthChange(date: Date): void;
|
||||
handleYearChange(date: Date): void;
|
||||
changeMonth({date}: {date: Date}): void;
|
||||
changeYear({date}: {date: Date}): void;
|
||||
renderCalendarHeader(date: Date, order: number): React.ReactNode;
|
||||
onKeyDown(event: KeyboardEvent): void;
|
||||
handleArrowKey(key: string): void;
|
||||
focusCalendar(): void;
|
||||
blurCalendar(): void;
|
||||
handleTabbing(event: KeyboardEvent): void;
|
||||
onDayMouseOver(data: { event: Event, date: Date }): void;
|
||||
onDayMouseLeave(data: { event: Event, date: Date }): void;
|
||||
handleDateChange(data: { date: Date | Date[] }): void;
|
||||
handleTimeChange(time: Date, index: number): void;
|
||||
setHighlightedDate(date: Date): void;
|
||||
renderMonths(): React.ReactNode[];
|
||||
renderTimeSelect(value: Date, onChange: (...args: any) => any): React.ReactNode;
|
||||
renderQuickSelect(): React.ReactNode;
|
||||
}
|
||||
|
||||
export const StatefulCalendar: React.FC<StatefulDatepickerProps<CalendarProps>>;
|
||||
|
||||
export interface DatepickerOverrides<T> {
|
||||
Root?: Override<T>;
|
||||
QuickSelect?: Override<T>;
|
||||
QuickSelectContainer?: Override<T>;
|
||||
QuickSelectFormControl?: Override<T>;
|
||||
TimeSelect?: Override<T>;
|
||||
TimeSelectContainer?: Override<T>;
|
||||
TimeSelectFormControl?: Override<T>;
|
||||
CalendarContainer?: Override<T>;
|
||||
CalendarHeader?: Override<T>;
|
||||
PrevButton?: Override<T>;
|
||||
PrevButtonIcon?: Override<T>;
|
||||
NextButton?: Override<T>;
|
||||
NextButtonIcon?: Override<T>;
|
||||
MonthHeader?: Override<T>;
|
||||
MonthYearSelectButton?: Override<T>;
|
||||
MonthYearSelectIconContainer?: Override<T>;
|
||||
MonthYearSelectPopover?: Override<T>;
|
||||
MonthYearSelectStatefulMenu?: Override<T>;
|
||||
WeekdayHeader?: Override<T>;
|
||||
Month?: Override<T>;
|
||||
Week?: Override<T>;
|
||||
Day?: Override<T>;
|
||||
Input?: Override<T>;
|
||||
Popover?: Override<T>;
|
||||
}
|
||||
export type DatepickerProps = CalendarProps & {
|
||||
'aria-label'?: string;
|
||||
'aria-labelledby'?: string;
|
||||
'aria-describedby'?: string;
|
||||
disabled?: boolean;
|
||||
error?: boolean;
|
||||
placeholder?: string;
|
||||
required?: boolean;
|
||||
formatDisplayValue?: (
|
||||
date: Date | Date[],
|
||||
formatString: string,
|
||||
) => string;
|
||||
formatString?: string;
|
||||
mountNode?: HTMLElement;
|
||||
onClose?: () => any;
|
||||
};
|
||||
export interface DatepickerState {
|
||||
calendarFocused: boolean;
|
||||
isOpen: boolean;
|
||||
isPseudoFocused: boolean;
|
||||
lastActiveElm?: HTMLElement;
|
||||
}
|
||||
export class Datepicker extends React.Component<DatepickerProps, DatepickerState> {
|
||||
onChange(data: { date: Date | Date[] }): void;
|
||||
formatDate(date: Date | Date[], formatString: string): string | string[];
|
||||
formatDisplayValue(date: Date | Date[]): string;
|
||||
open(): void;
|
||||
close(): void;
|
||||
handleEsc(): void;
|
||||
handleInputBlur(): void;
|
||||
handleKeyDown(event: KeyboardEvent): void;
|
||||
focusCalendar(): void;
|
||||
}
|
||||
|
||||
export type StatefulDatepickerProps<T> = T & StatefulContainerProps<T> & { children?: (args: T) => React.ReactNode; };
|
||||
export const StatefulDatepicker: React.FC<StatefulDatepickerProps<DatepickerProps>>;
|
||||
|
||||
export interface TimePickerProps {
|
||||
format?: '12' | '24';
|
||||
onChange?: (args: Date) => any;
|
||||
overrides?: {
|
||||
Select?: Override<any>;
|
||||
};
|
||||
creatable?: boolean;
|
||||
step?: number;
|
||||
value: Date | null;
|
||||
}
|
||||
export interface TimePickerState {
|
||||
steps: number[];
|
||||
value?: Option;
|
||||
}
|
||||
export class TimePicker extends React.Component<TimePickerProps, TimePickerState> {
|
||||
handleChange(steps: number): void;
|
||||
buildSteps(): number[];
|
||||
buildSelectedOption(value: Date, format: string): object;
|
||||
}
|
||||
|
||||
export interface TimezonePickerProps {
|
||||
date?: Date;
|
||||
mapLabels?: (args: Option) => React.ReactNode;
|
||||
onChange?: (value: {id: string, label: string, offset: number}) => any;
|
||||
overrides?: { Select?: Override<any> };
|
||||
value?: string;
|
||||
}
|
||||
export interface TimezonePickerState {
|
||||
timezones: Option[];
|
||||
value?: string;
|
||||
}
|
||||
export class TimezonePicker extends React.Component<TimezonePickerProps, TimezonePickerState> {
|
||||
buildTimezones(compareDate: Date): string[];
|
||||
}
|
||||
|
||||
export const DISPLAY_FORMAT: 'L';
|
||||
export const ISO_FORMAT: 'YYYY-MM-DD';
|
||||
export const ISO_MONTH_FORMAT: 'YYYY-MM';
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
|
||||
export const WEEKDAYS: [0, 1, 2, 3, 4, 5, 6];
|
||||
Vendored
-75
@@ -1,75 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
// export {arrayMove, arrayRemove} from 'react-movable';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
|
||||
export type StateReducer = (
|
||||
stateChangeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
|
||||
export interface StatefulListProps {
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
removable?: boolean;
|
||||
onChange?: (params: {
|
||||
newState: React.ReactNode[],
|
||||
oldIndex: number,
|
||||
newIndex: number,
|
||||
}) => any;
|
||||
overrides?: ListOverrides;
|
||||
}
|
||||
|
||||
export const StatefulList: React.FC<StatefulListProps>;
|
||||
|
||||
export interface State {
|
||||
items: React.ReactNode[];
|
||||
}
|
||||
export type StatefulComponentContainerProps = StatefulListProps & {
|
||||
initialState?: State;
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
export class StatefulListContainer extends React.Component<StatefulComponentContainerProps, State> {
|
||||
onChange({oldIndex, newIndex}: {oldIndex: number, newIndex: number}): void;
|
||||
internalSetState(type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: State): void;
|
||||
}
|
||||
|
||||
export interface SharedStylePropsArgT {
|
||||
$isDragged: boolean;
|
||||
$isSelected: boolean;
|
||||
$isRemovable: boolean;
|
||||
}
|
||||
|
||||
export interface ListOverrides {
|
||||
Root?: Override<SharedStylePropsArgT>;
|
||||
List?: Override<SharedStylePropsArgT>;
|
||||
Item?: Override<SharedStylePropsArgT>;
|
||||
DragHandle?: Override<SharedStylePropsArgT>;
|
||||
CloseHandle?: Override<SharedStylePropsArgT>;
|
||||
Label?: Override<SharedStylePropsArgT>;
|
||||
}
|
||||
|
||||
export interface ListProps {
|
||||
removable?: boolean;
|
||||
items?: React.ReactNode[] ;
|
||||
onChange?: (args: {oldIndex: number, newIndex: number}) => any;
|
||||
overrides?: ListOverrides;
|
||||
}
|
||||
|
||||
export class List extends React.Component<ListProps> {}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledList: StyletronComponent<any>;
|
||||
export const StyledItem: StyletronComponent<any>;
|
||||
export const StyledDragHandle: StyletronComponent<any>;
|
||||
export const StyledCloseHandle: StyletronComponent<any>;
|
||||
export const StyledLabel: StyletronComponent<any>;
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
-75
@@ -1,75 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface FileUploaderOverrides<T> {
|
||||
Root?: Override<T>;
|
||||
FileDragAndDrop?: Override<T>;
|
||||
ContentMessage?: Override<T>;
|
||||
ContentSeparator?: Override<T>;
|
||||
HiddenInput?: Override<T>;
|
||||
ProgressMessage?: Override<T>;
|
||||
ErrorMessage?: Override<T>;
|
||||
ButtonComponent?: Override<T>;
|
||||
}
|
||||
|
||||
export interface StyleProps {
|
||||
$afterFileDrop: boolean;
|
||||
$isDisabled: boolean;
|
||||
$isDragActive: boolean;
|
||||
$isDragAccept: boolean;
|
||||
$isDragReject: boolean;
|
||||
$isFocused: boolean;
|
||||
}
|
||||
|
||||
export type DropFilesEventHandler = (
|
||||
accepted: File[],
|
||||
rejected: File[],
|
||||
event: React.SyntheticEvent<HTMLElement>,
|
||||
) => any;
|
||||
|
||||
export type DropFileEventHandler = (
|
||||
acceptedOrRejected: File[],
|
||||
event: React.SyntheticEvent<HTMLElement>,
|
||||
) => any;
|
||||
|
||||
export type GetDataTransferItems = (
|
||||
event: React.SyntheticEvent<any>,
|
||||
) => Promise<Array<File | DataTransferItem>>;
|
||||
|
||||
export interface FileUploaderProps {
|
||||
accept?: string | string[];
|
||||
disableClick?: boolean;
|
||||
disabled?: boolean;
|
||||
getDataTransferItems?: GetDataTransferItems;
|
||||
maxSize?: number;
|
||||
minSize?: number;
|
||||
multiple?: boolean;
|
||||
name?: string;
|
||||
onClick?: (event: React.MouseEventHandler<HTMLElement>) => any;
|
||||
onFocus?: (event: React.FocusEventHandler<HTMLElement>) => any;
|
||||
onBlur?: (event: React.FocusEventHandler<HTMLElement>) => any;
|
||||
onKeyDown?: (event: React.KeyboardEventHandler<HTMLElement>) => any;
|
||||
onDragStart?: (event: React.DragEventHandler<HTMLElement>) => any;
|
||||
onDragEnter?: (event: React.DragEventHandler<HTMLElement>) => any;
|
||||
onDragOver?: (event: React.DragEventHandler<HTMLElement>) => any;
|
||||
onDragLeave?: (event: React.DragEventHandler<HTMLElement>) => any;
|
||||
onDrop?: DropFilesEventHandler;
|
||||
onDropAccepted?: DropFileEventHandler;
|
||||
onDropRejected?: DropFileEventHandler;
|
||||
onFileDialogCancel?: () => any;
|
||||
preventDropOnDocument?: boolean;
|
||||
errorMessage?: string;
|
||||
onCancel?: () => any;
|
||||
onRetry?: () => any;
|
||||
overrides?: FileUploaderOverrides<StyleProps>;
|
||||
progressAmount?: number;
|
||||
progressMessage?: string;
|
||||
}
|
||||
export const FileUploader: React.FC<FileUploaderProps>;
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledFileDragAndDrop: StyletronComponent<any>;
|
||||
export const StyledContentMessage: StyletronComponent<any>;
|
||||
export const StyledErrorMessage: StyletronComponent<any>;
|
||||
export const StyledHiddenInput: StyletronComponent<any>;
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { BlockProps, Responsive, Scale } from '../block';
|
||||
|
||||
export interface FlexGridProps extends BlockProps {
|
||||
flexGridColumnCount?: Responsive<number>;
|
||||
flexGridColumnGap?: Responsive<Scale>;
|
||||
flexGridRowGap?: Responsive<Scale>;
|
||||
}
|
||||
|
||||
export const FlexGrid: React.FC<FlexGridProps>;
|
||||
|
||||
export type FlexGridItemProps = FlexGridProps;
|
||||
|
||||
export const FlexGridItem: React.FC<FlexGridItemProps>;
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export const StyledLabel: StyletronComponent<any>;
|
||||
export const StyledCaption: StyletronComponent<any>;
|
||||
export const StyledControlContainer: StyletronComponent<any>;
|
||||
|
||||
export interface FormControlOverrides {
|
||||
Label?: Override<any>;
|
||||
Caption?: Override<any>;
|
||||
ControlContainer?: Override<any>;
|
||||
}
|
||||
|
||||
export interface FormControlProps {
|
||||
children: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
overrides?: FormControlOverrides;
|
||||
label?: React.ReactNode;
|
||||
caption?: React.ReactNode;
|
||||
error?: boolean | React.ReactNode;
|
||||
positive?: React.ReactNode;
|
||||
}
|
||||
|
||||
export class FormControl extends React.Component<FormControlProps> {}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface ALIGN {
|
||||
right: 'flex-end';
|
||||
left: 'flex-start';
|
||||
center: 'center';
|
||||
}
|
||||
|
||||
export interface HeaderNavigationOverrides {
|
||||
Root?: Override<any>;
|
||||
}
|
||||
|
||||
export interface HeaderNavigationProps {
|
||||
overrides?: HeaderNavigationOverrides;
|
||||
}
|
||||
|
||||
export class HeaderNavigation extends React.Component<HeaderNavigationProps> {}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledNavigationItem: StyletronComponent<any>;
|
||||
export const StyledNavigationList: StyletronComponent<any>;
|
||||
|
||||
export const ALIGN: ALIGN;
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { BlockProps } from '../block';
|
||||
|
||||
export interface HeadingLevelProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export const HeadingLevel: React.FC<HeadingLevelProps>;
|
||||
|
||||
export type HeadingProps = {
|
||||
styleLevel?: number;
|
||||
} & BlockProps;
|
||||
|
||||
export const Heading: React.FC<HeadingProps>;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Alert: React.FC<IconProps>;
|
||||
export default Alert;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ArrowDown: React.FC<IconProps>;
|
||||
export default ArrowDown;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ArrowLeft: React.FC<IconProps>;
|
||||
export default ArrowLeft;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ArrowRight: React.FC<IconProps>;
|
||||
export default ArrowRight;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ArrowUp: React.FC<IconProps>;
|
||||
export default ArrowUp;
|
||||
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const CheckIndeterminate: React.FC<IconProps>;
|
||||
export default CheckIndeterminate;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Check: React.FC<IconProps>;
|
||||
export default Check;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ChevronDown: React.FC<IconProps>;
|
||||
export default ChevronDown;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ChevronLeft: React.FC<IconProps>;
|
||||
export default ChevronLeft;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ChevronRight: React.FC<IconProps>;
|
||||
export default ChevronRight;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const ChevronUp: React.FC<IconProps>;
|
||||
export default ChevronUp;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const DeleteAlt: React.FC<IconProps>;
|
||||
export default DeleteAlt;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Delete: React.FC<IconProps>;
|
||||
export default Delete;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Filter: React.FC<IconProps>;
|
||||
export default Filter;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Grab: React.FC<IconProps>;
|
||||
export default Grab;
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface StyledComponentArgsT {
|
||||
$size?: number | string;
|
||||
$color?: string;
|
||||
}
|
||||
|
||||
export interface IconOverrides {
|
||||
Svg?: Override<StyledComponentArgsT>;
|
||||
}
|
||||
|
||||
export interface IconProps {
|
||||
children?: React.ReactNode;
|
||||
size?: number | string;
|
||||
color?: string;
|
||||
title?: string;
|
||||
overrides?: IconOverrides;
|
||||
}
|
||||
|
||||
export const Icon: React.FC<IconProps>;
|
||||
|
||||
export const StyledSvg: StyletronComponent<any>;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Menu: React.FC<IconProps>;
|
||||
export default Menu;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Overflow: React.FC<IconProps>;
|
||||
export default Overflow;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Plus: React.FC<IconProps>;
|
||||
export default Plus;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Search: React.FC<IconProps>;
|
||||
export default Search;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Spinner: React.FC<IconProps>;
|
||||
export default Spinner;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const TriangleDown: React.FC<IconProps>;
|
||||
export default TriangleDown;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const TriangleLeft: React.FC<IconProps>;
|
||||
export default TriangleLeft;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const TriangleRight: React.FC<IconProps>;
|
||||
export default TriangleRight;
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const TriangleUp: React.FC<IconProps>;
|
||||
export default TriangleUp;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { IconProps } from '../';
|
||||
|
||||
export const Upload: React.FC<IconProps>;
|
||||
export default Upload;
|
||||
Vendored
-48
@@ -1,48 +0,0 @@
|
||||
// Type definitions for baseui 7.3
|
||||
// Project: https://github.com/uber-web/baseui#readme
|
||||
// Definitions by: Jhey Tompkins <https://github.com/jh3y>
|
||||
// Gergely Nemeth <https://github.com/gergelyke>
|
||||
// Chase Starr <https://github.com/chasestarr>
|
||||
// Nadiia <https://github.com/nadiia>
|
||||
// Vojtech Miksu <https://github.com/tajo>
|
||||
// Graham Murdoch <https://github.com/sandgraham>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.1
|
||||
/// <reference path="theme.d.ts"/>
|
||||
/// <reference path="locale.d.ts"/>
|
||||
/// <reference path="overrides.d.ts"/>
|
||||
|
||||
import * as React from 'react';
|
||||
import { StyleObject, StyletronComponent } from 'styletron-react';
|
||||
|
||||
export function createTheme(primitives: ThemePrimitives, overrides?: object): Theme;
|
||||
export function withProps(Component: React.ComponentType, customProps?: object): (props: object) => any;
|
||||
export function mergeOverrides<T>(target?: Overrides<T>, source?: Overrides<T>): Overrides<T>;
|
||||
export function styled<P extends object, C extends keyof JSX.IntrinsicElements | React.ComponentType<any>>(
|
||||
component: C,
|
||||
styledFn: StyleObject | ((props: { $theme: Theme } & P) => StyleObject)
|
||||
): StyletronComponent<Pick<React.ComponentProps<C>, Exclude<keyof React.ComponentProps<C>, { className: string }>> & P>;
|
||||
|
||||
export const LightTheme: Theme;
|
||||
export const LightThemeMove: Theme;
|
||||
export const lightThemePrimitives: ThemePrimitives;
|
||||
export const DarkTheme: Theme;
|
||||
export const DarkThemeMove: Theme;
|
||||
|
||||
export interface BaseProviderProps {
|
||||
children: React.ReactNode;
|
||||
theme: Theme;
|
||||
}
|
||||
export const BaseProvider: React.FC<BaseProviderProps>;
|
||||
|
||||
export interface LocaleProviderProps {
|
||||
locale: Locale;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
export const LocaleProvider: React.FC<LocaleProviderProps>;
|
||||
|
||||
export interface ThemeProviderProps {
|
||||
theme: Theme;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
export const ThemeProvider: React.FC<ThemeProviderProps>;
|
||||
Vendored
-125
@@ -1,125 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
export interface ADJOINED {
|
||||
none: 'none';
|
||||
left: 'left';
|
||||
right: 'right';
|
||||
both: 'both';
|
||||
}
|
||||
export interface SIZE {
|
||||
default: 'default';
|
||||
compact: 'compact';
|
||||
large: 'large';
|
||||
}
|
||||
|
||||
export interface CUSTOM_INPUT_TYPE {
|
||||
textarea: 'textarea';
|
||||
}
|
||||
|
||||
export interface ENHANCER_POSITION {
|
||||
start: 'start';
|
||||
end: 'end';
|
||||
}
|
||||
|
||||
export interface BaseInputOverrides {
|
||||
InputContainer?: Override<any>;
|
||||
Input?: Override<any>;
|
||||
Before?: Override<any>;
|
||||
After?: Override<any>;
|
||||
}
|
||||
|
||||
export interface BaseInputProps<T> {
|
||||
'aria-label'?: string;
|
||||
'aria-labelledby'?: string;
|
||||
'aria-describedby'?: string;
|
||||
adjoined?: ADJOINED[keyof ADJOINED];
|
||||
autoComplete?: string;
|
||||
autoFocus?: boolean;
|
||||
disabled?: boolean;
|
||||
error?: boolean;
|
||||
positive?: boolean;
|
||||
id?: string;
|
||||
'data-baseweb'?: string;
|
||||
inputRef?: React.Ref<T>;
|
||||
name?: string;
|
||||
onBlur?: React.FocusEventHandler<T>;
|
||||
onChange?: React.FormEventHandler<T>;
|
||||
onKeyDown?: React.KeyboardEventHandler<T>;
|
||||
onKeyPress?: React.KeyboardEventHandler<T>;
|
||||
onKeyUp?: React.KeyboardEventHandler<T>;
|
||||
onFocus?: React.FocusEventHandler<T>;
|
||||
overrides?: BaseInputOverrides;
|
||||
placeholder?: string;
|
||||
required?: boolean;
|
||||
size?: SIZE[keyof SIZE];
|
||||
type?: string;
|
||||
value?: string;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export type InputOverrides = BaseInputOverrides & {
|
||||
Root?: Override<any>;
|
||||
StartEnhancer?: Override<any>;
|
||||
EndEnhancer?: Override<any>;
|
||||
};
|
||||
|
||||
export interface InputProps extends BaseInputProps<HTMLInputElement> {
|
||||
startEnhancer?: React.ReactNode;
|
||||
endEnhancer?: React.ReactNode;
|
||||
overrides?: InputOverrides;
|
||||
}
|
||||
|
||||
export interface InternalState {
|
||||
isFocused?: boolean;
|
||||
}
|
||||
|
||||
export class Input extends React.Component<InputProps, InternalState> {
|
||||
onFocus(e: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
onBlur(e: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
}
|
||||
|
||||
export class BaseInput extends React.Component<BaseInputProps<HTMLInputElement>, InternalState> {
|
||||
onFocus(e: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
onBlur(e: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
}
|
||||
|
||||
export interface MaskedInputProps extends InputProps {
|
||||
mask?: string;
|
||||
maskChar?: string;
|
||||
}
|
||||
|
||||
export const MaskedInput: React.FC<MaskedInputProps>;
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
children?: React.ReactNode;
|
||||
initialState?: State;
|
||||
stateReducer?: (stateType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], nextState: State, currentState: State) => State;
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
}
|
||||
|
||||
export type StatefulInputProps = InputProps & StatefulContainerProps & { children?: never; };
|
||||
|
||||
export const StatefulInput: React.FC<StatefulInputProps>;
|
||||
export const StatefulContainer: React.FC<StatefulContainerProps>;
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledInputEnhancer: StyletronComponent<any>;
|
||||
export const StyledStartEnhancer: StyletronComponent<any>;
|
||||
export const StyledEndEnhancer: StyletronComponent<any>;
|
||||
export const StyledInputContainer: StyletronComponent<any>;
|
||||
export const StyledInput: StyletronComponent<any>;
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
export const CUSTOM_INPUT_TYPE: CUSTOM_INPUT_TYPE;
|
||||
export const ADJOINED: ADJOINED;
|
||||
export const SIZE: SIZE;
|
||||
export const ENHANCER_POSITION: ENHANCER_POSITION;
|
||||
Vendored
-82
@@ -1,82 +0,0 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export interface TETHER_PLACEMENT {
|
||||
auto: 'auto';
|
||||
topLeft: 'topLeft';
|
||||
top: 'top';
|
||||
topRight: 'topRight';
|
||||
rightTop: 'rightTop';
|
||||
right: 'right';
|
||||
rightBottom: 'rightBottom';
|
||||
bottomRight: 'bottomRight';
|
||||
bottom: 'bottom';
|
||||
bottomLeft: 'bottomLeft';
|
||||
leftBottom: 'leftBottom';
|
||||
left: 'left';
|
||||
leftTop: 'leftTop';
|
||||
}
|
||||
|
||||
export type TetherPlacement = TETHER_PLACEMENT;
|
||||
|
||||
export interface NormalizedOffset {
|
||||
top: number;
|
||||
left: number;
|
||||
}
|
||||
|
||||
export interface NormalizedOffsets {
|
||||
arrow?: NormalizedOffset;
|
||||
popper: NormalizedOffset;
|
||||
}
|
||||
|
||||
export interface PopperOffset {
|
||||
top?: number | null;
|
||||
left?: number | null;
|
||||
}
|
||||
|
||||
export interface PopperDataObject {
|
||||
offsets: {
|
||||
arrow?: PopperOffset;
|
||||
popper: PopperOffset;
|
||||
};
|
||||
placement: string;
|
||||
}
|
||||
|
||||
export interface TetherProps {
|
||||
anchorRef?: React.Ref<HTMLElement>;
|
||||
arrowRef?: React.Ref<HTMLElement>;
|
||||
popperRef?: React.Ref<HTMLElement>;
|
||||
children: React.ReactNode;
|
||||
onPopperUpdate?: (offsets: NormalizedOffsets, popper: PopperDataObject) => any;
|
||||
placement?: TETHER_PLACEMENT[keyof TETHER_PLACEMENT];
|
||||
popperOptions?: any;
|
||||
}
|
||||
export interface TetherState {
|
||||
isMounted: boolean;
|
||||
}
|
||||
|
||||
export class TetherBehavior extends React.Component<TetherProps, TetherState> {
|
||||
state: {
|
||||
isMounted: boolean;
|
||||
};
|
||||
initializePopper(): void;
|
||||
onPopperUpdate(data: PopperDataObject): void;
|
||||
destroyPopover(): void;
|
||||
}
|
||||
|
||||
export interface LayersManagerProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
export interface LayerProps {
|
||||
children: React.ReactNode;
|
||||
host?: HTMLElement;
|
||||
index?: number;
|
||||
mountNode?: HTMLElement;
|
||||
onMount?: () => any;
|
||||
onUnmount?: () => any;
|
||||
}
|
||||
export class LayersManager extends React.Component<LayersManagerProps> {
|
||||
host: React.Ref<HTMLElement>;
|
||||
}
|
||||
export const Layer: React.FC<LayerProps>;
|
||||
|
||||
export const TETHER_PLACEMENT: TETHER_PLACEMENT;
|
||||
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
|
||||
export const StyledLink: React.FC<any>;
|
||||
Vendored
-59
@@ -1,59 +0,0 @@
|
||||
interface AccordionLocale {
|
||||
collapse: string;
|
||||
expand: string;
|
||||
}
|
||||
|
||||
interface BreadcrumbLocale {
|
||||
ariaLabel: string;
|
||||
}
|
||||
interface DatepickerLocale {
|
||||
ariaLabel: string;
|
||||
nextMonth: string;
|
||||
previousMonth: string;
|
||||
screenReaderMessageInput: string;
|
||||
timePickerAriaLabel: string;
|
||||
timezonePickerAriaLabel: string;
|
||||
}
|
||||
interface ButtonGroupLocale {
|
||||
ariaLabel: string;
|
||||
}
|
||||
interface FileUploaderLocale {
|
||||
dropFilesToUpload: string;
|
||||
or: string;
|
||||
browseFiles: string;
|
||||
retry: string;
|
||||
cancel: string;
|
||||
}
|
||||
interface MenuLocale {
|
||||
noResultsMsg: string;
|
||||
}
|
||||
interface ModalLocale {
|
||||
close: string;
|
||||
}
|
||||
interface PaginationLocale {
|
||||
prev: string;
|
||||
next: string;
|
||||
preposition: string;
|
||||
}
|
||||
interface SelectLocale {
|
||||
// Remove noResultsMsg prop in the next major version
|
||||
noResultsMsg: string;
|
||||
placeholder: string;
|
||||
create: string;
|
||||
}
|
||||
interface ToastLocale {
|
||||
close: string;
|
||||
}
|
||||
|
||||
interface Locale {
|
||||
accordion: AccordionLocale;
|
||||
breadcrumbs: BreadcrumbLocale;
|
||||
datepicker: DatepickerLocale;
|
||||
buttongroup: ButtonGroupLocale;
|
||||
fileuploader: FileUploaderLocale;
|
||||
menu: MenuLocale;
|
||||
modal: ModalLocale;
|
||||
pagination: PaginationLocale;
|
||||
select: SelectLocale;
|
||||
toast: ToastLocale;
|
||||
}
|
||||
Vendored
-167
@@ -1,167 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface KEY_STRINGS {
|
||||
ArrowUp: 'ArrowUp';
|
||||
ArrowDown: 'ArrowDown';
|
||||
ArrowLeft: 'ArrowLeft';
|
||||
ArrowRight: 'ArrowRight';
|
||||
Enter: 'Enter';
|
||||
Space: ' ';
|
||||
Escape: 'Escape';
|
||||
Backspace: 'Backspace';
|
||||
}
|
||||
export interface STATE_CHANGE_TYPES {
|
||||
click: 'click';
|
||||
moveUp: 'moveUp';
|
||||
moveDown: 'moveDown';
|
||||
mouseEnter: 'mouseEnter';
|
||||
focus: 'focus';
|
||||
reset: 'reset';
|
||||
}
|
||||
|
||||
export interface OPTION_LIST_SIZE {
|
||||
default: 'default';
|
||||
compact: 'compact';
|
||||
}
|
||||
|
||||
export interface MenuProps {
|
||||
overrides?: {
|
||||
EmptyState?: Override<any>;
|
||||
List?: Override<any>;
|
||||
Option?: Override<any>;
|
||||
};
|
||||
}
|
||||
|
||||
export type StatefulMenuProps = StatefulContainerProps & MenuProps;
|
||||
export class StatefulMenu extends React.PureComponent<StatefulMenuProps> {}
|
||||
|
||||
export interface RenderItemProps {
|
||||
disabled?: boolean;
|
||||
ref?: React.Ref<any>;
|
||||
id?: string;
|
||||
isFocused?: boolean;
|
||||
isHighlighted?: boolean;
|
||||
resetMenu?: () => any;
|
||||
}
|
||||
|
||||
export type OnItemSelect = (args: {
|
||||
item: any,
|
||||
event?: React.SyntheticEvent<HTMLElement> | KeyboardEvent,
|
||||
}) => any;
|
||||
|
||||
export type StateReducer = (
|
||||
changeType: STATE_CHANGE_TYPES[keyof STATE_CHANGE_TYPES],
|
||||
changes: StatefulContainerState,
|
||||
currentState: StatefulContainerState,
|
||||
) => StatefulContainerState;
|
||||
|
||||
export type GetRequiredItemProps = (
|
||||
item: any,
|
||||
index: number,
|
||||
) => RenderItemProps;
|
||||
|
||||
export type RenderProps = StatefulContainerState & {
|
||||
items: any[],
|
||||
getRequiredItemProps: GetRequiredItemProps,
|
||||
};
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
items: any[];
|
||||
initialState?: StatefulContainerState;
|
||||
stateReducer?: StateReducer;
|
||||
getRequiredItemProps?: GetRequiredItemProps;
|
||||
onItemSelect?: OnItemSelect;
|
||||
rootRef?: React.Ref<any>;
|
||||
children?: (args: RenderProps) => React.ReactNode;
|
||||
addMenuToNesting?: (ref: React.Ref<HTMLElement>) => void;
|
||||
removeMenuFromNesting?: (ref: React.Ref<HTMLElement>) => void;
|
||||
getParentMenu?: (ref: React.Ref<HTMLElement>) => void;
|
||||
getChildMenu?: (ref: React.Ref<HTMLElement>) => void;
|
||||
}
|
||||
export interface StatefulContainerState {
|
||||
activedescendantId?: string;
|
||||
highlightedIndex: number;
|
||||
isFocused: boolean;
|
||||
}
|
||||
export class StatefulContainer extends React.Component<StatefulContainerProps, StatefulContainerState> {}
|
||||
|
||||
export interface OptionListProps {
|
||||
item: any;
|
||||
getItemLabel: (item: any) => React.ReactNode;
|
||||
getChildMenu?: (item: any) => React.ReactNode;
|
||||
onMouseEnter?: (event: MouseEvent) => any;
|
||||
size?: OPTION_LIST_SIZE[keyof OPTION_LIST_SIZE];
|
||||
overrides?: {
|
||||
ListItem?: Override<any>;
|
||||
};
|
||||
resetMenu?: () => void;
|
||||
$isHighlighted?: boolean;
|
||||
$isFocused?: boolean;
|
||||
}
|
||||
export const OptionList: React.FC<OptionListProps>;
|
||||
|
||||
export interface OptionProfileProps {
|
||||
item: any;
|
||||
getChildMenu?: (item: any) => React.ReactNode;
|
||||
getProfileItemLabels: (item: any) => { title?: string; subtitle?: string; body?: string };
|
||||
getProfileItemImg: (item: any) => string | React.ComponentType<any>;
|
||||
getProfileItemImgText: (item: any) => string;
|
||||
overrides?: {
|
||||
ListItemProfile?: Override<any>;
|
||||
ProfileImgContainer?: Override<any>;
|
||||
ProfileImg?: Override<any>;
|
||||
ProfileLabelsContainer?: Override<any>;
|
||||
ProfileTitle?: Override<any>;
|
||||
ProfileSubtitle?: Override<any>;
|
||||
ProfileBody?: Override<any>;
|
||||
};
|
||||
resetMenu?: () => void;
|
||||
$isHighlighted?: boolean;
|
||||
}
|
||||
export const OptionProfile: React.FC<OptionProfileProps>;
|
||||
|
||||
export interface SharedStatelessProps {
|
||||
activedescendantId?: string;
|
||||
getRequiredItemProps?: (item: any, index: number) => RenderItemProps;
|
||||
highlightedIndex?: number;
|
||||
items: any[];
|
||||
noResultsMsg?: React.ReactNode;
|
||||
onBlur?: (event: React.FocusEventHandler<HTMLElement>) => any;
|
||||
onFocus?: (event: React.FocusEventHandler<HTMLElement>) => any;
|
||||
rootRef?: React.Ref<any>;
|
||||
focusMenu?: (event: FocusEvent | MouseEvent | KeyboardEvent) => any;
|
||||
unfocusMenu?: () => any;
|
||||
}
|
||||
|
||||
export type StatelessMenuProps = SharedStatelessProps & MenuProps;
|
||||
export const Menu: React.FC<StatelessMenuProps>;
|
||||
|
||||
export interface NestedMenuProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
export interface NestedMenuState {
|
||||
menus: Array<React.Ref<HTMLElement>>;
|
||||
}
|
||||
export class NestedMenus extends React.Component<NestedMenuProps, NestedMenuState> {
|
||||
addMenuToNesting(ref: React.Ref<HTMLElement>): void;
|
||||
removeMenuFromNesting(ref: React.Ref<HTMLElement>): void;
|
||||
findMenuIndexByRef(ref: React.Ref<HTMLElement>): number;
|
||||
getParentMenu(ref: React.Ref<HTMLElement>): React.Ref<HTMLElement>;
|
||||
getChildMenu(ref: React.Ref<HTMLElement>): React.Ref<HTMLElement>;
|
||||
}
|
||||
|
||||
export const StyledList: StyletronComponent<any>;
|
||||
export const StyledListItem: StyletronComponent<any>;
|
||||
export const StyledListItemProfile: StyletronComponent<any>;
|
||||
export const StyledProfileImgContainer: StyletronComponent<any>;
|
||||
export const StyledProfileImg: StyletronComponent<any>;
|
||||
export const StyledProfileLabelsContainer: StyletronComponent<any>;
|
||||
export const StyledProfileTitle: StyletronComponent<any>;
|
||||
export const StyledProfileSubtitle: StyletronComponent<any>;
|
||||
export const StyledProfileBody: StyletronComponent<any>;
|
||||
|
||||
export const KEY_STRINGS: KEY_STRINGS;
|
||||
export const STATE_CHANGE_TYPES: STATE_CHANGE_TYPES;
|
||||
export const OPTION_LIST_SIZE: OPTION_LIST_SIZE;
|
||||
Vendored
-99
@@ -1,99 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { ButtonProps } from '../button';
|
||||
|
||||
export interface SIZE {
|
||||
default: 'default';
|
||||
full: 'full';
|
||||
auto: 'auto';
|
||||
}
|
||||
|
||||
export interface SIZE_WIDTHS {
|
||||
default: '500px';
|
||||
full: '100%';
|
||||
auto: 'auto';
|
||||
}
|
||||
export interface ROLE {
|
||||
dialog: 'dialog';
|
||||
alertdialog: 'alertdialog';
|
||||
}
|
||||
export interface CLOSE_SOURCE {
|
||||
closeButton: 'closeButton';
|
||||
backdrop: 'backdrop';
|
||||
escape: 'escape';
|
||||
}
|
||||
|
||||
export interface SharedStylePropsArg {
|
||||
children?: React.ReactNode;
|
||||
$animate?: boolean;
|
||||
$isVisible?: boolean;
|
||||
$isOpen?: boolean;
|
||||
$size?: SIZE[keyof SIZE];
|
||||
$role?: ROLE[keyof ROLE];
|
||||
$closeable?: boolean;
|
||||
}
|
||||
|
||||
export interface ModalOverrides {
|
||||
Root?: Override<SharedStylePropsArg>;
|
||||
Backdrop?: Override<SharedStylePropsArg>;
|
||||
Dialog?: Override<SharedStylePropsArg>;
|
||||
DialogContainer?: Override<SharedStylePropsArg>;
|
||||
Close?: Override<SharedStylePropsArg>;
|
||||
}
|
||||
export interface ModalProps {
|
||||
animate?: boolean;
|
||||
autofocus?: boolean;
|
||||
children?: React.ReactNode;
|
||||
closeable?: boolean;
|
||||
isOpen?: boolean;
|
||||
mountNode?: HTMLElement;
|
||||
onClose?: (args: {
|
||||
closeSource?: CLOSE_SOURCE[keyof CLOSE_SOURCE];
|
||||
}) => any;
|
||||
overrides?: ModalOverrides;
|
||||
role?: ROLE[keyof ROLE];
|
||||
size?: SIZE[keyof SIZE];
|
||||
}
|
||||
export interface ModalState {
|
||||
isVisible: boolean;
|
||||
mounted: boolean;
|
||||
}
|
||||
export class Modal extends React.Component<ModalProps, ModalState> {
|
||||
addDomEvents(): void;
|
||||
removeDomEvents(): void;
|
||||
disableMountNodeScroll(): void;
|
||||
resentMountNodeScroll(): void;
|
||||
onDocumentKeyPress(event: KeyboardEvent): void;
|
||||
onBackdropClick(): void;
|
||||
onCloseClick(): void;
|
||||
clearTimers(): void;
|
||||
didOpen(): void;
|
||||
didClose(): void;
|
||||
triggerClose(source: CLOSE_SOURCE[keyof CLOSE_SOURCE]): void;
|
||||
captureLastFocus(): void;
|
||||
restoreLastFocus(): void;
|
||||
autoFocus(): void;
|
||||
animateOutComplete(): void;
|
||||
getSharedProps(): SharedStylePropsArg & { children: React.ReactNode };
|
||||
getMountNode(): HTMLElement;
|
||||
getChildren(): React.ReactNode;
|
||||
getRef(component: string): React.Ref<any>;
|
||||
renderModal(): React.ReactNode;
|
||||
}
|
||||
|
||||
export class ModalButton extends React.Component<ButtonProps> {}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledBackdrop: StyletronComponent<any>;
|
||||
export const StyledDialog: StyletronComponent<any>;
|
||||
export const StyledDialogContainer: StyletronComponent<any>;
|
||||
export const StyledClose: StyletronComponent<any>;
|
||||
export const ModalHeader: StyletronComponent<any>;
|
||||
export const ModalBody: StyletronComponent<any>;
|
||||
export const ModalFooter: StyletronComponent<any>;
|
||||
|
||||
export const SIZE: SIZE;
|
||||
export const SIZE_WIDTHS: SIZE_WIDTHS;
|
||||
export const ROLE: ROLE;
|
||||
export const CLOSE_SOURCE: CLOSE_SOURCE;
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { KIND, ToastProps } from '../toast';
|
||||
|
||||
export class Notification extends React.Component<ToastProps> {}
|
||||
export { KIND };
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
type StyleOverride<T> = object | ((props: { $theme: Theme } & React.PropsWithChildren<T>) => object);
|
||||
|
||||
interface OverrideObject<T> {
|
||||
component?: React.ComponentType<T>;
|
||||
props?: object;
|
||||
style?: StyleOverride<T>;
|
||||
}
|
||||
|
||||
type Override<T> = OverrideObject<T> | React.ComponentType<T>;
|
||||
|
||||
interface Overrides<T> {
|
||||
[key: string]: Override<T>;
|
||||
}
|
||||
Vendored
-86
@@ -1,86 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
|
||||
export interface Labels {
|
||||
prevButton?: string;
|
||||
nextButton?: string;
|
||||
preposition?: string;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
currentPage: number;
|
||||
}
|
||||
|
||||
export type StateReducer = (
|
||||
changeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
|
||||
changes: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
|
||||
export interface PaginationOverrides {
|
||||
Root?: Override<any>;
|
||||
PrevButton?: Override<any>;
|
||||
NextButton?: Override<any>;
|
||||
MaxLabel?: Override<any>;
|
||||
DropdownContainer?: Override<any>;
|
||||
Select?: Override<any>;
|
||||
}
|
||||
|
||||
export interface Callbacks {
|
||||
onPrevClick?: (args: {event: any}) => any;
|
||||
onNextClick?: (args: {event: any}) => any;
|
||||
onPageChange?: (args: {nextPage: number, prevPage: number}) => any;
|
||||
}
|
||||
|
||||
export interface PaginationProps extends Callbacks {
|
||||
numPages: number;
|
||||
currentPage: number;
|
||||
labels?: Labels;
|
||||
overrides?: PaginationOverrides;
|
||||
}
|
||||
|
||||
export interface PageOption {
|
||||
label: number;
|
||||
}
|
||||
|
||||
export class Pagination extends React.PureComponent<PaginationProps> {
|
||||
getMenuOptions(numPages: number): [];
|
||||
onMenuItemSelect(data: { value: ReadonlyArray<PageOption>}): void;
|
||||
onPrevClick(event: React.SyntheticEvent<any>): void;
|
||||
onNextClick(event: React.SyntheticEvent<any>): void;
|
||||
constructAriaWayfinderLabel(locale: Locale, prefix: string): string;
|
||||
}
|
||||
|
||||
export interface StatefulPaginationProps extends Callbacks {
|
||||
numPages: number;
|
||||
labels?: Labels;
|
||||
stateReducer?: StateReducer;
|
||||
initialState?: State;
|
||||
overrides?: PaginationOverrides;
|
||||
}
|
||||
|
||||
export const StatefulPagination: React.FC<StatefulPaginationProps>;
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
children: React.ReactNode;
|
||||
numPages: number;
|
||||
stateReducer?: StateReducer;
|
||||
initialState?: State;
|
||||
onPageChange?: Callbacks['onPageChange'];
|
||||
}
|
||||
|
||||
export class StatefulContainer extends React.Component<StatefulContainerProps, State> {
|
||||
internalSetState(changeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: State): void;
|
||||
onPageChange(args: {nextPage: number}): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledMaxLabel: StyletronComponent<any>;
|
||||
export const StyledDropdownContainer: StyletronComponent<any>;
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { SIZE, StatefulContainer, InputProps, InputOverrides, StatefulContainerProps } from '../input';
|
||||
|
||||
export { SIZE, StatefulContainer };
|
||||
|
||||
export type PaymentCardOverrides = InputOverrides & { IconWrapper?: Override<any>; };
|
||||
|
||||
export type PaymentCardProps = InputProps & { overrides?: PaymentCardOverrides };
|
||||
export type StatefulPaymentCardProps = InputProps & StatefulContainerProps & { children?: never; overrides?: PaymentCardOverrides };
|
||||
|
||||
export const StatefulPaymentCard: React.FC<StatefulPaymentCardProps>;
|
||||
export class PaymentCard extends React.Component<PaymentCardProps> {}
|
||||
|
||||
export const StyledIconWrapper: StyletronComponent<any>;
|
||||
Vendored
-433
@@ -1,433 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { SIZE } from '../input';
|
||||
import { OnChangeParams } from '../select';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
textChange: 'textChange';
|
||||
countryChange: 'countryChange';
|
||||
}
|
||||
|
||||
export { SIZE };
|
||||
|
||||
export interface COUNTRIES {
|
||||
AF: {label: 'Afghanistan (افغانستان)'; id: 'AF'; dialCode: '+93'};
|
||||
AL: {label: 'Albania (Shqipëri)'; id: 'AL'; dialCode: '+355'};
|
||||
DZ: {label: 'Algeria (الجزائر)'; id: 'DZ'; dialCode: '+213'};
|
||||
AS: {label: 'American Samoa'; id: 'AS'; dialCode: '+1684'};
|
||||
AD: {label: 'Andorra'; id: 'AD'; dialCode: '+376'};
|
||||
AO: {label: 'Angola'; id: 'AO'; dialCode: '+244'};
|
||||
AI: {label: 'Anguilla'; id: 'AI'; dialCode: '+1264'};
|
||||
AG: {label: 'Antigua and Barbuda'; id: 'AG'; dialCode: '+1268'};
|
||||
AR: {label: 'Argentina'; id: 'AR'; dialCode: '+54'};
|
||||
AM: {label: 'Armenia (Հայաստան)'; id: 'AM'; dialCode: '+374'};
|
||||
AW: {label: 'Aruba'; id: 'AW'; dialCode: '+297'};
|
||||
AU: {label: 'Australia'; id: 'AU'; dialCode: '+61'};
|
||||
AT: {label: 'Austria (Österreich)'; id: 'AT'; dialCode: '+43'};
|
||||
AZ: {label: 'Azerbaijan (Azərbaycan)'; id: 'AZ'; dialCode: '+994'};
|
||||
BS: {label: 'Bahamas'; id: 'BS'; dialCode: '+1242'};
|
||||
BH: {label: 'Bahrain (البحرين)'; id: 'BH'; dialCode: '+973'};
|
||||
BD: {label: 'Bangladesh (বাংলাদেশ)'; id: 'BD'; dialCode: '+880'};
|
||||
BB: {label: 'Barbados'; id: 'BB'; dialCode: '+1246'};
|
||||
BY: {label: 'Belarus (Беларусь)'; id: 'BY'; dialCode: '+375'};
|
||||
BE: {label: 'Belgium (België)'; id: 'BE'; dialCode: '+32'};
|
||||
BZ: {label: 'Belize'; id: 'BZ'; dialCode: '+501'};
|
||||
BJ: {label: 'Benin (Bénin)'; id: 'BJ'; dialCode: '+229'};
|
||||
BM: {label: 'Bermuda'; id: 'BM'; dialCode: '+1441'};
|
||||
BT: {label: 'Bhutan (འབྲུག)'; id: 'BT'; dialCode: '+975'};
|
||||
BO: {label: 'Bolivia'; id: 'BO'; dialCode: '+591'};
|
||||
BA: {
|
||||
label: 'Bosnia and Herzegovina (Босна и Херцеговина)';
|
||||
id: 'BA';
|
||||
dialCode: '+387';
|
||||
};
|
||||
BW: {label: 'Botswana'; id: 'BW'; dialCode: '+267'};
|
||||
BR: {label: 'Brazil (Brasil)'; id: 'BR'; dialCode: '+55'};
|
||||
IO: {label: 'British Indian Ocean Territory'; id: 'IO'; dialCode: '+246'};
|
||||
VG: {label: 'British Virgin Islands'; id: 'VG'; dialCode: '+1284'};
|
||||
BN: {label: 'Brunei'; id: 'BN'; dialCode: '+673'};
|
||||
BG: {label: 'Bulgaria (България)'; id: 'BG'; dialCode: '+359'};
|
||||
BF: {label: 'Burkina Faso'; id: 'BF'; dialCode: '+226'};
|
||||
BI: {label: 'Burundi (Uburundi)'; id: 'BI'; dialCode: '+257'};
|
||||
KH: {label: 'Cambodia (កម្ពុជា)'; id: 'KH'; dialCode: '+855'};
|
||||
CM: {label: 'Cameroon (Cameroun)'; id: 'CM'; dialCode: '+237'};
|
||||
CA: {label: 'Canada'; id: 'CA'; dialCode: '+1'};
|
||||
CV: {label: 'Cape Verde (Kabu Verdi)'; id: 'CV'; dialCode: '+238'};
|
||||
KY: {label: 'Cayman Islands'; id: 'KY'; dialCode: '+1345'};
|
||||
CF: {
|
||||
label: 'Central African Republic (République centrafricaine)';
|
||||
id: 'CF';
|
||||
dialCode: '+236';
|
||||
};
|
||||
TD: {label: 'Chad (Tchad)'; id: 'TD'; dialCode: '+235'};
|
||||
CL: {label: 'Chile'; id: 'CL'; dialCode: '+56'};
|
||||
CN: {label: 'China (中国)'; id: 'CN'; dialCode: '+86'};
|
||||
CX: {label: 'Christmas Island'; id: 'CX'; dialCode: '+61'};
|
||||
CC: {label: 'Cocos (Keeling) Islands'; id: 'CC'; dialCode: '+61'};
|
||||
CO: {label: 'Colombia'; id: 'CO'; dialCode: '+57'};
|
||||
KM: {label: 'Comoros (جزر القمر)'; id: 'KM'; dialCode: '+269'};
|
||||
CD: {
|
||||
label: 'Congo (DRC) (Jamhuri ya Kisoemokrasia ya Kongo)';
|
||||
id: 'CD';
|
||||
dialCode: '+243';
|
||||
};
|
||||
CG: {
|
||||
label: 'Congo (Republic) (Congo-Brazzaville)';
|
||||
id: 'CG';
|
||||
dialCode: '+242';
|
||||
};
|
||||
CK: {label: 'Cook Islands'; id: 'CK'; dialCode: '+682'};
|
||||
CR: {label: 'Costa Rica'; id: 'CR'; dialCode: '+506'};
|
||||
CI: {label: 'Côte d’Ivoire'; id: 'CI'; dialCode: '+225'};
|
||||
HR: {label: 'Croatia (Hrvatska)'; id: 'HR'; dialCode: '+385'};
|
||||
CU: {label: 'Cuba'; id: 'CU'; dialCode: '+53'};
|
||||
CW: {label: 'Curaçao'; id: 'CW'; dialCode: '+599'};
|
||||
CY: {label: 'Cyprus (Κύπρος)'; id: 'CY'; dialCode: '+357'};
|
||||
CZ: {label: 'Czech Republic (Česká republika)'; id: 'CZ'; dialCode: '+420'};
|
||||
DK: {label: 'Denmark (Danmark)'; id: 'DK'; dialCode: '+45'};
|
||||
DJ: {label: 'Djibouti'; id: 'DJ'; dialCode: '+253'};
|
||||
DM: {label: 'Dominica'; id: 'DM'; dialCode: '+1767'};
|
||||
DO: {
|
||||
label: 'Dominican Republic (República Dominicana)';
|
||||
id: 'DO';
|
||||
dialCode: '+1';
|
||||
};
|
||||
EC: {label: 'Ecuador'; id: 'EC'; dialCode: '+593'};
|
||||
EG: {label: 'Egypt (مصر)'; id: 'EG'; dialCode: '+20'};
|
||||
SV: {label: 'El Salvador'; id: 'SV'; dialCode: '+503'};
|
||||
GQ: {
|
||||
label: 'Equatorial Guinea (Guinea Ecuatorial)';
|
||||
id: 'GQ';
|
||||
dialCode: '+240';
|
||||
};
|
||||
ER: {label: 'Eritrea'; id: 'ER'; dialCode: '+291'};
|
||||
EE: {label: 'Estonia (Eesti)'; id: 'EE'; dialCode: '+372'};
|
||||
ET: {label: 'Ethiopia'; id: 'ET'; dialCode: '+251'};
|
||||
FK: {label: 'Falkland Islands (Islas Malvinas)'; id: 'FK'; dialCode: '+500'};
|
||||
FO: {label: 'Faroe Islands (Føroyar)'; id: 'FO'; dialCode: '+298'};
|
||||
FJ: {label: 'Fiji'; id: 'FJ'; dialCode: '+679'};
|
||||
FI: {label: 'Finland (Suomi)'; id: 'FI'; dialCode: '+358'};
|
||||
FR: {label: 'France'; id: 'FR'; dialCode: '+33'};
|
||||
GF: {label: 'French Guiana (Guyane française)'; id: 'GF'; dialCode: '+594'};
|
||||
PF: {
|
||||
label: 'French Polynesia (Polynésie française)';
|
||||
id: 'PF';
|
||||
dialCode: '+689';
|
||||
};
|
||||
GA: {label: 'Gabon'; id: 'GA'; dialCode: '+241'};
|
||||
GM: {label: 'Gambia'; id: 'GM'; dialCode: '+220'};
|
||||
GE: {label: 'Georgia (საქართველო)'; id: 'GE'; dialCode: '+995'};
|
||||
DE: {label: 'Germany (Deutschland)'; id: 'DE'; dialCode: '+49'};
|
||||
GH: {label: 'Ghana (Gaana)'; id: 'GH'; dialCode: '+233'};
|
||||
GI: {label: 'Gibraltar'; id: 'GI'; dialCode: '+350'};
|
||||
GR: {label: 'Greece (Ελλάδα)'; id: 'GR'; dialCode: '+30'};
|
||||
GL: {label: 'Greenland (Kalaallit Nunaat)'; id: 'GL'; dialCode: '+299'};
|
||||
GD: {label: 'Grenada'; id: 'GD'; dialCode: '+1473'};
|
||||
GP: {label: 'Guadeloupe'; id: 'GP'; dialCode: '+590'};
|
||||
GU: {label: 'Guam'; id: 'GU'; dialCode: '+1671'};
|
||||
GT: {label: 'Guatemala'; id: 'GT'; dialCode: '+502'};
|
||||
GG: {label: 'Guernsey'; id: 'GG'; dialCode: '+44'};
|
||||
GN: {label: 'Guinea (Guinée)'; id: 'GN'; dialCode: '+224'};
|
||||
GW: {label: 'Guinea-Bissau (Guiné Bissau)'; id: 'GW'; dialCode: '+245'};
|
||||
GY: {label: 'Guyana'; id: 'GY'; dialCode: '+592'};
|
||||
HT: {label: 'Haiti'; id: 'HT'; dialCode: '+509'};
|
||||
HN: {label: 'Honduras'; id: 'HN'; dialCode: '+504'};
|
||||
HK: {label: 'Hong Kong (香港)'; id: 'HK'; dialCode: '+852'};
|
||||
HU: {label: 'Hungary (Magyarország)'; id: 'HU'; dialCode: '+36'};
|
||||
IS: {label: 'Iceland (Ísland)'; id: 'IS'; dialCode: '+354'};
|
||||
IN: {label: 'India (भारत)'; id: 'IN'; dialCode: '+91'};
|
||||
ID: {label: 'Indonesia'; id: 'ID'; dialCode: '+62'};
|
||||
IR: {label: 'Iran (ایران)'; id: 'IR'; dialCode: '+98'};
|
||||
IQ: {label: 'Iraq (العراق)'; id: 'IQ'; dialCode: '+964'};
|
||||
IE: {label: 'Ireland'; id: 'IE'; dialCode: '+353'};
|
||||
IM: {label: 'Isle of Man'; id: 'IM'; dialCode: '+44'};
|
||||
IL: {label: 'Israel (ישראל)'; id: 'IL'; dialCode: '+972'};
|
||||
IT: {label: 'Italy (Italia)'; id: 'IT'; dialCode: '+39'};
|
||||
JM: {label: 'Jamaica'; id: 'JM'; dialCode: '+1'};
|
||||
JP: {label: 'Japan (日本)'; id: 'JP'; dialCode: '+81'};
|
||||
JE: {label: 'Jersey'; id: 'JE'; dialCode: '+44'};
|
||||
JO: {label: 'Jordan (الأردن)'; id: 'JO'; dialCode: '+962'};
|
||||
KZ: {label: 'Kazakhstan (Казахстан)'; id: 'KZ'; dialCode: '+7'};
|
||||
KE: {label: 'Kenya'; id: 'KE'; dialCode: '+254'};
|
||||
KI: {label: 'Kiribati'; id: 'KI'; dialCode: '+686'};
|
||||
XK: {label: 'Kosovo'; id: 'XK'; dialCode: '+383'};
|
||||
KW: {label: 'Kuwait (الكويت)'; id: 'KW'; dialCode: '+965'};
|
||||
KG: {label: 'Kyrgyzstan (Кыргызстан)'; id: 'KG'; dialCode: '+996'};
|
||||
LA: {label: 'Laos (ລາວ)'; id: 'LA'; dialCode: '+856'};
|
||||
LV: {label: 'Latvia (Latvija)'; id: 'LV'; dialCode: '+371'};
|
||||
LB: {label: 'Lebanon (لبنان)'; id: 'LB'; dialCode: '+961'};
|
||||
LS: {label: 'Lesotho'; id: 'LS'; dialCode: '+266'};
|
||||
LR: {label: 'Liberia'; id: 'LR'; dialCode: '+231'};
|
||||
LY: {label: 'Libya (ليبيا)'; id: 'LY'; dialCode: '+218'};
|
||||
LI: {label: 'Liechtenstein'; id: 'LI'; dialCode: '+423'};
|
||||
LT: {label: 'Lithuania (Lietuva)'; id: 'LT'; dialCode: '+370'};
|
||||
LU: {label: 'Luxembourg'; id: 'LU'; dialCode: '+352'};
|
||||
MO: {label: 'Macau (澳門)'; id: 'MO'; dialCode: '+853'};
|
||||
MK: {label: 'Macedonia (FYROM) (Македонија)'; id: 'MK'; dialCode: '+389'};
|
||||
MG: {label: 'Madagascar (Madagasikara)'; id: 'MG'; dialCode: '+261'};
|
||||
MW: {label: 'Malawi'; id: 'MW'; dialCode: '+265'};
|
||||
MY: {label: 'Malaysia'; id: 'MY'; dialCode: '+60'};
|
||||
MV: {label: 'Maldives'; id: 'MV'; dialCode: '+960'};
|
||||
ML: {label: 'Mali'; id: 'ML'; dialCode: '+223'};
|
||||
MT: {label: 'Malta'; id: 'MT'; dialCode: '+356'};
|
||||
MH: {label: 'Marshall Islands'; id: 'MH'; dialCode: '+692'};
|
||||
MQ: {label: 'Martinique'; id: 'MQ'; dialCode: '+596'};
|
||||
MR: {label: 'Mauritania (موريتانيا)'; id: 'MR'; dialCode: '+222'};
|
||||
MU: {label: 'Mauritius (Moris)'; id: 'MU'; dialCode: '+230'};
|
||||
YT: {label: 'Mayotte'; id: 'YT'; dialCode: '+262'};
|
||||
MX: {label: 'Mexico (México)'; id: 'MX'; dialCode: '+52'};
|
||||
FM: {label: 'Micronesia'; id: 'FM'; dialCode: '+691'};
|
||||
MD: {label: 'Moldova (Republica Moldova)'; id: 'MD'; dialCode: '+373'};
|
||||
MC: {label: 'Monaco'; id: 'MC'; dialCode: '+377'};
|
||||
MN: {label: 'Mongolia (Монгол)'; id: 'MN'; dialCode: '+976'};
|
||||
ME: {label: 'Montenegro (Crna Gora)'; id: 'ME'; dialCode: '+382'};
|
||||
MS: {label: 'Montserrat'; id: 'MS'; dialCode: '+1664'};
|
||||
MA: {label: 'Morocco (المغرب)'; id: 'MA'; dialCode: '+212'};
|
||||
MZ: {label: 'Mozambique (Moçambique)'; id: 'MZ'; dialCode: '+258'};
|
||||
MM: {label: 'Myanmar (Burma) (မြန်မာ)'; id: 'MM'; dialCode: '+95'};
|
||||
NA: {label: 'Namibia (Namibië)'; id: 'NA'; dialCode: '+264'};
|
||||
NR: {label: 'Nauru'; id: 'NR'; dialCode: '+674'};
|
||||
NP: {label: 'Nepal (नेपाल)'; id: 'NP'; dialCode: '+977'};
|
||||
NL: {label: 'Netherlands (Nederland)'; id: 'NL'; dialCode: '+31'};
|
||||
NC: {label: 'New Caledonia (Nouvelle-Calédonie)'; id: 'NC'; dialCode: '+687'};
|
||||
NZ: {label: 'New Zealand'; id: 'NZ'; dialCode: '+64'};
|
||||
NI: {label: 'Nicaragua'; id: 'NI'; dialCode: '+505'};
|
||||
NE: {label: 'Niger (Nijar)'; id: 'NE'; dialCode: '+227'};
|
||||
NG: {label: 'Nigeria'; id: 'NG'; dialCode: '+234'};
|
||||
NU: {label: 'Niue'; id: 'NU'; dialCode: '+683'};
|
||||
NF: {label: 'Norfolk Island'; id: 'NF'; dialCode: '+672'};
|
||||
KP: {
|
||||
label: 'North Korea (조선 민주주의 인민 공화국)';
|
||||
id: 'KP';
|
||||
dialCode: '+850';
|
||||
};
|
||||
MP: {label: 'Northern Mariana Islands'; id: 'MP'; dialCode: '+1670'};
|
||||
NO: {label: 'Norway (Norge)'; id: 'NO'; dialCode: '+47'};
|
||||
OM: {label: 'Oman (عُمان)'; id: 'OM'; dialCode: '+968'};
|
||||
PK: {label: 'Pakistan (پاکستان)'; id: 'PK'; dialCode: '+92'};
|
||||
PW: {label: 'Palau'; id: 'PW'; dialCode: '+680'};
|
||||
PS: {label: 'Palestine (فلسطين)'; id: 'PS'; dialCode: '+970'};
|
||||
PA: {label: 'Panama (Panamá)'; id: 'PA'; dialCode: '+507'};
|
||||
PG: {label: 'Papua New Guinea'; id: 'PG'; dialCode: '+675'};
|
||||
PY: {label: 'Paraguay'; id: 'PY'; dialCode: '+595'};
|
||||
PE: {label: 'Peru (Perú)'; id: 'PE'; dialCode: '+51'};
|
||||
PH: {label: 'Philippines'; id: 'PH'; dialCode: '+63'};
|
||||
PL: {label: 'Poland (Polska)'; id: 'PL'; dialCode: '+48'};
|
||||
PT: {label: 'Portugal'; id: 'PT'; dialCode: '+351'};
|
||||
PR: {label: 'Puerto Rico'; id: 'PR'; dialCode: '+1'};
|
||||
QA: {label: 'Qatar (قطر)'; id: 'QA'; dialCode: '+974'};
|
||||
RE: {label: 'Réunion (La Réunion)'; id: 'RE'; dialCode: '+262'};
|
||||
RO: {label: 'Romania (România)'; id: 'RO'; dialCode: '+40'};
|
||||
RU: {label: 'Russia (Россия)'; id: 'RU'; dialCode: '+7'};
|
||||
RW: {label: 'Rwanda'; id: 'RW'; dialCode: '+250'};
|
||||
BL: {label: 'Saint Barthélemy'; id: 'BL'; dialCode: '+590'};
|
||||
SH: {label: 'Saint Helena'; id: 'SH'; dialCode: '+290'};
|
||||
KN: {label: 'Saint Kitts and Nevis'; id: 'KN'; dialCode: '+1869'};
|
||||
LC: {label: 'Saint Lucia'; id: 'LC'; dialCode: '+1758'};
|
||||
MF: {
|
||||
label: 'Saint Martin (Saint-Martin (partie française))';
|
||||
id: 'MF';
|
||||
dialCode: '+590';
|
||||
};
|
||||
PM: {
|
||||
label: 'Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)';
|
||||
id: 'PM';
|
||||
dialCode: '+508';
|
||||
};
|
||||
VC: {label: 'Saint Vincent and the Grenadines'; id: 'VC'; dialCode: '+1784'};
|
||||
WS: {label: 'Samoa'; id: 'WS'; dialCode: '+685'};
|
||||
SM: {label: 'San Marino'; id: 'SM'; dialCode: '+378'};
|
||||
ST: {
|
||||
label: 'São Tomé and Príncipe (São Tomé e Príncipe)';
|
||||
id: 'ST';
|
||||
dialCode: '+239';
|
||||
};
|
||||
SA: {
|
||||
label: 'Saudi Arabia (المملكة العربية السعودية)';
|
||||
id: 'SA';
|
||||
dialCode: '+966';
|
||||
};
|
||||
SN: {label: 'Senegal (Sénégal)'; id: 'SN'; dialCode: '+221'};
|
||||
RS: {label: 'Serbia (Србија)'; id: 'RS'; dialCode: '+381'};
|
||||
SC: {label: 'Seychelles'; id: 'SC'; dialCode: '+248'};
|
||||
SL: {label: 'Sierra Leone'; id: 'SL'; dialCode: '+232'};
|
||||
SG: {label: 'Singapore'; id: 'SG'; dialCode: '+65'};
|
||||
SX: {label: 'Sint Maarten'; id: 'SX'; dialCode: '+1721'};
|
||||
SK: {label: 'Slovakia (Slovensko)'; id: 'SK'; dialCode: '+421'};
|
||||
SI: {label: 'Slovenia (Slovenija)'; id: 'SI'; dialCode: '+386'};
|
||||
SB: {label: 'Solomon Islands'; id: 'SB'; dialCode: '+677'};
|
||||
SO: {label: 'Somalia (Soomaaliya)'; id: 'SO'; dialCode: '+252'};
|
||||
ZA: {label: 'South Africa'; id: 'ZA'; dialCode: '+27'};
|
||||
KR: {label: 'South Korea (대한민국)'; id: 'KR'; dialCode: '+82'};
|
||||
SS: {label: 'South Sudan (جنوب السودان)'; id: 'SS'; dialCode: '+211'};
|
||||
ES: {label: 'Spain (España)'; id: 'ES'; dialCode: '+34'};
|
||||
LK: {label: 'Sri Lanka (ශ්රී ලංකාව)'; id: 'LK'; dialCode: '+94'};
|
||||
SD: {label: 'Sudan (السودان)'; id: 'SD'; dialCode: '+249'};
|
||||
SR: {label: 'Suriname'; id: 'SR'; dialCode: '+597'};
|
||||
SJ: {label: 'Svalbard and Jan Mayen'; id: 'SJ'; dialCode: '+47'};
|
||||
SZ: {label: 'Swaziland'; id: 'SZ'; dialCode: '+268'};
|
||||
SE: {label: 'Sweden (Sverige)'; id: 'SE'; dialCode: '+46'};
|
||||
CH: {label: 'Switzerland (Schweiz)'; id: 'CH'; dialCode: '+41'};
|
||||
SY: {label: 'Syria (سوريا)'; id: 'SY'; dialCode: '+963'};
|
||||
TW: {label: 'Taiwan (台灣)'; id: 'TW'; dialCode: '+886'};
|
||||
TJ: {label: 'Tajikistan'; id: 'TJ'; dialCode: '+992'};
|
||||
TZ: {label: 'Tanzania'; id: 'TZ'; dialCode: '+255'};
|
||||
TH: {label: 'Thailand (ไทย)'; id: 'TH'; dialCode: '+66'};
|
||||
TL: {label: 'Timor-Leste'; id: 'TL'; dialCode: '+670'};
|
||||
TG: {label: 'Togo'; id: 'TG'; dialCode: '+228'};
|
||||
TK: {label: 'Tokelau'; id: 'TK'; dialCode: '+690'};
|
||||
TO: {label: 'Tonga'; id: 'TO'; dialCode: '+676'};
|
||||
TT: {label: 'Trinisoad and Tobago'; id: 'TT'; dialCode: '+1868'};
|
||||
TN: {label: 'Tunisia (تونس)'; id: 'TN'; dialCode: '+216'};
|
||||
TR: {label: 'Turkey (Türkiye)'; id: 'TR'; dialCode: '+90'};
|
||||
TM: {label: 'Turkmenistan'; id: 'TM'; dialCode: '+993'};
|
||||
TC: {label: 'Turks and Caicos Islands'; id: 'TC'; dialCode: '+1649'};
|
||||
TV: {label: 'Tuvalu'; id: 'TV'; dialCode: '+688'};
|
||||
VI: {label: 'U.S. Virgin Islands'; id: 'VI'; dialCode: '+1340'};
|
||||
UG: {label: 'Uganda'; id: 'UG'; dialCode: '+256'};
|
||||
UA: {label: 'Ukraine (Україна)'; id: 'UA'; dialCode: '+380'};
|
||||
AE: {
|
||||
label: 'United Arab Emirates (الإمارات العربية المتحدة)';
|
||||
id: 'AE';
|
||||
dialCode: '+971';
|
||||
};
|
||||
GB: {label: 'United Kingdom'; id: 'GB'; dialCode: '+44'};
|
||||
US: {label: 'United States'; id: 'US'; dialCode: '+1'};
|
||||
UY: {label: 'Uruguay'; id: 'UY'; dialCode: '+598'};
|
||||
UZ: {label: 'Uzbekistan (Oʻzbekiston)'; id: 'UZ'; dialCode: '+998'};
|
||||
VU: {label: 'Vanuatu'; id: 'VU'; dialCode: '+678'};
|
||||
VA: {label: 'Vatican City (Città del Vaticano)'; id: 'VA'; dialCode: '+39'};
|
||||
VE: {label: 'Venezuela'; id: 'VE'; dialCode: '+58'};
|
||||
VN: {label: 'Vietnam (Việt Nam)'; id: 'VN'; dialCode: '+84'};
|
||||
WF: {
|
||||
label: 'Wallis and Futuna (Wallis-et-Futuna)';
|
||||
id: 'WF';
|
||||
dialCode: '+681';
|
||||
};
|
||||
YE: {label: 'Yemen (اليمن)'; id: 'YE'; dialCode: '+967'};
|
||||
ZM: {label: 'Zambia'; id: 'ZM'; dialCode: '+260'};
|
||||
ZW: {label: 'Zimbabwe'; id: 'ZW'; dialCode: '+263'};
|
||||
AX: {label: 'Åland Islands'; id: 'AX'; dialCode: '+358'};
|
||||
}
|
||||
|
||||
export interface PhoneInputOverrides {
|
||||
Input?: Override<any>;
|
||||
DialCode?: Override<any>;
|
||||
CountrySelect?: Override<any>;
|
||||
CountrySelectDropdown?: Override<any>;
|
||||
CountrySelectDropdownListItem?: Override<any>;
|
||||
CountrySelectDropdownFlagColumn?: Override<any>;
|
||||
CountrySelectDropdownNameColumn?: Override<any>;
|
||||
CountrySelectDropdownDialcodeColumn?: Override<any>;
|
||||
}
|
||||
export interface PhoneInputProps {
|
||||
'aria-label'?: string;
|
||||
text?: string;
|
||||
country?: Country;
|
||||
onTextChange?: (event: React.SyntheticEvent<HTMLInputElement>) => any;
|
||||
onCountryChange?: (event: OnChangeParams) => any;
|
||||
mapIsoToLabel?: (iso: string) => string;
|
||||
size?: SIZE[keyof SIZE];
|
||||
maxDropdownHeight?: string;
|
||||
maxDropdownWidth?: string;
|
||||
overrides?: PhoneInputOverrides;
|
||||
}
|
||||
export const PhoneInput: React.FC<PhoneInputProps>;
|
||||
|
||||
export interface StatefulPhoneInputProps {
|
||||
'aria-label'?: string;
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
onTextChange?: (event: React.SyntheticEvent<HTMLInputElement>) => any;
|
||||
onCountryChange?: (event: OnChangeParams) => any;
|
||||
mapIsoToLabel?: (iso: string) => string;
|
||||
overrides?: PhoneInputOverrides;
|
||||
}
|
||||
export const StatefulPhoneInput: React.FC<StatefulPhoneInputProps>;
|
||||
|
||||
export type StateReducer = (
|
||||
type: StateChange,
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
export interface StatefulPhoneInputContainerProps {
|
||||
'aria-label'?: string;
|
||||
children?: React.ReactNode;
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
onTextChange?: (event: React.SyntheticEvent<HTMLInputElement>) => any;
|
||||
onCountryChange?: (event: OnChangeParams) => any;
|
||||
mapIsoToLabel?: (iso: string) => string;
|
||||
overrides?: PhoneInputOverrides;
|
||||
}
|
||||
export interface Country {
|
||||
id: keyof COUNTRIES;
|
||||
label: string;
|
||||
dialCode: string;
|
||||
}
|
||||
export interface State {
|
||||
text?: string;
|
||||
country: Readonly<Country>;
|
||||
}
|
||||
export type StateChange = STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE];
|
||||
export class StatefulPhoneInputContainer extends React.Component<StatefulPhoneInputContainerProps, State> {
|
||||
internalSetState(type: StateChange, nextState: Readonly<State>): void;
|
||||
onTextChange(event: React.SyntheticEvent<HTMLInputElement>): void;
|
||||
onCountryChange(event: OnChangeParams): void;
|
||||
}
|
||||
|
||||
export interface CountrySelectProps {
|
||||
country?: Country;
|
||||
inputRef?: React.Ref<HTMLInputElement>;
|
||||
onCountryChange?: (event: OnChangeParams) => any;
|
||||
size?: SIZE[keyof SIZE];
|
||||
maxDropdownWidth?: string;
|
||||
maxDropdownHeight?: string;
|
||||
mapIsoToLabel?: (iso: string) => string;
|
||||
overrides?: {
|
||||
DialCode?: Override<any>;
|
||||
CountrySelect?: Override<any>;
|
||||
CountrySelectDropdown?: Override<any>;
|
||||
CountrySelectDropdownListItem?: Override<any>;
|
||||
CountrySelectDropdownFlagColumn?: Override<any>;
|
||||
CountrySelectDropdownNameColumn?: Override<any>;
|
||||
CountrySelectDropdownDialcodeColumn?: Override<any>;
|
||||
};
|
||||
}
|
||||
export const CountrySelect: React.FC<CountrySelectProps>;
|
||||
|
||||
export interface CountrySelectDropdownProps {
|
||||
children?: Readonly<React.ReactNode[]>;
|
||||
country?: Country;
|
||||
maxDropdownHeight?: string;
|
||||
mapIsoToLabel?: (iso: string) => string;
|
||||
overrides?: {
|
||||
CountrySelectDropdown?: Override<any>;
|
||||
CountrySelectDropdownListItem?: Override<any>;
|
||||
CountrySelectDropdownFlagColumn?: Override<any>;
|
||||
CountrySelectDropdownNameColumn?: Override<any>;
|
||||
CountrySelectDropdownDialcodeColumn?: Override<any>;
|
||||
};
|
||||
}
|
||||
export const CountrySelectDropdown: React.RefForwardingComponent<CountrySelectDropdownProps>;
|
||||
|
||||
export interface FlagProps {
|
||||
iso: COUNTRIES[keyof COUNTRIES];
|
||||
width?: string;
|
||||
}
|
||||
export const Flag: React.FC<FlagProps>;
|
||||
|
||||
export const StyledFlag: StyletronComponent<any>;
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledDialCode: StyletronComponent<any>;
|
||||
export const StyledCountrySelectDropdownContainer: StyletronComponent<any>;
|
||||
export const StyledCountrySelectDropdownListItem: StyletronComponent<any>;
|
||||
export const StyledCountrySelectDropdownFlagColumn: StyletronComponent<any>;
|
||||
export const StyledCountrySelectDropdownNameColumn: StyletronComponent<any>;
|
||||
export const StyledCountrySelectDropdownDialcodeColumn: StyletronComponent<any>;
|
||||
|
||||
export const DEFAULT_MAX_DROPDOWN_WIDTH: '400px';
|
||||
export const DEFAULT_MAX_DROPDOWN_HEIGHT: '400px';
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
export const COUNTRIES: COUNTRIES;
|
||||
Vendored
-179
@@ -1,179 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { NormalizedOffsets, PopperDataObject, TetherPlacement } from '../layer';
|
||||
|
||||
export interface ACCESSIBILITY_TYPE {
|
||||
none: 'none';
|
||||
menu: 'menu';
|
||||
tooltip: 'tooltip';
|
||||
}
|
||||
export interface PLACEMENT {
|
||||
auto: 'auto';
|
||||
topLeft: 'topLeft';
|
||||
top: 'top';
|
||||
topRight: 'topRight';
|
||||
rightTop: 'rightTop';
|
||||
right: 'right';
|
||||
rightBottom: 'rightBottom';
|
||||
bottomRight: 'bottomRight';
|
||||
bottom: 'bottom';
|
||||
bottomLeft: 'bottomLeft';
|
||||
leftBottom: 'leftBottom';
|
||||
left: 'left';
|
||||
leftTop: 'leftTop';
|
||||
}
|
||||
export interface TRIGGER_TYPE {
|
||||
click: 'click';
|
||||
hover: 'hover';
|
||||
}
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
open: 'open';
|
||||
close: 'close';
|
||||
}
|
||||
export type ANIMATE_IN_TIME = 20;
|
||||
export type ANIMATE_OUT_TIME = 0;
|
||||
|
||||
export type StateReducer = (
|
||||
stateChangeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
|
||||
export type StatefulPopoverProps = BasePopoverProps & {
|
||||
children?: React.ReactNode;
|
||||
content?: React.ReactNode | ((args: { close: () => void }) => React.ReactNode);
|
||||
dismissOnClickOutside?: boolean;
|
||||
dismissOnEsc?: boolean;
|
||||
initialState?: State;
|
||||
onClose?: () => any;
|
||||
onOpen?: () => any;
|
||||
stateReducer?: StateReducer;
|
||||
};
|
||||
export const StatefulPopover: React.FC<StatefulPopoverProps>;
|
||||
|
||||
export type StatefulPopoverContainerProps = StatefulPopoverProps & { children: (props: PopoverProps & { children: never }) => React.ReactNode };
|
||||
export interface State {
|
||||
isOpen: boolean;
|
||||
}
|
||||
export class StatefulContainer extends React.Component<StatefulPopoverContainerProps, State> {
|
||||
onBlur(): void;
|
||||
onClick(): void;
|
||||
onClickOutside(): void;
|
||||
onEsc(): void;
|
||||
onFocus(): void;
|
||||
onMouseEnter(): void;
|
||||
onMouseLeave(): void;
|
||||
onContentClose(): void;
|
||||
open(): void;
|
||||
close(): void;
|
||||
internalSetState(type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: State): void;
|
||||
}
|
||||
|
||||
export interface SharedStylePropsArg {
|
||||
$arrowOffset?: Offset;
|
||||
$isAnimating?: boolean;
|
||||
$isOpen?: boolean;
|
||||
$popoverOffset?: Offset;
|
||||
$placement?: TetherPlacement[keyof TetherPlacement];
|
||||
$showArrow?: boolean;
|
||||
}
|
||||
export interface Overrides {
|
||||
Body?: Override<SharedStylePropsArg>;
|
||||
Arrow?: Override<SharedStylePropsArg>;
|
||||
Inner?: Override<SharedStylePropsArg>;
|
||||
}
|
||||
export interface BasePopoverProps {
|
||||
accessibilityType?: ACCESSIBILITY_TYPE[keyof ACCESSIBILITY_TYPE];
|
||||
'data-baseweb'?: string;
|
||||
id?: string;
|
||||
ignoreBoundary?: boolean;
|
||||
onMouseEnterDelay?: number;
|
||||
onMouseLeaveDelay?: number;
|
||||
overrides?: Overrides;
|
||||
placement?: TetherPlacement[keyof TetherPlacement];
|
||||
showArrow?: boolean;
|
||||
triggerType?: TRIGGER_TYPE[keyof TRIGGER_TYPE];
|
||||
mountNode?: HTMLElement;
|
||||
animateOutTime?: number;
|
||||
}
|
||||
export type PopoverProps = BasePopoverProps & {
|
||||
children: React.ReactNode;
|
||||
content: React.ReactNode | (() => React.ReactNode);
|
||||
isOpen: boolean;
|
||||
onBlur?: () => any;
|
||||
onClick?: (e: Event) => any;
|
||||
onClickOutside?: (event: MouseEvent) => any;
|
||||
onEsc?: () => any;
|
||||
onFocus?: () => any;
|
||||
onMouseEnter?: () => any;
|
||||
onMouseLeave?: () => any;
|
||||
};
|
||||
|
||||
export interface Offset {
|
||||
top: number;
|
||||
left: number;
|
||||
}
|
||||
export interface PopoverPrivateState {
|
||||
isAnimating: boolean;
|
||||
arrowOffset: Offset;
|
||||
popoverOffset: Offset;
|
||||
placement: TetherPlacement[keyof TetherPlacement];
|
||||
isLayerMounted: boolean;
|
||||
isMounted: boolean;
|
||||
}
|
||||
export class Popover extends React.Component<PopoverProps, PopoverPrivateState> {
|
||||
init(prevProps: PopoverProps, prevState: PopoverPrivateState): void;
|
||||
getDefaultState(props: PopoverProps): {
|
||||
isAnimating: false;
|
||||
arrowOffset: {left: 0, top: 0};
|
||||
popoverOffset: {left: 0, top: 0};
|
||||
placement: PLACEMENT[keyof PLACEMENT];
|
||||
isMounted: false;
|
||||
isLayerMounted: false;
|
||||
};
|
||||
animateIn(): void;
|
||||
animateOut(): void;
|
||||
clearTimers(): void;
|
||||
onAnchorClick(e: Event): void;
|
||||
onAnchorMouseEnter(): void;
|
||||
onAnchorMouseLeave(): void;
|
||||
onPopoverMouseEnter(): void;
|
||||
onPopoverMouseLeave(): void;
|
||||
onKeyPress(evt: KeyboardEvent): void;
|
||||
onPopperUpdate(normalizedOffsets: NormalizedOffsets, data: PopperDataObject): void;
|
||||
triggerOnMouseLeaveWithDelay(): void;
|
||||
triggerOnMouseLeave(): void;
|
||||
triggerOnMouseEnterWithDelay(): void;
|
||||
triggerOnMouseEnter(): void;
|
||||
addDomEvents(): void;
|
||||
removeDomEvents(): void;
|
||||
onDocumentClick(evt: MouseEvent): void;
|
||||
isClickTrigger(): boolean;
|
||||
isHoverTrigger(): boolean;
|
||||
isAccessibilityTypeMenu(): boolean;
|
||||
isAccessibilityTypeTooltip(): boolean;
|
||||
getAnchorIdAttr(): string | null;
|
||||
getPopoverIdAttr(): string | null;
|
||||
getAnchorProps(): object;
|
||||
getPopoverBodyProps(): object;
|
||||
getSharedProps(): SharedStylePropsArg & { children?: React.ReactNode };
|
||||
getAnchorFromChildren(): React.ReactNode;
|
||||
renderAnchor(): React.ReactNode;
|
||||
renderPopover(): React.ReactNode;
|
||||
}
|
||||
|
||||
export const StyledArrow: StyletronComponent<any>;
|
||||
export const StyledBody: StyletronComponent<any>;
|
||||
export const StyledInner: StyletronComponent<any>;
|
||||
export const StyledPadding: StyletronComponent<any>;
|
||||
|
||||
export const ACCESSIBILITY_TYPE: ACCESSIBILITY_TYPE;
|
||||
export const PLACEMENT: PLACEMENT;
|
||||
export const TRIGGER_TYPE: TRIGGER_TYPE;
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
export const POPOVER_MARGIN: 8;
|
||||
export const ARROW_SIZE: 6;
|
||||
export const ANIMATE_IN_TIME: ANIMATE_IN_TIME;
|
||||
export const ANIMATE_OUT_TIME: ANIMATE_OUT_TIME;
|
||||
export const ARROW_WIDTH: number;
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface ProgressBarOverrides {
|
||||
Root?: Override<any>;
|
||||
Bar?: Override<any>;
|
||||
BarProgress?: Override<any>;
|
||||
Label?: Override<any>;
|
||||
}
|
||||
export interface ProgressBarProps {
|
||||
children?: React.ReactNode;
|
||||
getProgressLabel?: (value: number, successValue: number) => React.ReactNode;
|
||||
value?: number;
|
||||
successValue?: number;
|
||||
showLabel?: boolean;
|
||||
overrides?: ProgressBarOverrides;
|
||||
}
|
||||
export class ProgressBar extends React.Component<ProgressBarProps> {}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledBar: StyletronComponent<any>;
|
||||
export const StyledBarProgress: StyletronComponent<any>;
|
||||
export const StyledLabel: StyletronComponent<any>;
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface ProgressStepsOverrides {
|
||||
Root?: Override<any>;
|
||||
}
|
||||
export interface ProgressStepsProps {
|
||||
overrides?: ProgressStepsOverrides;
|
||||
children?: React.ReactNode;
|
||||
current?: number;
|
||||
}
|
||||
export const ProgressSteps: React.FC<ProgressStepsProps>;
|
||||
|
||||
export interface StepOverrides {
|
||||
Root?: Override<any>;
|
||||
Icon?: Override<any>;
|
||||
InnerIcon?: Override<any>;
|
||||
Tail?: Override<any>;
|
||||
Content?: Override<any>;
|
||||
Title?: Override<any>;
|
||||
Description?: Override<any>;
|
||||
}
|
||||
export interface StepProps {
|
||||
title?: React.ReactNode;
|
||||
isCompleted?: boolean;
|
||||
isActive?: boolean;
|
||||
isLast?: boolean;
|
||||
overrides?: StepOverrides;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
export const Step: React.FC<StepProps>;
|
||||
|
||||
export interface NumberedStepOverrides {
|
||||
Root?: Override<any>;
|
||||
Icon?: Override<any>;
|
||||
InnerIcon?: Override<any>;
|
||||
Tail?: Override<any>;
|
||||
Content?: Override<any>;
|
||||
Title?: Override<any>;
|
||||
Description?: Override<any>;
|
||||
}
|
||||
export interface NumberedStepProps {
|
||||
title?: string;
|
||||
isCompleted?: boolean;
|
||||
isActive?: boolean;
|
||||
isLast?: boolean;
|
||||
overrides?: NumberedStepOverrides;
|
||||
children?: React.ReactNode;
|
||||
step?: React.ReactNode;
|
||||
}
|
||||
export const NumberedStep: React.FC<NumberedStepProps>;
|
||||
|
||||
export interface StyleProps {
|
||||
$isActive?: boolean;
|
||||
$isCompleted?: boolean;
|
||||
$disabled?: boolean;
|
||||
}
|
||||
export const StyledProgressSteps: StyletronComponent<StyleProps>;
|
||||
export const StyledStep: StyletronComponent<StyleProps>;
|
||||
export const StyledIcon: StyletronComponent<StyleProps>;
|
||||
export const StyledInnerIcon: StyletronComponent<StyleProps>;
|
||||
export const StyledContent: StyletronComponent<StyleProps>;
|
||||
export const StyledContentTitle: StyletronComponent<StyleProps>;
|
||||
export const StyledContentTail: StyletronComponent<StyleProps>;
|
||||
export const StyledContentDescription: StyletronComponent<StyleProps>;
|
||||
export const StyledNumberStep: StyletronComponent<StyleProps>;
|
||||
export const StyledNumberIcon: StyletronComponent<StyleProps>;
|
||||
export const StyledNumberContentTail: StyletronComponent<StyleProps>;
|
||||
Vendored
-125
@@ -1,125 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_TYPE {
|
||||
change: 'CHANGE';
|
||||
}
|
||||
|
||||
export type StateReducer = (
|
||||
stateType: string,
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
event: React.SyntheticEvent<HTMLInputElement>
|
||||
) => State;
|
||||
|
||||
export interface State {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
overrides?: RadioOverrides & RadioGroupOverrides;
|
||||
children?: React.ReactNode;
|
||||
initialState?: State;
|
||||
stateReducer: StateReducer;
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
autoFocus?: boolean;
|
||||
}
|
||||
|
||||
export class StatefulContainer extends React.Component<StatefulContainerProps, State> {
|
||||
onChange(e: React.FormEventHandler<HTMLInputElement>): void;
|
||||
stateReducer(type: string, e: React.SyntheticEvent<HTMLInputElement>): void;
|
||||
}
|
||||
|
||||
export interface StatefulRadioGroupProps {
|
||||
overrides?: RadioOverrides & RadioGroupOverrides;
|
||||
children?: React.ReactNode;
|
||||
initialState?: State;
|
||||
autoFocus?: boolean;
|
||||
name?: string;
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
}
|
||||
|
||||
export const StatefulRadioGroup: React.FC<StatefulRadioGroupProps>;
|
||||
|
||||
export interface RadioGroupProps {
|
||||
'aria-label'?: string;
|
||||
'aria-labelledby'?: string;
|
||||
overrides?: RadioOverrides & RadioGroupOverrides;
|
||||
children?: React.ReactNode;
|
||||
value?: string;
|
||||
disabled?: boolean;
|
||||
required?: boolean;
|
||||
isError?: boolean;
|
||||
autoFocus?: boolean;
|
||||
align?: string;
|
||||
name?: string;
|
||||
labelPlacement?: 'top' | 'right' | 'bottom' | 'left';
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
||||
}
|
||||
|
||||
export class RadioGroup extends React.Component<RadioGroupProps> {}
|
||||
|
||||
export interface RadioOverrides {
|
||||
RadioMarkInner?: Override<any>;
|
||||
RadioMarkOuter?: Override<any>;
|
||||
Label?: Override<any>;
|
||||
Root?: Override<any>;
|
||||
Input?: Override<any>;
|
||||
Description?: Override<any>;
|
||||
}
|
||||
|
||||
export interface RadioGroupOverrides {
|
||||
RadioGroupRoot?: Override<any>;
|
||||
}
|
||||
|
||||
export interface RadioProps {
|
||||
autoFocus?: boolean;
|
||||
checked?: boolean;
|
||||
children?: React.ReactNode;
|
||||
description?: string;
|
||||
disabled?: boolean;
|
||||
inputRef?: React.Ref<HTMLInputElement>;
|
||||
isError?: boolean;
|
||||
labelPlacement?: 'top' | 'right' | 'bottom' | 'left';
|
||||
name?: string;
|
||||
onChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
||||
onMouseDown?: React.MouseEventHandler<HTMLInputElement>;
|
||||
onMouseUp?: React.MouseEventHandler<HTMLInputElement>;
|
||||
overrides?: RadioOverrides & RadioGroupOverrides;
|
||||
required?: boolean;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface RadioState {
|
||||
isActive: boolean;
|
||||
isFocused: boolean;
|
||||
isHovered: boolean;
|
||||
}
|
||||
|
||||
export class Radio extends React.Component<RadioProps, RadioState> {
|
||||
onMouseEnter(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onMouseLeave(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onMouseDown(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onMouseUp(event: React.MouseEventHandler<HTMLInputElement>): void;
|
||||
onFocus(event: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
onBlur(event: React.FocusEventHandler<HTMLInputElement>): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledLabel: StyletronComponent<any>;
|
||||
export const StyledInput: StyletronComponent<any>;
|
||||
export const StyledDescription: StyletronComponent<any>;
|
||||
export const StyledRadioMarkInner: StyletronComponent<any>;
|
||||
export const StyledRadioMarkOuter: StyletronComponent<any>;
|
||||
export const StyledRadioGroupRoot: StyletronComponent<any>;
|
||||
|
||||
export const STATE_TYPE: STATE_TYPE;
|
||||
Vendored
-48
@@ -1,48 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface RatingState {
|
||||
previewIndex?: number;
|
||||
}
|
||||
export interface RatingOverrides {
|
||||
Root?: Override<any>;
|
||||
Item?: Override<any>;
|
||||
}
|
||||
|
||||
export interface StarRatingProps {
|
||||
overrides?: RatingOverrides;
|
||||
value?: number;
|
||||
numItems?: number;
|
||||
onChange?: (args: {value: number}) => any;
|
||||
}
|
||||
|
||||
export interface EmoticonRatingProps {
|
||||
overrides?: RatingOverrides;
|
||||
value?: number;
|
||||
onChange?: (args: {value: number}) => any;
|
||||
}
|
||||
export class StarRating extends React.Component<StarRatingProps, RatingState> {
|
||||
selectItem(value: number): void;
|
||||
updatePreview(previewIndex?: number): void;
|
||||
renderRatingContents(): React.ReactNode[];
|
||||
}
|
||||
|
||||
export class EmoticonRating extends React.Component<EmoticonRatingProps, RatingState> {
|
||||
selectItem(value: number): void;
|
||||
updatePreview(previewIndex?: number): void;
|
||||
renderRatingContents(): React.ReactNode[];
|
||||
}
|
||||
|
||||
export interface StyledRootProps {
|
||||
$theme: Theme;
|
||||
}
|
||||
export interface StyledRatingItemProps {
|
||||
$theme: Theme;
|
||||
$isActive: boolean;
|
||||
$isSelected: boolean;
|
||||
$index: number;
|
||||
}
|
||||
export const StyledRoot: StyletronComponent<StyledRootProps>;
|
||||
export const StyledStar: StyletronComponent<StyledRatingItemProps>;
|
||||
export const StyledEmoticon: StyletronComponent<StyledRatingItemProps>;
|
||||
Vendored
-303
@@ -1,303 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { SIZE } from '../input';
|
||||
import { OnItemSelect } from '../menu';
|
||||
|
||||
export interface TYPE {
|
||||
select: 'select';
|
||||
search: 'search';
|
||||
}
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
select: 'select';
|
||||
remove: 'remove';
|
||||
clear: 'clear';
|
||||
}
|
||||
|
||||
export interface Option {
|
||||
readonly id?: string | number;
|
||||
readonly label?: React.ReactNode;
|
||||
readonly disabled?: boolean;
|
||||
readonly clearableValue?: boolean;
|
||||
readonly isCreatable?: boolean;
|
||||
}
|
||||
export type Value = ReadonlyArray<Option>;
|
||||
|
||||
export type ChangeAction = () => any;
|
||||
|
||||
export type filterOptions = (
|
||||
options: Value,
|
||||
filterValue: string,
|
||||
excludeOptions?: Value,
|
||||
newProps?: {
|
||||
filterOption?: (option: Option, filterValue: string) => boolean;
|
||||
ignoreCase?: boolean;
|
||||
labelKey?: string;
|
||||
matchPos?: 'any' | 'start';
|
||||
matchProp?: 'any' | 'label' | 'value';
|
||||
trimFilter?: boolean;
|
||||
valueKey?: string;
|
||||
}
|
||||
) => Value;
|
||||
|
||||
export interface SelectOverrides {
|
||||
Root?: Override<any>;
|
||||
ControlContainer?: Override<any>;
|
||||
Placeholder?: Override<any>;
|
||||
ValueContainer?: Override<any>;
|
||||
SingleValue?: Override<any>;
|
||||
MultiValue?: Override<any>;
|
||||
InputContainer?: Override<any>;
|
||||
Input?: Override<any>;
|
||||
IconsContainer?: Override<any>;
|
||||
SelectArrow?: Override<any>;
|
||||
ClearIcon?: Override<any>;
|
||||
LoadingIndicator?: Override<any>;
|
||||
SearchIcon?: Override<any>;
|
||||
Popover?: Override<any>;
|
||||
DropdownContainer?: Override<any>;
|
||||
Dropdown?: Override<any>;
|
||||
DropdownOption?: Override<any>;
|
||||
DropdownListItem?: Override<any>;
|
||||
OptionContent?: Override<any>;
|
||||
StatefulMenu?: Override<any>;
|
||||
}
|
||||
export interface SelectProps {
|
||||
'aria-label'?: string;
|
||||
'aria-describedby'?: string;
|
||||
'aria-labelledby'?: string;
|
||||
autoFocus?: boolean;
|
||||
backspaceRemoves?: boolean;
|
||||
clearable?: boolean;
|
||||
closeOnSelect?: boolean;
|
||||
creatable?: boolean;
|
||||
deleteRemoves?: boolean;
|
||||
disabled?: boolean;
|
||||
error?: boolean;
|
||||
positive?: boolean;
|
||||
escapeClearsValue?: boolean;
|
||||
filterOptions?: (
|
||||
options: Value,
|
||||
filterValue: string,
|
||||
excludeOptions?: Value,
|
||||
newProps?: {valueKey: string, labelKey: string},
|
||||
) => Value;
|
||||
filterOutSelected?: boolean;
|
||||
getOptionLabel?: (args: {
|
||||
option?: Option,
|
||||
optionState: {
|
||||
$selected?: boolean;
|
||||
$disabled?: boolean;
|
||||
$isHighlighted?: boolean;
|
||||
}
|
||||
}) => React.ReactNode;
|
||||
getValueLabel?: (args: {option: Option}) => React.ReactNode;
|
||||
isLoading?: boolean;
|
||||
labelKey?: string;
|
||||
maxDropdownHeight?: string;
|
||||
multi?: boolean;
|
||||
noResultsMsg?: React.ReactNode;
|
||||
onBlur?: (e: Event) => any;
|
||||
onBlurResetsInput?: boolean;
|
||||
onChange?: (params: OnChangeParams) => any;
|
||||
onFocus?: React.FocusEventHandler<HTMLElement>;
|
||||
onInputChange?: React.FormEventHandler<HTMLInputElement>;
|
||||
onCloseResetsInput?: boolean;
|
||||
onSelectResetsInput?: boolean;
|
||||
onOpen?: () => any;
|
||||
onClose?: () => any;
|
||||
openOnClick?: boolean;
|
||||
options?: Value;
|
||||
overrides?: SelectOverrides;
|
||||
placeholder?: React.ReactNode;
|
||||
required?: boolean;
|
||||
searchable?: boolean;
|
||||
size?: SIZE[keyof SIZE];
|
||||
type?: TYPE[keyof TYPE];
|
||||
value?: Value;
|
||||
valueKey?: string;
|
||||
mountNode?: HTMLElement;
|
||||
}
|
||||
export interface SelectState {
|
||||
inputValue: string;
|
||||
isFocused: boolean;
|
||||
isOpen: boolean;
|
||||
isPseudoFocused: boolean;
|
||||
}
|
||||
export class Select extends React.Component<SelectProps, SelectState> {
|
||||
focus(): void;
|
||||
handleTouchOutside(event: TouchEvent): void;
|
||||
handleTouchMove(): void;
|
||||
handleTouchStart(): void;
|
||||
handleTouchEnd(event: TouchEvent): void;
|
||||
handleTouchEndClearValue(event: TouchEvent): void;
|
||||
handleClick(event: MouseEvent | TouchEvent): void;
|
||||
closeMenu(): void;
|
||||
handleInputFocus(event: React.FocusEventHandler<HTMLElement>): void;
|
||||
handleBlur(event: Event): void;
|
||||
handleClickOutside(event: MouseEvent): void;
|
||||
handleInputChange(event: React.FormEventHandler<HTMLInputElement>): void;
|
||||
handleKeyDown(event: KeyboardEvent): void;
|
||||
getOptionLabel(locale: Locale, {option}: {
|
||||
option: Option;
|
||||
optionState: {
|
||||
$selected: boolean;
|
||||
$disabled: boolean;
|
||||
$isHighlighted: boolean;
|
||||
}
|
||||
}): React.ReactNode;
|
||||
getValueLabel({option}: {option: Option}): React.ReactNode;
|
||||
getValueArray(value: Value): Option[];
|
||||
setValue(value: Value, option: Option, type: ChangeAction): void;
|
||||
selectValue({item}: {item: Option}): void;
|
||||
addValue(item: Option): void;
|
||||
popValue(): void;
|
||||
removeValue(item: Option): void;
|
||||
clearValue(event: KeyboardEvent | MouseEvent | TouchEvent): void;
|
||||
renderLoading(): React.ReactNode;
|
||||
renderValue(valueArray: Value, isOpen: boolean, locale: Locale): React.ReactNode;
|
||||
renderInput(): React.ReactNode;
|
||||
renderClear(): React.ReactNode;
|
||||
renderArrow(): React.ReactNode;
|
||||
renderSearch(): React.ReactNode;
|
||||
filterOption(excludeOptions?: Value): Value;
|
||||
getSharedProps(): {
|
||||
$clearable: boolean;
|
||||
$creatable: boolean;
|
||||
$disabled: boolean;
|
||||
$error: boolean;
|
||||
$positive: boolean;
|
||||
$isFocused: boolean;
|
||||
$isLoading: boolean;
|
||||
$isOpen: boolean;
|
||||
$isPseudoFocused: boolean;
|
||||
$multi: boolean;
|
||||
$required: boolean;
|
||||
$searchable: boolean;
|
||||
$size: SIZE[keyof SIZE];
|
||||
$type: TYPE[keyof TYPE];
|
||||
};
|
||||
}
|
||||
|
||||
export const SingleValue: React.FC<any>;
|
||||
export const MultiValue: React.FC<any>;
|
||||
|
||||
export interface AutosizeInputOverrides {
|
||||
Input?: Override<any>;
|
||||
}
|
||||
export interface AutosizeInputProps {
|
||||
value?: string;
|
||||
defaultValue?: string;
|
||||
inputRef?: React.Ref<any>;
|
||||
overrides?: AutosizeInputOverrides;
|
||||
$size?: SIZE[keyof SIZE];
|
||||
}
|
||||
export interface AutosizeInputState {
|
||||
inputWidth: number;
|
||||
}
|
||||
export class AutosizeInput extends React.Component<AutosizeInputProps, AutosizeInputState> {
|
||||
sizerRef(el?: HTMLElement): void;
|
||||
updateInputWidth(): void;
|
||||
}
|
||||
|
||||
export interface DropdownOverrides {
|
||||
DropdownContainer?: Override<any>;
|
||||
Dropdown?: Override<any>;
|
||||
DropdownOption?: Override<any>;
|
||||
DropdownListItem?: Override<any>;
|
||||
OptionContent?: Override<any>;
|
||||
StatefulMenu?: Override<any>;
|
||||
}
|
||||
export interface DropdownProps {
|
||||
error?: boolean;
|
||||
getOptionLabel?: (args: {
|
||||
option: Option;
|
||||
optionState: {
|
||||
$selected: boolean;
|
||||
$disabled: boolean;
|
||||
$isHighlighted: boolean;
|
||||
};
|
||||
}) => React.ReactNode;
|
||||
innerRef?: React.Ref<any>;
|
||||
isLoading?: boolean;
|
||||
labelKey?: string;
|
||||
maxDropdownHeight?: string;
|
||||
multi?: boolean;
|
||||
noResultsMsg?: React.ReactNode;
|
||||
onItemSelect?: OnItemSelect;
|
||||
options?: Value;
|
||||
overrides?: DropdownOverrides;
|
||||
required?: boolean;
|
||||
searchable?: boolean;
|
||||
size?: SIZE[keyof SIZE];
|
||||
type?: TYPE[keyof TYPE];
|
||||
value?: Value;
|
||||
valueKey?: string;
|
||||
width?: number;
|
||||
}
|
||||
export class SelectDropdown extends React.Component<DropdownProps> {
|
||||
getSharedProps(): {
|
||||
$error: boolean;
|
||||
$isLoading: boolean;
|
||||
$multi: boolean;
|
||||
$required: boolean;
|
||||
$searchable: boolean;
|
||||
$size: SIZE[keyof SIZE];
|
||||
$type: TYPE[keyof TYPE];
|
||||
$width: number;
|
||||
};
|
||||
getItemLabel(option: {[key: string]: any}): React.ReactNode;
|
||||
onMouseDown(e: Event): void;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
value: Value;
|
||||
}
|
||||
export type StateReducer = (
|
||||
stateType: string,
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
export interface OnChangeParams {
|
||||
value?: Value;
|
||||
option?: Option;
|
||||
type?: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE];
|
||||
}
|
||||
export type StatefulSelectProps = SelectProps & {
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
onChange?: (params: OnChangeParams) => any;
|
||||
};
|
||||
export const StatefulSelect: React.FC<StatefulSelectProps>;
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
overrides?: SelectOverrides;
|
||||
children?: React.ReactNode;
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
onChange?: (params: OnChangeParams) => any;
|
||||
}
|
||||
export class StatefulSelectContainer extends React.Component<StatefulContainerProps, State> {
|
||||
onChange(params: OnChangeParams): void;
|
||||
internalSetState(params: OnChangeParams): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledControlContainer: StyletronComponent<any>;
|
||||
export const StyledValueContainer: StyletronComponent<any>;
|
||||
export const StyledPlaceholder: StyletronComponent<any>;
|
||||
export const StyledSingleValue: StyletronComponent<any>;
|
||||
export const StyledInputContainer: StyletronComponent<any>;
|
||||
export const StyledInput: StyletronComponent<any>;
|
||||
export const StyledInputSizer: StyletronComponent<any>;
|
||||
export const StyledIconsContainer: StyletronComponent<any>;
|
||||
export const StyledSelectArrow: StyletronComponent<any>;
|
||||
export const StyledClearIcon: StyletronComponent<any>;
|
||||
export const StyledSearchIcon: StyletronComponent<any>;
|
||||
export const StyledDropdownContainer: StyletronComponent<any>;
|
||||
export const StyledDropdown: StyletronComponent<any>;
|
||||
export const StyledDropdownListItem: StyletronComponent<any>;
|
||||
export const StyledOptionContent: StyletronComponent<any>;
|
||||
|
||||
export const TYPE: TYPE;
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
title: React.ReactNode;
|
||||
itemId?: string;
|
||||
subNav?: Item[];
|
||||
}
|
||||
|
||||
export interface NavigationOverrides {
|
||||
Root?: Override<any>;
|
||||
NavItemContainer?: Override<any>;
|
||||
NavLink?: Override<any>;
|
||||
NavItem?: Override<any>;
|
||||
SubNavContainer?: Override<any>;
|
||||
}
|
||||
|
||||
export interface NavigationProps {
|
||||
activeItemId: string;
|
||||
activePredicate?: (item: any, activeItemId: string) => boolean;
|
||||
items?: Item[];
|
||||
onChange?: (args: {item: any, event: React.SyntheticEvent<any>}) => any;
|
||||
overrides?: NavigationOverrides;
|
||||
mapItem?: (item: Item) => Item;
|
||||
}
|
||||
|
||||
export class Navigation extends React.Component<NavigationProps> {
|
||||
activePredicate(item: Item): boolean;
|
||||
}
|
||||
|
||||
export interface NavItemOverrides {
|
||||
NavLink?: Override<any>;
|
||||
NavItem?: Override<any>;
|
||||
}
|
||||
|
||||
export interface NavItemProps {
|
||||
$active?: boolean;
|
||||
$level?: number;
|
||||
$selectable?: boolean;
|
||||
item: Item;
|
||||
onSelect?: (args: {item: any, event: Event | KeyboardEvent}) => any;
|
||||
overrides?: NavItemOverrides;
|
||||
}
|
||||
|
||||
export class NavItem extends React.Component<NavItemProps> {
|
||||
handleClick(event: React.MouseEventHandler): void;
|
||||
handleKeyDown(event: React.KeyboardEventHandler): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledNavItemContainer: StyletronComponent<any>;
|
||||
export const StyledNavLink: StyletronComponent<any>;
|
||||
export const StyledNavItem: StyletronComponent<any>;
|
||||
export const StyledSubNavContainer: StyletronComponent<any>;
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
Vendored
-75
@@ -1,75 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
|
||||
export interface State {
|
||||
value: number[];
|
||||
}
|
||||
|
||||
export type StateReducer = (
|
||||
stateType: string,
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
|
||||
export interface SliderOverrides {
|
||||
Root?: Override<any>;
|
||||
Track?: Override<any>;
|
||||
InnerTrack?: Override<any>;
|
||||
Tick?: Override<any>;
|
||||
TickBar?: Override<any>;
|
||||
Thumb?: Override<any>;
|
||||
InnerThumb?: Override<any>;
|
||||
ThumbValue?: Override<any>;
|
||||
}
|
||||
|
||||
export interface SliderProps {
|
||||
value: number[];
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
overrides?: SliderOverrides;
|
||||
disabled?: boolean;
|
||||
onChange?: (e: State) => any;
|
||||
}
|
||||
|
||||
export interface StatefulSliderProps {
|
||||
overrides?: SliderOverrides;
|
||||
initialState?: State;
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
onChange?: (e: State) => any;
|
||||
}
|
||||
|
||||
export interface StatefulContainerProps {
|
||||
overrides?: SliderOverrides;
|
||||
children?: React.ReactNode;
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
onChange?: (e: State) => any;
|
||||
}
|
||||
|
||||
export const Slider: React.FC<SliderProps>;
|
||||
export const StatefulSlider: React.FC<StatefulSliderProps>;
|
||||
export class StatefulContainer extends React.Component<StatefulContainerProps, State> {
|
||||
onChange(params: State): any;
|
||||
internalSetState(type: 'change', {value}: State): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledTrack: StyletronComponent<any>;
|
||||
export const StyledInnerTrack: StyletronComponent<any>;
|
||||
export const StyledThumb: StyletronComponent<any>;
|
||||
export const StyledInnerThumb: StyletronComponent<any>;
|
||||
export const StyledTick: StyletronComponent<any>;
|
||||
export const StyledTickBar: StyletronComponent<any>;
|
||||
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface SpinnerProps {
|
||||
size?: number | string;
|
||||
color?: string;
|
||||
title?: string;
|
||||
overrides?: {
|
||||
Svg?: Override<any>;
|
||||
ActivePath?: Override<any>;
|
||||
TrackPath?: Override<any>;
|
||||
};
|
||||
}
|
||||
export class Spinner extends React.Component<SpinnerProps> {}
|
||||
|
||||
export const StyledSvg: StyletronComponent<any>;
|
||||
export const StyledTrackPath: StyletronComponent<any>;
|
||||
export const StyledActivePath: StyletronComponent<any>;
|
||||
Vendored
-51
@@ -1,51 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface SortableHeadCellProps {
|
||||
children?: React.ReactNode;
|
||||
direction: 'ASC' | 'DESC' | null;
|
||||
disabled?: boolean;
|
||||
onSort?: () => any;
|
||||
overrides?: {
|
||||
HeadCell?: Override<any>;
|
||||
SortableLabel?: Override<any>;
|
||||
};
|
||||
title: string;
|
||||
}
|
||||
export const SortableHeadCell: React.FC<SortableHeadCellProps>;
|
||||
|
||||
export interface TableProps {
|
||||
columns: Array<string | React.ReactNode>;
|
||||
data: React.ReactNode[][];
|
||||
horizontalScrollWidth?: string;
|
||||
isLoading?: boolean;
|
||||
}
|
||||
export class Table extends React.Component<TableProps> {}
|
||||
|
||||
export interface FilterProps {
|
||||
active?: boolean;
|
||||
children: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
onReset?: () => any;
|
||||
onSelectAll?: () => any;
|
||||
overrides?: {
|
||||
MenuButton?: Override<any>;
|
||||
Content?: Override<any>;
|
||||
Heading?: Override<any>;
|
||||
Footer?: Override<any>;
|
||||
};
|
||||
}
|
||||
export const Filter: React.FC<FilterProps>;
|
||||
|
||||
export const StyledTable: React.FC<any>;
|
||||
export const StyledFilterButton: StyletronComponent<any>;
|
||||
export const StyledFilterContent: StyletronComponent<any>;
|
||||
export const StyledFilterHeading: StyletronComponent<any>;
|
||||
export const StyledFilterFooter: StyletronComponent<any>;
|
||||
export const StyledHead: StyletronComponent<any>;
|
||||
export const StyledHeadCell: StyletronComponent<any>;
|
||||
export const StyledBody: StyletronComponent<any>;
|
||||
export const StyledRow: StyletronComponent<any>;
|
||||
export const StyledCell: StyletronComponent<any>;
|
||||
export const StyledAction: StyletronComponent<any>;
|
||||
Vendored
-88
@@ -1,88 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface ORIENTATION {
|
||||
horizontal: 'horizontal';
|
||||
vertical: 'vertical';
|
||||
}
|
||||
export interface STATE_CHANGE_TYPE {
|
||||
change: 'change';
|
||||
}
|
||||
|
||||
export interface State {
|
||||
activeKey: React.Key;
|
||||
}
|
||||
|
||||
export type StateReducer = (
|
||||
stateChangeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
|
||||
nextState: State,
|
||||
currentState: State,
|
||||
) => State;
|
||||
|
||||
export interface TabsOverrides<T> {
|
||||
Root?: Override<T>;
|
||||
TabBar?: Override<T>;
|
||||
TabContent?: Override<T>;
|
||||
}
|
||||
|
||||
export interface TabsProps {
|
||||
children: React.ReactNode;
|
||||
activeKey?: React.Key;
|
||||
disabled?: boolean;
|
||||
onChange?: (args: {activeKey: React.Key}) => any;
|
||||
orientation?: ORIENTATION[keyof ORIENTATION];
|
||||
overrides?: TabsOverrides<SharedProps & {$active?: boolean}>;
|
||||
}
|
||||
|
||||
export const Tabs: React.FC<TabsProps>;
|
||||
|
||||
export type StatefulTabsProps = TabsProps & {
|
||||
activeKey?: never;
|
||||
initialState?: State;
|
||||
stateReducer?: StateReducer;
|
||||
};
|
||||
|
||||
export class StatefulTabs extends React.Component<StatefulTabsProps, State> {
|
||||
onTabChange(newState: State): void;
|
||||
internalSetState(type: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE], changes: State): void;
|
||||
getInitialKey(): any;
|
||||
}
|
||||
|
||||
export interface TabOverrides<T> {
|
||||
Tab?: Override<T>;
|
||||
}
|
||||
|
||||
export interface SharedProps {
|
||||
$disabled?: boolean;
|
||||
$active?: boolean;
|
||||
$orientation?: ORIENTATION[keyof ORIENTATION];
|
||||
}
|
||||
|
||||
export interface TabProps {
|
||||
children?: React.ReactNode;
|
||||
disabled?: boolean;
|
||||
active?: boolean;
|
||||
key?: React.Key;
|
||||
onClick?: (e: Event) => any;
|
||||
onKeyDown?: (e: KeyboardEvent) => any;
|
||||
onSelect?: () => any;
|
||||
overrides?: TabOverrides<SharedProps>;
|
||||
title?: React.ReactNode;
|
||||
id?: string;
|
||||
$orientation?: ORIENTATION[keyof ORIENTATION];
|
||||
}
|
||||
|
||||
export class Tab extends React.Component<TabProps> {
|
||||
onClick(e: Event): void;
|
||||
onKeyDown(e: KeyboardEvent): void;
|
||||
getSharedProps(): SharedProps;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledTab: StyletronComponent<any>;
|
||||
export const StyledTabBar: StyletronComponent<any>;
|
||||
export const StyledTabContent: StyletronComponent<any>;
|
||||
|
||||
export const ORIENTATION: ORIENTATION;
|
||||
export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
|
||||
Vendored
-53
@@ -1,53 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface KIND {
|
||||
neutral: 'neutral';
|
||||
primary: 'primary';
|
||||
positive: 'positive';
|
||||
warning: 'warning';
|
||||
negative: 'negative';
|
||||
custom: 'custom';
|
||||
}
|
||||
export interface VARIANT {
|
||||
solid: 'solid';
|
||||
light: 'light';
|
||||
outlined: 'outlined';
|
||||
}
|
||||
|
||||
export interface TagOverrides {
|
||||
Root?: Override<any>;
|
||||
Action?: Override<any>;
|
||||
ActionIcon?: Override<any>;
|
||||
Text?: Override<any>;
|
||||
}
|
||||
|
||||
export interface TagProps {
|
||||
overrides?: TagOverrides;
|
||||
closeable?: boolean;
|
||||
disabled?: boolean;
|
||||
isFocused?: boolean;
|
||||
isHovered?: boolean;
|
||||
kind?: KIND[keyof KIND];
|
||||
variant?: VARIANT[keyof VARIANT];
|
||||
children?: React.ReactNode;
|
||||
color?: string;
|
||||
onActionClick?: (e: Event, children?: React.ReactNode) => any;
|
||||
onActionKeyDown?: (e: Event, children?: React.ReactNode) => any;
|
||||
onClick?: (event: Event) => any;
|
||||
onKeyDown?: (event: Event) => any;
|
||||
}
|
||||
|
||||
export class Tag extends React.Component<TagProps> {
|
||||
handleKeyDown(event: KeyboardEvent): void;
|
||||
handleActionKeyDown(event: KeyboardEvent): void;
|
||||
}
|
||||
|
||||
export const StyledRoot: StyletronComponent<any>;
|
||||
export const StyledAction: StyletronComponent<any>;
|
||||
export const StyledActionIcon: StyletronComponent<any>;
|
||||
export const StyledText: StyletronComponent<any>;
|
||||
|
||||
export const KIND: KIND;
|
||||
export const VARIANT: VARIANT;
|
||||
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { BaseInputProps, StatefulContainer, STATE_CHANGE_TYPE, SIZE, StatefulContainerProps } from '../input';
|
||||
|
||||
export interface TextareaProps extends BaseInputProps<HTMLTextAreaElement> {
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export class Textarea extends React.Component<TextareaProps> {}
|
||||
|
||||
export type StatefulTextareaProps = TextareaProps & StatefulContainerProps & { children?: never; };
|
||||
|
||||
export const StatefulTextarea: React.FC<StatefulTextareaProps>;
|
||||
|
||||
export { StatefulContainer };
|
||||
|
||||
export const StyledTextareaContainer: StyletronComponent<any>;
|
||||
export const StyledTextarea: StyletronComponent<any>;
|
||||
Vendored
-549
@@ -1,549 +0,0 @@
|
||||
interface Breakpoints {
|
||||
small?: number;
|
||||
medium?: number;
|
||||
large?: number;
|
||||
}
|
||||
|
||||
interface Colors {
|
||||
// Primary Palette
|
||||
primary50?: string;
|
||||
primary100?: string;
|
||||
primary200?: string;
|
||||
primary300?: string;
|
||||
primary400?: string;
|
||||
primary?: string;
|
||||
primary500?: string;
|
||||
primary600?: string;
|
||||
primary700?: string;
|
||||
|
||||
// Alert Palette
|
||||
negative50?: string;
|
||||
negative100?: string;
|
||||
negative200?: string;
|
||||
negative300?: string;
|
||||
negative400?: string;
|
||||
negative?: string;
|
||||
negative500?: string;
|
||||
negative600?: string;
|
||||
negative700?: string;
|
||||
|
||||
// Warning Palette
|
||||
warning50?: string;
|
||||
warning100?: string;
|
||||
warning200?: string;
|
||||
warning300?: string;
|
||||
warning400?: string;
|
||||
warning?: string;
|
||||
warning500?: string;
|
||||
warning600?: string;
|
||||
warning700?: string;
|
||||
|
||||
// Success Palette
|
||||
positive50?: string;
|
||||
positive100?: string;
|
||||
positive200?: string;
|
||||
positive300?: string;
|
||||
positive400?: string;
|
||||
positive?: string;
|
||||
positive500?: string;
|
||||
positive600?: string;
|
||||
positive700?: string;
|
||||
|
||||
// Monochrome Palette
|
||||
white?: string;
|
||||
mono100?: string;
|
||||
mono200?: string;
|
||||
mono300?: string;
|
||||
mono400?: string;
|
||||
mono500?: string;
|
||||
mono600?: string;
|
||||
mono700?: string;
|
||||
mono800?: string;
|
||||
mono900?: string;
|
||||
mono1000?: string;
|
||||
black?: string;
|
||||
|
||||
// Rating Palette
|
||||
rating200?: string;
|
||||
rating400?: string;
|
||||
|
||||
// Semantic Colors
|
||||
|
||||
// Font Color
|
||||
colorPrimary?: string;
|
||||
colorSecondary?: string;
|
||||
|
||||
// Background
|
||||
background?: string;
|
||||
backgroundAlt?: string;
|
||||
backgroundInv?: string;
|
||||
|
||||
// Foreground
|
||||
foreground?: string;
|
||||
foregroundAlt?: string;
|
||||
foregroundInv?: string;
|
||||
|
||||
// Borders
|
||||
border?: string;
|
||||
borderAlt?: string;
|
||||
borderFocus?: string;
|
||||
borderError?: string;
|
||||
|
||||
// Buttons
|
||||
buttonPrimaryFill?: string;
|
||||
buttonPrimaryText?: string;
|
||||
buttonPrimaryHover?: string;
|
||||
buttonPrimaryActive?: string;
|
||||
buttonSecondaryFill?: string;
|
||||
buttonSecondaryText?: string;
|
||||
buttonSecondaryHover?: string;
|
||||
buttonSecondaryActive?: string;
|
||||
buttonTertiaryFill?: string;
|
||||
buttonTertiaryText?: string;
|
||||
buttonTertiaryHover?: string;
|
||||
buttonTertiaryActive?: string;
|
||||
buttonTertiarySelectedText?: string;
|
||||
buttonTertiarySelectedFill?: string;
|
||||
buttonMinimalFill?: string;
|
||||
buttonMinimalText?: string;
|
||||
buttonMinimalHover?: string;
|
||||
buttonMinimalActive?: string;
|
||||
buttonDisabledFill?: string;
|
||||
buttonDisabledText?: string;
|
||||
|
||||
// Breadcrumbs
|
||||
breadcrumbsText?: string;
|
||||
breadcrumbsSeparatorFill?: string;
|
||||
|
||||
// Datepicker
|
||||
datepickerBackground?: string;
|
||||
datepickerDayFont?: string;
|
||||
datepickerDayFontDisabled?: string;
|
||||
datepickerDayPseudoSelected?: string;
|
||||
datepickerDayPseudoHighlighted?: string;
|
||||
|
||||
// FileUploader
|
||||
fileUploaderBackgroundColor?: string;
|
||||
fileUploaderBackgroundColorActive?: string;
|
||||
fileUploaderBorderColorActive?: string;
|
||||
fileUploaderBorderColorDefault?: string;
|
||||
fileUploaderMessageColor?: string;
|
||||
|
||||
// Links
|
||||
linkText?: string;
|
||||
linkVisited?: string;
|
||||
linkHover?: string;
|
||||
linkActive?: string;
|
||||
|
||||
// Lists
|
||||
listHeaderFill?: string;
|
||||
listBodyFill?: string;
|
||||
listIconFill?: string;
|
||||
listBorder?: string;
|
||||
|
||||
// ProgressSteps
|
||||
progressStepsIconActiveFill?: string;
|
||||
|
||||
// Ticks
|
||||
tickFill?: string;
|
||||
tickFillHover?: string;
|
||||
tickFillActive?: string;
|
||||
tickFillSelected?: string;
|
||||
tickFillSelectedHover?: string;
|
||||
tickFillSelectedHoverActive?: string;
|
||||
tickFillError?: string;
|
||||
tickFillErrorHover?: string;
|
||||
tickFillErrorHoverActive?: string;
|
||||
tickFillErrorSelected?: string;
|
||||
tickFillErrorSelectedHover?: string;
|
||||
tickFillErrorSelectedHoverActive?: string;
|
||||
tickFillDisabled?: string;
|
||||
tickBorder?: string;
|
||||
tickBorderError?: string;
|
||||
tickMarkFill?: string;
|
||||
|
||||
// Slider/Toggle
|
||||
sliderTrackFill?: string;
|
||||
sliderTrackFillHover?: string;
|
||||
sliderTrackFillActive?: string;
|
||||
sliderTrackFillSelected?: string;
|
||||
sliderTrackFillSelectedHover?: string;
|
||||
sliderTrackFillSelectedActive?: string;
|
||||
sliderTrackFillDisabled?: string;
|
||||
sliderHandleFill?: string;
|
||||
sliderHandleFillHover?: string;
|
||||
sliderHandleFillActive?: string;
|
||||
sliderHandleFillSelected?: string;
|
||||
sliderHandleFillSelectedHover?: string;
|
||||
sliderHandleFillSelectedActive?: string;
|
||||
sliderHandleFillDisabled?: string;
|
||||
sliderHandleInnerFill?: string;
|
||||
sliderHandleInnerFillDisabled?: string;
|
||||
sliderHandleInnerFillSelectedHover?: string;
|
||||
sliderHandleInnerFillSelectedActive?: string;
|
||||
sliderBorder?: string;
|
||||
sliderBorderHover?: string;
|
||||
sliderBorderDisabled?: string;
|
||||
|
||||
// Input
|
||||
inputFill?: string;
|
||||
inputFillError?: string;
|
||||
inputFillDisabled?: string;
|
||||
inputTextDisabled?: string;
|
||||
|
||||
// Notification
|
||||
notificationPrimaryBackground?: string;
|
||||
notificationPrimaryText?: string;
|
||||
notificationPositiveBackground?: string;
|
||||
notificationPositiveText?: string;
|
||||
notificationWarningBackground?: string;
|
||||
notificationWarningText?: string;
|
||||
notificationNegativeBackground?: string;
|
||||
notificationNegativeText?: string;
|
||||
|
||||
// Menu
|
||||
menuFill?: string;
|
||||
menuFillHover?: string;
|
||||
menuFontDefault?: string;
|
||||
menuFontDisabled?: string;
|
||||
menuFontHighlighted?: string;
|
||||
menuFontSelected?: string;
|
||||
|
||||
// Pagination
|
||||
paginationTriangleDown?: string;
|
||||
|
||||
// Header navigation
|
||||
headerNavigationFill?: string;
|
||||
|
||||
// Tab
|
||||
tabBarFill?: string;
|
||||
tabColor?: string;
|
||||
|
||||
// Shadow
|
||||
shadowFocus?: string;
|
||||
shadowError?: string;
|
||||
|
||||
// Tag
|
||||
|
||||
// Remove this section of theme values in next major version
|
||||
tagBackground?: string;
|
||||
tagNeutralBackground?: string;
|
||||
tagPrimaryBackground?: string;
|
||||
tagPositiveBackground?: string;
|
||||
tagWarningBackground?: string;
|
||||
tagNegativeBackground?: string;
|
||||
tagRGBGradient?: string;
|
||||
tagRGBGradientSecondary?: string;
|
||||
// ^^^^^^^
|
||||
|
||||
tagSolidRampUnit?: string;
|
||||
tagSolidHoverRampUnit?: string;
|
||||
tagSolidActiveRampUnit?: string;
|
||||
tagSolidDisabledRampUnit?: string;
|
||||
tagSolidFontRampUnit?: string;
|
||||
tagSolidFontHoverRampUnit?: string;
|
||||
tagLightRampUnit?: string;
|
||||
tagLightHoverRampUnit?: string;
|
||||
tagLightActiveRampUnit?: string;
|
||||
tagLightDisabledRampUnit?: string;
|
||||
tagLightFontRampUnit?: string;
|
||||
tagLightFontHoverRampUnit?: string;
|
||||
tagOutlinedRampUnit?: string;
|
||||
tagOutlinedHoverRampUnit?: string;
|
||||
tagOutlinedActiveRampUnit?: string;
|
||||
tagOutlinedDisabledRampUnit?: string;
|
||||
tagOutlinedFontRampUnit?: string;
|
||||
tagOutlinedFontHoverRampUnit?: string;
|
||||
tagFontDisabledRampUnit?: string;
|
||||
|
||||
tagNeutralSolidBackground?: string;
|
||||
tagNeutralSolidHover?: string;
|
||||
tagNeutralSolidActive?: string;
|
||||
tagNeutralSolidDisabled?: string;
|
||||
tagNeutralSolidFont?: string;
|
||||
tagNeutralSolidFontHover?: string;
|
||||
tagNeutralLightBackground?: string;
|
||||
tagNeutralLightHover?: string;
|
||||
tagNeutralLightActive?: string;
|
||||
tagNeutralLightDisabled?: string;
|
||||
tagNeutralLightFont?: string;
|
||||
tagNeutralLightFontHover?: string;
|
||||
tagNeutralOutlinedBackground?: string;
|
||||
tagNeutralOutlinedHover?: string;
|
||||
tagNeutralOutlinedActive?: string;
|
||||
tagNeutralOutlinedDisabled?: string;
|
||||
tagNeutralOutlinedFont?: string;
|
||||
tagNeutralOutlinedFontHover?: string;
|
||||
tagNeutralFontDisabled?: string;
|
||||
|
||||
tagPrimarySolidBackground?: string;
|
||||
tagPrimarySolidHover?: string;
|
||||
tagPrimarySolidActive?: string;
|
||||
tagPrimarySolidDisabled?: string;
|
||||
tagPrimarySolidFont?: string;
|
||||
tagPrimarySolidFontHover?: string;
|
||||
tagPrimaryLightBackground?: string;
|
||||
tagPrimaryLightHover?: string;
|
||||
tagPrimaryLightActive?: string;
|
||||
tagPrimaryLightDisabled?: string;
|
||||
tagPrimaryLightFont?: string;
|
||||
tagPrimaryLightFontHover?: string;
|
||||
tagPrimaryOutlinedBackground?: string;
|
||||
tagPrimaryOutlinedHover?: string;
|
||||
tagPrimaryOutlinedActive?: string;
|
||||
tagPrimaryOutlinedDisabled?: string;
|
||||
tagPrimaryOutlinedFont?: string;
|
||||
tagPrimaryOutlinedFontHover?: string;
|
||||
tagPrimaryFontDisabled?: string;
|
||||
|
||||
tagPositiveSolidBackground?: string;
|
||||
tagPositiveSolidHover?: string;
|
||||
tagPositiveSolidActive?: string;
|
||||
tagPositiveSolidDisabled?: string;
|
||||
tagPositiveSolidFont?: string;
|
||||
tagPositiveSolidFontHover?: string;
|
||||
tagPositiveLightBackground?: string;
|
||||
tagPositiveLightHover?: string;
|
||||
tagPositiveLightActive?: string;
|
||||
tagPositiveLightDisabled?: string;
|
||||
tagPositiveLightFont?: string;
|
||||
tagPositiveLightFontHover?: string;
|
||||
tagPositiveOutlinedBackground?: string;
|
||||
tagPositiveOutlinedHover?: string;
|
||||
tagPositiveOutlinedActive?: string;
|
||||
tagPositiveOutlinedDisabled?: string;
|
||||
tagPositiveOutlinedFont?: string;
|
||||
tagPositiveOutlinedFontHover?: string;
|
||||
tagPositiveFontDisabled?: string;
|
||||
|
||||
tagWarningSolidBackground?: string;
|
||||
tagWarningSolidHover?: string;
|
||||
tagWarningSolidActive?: string;
|
||||
tagWarningSolidDisabled?: string;
|
||||
tagWarningSolidFont?: string;
|
||||
tagWarningSolidFontHover?: string;
|
||||
tagWarningLightBackground?: string;
|
||||
tagWarningLightHover?: string;
|
||||
tagWarningLightActive?: string;
|
||||
tagWarningLightDisabled?: string;
|
||||
tagWarningLightFont?: string;
|
||||
tagWarningLightFontHover?: string;
|
||||
tagWarningOutlinedBackground?: string;
|
||||
tagWarningOutlinedHover?: string;
|
||||
tagWarningOutlinedActive?: string;
|
||||
tagWarningOutlinedDisabled?: string;
|
||||
tagWarningOutlinedFont?: string;
|
||||
tagWarningOutlinedFontHover?: string;
|
||||
tagWarningFontDisabled?: string;
|
||||
|
||||
tagNegativeSolidBackground?: string;
|
||||
tagNegativeSolidHover?: string;
|
||||
tagNegativeSolidActive?: string;
|
||||
tagNegativeSolidDisabled?: string;
|
||||
tagNegativeSolidFont?: string;
|
||||
tagNegativeSolidFontHover?: string;
|
||||
tagNegativeLightBackground?: string;
|
||||
tagNegativeLightHover?: string;
|
||||
tagNegativeLightActive?: string;
|
||||
tagNegativeLightDisabled?: string;
|
||||
tagNegativeLightFont?: string;
|
||||
tagNegativeLightFontHover?: string;
|
||||
tagNegativeOutlinedBackground?: string;
|
||||
tagNegativeOutlinedHover?: string;
|
||||
tagNegativeOutlinedActive?: string;
|
||||
tagNegativeOutlinedDisabled?: string;
|
||||
tagNegativeOutlinedFont?: string;
|
||||
tagNegativeOutlinedFontHover?: string;
|
||||
tagNegativeFontDisabled?: string;
|
||||
|
||||
// Table
|
||||
tableHeadBackgroundColor?: string;
|
||||
tableBackground?: string;
|
||||
tableFilter?: string;
|
||||
tableFilterHeading?: string;
|
||||
tableFilterBackground?: string;
|
||||
tableFilterFooterBackground?: string;
|
||||
|
||||
// Toast
|
||||
toastText?: string;
|
||||
toastPrimaryBackground?: string;
|
||||
toastPositiveBackground?: string;
|
||||
toastWarningBackground?: string;
|
||||
toastNegativeBackground?: string;
|
||||
|
||||
// Spinner
|
||||
spinnerTrackFill?: string;
|
||||
|
||||
// Progress bar
|
||||
progressbarTrackFill?: string;
|
||||
|
||||
// Tooltip
|
||||
tooltipBackground?: string;
|
||||
tooltipText?: string;
|
||||
}
|
||||
|
||||
interface Font {
|
||||
fontFamily?: string;
|
||||
fontWeight?: string | number;
|
||||
fontSize?: string;
|
||||
lineHeight?: string | number;
|
||||
}
|
||||
|
||||
interface Typography {
|
||||
font100?: Font;
|
||||
font200?: Font;
|
||||
font250?: Font;
|
||||
font300?: Font;
|
||||
font350?: Font;
|
||||
font400?: Font;
|
||||
font450?: Font;
|
||||
font500?: Font;
|
||||
font600?: Font;
|
||||
font700?: Font;
|
||||
font800?: Font;
|
||||
font900?: Font;
|
||||
font1000?: Font;
|
||||
}
|
||||
|
||||
interface Sizing {
|
||||
scale0?: string;
|
||||
scale100?: string;
|
||||
scale200?: string;
|
||||
scale300?: string;
|
||||
scale400?: string;
|
||||
scale500?: string;
|
||||
scale550?: string;
|
||||
scale600?: string;
|
||||
scale700?: string;
|
||||
scale800?: string;
|
||||
scale900?: string;
|
||||
scale1000?: string;
|
||||
scale1200?: string;
|
||||
scale1400?: string;
|
||||
scale1600?: string;
|
||||
scale2400?: string;
|
||||
scale3200?: string;
|
||||
scale4800?: string;
|
||||
}
|
||||
|
||||
interface Lighting {
|
||||
shadow400?: string;
|
||||
shadow500?: string;
|
||||
shadow600?: string;
|
||||
shadow700?: string;
|
||||
overlay0?: string;
|
||||
overlay100?: string;
|
||||
overlay200?: string;
|
||||
overlay300?: string;
|
||||
overlay400?: string;
|
||||
overlay500?: string;
|
||||
overlay600?: string;
|
||||
}
|
||||
|
||||
interface Animation {
|
||||
timing100?: string;
|
||||
timing400?: string;
|
||||
timing700?: string;
|
||||
easeOutCurve?: string;
|
||||
easeInCurve?: string;
|
||||
easeInOutCurve?: string;
|
||||
}
|
||||
|
||||
interface Border {
|
||||
borderColor?: string;
|
||||
borderStyle?: string;
|
||||
borderWidth?: string;
|
||||
}
|
||||
|
||||
interface Borders {
|
||||
border100?: Border;
|
||||
border200?: Border;
|
||||
border300?: Border;
|
||||
border400?: Border;
|
||||
border500?: Border;
|
||||
border600?: Border;
|
||||
useRoundedCorners?: boolean;
|
||||
radius100?: string;
|
||||
radius200?: string;
|
||||
radius300?: string;
|
||||
}
|
||||
|
||||
interface ZIndex {
|
||||
modal?: number;
|
||||
}
|
||||
|
||||
interface Theme {
|
||||
name?: string;
|
||||
breakpoints?: Breakpoints;
|
||||
colors?: Colors;
|
||||
typography?: Typography;
|
||||
sizing?: Sizing;
|
||||
lighting?: Lighting;
|
||||
animation?: Animation;
|
||||
borders?: Borders;
|
||||
zIndex?: ZIndex;
|
||||
// Remove in next major version
|
||||
tooltip?: {
|
||||
backgroundColor: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface ThemePrimitives {
|
||||
// Primary Palette
|
||||
primary50: string;
|
||||
primary100: string;
|
||||
primary200: string;
|
||||
primary300: string;
|
||||
primary400: string;
|
||||
primary500: string;
|
||||
primary600: string;
|
||||
primary700: string;
|
||||
|
||||
// Alert Palette
|
||||
negative50: string;
|
||||
negative100: string;
|
||||
negative200: string;
|
||||
negative300: string;
|
||||
negative400: string;
|
||||
negative500: string;
|
||||
negative600: string;
|
||||
negative700: string;
|
||||
|
||||
// Warning Palette
|
||||
warning50: string;
|
||||
warning100: string;
|
||||
warning200: string;
|
||||
warning300: string;
|
||||
warning400: string;
|
||||
warning500: string;
|
||||
warning600: string;
|
||||
warning700: string;
|
||||
|
||||
// Success Palette
|
||||
positive50: string;
|
||||
positive100: string;
|
||||
positive200: string;
|
||||
positive300: string;
|
||||
positive400: string;
|
||||
positive500: string;
|
||||
positive600: string;
|
||||
positive700: string;
|
||||
|
||||
// Monochrome Palette
|
||||
mono100: string;
|
||||
mono200: string;
|
||||
mono300: string;
|
||||
mono400: string;
|
||||
mono500: string;
|
||||
mono600: string;
|
||||
mono700: string;
|
||||
mono800: string;
|
||||
mono900: string;
|
||||
mono1000: string;
|
||||
|
||||
// Rating Palette
|
||||
rating200: string;
|
||||
rating400: string;
|
||||
|
||||
primaryFontFamily: string;
|
||||
}
|
||||
Vendored
-120
@@ -1,120 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
|
||||
export interface KIND {
|
||||
info: 'info';
|
||||
positive: 'positive';
|
||||
warning: 'warning';
|
||||
negative: 'negative';
|
||||
}
|
||||
export interface PLACEMENT {
|
||||
topLeft: 'topLeft';
|
||||
top: 'top';
|
||||
topRight: 'topRight';
|
||||
bottomRight: 'bottomRight';
|
||||
bottom: 'bottom';
|
||||
bottomLeft: 'bottomLeft';
|
||||
}
|
||||
export interface TYPE {
|
||||
inline: 'inline';
|
||||
toast: 'toast';
|
||||
}
|
||||
|
||||
export interface toaster {
|
||||
getRef: () => React.Ref<typeof ToasterContainer>;
|
||||
show: (children: React.ReactNode, props: Readonly<ToastProps>) => React.Key;
|
||||
info: (children: React.ReactNode, props: Readonly<ToastProps>) => React.Key;
|
||||
positive: (children: React.ReactNode, props: Readonly<ToastProps>) => React.Key;
|
||||
warning: (children: React.ReactNode, props: Readonly<ToastProps>) => React.Key;
|
||||
negative: (children: React.ReactNode, props: Readonly<ToastProps>) => React.Key;
|
||||
update: (key: React.Key, props: Readonly<ToastProps>) => void;
|
||||
clear: (key: React.Key) => void;
|
||||
}
|
||||
|
||||
export interface ToasterContainerState {
|
||||
isMounted: boolean;
|
||||
toasts: Readonly<ToastProps>;
|
||||
}
|
||||
export interface ToasterSharedStylePropsArg {
|
||||
$placement?: PLACEMENT[keyof PLACEMENT];
|
||||
}
|
||||
export interface ToasterOverrides {
|
||||
Root?: Override<ToasterSharedStylePropsArg>;
|
||||
ToastBody?: Override<SharedStylePropsArg>;
|
||||
ToastCloseIcon?: Override<SharedStylePropsArg>;
|
||||
}
|
||||
export interface ToasterProps {
|
||||
overrides?: ToasterOverrides;
|
||||
placement?: PLACEMENT[keyof PLACEMENT];
|
||||
usePortal?: boolean;
|
||||
autoHideDuration?: number;
|
||||
}
|
||||
export class ToasterContainer extends React.Component<Readonly<ToasterProps>, ToasterContainerState> {
|
||||
getToastProps(props: ToastProps): Readonly<ToastProps> & { key: React.Key };
|
||||
show(props: ToastProps): React.Key;
|
||||
update(key: React.Key, props: ToastProps): void;
|
||||
dismiss(key: React.Key): void;
|
||||
clearAll(): void;
|
||||
clear(key: React.Key): void;
|
||||
internalOnClose(key: React.Key): void;
|
||||
getOnCloseHandler(key: React.Key, onClose?: () => any): () => any;
|
||||
renderToast(toastProps: ToastProps & { key: React.Key }): React.ReactNode;
|
||||
getSharedProps(): { $placement: PLACEMENT[keyof PLACEMENT] };
|
||||
}
|
||||
|
||||
export interface SharedStylePropsArg {
|
||||
$color?: string;
|
||||
$size?: number | string;
|
||||
$kind?: KIND[keyof KIND];
|
||||
$type?: TYPE[keyof TYPE];
|
||||
$closeable?: boolean;
|
||||
$isRendered?: boolean;
|
||||
$isVisible?: boolean;
|
||||
}
|
||||
|
||||
export interface ToastPrivateState {
|
||||
isVisible: boolean;
|
||||
isRendered: boolean;
|
||||
}
|
||||
|
||||
export interface ToastOverrides {
|
||||
Body?: Override<SharedStylePropsArg>;
|
||||
CloseIcon?: Override<SharedStylePropsArg>;
|
||||
}
|
||||
export interface ToastProps {
|
||||
autoHideDuration?: number;
|
||||
children?: React.ReactNode;
|
||||
closeable?: boolean;
|
||||
kind?: KIND[keyof KIND];
|
||||
notificationType?: TYPE[keyof TYPE];
|
||||
onClose?: () => any;
|
||||
onBlur?: (e: Event) => any;
|
||||
onFocus?: (e: Event) => any;
|
||||
onMouseEnter?: (e: Event) => any;
|
||||
onMouseLeave?: (e: Event) => any;
|
||||
'data-baseweb'?: string;
|
||||
overrides?: ToastOverrides;
|
||||
key?: React.Key;
|
||||
}
|
||||
|
||||
export class Toast extends React.Component<ToastProps, ToastPrivateState> {
|
||||
startTimeout(): void;
|
||||
clearTimeout(): void;
|
||||
animateIn(): void;
|
||||
animateOut(): void;
|
||||
dismiss(): void;
|
||||
onFocus(e: Event): void;
|
||||
onMouseEnter(e: Event): void;
|
||||
onBlur(e: Event): void;
|
||||
onMouseLeave(e: Event): void;
|
||||
getSharedProps(): Readonly<SharedStylePropsArg>;
|
||||
}
|
||||
|
||||
export const Root: StyletronComponent<any>;
|
||||
export const Body: StyletronComponent<any>;
|
||||
export const CloseIconSvg: StyletronComponent<any>;
|
||||
|
||||
export const KIND: KIND;
|
||||
export const PLACEMENT: PLACEMENT;
|
||||
export const TYPE: TYPE;
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { StyletronComponent } from 'styletron-react';
|
||||
import { ACCESSIBILITY_TYPE, PLACEMENT, TRIGGER_TYPE, STATE_CHANGE_TYPE, PopoverProps, StatefulPopoverContainerProps, StatefulPopoverProps } from '../popover';
|
||||
|
||||
export type StatefulTooltipProps = StatefulPopoverProps;
|
||||
export const StatefulTooltip: React.FC<StatefulTooltipProps>;
|
||||
|
||||
export type StatefulTooltipContainerProps = StatefulPopoverContainerProps;
|
||||
export class StatefulContainer extends React.Component<StatefulTooltipContainerProps> {}
|
||||
|
||||
export type TooltipProps = PopoverProps;
|
||||
export class Tooltip extends React.Component<TooltipProps> {}
|
||||
|
||||
export const StyledArrow: StyletronComponent<any>;
|
||||
export const StyledBody: StyletronComponent<any>;
|
||||
export const StyledInner: StyletronComponent<any>;
|
||||
@@ -1,91 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"jsx": "react",
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"baseui-tests.tsx",
|
||||
"block/index.d.ts",
|
||||
"flex-grid/index.d.ts",
|
||||
"layer/index.d.ts",
|
||||
"button/index.d.ts",
|
||||
"button-group/index.d.ts",
|
||||
"checkbox/index.d.ts",
|
||||
"form-control/index.d.ts",
|
||||
"input/index.d.ts",
|
||||
"radio/index.d.ts",
|
||||
"slider/index.d.ts",
|
||||
"textarea/index.d.ts",
|
||||
"breadcrumbs/index.d.ts",
|
||||
"header-navigation/index.d.ts",
|
||||
"link/index.d.ts",
|
||||
"pagination/index.d.ts",
|
||||
"side-navigation/index.d.ts",
|
||||
"accordion/index.d.ts",
|
||||
"avatar/index.d.ts",
|
||||
"dnd-list/index.d.ts",
|
||||
"heading/index.d.ts",
|
||||
"icon/index.d.ts",
|
||||
"icon/alert/index.d.ts",
|
||||
"icon/arrow-down/index.d.ts",
|
||||
"icon/arrow-left/index.d.ts",
|
||||
"icon/arrow-right/index.d.ts",
|
||||
"icon/arrow-up/index.d.ts",
|
||||
"icon/check-indeterminate/index.d.ts",
|
||||
"icon/check/index.d.ts",
|
||||
"icon/chevron-down/index.d.ts",
|
||||
"icon/chevron-left/index.d.ts",
|
||||
"icon/chevron-right/index.d.ts",
|
||||
"icon/chevron-up/index.d.ts",
|
||||
"icon/delete-alt/index.d.ts",
|
||||
"icon/delete/index.d.ts",
|
||||
"icon/filter/index.d.ts",
|
||||
"icon/grab/index.d.ts",
|
||||
"icon/menu/index.d.ts",
|
||||
"icon/overflow/index.d.ts",
|
||||
"icon/plus/index.d.ts",
|
||||
"icon/search/index.d.ts",
|
||||
"icon/spinner/index.d.ts",
|
||||
"icon/triangle-down/index.d.ts",
|
||||
"icon/triangle-left/index.d.ts",
|
||||
"icon/triangle-right/index.d.ts",
|
||||
"icon/triangle-up/index.d.ts",
|
||||
"icon/upload/index.d.ts",
|
||||
"table/index.d.ts",
|
||||
"tag/index.d.ts",
|
||||
"typography/index.d.ts",
|
||||
"datepicker/index.d.ts",
|
||||
"file-uploader/index.d.ts",
|
||||
"menu/index.d.ts",
|
||||
"rating/index.d.ts",
|
||||
"select/index.d.ts",
|
||||
"notification/index.d.ts",
|
||||
"progress-bar/index.d.ts",
|
||||
"progress-steps/index.d.ts",
|
||||
"spinner/index.d.ts",
|
||||
"toast/index.d.ts",
|
||||
"card/index.d.ts",
|
||||
"modal/index.d.ts",
|
||||
"popover/index.d.ts",
|
||||
"tooltip/index.d.ts",
|
||||
"payment-card/index.d.ts",
|
||||
"phone-input/index.d.ts",
|
||||
"tabs/index.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
/// <reference types="baseui"/>
|
||||
import * as React from 'react';
|
||||
import { BlockProps } from '../block';
|
||||
|
||||
export const Caption1: React.FC<BlockProps>;
|
||||
export const Caption2: React.FC<BlockProps>;
|
||||
export const Display: React.FC<BlockProps>;
|
||||
export const H1: React.FC<BlockProps>;
|
||||
export const H2: React.FC<BlockProps>;
|
||||
export const H3: React.FC<BlockProps>;
|
||||
export const H4: React.FC<BlockProps>;
|
||||
export const H5: React.FC<BlockProps>;
|
||||
export const H6: React.FC<BlockProps>;
|
||||
export const Label1: React.FC<BlockProps>;
|
||||
export const Label2: React.FC<BlockProps>;
|
||||
export const Paragraph1: React.FC<BlockProps>;
|
||||
export const Paragraph2: React.FC<BlockProps>;
|
||||
Reference in New Issue
Block a user