diff --git a/src/components/Authorized/index.d.ts b/src/components/Authorized/index.d.ts index 6b073a6567a57ca92e4f71cbf601e56bf1fc2973..45df4e8b035272699fc2e94a238179dc5aaa804e 100644 --- a/src/components/Authorized/index.d.ts +++ b/src/components/Authorized/index.d.ts @@ -1,15 +1,19 @@ -import * as React from "react"; -import * as H from "history"; -import { RouteProps } from "react-router"; +import * as React from 'react'; +import { RouteProps } from 'react-router'; type authorityFN = () => string; type authority = string | Array | authorityFN | Promise; +export type IReactComponent

= + | React.StatelessComponent

+ | React.ComponentClass

+ | React.ClassicComponentClass

; + interface Secured { - (authority: authority, error?: React.ReactNode): ( - target: React.ReactNode - ) => React.ReactNode; + (authority: authority, error?: React.ReactNode): ( + target: T, + ) => T; } export interface AuthorizedRouteProps extends RouteProps { @@ -18,16 +22,14 @@ export interface AuthorizedRouteProps extends RouteProps { export class AuthorizedRoute extends React.Component< AuthorizedRouteProps, any -> { - constructor(props: AuthorizedRouteProps); -} +> {} interface check { - ( + ( authority: authority, - target: React.ReactNode, - Exception: React.ReactNode - ): React.ReactNode; + target: T, + Exception: S, + ): T | S; } interface AuthorizedProps { @@ -39,7 +41,6 @@ export class Authorized extends React.Component { static Secured: Secured; static AuthorizedRoute: typeof AuthorizedRoute; static check: check; - constructor(props: AuthorizedProps); } declare function renderAuthorize(currentAuthority: string): typeof Authorized; diff --git a/src/components/Charts/Bar/index.d.ts b/src/components/Charts/Bar/index.d.ts index b79630abcad9ccb087752a076796b7305816687c..7be2a1a71fe4c8ddf4c75f06b26fbe7be7ed3a17 100644 --- a/src/components/Charts/Bar/index.d.ts +++ b/src/components/Charts/Bar/index.d.ts @@ -9,6 +9,7 @@ export interface BarProps { y: number; }>; autoLabel?: boolean; + style?: React.CSSProperties; } export default class Bar extends React.Component {} diff --git a/src/components/Charts/ChartCard/index.d.ts b/src/components/Charts/ChartCard/index.d.ts index 21d2be34be1d00de744f4b9e50ceb6ff7cbeaf62..35a5852e9c172aaf4984202333ec52f157a545c3 100644 --- a/src/components/Charts/ChartCard/index.d.ts +++ b/src/components/Charts/ChartCard/index.d.ts @@ -6,6 +6,7 @@ export interface ChartCardProps { footer?: React.ReactNode; contentHeight?: number; avatar?: React.ReactNode; + style?: React.CSSProperties; } export default class ChartCard extends React.Component {} diff --git a/src/components/Charts/Field/index.d.ts b/src/components/Charts/Field/index.d.ts index 7fa132825481aff6e77c01d11c197995e0b8446e..b1f779cd6ef118cc74accf1cc826bc0630337cbe 100644 --- a/src/components/Charts/Field/index.d.ts +++ b/src/components/Charts/Field/index.d.ts @@ -2,6 +2,7 @@ import * as React from "react"; export interface FieldProps { label: React.ReactNode; value: React.ReactNode; + style?: React.CSSProperties; } export default class Field extends React.Component {} diff --git a/src/components/Charts/Gauge/index.d.ts b/src/components/Charts/Gauge/index.d.ts index 7f196aed0bdd1b32d76b5e2a5ff76fd1117370ee..218fccf3e151e554eb0fd2ba3304c240deb9d009 100644 --- a/src/components/Charts/Gauge/index.d.ts +++ b/src/components/Charts/Gauge/index.d.ts @@ -5,6 +5,7 @@ export interface GaugeProps { height: number; bgColor?: number; percent: number; + style?: React.CSSProperties; } export default class Gauge extends React.Component {} diff --git a/src/components/Charts/MiniBar/index.d.ts b/src/components/Charts/MiniBar/index.d.ts index 09bd761fb7891954d3861121608e9e382c9d2846..3e2f1ec2286855f8241328e39f4262b0e71c3f0e 100644 --- a/src/components/Charts/MiniBar/index.d.ts +++ b/src/components/Charts/MiniBar/index.d.ts @@ -1,11 +1,12 @@ -import * as React from "react"; +import * as React from 'react'; export interface MiniBarProps { color?: string; height: number; data: Array<{ - x: number; + x: number | string; y: number; }>; + style?: React.CSSProperties; } export default class MiniBar extends React.Component {} diff --git a/src/components/Charts/MiniProgress/index.d.ts b/src/components/Charts/MiniProgress/index.d.ts index a80b935d9322e5df0316d134387cc2600557560f..4dde6052a9930907baa182f673ea2e9c9b1f1ed8 100644 --- a/src/components/Charts/MiniProgress/index.d.ts +++ b/src/components/Charts/MiniProgress/index.d.ts @@ -4,6 +4,7 @@ export interface MiniProgressProps { color?: string; strokeWidth?: number; percent?: number; + style?: React.CSSProperties; } export default class MiniProgress extends React.Component< diff --git a/src/components/Charts/Pie/index.d.ts b/src/components/Charts/Pie/index.d.ts index c029e79c4c6a369dad7b250fea0c008d7ecd9293..fe2e2a8e7aea2761898d41b9f313182bfa7a54ad 100644 --- a/src/components/Charts/Pie/index.d.ts +++ b/src/components/Charts/Pie/index.d.ts @@ -1,4 +1,4 @@ -import * as React from "react"; +import * as React from 'react'; export interface PieProps { animate?: boolean; color?: string; @@ -7,7 +7,7 @@ export interface PieProps { padding?: [number, number, number, number]; percent?: number; data?: Array<{ - x: string; + x: string | string; y: number; }>; total?: string; diff --git a/src/components/Charts/Radar/index.d.ts b/src/components/Charts/Radar/index.d.ts index b1707bf9e1a786a550b86f2708458bf1732bd595..772cbf02f7b34aea4196f17016300c09db9532f2 100644 --- a/src/components/Charts/Radar/index.d.ts +++ b/src/components/Charts/Radar/index.d.ts @@ -9,6 +9,7 @@ export interface RadarProps { label: string; value: string; }>; + style?: React.CSSProperties; } export default class Radar extends React.Component {} diff --git a/src/components/Charts/TagCloud/index.d.ts b/src/components/Charts/TagCloud/index.d.ts index e7832132f8e3db1af3f1470b9ae856a456dae425..e2dcc79428e7066c5a8b5c8da1250ef7d991ff67 100644 --- a/src/components/Charts/TagCloud/index.d.ts +++ b/src/components/Charts/TagCloud/index.d.ts @@ -5,6 +5,7 @@ export interface TagCloudProps { value: number; }>; height: number; + style?: React.CSSProperties; } export default class TagCloud extends React.Component {} diff --git a/src/components/Charts/TimelineChart/index.d.ts b/src/components/Charts/TimelineChart/index.d.ts index 212b69e4466883926f6e075b4bb30b494b655a13..f9241fa2e811dc7d22567f7d234143b0c0213b52 100644 --- a/src/components/Charts/TimelineChart/index.d.ts +++ b/src/components/Charts/TimelineChart/index.d.ts @@ -8,6 +8,7 @@ export interface TimelineChartProps { titleMap: { y1: string; y2: string }; padding?: [number, number, number, number]; height?: number; + style?: React.CSSProperties; } export default class TimelineChart extends React.Component< diff --git a/src/components/Charts/WaterWave/index.d.ts b/src/components/Charts/WaterWave/index.d.ts index 0fefbea102d3b55dc2845eba1fb943294c4c0353..309db7b569fac4902f839bd1719ddd3687b40c50 100644 --- a/src/components/Charts/WaterWave/index.d.ts +++ b/src/components/Charts/WaterWave/index.d.ts @@ -1,9 +1,10 @@ -import * as React from "react"; +import * as React from 'react'; export interface WaterWaveProps { title: React.ReactNode; color?: string; height: number; percent: number; + style?: React.CSSProperties; } export default class WaterWave extends React.Component {} diff --git a/src/components/Charts/index.d.ts b/src/components/Charts/index.d.ts index e47b947f741abbb7dc37c824c6f47797cb177b77..1ff27af291472f887b334b7eeed96d3914ff4362 100644 --- a/src/components/Charts/index.d.ts +++ b/src/components/Charts/index.d.ts @@ -1,16 +1,16 @@ -export { default as numeral } from "numeral"; -export { default as ChartCard } from "./ChartCard"; -export { default as Bar } from "./Bar"; -export { default as Pie } from "./Pie"; -export { default as Radar } from "./Radar"; -export { default as Gauge } from "./Gauge"; -export { default as MiniArea } from "./MiniArea"; -export { default as MiniBar } from "./MiniBar"; -export { default as MiniProgress } from "./MiniProgress"; -export { default as Field } from "./Field"; -export { default as WaterWave } from "./WaterWave"; -export { default as TagCloud } from "./TagCloud"; -export { default as TimelineChart } from "./TimelineChart"; +import * as numeral from 'numeral'; +export { default as ChartCard } from './ChartCard'; +export { default as Bar } from './Bar'; +export { default as Pie } from './Pie'; +export { default as Radar } from './Radar'; +export { default as Gauge } from './Gauge'; +export { default as MiniArea } from './MiniArea'; +export { default as MiniBar } from './MiniBar'; +export { default as MiniProgress } from './MiniProgress'; +export { default as Field } from './Field'; +export { default as WaterWave } from './WaterWave'; +export { default as TagCloud } from './TagCloud'; +export { default as TimelineChart } from './TimelineChart'; declare const yuan: (value: number | string) => string; diff --git a/src/components/DescriptionList/index.d.ts b/src/components/DescriptionList/index.d.ts index b13c630104f66554ed3c3026d5df3aac6b34f219..fe64433aa99987bedec5b8a8c586af17eb168418 100644 --- a/src/components/DescriptionList/index.d.ts +++ b/src/components/DescriptionList/index.d.ts @@ -1,15 +1,17 @@ -import * as React from "react"; +import * as React from 'react'; export interface DescriptionListProps { - layout?: "horizontal" | "vertical"; + layout?: 'horizontal' | 'vertical'; col?: number; title: React.ReactNode; gutter?: number; - size?: "large" | "small"; + size?: 'large' | 'small'; + style?: React.CSSProperties; } declare class Description extends React.Component< { term: React.ReactNode; + style?: React.CSSProperties; }, any > {} diff --git a/src/components/Ellipsis/index.d.ts b/src/components/Ellipsis/index.d.ts index 66f1de3e40d571e8f1854ec58af963c32671ef52..8421b95116277f926b3b49b75a577388c4faafab 100644 --- a/src/components/Ellipsis/index.d.ts +++ b/src/components/Ellipsis/index.d.ts @@ -3,6 +3,7 @@ export interface EllipsisProps { tooltip?: boolean; length?: number; lines?: number; + style?: React.CSSProperties; } export default class Ellipsis extends React.Component< diff --git a/src/components/Exception/index.d.ts b/src/components/Exception/index.d.ts index def4034e250575ab9973c31328a0fa0fd0c89796..037f866d03632ca4db3deabef1fe0326810d99b9 100644 --- a/src/components/Exception/index.d.ts +++ b/src/components/Exception/index.d.ts @@ -6,6 +6,7 @@ export interface ExceptionProps { img?: string; actions?: React.ReactNode; linkElement?: React.ReactNode; + style?: React.CSSProperties; } export default class Exception extends React.Component {} diff --git a/src/components/FooterToolbar/index.d.ts b/src/components/FooterToolbar/index.d.ts index 2bc13358bc26d0dc2aec69819bb8dc2042b7751f..637bd4b8e7864bdaa5d459e793533fe5ff82ad79 100644 --- a/src/components/FooterToolbar/index.d.ts +++ b/src/components/FooterToolbar/index.d.ts @@ -1,6 +1,7 @@ -import * as React from "react"; +import * as React from 'react'; export interface FooterToolbarProps { extra: React.ReactNode; + style?: React.CSSProperties; } export default class FooterToolbar extends React.Component< diff --git a/src/components/GlobalFooter/index.d.ts b/src/components/GlobalFooter/index.d.ts index 26f0c1150d681169501becc000a51e7e893b585b..faf633b9ecb14def35693c769d93f87020a21cde 100644 --- a/src/components/GlobalFooter/index.d.ts +++ b/src/components/GlobalFooter/index.d.ts @@ -1,11 +1,12 @@ import * as React from "react"; export interface GlobalFooterProps { - links: Array<{ + links?: Array<{ title: React.ReactNode; href: string; blankTarget?: boolean; }>; - copyright: React.ReactNode; + copyright?: React.ReactNode; + style?: React.CSSProperties; } export default class GlobalFooter extends React.Component< diff --git a/src/components/HeaderSearch/index.d.ts b/src/components/HeaderSearch/index.d.ts index 2587891d39b02cc68b318f7cf9d4bf628fc1d2f5..58316dfc18b6791e47cad9588e26daa84566a95f 100644 --- a/src/components/HeaderSearch/index.d.ts +++ b/src/components/HeaderSearch/index.d.ts @@ -1,10 +1,11 @@ -import * as React from "react"; +import * as React from 'react'; export interface HeaderSearchProps { placeholder?: string; dataSource?: Array; onSearch?: (value: string) => void; onChange?: (value: string) => void; onPressEnter?: (value: string) => void; + style?: React.CSSProperties; } export default class HeaderSearch extends React.Component< diff --git a/src/components/Login/index.d.ts b/src/components/Login/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c792b08a27428fbd5962a613fa653c2fc4fa394 --- /dev/null +++ b/src/components/Login/index.d.ts @@ -0,0 +1,30 @@ +import * as React from 'react'; +import Button from 'antd/lib/button'; +export interface LoginProps { + defaultActiveKey?: string; + onTabChange?: (key: string) => void; + onSubmit?: (error: any, values: any) => void; +} + +export interface TabProps { + key?: string; + tab?: React.ReactNode; +} +export class Tab extends React.Component {} + +export interface LoginItemProps { + name?: string; + rules?: any[]; + onGetCaptcha?: () => void; +} + +export class LoginItem extends React.Component {} + +export default class Login extends React.Component { + static Tab: typeof Tab; + static UserName: typeof LoginItem; + static Password: typeof LoginItem; + static Mobile: typeof LoginItem; + static Captcha: typeof LoginItem; + static Submit: typeof Button; +} diff --git a/src/components/NoticeIcon/index.d.ts b/src/components/NoticeIcon/index.d.ts index b35c16247e698b40342d8692579650c1b782ea78..d8f216808f23109fd87ebab38ca10769fa2e1ba1 100644 --- a/src/components/NoticeIcon/index.d.ts +++ b/src/components/NoticeIcon/index.d.ts @@ -1,10 +1,11 @@ -import * as React from "react"; +import * as React from 'react'; export interface NoticeIconData { - avatar: string; - title: React.ReactNode; - description: React.ReactNode; - datetime: React.ReactNode; - extra: React.ReactNode; + avatar?: string; + title?: React.ReactNode; + description?: React.ReactNode; + datetime?: React.ReactNode; + extra?: React.ReactNode; + style?: React.CSSProperties; } export interface NoticeIconProps { @@ -29,8 +30,8 @@ export interface NoticeIconProps { } export interface NoticeIconTabProps { - list: Array; - title: string; + list?: Array; + title?: string; emptyText?: React.ReactNode; emptyImage?: string; } diff --git a/src/components/NumberInfo/index.d.ts b/src/components/NumberInfo/index.d.ts index e0b7e5a59f29b55c52420bc699c06ae8af0d7ba5..2370ec6d68a52a320ffeccb3b0b51cb180bb39c9 100644 --- a/src/components/NumberInfo/index.d.ts +++ b/src/components/NumberInfo/index.d.ts @@ -1,12 +1,13 @@ -import * as React from "react"; +import * as React from 'react'; export interface NumberInfoProps { title?: React.ReactNode | string; subTitle?: React.ReactNode | string; total?: React.ReactNode | string; - status?: "up" | "down"; + status?: 'up' | 'down'; theme?: string; gap?: number; subTotal?: number; + style?: React.CSSProperties; } export default class NumberInfo extends React.Component {} diff --git a/src/components/PageHeader/index.d.ts b/src/components/PageHeader/index.d.ts index ca2cf565d8eba282f07ea785219c6bf17856c17a..40c80a4988f7bad032bece432c042636a7d0852c 100644 --- a/src/components/PageHeader/index.d.ts +++ b/src/components/PageHeader/index.d.ts @@ -1,4 +1,4 @@ -import * as React from "react"; +import * as React from 'react'; export interface PageHeaderProps { title?: React.ReactNode | string; logo?: React.ReactNode | string; @@ -12,6 +12,7 @@ export interface PageHeaderProps { tabActiveKey?: string; onTabChange?: (key: string) => void; linkElement?: React.ReactNode; + style?: React.CSSProperties; } export default class PageHeader extends React.Component {} diff --git a/src/components/Result/index.d.ts b/src/components/Result/index.d.ts index c4fef0b31d47463efa9ad8473c966450ca13f773..a316332e1785e363bdae2ed426baef880acb29a9 100644 --- a/src/components/Result/index.d.ts +++ b/src/components/Result/index.d.ts @@ -1,10 +1,11 @@ -import * as React from "react"; +import * as React from 'react'; export interface ResultProps { - type: "success" | "error"; + type: 'success' | 'error'; title: React.ReactNode; description?: React.ReactNode; extra?: React.ReactNode; actions?: React.ReactNode; + style?: React.CSSProperties; } export default class Result extends React.Component {} diff --git a/src/components/TagSelect/index.d.ts b/src/components/TagSelect/index.d.ts index 516220b6c6e7f98268c340a8f28c87d78d41af34..632e556a1b4850ab826121e48fbbdf2c4e78e2d6 100644 --- a/src/components/TagSelect/index.d.ts +++ b/src/components/TagSelect/index.d.ts @@ -1,10 +1,12 @@ -import * as React from "react"; +import * as React from 'react'; export interface TagSelectProps { onChange?: (value: Array) => void; expandable?: boolean; + style?: React.CSSProperties; } export interface TagSelectOptionProps { value: string; + style?: React.CSSProperties; } export class TagSelectOption extends React.Component< diff --git a/src/components/Trend/index.d.ts b/src/components/Trend/index.d.ts index 698a49d8cf9a100a21d80327d619471d46fab800..bb2b2a2b251294e4cd7307e04dec045339e67f6b 100644 --- a/src/components/Trend/index.d.ts +++ b/src/components/Trend/index.d.ts @@ -1,8 +1,9 @@ -import * as React from "react"; +import * as React from 'react'; export interface TrendProps { colorful?: boolean; - flag: "up" | "down"; + flag: 'up' | 'down'; + style?: React.CSSProperties; } export default class Trend extends React.Component {}