ui-kit-ck-consultant 0.5.151 → 0.5.155

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.
@@ -3785,6 +3785,22 @@ var Switch = /*#__PURE__*/function (_React$Component) {
3785
3785
 
3786
3786
  var _proto = Switch.prototype;
3787
3787
 
3788
+ _proto.componentDidMount = function componentDidMount() {
3789
+ if (this.props.idxActive !== undefined) {
3790
+ this.setState({
3791
+ idxActive: this.props.idxActive
3792
+ });
3793
+ }
3794
+ };
3795
+
3796
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
3797
+ if (prevProps.idxActive !== undefined && prevProps.idxActive !== this.props.idxActive && this.props.idxActive !== this.state.prevProps) {
3798
+ this.setState({
3799
+ idxActive: this.props.idxActive
3800
+ });
3801
+ }
3802
+ };
3803
+
3788
3804
  _proto.render = function render() {
3789
3805
  var _this2 = this;
3790
3806
 
@@ -3880,11 +3896,13 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3880
3896
  var currentTargetRect = e.currentTarget.getBoundingClientRect();
3881
3897
  var width = currentTargetRect.width;
3882
3898
  var positionX = e.pageX - currentTargetRect.left;
3899
+ var step = _this2.props.step ? _this2.props.step : 1;
3900
+ var position = positionX * 100 / width - positionX * 100 / width % step;
3883
3901
 
3884
3902
  _this2.setState({
3885
- position: positionX * 100 / width
3903
+ position: position
3886
3904
  }, function () {
3887
- return _this2.props.onChange ? _this2.props.onChange(_this2.state.position) : null;
3905
+ return _this2.props.onChange ? _this2.props.onChange(position) : null;
3888
3906
  });
3889
3907
  }
3890
3908
  }, this.props.min ? /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("span", {
@@ -3927,7 +3945,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3927
3945
  left: this.props.max + '%',
3928
3946
  transform: 'translateX(-50%)'
3929
3947
  }
3930
- })) : null, /*#__PURE__*/React.createElement("span", {
3948
+ })) : null, this.props.noText ? null : /*#__PURE__*/React.createElement("span", {
3931
3949
  style: {
3932
3950
  position: 'absolute',
3933
3951
  left: this.state.position + '%',
@@ -3936,7 +3954,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3936
3954
  top: '-16px',
3937
3955
  fontSize: '10px',
3938
3956
  fontWeight: 'bold',
3939
- transition: "0.3s"
3957
+ transition: '0.3s'
3940
3958
  }
3941
3959
  }, parseInt(this.state.position), "%"), /*#__PURE__*/React.createElement("div", {
3942
3960
  className: "cursor-pointer",