@nebularstreams/libmui 2.5.101 → 2.5.103
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/package.json
CHANGED
|
@@ -383,10 +383,12 @@ function MithrilRange() {
|
|
|
383
383
|
},
|
|
384
384
|
view: function ({attrs, children}) {
|
|
385
385
|
|
|
386
|
+
const NOKEY = attrs.nokey ? " nokey" : "";
|
|
387
|
+
|
|
386
388
|
updateAttrs(attrs);
|
|
387
389
|
value = quantize(value, min, max, step);
|
|
388
390
|
const a = {
|
|
389
|
-
class: "mithril-range
|
|
391
|
+
class: "mithril-range " + NOKEY + (attrs.relative ? " isrelative " : " ") + (value === 0 ? "atzero" : value < 0 ? "belowzero" : "overzero") + (attrs.class != null ? " " + attrs.class : ""),
|
|
390
392
|
tabIndex: "0",
|
|
391
393
|
role: "slider",
|
|
392
394
|
"aria-valuemin": String(min),
|
|
@@ -422,14 +424,14 @@ function MithrilRange() {
|
|
|
422
424
|
bar0Style = {width: rps};
|
|
423
425
|
bar1Style = {width: ps};
|
|
424
426
|
}
|
|
425
|
-
return m("div", a, m("div", {class: "mithril-range-bar
|
|
426
|
-
class: "mithril-range-bar-0
|
|
427
|
+
return m("div", a, m("div", {class: "mithril-range-bar" + NOKEY}, m("div", {
|
|
428
|
+
class: "mithril-range-bar-0" + NOKEY,
|
|
427
429
|
style: bar0Style
|
|
428
430
|
}), m("div", {
|
|
429
|
-
class: "mithril-range-bar-1
|
|
431
|
+
class: "mithril-range-bar-1" + NOKEY,
|
|
430
432
|
style: bar1Style
|
|
431
433
|
}), m("div", {
|
|
432
|
-
class: "mithril-range-handle
|
|
434
|
+
class: "mithril-range-handle" + NOKEY,
|
|
433
435
|
style: handleStyle
|
|
434
436
|
}, children)), !!attrs.name && m("input", {
|
|
435
437
|
type: "hidden",
|
|
@@ -115,6 +115,10 @@ const
|
|
|
115
115
|
? attrs.currentWidget(items[current], current) || []
|
|
116
116
|
: [],
|
|
117
117
|
|
|
118
|
+
...!themeIcon && attrs.altCurrentWidget && altIndex >= 0 && items[altIndex]
|
|
119
|
+
? attrs.currentWidget(items[altIndex], current) || []
|
|
120
|
+
: [],
|
|
121
|
+
|
|
118
122
|
...children
|
|
119
123
|
];
|
|
120
124
|
|