@jiaozhiye/qm-design-react 1.7.18 → 1.7.20

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.
Files changed (72) hide show
  1. package/lib/anchor/index.d.ts +2 -2
  2. package/lib/anchor/src/anchor-item.d.ts +1 -1
  3. package/lib/anchor/src/anchor.d.ts +5 -2
  4. package/lib/button/index.d.ts +1 -1
  5. package/lib/button/src/button.d.ts +3 -3
  6. package/lib/collapse/index.d.ts +1 -1
  7. package/lib/collapse/src/collapse.d.ts +1 -1
  8. package/lib/config-provider/index.d.ts +1 -1
  9. package/lib/config-provider/src/config-provider.d.ts +1 -1
  10. package/lib/copy-to-clipboard/index.d.ts +1 -1
  11. package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +1 -1
  12. package/lib/countup/index.d.ts +1 -1
  13. package/lib/countup/src/countup.d.ts +1 -1
  14. package/lib/cropper/index.d.ts +1 -1
  15. package/lib/cropper/src/cropper.d.ts +1 -1
  16. package/lib/divider/index.d.ts +1 -1
  17. package/lib/divider/src/divider.d.ts +1 -1
  18. package/lib/download/index.d.ts +1 -1
  19. package/lib/download/src/download.d.ts +1 -1
  20. package/lib/drawer/index.d.ts +1 -1
  21. package/lib/drawer/src/drawer.d.ts +3 -3
  22. package/lib/drawer/style/index.less +3 -3
  23. package/lib/empty/index.d.ts +1 -1
  24. package/lib/empty/src/empty.d.ts +3 -3
  25. package/lib/form/index.d.ts +2 -2
  26. package/lib/form/src/form.d.ts +3 -3
  27. package/lib/form/src/types.d.ts +2 -0
  28. package/lib/index.d.ts +29 -29
  29. package/lib/index.esm.js +1 -1
  30. package/lib/index.full.js +1 -1
  31. package/lib/index.js +1 -1
  32. package/lib/modal/index.d.ts +1 -1
  33. package/lib/modal/src/modal.d.ts +3 -3
  34. package/lib/modal/style/index.less +3 -3
  35. package/lib/print/index.d.ts +1 -1
  36. package/lib/print/src/print.d.ts +1 -1
  37. package/lib/range-table-helper/index.d.ts +1 -1
  38. package/lib/range-table-helper/src/range-table-helper.d.ts +1 -1
  39. package/lib/scrollbar/index.d.ts +1 -1
  40. package/lib/scrollbar/src/scrollbar.d.ts +1 -1
  41. package/lib/search-helper/index.d.ts +1 -1
  42. package/lib/search-helper/src/search-helper.d.ts +1 -1
  43. package/lib/search-tree/index.d.ts +1 -1
  44. package/lib/search-tree/src/search-tree.d.ts +1 -1
  45. package/lib/space/index.d.ts +1 -1
  46. package/lib/space/src/space.d.ts +3 -3
  47. package/lib/spin/index.d.ts +1 -1
  48. package/lib/spin/src/spin.d.ts +3 -3
  49. package/lib/split/index.d.ts +2 -2
  50. package/lib/split/src/split-pane.d.ts +1 -1
  51. package/lib/split/src/split.d.ts +3 -3
  52. package/lib/style/index.css +8 -8
  53. package/lib/style/index.min.css +1 -1
  54. package/lib/table/index.d.ts +2 -2
  55. package/lib/table/src/pager/index.d.ts +0 -2
  56. package/lib/table/src/table/index.d.ts +1 -1
  57. package/lib/tabs/index.d.ts +2 -2
  58. package/lib/tabs/src/tab-pane.d.ts +3 -3
  59. package/lib/tabs/src/tabs.d.ts +3 -3
  60. package/lib/tinymce/index.d.ts +1 -1
  61. package/lib/tinymce/src/index.d.ts +1 -1
  62. package/lib/transition/index.d.ts +1 -1
  63. package/lib/transition/src/transition.d.ts +1 -1
  64. package/lib/tree-helper/index.d.ts +1 -1
  65. package/lib/tree-helper/src/tree-helper.d.ts +1 -1
  66. package/lib/tree-table-helper/index.d.ts +1 -1
  67. package/lib/tree-table-helper/src/tree-table-helper.d.ts +1 -1
  68. package/lib/upload-file/index.d.ts +1 -1
  69. package/lib/upload-file/src/upload-file.d.ts +1 -1
  70. package/lib/upload-img/index.d.ts +1 -1
  71. package/lib/upload-img/src/upload-img.d.ts +1 -1
  72. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  import Anchor from './src/anchor';
