intelicoreact 0.2.22 → 0.2.23

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.
@@ -238,6 +238,9 @@ var Dropdown = function Dropdown(_ref) {
238
238
  className: "".concat(RC, "__trigger input__wrap ").concat(isOpen ? 'input__wrap--focus' : '', " ").concat(!value ? 'placeholder' : '', " ").concat(error ? 'error' : ''),
239
239
  onClick: function onClick() {
240
240
  return !isSearchable ? setIsOpen(!isOpen) : null;
241
+ },
242
+ onFocus: function onFocus() {
243
+ return !isSearchable ? setIsOpen(true) : null;
241
244
  }
242
245
  }, isSearchable ? /*#__PURE__*/_react.default.createElement("input", {
243
246
  className: "".concat(RC, "__input"),
@@ -28,7 +28,9 @@ var classNames = require('classnames');
28
28
  var AdvTag = function AdvTag(_ref) {
29
29
  var item = _ref.item,
30
30
  className = _ref.className,
31
- testId = _ref.testId;
31
+ testId = _ref.testId,
32
+ _ref$toTop = _ref.toTop,
33
+ toTop = _ref$toTop === void 0 ? true : _ref$toTop;
32
34
  if (!item) return null;
33
35
  var labelLeft = item.labelLeft,
34
36
  labelRight = item.labelRight,
@@ -128,9 +130,13 @@ var AdvTag = function AdvTag(_ref) {
128
130
  height: 16,
129
131
  className: "advanced-tags--warning-icon"
130
132
  })), isOpen && warnLeftMsg && clickedWarning === 'warnLeft' ? /*#__PURE__*/_react.default.createElement("span", {
131
- className: (0, _classnames.default)('advanced-tags__warn-text', 'advanced-tags__warn-text--warnLeft')
133
+ className: (0, _classnames.default)('advanced-tags__warn-text advanced-tags__warn-text--warnLeft', {
134
+ 'advanced-tags__warn-text--warnLeft--to-top': toTop
135
+ })
132
136
  }, warnLeftMsg) : null, isOpen && warnRightMsg && clickedWarning === 'warnRight' ? /*#__PURE__*/_react.default.createElement("span", {
133
- className: (0, _classnames.default)('advanced-tags__warn-text', 'advanced-tags__warn-text--warnRight')
137
+ className: (0, _classnames.default)('advanced-tags__warn-text', 'advanced-tags__warn-text--warnRight', {
138
+ 'advanced-tags__warn-text--warnRight--to-top': toTop
139
+ })
134
140
  }, warnRightMsg) : null);
135
141
  };
136
142
 
@@ -25,7 +25,9 @@ var AdvancedTags = function AdvancedTags(_ref) {
25
25
  var items = _ref.items,
26
26
  className = _ref.className,
27
27
  _ref$testId = _ref.testId,
28
- testId = _ref$testId === void 0 ? 'advanced-tag-test' : _ref$testId;
28
+ testId = _ref$testId === void 0 ? 'advanced-tag-test' : _ref$testId,
29
+ _ref$toTop = _ref.toTop,
30
+ toTop = _ref$toTop === void 0 ? true : _ref$toTop;
29
31
  if (!items) return null;
30
32
 
31
33
  var _useState = (0, _react.useState)([items[0], items[1]]),
@@ -48,6 +50,7 @@ var AdvancedTags = function AdvancedTags(_ref) {
48
50
  className: (0, _classnames.default)(className, 'j4 wrap')
49
51
  }, showedItems === null || showedItems === void 0 ? void 0 : showedItems.map(function (item, index) {
50
52
  return /*#__PURE__*/_react.default.createElement(_AdvTag.default, {
53
+ toTop: toTop,
51
54
  key: index,
52
55
  item: item,
53
56
  testId: "".concat(testId, "-item-").concat(index)
@@ -16,6 +16,8 @@
16
16
  background-color: #fce2e8;
17
17
  }
18
18
 
19
+
20
+
19
21
  &--warning-icon {
20
22
  min-height: 16px;
21
23
  min-width: 16px;
@@ -30,7 +32,7 @@
30
32
  font-size: 10px;
31
33
  line-height: 16px;
32
34
  border-radius: 4px;
33
- max-width: 250px;
35
+ max-width: 270px;
34
36
  min-width: 80px;
35
37
  padding: 8px;
36
38
  z-index: 2;
@@ -52,16 +54,22 @@
52
54
  left: 8px;
53
55
  top: -4px;
54
56
  }
57
+ &--to-top {
58
+ top: -50px;
59
+ }
55
60
  }
56
61
 
57
62
  &--warnRight {
58
63
  top: 30px;
59
-
60
64
  &:before {
61
65
  right: 10px;
62
66
  top: -4px;
63
67
  }
68
+ &--to-top {
69
+ top: -50px;
70
+ }
64
71
  }
72
+
65
73
  }
66
74
 
67
75
  &--showMore {
@@ -69,4 +77,6 @@
69
77
  cursor: pointer;
70
78
  user-select: none;
71
79
  }
80
+
81
+
72
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [