ui-kit-ck-consultant 0.5.301 → 0.5.303

Sign up to get free protection for your applications and to get access to all the features.
@@ -706,19 +706,37 @@ var FormSelectMultiples = /*#__PURE__*/function (_React$Component) {
706
706
  }
707
707
  };
708
708
 
709
+ _this.detectClickOutside = function (event) {
710
+ if (!_this.containerRef.current.contains(event.target)) {
711
+ _this.setState({
712
+ isDisplay: false
713
+ });
714
+ }
715
+ };
716
+
709
717
  _this.state = {
710
718
  isDisplay: false
711
719
  };
720
+ _this.containerRef = React.createRef();
712
721
  _this.inputRef = React.createRef();
713
722
  return _this;
714
723
  }
715
724
 
716
725
  var _proto = FormSelectMultiples.prototype;
717
726
 
727
+ _proto.componentDidMount = function componentDidMount() {
728
+ document.addEventListener('mousedown', this.detectClickOutside);
729
+ };
730
+
731
+ _proto.componentWillUnmount = function componentWillUnmount() {
732
+ window.removeEventListener('mousedown', this.detectClickOutside);
733
+ };
734
+
718
735
  _proto.render = function render() {
719
736
  var _this2 = this;
720
737
 
721
738
  return /*#__PURE__*/React.createElement("div", {
739
+ ref: this.containerRef,
722
740
  className: classNames$1(style$6.form_select_multiples_container, this.props.className)
723
741
  }, this.props.title ? /*#__PURE__*/React.createElement("span", {
724
742
  className: this.props.classNameTitle
@@ -2081,6 +2099,9 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
2081
2099
  onClick: function onClick() {
2082
2100
  return _this3.handleDropdownClick(idx);
2083
2101
  },
2102
+ style: element.isRed ? {
2103
+ color: 'var(--red)'
2104
+ } : {},
2084
2105
  className: classNames$1(style$j.sidebar_button_dropdown, (_classNames4 = {}, _classNames4[style$j.active] = !!element.active, _classNames4[style$j.disabled] = !!element.disabled, _classNames4))
2085
2106
  }, element.icon, /*#__PURE__*/React.createElement("span", null, element.name), element.active === true ? /*#__PURE__*/React.createElement(FontAwesomeIcon, {
2086
2107
  icon: faCaretDown