intelicoreact 1.3.3 → 1.3.5

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.
@@ -400,6 +400,10 @@ var Dropdown = function Dropdown(_ref) {
400
400
  return document.getElementById(dropdownId);
401
401
  };
402
402
 
403
+ var getListContainerWrapper = function getListContainerWrapper() {
404
+ return document.getElementById("mlw-".concat(dropdownId));
405
+ };
406
+
403
407
  var setListContainerStyles = function setListContainerStyles() {
404
408
  var _dropdownRef$current$, _dropdownListWrapperR, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$mar2, _getComputedStyle$max, _getComputedStyle2, _getComputedStyle2$ma, _sw$getBoundingClient, _dropdownListWrapperR2, _dropdownListWrapperR3, _lh$getBoundingClient;
405
409
 
@@ -671,9 +675,10 @@ var Dropdown = function Dropdown(_ref) {
671
675
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
672
676
  (0, _react.useEffect)(function () {
673
677
  return function () {
674
- var _getListContainer7;
678
+ var _getListContainer7, _getListContainerWrap;
675
679
 
676
680
  (_getListContainer7 = getListContainer()) === null || _getListContainer7 === void 0 ? void 0 : _getListContainer7.remove();
681
+ (_getListContainerWrap = getListContainerWrapper()) === null || _getListContainerWrap === void 0 ? void 0 : _getListContainerWrap.remove();
677
682
  };
678
683
  }, []);
679
684
  var postfixText = selectedLabel && ((_filteredOptions$find = filteredOptions.find(function (option) {
@@ -340,6 +340,10 @@ var TagsDropdown = function TagsDropdown(_ref) {
340
340
  return document.getElementById(dropdownId);
341
341
  };
342
342
 
343
+ var getListContainerWrapper = function getListContainerWrapper() {
344
+ return document.getElementById("mlw-".concat(dropdownId));
345
+ };
346
+
343
347
  var setListContainerStyles = function setListContainerStyles() {
344
348
  var _dropdownRef$current$, _dropdownRef$current, _getComputedStyle$mar, _getComputedStyle, _getComputedStyle$mar2, _getComputedStyle$max, _getComputedStyle2, _getComputedStyle2$ma, _dl$getBoundingClient, _sw$getBoundingClient, _sw$getBoundingClient2, _lh$getBoundingClient, _lf$getBoundingClient;
345
349
 
@@ -598,9 +602,10 @@ var TagsDropdown = function TagsDropdown(_ref) {
598
602
  }, [scrollTop, dropdownListRef === null || dropdownListRef === void 0 ? void 0 : dropdownListRef.current]);
599
603
  (0, _react.useEffect)(function () {
600
604
  return function () {
601
- var _getListContainer4;
605
+ var _getListContainer4, _getListContainerWrap;
602
606
 
603
607
  (_getListContainer4 = getListContainer()) === null || _getListContainer4 === void 0 ? void 0 : _getListContainer4.remove();
608
+ (_getListContainerWrap = getListContainerWrapper()) === null || _getListContainerWrap === void 0 ? void 0 : _getListContainerWrap.remove();
604
609
  };
605
610
  }, []);
606
611
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -152,6 +152,7 @@ var Modal = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
152
152
  },
153
153
  className: (0, _classnames.default)(className, {
154
154
  modal: isOpen,
155
+ 'modal--no-header': isOpen && noHeader,
155
156
  'modal-mobile': isOpen && isMobile,
156
157
  hidden: !isOpen
157
158
  })
@@ -46,7 +46,6 @@
46
46
  top: 0;
47
47
  }
48
48
 
49
- &__body,
50
49
  &__footer {
51
50
  border-radius: 0!important;
52
51
  }
@@ -55,5 +54,9 @@
55
54
  bottom: 0;
56
55
  }
57
56
  }
57
+
58
+ .modal:not(.modal--no-header) .modal__body {
59
+ border-radius: 0!important;
60
+ }
58
61
  }
59
62
  }
@@ -429,6 +429,16 @@ var InputAddress = function InputAddress(_ref) {
429
429
  }, getListItemLabel(item));
430
430
  };
431
431
 
432
+ var renderListItemCustom = function renderListItemCustom() {
433
+ return /*#__PURE__*/_react.default.createElement("div", {
434
+ key: "input-address__list-item--custom",
435
+ className: (0, _classnames.default)('input-address__list--item', 'input-address__list--item-custom'),
436
+ onMouseDown: function onMouseDown(e) {
437
+ return setQueryAsItem(e, getSelectedItemLabel());
438
+ }
439
+ }, getSelectedItemLabel(), /*#__PURE__*/_react.default.createElement(_reactFeather.AlertTriangle, null), /*#__PURE__*/_react.default.createElement("span", null, "Choose this only if your address is not listed below"));
440
+ };
441
+
432
442
  var renderNoItems = function renderNoItems() {
433
443
  return /*#__PURE__*/_react.default.createElement("div", {
434
444
  className: "input-address__list--no-items"
@@ -476,7 +486,7 @@ var InputAddress = function InputAddress(_ref) {
476
486
  }, renderSearchableInput())), /*#__PURE__*/_react.default.createElement("div", {
477
487
  className: "input-address__list",
478
488
  ref: listRef
479
- }, isLoading ? renderLoader() : listItems !== null && listItems !== void 0 && listItems.length ? listItems === null || listItems === void 0 ? void 0 : listItems.map(renderListItem) : renderNoItems())));
489
+ }, isLoading ? renderLoader() : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, getSelectedItemLabel() && renderListItemCustom(), listItems === null || listItems === void 0 ? void 0 : listItems.map(renderListItem), !(listItems !== null && listItems !== void 0 && listItems.length) && !getSelectedItemLabel() && renderNoItems()))));
480
490
  };
481
491
 
482
492
  return isMobile ? renderListMobile() : renderListDesktop();
@@ -135,6 +135,42 @@
135
135
  &:focus {
136
136
  background: #F0F1F4;
137
137
  }
138
+
139
+ &-custom {
140
+ padding-right: 32px;
141
+ flex-direction: column;
142
+ align-items: flex-start;
143
+ gap: 4px;
144
+ border-bottom: 1px solid rgba(58, 72, 122, 0.15);
145
+ border-radius: 0;
146
+
147
+ font-family: Sarabun;
148
+ font-size: 14px;
149
+ font-style: normal;
150
+ font-weight: 400;
151
+ line-height: 20px;
152
+ letter-spacing: 0.2px;
153
+
154
+ svg {
155
+ position: absolute;
156
+ width: 16px;
157
+ height: 16px;
158
+ color: #A0A4B0;
159
+ right: 8px;
160
+ top: 50%;
161
+ transform: translateY(-50%);
162
+ }
163
+
164
+ span {
165
+ color: #757F8C;
166
+ font-family: Sarabun;
167
+ font-size: 12px;
168
+ font-style: normal;
169
+ font-weight: 400;
170
+ line-height: 18px;
171
+ letter-spacing: 0.2px;
172
+ }
173
+ }
138
174
  }
139
175
 
140
176
  &--with-bottom-shadow::after {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [