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.
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -709,19 +709,37 @@ var FormSelectMultiples = /*#__PURE__*/function (_React$Component) {
|
|
709
709
|
}
|
710
710
|
};
|
711
711
|
|
712
|
+
_this.detectClickOutside = function (event) {
|
713
|
+
if (!_this.containerRef.current.contains(event.target)) {
|
714
|
+
_this.setState({
|
715
|
+
isDisplay: false
|
716
|
+
});
|
717
|
+
}
|
718
|
+
};
|
719
|
+
|
712
720
|
_this.state = {
|
713
721
|
isDisplay: false
|
714
722
|
};
|
723
|
+
_this.containerRef = React__default.createRef();
|
715
724
|
_this.inputRef = React__default.createRef();
|
716
725
|
return _this;
|
717
726
|
}
|
718
727
|
|
719
728
|
var _proto = FormSelectMultiples.prototype;
|
720
729
|
|
730
|
+
_proto.componentDidMount = function componentDidMount() {
|
731
|
+
document.addEventListener('mousedown', this.detectClickOutside);
|
732
|
+
};
|
733
|
+
|
734
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
735
|
+
window.removeEventListener('mousedown', this.detectClickOutside);
|
736
|
+
};
|
737
|
+
|
721
738
|
_proto.render = function render() {
|
722
739
|
var _this2 = this;
|
723
740
|
|
724
741
|
return /*#__PURE__*/React__default.createElement("div", {
|
742
|
+
ref: this.containerRef,
|
725
743
|
className: classNames$1(style$6.form_select_multiples_container, this.props.className)
|
726
744
|
}, this.props.title ? /*#__PURE__*/React__default.createElement("span", {
|
727
745
|
className: this.props.classNameTitle
|
@@ -2084,6 +2102,9 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
2084
2102
|
onClick: function onClick() {
|
2085
2103
|
return _this3.handleDropdownClick(idx);
|
2086
2104
|
},
|
2105
|
+
style: element.isRed ? {
|
2106
|
+
color: 'var(--red)'
|
2107
|
+
} : {},
|
2087
2108
|
className: classNames$1(style$j.sidebar_button_dropdown, (_classNames4 = {}, _classNames4[style$j.active] = !!element.active, _classNames4[style$j.disabled] = !!element.disabled, _classNames4))
|
2088
2109
|
}, element.icon, /*#__PURE__*/React__default.createElement("span", null, element.name), element.active === true ? /*#__PURE__*/React__default.createElement(reactFontawesome.FontAwesomeIcon, {
|
2089
2110
|
icon: freeSolidSvgIcons.faCaretDown
|