@rc-component/tour
Advanced tools
Comparing version 1.0.0-6 to 1.0.0-7
@@ -70,5 +70,2 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2"; | ||
var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask); | ||
var mergedArrow = typeof stepArrow === 'undefined' ? arrow : stepArrow; | ||
var arrowPointAtCenter = _typeof(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false; | ||
var arrowClassName = classNames("".concat(prefixCls, "-arrow"), _defineProperty({}, "".concat(prefixCls, "-arrowPointAtCenter"), arrowPointAtCenter)); | ||
@@ -78,15 +75,20 @@ var _useTarget = useTarget(target, open, gap), | ||
posInfo = _useTarget2[0], | ||
targetElement = _useTarget2[1]; | ||
targetElement = _useTarget2[1]; // ========================= arrow ========================= | ||
var popupAlign = targetElement ? arrowPointAtCenter ? getCenterPlacements({ | ||
placement: placement | ||
}) : placements[mergedPlacement] : CENTER_ALIGN; // ========================= Change ========================= | ||
var mergedArrow = targetElement ? typeof stepArrow === 'undefined' ? arrow : stepArrow : false; | ||
var arrowPointAtCenter = _typeof(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false; | ||
var arrowClassName = classNames("".concat(prefixCls, "-arrow"), _defineProperty({}, "".concat(prefixCls, "-arrowPointAtCenter"), arrowPointAtCenter)); // ========================= Change ========================= | ||
var onInternalChange = function onInternalChange(nextCurrent) { | ||
setMergedCurrent(nextCurrent); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent); | ||
}; // ========================= Render ========================= | ||
}; // ========================= popupAlign ========================= | ||
var popupAlign = targetElement ? arrowPointAtCenter ? getCenterPlacements({ | ||
placement: placement | ||
}) : placements[mergedPlacement] : CENTER_ALIGN; // ========================= Render ========================= | ||
// Skip if not init yet | ||
if (targetElement === undefined) { | ||
@@ -97,3 +99,5 @@ return null; | ||
var getPopupElement = function getPopupElement() { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, mergedArrow && /*#__PURE__*/React.createElement("div", { | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: "".concat(prefixCls, "-content") | ||
}, mergedArrow && /*#__PURE__*/React.createElement("div", { | ||
className: arrowClassName, | ||
@@ -100,0 +104,0 @@ key: "arrow" |
@@ -96,5 +96,2 @@ "use strict"; | ||
var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask); | ||
var mergedArrow = typeof stepArrow === 'undefined' ? arrow : stepArrow; | ||
var arrowPointAtCenter = (0, _typeof2.default)(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false; | ||
var arrowClassName = (0, _classnames.default)("".concat(prefixCls, "-arrow"), (0, _defineProperty2.default)({}, "".concat(prefixCls, "-arrowPointAtCenter"), arrowPointAtCenter)); | ||
@@ -104,15 +101,20 @@ var _useTarget = (0, _useTarget3.default)(target, open, gap), | ||
posInfo = _useTarget2[0], | ||
targetElement = _useTarget2[1]; | ||
targetElement = _useTarget2[1]; // ========================= arrow ========================= | ||
var popupAlign = targetElement ? arrowPointAtCenter ? (0, _placements.getCenterPlacements)({ | ||
placement: placement | ||
}) : _placements.default[mergedPlacement] : CENTER_ALIGN; // ========================= Change ========================= | ||
var mergedArrow = targetElement ? typeof stepArrow === 'undefined' ? arrow : stepArrow : false; | ||
var arrowPointAtCenter = (0, _typeof2.default)(mergedArrow) === 'object' ? mergedArrow.pointAtCenter : false; | ||
var arrowClassName = (0, _classnames.default)("".concat(prefixCls, "-arrow"), (0, _defineProperty2.default)({}, "".concat(prefixCls, "-arrowPointAtCenter"), arrowPointAtCenter)); // ========================= Change ========================= | ||
var onInternalChange = function onInternalChange(nextCurrent) { | ||
setMergedCurrent(nextCurrent); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(nextCurrent); | ||
}; // ========================= Render ========================= | ||
}; // ========================= popupAlign ========================= | ||
var popupAlign = targetElement ? arrowPointAtCenter ? (0, _placements.getCenterPlacements)({ | ||
placement: placement | ||
}) : _placements.default[mergedPlacement] : CENTER_ALIGN; // ========================= Render ========================= | ||
// Skip if not init yet | ||
if (targetElement === undefined) { | ||
@@ -123,3 +125,5 @@ return null; | ||
var getPopupElement = function getPopupElement() { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, mergedArrow && /*#__PURE__*/React.createElement("div", { | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: "".concat(prefixCls, "-content") | ||
}, mergedArrow && /*#__PURE__*/React.createElement("div", { | ||
className: arrowClassName, | ||
@@ -126,0 +130,0 @@ key: "arrow" |
{ | ||
"name": "@rc-component/tour", | ||
"version": "1.0.0-6", | ||
"version": "1.0.0-7", | ||
"description": "React tour Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61529
1387