ui-kit-ck-consultant 0.5.300 → 0.5.302

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -709,19 +709,39 @@ var FormSelectMultiples = /*#__PURE__*/function (_React$Component) {
709
709
  }
710
710
  };
711
711
 
712
+ _this.detectClickOutside = function () {
713
+ window.addEventListener('mousedown', function (event) {
714
+ if (!_this.containerRef.current.contains(event.target)) {
715
+ _this.setState({
716
+ isDisplay: false
717
+ });
718
+ }
719
+ });
720
+ };
721
+
712
722
  _this.state = {
713
723
  isDisplay: false
714
724
  };
725
+ _this.containerRef = React__default.createRef();
715
726
  _this.inputRef = React__default.createRef();
716
727
  return _this;
717
728
  }
718
729
 
719
730
  var _proto = FormSelectMultiples.prototype;
720
731
 
732
+ _proto.componentDidMount = function componentDidMount() {
733
+ document.addEventListener('mousedown', this.detectClickOutside);
734
+ };
735
+
736
+ _proto.componentWillUnmount = function componentWillUnmount() {
737
+ window.removeEventListener('mousedown', this.detectClickOutside);
738
+ };
739
+
721
740
  _proto.render = function render() {
722
741
  var _this2 = this;
723
742
 
724
743
  return /*#__PURE__*/React__default.createElement("div", {
744
+ ref: this.containerRef,
725
745
  className: classNames$1(style$6.form_select_multiples_container, this.props.className)
726
746
  }, this.props.title ? /*#__PURE__*/React__default.createElement("span", {
727
747
  className: this.props.classNameTitle
@@ -1240,11 +1260,15 @@ var Card = /*#__PURE__*/function (_React$Component) {
1240
1260
  flexShrink: 0
1241
1261
  }
1242
1262
  }, /*#__PURE__*/React__default.createElement("img", {
1243
- style: {
1244
- position: 'absolute',
1245
- left: 0,
1263
+ style: _extends({
1264
+ position: 'absolute'
1265
+ }, this.props.forceRight ? {
1266
+ right: 0
1267
+ } : {
1268
+ left: 0
1269
+ }, {
1246
1270
  height: '100%'
1247
- },
1271
+ }),
1248
1272
  src: this.props.imgRight,
1249
1273
  alt: "right"
1250
1274
  })) : null);