Browse Source

export components interface (#7654)

* export components interface

* export specific props

* fix formItem missed import
pull/7736/head
ChaXinyu 7 years ago
committed by 偏右
parent
commit
14e2a56b75
  1. 3
      components/anchor/index.tsx
  2. 2
      components/badge/index.tsx
  3. 3
      components/breadcrumb/index.tsx
  4. 3
      components/button/button-group.tsx
  5. 3
      components/button/index.tsx
  6. 2
      components/calendar/index.tsx
  7. 3
      components/card/index.tsx
  8. 3
      components/checkbox/index.tsx
  9. 5
      components/col/index.tsx
  10. 2
      components/collapse/index.tsx
  11. 3
      components/dropdown/index.tsx
  12. 1
      components/form/FormItem.tsx
  13. 3
      components/form/index.tsx
  14. 3
      components/grid/index.tsx
  15. 5
      components/input/index.tsx
  16. 3
      components/layout/index.tsx
  17. 2
      components/list/index.tsx
  18. 3
      components/modal/index.tsx
  19. 2
      components/progress/index.tsx
  20. 4
      components/radio/index.tsx
  21. 4
      components/row/index.tsx
  22. 8
      components/table/index.tsx
  23. 2
      components/tag/index.tsx
  24. 3
      components/timeline/index.tsx
  25. 4
      components/tooltip/index.tsx
  26. 4
      components/transfer/index.tsx
  27. 2
      components/tree-select/index.tsx
  28. 3
      components/upload/index.tsx

3
components/anchor/index.tsx

@ -1,5 +1,8 @@
import Anchor from './Anchor'; import Anchor from './Anchor';
import AnchorLink from './AnchorLink'; import AnchorLink from './AnchorLink';
export { AnchorProps } from './Anchor';
export { AnchorLinkProps } from './AnchorLink';
Anchor.Link = AnchorLink; Anchor.Link = AnchorLink;
export default Anchor; export default Anchor;

2
components/badge/index.tsx

@ -5,6 +5,8 @@ import ScrollNumber from './ScrollNumber';
import classNames from 'classnames'; import classNames from 'classnames';
import warning from '../_util/warning'; import warning from '../_util/warning';
export { ScrollNumberProps } from './ScrollNumber';
export interface BadgeProps { export interface BadgeProps {
/** Number to show in badge */ /** Number to show in badge */
count?: number | string; count?: number | string;

3
components/breadcrumb/index.tsx

@ -1,5 +1,8 @@
import Breadcrumb from './Breadcrumb'; import Breadcrumb from './Breadcrumb';
import BreadcrumbItem from './BreadcrumbItem'; import BreadcrumbItem from './BreadcrumbItem';
export { BreadcrumbProps } from './Breadcrumb';
export { BreadcrumbItemProps } from './BreadcrumbItem';
Breadcrumb.Item = BreadcrumbItem; Breadcrumb.Item = BreadcrumbItem;
export default Breadcrumb; export default Breadcrumb;

3
components/button/button-group.tsx

@ -1,7 +1,6 @@
import React from 'react'; import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { ButtonSize } from './button';
export type ButtonSize = 'small' | 'large';
export interface ButtonGroupProps { export interface ButtonGroupProps {
size?: ButtonSize; size?: ButtonSize;

3
components/button/index.tsx

@ -1,5 +1,8 @@
import Button from './button'; import Button from './button';
import ButtonGroup from './button-group'; import ButtonGroup from './button-group';
export { ButtonProps, ButtonShape, ButtonSize, ButtonType } from './button';
export { ButtonGroupProps } from './button-group';
Button.Group = ButtonGroup; Button.Group = ButtonGroup;
export default Button; export default Button;

2
components/calendar/index.tsx

@ -7,6 +7,8 @@ import Header from './Header';
import { getComponentLocale, getLocaleCode } from '../_util/getLocale'; import { getComponentLocale, getLocaleCode } from '../_util/getLocale';
declare const require: Function; declare const require: Function;
export { HeaderProps } from './Header';
function noop() { return null; } function noop() { return null; }
function zerofixed(v) { function zerofixed(v) {

3
components/card/index.tsx

@ -7,6 +7,9 @@ import Meta from './Meta';
import Tabs from '../tabs'; import Tabs from '../tabs';
import { throttleByAnimationFrameDecorator } from '../_util/throttleByAnimationFrame'; import { throttleByAnimationFrameDecorator } from '../_util/throttleByAnimationFrame';
export { CardGridProps } from './Grid';
export { CardMetaProps } from './Meta';
export type CardType = 'inner'; export type CardType = 'inner';
export interface CardTabListType { export interface CardTabListType {

3
components/checkbox/index.tsx

@ -1,5 +1,8 @@
import Checkbox from './Checkbox'; import Checkbox from './Checkbox';
import Group from './Group'; import Group from './Group';
export { CheckboxProps } from './Checkbox';
export { CheckboxGroupProps, CheckboxOptionType } from './Group';
Checkbox.Group = Group; Checkbox.Group = Group;
export default Checkbox; export default Checkbox;

5
components/col/index.tsx

@ -1,2 +1,5 @@
import { Col } from '../grid'; import { Col, ColProps, ColSize } from '../grid';
export { ColProps, ColSize };
export default Col; export default Col;

2
components/collapse/index.tsx

@ -1,3 +1,5 @@
import Collapse from './Collapse'; import Collapse from './Collapse';
export { CollapsePanelProps, CollapseProps } from './Collapse';
export default Collapse; export default Collapse;

3
components/dropdown/index.tsx

@ -1,5 +1,8 @@
import Dropdown from './dropdown'; import Dropdown from './dropdown';
import DropdownButton from './dropdown-button'; import DropdownButton from './dropdown-button';
export { DropDownProps } from './dropdown';
export { DropdownButtonProps } from './dropdown-button';
Dropdown.Button = DropdownButton; Dropdown.Button = DropdownButton;
export default Dropdown; export default Dropdown;

1
components/form/FormItem.tsx

@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import Animate from 'rc-animate'; import Animate from 'rc-animate';
import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import PureRenderMixin from 'rc-util/lib/PureRenderMixin';
import Animate from 'rc-animate';
import Row from '../grid/row'; import Row from '../grid/row';
import Col, { ColProps } from '../grid/col'; import Col, { ColProps } from '../grid/col';
import { WrappedFormUtils } from './Form'; import { WrappedFormUtils } from './Form';

3
components/form/index.tsx

@ -1,3 +1,6 @@
import Form from './Form'; import Form from './Form';
export { FormProps, FormComponentProps, FormCreateOption, ValidateCallback, ValidationRule } from './Form';
export { FormItemProps } from './FormItem';
export default Form; export default Form;

3
components/grid/index.tsx

@ -1,6 +1,9 @@
import Row from './row'; import Row from './row';
import Col from './col'; import Col from './col';
export { RowProps } from './row';
export { ColProps, ColSize } from './col';
export { export {
Row, Row,
Col, Col,

5
components/input/index.tsx

@ -3,6 +3,11 @@ import Group from './Group';
import Search from './Search'; import Search from './Search';
import TextArea from './TextArea'; import TextArea from './TextArea';
export { InputProps } from './Input';
export { GroupProps } from './Group';
export { SearchProps } from './Search';
export { TextAreaProps } from './TextArea';
Input.Group = Group; Input.Group = Group;
Input.Search = Search; Input.Search = Search;
Input.TextArea = TextArea; Input.TextArea = TextArea;

3
components/layout/index.tsx

@ -1,5 +1,8 @@
import Layout from './layout'; import Layout from './layout';
import Sider from './Sider'; import Sider from './Sider';
export { BasicProps as LayoutProps } from './layout';
export { SiderProps } from './Sider';
Layout.Sider = Sider; Layout.Sider = Sider;
export default Layout; export default Layout;

2
components/list/index.tsx

@ -8,6 +8,8 @@ import { Row } from '../grid';
import Item from './Item'; import Item from './Item';
export { ListItemProps, ListItemMetaProps } from './Item';
export interface ListGridType { export interface ListGridType {
gutter?: number; gutter?: number;
column?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24; column?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;

3
components/modal/index.tsx

@ -1,7 +1,8 @@
import Modal, { ModalFuncProps } from './Modal'; import Modal, { ModalFuncProps } from './Modal';
import confirm from './confirm'; import confirm from './confirm';
export { ModalFuncProps }; export { ActionButtonProps } from './ActionButton';
export { ModalProps, ModalFuncProps } from './Modal';
Modal.info = function (props: ModalFuncProps) { Modal.info = function (props: ModalFuncProps) {
const config = { const config = {

2
components/progress/index.tsx

@ -1,3 +1,5 @@
import Progress from './progress'; import Progress from './progress';
export { ProgressProps } from './progress';
export default Progress; export default Progress;

4
components/radio/index.tsx

@ -2,6 +2,10 @@ import Radio from './radio';
import Group from './group'; import Group from './group';
import Button from './radioButton'; import Button from './radioButton';
export { RadioProps } from './radio';
export { RadioGroupProps } from './group';
export { RadioButtonProps } from './radioButton';
Radio.Button = Button; Radio.Button = Button;
Radio.Group = Group; Radio.Group = Group;
export { Button, Group }; export { Button, Group };

4
components/row/index.tsx

@ -1,2 +1,4 @@
import { Row } from '../grid'; import { Row, RowProps } from '../grid';
export { RowProps };
export default Row; export default Row;

8
components/table/index.tsx

@ -1,3 +1,11 @@
import Table from './Table'; import Table from './Table';
export { ColumnProps } from './Column';
export { ColumnGroupProps } from './ColumnGroup';
export { FilterMenuProps } from './filterDropdown';
export { FilterDropdownMenuWrapperProps } from './FilterDropdownMenuWrapper';
export { SelectionBoxProps } from './SelectionBox';
export { SelectionCheckboxAllProps } from './SelectionCheckboxAll';
export { TableProps, TableRowSelection, TableColumnConfig } from './Table';
export default Table; export default Table;

2
components/tag/index.tsx

@ -6,6 +6,8 @@ import omit from 'omit.js';
import Icon from '../icon'; import Icon from '../icon';
import CheckableTag from './CheckableTag'; import CheckableTag from './CheckableTag';
export { CheckableTagProps } from './CheckableTag';
export interface TagProps { export interface TagProps {
prefixCls?: string; prefixCls?: string;
className?: string; className?: string;

3
components/timeline/index.tsx

@ -1,3 +1,6 @@
import Timeline from './Timeline'; import Timeline from './Timeline';
export { TimelineProps } from './Timeline';
export { TimeLineItemProps } from './TimelineItem';
export default Timeline; export default Timeline;

4
components/tooltip/index.tsx

@ -2,7 +2,9 @@ import React from 'react';
import { cloneElement } from 'react'; import { cloneElement } from 'react';
import RcTooltip from 'rc-tooltip'; import RcTooltip from 'rc-tooltip';
import classNames from 'classnames'; import classNames from 'classnames';
import getPlacements, { AdjustOverflow } from './placements'; import getPlacements, { AdjustOverflow, PlacementsConfig } from './placements';
export { AdjustOverflow, PlacementsConfig };
export type TooltipPlacement = export type TooltipPlacement =
'top' | 'left' | 'right' | 'bottom' | 'top' | 'left' | 'right' | 'bottom' |

4
components/transfer/index.tsx

@ -6,6 +6,10 @@ import Operation from './operation';
import Search from './search'; import Search from './search';
import injectLocale from '../locale-provider/injectLocale'; import injectLocale from '../locale-provider/injectLocale';
export { TransferListProps } from './list';
export { TransferOperationProps } from './operation';
export { SearchProps } from './search';
function noop() { function noop() {
} }

2
components/tree-select/index.tsx

@ -5,7 +5,7 @@ import { TreeSelectProps } from './interface';
import injectLocale from '../locale-provider/injectLocale'; import injectLocale from '../locale-provider/injectLocale';
import warning from '../_util/warning'; import warning from '../_util/warning';
export { TreeSelectProps }; export { TreeData, TreeSelectProps } from './interface';
abstract class TreeSelect extends React.Component<TreeSelectProps, any> { abstract class TreeSelect extends React.Component<TreeSelectProps, any> {
static TreeNode = TreeNode; static TreeNode = TreeNode;

3
components/upload/index.tsx

@ -1,5 +1,8 @@
import Upload from './Upload'; import Upload from './Upload';
import Dragger from './Dragger'; import Dragger from './Dragger';
export { UploadProps, UploadListProps, UploadChangeParam } from './interface';
export { DraggerProps } from './Dragger';
Upload.Dragger = Dragger; Upload.Dragger = Dragger;
export default Upload; export default Upload;

Loading…
Cancel
Save