@autobest-ui/components 1.5.0 → 2.0.2
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/esm/accordion/Item.d.ts +1 -1
- package/esm/accordion/Item.js +5 -3
- package/esm/accordion/index.d.ts +1 -1
- package/esm/accordion/index.js +5 -3
- package/esm/affix/PortalAffix.js +7 -7
- package/esm/affix/index.js +19 -17
- package/esm/carousel/index.js +16 -14
- package/esm/checkbox/index.js +19 -17
- package/esm/collapse/index.js +13 -11
- package/esm/confirm/index.d.ts +1 -1
- package/esm/confirm/index.js +14 -14
- package/esm/date-picker/calendar/Day.d.ts +1 -1
- package/esm/date-picker/calendar/Day.js +11 -11
- package/esm/date-picker/calendar/MonthYear.js +8 -8
- package/esm/date-picker/calendar/grid/index.js +18 -18
- package/esm/date-picker/calendar/index.js +7 -5
- package/esm/date-picker/calendar/types.js +1 -0
- package/esm/date-picker/index.js +15 -13
- package/esm/drawer/Child.js +6 -6
- package/esm/drawer/index.js +11 -9
- package/esm/ellipsis/index.js +4 -4
- package/esm/guide/index.js +15 -13
- package/esm/input-number/index.d.ts +4 -4
- package/esm/input-number/index.js +27 -25
- package/esm/lazy-image/index.d.ts +3 -3
- package/esm/lazy-image/index.js +6 -4
- package/esm/link-list/index.js +24 -22
- package/esm/link-list/style/index.css +1 -1
- package/esm/loading/index.js +4 -4
- package/esm/loading-bar/index.d.ts +1 -0
- package/esm/loading-bar/index.js +3 -3
- package/esm/loading-container/index.js +6 -6
- package/esm/loading-icon/index.js +12 -12
- package/esm/mask/index.js +4 -4
- package/esm/message/index.js +14 -14
- package/esm/modal/Affix.d.ts +1 -0
- package/esm/modal/Affix.js +1 -1
- package/esm/modal/Title.js +9 -9
- package/esm/modal/getPopupLocation.js +1 -1
- package/esm/modal/index.d.ts +1 -1
- package/esm/modal/index.js +21 -19
- package/esm/modal/style/index.css +1 -1
- package/esm/move/index.d.ts +1 -1
- package/esm/move/index.js +14 -12
- package/esm/popover/index.js +9 -9
- package/esm/portal/index.js +5 -3
- package/esm/script/index.js +8 -6
- package/esm/select/index.d.ts +3 -3
- package/esm/select/index.js +34 -36
- package/esm/show-more/index.js +14 -12
- package/esm/skeleton/Item.js +3 -3
- package/esm/skeleton/index.js +11 -15
- package/esm/style.css +12 -12
- package/esm/table/body/BodyRow.js +9 -8
- package/esm/table/body/CheckIcon.js +7 -7
- package/esm/table/body/index.d.ts +1 -1
- package/esm/table/body/index.js +6 -6
- package/esm/table/header/CheckIcon.js +6 -6
- package/esm/table/header/HeaderCell.d.ts +1 -1
- package/esm/table/header/HeaderCell.js +10 -8
- package/esm/table/header/HeaderRow.d.ts +1 -0
- package/esm/table/header/HeaderRow.js +2 -2
- package/esm/table/index.d.ts +3 -7
- package/esm/table/index.js +20 -18
- package/esm/table/interface.js +1 -0
- package/esm/tabs/index.d.ts +1 -1
- package/esm/tabs/index.js +14 -12
- package/esm/tooltip/index.d.ts +1 -0
- package/esm/tooltip/index.js +1 -1
- package/esm/trigger/bottomAlign.js +2 -2
- package/esm/trigger/getPopupLocation.js +2 -1
- package/esm/trigger/index.d.ts +4 -4
- package/esm/trigger/index.js +24 -22
- package/esm/trigger/leftAlign.js +2 -2
- package/esm/trigger/rightAlign.js +2 -2
- package/esm/trigger/topAlign.js +2 -2
- package/esm/trigger/utils.js +2 -2
- package/lib/accordion/Item.d.ts +1 -1
- package/lib/accordion/Item.js +5 -3
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion/index.js +5 -3
- package/lib/affix/PortalAffix.js +7 -7
- package/lib/affix/index.js +19 -17
- package/lib/carousel/index.js +16 -14
- package/lib/checkbox/index.js +19 -17
- package/lib/collapse/index.js +13 -11
- package/lib/confirm/index.d.ts +1 -1
- package/lib/confirm/index.js +14 -14
- package/lib/date-picker/calendar/Day.d.ts +1 -1
- package/lib/date-picker/calendar/Day.js +12 -12
- package/lib/date-picker/calendar/MonthYear.js +9 -9
- package/lib/date-picker/calendar/grid/index.js +18 -18
- package/lib/date-picker/calendar/index.js +8 -6
- package/lib/date-picker/calendar/types.js +5 -1
- package/lib/date-picker/index.js +15 -13
- package/lib/date-picker/utils.js +8 -8
- package/lib/drawer/Child.js +6 -6
- package/lib/drawer/index.js +11 -9
- package/lib/ellipsis/index.js +4 -4
- package/lib/guide/index.js +15 -13
- package/lib/index.js +54 -54
- package/lib/input-number/index.d.ts +4 -4
- package/lib/input-number/index.js +27 -25
- package/lib/lazy-image/index.d.ts +3 -3
- package/lib/lazy-image/index.js +6 -4
- package/lib/link-list/index.js +24 -22
- package/lib/link-list/style/index.css +1 -1
- package/lib/loading/index.js +4 -4
- package/lib/loading-bar/index.d.ts +1 -0
- package/lib/loading-bar/index.js +3 -3
- package/lib/loading-container/index.js +6 -6
- package/lib/loading-icon/index.js +12 -12
- package/lib/mask/index.js +4 -4
- package/lib/message/index.js +14 -14
- package/lib/modal/Affix.d.ts +1 -0
- package/lib/modal/Affix.js +1 -1
- package/lib/modal/Title.js +9 -9
- package/lib/modal/getPopupLocation.js +1 -1
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +22 -20
- package/lib/modal/style/index.css +1 -1
- package/lib/move/index.d.ts +1 -1
- package/lib/move/index.js +14 -12
- package/lib/popover/index.js +9 -9
- package/lib/portal/index.js +5 -3
- package/lib/script/index.js +8 -6
- package/lib/select/index.d.ts +3 -3
- package/lib/select/index.js +34 -36
- package/lib/show-more/index.js +14 -12
- package/lib/skeleton/Item.js +3 -3
- package/lib/skeleton/index.js +11 -15
- package/lib/style.css +12 -12
- package/lib/table/body/BodyRow.js +9 -8
- package/lib/table/body/CheckIcon.js +7 -7
- package/lib/table/body/index.d.ts +1 -1
- package/lib/table/body/index.js +6 -6
- package/lib/table/header/CheckIcon.js +6 -6
- package/lib/table/header/HeaderCell.d.ts +1 -1
- package/lib/table/header/HeaderCell.js +10 -8
- package/lib/table/header/HeaderRow.d.ts +1 -0
- package/lib/table/header/HeaderRow.js +2 -2
- package/lib/table/index.d.ts +3 -7
- package/lib/table/index.js +20 -18
- package/lib/table/interface.js +5 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +14 -12
- package/lib/tooltip/index.d.ts +1 -0
- package/lib/tooltip/index.js +1 -1
- package/lib/trigger/align.js +24 -24
- package/lib/trigger/bottomAlign.js +3 -3
- package/lib/trigger/constants.js +1 -1
- package/lib/trigger/getPopupLocation.js +2 -1
- package/lib/trigger/index.d.ts +4 -4
- package/lib/trigger/index.js +25 -23
- package/lib/trigger/leftAlign.js +3 -3
- package/lib/trigger/ref.js +1 -1
- package/lib/trigger/rightAlign.js +3 -3
- package/lib/trigger/topAlign.js +3 -3
- package/lib/trigger/utils.js +4 -4
- package/package.json +3 -3
package/esm/accordion/Item.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface AccordionItemProps extends BaseAccordionItemProps, Pick<Collaps
|
|
|
16
16
|
onTitleClick?: () => void;
|
|
17
17
|
}
|
|
18
18
|
declare class AccordionItem extends React.Component<AccordionItemProps, null> {
|
|
19
|
-
getTitle: () => React.ReactElement<any, string |
|
|
19
|
+
getTitle: () => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
20
20
|
render(): JSX.Element;
|
|
21
21
|
}
|
|
22
22
|
export default AccordionItem;
|
package/esm/accordion/Item.js
CHANGED
|
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
|
|
|
6
6
|
d.__proto__ = b;
|
|
7
7
|
} || function (d, b) {
|
|
8
8
|
for (var p in b) {
|
|
9
|
-
if (
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return function (d, b) {
|
|
17
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
+
|
|
17
19
|
_extendStatics(d, b);
|
|
18
20
|
|
|
19
21
|
function __() {
|
|
@@ -45,7 +47,7 @@ function (_super) {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
var child = React.Children.only(title);
|
|
48
|
-
return React.cloneElement(child, {
|
|
50
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
49
51
|
onClick: onTitleClick
|
|
50
52
|
});
|
|
51
53
|
};
|
|
@@ -58,7 +60,7 @@ function (_super) {
|
|
|
58
60
|
appear = _a.appear,
|
|
59
61
|
children = _a.children,
|
|
60
62
|
visible = _a.visible;
|
|
61
|
-
return React.createElement("li", null, React.createElement(Collapse, {
|
|
63
|
+
return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Collapse, {
|
|
62
64
|
title: this.getTitle(),
|
|
63
65
|
visible: visible,
|
|
64
66
|
appear: appear
|
package/esm/accordion/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ declare class Accordion extends React.Component<AccordionProps, AccordionState>
|
|
|
42
42
|
* 展开下拉链接列表
|
|
43
43
|
* @param name
|
|
44
44
|
*/
|
|
45
|
-
onVisibleChange: (name:
|
|
45
|
+
onVisibleChange: (name: React.ReactText) => void;
|
|
46
46
|
render(): JSX.Element;
|
|
47
47
|
}
|
|
48
48
|
export default Accordion;
|
package/esm/accordion/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
|
|
|
6
6
|
d.__proto__ = b;
|
|
7
7
|
} || function (d, b) {
|
|
8
8
|
for (var p in b) {
|
|
9
|
-
if (
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return function (d, b) {
|
|
17
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
+
|
|
17
19
|
_extendStatics(d, b);
|
|
18
20
|
|
|
19
21
|
function __() {
|
|
@@ -114,11 +116,11 @@ function (_super) {
|
|
|
114
116
|
className = _a.className,
|
|
115
117
|
children = _a.children;
|
|
116
118
|
var visibleNames = this.state.visibleNames;
|
|
117
|
-
return React.createElement("ul", {
|
|
119
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
118
120
|
className: classNames(cls, className)
|
|
119
121
|
}, React.Children.map(children, function (child) {
|
|
120
122
|
var name = child.props.name;
|
|
121
|
-
return React.cloneElement(child, {
|
|
123
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
122
124
|
key: name,
|
|
123
125
|
onTitleClick: function onTitleClick() {
|
|
124
126
|
_this.onVisibleChange(name);
|
package/esm/affix/PortalAffix.js
CHANGED
|
@@ -19,24 +19,24 @@ function PortalAffix(_a, ref) {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
if (fadeEffect) {
|
|
22
|
-
return React.createElement(Portal, null, React.createElement(CSSTransition, {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(CSSTransition, {
|
|
23
23
|
"in": visible,
|
|
24
24
|
timeout: 200,
|
|
25
|
-
classNames: cls
|
|
25
|
+
classNames: "".concat(cls, "-fade"),
|
|
26
26
|
appear: true
|
|
27
|
-
}, React.createElement("div", {
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
28
|
style: style,
|
|
29
29
|
ref: ref,
|
|
30
|
-
className: classNames(className, cls
|
|
30
|
+
className: classNames(className, "".concat(cls, "-custom"))
|
|
31
31
|
}, children)));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
style.display = visible ? '' : 'none';
|
|
35
|
-
return React.createElement(Portal, null, React.createElement("div", {
|
|
35
|
+
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
|
|
36
36
|
style: style,
|
|
37
37
|
ref: ref,
|
|
38
|
-
className: classNames(className, cls
|
|
38
|
+
className: classNames(className, "".concat(cls, "-custom"))
|
|
39
39
|
}, children));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export default React.forwardRef(PortalAffix);
|
|
42
|
+
export default /*#__PURE__*/React.forwardRef(PortalAffix);
|
package/esm/affix/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
|
|
|
6
6
|
d.__proto__ = b;
|
|
7
7
|
} || function (d, b) {
|
|
8
8
|
for (var p in b) {
|
|
9
|
-
if (
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return function (d, b) {
|
|
17
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
+
|
|
17
19
|
_extendStatics(d, b);
|
|
18
20
|
|
|
19
21
|
function __() {
|
|
@@ -55,8 +57,8 @@ function (_super) {
|
|
|
55
57
|
|
|
56
58
|
_this.prefixCls = 'ab-affix';
|
|
57
59
|
_this.resizeHandler = null;
|
|
58
|
-
_this.wrapRef = React.createRef();
|
|
59
|
-
_this.customRef = React.createRef();
|
|
60
|
+
_this.wrapRef = /*#__PURE__*/React.createRef();
|
|
61
|
+
_this.customRef = /*#__PURE__*/React.createRef();
|
|
60
62
|
|
|
61
63
|
_this.onHandlerScroll = function (isResize) {
|
|
62
64
|
var _a = _this.props,
|
|
@@ -114,30 +116,30 @@ function (_super) {
|
|
|
114
116
|
} else if ((!_this.isFixed || isResize) && currentFixed) {
|
|
115
117
|
_this.isFixed = true;
|
|
116
118
|
var documentWidth = document.body.offsetWidth;
|
|
117
|
-
var allWidthLeft = ignoreHorizontalFixed ? "-"
|
|
119
|
+
var allWidthLeft = ignoreHorizontalFixed ? "-".concat(scrollLeft, "px") : '0px';
|
|
118
120
|
|
|
119
121
|
if (renderAffix || fadeEffect) {
|
|
120
122
|
_this.setState({
|
|
121
123
|
visible: true,
|
|
122
|
-
left: allWidth ? allWidthLeft : positionInfo.left
|
|
123
|
-
top: offsetTop
|
|
124
|
-
width: allWidth ? documentWidth
|
|
124
|
+
left: allWidth ? allWidthLeft : "".concat(positionInfo.left, "px"),
|
|
125
|
+
top: "".concat(offsetTop, "px"),
|
|
126
|
+
width: allWidth ? "".concat(documentWidth, "px") : ''
|
|
125
127
|
});
|
|
126
128
|
} else {
|
|
127
129
|
element.style.position = 'fixed';
|
|
128
|
-
element.style.top = offsetTop
|
|
129
|
-
element.style.left = allWidth ? allWidthLeft : positionInfo.left
|
|
130
|
-
element.style.width = allWidth ? documentWidth
|
|
131
|
-
parentElement.style.width = positionInfo.width
|
|
132
|
-
parentElement.style.height = positionInfo.height
|
|
130
|
+
element.style.top = "".concat(offsetTop, "px");
|
|
131
|
+
element.style.left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
|
|
132
|
+
element.style.width = allWidth ? "".concat(documentWidth, "px") : "".concat(positionInfo.width, "px");
|
|
133
|
+
parentElement.style.width = "".concat(positionInfo.width, "px");
|
|
134
|
+
parentElement.style.height = "".concat(positionInfo.height, "px");
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
onChange(true);
|
|
136
138
|
} else if (_this.isFixed && currentFixed && ignoreHorizontalFixed) {
|
|
137
|
-
var allWidthLeft = "-"
|
|
139
|
+
var allWidthLeft = "-".concat(scrollLeft, "px");
|
|
138
140
|
|
|
139
141
|
if (renderAffix || fadeEffect) {
|
|
140
|
-
var left = allWidth ? allWidthLeft : positionInfo.left
|
|
142
|
+
var left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
|
|
141
143
|
|
|
142
144
|
if (left !== _this.state.left) {
|
|
143
145
|
_this.setState({
|
|
@@ -145,7 +147,7 @@ function (_super) {
|
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
149
|
} else {
|
|
148
|
-
element.style.left = allWidth ? allWidthLeft : positionInfo.left
|
|
150
|
+
element.style.left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
153
|
|
|
@@ -207,7 +209,7 @@ function (_super) {
|
|
|
207
209
|
width = _b.width;
|
|
208
210
|
|
|
209
211
|
if ((fadeEffect || renderAffix) && (visible || this.customRef.current)) {
|
|
210
|
-
return React.createElement(PortalAffix, {
|
|
212
|
+
return /*#__PURE__*/React.createElement(PortalAffix, {
|
|
211
213
|
top: top,
|
|
212
214
|
width: width,
|
|
213
215
|
left: left,
|
|
@@ -227,7 +229,7 @@ function (_super) {
|
|
|
227
229
|
className = _a.className,
|
|
228
230
|
children = _a.children; // 这里需要两层div 包裹,最外层的是在固定时,防止页面抖动
|
|
229
231
|
|
|
230
|
-
return React.createElement("div", null, React.createElement("div", {
|
|
232
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
231
233
|
ref: this.wrapRef,
|
|
232
234
|
className: classNames(this.prefixCls, className)
|
|
233
235
|
}, children), this.renderContent());
|
package/esm/carousel/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
|
|
|
6
6
|
d.__proto__ = b;
|
|
7
7
|
} || function (d, b) {
|
|
8
8
|
for (var p in b) {
|
|
9
|
-
if (
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return function (d, b) {
|
|
17
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
+
|
|
17
19
|
_extendStatics(d, b);
|
|
18
20
|
|
|
19
21
|
function __() {
|
|
@@ -38,7 +40,7 @@ function (_super) {
|
|
|
38
40
|
var _this = _super.call(this, props) || this;
|
|
39
41
|
|
|
40
42
|
_this.prefixCls = 'ab-carousel';
|
|
41
|
-
_this.listRef = React.createRef();
|
|
43
|
+
_this.listRef = /*#__PURE__*/React.createRef();
|
|
42
44
|
_this.sliderWidth = 0;
|
|
43
45
|
_this.contentWidth = 0;
|
|
44
46
|
_this.isDirectionLeft = true;
|
|
@@ -112,7 +114,7 @@ function (_super) {
|
|
|
112
114
|
slidesPerView = _a.slidesPerView,
|
|
113
115
|
height = _a.height;
|
|
114
116
|
_this.sliderWidth = _this.contentWidth / slidesPerView;
|
|
115
|
-
element.style.width = _this.sliderWidth * childCount
|
|
117
|
+
element.style.width = "".concat(_this.sliderWidth * childCount, "px");
|
|
116
118
|
|
|
117
119
|
if (height) {
|
|
118
120
|
element.style.height = height;
|
|
@@ -120,7 +122,7 @@ function (_super) {
|
|
|
120
122
|
|
|
121
123
|
var childList = Array.from(element.children);
|
|
122
124
|
childList.forEach(function (child) {
|
|
123
|
-
child.style.width = _this.sliderWidth
|
|
125
|
+
child.style.width = "".concat(_this.sliderWidth, "px");
|
|
124
126
|
});
|
|
125
127
|
_this.prevX = -currentPage * _this.sliderWidth;
|
|
126
128
|
|
|
@@ -199,7 +201,7 @@ function (_super) {
|
|
|
199
201
|
element.style.transition = transition || Transition.TransformEaseInOut;
|
|
200
202
|
}
|
|
201
203
|
|
|
202
|
-
element.style.transform = "translateX("
|
|
204
|
+
element.style.transform = "translateX(".concat(translateX, "px)");
|
|
203
205
|
};
|
|
204
206
|
|
|
205
207
|
_this.onBeforeChange = function (currentPage) {
|
|
@@ -269,7 +271,7 @@ function (_super) {
|
|
|
269
271
|
return;
|
|
270
272
|
}
|
|
271
273
|
|
|
272
|
-
element.style.transform = "translateX("
|
|
274
|
+
element.style.transform = "translateX(".concat(_this.moveX, "px)");
|
|
273
275
|
};
|
|
274
276
|
/**
|
|
275
277
|
* 停止滑动,判断用户移动位置,确定用户最终滑动位置
|
|
@@ -429,12 +431,12 @@ function (_super) {
|
|
|
429
431
|
className = _b.className,
|
|
430
432
|
children = _b.children,
|
|
431
433
|
pagination = _b.pagination;
|
|
432
|
-
return React.createElement("div", {
|
|
433
|
-
className: classNames(cls, className, (_a = {}, _a[cls
|
|
434
|
-
}, React.createElement("div", {
|
|
435
|
-
className: cls
|
|
436
|
-
}, React.createElement("div", {
|
|
437
|
-
className: cls
|
|
434
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
435
|
+
className: classNames(cls, className, (_a = {}, _a["".concat(cls, "-init")] = this.state.initialized, _a))
|
|
436
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
437
|
+
className: "".concat(cls, "-content")
|
|
438
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
439
|
+
className: "".concat(cls, "-list"),
|
|
438
440
|
ref: this.listRef,
|
|
439
441
|
onTouchStart: this.onTouchStart,
|
|
440
442
|
onTouchMove: this.onTouchMove,
|
|
@@ -442,9 +444,9 @@ function (_super) {
|
|
|
442
444
|
onClick: this.onClick,
|
|
443
445
|
onTransitionEnd: this.onAfterChange
|
|
444
446
|
}, React.Children.map(children, function (child, index) {
|
|
445
|
-
return React.createElement("div", {
|
|
447
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
446
448
|
key: index,
|
|
447
|
-
className: cls
|
|
449
|
+
className: "".concat(cls, "-slider")
|
|
448
450
|
}, child);
|
|
449
451
|
}))), typeof pagination === 'function' ? pagination(this) : pagination);
|
|
450
452
|
}; // 默认值
|
package/esm/checkbox/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
|
|
|
6
6
|
d.__proto__ = b;
|
|
7
7
|
} || function (d, b) {
|
|
8
8
|
for (var p in b) {
|
|
9
|
-
if (
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return function (d, b) {
|
|
17
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
+
|
|
17
19
|
_extendStatics(d, b);
|
|
18
20
|
|
|
19
21
|
function __() {
|
|
@@ -66,24 +68,24 @@ function (_super) {
|
|
|
66
68
|
size = _b.size;
|
|
67
69
|
var visible = _this.state.visible;
|
|
68
70
|
var innerStyle = {
|
|
69
|
-
width: size
|
|
70
|
-
height: size
|
|
71
|
+
width: "".concat(size, "px"),
|
|
72
|
+
height: "".concat(size, "px")
|
|
71
73
|
};
|
|
72
74
|
var iconStyle = {
|
|
73
|
-
width: size * 6 / 16
|
|
74
|
-
height: size * 10 / 16
|
|
75
|
+
width: "".concat(size * 6 / 16, "px"),
|
|
76
|
+
height: "".concat(size * 10 / 16, "px")
|
|
75
77
|
};
|
|
76
|
-
return React.createElement("span", {
|
|
77
|
-
className: classNames(cls, className, (_a = {}, _a[cls
|
|
78
|
-
}, React.createElement("input", {
|
|
79
|
-
className: cls
|
|
78
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
79
|
+
className: classNames(cls, className, (_a = {}, _a["".concat(cls, "-checked")] = visible, _a["".concat(cls, "-disabled")] = disabled, _a))
|
|
80
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
81
|
+
className: "".concat(cls, "-input"),
|
|
80
82
|
type: "checkbox",
|
|
81
83
|
onChange: _this.onVisibleChange
|
|
82
|
-
}), React.createElement("span", {
|
|
83
|
-
className: cls
|
|
84
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
85
|
+
className: "".concat(cls, "-inner"),
|
|
84
86
|
style: innerStyle
|
|
85
|
-
}, React.createElement("span", {
|
|
86
|
-
className: cls
|
|
87
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
88
|
+
className: "".concat(cls, "-icon"),
|
|
87
89
|
style: iconStyle
|
|
88
90
|
})));
|
|
89
91
|
};
|
|
@@ -118,10 +120,10 @@ function (_super) {
|
|
|
118
120
|
return this.renderBox();
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
return React.createElement("label", {
|
|
122
|
-
className: classNames(cls
|
|
123
|
-
}, this.renderBox(), children ? React.createElement("span", {
|
|
124
|
-
className: cls
|
|
123
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
124
|
+
className: classNames("".concat(cls, "-wrap"), className, (_a = {}, _a["".concat(cls, "-reverse")] = reverse, _a["".concat(cls, "-disabled")] = disabled, _a))
|
|
125
|
+
}, this.renderBox(), children ? /*#__PURE__*/React.createElement("span", {
|
|
126
|
+
className: "".concat(cls, "-content")
|
|
125
127
|
}, children) : null);
|
|
126
128
|
};
|
|
127
129
|
|
package/esm/collapse/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
|
|
|
6
6
|
d.__proto__ = b;
|
|
7
7
|
} || function (d, b) {
|
|
8
8
|
for (var p in b) {
|
|
9
|
-
if (
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
return function (d, b) {
|
|
17
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
+
|
|
17
19
|
_extendStatics(d, b);
|
|
18
20
|
|
|
19
21
|
function __() {
|
|
@@ -39,7 +41,7 @@ function (_super) {
|
|
|
39
41
|
_this.prefixCls = 'ab-collapse';
|
|
40
42
|
|
|
41
43
|
_this.onEnter = function (el) {
|
|
42
|
-
_this.cacheHeight = el.offsetHeight
|
|
44
|
+
_this.cacheHeight = "".concat(el.offsetHeight, "px");
|
|
43
45
|
el.style.height = '0px';
|
|
44
46
|
};
|
|
45
47
|
|
|
@@ -56,7 +58,7 @@ function (_super) {
|
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
_this.onExit = function (el) {
|
|
59
|
-
el.style.height = el.offsetHeight
|
|
61
|
+
el.style.height = "".concat(el.offsetHeight, "px");
|
|
60
62
|
};
|
|
61
63
|
|
|
62
64
|
_this.onExiting = function (el) {
|
|
@@ -126,7 +128,7 @@ function (_super) {
|
|
|
126
128
|
child = React.Children.only(title);
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
return React.cloneElement(child, {
|
|
131
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
130
132
|
onClick: child.props.onClick || this.onChange
|
|
131
133
|
});
|
|
132
134
|
};
|
|
@@ -147,10 +149,10 @@ function (_super) {
|
|
|
147
149
|
visible = _c.visible,
|
|
148
150
|
isUserClicked = _c.isUserClicked;
|
|
149
151
|
var cls = this.prefixCls;
|
|
150
|
-
return React.createElement(CSSTransition, {
|
|
152
|
+
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
151
153
|
"in": visible,
|
|
152
154
|
timeout: 200,
|
|
153
|
-
classNames: cls
|
|
155
|
+
classNames: "".concat(cls, "-fade"),
|
|
154
156
|
onEnter: this.onEnter,
|
|
155
157
|
onEntering: this.onEntering,
|
|
156
158
|
onEntered: this.onEntered,
|
|
@@ -159,15 +161,15 @@ function (_super) {
|
|
|
159
161
|
onExited: this.onExited,
|
|
160
162
|
appear: appear,
|
|
161
163
|
mountOnEnter: mountOnEnter
|
|
162
|
-
}, React.createElement("div", {
|
|
163
|
-
className: classNames(cls, className, (_a = {}, _a[cls
|
|
164
|
-
}, React.createElement("div", {
|
|
165
|
-
className: cls
|
|
164
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: classNames(cls, className, (_a = {}, _a["".concat(cls, "-hidden")] = !isUserClicked && appear && !visible, _a))
|
|
166
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: "".concat(cls, "-content")
|
|
166
168
|
}, children)));
|
|
167
169
|
};
|
|
168
170
|
|
|
169
171
|
Collapse.prototype.render = function () {
|
|
170
|
-
return React.createElement(React.Fragment, null, this.renderTitle(), this.renderContent());
|
|
172
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderTitle(), this.renderContent());
|
|
171
173
|
}; // 默认值
|
|
172
174
|
|
|
173
175
|
|
package/esm/confirm/index.d.ts
CHANGED
|
@@ -35,6 +35,6 @@ export interface ConfirmProps extends Pick<ModalProps, Exclude<keyof ModalProps,
|
|
|
35
35
|
}
|
|
36
36
|
declare const Confirm: (config: ConfirmProps) => {
|
|
37
37
|
destroy: (type?: string) => void;
|
|
38
|
-
forceUpdate: (
|
|
38
|
+
forceUpdate: (nextConfig: ConfirmProps) => void;
|
|
39
39
|
};
|
|
40
40
|
export default Confirm;
|
package/esm/confirm/index.js
CHANGED
|
@@ -24,9 +24,9 @@ var defaultConfig = {
|
|
|
24
24
|
hiddenCancel: false,
|
|
25
25
|
hiddenOk: false,
|
|
26
26
|
cancelText: 'Cancel',
|
|
27
|
-
cancelClassName: prefixCls
|
|
27
|
+
cancelClassName: "".concat(prefixCls, "-cancel"),
|
|
28
28
|
okText: 'Confirm',
|
|
29
|
-
okClassName: prefixCls
|
|
29
|
+
okClassName: "".concat(prefixCls, "-ok"),
|
|
30
30
|
content: 'Are you sure?',
|
|
31
31
|
width: '3.6rem',
|
|
32
32
|
placement: 'center',
|
|
@@ -44,10 +44,10 @@ var Confirm = function Confirm(config) {
|
|
|
44
44
|
document.body.appendChild(div);
|
|
45
45
|
var currentConfig = defaultConfig;
|
|
46
46
|
|
|
47
|
-
function updateCurrentConfig(
|
|
48
|
-
var cancelClassName = classNames(currentConfig.cancelClassName,
|
|
49
|
-
var okClassName = classNames(currentConfig.okClassName,
|
|
50
|
-
currentConfig = __assign(__assign(__assign({}, currentConfig),
|
|
47
|
+
function updateCurrentConfig(nextConfig) {
|
|
48
|
+
var cancelClassName = classNames(currentConfig.cancelClassName, nextConfig.cancelClassName);
|
|
49
|
+
var okClassName = classNames(currentConfig.okClassName, nextConfig.okClassName);
|
|
50
|
+
currentConfig = __assign(__assign(__assign({}, currentConfig), nextConfig), {
|
|
51
51
|
cancelClassName: cancelClassName,
|
|
52
52
|
okClassName: okClassName,
|
|
53
53
|
onDestroy: onDestroy
|
|
@@ -92,16 +92,16 @@ var Confirm = function Confirm(config) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
function render(props) {
|
|
95
|
-
ReactDOM.render(React.createElement(Modal, __assign({}, props, {
|
|
96
|
-
className: classNames(prefixCls
|
|
95
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(Modal, __assign({}, props, {
|
|
96
|
+
className: classNames("".concat(prefixCls, "-wrap"), props.className),
|
|
97
97
|
visible: props.visible,
|
|
98
98
|
onClose: onVisible
|
|
99
|
-
}), props.content, props.hiddenCancel && props.hiddenOk ? null : React.createElement("div", {
|
|
100
|
-
className: prefixCls
|
|
101
|
-
}, props.hiddenCancel ? null : React.createElement("button", {
|
|
99
|
+
}), props.content, props.hiddenCancel && props.hiddenOk ? null : /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: "".concat(prefixCls, "-btns")
|
|
101
|
+
}, props.hiddenCancel ? null : /*#__PURE__*/React.createElement("button", {
|
|
102
102
|
className: props.cancelClassName,
|
|
103
103
|
onClick: onVisible
|
|
104
|
-
}, props.cancelText), props.hiddenOk ? null : React.createElement("button", {
|
|
104
|
+
}, props.cancelText), props.hiddenOk ? null : /*#__PURE__*/React.createElement("button", {
|
|
105
105
|
className: props.okClassName,
|
|
106
106
|
onClick: onConfirm
|
|
107
107
|
}, props.okText))), div);
|
|
@@ -111,8 +111,8 @@ var Confirm = function Confirm(config) {
|
|
|
111
111
|
render(currentConfig);
|
|
112
112
|
return {
|
|
113
113
|
destroy: close,
|
|
114
|
-
forceUpdate: function forceUpdate(
|
|
115
|
-
updateCurrentConfig(
|
|
114
|
+
forceUpdate: function forceUpdate(nextConfig) {
|
|
115
|
+
updateCurrentConfig(nextConfig);
|
|
116
116
|
render(currentConfig);
|
|
117
117
|
}
|
|
118
118
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CalendarBaseProps } from './types';
|
|
3
2
|
import { DayOfWeek } from '../DateEnum';
|
|
3
|
+
import { CalendarBaseProps } from './types';
|
|
4
4
|
export interface DayCalendarProps extends CalendarBaseProps {
|
|
5
5
|
prefixCls: string;
|
|
6
6
|
onChangeSelectedDate: (date: Date) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
|
-
import CalendarGrid from './grid';
|
|
3
2
|
import { compareDate, getDateValue, getDayAdd, getDaysInMonth, getEndWeekInMonth, getMonthAdd, getMonthEnd, getMonthFullName, getMonthStart, getStartWeekInMonth, isOutOfDate } from '../utils';
|
|
4
3
|
import { DayOfWeek } from '../DateEnum';
|
|
4
|
+
import CalendarGrid from './grid';
|
|
5
5
|
var weekList = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
|
|
6
6
|
|
|
7
7
|
var getTitle = function getTitle(date) {
|
|
8
|
-
return getMonthFullName(date.getMonth())
|
|
8
|
+
return "".concat(getMonthFullName(date.getMonth()), " ").concat(date.getFullYear());
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
var DayCalendar = function DayCalendar(props) {
|
|
@@ -44,12 +44,12 @@ var DayCalendar = function DayCalendar(props) {
|
|
|
44
44
|
onClick: disabled ? null : function () {
|
|
45
45
|
return onSelect(date);
|
|
46
46
|
},
|
|
47
|
-
className: !disabled && isOut ? cls
|
|
47
|
+
className: !disabled && isOut ? "".concat(cls, "-out") : null
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
var
|
|
52
|
-
var
|
|
51
|
+
var currentTitle = getTitle(navigatedDate);
|
|
52
|
+
var currentHeadList = weekList.slice(firstDayOfWeek, weekList.length).concat(weekList.slice(0, firstDayOfWeek));
|
|
53
53
|
var dayList = [];
|
|
54
54
|
|
|
55
55
|
var _a = getDateValue(navigatedDate),
|
|
@@ -87,10 +87,10 @@ var DayCalendar = function DayCalendar(props) {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
return {
|
|
90
|
-
title:
|
|
90
|
+
title: currentTitle,
|
|
91
91
|
startDate: dayList[0].value,
|
|
92
92
|
endDate: dayList[dayList.length - 1].value,
|
|
93
|
-
headList:
|
|
93
|
+
headList: currentHeadList,
|
|
94
94
|
dateList: dayList
|
|
95
95
|
};
|
|
96
96
|
}, [today, navigatedDate, minDate, maxDate, firstDayOfWeek, selectedDate, onSelect, cls]),
|
|
@@ -102,10 +102,10 @@ var DayCalendar = function DayCalendar(props) {
|
|
|
102
102
|
|
|
103
103
|
var prevEnabled = minDate ? compareDate(minDate, startDate) < 0 : true;
|
|
104
104
|
var nextEnabled = maxDate ? compareDate(endDate, maxDate) < 0 : true;
|
|
105
|
-
return React.createElement("div", {
|
|
106
|
-
className: cls
|
|
107
|
-
}, React.createElement(CalendarGrid, {
|
|
108
|
-
className: cls
|
|
105
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: "".concat(cls, "-day")
|
|
107
|
+
}, /*#__PURE__*/React.createElement(CalendarGrid, {
|
|
108
|
+
className: "".concat(cls, "-dg"),
|
|
109
109
|
title: title,
|
|
110
110
|
headList: headList,
|
|
111
111
|
list: dateList,
|
|
@@ -16,8 +16,8 @@ var __assign = this && this.__assign || function () {
|
|
|
16
16
|
|
|
17
17
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import CalendarGrid from './grid';
|
|
20
19
|
import { compareDate, getYearAdd, getDateValue, getMonthEnd, getMonthStart, getYearEnd, getYearStart, isOutOfDate } from '../utils';
|
|
20
|
+
import CalendarGrid from './grid';
|
|
21
21
|
var dateStyle = {
|
|
22
22
|
Month: 0,
|
|
23
23
|
Year: 1
|
|
@@ -163,7 +163,7 @@ var MonthYearCalendar = function MonthYearCalendar(props) {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
return {
|
|
166
|
-
title: yearPickerStart
|
|
166
|
+
title: "".concat(yearPickerStart, " - ").concat(endYear),
|
|
167
167
|
onPrev: prevEnabled ? goPrevPackageYear : null,
|
|
168
168
|
onNext: nextEnabled ? goNextPackageYear : null,
|
|
169
169
|
list: list
|
|
@@ -202,16 +202,16 @@ var MonthYearCalendar = function MonthYearCalendar(props) {
|
|
|
202
202
|
return null;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
return React.createElement("div", {
|
|
205
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
206
206
|
onClick: goToday,
|
|
207
|
-
className: classNames(cls
|
|
207
|
+
className: classNames("".concat(cls, "-t"), (_a = {}, _a["".concat(cls, "-t-dis")] = !goTodayEnabled, _a))
|
|
208
208
|
}, "Go to today");
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
return React.createElement("div", {
|
|
212
|
-
className: cls
|
|
213
|
-
}, React.createElement(CalendarGrid, __assign({
|
|
214
|
-
className: cls
|
|
211
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
212
|
+
className: "".concat(cls, "-my")
|
|
213
|
+
}, /*#__PURE__*/React.createElement(CalendarGrid, __assign({
|
|
214
|
+
className: "".concat(cls, "-myg"),
|
|
215
215
|
bottomElement: renderGotoToday(),
|
|
216
216
|
onClickTitle: monthPickerVisible && yearPickerVisible ? onClickTitle : null
|
|
217
217
|
}, dateList[style])));
|