/** * @file Tag */ /// import type { PropsWithChildren } from 'react'; import React from 'react'; import type { ThemeProps } from 'jamis-core'; export interface TagProps extends PropsWithChildren, ThemeProps { style: React.CSSProperties; color?: string; label?: string | React.ReactNode; displayMode?: 'normal' | 'rounded' | 'status'; icon?: string | React.ReactNode; closable?: boolean; disabled?: boolean; closeIcon?: string | React.ReactNode; onClose?: (e: React.MouseEvent) => void; onClick?: (e: React.MouseEvent) => void; } export interface CheckableTagProps extends PropsWithChildren, TagProps { onClick?: (e: React.MouseEvent) => void; onChange?: (checked: boolean) => void; checked?: boolean; } export type TagLevel = 'inactive' | 'active' | 'success' | 'processing' | 'error' | 'warning'; export declare class Tag extends React.Component { static defaultProps: Partial; renderCloseIcon(): JSX.Element | null; handleClose(e: React.MouseEvent): void; handleClick(e: React.MouseEvent): void; render(): JSX.Element; } declare class CheckableTagComp extends React.Component { handleClick(e: React.MouseEvent): void; render(): JSX.Element; } export declare const CheckableTag: { new (props: Omit & import("jamis-core").ThemeOutterProps): { context: string; ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): JSX.Element; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & import("jamis-core").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & import("jamis-core").ThemeOutterProps>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly & import("jamis-core").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly & import("jamis-core").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly & import("jamis-core").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly & import("jamis-core").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly & import("jamis-core").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly & import("jamis-core").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly & import("jamis-core").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof CheckableTagComp; }; declare const _default: { new (props: Pick, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps): { context: string; ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): JSX.Element; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, never> & { children?: React.ReactNode; label?: React.ReactNode; style?: React.CSSProperties | undefined; disabled?: boolean | undefined; onClose?: ((e: React.MouseEvent) => void) | undefined; color?: string | undefined; onClick?: ((e: React.MouseEvent) => void) | undefined; icon?: React.ReactNode; closable?: boolean | undefined; displayMode?: "status" | "normal" | "rounded" | undefined; closeIcon?: React.ReactNode; } & { classPrefix?: string | undefined; classnames?: import("jamis-core").ClassNamesFn | undefined; className?: string | undefined; theme?: string | undefined; } & import("jamis-core").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof Tag; }; export default _default;