|
1 | | -/*! nouislider - 14.2.0 - 3/27/2020 */ |
| 1 | +/*! nouislider - 14.3.0 - 5/5/2020 */ |
2 | 2 | (function(factory) { |
3 | 3 | if (typeof define === "function" && define.amd) { |
4 | 4 | // AMD. Register as an anonymous module. |
|
13 | 13 | })(function() { |
14 | 14 | "use strict"; |
15 | 15 |
|
16 | | - var VERSION = "14.2.0"; |
| 16 | + var VERSION = "14.3.0"; |
17 | 17 |
|
18 | 18 | //region Helper Methods |
19 | 19 |
|
|
109 | 109 |
|
110 | 110 | // http://youmightnotneedjquery.com/#remove_class |
111 | 111 | function removeClass(el, className) { |
112 | | - if (el.classList) { |
| 112 | + if (el.classList && !/\s/.test(className)) { |
113 | 113 | el.classList.remove(className); |
114 | 114 | } else { |
115 | 115 | el.className = el.className.replace( |
|
492 | 492 | or true when everything is OK. It can also modify the option |
493 | 493 | object, to make sure all values can be correctly looped elsewhere. */ |
494 | 494 |
|
| 495 | + //region Defaults |
| 496 | + |
495 | 497 | var defaultFormatter = { |
496 | 498 | to: function(value) { |
497 | 499 | return value !== undefined && value.toFixed(2); |
498 | 500 | }, |
499 | 501 | from: Number |
500 | 502 | }; |
501 | 503 |
|
| 504 | + var cssClasses = { |
| 505 | + target: "target", |
| 506 | + base: "base", |
| 507 | + origin: "origin", |
| 508 | + handle: "handle", |
| 509 | + handleLower: "handle-lower", |
| 510 | + handleUpper: "handle-upper", |
| 511 | + touchArea: "touch-area", |
| 512 | + horizontal: "horizontal", |
| 513 | + vertical: "vertical", |
| 514 | + background: "background", |
| 515 | + connect: "connect", |
| 516 | + connects: "connects", |
| 517 | + ltr: "ltr", |
| 518 | + rtl: "rtl", |
| 519 | + textDirectionLtr: "txt-dir-ltr", |
| 520 | + textDirectionRtl: "txt-dir-rtl", |
| 521 | + draggable: "draggable", |
| 522 | + drag: "state-drag", |
| 523 | + tap: "state-tap", |
| 524 | + active: "active", |
| 525 | + tooltip: "tooltip", |
| 526 | + pips: "pips", |
| 527 | + pipsHorizontal: "pips-horizontal", |
| 528 | + pipsVertical: "pips-vertical", |
| 529 | + marker: "marker", |
| 530 | + markerHorizontal: "marker-horizontal", |
| 531 | + markerVertical: "marker-vertical", |
| 532 | + markerNormal: "marker-normal", |
| 533 | + markerLarge: "marker-large", |
| 534 | + markerSub: "marker-sub", |
| 535 | + value: "value", |
| 536 | + valueHorizontal: "value-horizontal", |
| 537 | + valueVertical: "value-vertical", |
| 538 | + valueNormal: "value-normal", |
| 539 | + valueLarge: "value-large", |
| 540 | + valueSub: "value-sub" |
| 541 | + }; |
| 542 | + |
| 543 | + //endregion |
| 544 | + |
502 | 545 | function validateFormat(entry) { |
503 | 546 | // Any object with a to and from method is supported. |
504 | 547 | if (isValidFormatter(entry)) { |
|
878 | 921 | orientation: "horizontal", |
879 | 922 | keyboardSupport: true, |
880 | 923 | cssPrefix: "noUi-", |
881 | | - cssClasses: { |
882 | | - target: "target", |
883 | | - base: "base", |
884 | | - origin: "origin", |
885 | | - handle: "handle", |
886 | | - handleLower: "handle-lower", |
887 | | - handleUpper: "handle-upper", |
888 | | - touchArea: "touch-area", |
889 | | - horizontal: "horizontal", |
890 | | - vertical: "vertical", |
891 | | - background: "background", |
892 | | - connect: "connect", |
893 | | - connects: "connects", |
894 | | - ltr: "ltr", |
895 | | - rtl: "rtl", |
896 | | - textDirectionLtr: "txt-dir-ltr", |
897 | | - textDirectionRtl: "txt-dir-rtl", |
898 | | - draggable: "draggable", |
899 | | - drag: "state-drag", |
900 | | - tap: "state-tap", |
901 | | - active: "active", |
902 | | - tooltip: "tooltip", |
903 | | - pips: "pips", |
904 | | - pipsHorizontal: "pips-horizontal", |
905 | | - pipsVertical: "pips-vertical", |
906 | | - marker: "marker", |
907 | | - markerHorizontal: "marker-horizontal", |
908 | | - markerVertical: "marker-vertical", |
909 | | - markerNormal: "marker-normal", |
910 | | - markerLarge: "marker-large", |
911 | | - markerSub: "marker-sub", |
912 | | - value: "value", |
913 | | - valueHorizontal: "value-horizontal", |
914 | | - valueVertical: "value-vertical", |
915 | | - valueNormal: "value-normal", |
916 | | - valueLarge: "value-large", |
917 | | - valueSub: "value-sub" |
918 | | - } |
| 924 | + cssClasses: cssClasses |
919 | 925 | }; |
920 | 926 |
|
921 | 927 | // AriaFormat defaults to regular format, if any. |
|
2515 | 2521 | // Exposed for unit testing, don't use this in your application. |
2516 | 2522 | __spectrum: Spectrum, |
2517 | 2523 | version: VERSION, |
| 2524 | + // A reference to the default classes, allows global changes. |
| 2525 | + // Use the cssClasses option for changes to one slider. |
| 2526 | + cssClasses: cssClasses, |
2518 | 2527 | create: initialize |
2519 | 2528 | }; |
2520 | 2529 | }); |
0 commit comments