@jiaozhiye/qm-design-react 1.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +4 -0
- package/lib/_utils/cloneElement.d.ts +2 -0
- package/lib/_utils/dom.d.ts +68 -0
- package/lib/_utils/download.d.ts +7 -0
- package/lib/_utils/error.d.ts +2 -0
- package/lib/_utils/isServer.d.ts +2 -0
- package/lib/_utils/prefix.d.ts +1 -0
- package/lib/_utils/resize-event.d.ts +10 -0
- package/lib/_utils/scrollbar-width.d.ts +1 -0
- package/lib/_utils/types.d.ts +33 -0
- package/lib/_utils/util.d.ts +23 -0
- package/lib/_utils/validators.d.ts +2 -0
- package/lib/anchor/index.d.ts +4 -0
- package/lib/anchor/src/anchor-item.d.ts +13 -0
- package/lib/anchor/src/anchor-nav.d.ts +12 -0
- package/lib/anchor/src/anchor.d.ts +52 -0
- package/lib/anchor/style/index.less +60 -0
- package/lib/antd/Calendar.d.ts +4 -0
- package/lib/antd/DatePicker.d.ts +11 -0
- package/lib/antd/TimePicker.d.ts +14 -0
- package/lib/antd/index.d.ts +123 -0
- package/lib/antd/index.less +7 -0
- package/lib/button/index.d.ts +3 -0
- package/lib/button/src/button.d.ts +30 -0
- package/lib/button/style/index.less +12 -0
- package/lib/config-provider/context.d.ts +9 -0
- package/lib/config-provider/index.d.ts +3 -0
- package/lib/config-provider/src/config-provider.d.ts +34 -0
- package/lib/countup/index.d.ts +3 -0
- package/lib/countup/src/countup.d.ts +17 -0
- package/lib/countup/style/index.less +22 -0
- package/lib/cropper/index.d.ts +3 -0
- package/lib/cropper/src/cropper.d.ts +213 -0
- package/lib/cropper/style/index.less +13 -0
- package/lib/divider/index.d.ts +3 -0
- package/lib/divider/src/divider.d.ts +25 -0
- package/lib/divider/style/index.less +54 -0
- package/lib/download/index.d.ts +3 -0
- package/lib/download/src/download.d.ts +51 -0
- package/lib/download/style/index.less +12 -0
- package/lib/drawer/index.d.ts +3 -0
- package/lib/drawer/src/drawer.d.ts +33 -0
- package/lib/drawer/style/index.less +77 -0
- package/lib/empty/index.d.ts +3 -0
- package/lib/empty/src/empty.d.ts +15 -0
- package/lib/empty/style/index.less +35 -0
- package/lib/form/index.d.ts +4 -0
- package/lib/form/src/china-data.d.ts +4577 -0
- package/lib/form/src/context.d.ts +6 -0
- package/lib/form/src/fields-filter.d.ts +26 -0
- package/lib/form/src/form-cascader.d.ts +21 -0
- package/lib/form/src/form-checkbox-group.d.ts +18 -0
- package/lib/form/src/form-checkbox.d.ts +10 -0
- package/lib/form/src/form-city-select.d.ts +10 -0
- package/lib/form/src/form-date.d.ts +10 -0
- package/lib/form/src/form-divider.d.ts +10 -0
- package/lib/form/src/form-immediate.d.ts +10 -0
- package/lib/form/src/form-input-number.d.ts +10 -0
- package/lib/form/src/form-input.d.ts +10 -0
- package/lib/form/src/form-radio.d.ts +18 -0
- package/lib/form/src/form-range-date.d.ts +10 -0
- package/lib/form/src/form-range-input-number.d.ts +10 -0
- package/lib/form/src/form-range-input.d.ts +10 -0
- package/lib/form/src/form-range-time.d.ts +10 -0
- package/lib/form/src/form-region-select.d.ts +10 -0
- package/lib/form/src/form-search-helper.d.ts +10 -0
- package/lib/form/src/form-select.d.ts +21 -0
- package/lib/form/src/form-switch.d.ts +10 -0
- package/lib/form/src/form-text-area.d.ts +10 -0
- package/lib/form/src/form-time.d.ts +10 -0
- package/lib/form/src/form-tinymce.d.ts +10 -0
- package/lib/form/src/form-tree-select.d.ts +23 -0
- package/lib/form/src/form-upload-file.d.ts +18 -0
- package/lib/form/src/form-upload-img.d.ts +18 -0
- package/lib/form/src/form.d.ts +169 -0
- package/lib/form/src/types.d.ts +251 -0
- package/lib/form/src/utils.d.ts +7 -0
- package/lib/form/style/index.less +243 -0
- package/lib/hooks/useForceUpdate.d.ts +1 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useResizeObserve.d.ts +5 -0
- package/lib/hooks/useUpdateEffect.d.ts +2 -0
- package/lib/index.d.ts +42 -0
- package/lib/index.esm.js +16 -0
- package/lib/index.full.js +1 -0
- package/lib/index.js +16 -0
- package/lib/locale/index.d.ts +11 -0
- package/lib/locale/index.js +51 -0
- package/lib/locale/lang/en.d.ts +243 -0
- package/lib/locale/lang/en.js +248 -0
- package/lib/locale/lang/zh-cn.d.ts +243 -0
- package/lib/locale/lang/zh-cn.js +248 -0
- package/lib/modal/index.d.ts +3 -0
- package/lib/modal/src/modal.d.ts +38 -0
- package/lib/modal/style/index.less +89 -0
- package/lib/pinyin/core.d.ts +12 -0
- package/lib/pinyin/dict.d.ts +31 -0
- package/lib/pinyin/index.d.ts +2 -0
- package/lib/pinyin/patchers/56l.d.ts +7 -0
- package/lib/qm-design.d.ts +28 -0
- package/lib/search-helper/index.d.ts +3 -0
- package/lib/search-helper/src/search-helper.d.ts +20 -0
- package/lib/search-helper/style/index.less +13 -0
- package/lib/space/index.d.ts +3 -0
- package/lib/space/src/space.d.ts +12 -0
- package/lib/space/style/index.less +12 -0
- package/lib/spin/index.d.ts +3 -0
- package/lib/spin/src/spin.d.ts +11 -0
- package/lib/spin/style/index.less +12 -0
- package/lib/split/index.d.ts +4 -0
- package/lib/split/src/context.d.ts +8 -0
- package/lib/split/src/resize-bar.d.ts +8 -0
- package/lib/split/src/split-pane.d.ts +9 -0
- package/lib/split/src/split.d.ts +14 -0
- package/lib/split/style/index.less +86 -0
- package/lib/style/common.less +8 -0
- package/lib/style/index.css +1 -0
- package/lib/style/index.less +32 -0
- package/lib/style/mixins/box.less +13 -0
- package/lib/style/mixins/clearfix.less +21 -0
- package/lib/style/mixins/index.less +11 -0
- package/lib/style/mixins/operation-unit.less +24 -0
- package/lib/style/mixins/reset.less +35 -0
- package/lib/style/mixins/size.less +15 -0
- package/lib/style/reset.less +134 -0
- package/lib/style/themes/default.less +113 -0
- package/lib/style/themes/index.less +7 -0
- package/lib/table/index.d.ts +4 -0
- package/lib/table/src/alert/index.d.ts +6 -0
- package/lib/table/src/body/index.d.ts +8 -0
- package/lib/table/src/body/useValueFormat.d.ts +12 -0
- package/lib/table/src/column-filter/index.d.ts +7 -0
- package/lib/table/src/config/index.d.ts +47 -0
- package/lib/table/src/context/index.d.ts +74 -0
- package/lib/table/src/edit/InputNumber.d.ts +17 -0
- package/lib/table/src/edit/index.d.ts +12 -0
- package/lib/table/src/empty/index.d.ts +3 -0
- package/lib/table/src/expandable/index.d.ts +8 -0
- package/lib/table/src/export/define.d.ts +8 -0
- package/lib/table/src/export/index.d.ts +18 -0
- package/lib/table/src/export/setting.d.ts +8 -0
- package/lib/table/src/export/useExport.d.ts +9 -0
- package/lib/table/src/filter/index.d.ts +8 -0
- package/lib/table/src/filter-sql/index.d.ts +5 -0
- package/lib/table/src/filter-sql/lib/filter_string.d.ts +11 -0
- package/lib/table/src/filter-sql/lib/operations.d.ts +8 -0
- package/lib/table/src/filter-sql/lib/variables_replacement.d.ts +5 -0
- package/lib/table/src/footer/index.d.ts +8 -0
- package/lib/table/src/full-screen/index.d.ts +6 -0
- package/lib/table/src/group-summary/index.d.ts +3 -0
- package/lib/table/src/group-summary/result.d.ts +9 -0
- package/lib/table/src/group-summary/setting.d.ts +6 -0
- package/lib/table/src/header/index.d.ts +10 -0
- package/lib/table/src/hooks/useImperativeMethod.d.ts +36 -0
- package/lib/table/src/hooks/useTableCore.d.ts +86 -0
- package/lib/table/src/hooks/useTableEffect.d.ts +35 -0
- package/lib/table/src/hooks/useTableLayout.d.ts +39 -0
- package/lib/table/src/hooks/useTableMemo.d.ts +43 -0
- package/lib/table/src/hooks/useTableRef.d.ts +89 -0
- package/lib/table/src/hooks/useTableState.d.ts +94 -0
- package/lib/table/src/icon/caretdown.d.ts +3 -0
- package/lib/table/src/icon/caretup.d.ts +3 -0
- package/lib/table/src/icon/filter.d.ts +3 -0
- package/lib/table/src/manager/index.d.ts +15 -0
- package/lib/table/src/pager/index.d.ts +11 -0
- package/lib/table/src/print/index.d.ts +7 -0
- package/lib/table/src/reload/index.d.ts +3 -0
- package/lib/table/src/resizable/index.d.ts +7 -0
- package/lib/table/src/select-collection/index.d.ts +7 -0
- package/lib/table/src/select-collection/result.d.ts +8 -0
- package/lib/table/src/selection/all.d.ts +7 -0
- package/lib/table/src/selection/index.d.ts +12 -0
- package/lib/table/src/store/index.d.ts +29 -0
- package/lib/table/src/super-search/index.d.ts +3 -0
- package/lib/table/src/super-search/result.d.ts +6 -0
- package/lib/table/src/table/index.d.ts +5 -0
- package/lib/table/src/table/props.d.ts +243 -0
- package/lib/table/src/table/types.d.ts +335 -0
- package/lib/table/src/utils/index.d.ts +37 -0
- package/lib/table/style/alert.less +34 -0
- package/lib/table/style/body.less +42 -0
- package/lib/table/style/column-filter.less +88 -0
- package/lib/table/style/empty.less +16 -0
- package/lib/table/style/expandable.less +55 -0
- package/lib/table/style/export.less +30 -0
- package/lib/table/style/footer.less +28 -0
- package/lib/table/style/full-screen.less +21 -0
- package/lib/table/style/group-summary.less +93 -0
- package/lib/table/style/header.less +178 -0
- package/lib/table/style/index.less +25 -0
- package/lib/table/style/pager.less +12 -0
- package/lib/table/style/print.less +21 -0
- package/lib/table/style/reload.less +21 -0
- package/lib/table/style/select-collection.less +21 -0
- package/lib/table/style/size.less +69 -0
- package/lib/table/style/super-search.less +102 -0
- package/lib/table/style/table.less +328 -0
- package/lib/table/style/toper.less +28 -0
- package/lib/table/style/variable.less +48 -0
- package/lib/tabs/index.d.ts +4 -0
- package/lib/tabs/src/tab-pane.d.ts +8 -0
- package/lib/tabs/src/tabs.d.ts +16 -0
- package/lib/tabs/style/index.less +22 -0
- package/lib/tinymce/index.d.ts +3 -0
- package/lib/tinymce/src/Events.d.ts +78 -0
- package/lib/tinymce/src/ScriptLoader.d.ts +13 -0
- package/lib/tinymce/src/TinyMCE.d.ts +2 -0
- package/lib/tinymce/src/Utils.d.ts +19 -0
- package/lib/tinymce/src/components/Editor.d.ts +66 -0
- package/lib/tinymce/src/components/EditorPropTypes.d.ts +18 -0
- package/lib/tinymce/src/index.d.ts +29 -0
- package/lib/tinymce/style/index.less +18 -0
- package/lib/upload-file/index.d.ts +3 -0
- package/lib/upload-file/src/upload-file.d.ts +16 -0
- package/lib/upload-file/style/index.less +12 -0
- package/lib/upload-img/index.d.ts +3 -0
- package/lib/upload-img/src/cropper-preview.d.ts +30 -0
- package/lib/upload-img/src/upload-img.d.ts +27 -0
- package/lib/upload-img/style/index.less +36 -0
- package/lib/version/index.d.ts +2 -0
- package/package.json +136 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-02-09 11:26:35
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-10-15 09:36:56
|
|
6
|
+
*/
|
|
7
|
+
declare module '*.svg' {
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
10
|
+
const src: string;
|
|
11
|
+
export default src;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.css' {
|
|
15
|
+
const resource: { [key: string]: string };
|
|
16
|
+
export default resource;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const resource: { [key: string]: string };
|
|
21
|
+
export default resource;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.json' {
|
|
25
|
+
const value: any;
|
|
26
|
+
export const version: string;
|
|
27
|
+
export default value;
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IFormItem, IFormData } from '../../form/src/types';
|
|
3
|
+
import type { IFetch, IColumn, IRowKey, IRecord } from '../../table/src/table/types';
|
|
4
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
5
|
+
declare type IProps = {
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
uniqueKey?: string;
|
|
8
|
+
initialValue?: IFormData;
|
|
9
|
+
filters?: IFormItem[];
|
|
10
|
+
table?: {
|
|
11
|
+
fetch?: IFetch;
|
|
12
|
+
columns?: IColumn[];
|
|
13
|
+
rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
|
|
14
|
+
webPagination?: boolean;
|
|
15
|
+
};
|
|
16
|
+
onClose: (data: IRecord | null) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare type QmSearchHelperProps = IProps;
|
|
19
|
+
declare const SearchHelper: React.FC<IProps>;
|
|
20
|
+
export default SearchHelper;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2022-01-11 18:01:20
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-01-11 18:43:06
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-helper: ~'@{qm-prefix}-search-helper';
|
|
10
|
+
|
|
11
|
+
.@{prefix-helper}--wrapper {
|
|
12
|
+
.reset-component();
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { ComponentSize } from '../../_utils/types';
|
|
3
|
+
import type { SpaceProps } from '../../antd';
|
|
4
|
+
declare type IProps = Omit<SpaceProps, 'size'> & {
|
|
5
|
+
size?: ComponentSize | number;
|
|
6
|
+
};
|
|
7
|
+
export declare type QmSpaceProps = IProps;
|
|
8
|
+
declare class QmSpace extends Component<IProps> {
|
|
9
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig | undefined>;
|
|
10
|
+
render(): React.ReactElement;
|
|
11
|
+
}
|
|
12
|
+
export default QmSpace;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { SpinProps } from '../../antd';
|
|
3
|
+
declare type IProps = SpinProps;
|
|
4
|
+
export declare type QmSpinProps = IProps;
|
|
5
|
+
declare class QmSpin extends Component<IProps> {
|
|
6
|
+
static defaultProps: {
|
|
7
|
+
tip: string;
|
|
8
|
+
};
|
|
9
|
+
render(): React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
export default QmSpin;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type ISplitContext = {
|
|
3
|
+
splitRef: React.RefObject<HTMLDivElement>;
|
|
4
|
+
direction: 'horizontal' | 'vertical';
|
|
5
|
+
dragging: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const SplitContext: React.Context<ISplitContext | undefined>;
|
|
8
|
+
export default SplitContext;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { QmSplitPaneProps } from './split-pane';
|
|
3
|
+
declare type IProps = {
|
|
4
|
+
direction?: 'horizontal' | 'vertical';
|
|
5
|
+
defaultValue?: number | string;
|
|
6
|
+
uniqueKey?: string;
|
|
7
|
+
onChange?: (offset: string) => void;
|
|
8
|
+
children?: React.ReactElement;
|
|
9
|
+
};
|
|
10
|
+
export declare type QmSplitProps = IProps;
|
|
11
|
+
declare const QmSplit: React.FC<IProps> & {
|
|
12
|
+
Pane: React.FunctionComponent<QmSplitPaneProps>;
|
|
13
|
+
};
|
|
14
|
+
export default QmSplit;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-02-09 09:27:46
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-11-05 13:33:02
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-split: ~'@{qm-prefix}-split';
|
|
10
|
+
@prefix-split-pane: ~'@{qm-prefix}-split-pane';
|
|
11
|
+
|
|
12
|
+
.@{prefix-split} {
|
|
13
|
+
.reset-component();
|
|
14
|
+
display: flex;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
&.vertical {
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
}
|
|
20
|
+
&__resize-bar {
|
|
21
|
+
position: relative;
|
|
22
|
+
background-color: transparent;
|
|
23
|
+
border-radius: @--border-radius-base - 1px;
|
|
24
|
+
transition: all 0.4s ease;
|
|
25
|
+
user-select: none;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
&.horizontal {
|
|
29
|
+
width: 11px;
|
|
30
|
+
margin: 0 -5px;
|
|
31
|
+
cursor: col-resize;
|
|
32
|
+
&::after {
|
|
33
|
+
content: ' ';
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 0;
|
|
36
|
+
bottom: 0;
|
|
37
|
+
left: 50%;
|
|
38
|
+
width: 0;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
border-left: 1px solid @--border-color-base;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&.vertical {
|
|
44
|
+
height: 11px;
|
|
45
|
+
margin: -5px 0;
|
|
46
|
+
cursor: row-resize;
|
|
47
|
+
&::after {
|
|
48
|
+
content: ' ';
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
top: 50%;
|
|
53
|
+
height: 0;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
border-top: 1px solid @--border-color-base;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&:hover,
|
|
59
|
+
&:active {
|
|
60
|
+
background-color: @--background-color;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
.@{prefix-split-pane} {
|
|
64
|
+
overflow: auto;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
&.horizontal {
|
|
67
|
+
&:nth-child(1) {
|
|
68
|
+
padding-right: 5px;
|
|
69
|
+
}
|
|
70
|
+
&:nth-child(3) {
|
|
71
|
+
padding-left: 5px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
&.vertical {
|
|
75
|
+
&:nth-of-type(1) {
|
|
76
|
+
padding-bottom: 5px;
|
|
77
|
+
}
|
|
78
|
+
&:nth-of-type(3) {
|
|
79
|
+
padding-top: 5px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
&.isLocked {
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|