ui-kit-ck-consultant 0.5.149 → 0.5.150
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.js +133 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +133 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -3705,6 +3705,138 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
3705
3705
|
return Switch;
|
3706
3706
|
}(React__default.Component);
|
3707
3707
|
|
3708
|
+
var Gauge = /*#__PURE__*/function (_React$Component) {
|
3709
|
+
_inheritsLoose(Gauge, _React$Component);
|
3710
|
+
|
3711
|
+
function Gauge(props) {
|
3712
|
+
var _this;
|
3713
|
+
|
3714
|
+
_this = _React$Component.call(this, props) || this;
|
3715
|
+
_this.state = {
|
3716
|
+
position: 0
|
3717
|
+
};
|
3718
|
+
return _this;
|
3719
|
+
}
|
3720
|
+
|
3721
|
+
var _proto = Gauge.prototype;
|
3722
|
+
|
3723
|
+
_proto.componentDidMount = function componentDidMount() {
|
3724
|
+
if (this.props.position) {
|
3725
|
+
this.setState({
|
3726
|
+
position: this.props.position
|
3727
|
+
});
|
3728
|
+
}
|
3729
|
+
};
|
3730
|
+
|
3731
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
3732
|
+
if (prevProps.position !== this.props.position && this.props.position !== this.state.position) {
|
3733
|
+
this.setState({
|
3734
|
+
position: this.props.position
|
3735
|
+
});
|
3736
|
+
}
|
3737
|
+
};
|
3738
|
+
|
3739
|
+
_proto.render = function render() {
|
3740
|
+
var _this2 = this;
|
3741
|
+
|
3742
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
3743
|
+
className: this.props.className
|
3744
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
3745
|
+
style: {
|
3746
|
+
display: 'inline-block',
|
3747
|
+
fontSize: '14px',
|
3748
|
+
fontWeight: 'bold',
|
3749
|
+
color: 'var(--black)',
|
3750
|
+
marginBottom: '16px'
|
3751
|
+
}
|
3752
|
+
}, this.props.title), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
3753
|
+
style: {
|
3754
|
+
position: 'relative',
|
3755
|
+
width: '100%',
|
3756
|
+
height: '22px',
|
3757
|
+
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] + ")",
|
3758
|
+
borderRadius: '8px'
|
3759
|
+
},
|
3760
|
+
onClick: function onClick(e) {
|
3761
|
+
var currentTargetRect = e.currentTarget.getBoundingClientRect();
|
3762
|
+
var width = currentTargetRect.width;
|
3763
|
+
var positionX = e.pageX - currentTargetRect.left;
|
3764
|
+
|
3765
|
+
_this2.setState({
|
3766
|
+
position: positionX * 100 / width
|
3767
|
+
}, function () {
|
3768
|
+
return _this2.props.onChange ? _this2.props.onChange(_this2.state.position) : null;
|
3769
|
+
});
|
3770
|
+
}
|
3771
|
+
}, this.props.min ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
3772
|
+
style: {
|
3773
|
+
position: 'absolute',
|
3774
|
+
left: this.props.min + '%',
|
3775
|
+
transform: 'translateX(-50%)',
|
3776
|
+
textAlign: 'center',
|
3777
|
+
top: '-18px',
|
3778
|
+
fontSize: '10px'
|
3779
|
+
}
|
3780
|
+
}, "MIN"), /*#__PURE__*/React__default.createElement("div", {
|
3781
|
+
style: {
|
3782
|
+
position: 'absolute',
|
3783
|
+
width: '4px',
|
3784
|
+
height: '28px',
|
3785
|
+
borderRadius: '4px',
|
3786
|
+
top: '-3px',
|
3787
|
+
backgroundColor: 'black',
|
3788
|
+
left: this.props.min + '%',
|
3789
|
+
transform: 'translateX(-50%)'
|
3790
|
+
}
|
3791
|
+
})) : null, this.props.max ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
3792
|
+
style: {
|
3793
|
+
position: 'absolute',
|
3794
|
+
left: this.props.max + '%',
|
3795
|
+
transform: 'translateX(-50%)',
|
3796
|
+
textAlign: 'center',
|
3797
|
+
top: '-18px',
|
3798
|
+
fontSize: '10px'
|
3799
|
+
}
|
3800
|
+
}, "MAX"), /*#__PURE__*/React__default.createElement("div", {
|
3801
|
+
style: {
|
3802
|
+
position: 'absolute',
|
3803
|
+
width: '4px',
|
3804
|
+
height: '28px',
|
3805
|
+
borderRadius: '4px',
|
3806
|
+
top: '-3px',
|
3807
|
+
backgroundColor: 'black',
|
3808
|
+
left: this.props.max + '%',
|
3809
|
+
transform: 'translateX(-50%)'
|
3810
|
+
}
|
3811
|
+
})) : null, /*#__PURE__*/React__default.createElement("span", {
|
3812
|
+
style: {
|
3813
|
+
position: 'absolute',
|
3814
|
+
left: this.state.position + '%',
|
3815
|
+
transform: 'translateX(-50%)',
|
3816
|
+
textAlign: 'center',
|
3817
|
+
top: '-16px',
|
3818
|
+
fontSize: '10px',
|
3819
|
+
fontWeight: 'bold'
|
3820
|
+
}
|
3821
|
+
}, parseInt(this.state.position), "%"), /*#__PURE__*/React__default.createElement("div", {
|
3822
|
+
className: "cursor-pointer",
|
3823
|
+
style: {
|
3824
|
+
position: 'absolute',
|
3825
|
+
bottom: '-6px',
|
3826
|
+
width: 0,
|
3827
|
+
height: 0,
|
3828
|
+
borderLeft: '10px solid transparent',
|
3829
|
+
borderRight: '10px solid transparent',
|
3830
|
+
borderBottom: '18px solid black',
|
3831
|
+
transform: 'translateX(-50%)',
|
3832
|
+
left: this.state.position + '%'
|
3833
|
+
}
|
3834
|
+
}))));
|
3835
|
+
};
|
3836
|
+
|
3837
|
+
return Gauge;
|
3838
|
+
}(React__default.Component);
|
3839
|
+
|
3708
3840
|
exports.Alert = Alert;
|
3709
3841
|
exports.AlertContainer = AlertContainer;
|
3710
3842
|
exports.AlertElement = AlertElement;
|
@@ -3732,6 +3864,7 @@ exports.FormRange = FormRange;
|
|
3732
3864
|
exports.FormSelect = FormSelect;
|
3733
3865
|
exports.FormTextarea = FormTextarea;
|
3734
3866
|
exports.FullModal = FullModal;
|
3867
|
+
exports.Gauge = Gauge;
|
3735
3868
|
exports.Header = Header;
|
3736
3869
|
exports.HorizontalBarChart = HorizontalBarChart;
|
3737
3870
|
exports.Icon = Icon;
|