@jiaozhiye/qm-design-react 1.10.7 → 1.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/anchor/src/anchor-item.d.ts +3 -6
- package/lib/anchor/src/anchor-nav.d.ts +2 -5
- package/lib/anchor/src/anchor.d.ts +8 -44
- package/lib/button/src/button.d.ts +3 -21
- package/lib/countup/src/countup.d.ts +6 -14
- package/lib/divider/src/divider.d.ts +2 -19
- package/lib/download/src/download.d.ts +3 -34
- package/lib/drawer/index.d.ts +1 -1
- package/lib/drawer/src/drawer.d.ts +16 -37
- package/lib/empty/src/empty.d.ts +2 -10
- package/lib/form/src/types.d.ts +1 -0
- package/lib/hooks/useSize.d.ts +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/en.d.ts +2 -0
- package/lib/locale/lang/en.js +4 -2
- package/lib/locale/lang/zh-cn.d.ts +2 -0
- package/lib/locale/lang/zh-cn.js +4 -2
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/src/modal.d.ts +17 -52
- package/lib/search-tree/src/search-tree.d.ts +2 -0
- package/lib/space/src/space.d.ts +2 -7
- package/lib/spin/src/spin.d.ts +2 -8
- package/lib/spin/style/index.less +5 -3
- package/lib/split/src/split-pane.d.ts +2 -2
- package/lib/split/src/split.d.ts +1 -1
- package/lib/style/index.css +16 -7
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/edit/index.d.ts +2 -0
- package/lib/table/src/manager/index.d.ts +1 -1
- package/lib/table/src/table/index.d.ts +2 -2
- package/lib/tabs/src/tab-pane.d.ts +3 -6
- package/lib/tabs/src/tabs.d.ts +5 -11
- package/lib/tinymce/src/index.d.ts +3 -17
- package/lib/upload-file/src/upload-file.d.ts +4 -33
- package/lib/upload-file/style/index.less +5 -0
- package/lib/upload-img/src/cropper-preview.d.ts +2 -26
- package/lib/upload-img/src/upload-img.d.ts +3 -34
- package/lib/upload-img/style/index.less +31 -23
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { CSSProperties } from '../../_utils/types';
|
|
3
3
|
type IProps = {
|
|
4
4
|
label: string;
|
|
@@ -8,8 +8,5 @@ type IProps = {
|
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
};
|
|
10
10
|
export type AnchorItemProps = IProps;
|
|
11
|
-
declare
|
|
12
|
-
|
|
13
|
-
render(): React.JSX.Element;
|
|
14
|
-
}
|
|
15
|
-
export default QmAnchorItem;
|
|
11
|
+
declare const AnchorItem: React.FC<IProps>;
|
|
12
|
+
export default AnchorItem;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { AnyFunction } from '../../_utils/types';
|
|
3
3
|
type IProps = {
|
|
4
4
|
activeKey: number;
|
|
5
5
|
labels: string[];
|
|
6
6
|
onTabClick: AnyFunction<void>;
|
|
7
7
|
};
|
|
8
|
-
declare
|
|
9
|
-
renderLabel(): React.ReactNode[];
|
|
10
|
-
render(): React.JSX.Element;
|
|
11
|
-
}
|
|
8
|
+
declare const AnchorNav: React.FC<IProps>;
|
|
12
9
|
export default AnchorNav;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
3
|
+
import type { AnchorItemProps } from './anchor-item';
|
|
5
4
|
type ILabelItem = {
|
|
6
5
|
id: string;
|
|
7
6
|
label: string;
|
|
@@ -17,47 +16,12 @@ type IProps = {
|
|
|
17
16
|
style?: CSSProperties;
|
|
18
17
|
children?: React.ReactNode;
|
|
19
18
|
};
|
|
20
|
-
type
|
|
21
|
-
activeKey: number;
|
|
22
|
-
};
|
|
23
|
-
export type AnchorProps = IProps;
|
|
24
|
-
declare class QmAnchor extends Component<IProps, IState> {
|
|
25
|
-
static Item: React.ClassicComponentClass<{
|
|
26
|
-
label: string;
|
|
27
|
-
showDivider?: boolean | undefined;
|
|
28
|
-
style?: React.CSSProperties | undefined;
|
|
29
|
-
className?: string | undefined;
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
}>;
|
|
32
|
-
static propTypes: {
|
|
33
|
-
size: (props: any, propName: any, componentName: any) => void;
|
|
34
|
-
labelWidth: (props: any, propName: any, componentName: any) => void;
|
|
35
|
-
labelList: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
36
|
-
id: PropTypes.Requireable<string>;
|
|
37
|
-
label: PropTypes.Requireable<string>;
|
|
38
|
-
}> | null | undefined)[]>;
|
|
39
|
-
};
|
|
40
|
-
static defaultProps: {
|
|
41
|
-
tabPosition: string;
|
|
42
|
-
};
|
|
43
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
44
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
45
|
-
private currentState;
|
|
46
|
-
private itemsTotal;
|
|
47
|
-
private timer;
|
|
48
|
-
private scrollEvent;
|
|
49
|
-
private scrollRef;
|
|
50
|
-
private get __is_conf();
|
|
51
|
-
constructor(props: IProps);
|
|
52
|
-
componentDidMount(): void;
|
|
53
|
-
componentWillUnmount(): void;
|
|
54
|
-
initialHandle(): void;
|
|
55
|
-
createDistances(): number[];
|
|
56
|
-
findCurrentIndex(t: number): number;
|
|
57
|
-
getTargetElement(index: number): HTMLElement;
|
|
58
|
-
onScrollHandle: (ev: MouseEvent) => void;
|
|
59
|
-
onTabClickHandle: (index: number) => void;
|
|
19
|
+
type AnchorRef = {
|
|
60
20
|
SCROLL_TO_ITEM: (index: number) => void;
|
|
61
|
-
|
|
21
|
+
};
|
|
22
|
+
interface AnchorComponent extends React.ForwardRefExoticComponent<IProps & React.RefAttributes<AnchorRef>> {
|
|
23
|
+
Item: React.FC<AnchorItemProps>;
|
|
62
24
|
}
|
|
25
|
+
export type AnchorProps = IProps;
|
|
26
|
+
declare const QmAnchor: AnchorComponent;
|
|
63
27
|
export default QmAnchor;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import type { IAuth } from '../../_utils/types';
|
|
5
3
|
import type { ButtonProps as AntButtonProps } from '../../antd';
|
|
6
4
|
type IProps = AntButtonProps & {
|
|
7
5
|
click?: (ev: React.MouseEventHandler<HTMLElement>) => Promise<void> | void;
|
|
6
|
+
shortcutKey?: string;
|
|
8
7
|
authConfig?: IAuth;
|
|
9
8
|
confirm?: {
|
|
10
9
|
title?: string | React.ReactNode;
|
|
@@ -12,23 +11,6 @@ type IProps = AntButtonProps & {
|
|
|
12
11
|
onCancel?: (ev: any) => void;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
|
-
type IState = {
|
|
16
|
-
isLoading: boolean;
|
|
17
|
-
};
|
|
18
14
|
export type ButtonProps = IProps;
|
|
19
|
-
declare
|
|
20
|
-
static propTypes: {
|
|
21
|
-
click: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
confirm: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
|
-
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
24
|
-
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
-
}>>;
|
|
27
|
-
};
|
|
28
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
29
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
30
|
-
state: IState;
|
|
31
|
-
clickHandle: (ev: any) => Promise<void>;
|
|
32
|
-
render(): React.JSX.Element | null;
|
|
33
|
-
}
|
|
15
|
+
declare const QmButton: React.FC<IProps>;
|
|
34
16
|
export default QmButton;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { CountUpProps } from 'react-countup/build/CountUp';
|
|
3
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CountUpProps } from 'react-countup/build/CountUp';
|
|
4
3
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
5
|
-
|
|
4
|
+
interface IProps extends CountUpProps {
|
|
6
5
|
size?: ComponentSize;
|
|
7
6
|
className?: string;
|
|
8
7
|
style?: CSSProperties;
|
|
9
|
-
};
|
|
10
|
-
export type CountupProps = IProps;
|
|
11
|
-
declare class QmCountup extends Component<IProps> {
|
|
12
|
-
static defaultProps: {
|
|
13
|
-
duration: number;
|
|
14
|
-
};
|
|
15
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
16
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
17
|
-
render(): React.JSX.Element;
|
|
18
8
|
}
|
|
19
|
-
export
|
|
9
|
+
export type CountupProps = IProps;
|
|
10
|
+
declare const Countup: React.FC<IProps>;
|
|
11
|
+
export default Countup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import type { ComponentSize, CSSProperties, JSXElement } from '../../_utils/types';
|
|
5
3
|
type IProps = {
|
|
6
4
|
label: string;
|
|
@@ -15,20 +13,5 @@ type IProps = {
|
|
|
15
13
|
onCollapseChange?: (collapse: boolean) => void;
|
|
16
14
|
};
|
|
17
15
|
export type DividerProps = IProps;
|
|
18
|
-
declare
|
|
19
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
20
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
21
|
-
static propTypes: {
|
|
22
|
-
label: PropTypes.Requireable<string>;
|
|
23
|
-
size: (props: any, propName: any, componentName: any) => void;
|
|
24
|
-
extra: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
25
|
-
collapse: PropTypes.Requireable<boolean>;
|
|
26
|
-
bordered: PropTypes.Requireable<boolean>;
|
|
27
|
-
};
|
|
28
|
-
static defaultProps: {
|
|
29
|
-
bordered: boolean;
|
|
30
|
-
};
|
|
31
|
-
clickHandle: () => void;
|
|
32
|
-
render(): React.JSX.Element;
|
|
33
|
-
}
|
|
16
|
+
declare const QmDivider: React.FC<IProps>;
|
|
34
17
|
export default QmDivider;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import type { AnyObject, AjaxResponse, ComponentSize } from '../../_utils/types';
|
|
5
3
|
import type { ButtonProps } from '../../antd';
|
|
6
4
|
export type HttpRequestHeader = {
|
|
@@ -21,35 +19,6 @@ type IProps = Omit<ButtonProps, 'prefixCls' | 'ghost' | 'danger' | 'block'> & {
|
|
|
21
19
|
onSuccess?: () => void;
|
|
22
20
|
onError?: (error: AnyObject<unknown>) => void;
|
|
23
21
|
};
|
|
24
|
-
type IState = {
|
|
25
|
-
loading: boolean;
|
|
26
|
-
};
|
|
27
22
|
export type DownloadProps = IProps;
|
|
28
|
-
declare
|
|
29
|
-
|
|
30
|
-
action: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
31
|
-
api: PropTypes.Validator<(...args: any[]) => any>;
|
|
32
|
-
params: PropTypes.Requireable<object>;
|
|
33
|
-
}> | null | undefined>>;
|
|
34
|
-
size: (props: any, propName: any, componentName: any) => void;
|
|
35
|
-
fileName: PropTypes.Requireable<string>;
|
|
36
|
-
headers: PropTypes.Requireable<object>;
|
|
37
|
-
withCredentials: PropTypes.Requireable<boolean>;
|
|
38
|
-
params: PropTypes.Requireable<object>;
|
|
39
|
-
beforeDownload: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
-
onSuccess: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
-
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
|
-
};
|
|
43
|
-
static defaultProps: {
|
|
44
|
-
icon: React.JSX.Element;
|
|
45
|
-
children: string;
|
|
46
|
-
withCredentials: boolean;
|
|
47
|
-
};
|
|
48
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
49
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
50
|
-
state: IState;
|
|
51
|
-
getActionUrl(): Promise<string>;
|
|
52
|
-
downloadHandle: () => Promise<void>;
|
|
53
|
-
render(): React.JSX.Element;
|
|
54
|
-
}
|
|
55
|
-
export default QmDownload;
|
|
23
|
+
declare const Download: React.FC<IProps>;
|
|
24
|
+
export default Download;
|
package/lib/drawer/index.d.ts
CHANGED
|
@@ -1,50 +1,29 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
import ConfigContext from '../../config-provider/context';
|
|
4
|
-
import type { ComponentSize, Nullable } from '../../_utils/types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
5
3
|
import type { DrawerProps as AntDrawerProps } from '../../antd';
|
|
6
|
-
type EventType = React.MouseEvent<HTMLElement>;
|
|
7
4
|
type IProps = Omit<AntDrawerProps, 'size'> & {
|
|
8
5
|
visible?: boolean;
|
|
9
6
|
size?: ComponentSize;
|
|
10
7
|
loading?: boolean;
|
|
11
8
|
showHeader?: boolean;
|
|
12
9
|
showFullScreen?: boolean;
|
|
13
|
-
onClose?: (e:
|
|
10
|
+
onClose?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
14
11
|
onClosed?: () => void;
|
|
15
12
|
onFullChange?: (value: boolean) => void;
|
|
16
13
|
};
|
|
17
|
-
type
|
|
18
|
-
fullscreen: boolean;
|
|
19
|
-
spinning: boolean;
|
|
20
|
-
sloading: boolean;
|
|
21
|
-
};
|
|
22
|
-
export type DrawerProps = IProps;
|
|
23
|
-
declare class QmDrawer extends Component<IProps, IState> {
|
|
24
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
25
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
26
|
-
static propTypes: {
|
|
27
|
-
size: (props: any, propName: any, componentName: any) => void;
|
|
28
|
-
spinning: PropTypes.Requireable<boolean>;
|
|
29
|
-
};
|
|
30
|
-
static defaultProps: {
|
|
31
|
-
width: string;
|
|
32
|
-
showHeader: boolean;
|
|
33
|
-
showFullScreen: boolean;
|
|
34
|
-
destroyOnClose: boolean;
|
|
35
|
-
footer: null;
|
|
36
|
-
};
|
|
37
|
-
titleRef: React.RefObject<HTMLSpanElement>;
|
|
38
|
-
$drawer: Nullable<HTMLElement>;
|
|
39
|
-
private opened;
|
|
40
|
-
state: IState;
|
|
41
|
-
componentWillUnmount(): void;
|
|
42
|
-
componentDidUpdate(prevProps: IProps, prevState: IState): void;
|
|
43
|
-
afterVisibleChange: (visible: boolean) => void;
|
|
44
|
-
toggleHandle: () => void;
|
|
45
|
-
renderTitle(): React.JSX.Element;
|
|
14
|
+
export type DrawerRef = {
|
|
46
15
|
START_LOADING: () => void;
|
|
47
16
|
STOP_LOADING: () => void;
|
|
48
|
-
|
|
49
|
-
|
|
17
|
+
};
|
|
18
|
+
export type DrawerProps = IProps;
|
|
19
|
+
declare const QmDrawer: React.ForwardRefExoticComponent<Omit<AntDrawerProps, "size"> & {
|
|
20
|
+
visible?: boolean | undefined;
|
|
21
|
+
size?: ComponentSize | undefined;
|
|
22
|
+
loading?: boolean | undefined;
|
|
23
|
+
showHeader?: boolean | undefined;
|
|
24
|
+
showFullScreen?: boolean | undefined;
|
|
25
|
+
onClose?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
26
|
+
onClosed?: (() => void) | undefined;
|
|
27
|
+
onFullChange?: ((value: boolean) => void) | undefined;
|
|
28
|
+
} & React.RefAttributes<DrawerRef>>;
|
|
50
29
|
export default QmDrawer;
|
package/lib/empty/src/empty.d.ts
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import ConfigContext from '../../config-provider/context';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import type { ComponentSize } from '../../_utils/types';
|
|
4
3
|
import type { EmptyProps as AntEmptyProps } from '../../antd';
|
|
5
4
|
type IProps = AntEmptyProps & {
|
|
6
5
|
size?: ComponentSize;
|
|
7
6
|
};
|
|
8
7
|
export type EmptyProps = IProps;
|
|
9
|
-
declare
|
|
10
|
-
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
11
|
-
context: React.ContextType<typeof ConfigContext>;
|
|
12
|
-
static propTypes: {
|
|
13
|
-
size: (props: any, propName: any, componentName: any) => void;
|
|
14
|
-
};
|
|
15
|
-
render(): React.JSX.Element;
|
|
16
|
-
}
|
|
8
|
+
declare const QmEmpty: React.FC<IProps>;
|
|
17
9
|
export default QmEmpty;
|
package/lib/form/src/types.d.ts
CHANGED
package/lib/hooks/useSize.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -24,9 +24,9 @@ export type { AnchorProps as QmAnchorProps, AnchorItemProps as QmAnchorItemProps
|
|
|
24
24
|
export { default as QmAnchor } from './anchor';
|
|
25
25
|
export type { TabsProps as QmTabsProps, TabPaneProps as QmTabPaneProps } from './tabs';
|
|
26
26
|
export { default as QmTabs } from './tabs';
|
|
27
|
-
export type { DrawerProps as QmDrawerProps } from './drawer';
|
|
27
|
+
export type { DrawerRef as QmDrawerRef, DrawerProps as QmDrawerProps } from './drawer';
|
|
28
28
|
export { default as QmDrawer } from './drawer';
|
|
29
|
-
export type { ModalProps as QmModalProps } from './modal';
|
|
29
|
+
export type { ModalRef as QmModalRef, ModalProps as QmModalProps } from './modal';
|
|
30
30
|
export { default as QmModal } from './modal';
|
|
31
31
|
export type { FormRef as QmFormRef, FormProps as QmFormProps, IFormItem as QmFormItem, IFormItemType as QmFormItemType } from './form';
|
|
32
32
|
export { default as QmForm } from './form';
|
|
@@ -92,9 +92,9 @@ export type { AnchorProps as DcpAnchorProps, AnchorItemProps as DcpAnchorItemPro
|
|
|
92
92
|
export { default as DcpAnchor } from './anchor';
|
|
93
93
|
export type { TabsProps as DcpTabsProps, TabPaneProps as DcpTabPaneProps } from './tabs';
|
|
94
94
|
export { default as DcpTabs } from './tabs';
|
|
95
|
-
export type { DrawerProps as DcpDrawerProps } from './drawer';
|
|
95
|
+
export type { DrawerRef as DcpDrawerRef, DrawerProps as DcpDrawerProps } from './drawer';
|
|
96
96
|
export { default as DcpDrawer } from './drawer';
|
|
97
|
-
export type { ModalProps as DcpModalProps } from './modal';
|
|
97
|
+
export type { ModalRef as DcpModalRef, ModalProps as DcpModalProps } from './modal';
|
|
98
98
|
export { default as DcpModal } from './modal';
|
|
99
99
|
export type { FormRef as DcpFormRef, FormProps as DcpFormProps, IFormItem as DcpFormItem, IFormItemType as DcpFormItemType } from './form';
|
|
100
100
|
export { default as DcpForm } from './form';
|