ui-kit-ck-consultant 0.5.205 → 0.5.208

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
@@ -2611,11 +2611,11 @@
2611
2611
  z-index: 5;
2612
2612
  }
2613
2613
 
2614
- ._2RiQY span:first-child{
2614
+ ._2RiQY span:first-child {
2615
2615
  text-align: center;
2616
2616
  }
2617
2617
 
2618
- ._2RiQY span:last-child{
2618
+ ._2RiQY span:last-child {
2619
2619
  font-weight: bold;
2620
2620
  }
2621
2621
 
@@ -2680,6 +2680,7 @@
2680
2680
  }
2681
2681
 
2682
2682
  ._uTVeE {
2683
+ flex-shrink: 0;
2683
2684
  margin: auto 0;
2684
2685
  display: flex;
2685
2686
  width: 30px;
package/dist/index.js CHANGED
@@ -2330,8 +2330,8 @@ var PieChart = /*#__PURE__*/function (_React$Component) {
2330
2330
  data: this.createDatasets(this.props.data.length),
2331
2331
  legend: {
2332
2332
  display: this.legendDisplayData(),
2333
- position: 'bottom',
2334
- align: 'center',
2333
+ position: this.props.positionLegend || 'bottom',
2334
+ align: this.props.alignLegend || 'center',
2335
2335
  labels: {
2336
2336
  usePointStyle: true,
2337
2337
  boxWidth: 10,
@@ -3961,6 +3961,27 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3961
3961
  var _this;
3962
3962
 
3963
3963
  _this = _React$Component.call(this, props) || this;
3964
+
3965
+ _this.onMouse = function (e, isForce) {
3966
+ if (isForce === void 0) {
3967
+ isForce = false;
3968
+ }
3969
+
3970
+ if (_this.state.isActive || isForce) {
3971
+ var currentTargetRect = e.currentTarget.getBoundingClientRect();
3972
+ var width = currentTargetRect.width;
3973
+ var positionX = e.pageX - currentTargetRect.left;
3974
+ var step = _this.props.step ? _this.props.step : 1;
3975
+ var position = positionX * 100 / width - positionX * 100 / width % step;
3976
+
3977
+ _this.setState({
3978
+ position: position
3979
+ }, function () {
3980
+ return _this.props.onChange ? _this.props.onChange(position) : null;
3981
+ });
3982
+ }
3983
+ };
3984
+
3964
3985
  _this.state = {
3965
3986
  isActive: false,
3966
3987
  position: 0
@@ -4016,21 +4037,14 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4016
4037
  borderRadius: '8px'
4017
4038
  },
4018
4039
  onMouseMove: function onMouseMove(e) {
4019
- if (_this3.state.isActive) {
4020
- var currentTargetRect = e.currentTarget.getBoundingClientRect();
4021
- var width = currentTargetRect.width;
4022
- var positionX = e.pageX - currentTargetRect.left;
4023
- var step = _this3.props.step ? _this3.props.step : 1;
4024
- var position = positionX * 100 / width - positionX * 100 / width % step;
4025
-
4026
- _this3.setState({
4027
- position: position
4028
- }, function () {
4029
- return _this3.props.onChange ? _this3.props.onChange(position) : null;
4030
- });
4031
- }
4040
+ return _this3.onMouse(e);
4041
+ },
4042
+ onClick: function onClick(e) {
4043
+ return _this3.onMouse(e, true);
4032
4044
  },
4033
- onMouseDown: function onMouseDown() {
4045
+ onMouseDown: function onMouseDown(e) {
4046
+ e.preventDefault();
4047
+
4034
4048
  _this3.setState({
4035
4049
  isActive: true
4036
4050
  });