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.
@@ -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));
@@ -269,13 +269,6 @@
269
269
  top: auto;
270
270
  bottom: 31px;
271
271
  }
272
-
273
- &--top-left {
274
- left: auto;
275
- top: auto;
276
- bottom: 31px;
277
- right: 0;
278
- }
279
272
  }
280
273
 
281
274
  .date-picker {
@@ -88,7 +88,8 @@ InputDateRangeTemplate.args = {
88
88
  isCompareHidden: true,
89
89
  hideArrows: false,
90
90
  isOptionsRight: false,
91
- isShortWeekNames: false // limitRange,
91
+ isShortWeekNames: false,
92
+ isListTop: false // limitRange,
92
93
  // isUseAbs,
93
94
  // absTooltip
94
95
 
@@ -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
  });
@@ -72,5 +72,3 @@
72
72
  color: #777;
73
73
  }
74
74
  }
75
-
76
- .mr-half {}
@@ -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 && elemBottomPosition < screenHeight) {
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "fixes",
5
5
  "main": "dist/index.js",
6
6
  "files": ["dist/*", "node_modules/anme/*", "node_modules/moment/*", "node_modules/moment-timezone/*"],