cloudmr-ux 4.2.6 → 4.2.7
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.
|
@@ -32,8 +32,9 @@ export default function TKDualRange(_a) {
|
|
|
32
32
|
var nextReal = clamp(inverse(nextRender), valueLow, maxDomain);
|
|
33
33
|
onChangeHigh(nextReal);
|
|
34
34
|
};
|
|
35
|
-
//
|
|
36
|
-
//
|
|
35
|
+
// Display REAL-space values (matching the color bar); use scientific notation for
|
|
36
|
+
// small non-zero values so they don't display as "0.000". Use type="text" because
|
|
37
|
+
// type="number" can show "0" for very small values instead of scientific notation.
|
|
37
38
|
var fmt = function (v) {
|
|
38
39
|
return Number.isFinite(v)
|
|
39
40
|
? v !== 0 && Math.abs(v) < 0.01
|
|
@@ -45,26 +46,26 @@ export default function TKDualRange(_a) {
|
|
|
45
46
|
var n = Number(s);
|
|
46
47
|
return Number.isFinite(n) ? n : NaN;
|
|
47
48
|
};
|
|
48
|
-
return (_jsxs("div", __assign({ className: "tkdr" }, { children: [_jsxs("div", __assign({ className: "tkdr__row tkdr__row--ends" }, { children: [_jsxs("div", __assign({ className: "tkdr__group" }, { children: [_jsx("span", __assign({ className: "tkdr__hint" }, { children: "Min" })), _jsx("input", { className: "tkdr__num", type: "
|
|
49
|
+
return (_jsxs("div", __assign({ className: "tkdr" }, { children: [_jsxs("div", __assign({ className: "tkdr__row tkdr__row--ends" }, { children: [_jsxs("div", __assign({ className: "tkdr__group" }, { children: [_jsx("span", __assign({ className: "tkdr__hint" }, { children: "Min" })), _jsx("input", { className: "tkdr__num", type: "text", inputMode: "decimal", value: fmt(valueLow), onChange: function (e) {
|
|
49
50
|
var n = parse(e.target.value);
|
|
50
51
|
if (!Number.isFinite(n))
|
|
51
52
|
return;
|
|
52
|
-
|
|
53
|
+
onChangeLow(clamp(n, minDomain, valueHigh));
|
|
53
54
|
}, onBlur: function (e) {
|
|
54
55
|
var n = parse(e.target.value);
|
|
55
56
|
if (!Number.isFinite(n))
|
|
56
57
|
return;
|
|
57
|
-
|
|
58
|
-
} })] })), _jsxs("div", __assign({ className: "tkdr__group" }, { children: [_jsx("span", __assign({ className: "tkdr__hint" }, { children: "Max" })), _jsx("input", { className: "tkdr__num", type: "
|
|
58
|
+
onChangeLow(clamp(n, minDomain, valueHigh));
|
|
59
|
+
} })] })), _jsxs("div", __assign({ className: "tkdr__group" }, { children: [_jsx("span", __assign({ className: "tkdr__hint" }, { children: "Max" })), _jsx("input", { className: "tkdr__num", type: "text", inputMode: "decimal", value: fmt(valueHigh), onChange: function (e) {
|
|
59
60
|
var n = parse(e.target.value);
|
|
60
61
|
if (!Number.isFinite(n))
|
|
61
62
|
return;
|
|
62
|
-
|
|
63
|
+
onChangeHigh(clamp(n, valueLow, maxDomain));
|
|
63
64
|
}, onBlur: function (e) {
|
|
64
65
|
var n = parse(e.target.value);
|
|
65
66
|
if (!Number.isFinite(n))
|
|
66
67
|
return;
|
|
67
|
-
|
|
68
|
+
onChangeHigh(clamp(n, valueLow, maxDomain));
|
|
68
69
|
} })] }))] })), _jsxs("div", __assign({ className: "tkdr__track", style: (_b = {}, _b["--tkdr-accent"] = accentColor, _b) }, { children: [_jsx("div", { className: "tkdr__range-fill", style: {
|
|
69
70
|
left: "".concat(pct(Math.min(tLow, tHigh)), "%"),
|
|
70
71
|
width: "".concat(Math.abs(pct(tHigh) - pct(tLow)), "%")
|