2
- export type { QmAnchorProps } from './src/anchor';
3
- export type { QmAnchorItemProps } from './src/anchor-item';
2
+ export type { AnchorProps } from './src/anchor';
3
+ export type { AnchorItemProps } from './src/anchor-item';
4
4
  export default Anchor;
@@ -7,7 +7,7 @@ type IProps = {
7
7
  className?: string;
8
8
  children?: React.ReactNode;
9
9
  };
10
- export type QmAnchorItemProps = IProps;
10
+ export type AnchorItemProps = IProps;
11
11
  declare class QmAnchorItem extends Component<IProps> {
12
12
  static displayName: string;
13
13
  render(): React.JSX.Element;
@@ -6,6 +6,7 @@ type ILabelItem = {
6
6
  label: string;
7
7
  };
8
8
  type IProps = {
9
+ defaultActiveIndex?: number;
9
10
  size?: ComponentSize;
10
11
  labelWidth?: number | string;
11
12
  labelList?: Array<ILabelItem>;
@@ -18,7 +19,7 @@ type IProps = {
18
19
  type IState = {
19
20
  activeKey: number;
20
21
  };
21
- export type QmAnchorProps = IProps;
22
+ export type AnchorProps = IProps;
22
23
  declare class QmAnchor extends Component<IProps, IState> {
23
24
  static Item: React.ClassicComponentClass<{
24
25
  label: string;
@@ -45,11 +46,13 @@ declare class QmAnchor extends Component<IProps, IState> {
45
46
  private scrollEvent;
46
47
  private scrollRef;
47
48
  private get __is_conf();
48
- state: IState;
49
+ constructor(props: IProps);
49
50
  componentDidMount(): void;
50
51
  componentWillUnmount(): void;
52
+ initialHandle(): void;
51
53
  createDistances(): number[];
52
54
  findCurrentIndex(t: number): number;
55
+ getTargetElement(index: number): HTMLElement;
53
56
  onScrollHandle: (ev: MouseEvent) => void;
54
57
  onTabClickHandle: (index: number) => void;
55
58
  SCROLL_TO_ITEM: (index: number) => void;
@@ -1,3 +1,3 @@
1
1
  import Button from './src/button';
2
- export type { QmButtonProps } from './src/button';
2
+ export type { ButtonProps } from './src/button';
3
3
  export default Button;
@@ -1,8 +1,8 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import type { IAuth } from '../../_utils/types';
4
- import type { ButtonProps } from '../../antd';
5
- type IProps = ButtonProps & {
4
+ import type { ButtonProps as AntButtonProps } from '../../antd';
5
+ type IProps = AntButtonProps & {
6
6
  click?: (ev: React.MouseEventHandler<HTMLElement>) => Promise<void> | void;
7
7
  authConfig?: IAuth;
8
8
  confirm?: {
@@ -14,7 +14,7 @@ type IProps = ButtonProps & {
14
14
  type IState = {
15
15
  isLoading: boolean;
16
16
  };
17
- export type QmButtonProps = IProps;
17
+ export type ButtonProps = IProps;
18
18
  declare class QmButton extends Component<IProps, IState> {
19
19
  static propTypes: {
20
20
  click: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1,3 +1,3 @@
1
1
  import Collapse from './src/collapse';
2
- export type { QmCollapseProps } from './src/collapse';
2
+ export type { CollapseProps } from './src/collapse';
3
3
  export default Collapse;
@@ -13,6 +13,6 @@ type IProps = {
13
13
  containerStyle?: React.CSSProperties;
14
14
  children?: React.ReactNode;
15
15
  };
16
- export type QmCollapseProps = IProps;
16
+ export type CollapseProps = IProps;
17
17
  declare const Collapse: React.FC<IProps>;
18
18
  export default Collapse;
@@ -1,3 +1,3 @@
1
1
  import ConfigProvider from './src/config-provider';
2
- export type { QmConfigProviderProps } from './src/config-provider';
2
+ export type { ConfigProviderProps } from './src/config-provider';
3
3
  export default ConfigProvider;
@@ -11,7 +11,7 @@ type IProps = {
11
11
  type IState = {
12
12
  value: IConfig;
13
13
  };
14
- export type QmConfigProviderProps = IProps;
14
+ export type ConfigProviderProps = IProps;
15
15
  declare class QmConfigProvider extends Component<IProps, IState> {
16
16
  static propTypes: {
17
17
  locale: PropTypes.Requireable<string>;
@@ -1,3 +1,3 @@
1
1
  import CopyToClipboard from './src/copy-to-clipboard';
2
- export type { QmCopyToClipboardProps } from './src/copy-to-clipboard';
2
+ export type { CopyToClipboardProps } from './src/copy-to-clipboard';
3
3
  export default CopyToClipboard;
@@ -10,6 +10,6 @@ type IProps = {
10
10
  onCopy?: (text: string, result: boolean) => void;
11
11
  children?: React.ReactNode;
12
12
  };
13
- export type QmCopyToClipboardProps = IProps;
13
+ export type CopyToClipboardProps = IProps;
14
14
  declare const CopyToClipboard: React.FC<IProps>;
15
15
  export default CopyToClipboard;
@@ -1,3 +1,3 @@
1
1
  import Countup from './src/countup';
2
- export type { QmCountupProps } from './src/countup';
2
+ export type { CountupProps } from './src/countup';
3
3
  export default Countup;
@@ -6,7 +6,7 @@ type IProps = CountUpProps & {
6
6
  className?: string;
7
7
  style?: CSSProperties;
8
8
  };
9
- export type QmCountupProps = IProps;
9
+ export type CountupProps = IProps;
10
10
  declare class QmCountup extends Component<IProps> {
11
11
  static defaultProps: {
12
12
  duration: number;
@@ -1,3 +1,3 @@
1
1
  import Cropper from './src/cropper';
2
- export type { QmCropperProps } from './src/cropper';
2
+ export type { CropperProps } from './src/cropper';
3
3
  export default Cropper;
@@ -46,7 +46,7 @@ type IProps = {
46
46
  crop?: AnyFunction<void>;
47
47
  zoom?: AnyFunction<void>;
48
48
  };
49
- export type QmCropperProps = IProps;
49
+ export type CropperProps = IProps;
50
50
  declare class QmCropper extends Component<IProps> {
51
51
  static defaultProps: {
52
52
  src: string;
@@ -1,3 +1,3 @@
1
1
  import Divider from './src/divider';
2
- export type { QmDividerProps } from './src/divider';
2
+ export type { DividerProps } from './src/divider';
3
3
  export default Divider;
@@ -12,7 +12,7 @@ type IProps = {
12
12
  style?: CSSProperties;
13
13
  onCollapseChange?: (collapse: boolean) => void;
14
14
  };
15
- export type QmDividerProps = IProps;
15
+ export type DividerProps = IProps;
16
16
  declare class QmDivider extends Component<IProps> {
17
17
  static propTypes: {
18
18
  label: PropTypes.Requireable<string>;
@@ -1,3 +1,3 @@
1
1
  import Download from './src/download';
2
- export type { QmDownloadProps } from './src/download';
2
+ export type { DownloadProps } from './src/download';
3
3
  export default Download;
@@ -23,7 +23,7 @@ type IProps = Omit<ButtonProps, 'prefixCls' | 'ghost' | 'danger' | 'block'> & {
23
23
  type IState = {
24
24
  loading: boolean;
25
25
  };
26
- export type QmDownloadProps = IProps;
26
+ export type DownloadProps = IProps;
27
27
  declare class QmDownload extends Component<IProps, IState> {
28
28
  static propTypes: {
29
29
  action: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
@@ -1,3 +1,3 @@
1
1
  import Drawer from './src/drawer';
2
- export type { QmDrawerProps } from './src/drawer';
2
+ export type { DrawerProps } from './src/drawer';
3
3
  export default Drawer;
@@ -1,9 +1,9 @@
1
1
  import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import type { ComponentSize, Nullable } from '../../_utils/types';
4
- import type { DrawerProps } from '../../antd';
4
+ import type { DrawerProps as AntDrawerProps } from '../../antd';
5
5
  type EventType = React.MouseEvent<HTMLElement>;
6
- type IProps = Omit<DrawerProps, 'size'> & {
6
+ type IProps = Omit<AntDrawerProps, 'size'> & {
7
7
  visible?: boolean;
8
8
  size?: ComponentSize;
9
9
  loading?: boolean;
@@ -17,7 +17,7 @@ type IState = {
17
17
  spinning: boolean;
18
18
  sloading: boolean;
19
19
  };
20
- export type QmDrawerProps = IProps;
20
+ export type DrawerProps = IProps;
21
21
  declare class QmDrawer extends Component<IProps, IState> {
22
22
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
23
23
  static propTypes: {
@@ -45,7 +45,7 @@
45
45
  .ant-drawer-body {
46
46
  padding: @--padding-md;
47
47
  }
48
- &-spin {
48
+ .spinning {
49
49
  position: absolute;
50
50
  top: 44px;
51
51
  left: 0;
@@ -67,7 +67,7 @@
67
67
  .ant-drawer-header {
68
68
  height: 48px;
69
69
  }
70
- .@{qm-prefix}-drawer-spin {
70
+ .spinning {
71
71
  top: 48px;
72
72
  }
73
73
  }
@@ -75,7 +75,7 @@
75
75
  .ant-drawer-header {
76
76
  height: 40px;
77
77
  }
78
- .@{qm-prefix}-drawer-spin {
78
+ .spinning {
79
79
  top: 40px;
80
80
  }
81
81
  }
@@ -1,3 +1,3 @@
1
1
  import Empty from './src/empty';
2
- export type { QmEmptyProps } from './src/empty';
2
+ export type { EmptyProps } from './src/empty';
3
3
  export default Empty;
@@ -1,10 +1,10 @@
1
1
  import React, { Component } from 'react';
2
2
  import type { ComponentSize } from '../../_utils/types';
3
- import type { EmptyProps } from '../../antd';
4
- type IProps = EmptyProps & {
3
+ import type { EmptyProps as AntEmptyProps } from '../../antd';
4
+ type IProps = AntEmptyProps & {
5
5
  size?: ComponentSize;
6
6
  };
7
- export type QmEmptyProps = IProps;
7
+ export type EmptyProps = IProps;
8
8
  declare class QmEmpty extends Component<IProps> {
9
9
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
10
10
  static propTypes: {
@@ -1,4 +1,4 @@
1
1
  import Form from './src/form';
2
- export type { FormRef as QmFormRef, QmFormProps } from './src/form';
3
- export type { IFormItem as QmFormItem, IFormItemType as QmFormItemType } from './src/types';
2
+ export type { FormRef, FormProps } from './src/form';
3
+ export type { IFormItem, IFormItemType } from './src/types';
4
4
  export default Form;
@@ -3,8 +3,8 @@ import React, { Component } from 'react';
3
3
  import { IFieldData } from './types';
4
4
  import type { IFormProps, IFormData, IFormItem, IExtraData, IViewData, IExpandData, IFieldAuthItem } from './types';
5
5
  import type { JSXElement, ValueOf, IDict } from '../../_utils/types';
6
- import type { FormProps } from '../../antd';
7
- type IProps = FormProps & IFormProps;
6
+ import type { FormProps as AntFormProps } from '../../antd';
7
+ type IProps = AntFormProps & IFormProps;
8
8
  type IState = {
9
9
  formData: IFormData;
10
10
  viewData: IViewData;
@@ -14,7 +14,7 @@ type IState = {
14
14
  flexCols: number;
15
15
  collapse: boolean;
16
16
  };
17
- export type QmFormProps = IProps;
17
+ export type FormProps = IProps;
18
18
  export type FormRef = QmForm;
19
19
  declare class QmForm extends Component<IProps, IState> {
20
20
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
@@ -110,6 +110,7 @@ export type IFormItem = {
110
110
  itemList?: IDict[];
111
111
  prefix?: React.ReactNode;
112
112
  suffix?: React.ReactNode;
113
+ autoFocus?: boolean;
113
114
  maxLength?: number;
114
115
  password?: boolean;
115
116
  toUpper?: boolean;
@@ -171,6 +172,7 @@ export type IFormItem = {
171
172
  maxCount?: number;
172
173
  fileTypes?: string[];
173
174
  fileSize?: number;
175
+ showTip?: boolean;
174
176
  openCropper?: boolean;
175
177
  onRemove?: (file: any) => void;
176
178
  fixedSize?: [number, number] | undefined;
package/lib/index.d.ts CHANGED
@@ -1,60 +1,60 @@
1
- export type { QmConfigProviderProps } from './config-provider';
1
+ export type { ConfigProviderProps as QmConfigProviderProps } from './config-provider';
2
2
  export { default as QmConfigProvider } from './config-provider';
3
- export type { QmButtonProps } from './button';
3
+ export type { ButtonProps as QmButtonProps } from './button';
4
4
  export { default as QmButton } from './button';
5
- export type { QmSpaceProps } from './space';
5
+ export type { SpaceProps as QmSpaceProps } from './space';
6
6
  export { default as QmSpace } from './space';
7
- export type { QmDividerProps } from './divider';
7
+ export type { DividerProps as QmDividerProps } from './divider';
8
8
  export { default as QmDivider } from './divider';
9
- export type { QmCollapseProps } from './collapse';
9
+ export type { CollapseProps as QmCollapseProps } from './collapse';
10
10
  export { default as QmCollapse } from './collapse';
11
- export type { QmSplitProps, QmSplitPaneProps } from './split';
11
+ export type { SplitProps as QmSplitProps, SplitPaneProps as QmSplitPaneProps } from './split';
12
12
  export { default as QmSplit } from './split';
13
- export type { QmCountupProps } from './countup';
13
+ export type { CountupProps as QmCountupProps } from './countup';
14
14
  export { default as QmCountup } from './countup';
15
- export type { QmEmptyProps } from './empty';
15
+ export type { EmptyProps as QmEmptyProps } from './empty';
16
16
  export { default as QmEmpty } from './empty';
17
- export type { QmSpinProps } from './spin';
17
+ export type { SpinProps as QmSpinProps } from './spin';
18
18
  export { default as QmSpin } from './spin';
19
- export type { QmScrollbarProps } from './scrollbar';
19
+ export type { ScrollbarProps as QmScrollbarProps } from './scrollbar';
20
20
  export { default as QmScrollbar } from './scrollbar';
21
- export type { QmDownloadProps } from './download';
21
+ export type { DownloadProps as QmDownloadProps } from './download';
22
22
  export { default as QmDownload } from './download';
23
- export type { QmAnchorProps, QmAnchorItemProps } from './anchor';
23
+ export type { AnchorProps as QmAnchorProps, AnchorItemProps as QmAnchorItemProps } from './anchor';
24
24
  export { default as QmAnchor } from './anchor';
25
- export type { QmTabsProps, QmTabPaneProps } from './tabs';
25
+ export type { TabsProps as QmTabsProps, TabPaneProps as QmTabPaneProps } from './tabs';
26
26
  export { default as QmTabs } from './tabs';
27
- export type { QmDrawerProps } from './drawer';
27
+ export type { DrawerProps as QmDrawerProps } from './drawer';
28
28
  export { default as QmDrawer } from './drawer';
29
- export type { QmModalProps } from './modal';
29
+ export type { ModalProps as QmModalProps } from './modal';
30
30
  export { default as QmModal } from './modal';
31
- export type { QmFormRef, QmFormProps, QmFormItem, QmFormItemType } from './form';
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';
33
- export type { QmTinymceProps } from './tinymce';
33
+ export type { TinymceProps as QmTinymceProps } from './tinymce';
34
34
  export { default as QmTinymce } from './tinymce';
35
- export type { QmCropperProps } from './cropper';
35
+ export type { CropperProps as QmCropperProps } from './cropper';
36
36
  export { default as QmCropper } from './cropper';
37
- export type { QmUploadFileProps } from './upload-file';
37
+ export type { UploadFileProps as QmUploadFileProps } from './upload-file';
38
38
  export { default as QmUploadFile } from './upload-file';
39
- export type { QmUploadImgProps } from './upload-img';
39
+ export type { UploadImgProps as QmUploadImgProps } from './upload-img';
40
40
  export { default as QmUploadImg } from './upload-img';
41
- export type { QmSearchTreeProps } from './search-tree';
41
+ export type { SearchTreeProps as QmSearchTreeProps } from './search-tree';
42
42
  export { default as QmSearchTree } from './search-tree';
43
- export type { QmTableRef, QmTableProps, QmTableColumn } from './table';
43
+ export type { TableRef as QmTableRef, TableProps as QmTableProps, TableColumn as QmTableColumn } from './table';
44
44
  export { default as QmTable } from './table';
45
- export type { QmCopyToClipboardProps } from './copy-to-clipboard';
45
+ export type { CopyToClipboardProps as QmCopyToClipboardProps } from './copy-to-clipboard';
46
46
  export { default as QmCopyToClipboard } from './copy-to-clipboard';
47
- export type { QmSearchHelperProps } from './search-helper';
47
+ export type { SearchHelperProps as QmSearchHelperProps } from './search-helper';
48
48
  export { default as QmSearchHelper } from './search-helper';
49
- export type { QmTreeTableHelperProps } from './tree-table-helper';
49
+ export type { TreeTableHelperProps as QmTreeTableHelperProps } from './tree-table-helper';
50
50
  export { default as QmTreeTableHelper } from './tree-table-helper';
51
- export type { QmTreeHelperProps } from './tree-helper';
51
+ export type { TreeHelperProps as QmTreeHelperProps } from './tree-helper';
52
52
  export { default as QmTreeHelper } from './tree-helper';
53
- export type { QmRangeTableHelperProps } from './range-table-helper';
53
+ export type { RangeTableHelperProps as QmRangeTableHelperProps } from './range-table-helper';
54
54
  export { default as QmRangeTableHelper } from './range-table-helper';
55
- export type { QmPrintProps } from './print';
55
+ export type { PrintProps as QmPrintProps } from './print';
56
56
  export { default as QmPrint } from './print';
57
- export type { QmTransitionProps } from './transition';
57
+ export type { TransitionProps as QmTransitionProps } from './transition';
58
58
  export { default as QmTransition } from './transition';
59
59
  export { default as pinyin } from './pinyin';
60
60
  export { default as version } from './version';