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.
package/dist/index.css CHANGED
@@ -2886,6 +2886,7 @@
2886
2886
  -moz-user-select: none;
2887
2887
  -ms-user-select: none;
2888
2888
  user-select: none;
2889
+ margin-right: auto;
2889
2890
  }
2890
2891
 
2891
2892
  ._zCJtD > div {
package/dist/index.js CHANGED
@@ -3788,6 +3788,22 @@ var Switch = /*#__PURE__*/function (_React$Component) {
3788
3788
 
3789
3789
  var _proto = Switch.prototype;
3790
3790
 
3791
+ _proto.componentDidMount = function componentDidMount() {
3792
+ if (this.props.idxActive !== undefined) {
3793
+ this.setState({
3794
+ idxActive: this.props.idxActive
3795
+ });
3796
+ }
3797
+ };
3798
+
3799
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
3800
+ if (prevProps.idxActive !== undefined && prevProps.idxActive !== this.props.idxActive && this.props.idxActive !== this.state.prevProps) {
3801
+ this.setState({
3802
+ idxActive: this.props.idxActive
3803
+ });
3804
+ }
3805
+ };
3806
+
3791
3807
  _proto.render = function render() {
3792
3808
  var _this2 = this;
3793
3809
 
@@ -3883,11 +3899,13 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3883
3899
  var currentTargetRect = e.currentTarget.getBoundingClientRect();
3884
3900
  var width = currentTargetRect.width;
3885
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;
3886
3904
 
3887
3905
  _this2.setState({
3888
- position: positionX * 100 / width
3906
+ position: position
3889
3907
  }, function () {
3890
- return _this2.props.onChange ? _this2.props.onChange(_this2.state.position) : null;
3908
+ return _this2.props.onChange ? _this2.props.onChange(position) : null;
3891
3909
  });
3892
3910
  }
3893
3911
  }, this.props.min ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
@@ -3930,7 +3948,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3930
3948
  left: this.props.max + '%',
3931
3949
  transform: 'translateX(-50%)'
3932
3950
  }
3933
- })) : null, /*#__PURE__*/React__default.createElement("span", {
3951
+ })) : null, this.props.noText ? null : /*#__PURE__*/React__default.createElement("span", {
3934
3952
  style: {
3935
3953
  position: 'absolute',
3936
3954
  left: this.state.position + '%',
@@ -3939,7 +3957,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3939
3957
  top: '-16px',
3940
3958
  fontSize: '10px',
3941
3959
  fontWeight: 'bold',
3942
- transition: "0.3s"
3960
+ transition: '0.3s'
3943
3961
  }
3944
3962
  }, parseInt(this.state.position), "%"), /*#__PURE__*/React__default.createElement("div", {
3945
3963
  className: "cursor-pointer",