@autobest-ui/components 1.4.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.d.ts +4 -5
- package/esm/guide/index.js +19 -19
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- 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.d.ts +7 -2
- package/esm/loading/index.js +20 -26
- package/esm/loading/style/index.css +1 -1
- package/esm/loading/style/index.scss +0 -10
- 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 +14 -15
- package/esm/table/body/BodyRow.js +8 -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.d.ts +4 -5
- package/lib/guide/index.js +19 -20
- package/lib/index.d.ts +0 -1
- package/lib/index.js +54 -62
- 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.d.ts +7 -2
- package/lib/loading/index.js +20 -27
- package/lib/loading/style/index.css +1 -1
- package/lib/loading/style/index.scss +0 -10
- 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 +14 -15
- package/lib/table/body/BodyRow.js +8 -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/use-config/index.d.ts +0 -5
- package/esm/use-config/index.js +0 -13
- package/esm/use-config/style/index.css +0 -0
- package/esm/use-config/style/index.d.ts +0 -1
- package/esm/use-config/style/index.js +0 -1
- package/esm/use-config/style/index.scss +0 -0
- package/lib/use-config/index.d.ts +0 -5
- package/lib/use-config/index.js +0 -21
- package/lib/use-config/style/index.css +0 -0
- package/lib/use-config/style/index.d.ts +0 -1
- package/lib/use-config/style/index.js +0 -1
- package/lib/use-config/style/index.scss +0 -0
package/lib/trigger/index.js
CHANGED
|
@@ -17,10 +17,10 @@ var _utils = require("@autobest-ui/utils");
|
|
|
17
17
|
|
|
18
18
|
var _reactTransitionGroup = require("react-transition-group");
|
|
19
19
|
|
|
20
|
-
var _ref = require("./ref");
|
|
21
|
-
|
|
22
20
|
var _portal = _interopRequireDefault(require("../portal"));
|
|
23
21
|
|
|
22
|
+
var _ref = require("./ref");
|
|
23
|
+
|
|
24
24
|
var _getPopupLocation = _interopRequireDefault(require("./getPopupLocation"));
|
|
25
25
|
|
|
26
26
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -31,7 +31,7 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
31
31
|
d.__proto__ = b;
|
|
32
32
|
} || function (d, b) {
|
|
33
33
|
for (var p in b) {
|
|
34
|
-
if (
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -39,6 +39,8 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
return function (d, b) {
|
|
42
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
43
|
+
|
|
42
44
|
_extendStatics(d, b);
|
|
43
45
|
|
|
44
46
|
function __() {
|
|
@@ -76,9 +78,9 @@ function (_super) {
|
|
|
76
78
|
var _this = _super.call(this, props) || this;
|
|
77
79
|
|
|
78
80
|
_this.prefixCls = 'ab-trigger';
|
|
79
|
-
_this.popupRef = _react.default.createRef();
|
|
80
|
-
_this.maskRef = _react.default.createRef();
|
|
81
|
-
_this.triggerRef = _react.default.createRef();
|
|
81
|
+
_this.popupRef = /*#__PURE__*/_react.default.createRef();
|
|
82
|
+
_this.maskRef = /*#__PURE__*/_react.default.createRef();
|
|
83
|
+
_this.triggerRef = /*#__PURE__*/_react.default.createRef();
|
|
82
84
|
|
|
83
85
|
_this.isClickToHide = function () {
|
|
84
86
|
return _this.props.trigger.indexOf('click') !== -1;
|
|
@@ -120,7 +122,7 @@ function (_super) {
|
|
|
120
122
|
isInsertNode = _a.isInsertNode;
|
|
121
123
|
|
|
122
124
|
if (maxHeight) {
|
|
123
|
-
popupEl.style.maxHeight = maxHeight
|
|
125
|
+
popupEl.style.maxHeight = "".concat(maxHeight, "px");
|
|
124
126
|
popupEl.style.overflowY = 'auto';
|
|
125
127
|
}
|
|
126
128
|
|
|
@@ -128,11 +130,11 @@ function (_super) {
|
|
|
128
130
|
var rootWidth = (0, _utils.getElementSize)(rootEl).width;
|
|
129
131
|
|
|
130
132
|
if (isMinRootWidth) {
|
|
131
|
-
popupEl.style.minWidth = rootWidth
|
|
133
|
+
popupEl.style.minWidth = "".concat(rootWidth, "px");
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
if (isMaxRootWidth) {
|
|
135
|
-
popupEl.style.maxWidth = rootWidth
|
|
137
|
+
popupEl.style.maxWidth = "".concat(rootWidth, "px");
|
|
136
138
|
popupEl.style.overflowX = 'auto';
|
|
137
139
|
}
|
|
138
140
|
} // 计算Popup元素应该显示的位置
|
|
@@ -159,15 +161,15 @@ function (_super) {
|
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
popupEl.style.transformOrigin = transformOrigin;
|
|
162
|
-
popupEl.style.left = left
|
|
163
|
-
popupEl.style.top = top
|
|
164
|
+
popupEl.style.left = "".concat(left, "px");
|
|
165
|
+
popupEl.style.top = "".concat(top, "px");
|
|
164
166
|
|
|
165
167
|
if (popupMaxHeightByCalc) {
|
|
166
|
-
popupEl.style.maxHeight = popupMaxWidthByCalc
|
|
168
|
+
popupEl.style.maxHeight = "".concat(popupMaxWidthByCalc, "px");
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
if (popupMaxWidthByCalc) {
|
|
170
|
-
popupEl.style.maxWidth = popupMaxWidthByCalc
|
|
172
|
+
popupEl.style.maxWidth = "".concat(popupMaxWidthByCalc, "px");
|
|
171
173
|
popupEl.style.overflowX = 'auto';
|
|
172
174
|
} else if (!isMaxRootWidth) {
|
|
173
175
|
popupEl.style.maxWidth = '';
|
|
@@ -533,8 +535,8 @@ function (_super) {
|
|
|
533
535
|
|
|
534
536
|
if (showMask) {
|
|
535
537
|
var cls = this.prefixCls;
|
|
536
|
-
return _react.default.createElement("div", {
|
|
537
|
-
className: (0, _classnames.default)(cls
|
|
538
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
539
|
+
className: (0, _classnames.default)("".concat(cls, "-mask"), (_a = {}, _a["".concat(cls, "-mask-show")] = visible, _a)),
|
|
538
540
|
ref: this.maskRef,
|
|
539
541
|
onTouchEnd: this.onPreventThrough
|
|
540
542
|
});
|
|
@@ -556,7 +558,7 @@ function (_super) {
|
|
|
556
558
|
visible = _c.visible,
|
|
557
559
|
isUserOperated = _c.isUserOperated,
|
|
558
560
|
trigger = _c.trigger;
|
|
559
|
-
var wrapClass = (0, _classnames.default)(cls
|
|
561
|
+
var wrapClass = (0, _classnames.default)("".concat(cls, "-wrap"), wrapClassName, (_a = {}, _a["".concat(cls, "-hidden")] = isInsertNode && !isUserOperated && !visible, _a)); // hover 下,对popup增加相应的事件,延迟隐藏,可以在弹框中停留
|
|
560
562
|
|
|
561
563
|
var mouseProps = {};
|
|
562
564
|
|
|
@@ -567,14 +569,14 @@ function (_super) {
|
|
|
567
569
|
|
|
568
570
|
mouseProps.onMouseDown = this.onPopupMouseDown;
|
|
569
571
|
mouseProps.onTouchStart = this.onPopupMouseDown;
|
|
570
|
-
return _react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
572
|
+
return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
571
573
|
in: visible,
|
|
572
574
|
onEnter: this.forceAlign,
|
|
573
575
|
timeout: 200,
|
|
574
|
-
classNames: cls
|
|
576
|
+
classNames: "".concat(cls, "-fade").concat(isTransformHorizontalDirection ? '-hr' : ''),
|
|
575
577
|
onExited: this.onExited,
|
|
576
578
|
appear: true
|
|
577
|
-
}, _react.default.createElement("div", __assign({}, mouseProps, {
|
|
579
|
+
}, /*#__PURE__*/_react.default.createElement("div", __assign({}, mouseProps, {
|
|
578
580
|
className: wrapClass,
|
|
579
581
|
ref: this.popupRef
|
|
580
582
|
}), typeof popup === 'function' ? popup() : popup));
|
|
@@ -618,23 +620,23 @@ function (_super) {
|
|
|
618
620
|
} // 对当前children元素添加额外属性
|
|
619
621
|
|
|
620
622
|
|
|
621
|
-
return _react.default.cloneElement(child, cloneProps);
|
|
623
|
+
return /*#__PURE__*/_react.default.cloneElement(child, cloneProps);
|
|
622
624
|
};
|
|
623
625
|
|
|
624
626
|
Trigger.prototype.renderPopupComponent = function () {
|
|
625
627
|
if (this.props.isInsertNode) {
|
|
626
|
-
return _react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderPopupContent());
|
|
628
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderPopupContent());
|
|
627
629
|
}
|
|
628
630
|
|
|
629
631
|
if (this.state.visible || this.popupRef.current) {
|
|
630
|
-
return _react.default.createElement(_portal.default, null, _react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderPopupContent()));
|
|
632
|
+
return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderPopupContent()));
|
|
631
633
|
}
|
|
632
634
|
|
|
633
635
|
return null;
|
|
634
636
|
};
|
|
635
637
|
|
|
636
638
|
Trigger.prototype.render = function () {
|
|
637
|
-
return _react.default.createElement(_react.default.Fragment, null, this.renderChildComponent(), this.renderPopupComponent());
|
|
639
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderChildComponent(), this.renderPopupComponent());
|
|
638
640
|
};
|
|
639
641
|
|
|
640
642
|
Trigger.defaultProps = {
|
package/lib/trigger/leftAlign.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getLeftBottomLocationInfo = getLeftBottomLocationInfo;
|
|
6
7
|
exports.getLeftLocationInfo = getLeftLocationInfo;
|
|
7
8
|
exports.getLeftTopLocationInfo = getLeftTopLocationInfo;
|
|
8
|
-
exports.getLeftBottomLocationInfo = getLeftBottomLocationInfo;
|
|
9
9
|
|
|
10
10
|
var _utils = require("./utils");
|
|
11
11
|
|
|
@@ -39,11 +39,11 @@ function getLeftCommon(_a) {
|
|
|
39
39
|
height: popInfo.height,
|
|
40
40
|
left: left - (rootToPopupSpacing + popInfo.width),
|
|
41
41
|
arrowStyle: hiddenArrow ? {} : {
|
|
42
|
-
top: arrowTop
|
|
42
|
+
top: "".concat(arrowTop, "px"),
|
|
43
43
|
right: '-4px',
|
|
44
44
|
transform: 'translateY(-50%) rotate(-45deg)'
|
|
45
45
|
},
|
|
46
|
-
transformOrigin: isTransformHorizontalDirection ? 'right center' : "right "
|
|
46
|
+
transformOrigin: isTransformHorizontalDirection ? 'right center' : "right ".concat(arrowTop, "px")
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
/* 具体方位 */
|
package/lib/trigger/ref.js
CHANGED
|
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.fillRef = fillRef;
|
|
9
8
|
exports.composeRef = composeRef;
|
|
9
|
+
exports.fillRef = fillRef;
|
|
10
10
|
exports.supportRef = supportRef;
|
|
11
11
|
|
|
12
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getRightBottomLocationInfo = getRightBottomLocationInfo;
|
|
6
7
|
exports.getRightLocationInfo = getRightLocationInfo;
|
|
7
8
|
exports.getRightTopLocationInfo = getRightTopLocationInfo;
|
|
8
|
-
exports.getRightBottomLocationInfo = getRightBottomLocationInfo;
|
|
9
9
|
|
|
10
10
|
var _utils = require("./utils");
|
|
11
11
|
|
|
@@ -39,11 +39,11 @@ function getRightCommon(_a) {
|
|
|
39
39
|
height: popInfo.height,
|
|
40
40
|
left: left + rootToPopupSpacing + rootInfo.width,
|
|
41
41
|
arrowStyle: hiddenArrow ? {} : {
|
|
42
|
-
top: arrowTop
|
|
42
|
+
top: "".concat(arrowTop, "px"),
|
|
43
43
|
left: '-4px',
|
|
44
44
|
transform: 'translateY(-50%) rotate(-225deg)'
|
|
45
45
|
},
|
|
46
|
-
transformOrigin: isTransformHorizontalDirection ? 'left center' : "left "
|
|
46
|
+
transformOrigin: isTransformHorizontalDirection ? 'left center' : "left ".concat(arrowTop, "px")
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
package/lib/trigger/topAlign.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getTopLocationInfo = getTopLocationInfo;
|
|
7
6
|
exports.getTopLeftLocationInfo = getTopLeftLocationInfo;
|
|
7
|
+
exports.getTopLocationInfo = getTopLocationInfo;
|
|
8
8
|
exports.getTopRightLocationInfo = getTopRightLocationInfo;
|
|
9
9
|
|
|
10
10
|
var _utils = require("./utils");
|
|
@@ -38,12 +38,12 @@ function getTopCommon(_a) {
|
|
|
38
38
|
width: popInfo.width,
|
|
39
39
|
height: popInfo.height,
|
|
40
40
|
arrowStyle: hiddenArrow ? {} : {
|
|
41
|
-
left: arrowLeft
|
|
41
|
+
left: "".concat(arrowLeft, "px"),
|
|
42
42
|
bottom: '-4px',
|
|
43
43
|
transform: 'translateX(-50%) rotate(45deg)'
|
|
44
44
|
},
|
|
45
45
|
top: top - (rootToPopupSpacing + popInfo.height),
|
|
46
|
-
transformOrigin: isTransformHorizontalDirection ? 'center bottom' : arrowLeft
|
|
46
|
+
transformOrigin: isTransformHorizontalDirection ? 'center bottom' : "".concat(arrowLeft, "px bottom")
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
package/lib/trigger/utils.js
CHANGED
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getArrowLeft = getArrowLeft;
|
|
7
7
|
exports.getArrowTop = getArrowTop;
|
|
8
8
|
exports.getAvailPosition = getAvailPosition;
|
|
9
|
+
exports.getLocationMethodByPlacement = getLocationMethodByPlacement;
|
|
9
10
|
exports.getTranslate = getTranslate;
|
|
10
|
-
exports.isTopMoreThanBottom = isTopMoreThanBottom;
|
|
11
11
|
exports.isLeftMoreThanRight = isLeftMoreThanRight;
|
|
12
|
-
exports.
|
|
12
|
+
exports.isTopMoreThanBottom = isTopMoreThanBottom;
|
|
13
13
|
|
|
14
14
|
var _constants = require("./constants");
|
|
15
15
|
|
|
@@ -187,7 +187,7 @@ function getLocationMethodByPlacement(_a) {
|
|
|
187
187
|
availHeight: availSize.height
|
|
188
188
|
});
|
|
189
189
|
return {
|
|
190
|
-
methodStr: useTopLocation ? "Top"
|
|
190
|
+
methodStr: useTopLocation ? "Top".concat(splitArr[1]) : "Bottom".concat(splitArr[1]),
|
|
191
191
|
isVertical: true
|
|
192
192
|
};
|
|
193
193
|
} // 判断悬浮框最终位置
|
|
@@ -201,7 +201,7 @@ function getLocationMethodByPlacement(_a) {
|
|
|
201
201
|
availWidth: availSize.width
|
|
202
202
|
});
|
|
203
203
|
return {
|
|
204
|
-
methodStr: useLeftLocation ? "Left"
|
|
204
|
+
methodStr: useLeftLocation ? "Left".concat(splitArr[1]) : "Right".concat(splitArr[1]),
|
|
205
205
|
isVertical: false
|
|
206
206
|
};
|
|
207
207
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobest-ui/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "components common ui for React",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://autobest.visualstudio.com/AutoBestChina/_git/AutobestFrontendCommon#readme",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@autobest-ui/utils": ">=0.0
|
|
44
|
+
"@autobest-ui/utils": ">=2.0.0",
|
|
45
45
|
"intersection-observer": ">=0.12.0",
|
|
46
46
|
"react": ">=16.8.6",
|
|
47
47
|
"react-transition-group": ">=4.2.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "483f59c08b124fba12ae76418590df30bbe3a507"
|
|
50
50
|
}
|
package/esm/use-config/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var UseConfig =
|
|
2
|
-
/** @class */
|
|
3
|
-
function () {
|
|
4
|
-
function UseConfig() {} // 配置静态资源链接库, 默认指向测试环境
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
UseConfig.assetCommonUiUrl = 'https://assets-web.dev.autobestdevops.com/common-uiasset';
|
|
8
|
-
UseConfig.assetWWWUrl = null;
|
|
9
|
-
UseConfig.assetSupportWebP = null;
|
|
10
|
-
return UseConfig;
|
|
11
|
-
}();
|
|
12
|
-
|
|
13
|
-
export default UseConfig;
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
package/lib/use-config/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var UseConfig =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
11
|
-
function UseConfig() {} // 配置静态资源链接库, 默认指向测试环境
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
UseConfig.assetCommonUiUrl = 'https://assets-web.dev.autobestdevops.com/common-uiasset';
|
|
15
|
-
UseConfig.assetWWWUrl = null;
|
|
16
|
-
UseConfig.assetSupportWebP = null;
|
|
17
|
-
return UseConfig;
|
|
18
|
-
}();
|
|
19
|
-
|
|
20
|
-
var _default = UseConfig;
|
|
21
|
-
exports.default = _default;
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|