UNPKG

@alicloud/console-components

Version:

Alibaba Cloud React Components

236 lines (235 loc) 17.5 kB
import React from 'react'; import type { CardProps, CardBulletHeaderProps, CardCollapseContentProps, // 有个拼写错误的东西 CardCollaspeContentProps ,我们就废了它 CardHeaderProps, CardContentProps, CardMediaProps, CardActionsProps, CardDividerProps } from '@alifd/next/types/card'; import DropdownActions, { CardDropdownActionsProps } from './dropdown-actions'; import CollapsableHead, { CardCollapsableHeadProps } from './collapsable-head'; import CollapsableTail, { CardCollapsableTailProps } from './collapsable-tail'; /** * Card 扩展静态属性 */ interface CardExtraStatics { DropDownActions: typeof DropdownActions; DropdownActions: typeof DropdownActions; CollapsableHead: typeof CollapsableHead; CollapsableTail: typeof CollapsableTail; } declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<unknown>> & import("hoist-non-react-statics").NonReactStatics<import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/card/card").default, {}> & { Divider: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardDividerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { render(): React.JSX.Element; context: any; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CardDividerProps>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardDividerProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<CardDividerProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardDividerProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<CardDividerProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardDividerProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardDividerProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardDividerProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardDividerProps>, nextState: Readonly<{}>, nextContext: any): void; }, {}>; Header: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardHeaderProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { render(): React.JSX.Element; context: any; setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CardHeaderProps>) => {} | Pick<{}, K_1>) | Pick<{}, K_1>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardHeaderProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<CardHeaderProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardHeaderProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<CardHeaderProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardHeaderProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardHeaderProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardHeaderProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardHeaderProps>, nextState: Readonly<{}>, nextContext: any): void; }, {}>; Media: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardMediaProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { render(): React.JSX.Element; context: any; setState<K_2 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CardMediaProps>) => {} | Pick<{}, K_2>) | Pick<{}, K_2>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardMediaProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<CardMediaProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardMediaProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<CardMediaProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardMediaProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardMediaProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardMediaProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardMediaProps>, nextState: Readonly<{}>, nextContext: any): void; }, {}>; Content: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardContentProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { render(): React.JSX.Element; context: any; setState<K_3 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CardContentProps>) => {} | Pick<{}, K_3>) | Pick<{}, K_3>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardContentProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<CardContentProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardContentProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<CardContentProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardContentProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardContentProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardContentProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardContentProps>, nextState: Readonly<{}>, nextContext: any): void; }, {}>; Actions: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardActionsProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { render(): React.JSX.Element; context: any; setState<K_4 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CardActionsProps>) => {} | Pick<{}, K_4>) | Pick<{}, K_4>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardActionsProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<CardActionsProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardActionsProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<CardActionsProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardActionsProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardActionsProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardActionsProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardActionsProps>, nextState: Readonly<{}>, nextContext: any): void; }, {}>; BulletHeader: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardBulletHeaderProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { render(): React.JSX.Element; context: any; setState<K_5 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<CardBulletHeaderProps>) => {} | Pick<{}, K_5>) | Pick<{}, K_5>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardBulletHeaderProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<CardBulletHeaderProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardBulletHeaderProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<CardBulletHeaderProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardBulletHeaderProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardBulletHeaderProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardBulletHeaderProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardBulletHeaderProps>, nextState: Readonly<{}>, nextContext: any): void; }, {}>; CollaspeContent: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardCollapseContentProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { content: HTMLDivElement; footer: HTMLDivElement; componentDidMount(): void; componentDidUpdate(): void; handleToggle: () => void; _setNeedMore(): void; _setContentHeight(): void; _getNodeChildrenHeight(node?: HTMLDivElement): number; _contentRefHandler: (ref: HTMLDivElement) => void; saveFooter: (ref: HTMLDivElement) => void; render(): React.JSX.Element; context: any; setState<K_6 extends keyof import("@alifd/next/types/card/collapse-content").CardCollapseContentState>(state: import("@alifd/next/types/card/collapse-content").CardCollapseContentState | ((prevState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, props: Readonly<CardCollapseContentProps>) => import("@alifd/next/types/card/collapse-content").CardCollapseContentState | Pick<import("@alifd/next/types/card/collapse-content").CardCollapseContentState, K_6>) | Pick<import("@alifd/next/types/card/collapse-content").CardCollapseContentState, K_6>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardCollapseContentProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly<CardCollapseContentProps>, nextState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardCollapseContentProps>, prevState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardCollapseContentProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardCollapseContentProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardCollapseContentProps>, nextState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardCollapseContentProps>, nextState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, nextContext: any): void; }, {}>; CollapseContent: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardCollapseContentProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, { content: HTMLDivElement; footer: HTMLDivElement; componentDidMount(): void; componentDidUpdate(): void; handleToggle: () => void; _setNeedMore(): void; _setContentHeight(): void; _getNodeChildrenHeight(node?: HTMLDivElement): number; _contentRefHandler: (ref: HTMLDivElement) => void; saveFooter: (ref: HTMLDivElement) => void; render(): React.JSX.Element; context: any; setState<K_6_1 extends keyof import("@alifd/next/types/card/collapse-content").CardCollapseContentState>(state: import("@alifd/next/types/card/collapse-content").CardCollapseContentState | ((prevState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, props: Readonly<CardCollapseContentProps>) => import("@alifd/next/types/card/collapse-content").CardCollapseContentState | Pick<import("@alifd/next/types/card/collapse-content").CardCollapseContentState, K_6_1>) | Pick<import("@alifd/next/types/card/collapse-content").CardCollapseContentState, K_6_1>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly<CardCollapseContentProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly<CardCollapseContentProps>, nextState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<CardCollapseContentProps>, prevState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<CardCollapseContentProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<CardCollapseContentProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<CardCollapseContentProps>, nextState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<CardCollapseContentProps>, nextState: Readonly<import("@alifd/next/types/card/collapse-content").CardCollapseContentState>, nextContext: any): void; }, {}>; }, {}> & CardExtraStatics; export type { CardProps, CardBulletHeaderProps, CardCollapseContentProps, CardHeaderProps, CardContentProps, CardMediaProps, CardActionsProps, CardDividerProps, CardDropdownActionsProps, CardCollapsableHeadProps, CardCollapsableTailProps, }; export default Card;