@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/trigger/topAlign.js
CHANGED
|
@@ -29,12 +29,12 @@ function getTopCommon(_a) {
|
|
|
29
29
|
width: popInfo.width,
|
|
30
30
|
height: popInfo.height,
|
|
31
31
|
arrowStyle: hiddenArrow ? {} : {
|
|
32
|
-
left: arrowLeft
|
|
32
|
+
left: "".concat(arrowLeft, "px"),
|
|
33
33
|
bottom: '-4px',
|
|
34
34
|
transform: 'translateX(-50%) rotate(45deg)'
|
|
35
35
|
},
|
|
36
36
|
top: top - (rootToPopupSpacing + popInfo.height),
|
|
37
|
-
transformOrigin: isTransformHorizontalDirection ? 'center bottom' : arrowLeft
|
|
37
|
+
transformOrigin: isTransformHorizontalDirection ? 'center bottom' : "".concat(arrowLeft, "px bottom")
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
package/esm/trigger/utils.js
CHANGED
|
@@ -167,7 +167,7 @@ export function getLocationMethodByPlacement(_a) {
|
|
|
167
167
|
availHeight: availSize.height
|
|
168
168
|
});
|
|
169
169
|
return {
|
|
170
|
-
methodStr: useTopLocation ? "Top"
|
|
170
|
+
methodStr: useTopLocation ? "Top".concat(splitArr[1]) : "Bottom".concat(splitArr[1]),
|
|
171
171
|
isVertical: true
|
|
172
172
|
};
|
|
173
173
|
} // 判断悬浮框最终位置
|
|
@@ -181,7 +181,7 @@ export function getLocationMethodByPlacement(_a) {
|
|
|
181
181
|
availWidth: availSize.width
|
|
182
182
|
});
|
|
183
183
|
return {
|
|
184
|
-
methodStr: useLeftLocation ? "Left"
|
|
184
|
+
methodStr: useLeftLocation ? "Left".concat(splitArr[1]) : "Right".concat(splitArr[1]),
|
|
185
185
|
isVertical: false
|
|
186
186
|
};
|
|
187
187
|
}
|
package/lib/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/lib/accordion/Item.js
CHANGED
|
@@ -19,7 +19,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
19
19
|
d.__proto__ = b;
|
|
20
20
|
} || function (d, b) {
|
|
21
21
|
for (var p in b) {
|
|
22
|
-
if (
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -27,6 +27,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
return function (d, b) {
|
|
30
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
31
|
+
|
|
30
32
|
_extendStatics(d, b);
|
|
31
33
|
|
|
32
34
|
function __() {
|
|
@@ -56,7 +58,7 @@ function (_super) {
|
|
|
56
58
|
|
|
57
59
|
var child = _react.default.Children.only(title);
|
|
58
60
|
|
|
59
|
-
return _react.default.cloneElement(child, {
|
|
61
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
60
62
|
onClick: onTitleClick
|
|
61
63
|
});
|
|
62
64
|
};
|
|
@@ -69,7 +71,7 @@ function (_super) {
|
|
|
69
71
|
appear = _a.appear,
|
|
70
72
|
children = _a.children,
|
|
71
73
|
visible = _a.visible;
|
|
72
|
-
return _react.default.createElement("li", null, _react.default.createElement(_collapse.default, {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_collapse.default, {
|
|
73
75
|
title: this.getTitle(),
|
|
74
76
|
visible: visible,
|
|
75
77
|
appear: appear
|
package/lib/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/lib/accordion/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
23
23
|
d.__proto__ = b;
|
|
24
24
|
} || function (d, b) {
|
|
25
25
|
for (var p in b) {
|
|
26
|
-
if (
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -31,6 +31,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
return function (d, b) {
|
|
34
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
35
|
+
|
|
34
36
|
_extendStatics(d, b);
|
|
35
37
|
|
|
36
38
|
function __() {
|
|
@@ -126,11 +128,11 @@ function (_super) {
|
|
|
126
128
|
className = _a.className,
|
|
127
129
|
children = _a.children;
|
|
128
130
|
var visibleNames = this.state.visibleNames;
|
|
129
|
-
return _react.default.createElement("ul", {
|
|
131
|
+
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
130
132
|
className: (0, _classnames.default)(cls, className)
|
|
131
133
|
}, _react.default.Children.map(children, function (child) {
|
|
132
134
|
var name = child.props.name;
|
|
133
|
-
return _react.default.cloneElement(child, {
|
|
135
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
134
136
|
key: name,
|
|
135
137
|
onTitleClick: function onTitleClick() {
|
|
136
138
|
_this.onVisibleChange(name);
|
package/lib/affix/PortalAffix.js
CHANGED
|
@@ -31,26 +31,26 @@ function PortalAffix(_a, ref) {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
if (fadeEffect) {
|
|
34
|
-
return _react.default.createElement(_portal.default, null, _react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
35
35
|
in: visible,
|
|
36
36
|
timeout: 200,
|
|
37
|
-
classNames: cls
|
|
37
|
+
classNames: "".concat(cls, "-fade"),
|
|
38
38
|
appear: true
|
|
39
|
-
}, _react.default.createElement("div", {
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
40
|
style: style,
|
|
41
41
|
ref: ref,
|
|
42
|
-
className: (0, _classnames.default)(className, cls
|
|
42
|
+
className: (0, _classnames.default)(className, "".concat(cls, "-custom"))
|
|
43
43
|
}, children)));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
style.display = visible ? '' : 'none';
|
|
47
|
-
return _react.default.createElement(_portal.default, null, _react.default.createElement("div", {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
48
|
style: style,
|
|
49
49
|
ref: ref,
|
|
50
|
-
className: (0, _classnames.default)(className, cls
|
|
50
|
+
className: (0, _classnames.default)(className, "".concat(cls, "-custom"))
|
|
51
51
|
}, children));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
var _default = _react.default.forwardRef(PortalAffix);
|
|
54
|
+
var _default = /*#__PURE__*/_react.default.forwardRef(PortalAffix);
|
|
55
55
|
|
|
56
56
|
exports.default = _default;
|
package/lib/affix/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
23
23
|
d.__proto__ = b;
|
|
24
24
|
} || function (d, b) {
|
|
25
25
|
for (var p in b) {
|
|
26
|
-
if (
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -31,6 +31,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
return function (d, b) {
|
|
34
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
35
|
+
|
|
34
36
|
_extendStatics(d, b);
|
|
35
37
|
|
|
36
38
|
function __() {
|
|
@@ -67,8 +69,8 @@ function (_super) {
|
|
|
67
69
|
|
|
68
70
|
_this.prefixCls = 'ab-affix';
|
|
69
71
|
_this.resizeHandler = null;
|
|
70
|
-
_this.wrapRef = _react.default.createRef();
|
|
71
|
-
_this.customRef = _react.default.createRef();
|
|
72
|
+
_this.wrapRef = /*#__PURE__*/_react.default.createRef();
|
|
73
|
+
_this.customRef = /*#__PURE__*/_react.default.createRef();
|
|
72
74
|
|
|
73
75
|
_this.onHandlerScroll = function (isResize) {
|
|
74
76
|
var _a = _this.props,
|
|
@@ -126,30 +128,30 @@ function (_super) {
|
|
|
126
128
|
} else if ((!_this.isFixed || isResize) && currentFixed) {
|
|
127
129
|
_this.isFixed = true;
|
|
128
130
|
var documentWidth = document.body.offsetWidth;
|
|
129
|
-
var allWidthLeft = ignoreHorizontalFixed ? "-"
|
|
131
|
+
var allWidthLeft = ignoreHorizontalFixed ? "-".concat(scrollLeft, "px") : '0px';
|
|
130
132
|
|
|
131
133
|
if (renderAffix || fadeEffect) {
|
|
132
134
|
_this.setState({
|
|
133
135
|
visible: true,
|
|
134
|
-
left: allWidth ? allWidthLeft : positionInfo.left
|
|
135
|
-
top: offsetTop
|
|
136
|
-
width: allWidth ? documentWidth
|
|
136
|
+
left: allWidth ? allWidthLeft : "".concat(positionInfo.left, "px"),
|
|
137
|
+
top: "".concat(offsetTop, "px"),
|
|
138
|
+
width: allWidth ? "".concat(documentWidth, "px") : ''
|
|
137
139
|
});
|
|
138
140
|
} else {
|
|
139
141
|
element.style.position = 'fixed';
|
|
140
|
-
element.style.top = offsetTop
|
|
141
|
-
element.style.left = allWidth ? allWidthLeft : positionInfo.left
|
|
142
|
-
element.style.width = allWidth ? documentWidth
|
|
143
|
-
parentElement.style.width = positionInfo.width
|
|
144
|
-
parentElement.style.height = positionInfo.height
|
|
142
|
+
element.style.top = "".concat(offsetTop, "px");
|
|
143
|
+
element.style.left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
|
|
144
|
+
element.style.width = allWidth ? "".concat(documentWidth, "px") : "".concat(positionInfo.width, "px");
|
|
145
|
+
parentElement.style.width = "".concat(positionInfo.width, "px");
|
|
146
|
+
parentElement.style.height = "".concat(positionInfo.height, "px");
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
onChange(true);
|
|
148
150
|
} else if (_this.isFixed && currentFixed && ignoreHorizontalFixed) {
|
|
149
|
-
var allWidthLeft = "-"
|
|
151
|
+
var allWidthLeft = "-".concat(scrollLeft, "px");
|
|
150
152
|
|
|
151
153
|
if (renderAffix || fadeEffect) {
|
|
152
|
-
var left = allWidth ? allWidthLeft : positionInfo.left
|
|
154
|
+
var left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
|
|
153
155
|
|
|
154
156
|
if (left !== _this.state.left) {
|
|
155
157
|
_this.setState({
|
|
@@ -157,7 +159,7 @@ function (_super) {
|
|
|
157
159
|
});
|
|
158
160
|
}
|
|
159
161
|
} else {
|
|
160
|
-
element.style.left = allWidth ? allWidthLeft : positionInfo.left
|
|
162
|
+
element.style.left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
|
|
@@ -219,7 +221,7 @@ function (_super) {
|
|
|
219
221
|
width = _b.width;
|
|
220
222
|
|
|
221
223
|
if ((fadeEffect || renderAffix) && (visible || this.customRef.current)) {
|
|
222
|
-
return _react.default.createElement(_PortalAffix.default, {
|
|
224
|
+
return /*#__PURE__*/_react.default.createElement(_PortalAffix.default, {
|
|
223
225
|
top: top,
|
|
224
226
|
width: width,
|
|
225
227
|
left: left,
|
|
@@ -239,7 +241,7 @@ function (_super) {
|
|
|
239
241
|
className = _a.className,
|
|
240
242
|
children = _a.children; // 这里需要两层div 包裹,最外层的是在固定时,防止页面抖动
|
|
241
243
|
|
|
242
|
-
return _react.default.createElement("div", null, _react.default.createElement("div", {
|
|
244
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
243
245
|
ref: this.wrapRef,
|
|
244
246
|
className: (0, _classnames.default)(this.prefixCls, className)
|
|
245
247
|
}, children), this.renderContent());
|
package/lib/carousel/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
23
23
|
d.__proto__ = b;
|
|
24
24
|
} || function (d, b) {
|
|
25
25
|
for (var p in b) {
|
|
26
|
-
if (
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -31,6 +31,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
return function (d, b) {
|
|
34
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
35
|
+
|
|
34
36
|
_extendStatics(d, b);
|
|
35
37
|
|
|
36
38
|
function __() {
|
|
@@ -50,7 +52,7 @@ function (_super) {
|
|
|
50
52
|
var _this = _super.call(this, props) || this;
|
|
51
53
|
|
|
52
54
|
_this.prefixCls = 'ab-carousel';
|
|
53
|
-
_this.listRef = _react.default.createRef();
|
|
55
|
+
_this.listRef = /*#__PURE__*/_react.default.createRef();
|
|
54
56
|
_this.sliderWidth = 0;
|
|
55
57
|
_this.contentWidth = 0;
|
|
56
58
|
_this.isDirectionLeft = true;
|
|
@@ -124,7 +126,7 @@ function (_super) {
|
|
|
124
126
|
slidesPerView = _a.slidesPerView,
|
|
125
127
|
height = _a.height;
|
|
126
128
|
_this.sliderWidth = _this.contentWidth / slidesPerView;
|
|
127
|
-
element.style.width = _this.sliderWidth * childCount
|
|
129
|
+
element.style.width = "".concat(_this.sliderWidth * childCount, "px");
|
|
128
130
|
|
|
129
131
|
if (height) {
|
|
130
132
|
element.style.height = height;
|
|
@@ -132,7 +134,7 @@ function (_super) {
|
|
|
132
134
|
|
|
133
135
|
var childList = Array.from(element.children);
|
|
134
136
|
childList.forEach(function (child) {
|
|
135
|
-
child.style.width = _this.sliderWidth
|
|
137
|
+
child.style.width = "".concat(_this.sliderWidth, "px");
|
|
136
138
|
});
|
|
137
139
|
_this.prevX = -currentPage * _this.sliderWidth;
|
|
138
140
|
|
|
@@ -211,7 +213,7 @@ function (_super) {
|
|
|
211
213
|
element.style.transition = transition || _transition.default.TransformEaseInOut;
|
|
212
214
|
}
|
|
213
215
|
|
|
214
|
-
element.style.transform = "translateX("
|
|
216
|
+
element.style.transform = "translateX(".concat(translateX, "px)");
|
|
215
217
|
};
|
|
216
218
|
|
|
217
219
|
_this.onBeforeChange = function (currentPage) {
|
|
@@ -281,7 +283,7 @@ function (_super) {
|
|
|
281
283
|
return;
|
|
282
284
|
}
|
|
283
285
|
|
|
284
|
-
element.style.transform = "translateX("
|
|
286
|
+
element.style.transform = "translateX(".concat(_this.moveX, "px)");
|
|
285
287
|
};
|
|
286
288
|
/**
|
|
287
289
|
* 停止滑动,判断用户移动位置,确定用户最终滑动位置
|
|
@@ -441,12 +443,12 @@ function (_super) {
|
|
|
441
443
|
className = _b.className,
|
|
442
444
|
children = _b.children,
|
|
443
445
|
pagination = _b.pagination;
|
|
444
|
-
return _react.default.createElement("div", {
|
|
445
|
-
className: (0, _classnames.default)(cls, className, (_a = {}, _a[cls
|
|
446
|
-
}, _react.default.createElement("div", {
|
|
447
|
-
className: cls
|
|
448
|
-
}, _react.default.createElement("div", {
|
|
449
|
-
className: cls
|
|
446
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
447
|
+
className: (0, _classnames.default)(cls, className, (_a = {}, _a["".concat(cls, "-init")] = this.state.initialized, _a))
|
|
448
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
449
|
+
className: "".concat(cls, "-content")
|
|
450
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
451
|
+
className: "".concat(cls, "-list"),
|
|
450
452
|
ref: this.listRef,
|
|
451
453
|
onTouchStart: this.onTouchStart,
|
|
452
454
|
onTouchMove: this.onTouchMove,
|
|
@@ -454,9 +456,9 @@ function (_super) {
|
|
|
454
456
|
onClick: this.onClick,
|
|
455
457
|
onTransitionEnd: this.onAfterChange
|
|
456
458
|
}, _react.default.Children.map(children, function (child, index) {
|
|
457
|
-
return _react.default.createElement("div", {
|
|
459
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
458
460
|
key: index,
|
|
459
|
-
className: cls
|
|
461
|
+
className: "".concat(cls, "-slider")
|
|
460
462
|
}, child);
|
|
461
463
|
}))), typeof pagination === 'function' ? pagination(this) : pagination);
|
|
462
464
|
}; // 默认值
|
package/lib/checkbox/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
19
19
|
d.__proto__ = b;
|
|
20
20
|
} || function (d, b) {
|
|
21
21
|
for (var p in b) {
|
|
22
|
-
if (
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -27,6 +27,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
return function (d, b) {
|
|
30
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
31
|
+
|
|
30
32
|
_extendStatics(d, b);
|
|
31
33
|
|
|
32
34
|
function __() {
|
|
@@ -77,24 +79,24 @@ function (_super) {
|
|
|
77
79
|
size = _b.size;
|
|
78
80
|
var visible = _this.state.visible;
|
|
79
81
|
var innerStyle = {
|
|
80
|
-
width: size
|
|
81
|
-
height: size
|
|
82
|
+
width: "".concat(size, "px"),
|
|
83
|
+
height: "".concat(size, "px")
|
|
82
84
|
};
|
|
83
85
|
var iconStyle = {
|
|
84
|
-
width: size * 6 / 16
|
|
85
|
-
height: size * 10 / 16
|
|
86
|
+
width: "".concat(size * 6 / 16, "px"),
|
|
87
|
+
height: "".concat(size * 10 / 16, "px")
|
|
86
88
|
};
|
|
87
|
-
return _react.default.createElement("span", {
|
|
88
|
-
className: (0, _classnames.default)(cls, className, (_a = {}, _a[cls
|
|
89
|
-
}, _react.default.createElement("input", {
|
|
90
|
-
className: cls
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
90
|
+
className: (0, _classnames.default)(cls, className, (_a = {}, _a["".concat(cls, "-checked")] = visible, _a["".concat(cls, "-disabled")] = disabled, _a))
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
92
|
+
className: "".concat(cls, "-input"),
|
|
91
93
|
type: "checkbox",
|
|
92
94
|
onChange: _this.onVisibleChange
|
|
93
|
-
}), _react.default.createElement("span", {
|
|
94
|
-
className: cls
|
|
95
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
96
|
+
className: "".concat(cls, "-inner"),
|
|
95
97
|
style: innerStyle
|
|
96
|
-
}, _react.default.createElement("span", {
|
|
97
|
-
className: cls
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
99
|
+
className: "".concat(cls, "-icon"),
|
|
98
100
|
style: iconStyle
|
|
99
101
|
})));
|
|
100
102
|
};
|
|
@@ -129,10 +131,10 @@ function (_super) {
|
|
|
129
131
|
return this.renderBox();
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
return _react.default.createElement("label", {
|
|
133
|
-
className: (0, _classnames.default)(cls
|
|
134
|
-
}, this.renderBox(), children ? _react.default.createElement("span", {
|
|
135
|
-
className: cls
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement("label", {
|
|
135
|
+
className: (0, _classnames.default)("".concat(cls, "-wrap"), className, (_a = {}, _a["".concat(cls, "-reverse")] = reverse, _a["".concat(cls, "-disabled")] = disabled, _a))
|
|
136
|
+
}, this.renderBox(), children ? /*#__PURE__*/_react.default.createElement("span", {
|
|
137
|
+
className: "".concat(cls, "-content")
|
|
136
138
|
}, children) : null);
|
|
137
139
|
};
|
|
138
140
|
|
package/lib/collapse/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
21
21
|
d.__proto__ = b;
|
|
22
22
|
} || function (d, b) {
|
|
23
23
|
for (var p in b) {
|
|
24
|
-
if (
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -29,6 +29,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
return function (d, b) {
|
|
32
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
|
+
|
|
32
34
|
_extendStatics(d, b);
|
|
33
35
|
|
|
34
36
|
function __() {
|
|
@@ -50,7 +52,7 @@ function (_super) {
|
|
|
50
52
|
_this.prefixCls = 'ab-collapse';
|
|
51
53
|
|
|
52
54
|
_this.onEnter = function (el) {
|
|
53
|
-
_this.cacheHeight = el.offsetHeight
|
|
55
|
+
_this.cacheHeight = "".concat(el.offsetHeight, "px");
|
|
54
56
|
el.style.height = '0px';
|
|
55
57
|
};
|
|
56
58
|
|
|
@@ -67,7 +69,7 @@ function (_super) {
|
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
_this.onExit = function (el) {
|
|
70
|
-
el.style.height = el.offsetHeight
|
|
72
|
+
el.style.height = "".concat(el.offsetHeight, "px");
|
|
71
73
|
};
|
|
72
74
|
|
|
73
75
|
_this.onExiting = function (el) {
|
|
@@ -137,7 +139,7 @@ function (_super) {
|
|
|
137
139
|
child = _react.default.Children.only(title);
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
return _react.default.cloneElement(child, {
|
|
142
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
141
143
|
onClick: child.props.onClick || this.onChange
|
|
142
144
|
});
|
|
143
145
|
};
|
|
@@ -158,10 +160,10 @@ function (_super) {
|
|
|
158
160
|
visible = _c.visible,
|
|
159
161
|
isUserClicked = _c.isUserClicked;
|
|
160
162
|
var cls = this.prefixCls;
|
|
161
|
-
return _react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
162
164
|
in: visible,
|
|
163
165
|
timeout: 200,
|
|
164
|
-
classNames: cls
|
|
166
|
+
classNames: "".concat(cls, "-fade"),
|
|
165
167
|
onEnter: this.onEnter,
|
|
166
168
|
onEntering: this.onEntering,
|
|
167
169
|
onEntered: this.onEntered,
|
|
@@ -170,15 +172,15 @@ function (_super) {
|
|
|
170
172
|
onExited: this.onExited,
|
|
171
173
|
appear: appear,
|
|
172
174
|
mountOnEnter: mountOnEnter
|
|
173
|
-
}, _react.default.createElement("div", {
|
|
174
|
-
className: (0, _classnames.default)(cls, className, (_a = {}, _a[cls
|
|
175
|
-
}, _react.default.createElement("div", {
|
|
176
|
-
className: cls
|
|
175
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
+
className: (0, _classnames.default)(cls, className, (_a = {}, _a["".concat(cls, "-hidden")] = !isUserClicked && appear && !visible, _a))
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: "".concat(cls, "-content")
|
|
177
179
|
}, children)));
|
|
178
180
|
};
|
|
179
181
|
|
|
180
182
|
Collapse.prototype.render = function () {
|
|
181
|
-
return _react.default.createElement(_react.default.Fragment, null, this.renderTitle(), this.renderContent());
|
|
183
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderTitle(), this.renderContent());
|
|
182
184
|
}; // 默认值
|
|
183
185
|
|
|
184
186
|
|
package/lib/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/lib/confirm/index.js
CHANGED
|
@@ -38,9 +38,9 @@ var defaultConfig = {
|
|
|
38
38
|
hiddenCancel: false,
|
|
39
39
|
hiddenOk: false,
|
|
40
40
|
cancelText: 'Cancel',
|
|
41
|
-
cancelClassName: prefixCls
|
|
41
|
+
cancelClassName: "".concat(prefixCls, "-cancel"),
|
|
42
42
|
okText: 'Confirm',
|
|
43
|
-
okClassName: prefixCls
|
|
43
|
+
okClassName: "".concat(prefixCls, "-ok"),
|
|
44
44
|
content: 'Are you sure?',
|
|
45
45
|
width: '3.6rem',
|
|
46
46
|
placement: 'center',
|
|
@@ -58,10 +58,10 @@ var Confirm = function Confirm(config) {
|
|
|
58
58
|
document.body.appendChild(div);
|
|
59
59
|
var currentConfig = defaultConfig;
|
|
60
60
|
|
|
61
|
-
function updateCurrentConfig(
|
|
62
|
-
var cancelClassName = (0, _classnames.default)(currentConfig.cancelClassName,
|
|
63
|
-
var okClassName = (0, _classnames.default)(currentConfig.okClassName,
|
|
64
|
-
currentConfig = __assign(__assign(__assign({}, currentConfig),
|
|
61
|
+
function updateCurrentConfig(nextConfig) {
|
|
62
|
+
var cancelClassName = (0, _classnames.default)(currentConfig.cancelClassName, nextConfig.cancelClassName);
|
|
63
|
+
var okClassName = (0, _classnames.default)(currentConfig.okClassName, nextConfig.okClassName);
|
|
64
|
+
currentConfig = __assign(__assign(__assign({}, currentConfig), nextConfig), {
|
|
65
65
|
cancelClassName: cancelClassName,
|
|
66
66
|
okClassName: okClassName,
|
|
67
67
|
onDestroy: onDestroy
|
|
@@ -106,16 +106,16 @@ var Confirm = function Confirm(config) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
function render(props) {
|
|
109
|
-
_reactDom.default.render(_react.default.createElement(_modal.default, __assign({}, props, {
|
|
110
|
-
className: (0, _classnames.default)(prefixCls
|
|
109
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_modal.default, __assign({}, props, {
|
|
110
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-wrap"), props.className),
|
|
111
111
|
visible: props.visible,
|
|
112
112
|
onClose: onVisible
|
|
113
|
-
}), props.content, props.hiddenCancel && props.hiddenOk ? null : _react.default.createElement("div", {
|
|
114
|
-
className: prefixCls
|
|
115
|
-
}, props.hiddenCancel ? null : _react.default.createElement("button", {
|
|
113
|
+
}), props.content, props.hiddenCancel && props.hiddenOk ? null : /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
+
className: "".concat(prefixCls, "-btns")
|
|
115
|
+
}, props.hiddenCancel ? null : /*#__PURE__*/_react.default.createElement("button", {
|
|
116
116
|
className: props.cancelClassName,
|
|
117
117
|
onClick: onVisible
|
|
118
|
-
}, props.cancelText), props.hiddenOk ? null : _react.default.createElement("button", {
|
|
118
|
+
}, props.cancelText), props.hiddenOk ? null : /*#__PURE__*/_react.default.createElement("button", {
|
|
119
119
|
className: props.okClassName,
|
|
120
120
|
onClick: onConfirm
|
|
121
121
|
}, props.okText))), div);
|
|
@@ -125,8 +125,8 @@ var Confirm = function Confirm(config) {
|
|
|
125
125
|
render(currentConfig);
|
|
126
126
|
return {
|
|
127
127
|
destroy: close,
|
|
128
|
-
forceUpdate: function forceUpdate(
|
|
129
|
-
updateCurrentConfig(
|
|
128
|
+
forceUpdate: function forceUpdate(nextConfig) {
|
|
129
|
+
updateCurrentConfig(nextConfig);
|
|
130
130
|
render(currentConfig);
|
|
131
131
|
}
|
|
132
132
|
};
|
|
@@ -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;
|
|
@@ -11,12 +11,12 @@ exports.default = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
-
var _grid = _interopRequireDefault(require("./grid"));
|
|
15
|
-
|
|
16
14
|
var _utils = require("../utils");
|
|
17
15
|
|
|
18
16
|
var _DateEnum = require("../DateEnum");
|
|
19
17
|
|
|
18
|
+
var _grid = _interopRequireDefault(require("./grid"));
|
|
19
|
+
|
|
20
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,7 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
var weekList = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
|
|
25
25
|
|
|
26
26
|
var getTitle = function getTitle(date) {
|
|
27
|
-
return (0, _utils.getMonthFullName)(date.getMonth())
|
|
27
|
+
return "".concat((0, _utils.getMonthFullName)(date.getMonth()), " ").concat(date.getFullYear());
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
var DayCalendar = function DayCalendar(props) {
|
|
@@ -63,12 +63,12 @@ var DayCalendar = function DayCalendar(props) {
|
|
|
63
63
|
onClick: disabled ? null : function () {
|
|
64
64
|
return onSelect(date);
|
|
65
65
|
},
|
|
66
|
-
className: !disabled && isOut ? cls
|
|
66
|
+
className: !disabled && isOut ? "".concat(cls, "-out") : null
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
var
|
|
71
|
-
var
|
|
70
|
+
var currentTitle = getTitle(navigatedDate);
|
|
71
|
+
var currentHeadList = weekList.slice(firstDayOfWeek, weekList.length).concat(weekList.slice(0, firstDayOfWeek));
|
|
72
72
|
var dayList = [];
|
|
73
73
|
|
|
74
74
|
var _a = (0, _utils.getDateValue)(navigatedDate),
|
|
@@ -106,10 +106,10 @@ var DayCalendar = function DayCalendar(props) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
return {
|
|
109
|
-
title:
|
|
109
|
+
title: currentTitle,
|
|
110
110
|
startDate: dayList[0].value,
|
|
111
111
|
endDate: dayList[dayList.length - 1].value,
|
|
112
|
-
headList:
|
|
112
|
+
headList: currentHeadList,
|
|
113
113
|
dateList: dayList
|
|
114
114
|
};
|
|
115
115
|
}, [today, navigatedDate, minDate, maxDate, firstDayOfWeek, selectedDate, onSelect, cls]),
|
|
@@ -121,10 +121,10 @@ var DayCalendar = function DayCalendar(props) {
|
|
|
121
121
|
|
|
122
122
|
var prevEnabled = minDate ? (0, _utils.compareDate)(minDate, startDate) < 0 : true;
|
|
123
123
|
var nextEnabled = maxDate ? (0, _utils.compareDate)(endDate, maxDate) < 0 : true;
|
|
124
|
-
return _react.default.createElement("div", {
|
|
125
|
-
className: cls
|
|
126
|
-
}, _react.default.createElement(_grid.default, {
|
|
127
|
-
className: cls
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: "".concat(cls, "-day")
|
|
126
|
+
}, /*#__PURE__*/_react.default.createElement(_grid.default, {
|
|
127
|
+
className: "".concat(cls, "-dg"),
|
|
128
128
|
title: title,
|
|
129
129
|
headList: headList,
|
|
130
130
|
list: dateList,
|