@@ -60240,7 +60240,8 @@ this["dash_daq"] =
60240
60240
color = props.color,
60241
60241
logarithmic = props.logarithmic,
60242
60242
base = props.base,
60243
- size = props.size;
60243
+ height = props.height,
60244
+ width = props.width;
60244
60245
60245
60246
60246
60247
var dirtyValue = logarithmic ? log.compute(props.value, base) : props.value;
@@ -60296,7 +60297,7 @@ this["dash_daq"] =
60296
60297
scaleContainer,
60297
60298
React.createElement(
60298
60299
TankContainer,
60299
- { size: size },
60300
+ { height: height, width: width },
60300
60301
React.createElement(TankFill, { color: color, height: percentageFill + '%' }),
60301
60302
showCurrentValue && currentValue
60302
60303
)
@@ -60308,7 +60309,8 @@ this["dash_daq"] =
60308
60309
Tank.defaultProps = {
60309
60310
min: 0,
60310
60311
max: 10,
60311
- size: 192,
60312
+ height: 192,
60313
+ width: 112,
60312
60314
base: 10,
60313
60315
labelPosition: 'top'
60314
60316
};
@@ -60326,9 +60328,14 @@ this["dash_daq"] =
60326
60328
value: PropTypes.number,
60327
60329
60328
60330
/**
60329
- * The size ( height) of the tank in pixels
60331
+ * The height of the tank in pixels
60330
60332
*/
60331
- size: PropTypes.number,
60333
+ height: PropTypes.number,
60334
+
60335
+ /**
60336
+ * The width of the tank in pixels
60337
+ */
60338
+ width: PropTypes.number,
60332
60339
60333
60340
/**
60334
60341
* The color of tank fill
@@ -60495,16 +60502,17 @@ this["dash_daq"] =
60495
60502
60496
60503
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
60497
60504
60498
- var TankContainer = exports.TankContainer = styled.div(_templateObject, function (props) {
60499
- return props.width || '112px';
60500
- }, function (_ref) {
60501
- var size = _ref.size;
60502
- return size + 'px';
60505
+ var TankContainer = exports.TankContainer = styled.div(_templateObject, function (_ref) {
60506
+ var width = _ref.width;
60507
+ return width + 'px';
60503
60508
}, function (_ref2) {
60504
- var thermometer = _ref2.thermometer ;
60505
- return thermometer ? '40px' : '0 ';
60509
+ var height = _ref2.height ;
60510
+ return height + 'px ';
60506
60511
}, function (_ref3) {
60507
- var theme = _ref3.theme;
60512
+ var thermometer = _ref3.thermometer;
60513
+ return thermometer ? '40px' : '0';
60514
+ }, function (_ref4) {
60515
+ var theme = _ref4.theme;
60508
60516
return theme.dark ? darkTankContainer : lightTankContainer;
60509
60517
});
60510
60518
TankContainer.defaultProps = {
@@ -60517,43 +60525,43 @@ this["dash_daq"] =
60517
60525
return props.theme.secondary;
60518
60526
});
60519
60527
60520
- var TankFill = exports.TankFill = styled.div(_templateObject4, function (_ref4 ) {
60521
- var height = _ref4 .height;
60528
+ var TankFill = exports.TankFill = styled.div(_templateObject4, function (_ref5 ) {
60529
+ var height = _ref5 .height;
60522
60530
return height || 0;
60523
- }, function (_ref5) {
60524
- var thermometer = _ref5.thermometer;
60525
- return thermometer ? '40px' : '0';
60526
60531
}, function (_ref6) {
60527
- var theme = _ref6.theme;
60532
+ var thermometer = _ref6.thermometer;
60533
+ return thermometer ? '40px' : '0';
60534
+ }, function (_ref7) {
60535
+ var theme = _ref7.theme;
60528
60536
return theme.dark ? darkTankFill : lightTankFill;
60529
60537
});
60530
60538
TankFill.defaultProps = {
60531
60539
theme: light
60532
60540
};
60533
60541
60534
- var darkTankFill = css(_templateObject5, function (_ref7) {
60535
- var color = _ref7.color,
60536
- theme = _ref7.theme;
60537
- return color || theme.primary;
60538
- }, function (_ref8) {
60542
+ var darkTankFill = css(_templateObject5, function (_ref8) {
60539
60543
var color = _ref8.color,
60540
60544
theme = _ref8.theme;
60545
+ return color || theme.primary;
60546
+ }, function (_ref9) {
60547
+ var color = _ref9.color,
60548
+ theme = _ref9.theme;
60541
60549
return Color(color || theme.primary).alpha(0.7).string();
60542
60550
});
60543
60551
60544
- var lightTankFill = css(_templateObject3, function (_ref9 ) {
60545
- var color = _ref9 .color,
60546
- theme = _ref9 .theme;
60552
+ var lightTankFill = css(_templateObject3, function (_ref10 ) {
60553
+ var color = _ref10 .color,
60554
+ theme = _ref10 .theme;
60547
60555
return color || theme.primary;
60548
60556
});
60549
60557
60550
- var TickContainer = exports.TickContainer = styled.div(_templateObject6, function (_ref10 ) {
60551
- var xPositioned = _ref10 .xPositioned;
60558
+ var TickContainer = exports.TickContainer = styled.div(_templateObject6, function (_ref11 ) {
60559
+ var xPositioned = _ref11 .xPositioned;
60552
60560
return xPositioned && css(_templateObject7);
60553
60561
});
60554
60562
60555
- var Tick = exports.Tick = styled.div(_templateObject8, function (_ref11 ) {
60556
- var xPosition = _ref11 .xPosition;
60563
+ var Tick = exports.Tick = styled.div(_templateObject8, function (_ref12 ) {
60564
+ var xPosition = _ref12 .xPosition;
60557
60565
return xPosition || xPosition === 0 ? css(_templateObject9, 'calc(' + xPosition + '% - ' + xPosition / 100.0 * 18 + 'px)') : '';
60558
60566
}, function (props) {
60559
60567
return props.width || 4;
@@ -60565,10 +60573,10 @@ this["dash_daq"] =
60565
60573
theme: light
60566
60574
};
60567
60575
60568
- var Container = exports.Container = styled.div(_templateObject10, function (_ref12 ) {
60569
- var thermometer = _ref12 .thermometer;
60570
- return thermometer ? css(_templateObject11, function (_ref13 ) {
60571
- var xPositioned = _ref13 .xPositioned;
60576
+ var Container = exports.Container = styled.div(_templateObject10, function (_ref13 ) {
60577
+ var thermometer = _ref13 .thermometer;
60578
+ return thermometer ? css(_templateObject11, function (_ref14 ) {
60579
+ var xPositioned = _ref14 .xPositioned;
60572
60580
return xPositioned ? '-4px' : '-24px';
60573
60581
}) : '';
60574
60582
});
@@ -60643,8 +60651,6 @@ this["dash_daq"] =
60643
60651
60644
60652
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
60645
60653
60646
- var WIDTH = 20;
60647
-
60648
60654
/**
60649
60655
* A thermometer component that
60650
60656
* fills to a value between some
@@ -60662,7 +60668,8 @@ this["dash_daq"] =
60662
60668
units = props.units,
60663
60669
theme = props.theme,
60664
60670
color = props.color,
60665
- size = props.size;
60671
+ height = props.height,
60672
+ width = props.width;
60666
60673
60667
60674
60668
60675
var dirtyValue = logarithmic ? log.compute(props.value, base) : props.value;
@@ -60723,7 +60730,7 @@ this["dash_daq"] =
60723
60730
scaleContainer,
60724
60731
React.createElement(
60725
60732
TankContainer,
60726
- { thermometer: true, size: size , width: WIDTH + 'px' },
60733
+ { thermometer: true, height: height , width: width },
60727
60734
React.createElement(TankFill, {
60728
60735
thermometer: true,
60729
60736
color: color,
@@ -60741,7 +60748,8 @@ this["dash_daq"] =
60741
60748
Thermometer.defaultProps = {
60742
60749
min: 0,
60743
60750
max: 10,
60744
- size: 192,
60751
+ height: 192,
60752
+ width: 20,
60745
60753
base: 10,
60746
60754
labelPosition: 'top',
60747
60755
theme: light
@@ -60760,9 +60768,14 @@ this["dash_daq"] =
60760
60768
value: PropTypes.number,
60761
60769
60762
60770
/**
60763
- * The size ( height) of the thermometer in pixels
60771
+ * The height of the thermometer in pixels
60764
60772
*/
60765
- size: PropTypes.number,
60773
+ height: PropTypes.number,
60774
+
60775
+ /**
60776
+ * The width of the thermometer in pixels
60777
+ */
60778
+ width: PropTypes.number,
60766
60779
60767
60780
/**
60768
60781
* The color of the thermometer fill/current value text
0 commit comments