ui-kit-ck-consultant 0.5.154 → 0.5.158

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.
package/dist/index.css CHANGED
@@ -475,7 +475,7 @@
475
475
 
476
476
  ._1CXiT {
477
477
  margin-top: 4px;
478
- display: block;
478
+ display: block !important;
479
479
  width: 100%;
480
480
  text-align: right;
481
481
  margin-bottom: 0;
@@ -525,6 +525,7 @@
525
525
  cursor: not-allowed;
526
526
  background-color: #f5f5f5;
527
527
  }
528
+
528
529
  ._3_HMn > span {
529
530
  display: inline-block;
530
531
  font-size: 14px;
@@ -555,7 +556,7 @@
555
556
 
556
557
  ._dlP2Z {
557
558
  margin-top: 4px;
558
- display: block;
559
+ display: block !important;
559
560
  width: 100%;
560
561
  text-align: right;
561
562
  margin-bottom: 0;
@@ -571,6 +572,7 @@
571
572
  cursor: not-allowed;
572
573
  background-color: #f5f5f5;
573
574
  }
575
+
574
576
  ._FJ62d {
575
577
  position: relative;
576
578
  }
@@ -680,7 +682,7 @@
680
682
 
681
683
  ._1T4KB {
682
684
  margin-top: 4px;
683
- display: block;
685
+ display: block !important;
684
686
  width: 100%;
685
687
  text-align: right;
686
688
  margin-bottom: 0;
@@ -2886,6 +2888,7 @@
2886
2888
  -moz-user-select: none;
2887
2889
  -ms-user-select: none;
2888
2890
  user-select: none;
2891
+ margin-right: auto;
2889
2892
  }
2890
2893
 
2891
2894
  ._zCJtD > div {
package/dist/index.js CHANGED
@@ -342,7 +342,7 @@ var FormTextarea = /*#__PURE__*/function (_React$Component) {
342
342
  }, this.props.title ? /*#__PURE__*/React__default.createElement("span", null, this.props.title, ' ', this.props.required ? /*#__PURE__*/React__default.createElement("span", {
343
343
  className: "red"
344
344
  }, "*") : '') : '', /*#__PURE__*/React__default.createElement("textarea", {
345
- onKeyDown: this.handleKeyDown,
345
+ onKeyDown: !this.props.noResize ? this.handleKeyDown : null,
346
346
  onBlur: this.props.onBlur,
347
347
  rows: this.props.rows,
348
348
  cols: this.props.cols,
@@ -3851,6 +3851,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3851
3851
 
3852
3852
  _this = _React$Component.call(this, props) || this;
3853
3853
  _this.state = {
3854
+ isActive: false,
3854
3855
  position: 0
3855
3856
  };
3856
3857
  return _this;
@@ -3859,11 +3860,19 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3859
3860
  var _proto = Gauge.prototype;
3860
3861
 
3861
3862
  _proto.componentDidMount = function componentDidMount() {
3863
+ var _this2 = this;
3864
+
3862
3865
  if (this.props.position) {
3863
3866
  this.setState({
3864
3867
  position: this.props.position
3865
3868
  });
3866
3869
  }
3870
+
3871
+ window.addEventListener('mouseup', function () {
3872
+ _this2.setState({
3873
+ isActive: false
3874
+ });
3875
+ }, true);
3867
3876
  };
3868
3877
 
3869
3878
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -3875,7 +3884,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3875
3884
  };
3876
3885
 
3877
3886
  _proto.render = function render() {
3878
- var _this2 = this;
3887
+ var _this3 = this;
3879
3888
 
3880
3889
  return /*#__PURE__*/React__default.createElement("div", {
3881
3890
  className: this.props.className
@@ -3895,17 +3904,24 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3895
3904
  backgroundImage: this.props.colors.length === 3 ? "linear-gradient(to right, " + this.props.colors[0] + " 0%, " + this.props.colors[1] + " 50%, " + this.props.colors[2] + " 100%)" : "linear-gradient(to right, " + this.props.colors[0] + ", " + this.props.colors[1] + ")",
3896
3905
  borderRadius: '8px'
3897
3906
  },
3898
- onClick: function onClick(e) {
3899
- var currentTargetRect = e.currentTarget.getBoundingClientRect();
3900
- var width = currentTargetRect.width;
3901
- var positionX = e.pageX - currentTargetRect.left;
3902
- var step = _this2.props.step ? _this2.props.step : 1;
3903
- var position = positionX * 100 / width - positionX * 100 / width % step;
3904
-
3905
- _this2.setState({
3906
- position: position
3907
- }, function () {
3908
- return _this2.props.onChange ? _this2.props.onChange(position) : null;
3907
+ onMouseMove: function onMouseMove(e) {
3908
+ if (_this3.state.isActive) {
3909
+ var currentTargetRect = e.currentTarget.getBoundingClientRect();
3910
+ var width = currentTargetRect.width;
3911
+ var positionX = e.pageX - currentTargetRect.left;
3912
+ var step = _this3.props.step ? _this3.props.step : 1;
3913
+ var position = positionX * 100 / width - positionX * 100 / width % step;
3914
+
3915
+ _this3.setState({
3916
+ position: position
3917
+ }, function () {
3918
+ return _this3.props.onChange ? _this3.props.onChange(position) : null;
3919
+ });
3920
+ }
3921
+ },
3922
+ onMouseDown: function onMouseDown() {
3923
+ _this3.setState({
3924
+ isActive: true
3909
3925
  });
3910
3926
  }
3911
3927
  }, this.props.min ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("span", {