shineout 2.0.0-rc.3 → 2.0.0-rc.5
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/css/@types/common.d.ts +1 -0
- package/css/Alert/index.js +2 -2
- package/css/AnimationList/AbsoluteList.d.ts +3 -2
- package/css/AnimationList/Props.d.ts +4 -5
- package/css/Breadcrumb/index.js +2 -2
- package/css/Card/Card.js +2 -2
- package/css/Cascader/Cascader.d.ts +2 -1
- package/css/Cascader/Result.js +0 -1
- package/css/Checkbox/CheckItem.js +2 -2
- package/css/DatePicker/Month.js +0 -6
- package/css/DatePicker/Quarter.js +1 -7
- package/css/DatePicker/Year.js +0 -6
- package/css/DatePicker/value.js +0 -1
- package/css/Dropdown/Item.js +2 -2
- package/css/Dropdown/index.js +2 -2
- package/css/Form/Form.js +2 -2
- package/css/Form/formButton.js +3 -11
- package/css/Icon/Icon.d.ts +0 -7
- package/css/Icon/Icon.js +3 -11
- package/css/Input/Group.d.ts +0 -6
- package/css/Input/Group.js +0 -5
- package/css/Modal/Modal.js +2 -2
- package/css/Modal/Panel.js +2 -2
- package/css/Modal/context.js +0 -1
- package/css/Pagination/Pagination.js +2 -2
- package/css/Rate/Rate.js +2 -2
- package/css/Select/BoxList.js +0 -1
- package/css/Select/BoxOption.js +2 -4
- package/css/Select/Option.js +1 -2
- package/css/Select/OptionList.d.ts +1 -1
- package/css/Select/OptionList.js +1 -1
- package/css/Select/OptionTree.d.ts +1 -1
- package/css/Select/OptionTree.js +1 -1
- package/css/Select/Props.d.ts +29 -37
- package/css/Select/Select.d.ts +3 -4
- package/css/Select/Select.js +72 -23
- package/css/Sticky/index.js +2 -2
- package/css/Table/resizable.d.ts +0 -6
- package/css/Table/resizable.js +80 -89
- package/css/Table/select.d.ts +0 -5
- package/css/Table/select.js +8 -13
- package/css/Tag/Tag.js +2 -2
- package/css/Transfer/filter.js +52 -62
- package/css/TreeSelect/TreeSelect.d.ts +2 -2
- package/css/Upload/Drop.d.ts +0 -11
- package/css/Upload/Drop.js +0 -12
- package/css/Upload/Upload.d.ts +0 -4
- package/css/Upload/accept.d.ts +0 -5
- package/css/Upload/accept.js +24 -32
- package/css/index.js +1 -1
- package/css/utils/defaultProps.d.ts +8 -0
- package/css/utils/defaultProps.js +11 -0
- package/css/utils/uid.d.ts +1 -1
- package/dist/shineout.js +8274 -8997
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/esm/@types/common.d.ts +1 -0
- package/esm/Alert/index.js +1 -1
- package/esm/AnimationList/AbsoluteList.d.ts +3 -2
- package/esm/AnimationList/Props.d.ts +4 -5
- package/esm/Breadcrumb/index.js +1 -1
- package/esm/Card/Card.js +1 -1
- package/esm/Cascader/Cascader.d.ts +2 -1
- package/esm/Cascader/Result.js +1 -1
- package/esm/Checkbox/CheckItem.js +1 -1
- package/esm/DatePicker/Month.js +0 -6
- package/esm/DatePicker/Quarter.js +1 -7
- package/esm/DatePicker/Year.js +0 -6
- package/esm/DatePicker/value.js +1 -2
- package/esm/Dropdown/Item.js +1 -1
- package/esm/Dropdown/index.js +1 -1
- package/esm/Form/Form.js +1 -1
- package/esm/Form/formButton.js +3 -10
- package/esm/Icon/Icon.d.ts +0 -7
- package/esm/Icon/Icon.js +1 -8
- package/esm/Input/Group.d.ts +0 -6
- package/esm/Input/Group.js +0 -4
- package/esm/Modal/Modal.js +1 -1
- package/esm/Modal/Panel.js +1 -1
- package/esm/Modal/context.js +0 -1
- package/esm/Pagination/Pagination.js +1 -1
- package/esm/Rate/Rate.js +1 -1
- package/esm/Select/BoxList.js +0 -1
- package/esm/Select/BoxOption.js +2 -4
- package/esm/Select/Option.js +1 -2
- package/esm/Select/OptionList.d.ts +1 -1
- package/esm/Select/OptionList.js +1 -1
- package/esm/Select/OptionTree.d.ts +1 -1
- package/esm/Select/OptionTree.js +1 -1
- package/esm/Select/Props.d.ts +29 -37
- package/esm/Select/Select.d.ts +3 -4
- package/esm/Select/Select.js +72 -24
- package/esm/Sticky/index.js +1 -1
- package/esm/Table/resizable.d.ts +0 -6
- package/esm/Table/resizable.js +82 -89
- package/esm/Table/select.d.ts +0 -5
- package/esm/Table/select.js +8 -12
- package/esm/Tag/Tag.js +1 -1
- package/esm/Transfer/filter.js +51 -59
- package/esm/TreeSelect/TreeSelect.d.ts +2 -2
- package/esm/Upload/Drop.d.ts +0 -11
- package/esm/Upload/Drop.js +0 -12
- package/esm/Upload/Upload.d.ts +0 -4
- package/esm/Upload/accept.d.ts +0 -5
- package/esm/Upload/accept.js +20 -26
- package/esm/index.js +1 -1
- package/esm/utils/defaultProps.d.ts +8 -0
- package/esm/utils/defaultProps.js +6 -0
- package/esm/utils/uid.d.ts +1 -1
- package/lib/@types/common.d.ts +1 -0
- package/lib/Alert/index.js +2 -2
- package/lib/AnimationList/AbsoluteList.d.ts +3 -2
- package/lib/AnimationList/Props.d.ts +4 -5
- package/lib/Breadcrumb/index.js +2 -2
- package/lib/Card/Card.js +2 -2
- package/lib/Cascader/Cascader.d.ts +2 -1
- package/lib/Cascader/Result.js +0 -1
- package/lib/Checkbox/CheckItem.js +2 -2
- package/lib/DatePicker/Month.js +0 -6
- package/lib/DatePicker/Quarter.js +1 -7
- package/lib/DatePicker/Year.js +0 -6
- package/lib/DatePicker/value.js +0 -1
- package/lib/Dropdown/Item.js +2 -2
- package/lib/Dropdown/index.js +2 -2
- package/lib/Form/Form.js +2 -2
- package/lib/Form/formButton.js +3 -11
- package/lib/Icon/Icon.d.ts +0 -7
- package/lib/Icon/Icon.js +3 -11
- package/lib/Input/Group.d.ts +0 -6
- package/lib/Input/Group.js +0 -5
- package/lib/Modal/Modal.js +2 -2
- package/lib/Modal/Panel.js +2 -2
- package/lib/Modal/context.js +0 -1
- package/lib/Pagination/Pagination.js +2 -2
- package/lib/Rate/Rate.js +2 -2
- package/lib/Select/BoxList.js +0 -1
- package/lib/Select/BoxOption.js +2 -4
- package/lib/Select/Option.js +1 -2
- package/lib/Select/OptionList.d.ts +1 -1
- package/lib/Select/OptionList.js +1 -1
- package/lib/Select/OptionTree.d.ts +1 -1
- package/lib/Select/OptionTree.js +1 -1
- package/lib/Select/Props.d.ts +29 -37
- package/lib/Select/Select.d.ts +3 -4
- package/lib/Select/Select.js +72 -23
- package/lib/Sticky/index.js +2 -2
- package/lib/Table/resizable.d.ts +0 -6
- package/lib/Table/resizable.js +80 -89
- package/lib/Table/select.d.ts +0 -5
- package/lib/Table/select.js +8 -13
- package/lib/Tag/Tag.js +2 -2
- package/lib/Transfer/filter.js +52 -62
- package/lib/TreeSelect/TreeSelect.d.ts +2 -2
- package/lib/Upload/Drop.d.ts +0 -11
- package/lib/Upload/Drop.js +0 -12
- package/lib/Upload/Upload.d.ts +0 -4
- package/lib/Upload/accept.d.ts +0 -5
- package/lib/Upload/accept.js +24 -32
- package/lib/index.js +1 -1
- package/lib/utils/defaultProps.d.ts +8 -0
- package/lib/utils/defaultProps.js +11 -0
- package/lib/utils/uid.d.ts +1 -1
- package/package.json +2 -2
- package/css/utils/proptypes.d.ts +0 -14
- package/css/utils/proptypes.js +0 -38
- package/esm/utils/proptypes.d.ts +0 -14
- package/esm/utils/proptypes.js +0 -30
- package/lib/utils/proptypes.d.ts +0 -14
- package/lib/utils/proptypes.js +0 -38
package/css/@types/common.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare namespace RegularAttributes {
|
|
|
29
29
|
type Size = 'small' | 'default' | 'large';
|
|
30
30
|
type Type = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
31
31
|
type Align = 'left' | 'center' | 'right';
|
|
32
|
+
type ListPosition = 'drop-down' | 'drop-up';
|
|
32
33
|
}
|
|
33
34
|
export declare type ObjectType<V = any> = {
|
|
34
35
|
[name: string]: V;
|
package/css/Alert/index.js
CHANGED
|
@@ -25,9 +25,9 @@ var _styles = require("./styles");
|
|
|
25
25
|
|
|
26
26
|
var _strings = require("../utils/strings");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
29
29
|
|
|
30
|
-
var DefaultProps = (0, _objectSpread2.default)({},
|
|
30
|
+
var DefaultProps = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
31
31
|
iconSize: 16,
|
|
32
32
|
duration: 200,
|
|
33
33
|
type: 'warning'
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
|
|
1
|
+
import React, { ComponentType } from 'react';
|
|
2
|
+
import { AbsoluteProps } from './Props';
|
|
3
|
+
export default function <U extends {}>(List: ComponentType<U>): React.ComponentType<import("../Scroll/Props").GetScrollContextConsumerValue<{ [P in Exclude<keyof U, "getRef"> | Exclude<Exclude<"fixed", keyof U>, "getRef"> | Exclude<Exclude<"absolute", keyof U>, "getRef"> | Exclude<Exclude<"position", keyof U>, "getRef"> | Exclude<Exclude<"zIndex", keyof U>, "getRef"> | Exclude<Exclude<"value", keyof U>, "getRef"> | Exclude<Exclude<"style", keyof U>, "getRef"> | Exclude<Exclude<"focus", keyof U>, "getRef"> | Exclude<Exclude<"scrollLeft", keyof U>, "getRef"> | Exclude<Exclude<"scrollTop", keyof U>, "getRef"> | Exclude<Exclude<"parentElement", keyof U>, "getRef"> | Exclude<Exclude<"scrollElement", keyof U>, "getRef"> | Exclude<Exclude<"rootClass", keyof U>, "getRef"> | Exclude<Exclude<"autoClass", keyof U>, "getRef"> | Exclude<Exclude<"getResetPosition", keyof U>, "getRef"> | Exclude<Exclude<"autoAdapt", keyof U>, "getRef">]: import("../@types/common").ForceAdd<U, AbsoluteProps>[P]; }>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GetScrollContextConsumerValue } from '../Scroll/Props';
|
|
3
3
|
import { GetZIndexConsumerProps } from '../Modal/Props';
|
|
4
|
-
import { ForceAdd, KeygenType, StandardProps } from '../@types/common';
|
|
5
|
-
declare type ListPosition = 'drop-down' | 'drop-up';
|
|
4
|
+
import { ForceAdd, KeygenType, RegularAttributes, StandardProps } from '../@types/common';
|
|
6
5
|
declare type PickerPosition = 'left-bottom' | 'left-top' | 'right-bottom' | 'right-top';
|
|
7
6
|
declare type DropdownPosition = 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
8
7
|
export declare type ListDurationType = 'fast' | 'slow' | number;
|
|
@@ -11,7 +10,7 @@ export interface AbsoluteProps {
|
|
|
11
10
|
focus?: boolean;
|
|
12
11
|
fixed?: boolean | 'min';
|
|
13
12
|
parentElement?: HTMLElement;
|
|
14
|
-
position?: ListPosition | PickerPosition | DropdownPosition;
|
|
13
|
+
position?: RegularAttributes.ListPosition | PickerPosition | DropdownPosition;
|
|
15
14
|
/**
|
|
16
15
|
* When it is true, the pop-up layer of option append into document.body.
|
|
17
16
|
*
|
|
@@ -33,7 +32,7 @@ export interface AbsoluteProps {
|
|
|
33
32
|
*/
|
|
34
33
|
zIndex?: number;
|
|
35
34
|
style?: React.CSSProperties;
|
|
36
|
-
autoClass?:
|
|
35
|
+
autoClass?: string;
|
|
37
36
|
value?: any;
|
|
38
37
|
getResetPosition?: (resetFunc: () => void) => void;
|
|
39
38
|
autoAdapt?: boolean;
|
|
@@ -56,7 +55,7 @@ export interface LazyListProps<DataItem> extends StandardProps {
|
|
|
56
55
|
itemsInView?: number;
|
|
57
56
|
height?: number;
|
|
58
57
|
renderItem: (d: DataItem, i: number) => React.ReactNode;
|
|
59
|
-
keygen
|
|
58
|
+
keygen?: KeygenType<DataItem>;
|
|
60
59
|
force?: any;
|
|
61
60
|
}
|
|
62
61
|
export {};
|
package/css/Breadcrumb/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
17
17
|
|
|
18
18
|
var _Popover = _interopRequireDefault(require("../Popover"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
21
21
|
|
|
22
22
|
var _styles = require("./styles");
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ var _uid = require("../utils/uid");
|
|
|
25
25
|
|
|
26
26
|
var _Caret = _interopRequireDefault(require("../icons/Caret"));
|
|
27
27
|
|
|
28
|
-
var defaultValue = (0, _objectSpread2.default)({},
|
|
28
|
+
var defaultValue = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
29
29
|
data: [],
|
|
30
30
|
separator: '/'
|
|
31
31
|
});
|
package/css/Card/Card.js
CHANGED
|
@@ -19,7 +19,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
|
|
20
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
23
23
|
|
|
24
24
|
var _element = require("../utils/dom/element");
|
|
25
25
|
|
|
@@ -119,7 +119,7 @@ function (_PureComponent) {
|
|
|
119
119
|
return Card;
|
|
120
120
|
}(_react.PureComponent);
|
|
121
121
|
|
|
122
|
-
(0, _defineProperty2.default)(Card, "defaultProps", (0, _objectSpread2.default)({},
|
|
122
|
+
(0, _defineProperty2.default)(Card, "defaultProps", (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
123
123
|
defaultCollapsed: true,
|
|
124
124
|
collapsible: false
|
|
125
125
|
}));
|
|
@@ -3,10 +3,11 @@ import { PureComponent } from '../component';
|
|
|
3
3
|
import DatumTree from '../Datum/Tree';
|
|
4
4
|
import Input from './Input';
|
|
5
5
|
import { CascaderBaseValue, OriginCascaderProps } from './Props';
|
|
6
|
+
import { RegularAttributes } from '../@types/common';
|
|
6
7
|
interface State {
|
|
7
8
|
focus: boolean;
|
|
8
9
|
path: string[];
|
|
9
|
-
position:
|
|
10
|
+
position: RegularAttributes.ListPosition;
|
|
10
11
|
}
|
|
11
12
|
declare class Cascader<DataItem, Value extends CascaderBaseValue> extends PureComponent<OriginCascaderProps<DataItem, Value>, State> {
|
|
12
13
|
static defaultProps: {
|
package/css/Cascader/Result.js
CHANGED
|
@@ -21,7 +21,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
21
21
|
|
|
22
22
|
var _component = require("../component");
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
25
25
|
|
|
26
26
|
var _uid = require("../utils/uid");
|
|
27
27
|
|
|
@@ -205,7 +205,7 @@ function checkItem(type) {
|
|
|
205
205
|
return CheckItem;
|
|
206
206
|
}(_component.PureComponent);
|
|
207
207
|
|
|
208
|
-
(0, _defineProperty2.default)(CheckItem, "defaultProps", (0, _objectSpread2.default)({},
|
|
208
|
+
(0, _defineProperty2.default)(CheckItem, "defaultProps", (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
209
209
|
htmlValue: true,
|
|
210
210
|
onClick: undefined,
|
|
211
211
|
content: []
|
package/css/DatePicker/Month.js
CHANGED
|
@@ -101,12 +101,6 @@ function (_PureComponent) {
|
|
|
101
101
|
isDisabled = disabled(date);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
if (!isDisabled && index === 0 && (0, _is.isArray)(rangeDate)) {
|
|
105
|
-
if ((0, _is.isNumber)(range) && rangeDate[1] && _utils.default.compareAsc(date, _utils.default.addSeconds(rangeDate[1], -range, this.getOptions())) < 0) {
|
|
106
|
-
isDisabled = true;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
104
|
if (!isDisabled && index === 1 && (0, _is.isArray)(rangeDate)) {
|
|
111
105
|
if ((0, _is.isNumber)(range) && rangeDate[0] && _utils.default.compareAsc(date, _utils.default.addSeconds(rangeDate[0], range, this.getOptions())) > 0) {
|
|
112
106
|
isDisabled = true;
|
|
@@ -93,14 +93,8 @@ function (_PureComponent) {
|
|
|
93
93
|
isDisabled = disabled(date);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
if (!isDisabled && index === 0 && (0, _is.isArray)(rangeDate)) {
|
|
97
|
-
if ((0, _is.isNumber)(range) && rangeDate[1] && _utils.default.compareQuarter(date, _utils.default.addSeconds(rangeDate[1], -range, this.getOptions()), 0, this.getOptions()) < 0) {
|
|
98
|
-
isDisabled = true;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
96
|
if (!isDisabled && index === 1 && (0, _is.isArray)(rangeDate)) {
|
|
103
|
-
if ((0, _is.isNumber)(range) && rangeDate[0] && _utils.default.
|
|
97
|
+
if ((0, _is.isNumber)(range) && rangeDate[0] && _utils.default.compareAsc(date, _utils.default.addSeconds(rangeDate[0], range, this.getOptions())) > 0) {
|
|
104
98
|
isDisabled = true;
|
|
105
99
|
}
|
|
106
100
|
}
|
package/css/DatePicker/Year.js
CHANGED
|
@@ -107,12 +107,6 @@ function (_PureComponent) {
|
|
|
107
107
|
isDisabled = disabled(date);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
if (!isDisabled && index === 0 && (0, _is.isArray)(rangeDate)) {
|
|
111
|
-
if (rangeDate[1] && _utils.default.compareAsc(date, _utils.default.addSeconds(rangeDate[1], -range, this.getOptions())) < 0) {
|
|
112
|
-
isDisabled = true;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
110
|
if (!isDisabled && index === 1 && (0, _is.isArray)(rangeDate)) {
|
|
117
111
|
if (rangeDate[0] && _utils.default.compareAsc(date, _utils.default.addSeconds(rangeDate[0], range, this.getOptions())) > 0) {
|
|
118
112
|
isDisabled = true;
|
package/css/DatePicker/value.js
CHANGED
package/css/Dropdown/Item.js
CHANGED
|
@@ -17,9 +17,9 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
21
21
|
|
|
22
|
-
var DefaultProps = (0, _objectSpread2.default)({},
|
|
22
|
+
var DefaultProps = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
23
23
|
data: {},
|
|
24
24
|
renderItem: 'content'
|
|
25
25
|
});
|
package/css/Dropdown/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
21
21
|
|
|
22
22
|
var _component = require("../component");
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
25
25
|
|
|
26
26
|
var _element = require("../utils/dom/element");
|
|
27
27
|
|
|
@@ -62,7 +62,7 @@ var positionMap = {
|
|
|
62
62
|
'bottom-left': 'right-top',
|
|
63
63
|
auto: ''
|
|
64
64
|
};
|
|
65
|
-
var DefaultProps = (0, _objectSpread2.default)({},
|
|
65
|
+
var DefaultProps = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
66
66
|
data: [],
|
|
67
67
|
animation: true,
|
|
68
68
|
disabled: false,
|
package/css/Form/Form.js
CHANGED
|
@@ -25,7 +25,7 @@ var _styles = require("./styles");
|
|
|
25
25
|
|
|
26
26
|
var _errors = require("../utils/errors");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
29
29
|
|
|
30
30
|
var _document = require("../utils/dom/document");
|
|
31
31
|
|
|
@@ -38,7 +38,7 @@ var _config = require("../config");
|
|
|
38
38
|
var emptyValue = {
|
|
39
39
|
path: ''
|
|
40
40
|
};
|
|
41
|
-
var DefaultProps = (0, _objectSpread2.default)({},
|
|
41
|
+
var DefaultProps = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
42
42
|
scrollToError: false,
|
|
43
43
|
throttle: 1000
|
|
44
44
|
});
|
package/css/Form/formButton.js
CHANGED
|
@@ -19,8 +19,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
19
19
|
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
21
|
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
22
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
25
23
|
|
|
26
24
|
var _element = require("../utils/dom/element");
|
|
@@ -28,9 +26,9 @@ var _element = require("../utils/dom/element");
|
|
|
28
26
|
var _formContext = require("./formContext");
|
|
29
27
|
|
|
30
28
|
var _default = function _default(htmlType) {
|
|
31
|
-
var
|
|
29
|
+
var _temp;
|
|
32
30
|
|
|
33
|
-
return (0, _formContext.formConsumer)(['disabled'], (_temp =
|
|
31
|
+
return (0, _formContext.formConsumer)(['disabled'], (_temp =
|
|
34
32
|
/*#__PURE__*/
|
|
35
33
|
function (_PureComponent) {
|
|
36
34
|
(0, _inheritsLoose2.default)(FormButton, _PureComponent);
|
|
@@ -75,13 +73,7 @@ var _default = function _default(htmlType) {
|
|
|
75
73
|
};
|
|
76
74
|
|
|
77
75
|
return FormButton;
|
|
78
|
-
}(_react.PureComponent),
|
|
79
|
-
children: _propTypes.default.any,
|
|
80
|
-
disabled: _propTypes.default.bool,
|
|
81
|
-
loading: _propTypes.default.bool,
|
|
82
|
-
onClick: _propTypes.default.func,
|
|
83
|
-
type: _propTypes.default.string
|
|
84
|
-
}), _temp));
|
|
76
|
+
}(_react.PureComponent), _temp));
|
|
85
77
|
};
|
|
86
78
|
|
|
87
79
|
exports.default = _default;
|
package/css/Icon/Icon.d.ts
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { IconCompProps } from './Props';
|
|
4
3
|
declare function Icon(props?: IconCompProps): JSX.Element;
|
|
5
4
|
declare namespace Icon {
|
|
6
|
-
var propTypes: {
|
|
7
|
-
prefix: PropTypes.Requireable<string>;
|
|
8
|
-
name: PropTypes.Requireable<string>;
|
|
9
|
-
fontFamily: PropTypes.Requireable<string>;
|
|
10
|
-
fontSize: PropTypes.Requireable<string | number>;
|
|
11
|
-
};
|
|
12
5
|
var defaultProps: {
|
|
13
6
|
prefix: string;
|
|
14
7
|
fontFamily: string;
|
package/css/Icon/Icon.js
CHANGED
|
@@ -13,17 +13,15 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
|
|
18
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
17
|
|
|
20
|
-
var
|
|
18
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
21
19
|
|
|
22
20
|
var _styles = require("./styles");
|
|
23
21
|
|
|
24
22
|
function Icon(props) {
|
|
25
23
|
if (props === void 0) {
|
|
26
|
-
props = (0, _objectSpread2.default)({},
|
|
24
|
+
props = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
27
25
|
prefix: 'icon',
|
|
28
26
|
fontFamily: 'iconfont',
|
|
29
27
|
name: '',
|
|
@@ -64,13 +62,7 @@ function Icon(props) {
|
|
|
64
62
|
}), children);
|
|
65
63
|
}
|
|
66
64
|
|
|
67
|
-
Icon.
|
|
68
|
-
prefix: _propTypes.default.string,
|
|
69
|
-
name: _propTypes.default.string,
|
|
70
|
-
fontFamily: _propTypes.default.string,
|
|
71
|
-
fontSize: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])
|
|
72
|
-
});
|
|
73
|
-
Icon.defaultProps = (0, _objectSpread2.default)({}, _proptypes.defaultProps, {
|
|
65
|
+
Icon.defaultProps = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
74
66
|
prefix: 'icon',
|
|
75
67
|
fontFamily: 'iconfont',
|
|
76
68
|
name: '',
|
package/css/Input/Group.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { InputGroupProps } from './Props';
|
|
4
3
|
declare function Group(props: InputGroupProps): JSX.Element[];
|
|
5
|
-
declare namespace Group {
|
|
6
|
-
var propTypes: {
|
|
7
|
-
children: PropTypes.Requireable<any>;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
4
|
export default Group;
|
package/css/Input/Group.js
CHANGED
|
@@ -11,8 +11,6 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
14
|
function Group(props) {
|
|
17
15
|
var children = props.children,
|
|
18
16
|
style = props.style,
|
|
@@ -29,8 +27,5 @@ function Group(props) {
|
|
|
29
27
|
});
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
Group.propTypes = {
|
|
33
|
-
children: _propTypes.default.any
|
|
34
|
-
};
|
|
35
30
|
var _default = Group;
|
|
36
31
|
exports.default = _default;
|
package/css/Modal/Modal.js
CHANGED
|
@@ -17,7 +17,7 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
17
17
|
|
|
18
18
|
var _react = require("react");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
21
21
|
|
|
22
22
|
var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual"));
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ var _uid = require("../utils/uid");
|
|
|
25
25
|
|
|
26
26
|
var _events = require("./events");
|
|
27
27
|
|
|
28
|
-
var DefaultValue = (0, _objectSpread2.default)({},
|
|
28
|
+
var DefaultValue = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
29
29
|
usePortal: true,
|
|
30
30
|
visible: false,
|
|
31
31
|
esc: true
|
package/css/Modal/Panel.js
CHANGED
|
@@ -25,7 +25,7 @@ var _icons = _interopRequireDefault(require("../icons"));
|
|
|
25
25
|
|
|
26
26
|
var _Card = _interopRequireDefault(require("../Card"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
29
29
|
|
|
30
30
|
var _styles = require("./styles");
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ var _context = require("../Scroll/context");
|
|
|
33
33
|
|
|
34
34
|
var _context2 = require("./context");
|
|
35
35
|
|
|
36
|
-
var DefaultValue = (0, _objectSpread2.default)({},
|
|
36
|
+
var DefaultValue = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
37
37
|
top: '10vh',
|
|
38
38
|
maskCloseAble: true,
|
|
39
39
|
width: 500,
|
package/css/Modal/context.js
CHANGED
|
@@ -17,7 +17,6 @@ exports.Provider = Provider;
|
|
|
17
17
|
var consumer = function consumer(Origin) {
|
|
18
18
|
return function (props) {
|
|
19
19
|
return _react.default.createElement(context.Consumer, null, function (value) {
|
|
20
|
-
// eslint-disable-next-line react/prop-types
|
|
21
20
|
var mp = Object.assign({}, props, value && props.absolute && props.zIndex === undefined && {
|
|
22
21
|
zIndex: 1051
|
|
23
22
|
});
|
|
@@ -19,7 +19,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
|
|
20
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
23
23
|
|
|
24
24
|
var _styles = require("./styles");
|
|
25
25
|
|
|
@@ -37,7 +37,7 @@ var _getDataset = _interopRequireDefault(require("../utils/dom/getDataset"));
|
|
|
37
37
|
|
|
38
38
|
var _classname = require("../utils/classname");
|
|
39
39
|
|
|
40
|
-
var DefaultValue = (0, _objectSpread2.default)({},
|
|
40
|
+
var DefaultValue = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
41
41
|
layout: ['links'],
|
|
42
42
|
span: 5,
|
|
43
43
|
text: {}
|
package/css/Rate/Rate.js
CHANGED
|
@@ -25,14 +25,14 @@ var _component = require("../component");
|
|
|
25
25
|
|
|
26
26
|
var _numbers = require("../utils/numbers");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _defaultProps = require("../utils/defaultProps");
|
|
29
29
|
|
|
30
30
|
var _styles = require("./styles");
|
|
31
31
|
|
|
32
32
|
var _getDataset = _interopRequireDefault(require("../utils/dom/getDataset"));
|
|
33
33
|
|
|
34
34
|
var MIN_SIZE = 12;
|
|
35
|
-
var DefaultProps = (0, _objectSpread2.default)({},
|
|
35
|
+
var DefaultProps = (0, _objectSpread2.default)({}, _defaultProps.defaultProps, {
|
|
36
36
|
repeat: true,
|
|
37
37
|
max: 5,
|
|
38
38
|
size: 20,
|
package/css/Select/BoxList.js
CHANGED
package/css/Select/BoxOption.js
CHANGED
|
@@ -46,11 +46,10 @@ function (_PureComponent) {
|
|
|
46
46
|
data = _this$props.data,
|
|
47
47
|
onClick = _this$props.onClick,
|
|
48
48
|
isActive = _this$props.isActive,
|
|
49
|
-
index = _this$props.index,
|
|
50
49
|
disabled = _this$props.disabled;
|
|
51
50
|
if (this.locked || disabled) return;
|
|
52
51
|
this.locked = true;
|
|
53
|
-
onClick(!isActive, data
|
|
52
|
+
onClick(!isActive, data);
|
|
54
53
|
setTimeout(function () {
|
|
55
54
|
_this2.locked = false;
|
|
56
55
|
}, 200);
|
|
@@ -59,7 +58,6 @@ function (_PureComponent) {
|
|
|
59
58
|
_proto.render = function render() {
|
|
60
59
|
var _this$props2 = this.props,
|
|
61
60
|
data = _this$props2.data,
|
|
62
|
-
index = _this$props2.index,
|
|
63
61
|
isActive = _this$props2.isActive,
|
|
64
62
|
renderItem = _this$props2.renderItem,
|
|
65
63
|
columns = _this$props2.columns,
|
|
@@ -68,7 +66,7 @@ function (_PureComponent) {
|
|
|
68
66
|
var className = (0, _styles.selectClass)((0, _classname.getDirectionClass)('option'));
|
|
69
67
|
var width = columns < 0 ? undefined : 1 / columns * 100 + "%";
|
|
70
68
|
var Input = multiple ? _Checkbox.default : _Radio.default;
|
|
71
|
-
var result = renderItem(data
|
|
69
|
+
var result = renderItem(data);
|
|
72
70
|
var title = typeof result === 'string' ? result : undefined;
|
|
73
71
|
return _react.default.createElement(Input, {
|
|
74
72
|
disabled: disabled,
|
package/css/Select/Option.js
CHANGED
|
@@ -56,12 +56,11 @@ function (_React$Component) {
|
|
|
56
56
|
data = _this$props.data,
|
|
57
57
|
onClick = _this$props.onClick,
|
|
58
58
|
isActive = _this$props.isActive,
|
|
59
|
-
index = _this$props.index,
|
|
60
59
|
disabled = _this$props.disabled,
|
|
61
60
|
groupKey = _this$props.groupKey;
|
|
62
61
|
if (this.locked || disabled || data && data[groupKey]) return;
|
|
63
62
|
this.locked = true;
|
|
64
|
-
onClick(!isActive, data
|
|
63
|
+
onClick(!isActive, data);
|
|
65
64
|
setTimeout(function () {
|
|
66
65
|
_this2.locked = false;
|
|
67
66
|
}, 200);
|
|
@@ -10,7 +10,7 @@ declare class OptionList<Item, Value> extends Component<OptionListProps<Item, Va
|
|
|
10
10
|
lastScrollTop: number;
|
|
11
11
|
constructor(props: OptionListProps<Item, Value>);
|
|
12
12
|
componentDidUpdate(prevProps: OptionListProps<Item, Value>): void;
|
|
13
|
-
getText(key:
|
|
13
|
+
getText(key: 'noData'): any;
|
|
14
14
|
hoverMove(step: number): void;
|
|
15
15
|
handleScroll(_x: number, y: number, _max: number, _bar: HTMLElement, _v: number, h: number, _pixelX?: number, pixelY?: number): void;
|
|
16
16
|
handleHover(index: number, force: boolean): void;
|
package/css/Select/OptionList.js
CHANGED
|
@@ -92,7 +92,7 @@ function (_Component) {
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
_proto.getText = function getText(key) {
|
|
95
|
-
return this.props.text[key] || (0, _locale.getLocale)(key);
|
|
95
|
+
return this.props.text && this.props.text[key] || (0, _locale.getLocale)(key);
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
_proto.hoverMove = function hoverMove(step) {
|
|
@@ -2,7 +2,7 @@ import { Component } from 'react';
|
|
|
2
2
|
import { OptionTreeProps } from './Props';
|
|
3
3
|
declare class OptionList<Item, Value> extends Component<OptionTreeProps<Item, Value>> {
|
|
4
4
|
constructor(props: OptionTreeProps<Item, Value>);
|
|
5
|
-
getText(key:
|
|
5
|
+
getText(key: 'noData'): any;
|
|
6
6
|
handleClick(data: Item, _: any, p: {
|
|
7
7
|
path: string;
|
|
8
8
|
}): void;
|
package/css/Select/OptionTree.js
CHANGED
|
@@ -48,7 +48,7 @@ function (_Component) {
|
|
|
48
48
|
var _proto = OptionList.prototype;
|
|
49
49
|
|
|
50
50
|
_proto.getText = function getText(key) {
|
|
51
|
-
return this.props.text[key] || (0, _locale.getLocale)(key);
|
|
51
|
+
return this.props.text && this.props.text[key] || (0, _locale.getLocale)(key);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
_proto.handleClick = function handleClick(data, _, p) {
|