intelicoreact 1.1.30 → 1.1.31

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.
@@ -44,7 +44,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
44
44
  var RC = 'dropdown';
45
45
 
46
46
  var Dropdown = function Dropdown(_ref) {
47
- var _options$find, _filteredOptions$find;
47
+ var _options$find, _window, _filteredOptions$find;
48
48
 
49
49
  var _ref$options = _ref.options,
50
50
  options = _ref$options === void 0 ? [] : _ref$options,
@@ -184,7 +184,7 @@ var Dropdown = function Dropdown(_ref) {
184
184
  var handleClickOutside = function handleClickOutside(event) {
185
185
  var _getListContainer;
186
186
 
187
- if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(event.target))) {
187
+ if (!((_getListContainer = getListContainer()) !== null && _getListContainer !== void 0 && _getListContainer.contains(event === null || event === void 0 ? void 0 : event.target))) {
188
188
  setIsOpen(false);
189
189
  }
190
190
  };
@@ -403,10 +403,12 @@ var Dropdown = function Dropdown(_ref) {
403
403
  (0, _react.useLayoutEffect)(function () {
404
404
  window.addEventListener('resize', setListContainerStyles);
405
405
  window.addEventListener('mousewheel', closeList);
406
+ window.addEventListener('scroll', closeList);
406
407
  window.addEventListener('touchmove', closeList);
407
408
  return function () {
408
409
  window.removeEventListener('resize', setListContainerStyles);
409
410
  window.removeEventListener('mousewheel', closeList);
411
+ window.removeEventListener('scroll', closeList);
410
412
  window.removeEventListener('touchmove', closeList);
411
413
  };
412
414
  }, [getListContainer]);
@@ -433,6 +435,9 @@ var Dropdown = function Dropdown(_ref) {
433
435
  if (scrollReactionObj && (0, _typeof2.default)(scrollReactionObj) === 'object') removeEventListener('scroll', doScrollCallback);
434
436
  };
435
437
  }, [isOpen, dropdownListRef]);
438
+ (0, _react.useEffect)(function () {
439
+ closeList();
440
+ }, [(_window = window) === null || _window === void 0 ? void 0 : _window.scrollY]);
436
441
 
437
442
  var onKeyDown = function onKeyDown(e) {
438
443
  if (![9, 13].includes(e.keyCode)) return false;
@@ -42,6 +42,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
42
42
  var RC = 'input-with-action';
43
43
 
44
44
  var InputWithAction = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
45
+ var _cn2;
46
+
45
47
  var className = props.className,
46
48
  inputClassName = props.inputClassName,
47
49
  _props$isHideAction = props.isHideAction,
@@ -113,19 +115,19 @@ var InputWithAction = /*#__PURE__*/_react.default.forwardRef(function (props, re
113
115
  return /*#__PURE__*/_react.default.createElement("div", {
114
116
  className: (0, _classnames.default)(RC, className, (0, _defineProperty2.default)({}, "".concat(RC, "_disabled"), disabled))
115
117
  }, /*#__PURE__*/_react.default.createElement("div", {
116
- className: (0, _classnames.default)("".concat(RC, "__input-zone"), (0, _defineProperty2.default)({}, "".concat(RC, "__input-zone_disabled"), isInputZoneDisabled))
118
+ className: (0, _classnames.default)("".concat(RC, "__input-zone"), (_cn2 = {}, (0, _defineProperty2.default)(_cn2, "".concat(RC, "__input-zone_disabled"), isInputZoneDisabled), (0, _defineProperty2.default)(_cn2, "".concat(RC, "__input-zone_input-disabled"), isInputDisabled), _cn2))
117
119
  }, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, inputProps, {
118
120
  ref: ref,
119
121
  value: value,
120
122
  disabled: isInputDisabled,
121
123
  onChange: onChange,
122
124
  className: (0, _classnames.default)("".concat(RC, "__input"), inputClassName)
123
- })), !isHideAction && actionContent, !isHideAction && !actionContent && /*#__PURE__*/_react.default.createElement("span", {
125
+ })), !isHideAction && actionContent, !isHideAction && !actionContent && /*#__PURE__*/_react.default.createElement("div", {
124
126
  className: (0, _classnames.default)("".concat(RC, "__action-container")),
125
127
  onClick: function onClick() {
126
128
  return handle.doAction();
127
129
  }
128
- }, actionLabel), isLocalLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
130
+ }, /*#__PURE__*/_react.default.createElement("span", null, actionLabel)), isLocalLoading && /*#__PURE__*/_react.default.createElement(_Spinner.default, {
129
131
  size: "small"
130
132
  })), isWithCopy && /*#__PURE__*/_react.default.createElement(_Button.default, {
131
133
  className: "".concat(RC, "__coppy-button"),
@@ -5,7 +5,7 @@
5
5
  display: flex;
6
6
  flex-flow: row nowrap;
7
7
  justify-content: flex-start;
8
- align-items: center;
8
+ align-items: stretch;
9
9
 
10
10
  &__input-zone {
11
11
  flex-grow: 1;
@@ -22,9 +22,21 @@
22
22
  }
23
23
 
24
24
  &__action-container {
25
+ height: 100%;
25
26
  margin-left: 8px;
26
- cursor: pointer;
27
- user-select: none
27
+
28
+ display: flex;
29
+ flex-flow: row nowrap;
30
+ justify-content: center;
31
+ align-items: center;
32
+
33
+ background-color: transparent;
34
+
35
+ &>span {
36
+ background-color: transparent;
37
+ cursor: pointer;
38
+ user-select: none
39
+ }
28
40
  }
29
41
 
30
42
  &__coppy-button {
@@ -32,10 +44,38 @@
32
44
  user-select: none
33
45
  }
34
46
 
35
- &_disabled,
47
+ &_disabled {
48
+ opacity: 0.5;
49
+ pointer-events: none;
50
+
51
+ .input-with-action__input-zone {
52
+ background-color: #F7F8FA;
53
+ }
54
+
55
+ .input__wrap {
56
+ background-color: #F7F8FA;
57
+ }
58
+ }
59
+
36
60
  &__input-zone_disabled {
37
61
  opacity: 0.5;
38
62
  pointer-events: none;
63
+ background-color: #F7F8FA;
64
+
65
+ .input__wrap {
66
+ background-color: #F7F8FA;
67
+ }
68
+ }
69
+
70
+ &__input-zone_input-disabled {
71
+ background-color: #F7F8FA;
72
+
73
+ .input-with-action__action-container {
74
+ background-color: rgba(#F7F8FA, 0.5);
75
+ }
76
+ .input__wrap {
77
+ background-color: #F7F8FA;
78
+ }
39
79
  }
40
80
 
41
81
  .input__wrap {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.1.30",
3
+ "version": "1.1.31",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [