@longline/aqua-ui 1.0.288 → 1.0.290
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.
|
@@ -61,7 +61,7 @@ var Openable = function (_a) {
|
|
|
61
61
|
// else content will be hidden.
|
|
62
62
|
(_b = document.fullscreenElement) !== null && _b !== void 0 ? _b : document.body)));
|
|
63
63
|
};
|
|
64
|
-
var Pane = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n width: ", "px;\n z-index:
|
|
64
|
+
var Pane = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: ", ";\n width: ", "px;\n z-index: 4000;\n"], ["\n display: ", ";\n width: ", "px;\n z-index: 4000;\n"])), function (p) { return p.$open ? 'block' : 'none'; }, function (p) { return p.$width; });
|
|
65
65
|
Openable.displayName = "Openable";
|
|
66
66
|
export { Openable };
|
|
67
67
|
var templateObject_1;
|
|
@@ -54,6 +54,12 @@ interface ISliderProps {
|
|
|
54
54
|
* A `Slider` can be in an `error` state.
|
|
55
55
|
*/
|
|
56
56
|
error?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* An optional formatter that takes the current slider value (a number)
|
|
59
|
+
* and returns a string. This can be used to divide values by 100,
|
|
60
|
+
* for example.
|
|
61
|
+
*/
|
|
62
|
+
formatter?: (value: number) => string;
|
|
57
63
|
/**
|
|
58
64
|
* Event is triggered when slider's value changes.
|
|
59
65
|
*/
|
package/inputs/Slider/Slider.js
CHANGED
|
@@ -67,7 +67,7 @@ var SliderBase = function (props) {
|
|
|
67
67
|
// Set knob position as a percentage:
|
|
68
68
|
knobRef.current.style.left = "".concat(pos * 100, "%");
|
|
69
69
|
trackFillRef.current.style.width = "".concat(pos * 100, "%");
|
|
70
|
-
tearValueRef.current.textContent = value.current.toString();
|
|
70
|
+
tearValueRef.current.textContent = props.formatter ? props.formatter(value.current) : value.current.toString();
|
|
71
71
|
if (notify && props.onChange)
|
|
72
72
|
props.onChange(value.current);
|
|
73
73
|
};
|