intelicoreact 0.1.27 → 0.1.28
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/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +4 -2
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +0 -7
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +2 -1
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +5 -2
- package/dist/Atomic/UI/Status/Status.scss +0 -2
- package/dist/Functions/utils.js +1 -7
- package/package.json +1 -1
|
@@ -62,7 +62,8 @@ var InputDateRange = function InputDateRange(props) {
|
|
|
62
62
|
maxDate = _props$maxDate === void 0 ? null : _props$maxDate,
|
|
63
63
|
_props$format = props.format,
|
|
64
64
|
format = _props$format === void 0 ? 'MM/DD/YYYY' : _props$format,
|
|
65
|
-
isDontLimitFuture = props.isDontLimitFuture
|
|
65
|
+
isDontLimitFuture = props.isDontLimitFuture,
|
|
66
|
+
isListTop = props.isListTop;
|
|
66
67
|
var formatedMinDate = (0, _momentTimezone.default)(minDate).format(format) !== 'Invalid date' ? (0, _momentTimezone.default)(minDate).format(format) : null;
|
|
67
68
|
var formatedMaxDate = (0, _momentTimezone.default)(maxDate).format(format) !== 'Invalid date' ? (0, _momentTimezone.default)(maxDate).format(format) : null;
|
|
68
69
|
var momentMinDate = (0, _momentTimezone.default)(formatedMinDate, format).startOf('day');
|
|
@@ -240,7 +241,8 @@ var InputDateRange = function InputDateRange(props) {
|
|
|
240
241
|
format: format,
|
|
241
242
|
momentMinDate: momentMinDate,
|
|
242
243
|
momentMaxDate: momentMaxDate,
|
|
243
|
-
isDontLimitFuture: isDontLimitFuture
|
|
244
|
+
isDontLimitFuture: isDontLimitFuture,
|
|
245
|
+
isListTop: isListTop
|
|
244
246
|
})))), error && /*#__PURE__*/_react.default.createElement("span", {
|
|
245
247
|
className: "date-range-input__error-block"
|
|
246
248
|
}, error));
|
|
@@ -66,7 +66,8 @@ var OpenedPart = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
66
66
|
format = props.format,
|
|
67
67
|
momentMinDate = props.momentMinDate,
|
|
68
68
|
momentMaxDate = props.momentMaxDate,
|
|
69
|
-
isDontLimitFuture = props.isDontLimitFuture
|
|
69
|
+
isDontLimitFuture = props.isDontLimitFuture,
|
|
70
|
+
isListTop = props.isListTop;
|
|
70
71
|
|
|
71
72
|
var boxRef = (0, _react.useRef)();
|
|
72
73
|
|
|
@@ -75,7 +76,9 @@ var OpenedPart = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
75
76
|
elemPosition = _useState2[0],
|
|
76
77
|
setElemPosition = _useState2[1];
|
|
77
78
|
|
|
78
|
-
var openedPartClass = classNames('date-range-input__opened-part', 'opened-part', (0, _defineProperty2.default)({}, "opened-part--".concat(elemPosition), elemPosition)
|
|
79
|
+
var openedPartClass = classNames('date-range-input__opened-part', 'opened-part', (0, _defineProperty2.default)({}, "opened-part--".concat(elemPosition), elemPosition), {
|
|
80
|
+
'opened-part--top': isListTop
|
|
81
|
+
});
|
|
79
82
|
var openedPartWrapperClass = classNames('opened-part__wrapper', {
|
|
80
83
|
'opened-part__wrapper_right-position-once-element': isOptionsRight && (isCompact || isIntervalsHidden)
|
|
81
84
|
});
|
package/dist/Functions/utils.js
CHANGED
|
@@ -67,16 +67,10 @@ exports.getStyles = getStyles;
|
|
|
67
67
|
|
|
68
68
|
var defineBoxPositionByScreen = function defineBoxPositionByScreen(ref) {
|
|
69
69
|
var elemRightPosition = ref.current.getBoundingClientRect().right;
|
|
70
|
-
var elemBottomPosition = ref.current.getBoundingClientRect().bottom;
|
|
71
70
|
var screenWidth = document.documentElement.clientWidth;
|
|
72
|
-
var screenHeight = document.documentElement.clientHeight;
|
|
73
71
|
|
|
74
|
-
if (elemRightPosition > screenWidth
|
|
72
|
+
if (elemRightPosition > screenWidth) {
|
|
75
73
|
return 'left';
|
|
76
|
-
} else if (elemBottomPosition > screenHeight && elemRightPosition < screenWidth) {
|
|
77
|
-
return 'top';
|
|
78
|
-
} else if (elemRightPosition > screenWidth && elemBottomPosition > screenHeight) {
|
|
79
|
-
return 'top-left';
|
|
80
74
|
}
|
|
81
75
|
};
|
|
82
76
|
|