@jiaozhiye/qm-design-react 1.10.8 → 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/drawer/index.d.ts +1 -1
- package/lib/drawer/src/drawer.d.ts +16 -37
- package/lib/form/src/types.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.js +5 -5
- package/lib/locale/lang/zh-cn.js +5 -5
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/src/modal.d.ts +17 -52
- package/lib/spin/style/index.less +18 -18
- package/lib/split/src/split-pane.d.ts +2 -2
- package/lib/split/src/split.d.ts +1 -1
- package/lib/tabs/src/tab-pane.d.ts +3 -6
- package/lib/tabs/src/tabs.d.ts +5 -11
- package/lib/upload-file/src/upload-file.d.ts +1 -1
- package/lib/upload-file/style/index.less +53 -53
- package/lib/upload-img/src/cropper-preview.d.ts +2 -26
- package/lib/upload-img/style/index.less +101 -101
- 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;
|
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/form/src/types.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ export type IFormItem = {
|
|
|
185
185
|
fileSize?: number;
|
|
186
186
|
draggable?: boolean;
|
|
187
187
|
editable?: boolean;
|
|
188
|
-
batchDownload?: boolean;
|
|
188
|
+
batchDownload?: (fileList: UploadFile[]) => Promise<void> | boolean;
|
|
189
189
|
fileDirection?: IFormLayout;
|
|
190
190
|
showTip?: boolean;
|
|
191
191
|
openCropper?: boolean;
|
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';
|