ui-kit-ck-consultant 0.5.206 → 0.5.209
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 +3 -2
- package/dist/index.js +30 -15
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +30 -15
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -355,7 +355,8 @@ var FormTextarea = /*#__PURE__*/function (_React$Component) {
|
|
355
355
|
value: this.props.value,
|
356
356
|
name: this.props.name,
|
357
357
|
required: this.props.required,
|
358
|
-
disabled: this.props.disabled
|
358
|
+
disabled: this.props.disabled,
|
359
|
+
style: this.props.style
|
359
360
|
}), this.props.error ? /*#__PURE__*/React.createElement("span", {
|
360
361
|
className: style$3.form_textarea_error
|
361
362
|
}, this.props.error) : '');
|
@@ -3958,6 +3959,27 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
3958
3959
|
var _this;
|
3959
3960
|
|
3960
3961
|
_this = _React$Component.call(this, props) || this;
|
3962
|
+
|
3963
|
+
_this.onMouse = function (e, isForce) {
|
3964
|
+
if (isForce === void 0) {
|
3965
|
+
isForce = false;
|
3966
|
+
}
|
3967
|
+
|
3968
|
+
if (_this.state.isActive || isForce) {
|
3969
|
+
var currentTargetRect = e.currentTarget.getBoundingClientRect();
|
3970
|
+
var width = currentTargetRect.width;
|
3971
|
+
var positionX = e.pageX - currentTargetRect.left;
|
3972
|
+
var step = _this.props.step ? _this.props.step : 1;
|
3973
|
+
var position = positionX * 100 / width - positionX * 100 / width % step;
|
3974
|
+
|
3975
|
+
_this.setState({
|
3976
|
+
position: position
|
3977
|
+
}, function () {
|
3978
|
+
return _this.props.onChange ? _this.props.onChange(position) : null;
|
3979
|
+
});
|
3980
|
+
}
|
3981
|
+
};
|
3982
|
+
|
3961
3983
|
_this.state = {
|
3962
3984
|
isActive: false,
|
3963
3985
|
position: 0
|
@@ -4013,21 +4035,14 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4013
4035
|
borderRadius: '8px'
|
4014
4036
|
},
|
4015
4037
|
onMouseMove: function onMouseMove(e) {
|
4016
|
-
|
4017
|
-
|
4018
|
-
|
4019
|
-
|
4020
|
-
var step = _this3.props.step ? _this3.props.step : 1;
|
4021
|
-
var position = positionX * 100 / width - positionX * 100 / width % step;
|
4022
|
-
|
4023
|
-
_this3.setState({
|
4024
|
-
position: position
|
4025
|
-
}, function () {
|
4026
|
-
return _this3.props.onChange ? _this3.props.onChange(position) : null;
|
4027
|
-
});
|
4028
|
-
}
|
4038
|
+
return _this3.onMouse(e);
|
4039
|
+
},
|
4040
|
+
onClick: function onClick(e) {
|
4041
|
+
return _this3.onMouse(e, true);
|
4029
4042
|
},
|
4030
|
-
onMouseDown: function onMouseDown() {
|
4043
|
+
onMouseDown: function onMouseDown(e) {
|
4044
|
+
e.preventDefault();
|
4045
|
+
|
4031
4046
|
_this3.setState({
|
4032
4047
|
isActive: true
|
4033
4048
|
});
|