fomantic-ui 2.9.4-beta.81 → 2.9.4-beta.83

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.
Files changed (166) hide show
  1. package/dist/components/accordion.css +1 -1
  2. package/dist/components/accordion.js +1 -1
  3. package/dist/components/accordion.min.css +1 -1
  4. package/dist/components/accordion.min.js +1 -1
  5. package/dist/components/ad.css +1 -1
  6. package/dist/components/ad.min.css +1 -1
  7. package/dist/components/api.js +1 -1
  8. package/dist/components/api.min.js +1 -1
  9. package/dist/components/breadcrumb.css +1 -1
  10. package/dist/components/breadcrumb.min.css +1 -1
  11. package/dist/components/button.css +1 -1
  12. package/dist/components/button.min.css +1 -1
  13. package/dist/components/calendar.css +1 -1
  14. package/dist/components/calendar.js +1 -1
  15. package/dist/components/calendar.min.css +1 -1
  16. package/dist/components/calendar.min.js +1 -1
  17. package/dist/components/card.css +1 -1
  18. package/dist/components/card.min.css +1 -1
  19. package/dist/components/checkbox.css +1 -1
  20. package/dist/components/checkbox.js +1 -1
  21. package/dist/components/checkbox.min.css +1 -1
  22. package/dist/components/checkbox.min.js +1 -1
  23. package/dist/components/comment.css +1 -1
  24. package/dist/components/comment.min.css +1 -1
  25. package/dist/components/container.css +1 -1
  26. package/dist/components/container.min.css +1 -1
  27. package/dist/components/dimmer.css +1 -1
  28. package/dist/components/dimmer.js +1 -1
  29. package/dist/components/dimmer.min.css +1 -1
  30. package/dist/components/dimmer.min.js +1 -1
  31. package/dist/components/divider.css +1 -1
  32. package/dist/components/divider.min.css +1 -1
  33. package/dist/components/dropdown.css +1 -1
  34. package/dist/components/dropdown.js +5 -2
  35. package/dist/components/dropdown.min.css +1 -1
  36. package/dist/components/dropdown.min.js +2 -2
  37. package/dist/components/embed.css +1 -1
  38. package/dist/components/embed.js +1 -1
  39. package/dist/components/embed.min.css +1 -1
  40. package/dist/components/embed.min.js +1 -1
  41. package/dist/components/emoji.css +1 -1
  42. package/dist/components/emoji.min.css +1 -1
  43. package/dist/components/feed.css +1 -1
  44. package/dist/components/feed.min.css +1 -1
  45. package/dist/components/flag.css +1 -1
  46. package/dist/components/flag.min.css +1 -1
  47. package/dist/components/flyout.css +1 -1
  48. package/dist/components/flyout.js +1 -1
  49. package/dist/components/flyout.min.css +1 -1
  50. package/dist/components/flyout.min.js +1 -1
  51. package/dist/components/form.css +1 -1
  52. package/dist/components/form.js +1 -1
  53. package/dist/components/form.min.css +1 -1
  54. package/dist/components/form.min.js +1 -1
  55. package/dist/components/grid.css +1 -1
  56. package/dist/components/grid.min.css +1 -1
  57. package/dist/components/header.css +1 -1
  58. package/dist/components/header.min.css +1 -1
  59. package/dist/components/icon.css +1 -1
  60. package/dist/components/icon.min.css +1 -1
  61. package/dist/components/image.css +1 -1
  62. package/dist/components/image.min.css +1 -1
  63. package/dist/components/input.css +1 -1
  64. package/dist/components/input.min.css +1 -1
  65. package/dist/components/item.css +1 -1
  66. package/dist/components/item.min.css +1 -1
  67. package/dist/components/label.css +1 -1
  68. package/dist/components/label.min.css +1 -1
  69. package/dist/components/list.css +1 -1
  70. package/dist/components/list.min.css +1 -1
  71. package/dist/components/loader.css +1 -1
  72. package/dist/components/loader.min.css +1 -1
  73. package/dist/components/menu.css +1 -1
  74. package/dist/components/menu.min.css +1 -1
  75. package/dist/components/message.css +1 -1
  76. package/dist/components/message.min.css +1 -1
  77. package/dist/components/modal.css +1 -1
  78. package/dist/components/modal.js +1 -1
  79. package/dist/components/modal.min.css +1 -1
  80. package/dist/components/modal.min.js +1 -1
  81. package/dist/components/nag.css +1 -1
  82. package/dist/components/nag.js +1 -1
  83. package/dist/components/nag.min.css +1 -1
  84. package/dist/components/nag.min.js +1 -1
  85. package/dist/components/placeholder.css +1 -1
  86. package/dist/components/placeholder.min.css +1 -1
  87. package/dist/components/popup.css +1 -1
  88. package/dist/components/popup.js +1 -1
  89. package/dist/components/popup.min.css +1 -1
  90. package/dist/components/popup.min.js +1 -1
  91. package/dist/components/progress.css +1 -1
  92. package/dist/components/progress.js +1 -1
  93. package/dist/components/progress.min.css +1 -1
  94. package/dist/components/progress.min.js +1 -1
  95. package/dist/components/rail.css +1 -1
  96. package/dist/components/rail.min.css +1 -1
  97. package/dist/components/rating.css +1 -1
  98. package/dist/components/rating.js +1 -1
  99. package/dist/components/rating.min.css +1 -1
  100. package/dist/components/rating.min.js +1 -1
  101. package/dist/components/reset.css +1 -1
  102. package/dist/components/reset.min.css +1 -1
  103. package/dist/components/reveal.css +1 -1
  104. package/dist/components/reveal.min.css +1 -1
  105. package/dist/components/search.css +1 -1
  106. package/dist/components/search.js +1 -1
  107. package/dist/components/search.min.css +1 -1
  108. package/dist/components/search.min.js +1 -1
  109. package/dist/components/segment.css +1 -1
  110. package/dist/components/segment.min.css +1 -1
  111. package/dist/components/shape.css +1 -1
  112. package/dist/components/shape.js +1 -1
  113. package/dist/components/shape.min.css +1 -1
  114. package/dist/components/shape.min.js +1 -1
  115. package/dist/components/sidebar.css +1 -1
  116. package/dist/components/sidebar.js +1 -1
  117. package/dist/components/sidebar.min.css +1 -1
  118. package/dist/components/sidebar.min.js +1 -1
  119. package/dist/components/site.css +1 -1
  120. package/dist/components/site.js +1 -1
  121. package/dist/components/site.min.css +1 -1
  122. package/dist/components/site.min.js +1 -1
  123. package/dist/components/slider.css +152 -2
  124. package/dist/components/slider.js +139 -43
  125. package/dist/components/slider.min.css +2 -2
  126. package/dist/components/slider.min.js +2 -2
  127. package/dist/components/state.js +1 -1
  128. package/dist/components/state.min.js +1 -1
  129. package/dist/components/statistic.css +1 -1
  130. package/dist/components/statistic.min.css +1 -1
  131. package/dist/components/step.css +1 -1
  132. package/dist/components/step.min.css +1 -1
  133. package/dist/components/sticky.css +1 -1
  134. package/dist/components/sticky.js +1 -1
  135. package/dist/components/sticky.min.css +1 -1
  136. package/dist/components/sticky.min.js +1 -1
  137. package/dist/components/tab.css +1 -1
  138. package/dist/components/tab.js +1 -1
  139. package/dist/components/tab.min.css +1 -1
  140. package/dist/components/tab.min.js +1 -1
  141. package/dist/components/table.css +1 -1
  142. package/dist/components/table.min.css +1 -1
  143. package/dist/components/text.css +1 -1
  144. package/dist/components/text.min.css +1 -1
  145. package/dist/components/toast.css +1 -1
  146. package/dist/components/toast.js +1 -1
  147. package/dist/components/toast.min.css +1 -1
  148. package/dist/components/toast.min.js +1 -1
  149. package/dist/components/transition.css +1 -1
  150. package/dist/components/transition.js +1 -1
  151. package/dist/components/transition.min.css +1 -1
  152. package/dist/components/transition.min.js +1 -1
  153. package/dist/components/visibility.js +1 -1
  154. package/dist/components/visibility.min.js +1 -1
  155. package/dist/semantic.css +253 -54
  156. package/dist/semantic.js +168 -69
  157. package/dist/semantic.min.css +2 -2
  158. package/dist/semantic.min.js +2 -2
  159. package/package.json +1 -1
  160. package/src/definitions/modules/dropdown.js +4 -1
  161. package/src/definitions/modules/slider.js +138 -42
  162. package/src/definitions/modules/slider.less +103 -8
  163. package/src/themes/default/globals/variation.variables +4 -0
  164. package/src/themes/default/modules/slider.variables +10 -0
  165. package/types/fomantic-ui-dropdown.d.ts +6 -0
  166. package/types/fomantic-ui-slider.d.ts +54 -2
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.4-beta.81+f3182cf
2
+ * # Fomantic UI - 2.9.4-beta.83+9b313a5
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Site
12
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Site
13
13
  * https://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -465,7 +465,7 @@
465
465
  })(jQuery, window, document);
466
466
 
467
467
  /*!
468
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Form Validation
468
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Form Validation
469
469
  * https://github.com/fomantic/Fomantic-UI/
470
470
  *
471
471
  *
@@ -2665,7 +2665,7 @@
2665
2665
  })(jQuery, window, document);
2666
2666
 
2667
2667
  /*!
2668
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Accordion
2668
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Accordion
2669
2669
  * https://github.com/fomantic/Fomantic-UI/
2670
2670
  *
2671
2671
  *
@@ -3261,7 +3261,7 @@
3261
3261
  })(jQuery, window, document);
3262
3262
 
3263
3263
  /*!
3264
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Calendar
3264
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Calendar
3265
3265
  * https://github.com/fomantic/Fomantic-UI/
3266
3266
  *
3267
3267
  *
@@ -5284,7 +5284,7 @@
5284
5284
  })(jQuery, window, document);
5285
5285
 
5286
5286
  /*!
5287
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Checkbox
5287
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Checkbox
5288
5288
  * https://github.com/fomantic/Fomantic-UI/
5289
5289
  *
5290
5290
  *
@@ -6173,7 +6173,7 @@
6173
6173
  })(jQuery, window, document);
6174
6174
 
6175
6175
  /*!
6176
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Dimmer
6176
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Dimmer
6177
6177
  * https://github.com/fomantic/Fomantic-UI/
6178
6178
  *
6179
6179
  *
@@ -6906,7 +6906,7 @@
6906
6906
  })(jQuery, window, document);
6907
6907
 
6908
6908
  /*!
6909
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Dropdown
6909
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Dropdown
6910
6910
  * https://github.com/fomantic/Fomantic-UI/
6911
6911
  *
6912
6912
  *
@@ -8137,7 +8137,9 @@
8137
8137
  if (module.is.searchSelection()) {
8138
8138
  module.remove.searchTerm();
8139
8139
  }
8140
- module.hide();
8140
+ if (settings.collapseOnClearable) {
8141
+ module.hide();
8142
+ }
8141
8143
  event.stopPropagation();
8142
8144
  },
8143
8145
  },
@@ -11003,6 +11005,7 @@
11003
11005
  headerDivider: true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
11004
11006
 
11005
11007
  collapseOnActionable: true, // whether the dropdown should collapse upon selection of an actionable item
11008
+ collapseOnClearable: false, // whether the dropdown should collapse upon clicking the clearable icon
11006
11009
 
11007
11010
  // label settings on multi-select
11008
11011
  label: {
@@ -11335,7 +11338,7 @@
11335
11338
  })(jQuery, window, document);
11336
11339
 
11337
11340
  /*!
11338
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Embed
11341
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Embed
11339
11342
  * https://github.com/fomantic/Fomantic-UI/
11340
11343
  *
11341
11344
  *
@@ -12024,7 +12027,7 @@
12024
12027
  })(jQuery, window, document);
12025
12028
 
12026
12029
  /*!
12027
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Flyout
12030
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Flyout
12028
12031
  * https://github.com/fomantic/Fomantic-UI/
12029
12032
  *
12030
12033
  *
@@ -13576,7 +13579,7 @@
13576
13579
  })(jQuery, window, document);
13577
13580
 
13578
13581
  /*!
13579
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Modal
13582
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Modal
13580
13583
  * https://github.com/fomantic/Fomantic-UI/
13581
13584
  *
13582
13585
  *
@@ -15214,7 +15217,7 @@
15214
15217
  })(jQuery, window, document);
15215
15218
 
15216
15219
  /*!
15217
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Nag
15220
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Nag
15218
15221
  * https://github.com/fomantic/Fomantic-UI/
15219
15222
  *
15220
15223
  *
@@ -15781,7 +15784,7 @@
15781
15784
  })(jQuery, window, document);
15782
15785
 
15783
15786
  /*!
15784
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Popup
15787
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Popup
15785
15788
  * https://github.com/fomantic/Fomantic-UI/
15786
15789
  *
15787
15790
  *
@@ -17343,7 +17346,7 @@
17343
17346
  })(jQuery, window, document);
17344
17347
 
17345
17348
  /*!
17346
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Progress
17349
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Progress
17347
17350
  * https://github.com/fomantic/Fomantic-UI/
17348
17351
  *
17349
17352
  *
@@ -18323,7 +18326,7 @@
18323
18326
  })(jQuery, window, document);
18324
18327
 
18325
18328
  /*!
18326
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Slider
18329
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Slider
18327
18330
  * https://github.com/fomantic/Fomantic-UI/
18328
18331
  *
18329
18332
  *
@@ -18356,8 +18359,6 @@
18356
18359
  methodInvoked = typeof query === 'string',
18357
18360
  queryArguments = [].slice.call(arguments, 1),
18358
18361
 
18359
- alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
18360
-
18361
18362
  SINGLE_STEP = 1,
18362
18363
  BIG_STEP = 2,
18363
18364
  NO_STEP = 0,
@@ -18406,7 +18407,6 @@
18406
18407
  position,
18407
18408
  secondPos,
18408
18409
  offset,
18409
- precision,
18410
18410
  gapRatio = 1,
18411
18411
  previousValue,
18412
18412
 
@@ -18449,6 +18449,7 @@
18449
18449
  clearInterval(instance.interval);
18450
18450
  module.unbind.events();
18451
18451
  module.unbind.slidingEvents();
18452
+ delete module.cache;
18452
18453
  $module.removeData(moduleNamespace);
18453
18454
  instance = undefined;
18454
18455
  },
@@ -18465,7 +18466,7 @@
18465
18466
  + '<div class="thumb"></div>'
18466
18467
  + '</div>');
18467
18468
  }
18468
- precision = module.get.precision();
18469
+ module.clear.cache();
18469
18470
  $thumb = $module.find('.thumb:not(.second)');
18470
18471
  if (settings.showThumbTooltip) {
18471
18472
  $thumb
@@ -18499,8 +18500,14 @@
18499
18500
  module.setup.autoLabel();
18500
18501
  }
18501
18502
 
18503
+ if (settings.highlightRange) {
18504
+ $labels.addClass(className.active);
18505
+ }
18506
+
18502
18507
  if (settings.showLabelTicks) {
18503
18508
  $module.addClass(className.ticked);
18509
+ } else if ($module.hasClass(className.ticked)) {
18510
+ settings.showLabelTicks = 'always';
18504
18511
  }
18505
18512
  }
18506
18513
  },
@@ -18535,14 +18542,20 @@
18535
18542
  } else {
18536
18543
  $labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
18537
18544
  }
18538
- for (var i = 0, len = module.get.numLabels(); i <= len; i++) {
18545
+ var step = module.get.step(),
18546
+ precision = module.get.precision(),
18547
+ len = module.get.numLabels(),
18548
+ ignoreLabels = len - (settings.autoAdjustLabels !== 'fixed' ? 0 : module.get.max().toString().length + 4)
18549
+ ;
18550
+ for (var i = 0; i <= len; i++) {
18539
18551
  var
18540
- labelText = module.get.label(i),
18552
+ stepValue = Math.round(((i * (step === 0 ? 1 : step)) + module.get.min()) * precision) / precision,
18553
+ labelText = module.get.label(i, stepValue),
18541
18554
  showLabel = settings.restrictedLabels.length === 0 || settings.restrictedLabels.indexOf(labelText) >= 0,
18542
18555
  $label = labelText !== '' && (showLabel || settings.showLabelTicks === 'always')
18543
- ? (!(i % module.get.gapRatio())
18544
- ? $('<li class="label">' + (showLabel ? labelText : '') + '</li>')
18545
- : $('<li class="halftick label"></li>'))
18556
+ ? ((!(i % module.get.gapRatio()) && i < ignoreLabels) || i === len
18557
+ ? $('<li/>', { class: className.label, 'data-value': stepValue, html: showLabel ? labelText : '' })
18558
+ : $('<li/>', { class: 'halftick label', 'data-value': stepValue }))
18546
18559
  : null,
18547
18560
  ratio = i / len
18548
18561
  ;
@@ -18813,6 +18826,12 @@
18813
18826
  },
18814
18827
  },
18815
18828
 
18829
+ clear: {
18830
+ cache: function () {
18831
+ module.cache = {};
18832
+ },
18833
+ },
18834
+
18816
18835
  resync: function () {
18817
18836
  module.verbose('Resyncing thumb position based on value');
18818
18837
  if (module.is.range()) {
@@ -18862,6 +18881,25 @@
18862
18881
  },
18863
18882
 
18864
18883
  is: {
18884
+ prime: function (n) {
18885
+ if (module.cache['prime' + n] === undefined) {
18886
+ var p = true;
18887
+ for (var i = 2, s = Math.sqrt(n); i <= s; i++) {
18888
+ if (n % i === 0) {
18889
+ p = false;
18890
+
18891
+ break;
18892
+ }
18893
+ }
18894
+ if (p) {
18895
+ p = n > 1;
18896
+ }
18897
+
18898
+ module.cache['prime' + n] = p;
18899
+ }
18900
+
18901
+ return module.cache['prime' + n];
18902
+ },
18865
18903
  range: function () {
18866
18904
  var isRange = $module.hasClass(className.range);
18867
18905
  if (!isRange && (settings.minRange || settings.maxRange)) {
@@ -18976,62 +19014,87 @@
18976
19014
  return margin || '0px';
18977
19015
  },
18978
19016
  precision: function () {
18979
- var
18980
- decimalPlaces,
18981
- step = module.get.step()
18982
- ;
18983
- if (step !== 0) {
18984
- var split = String(step).split('.');
18985
- decimalPlaces = split.length === 2 ? split[1].length : 0;
18986
- } else {
18987
- decimalPlaces = settings.decimalPlaces;
19017
+ if (module.cache.precision === undefined) {
19018
+ var
19019
+ decimalPlaces,
19020
+ step = module.get.step()
19021
+ ;
19022
+ if (step !== 0) {
19023
+ var split = String(step).split('.');
19024
+ decimalPlaces = split.length === 2 ? split[1].length : 0;
19025
+ } else {
19026
+ decimalPlaces = settings.decimalPlaces;
19027
+ }
19028
+ var precision = Math.pow(10, decimalPlaces);
19029
+ module.debug('Precision determined', precision);
19030
+ module.cache.precision = precision;
18988
19031
  }
18989
- var precision = Math.pow(10, decimalPlaces);
18990
- module.debug('Precision determined', precision);
18991
19032
 
18992
- return precision;
19033
+ return module.cache.precision;
18993
19034
  },
18994
19035
  min: function () {
18995
19036
  return settings.min;
18996
19037
  },
18997
19038
  max: function () {
18998
- var
18999
- step = module.get.step(),
19000
- min = module.get.min(),
19001
- precision = module.get.precision(),
19002
- quotient = step === 0 ? 0 : Math.floor(Math.round(((settings.max - min) / step) * precision) / precision),
19003
- remainder = step === 0 ? 0 : (settings.max - min) % step
19004
- ;
19039
+ if (module.cache.max === undefined) {
19040
+ var
19041
+ step = module.get.step(),
19042
+ min = module.get.min(),
19043
+ precision = module.get.precision(),
19044
+ quotient = step === 0 ? 0 : Math.floor(Math.round(((settings.max - min) / step) * precision) / precision),
19045
+ remainder = step === 0 ? 0 : (settings.max - min) % step
19046
+ ;
19047
+ if (remainder > 0) {
19048
+ module.debug('Max value not divisible by given step. Increasing max value.', settings.max, step);
19049
+ }
19050
+ module.cache.max = remainder === 0 ? settings.max : min + quotient * step;
19051
+ }
19005
19052
 
19006
- return remainder === 0 ? settings.max : min + quotient * step;
19053
+ return module.cache.max;
19007
19054
  },
19008
19055
  step: function () {
19009
19056
  return settings.step;
19010
19057
  },
19011
19058
  numLabels: function () {
19012
- var step = module.get.step(),
19013
- precision = module.get.precision(),
19014
- value = Math.round(((module.get.max() - module.get.min()) / (step === 0 ? 1 : step)) * precision) / precision;
19015
- module.debug('Determined that there should be ' + value + ' labels');
19059
+ if (module.cache.numLabels === undefined) {
19060
+ var step = module.get.step(),
19061
+ precision = module.get.precision(),
19062
+ value = Math.round(((module.get.max() - module.get.min()) / (step === 0 ? 1 : step)) * precision) / precision;
19063
+ module.debug('Determined that there should be ' + value + ' labels');
19064
+ module.cache.numLabels = value;
19065
+ }
19016
19066
 
19017
- return value;
19067
+ return module.cache.numLabels;
19018
19068
  },
19019
19069
  labelType: function () {
19020
19070
  return settings.labelType;
19021
19071
  },
19022
- label: function (value) {
19023
- if (interpretLabel) {
19024
- return interpretLabel(value);
19072
+ label: function (value, stepValue) {
19073
+ if (isFunction(interpretLabel)) {
19074
+ return interpretLabel(value, stepValue, module);
19025
19075
  }
19026
19076
 
19027
19077
  switch (settings.labelType) {
19028
19078
  case settings.labelTypes.number: {
19029
- var step = module.get.step();
19030
-
19031
- return Math.round(((value * (step === 0 ? 1 : step)) + module.get.min()) * precision) / precision;
19079
+ return stepValue;
19032
19080
  }
19033
19081
  case settings.labelTypes.letter: {
19034
- return alphabet[value % 26];
19082
+ if (value < 0 || module.get.precision() > 1) {
19083
+ module.error(error.invalidLetterNumber, value);
19084
+
19085
+ return value;
19086
+ }
19087
+ var letterLabel = '',
19088
+ letters = Array.isArray(settings.letters) ? settings.letters : String(settings.letters).split(''),
19089
+ lettersLen = letters.length
19090
+ ;
19091
+
19092
+ while (stepValue >= 0) {
19093
+ letterLabel = letters[stepValue % lettersLen] + letterLabel;
19094
+ stepValue = Math.floor(stepValue / lettersLen) - 1;
19095
+ }
19096
+
19097
+ return letterLabel;
19035
19098
  }
19036
19099
  default: {
19037
19100
  return value;
@@ -19041,6 +19104,9 @@
19041
19104
  value: function () {
19042
19105
  return value;
19043
19106
  },
19107
+ settings: function () {
19108
+ return settings;
19109
+ },
19044
19110
  currentThumbValue: function () {
19045
19111
  return $currThumb !== undefined && $currThumb.hasClass('second') ? module.secondThumbVal : module.thumbVal;
19046
19112
  },
@@ -19085,6 +19151,7 @@
19085
19151
  if (settings.autoAdjustLabels) {
19086
19152
  var
19087
19153
  numLabels = module.get.numLabels(),
19154
+ primePlus = module.is.prime(numLabels) ? 1 : 0,
19088
19155
  trackLength = module.get.trackLength(),
19089
19156
  gapCounter = 1
19090
19157
  ;
@@ -19094,7 +19161,7 @@
19094
19161
  // and apply only if the modulo of the operation is an odd number.
19095
19162
  if (trackLength > 0) {
19096
19163
  while ((trackLength / numLabels) * gapCounter < settings.labelDistance) {
19097
- if (!(numLabels % gapCounter)) {
19164
+ if (!((numLabels + primePlus) % gapCounter) || settings.autoAdjustLabels === 'fixed') {
19098
19165
  gapRatio = gapCounter;
19099
19166
  }
19100
19167
  gapCounter += 1;
@@ -19232,6 +19299,7 @@
19232
19299
  },
19233
19300
  value: function (position) {
19234
19301
  var
19302
+ precision = module.get.precision(),
19235
19303
  startPos = module.is.reversed() ? module.get.trackEndPos() : module.get.trackStartPos(),
19236
19304
  endPos = module.is.reversed() ? module.get.trackStartPos() : module.get.trackEndPos(),
19237
19305
  ratio = (position - startPos) / (endPos - startPos),
@@ -19300,6 +19368,30 @@
19300
19368
  },
19301
19369
 
19302
19370
  set: {
19371
+ active: function (thumbVal, secondThumbVal) {
19372
+ if (settings.highlightRange) {
19373
+ if (secondThumbVal < thumbVal) {
19374
+ var tempVal = secondThumbVal;
19375
+ secondThumbVal = thumbVal;
19376
+ thumbVal = tempVal;
19377
+ }
19378
+ var $children = $labels.find('.label');
19379
+ $children.each(function (index) {
19380
+ var
19381
+ $child = $(this),
19382
+ attrValue = $child.attr('data-value')
19383
+ ;
19384
+ if (attrValue) {
19385
+ attrValue = parseInt(attrValue, 10);
19386
+ if (attrValue >= thumbVal && attrValue <= secondThumbVal) {
19387
+ $child.addClass(className.active);
19388
+ } else {
19389
+ $child.removeClass(className.active);
19390
+ }
19391
+ }
19392
+ });
19393
+ }
19394
+ },
19303
19395
  value: function (newValue, fireChange) {
19304
19396
  fireChange = fireChange !== false;
19305
19397
  var toReset = previousValue === undefined;
@@ -19427,6 +19519,7 @@
19427
19519
  position = newPos;
19428
19520
  thumbVal = newValue;
19429
19521
  }
19522
+ module.set.active(thumbVal, secondThumbVal);
19430
19523
  var
19431
19524
  trackPosValue,
19432
19525
  thumbPosValue,
@@ -19534,6 +19627,7 @@
19534
19627
  } else {
19535
19628
  return settings[name];
19536
19629
  }
19630
+ module.clear.cache();
19537
19631
  },
19538
19632
  internal: function (name, value) {
19539
19633
  if ($.isPlainObject(name)) {
@@ -19706,6 +19800,7 @@
19706
19800
  method: 'The method you called is not defined.',
19707
19801
  notrange: 'This slider is not a range slider',
19708
19802
  invalidRanges: 'Invalid range settings (start/end/minRange/maxRange)',
19803
+ invalidLetterNumber: 'Negative values or decimal places for labelType: "letter" are not supported',
19709
19804
  },
19710
19805
 
19711
19806
  metadata: {
@@ -19728,6 +19823,7 @@
19728
19823
  preventCrossover: true,
19729
19824
  fireOnInit: false,
19730
19825
  interpretLabel: false,
19826
+ letters: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
19731
19827
 
19732
19828
  // the decimal place to round to if step is undefined
19733
19829
  decimalPlaces: 2,
@@ -19745,6 +19841,8 @@
19745
19841
  vertical: 'vertical',
19746
19842
  range: 'range',
19747
19843
  smooth: 'smooth',
19844
+ label: 'label',
19845
+ active: 'active',
19748
19846
  },
19749
19847
 
19750
19848
  keys: {
@@ -19757,6 +19855,7 @@
19757
19855
  },
19758
19856
 
19759
19857
  restrictedLabels: [],
19858
+ highlightRange: false,
19760
19859
  showThumbTooltip: false,
19761
19860
  tooltipConfig: {
19762
19861
  position: 'top center',
@@ -19774,7 +19873,7 @@
19774
19873
  })(jQuery, window, document);
19775
19874
 
19776
19875
  /*!
19777
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Rating
19876
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Rating
19778
19877
  * https://github.com/fomantic/Fomantic-UI/
19779
19878
  *
19780
19879
  *
@@ -20315,7 +20414,7 @@
20315
20414
  })(jQuery, window, document);
20316
20415
 
20317
20416
  /*!
20318
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Search
20417
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Search
20319
20418
  * https://github.com/fomantic/Fomantic-UI/
20320
20419
  *
20321
20420
  *
@@ -21946,7 +22045,7 @@
21946
22045
  })(jQuery, window, document);
21947
22046
 
21948
22047
  /*!
21949
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Shape
22048
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Shape
21950
22049
  * https://github.com/fomantic/Fomantic-UI/
21951
22050
  *
21952
22051
  *
@@ -22744,7 +22843,7 @@
22744
22843
  })(jQuery, window, document);
22745
22844
 
22746
22845
  /*!
22747
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Sidebar
22846
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Sidebar
22748
22847
  * https://github.com/fomantic/Fomantic-UI/
22749
22848
  *
22750
22849
  *
@@ -23799,7 +23898,7 @@
23799
23898
  })(jQuery, window, document);
23800
23899
 
23801
23900
  /*!
23802
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Sticky
23901
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Sticky
23803
23902
  * https://github.com/fomantic/Fomantic-UI/
23804
23903
  *
23805
23904
  *
@@ -24717,7 +24816,7 @@
24717
24816
  })(jQuery, window, document);
24718
24817
 
24719
24818
  /*!
24720
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Tab
24819
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Tab
24721
24820
  * https://github.com/fomantic/Fomantic-UI/
24722
24821
  *
24723
24822
  *
@@ -25685,7 +25784,7 @@
25685
25784
  })(jQuery, window, document);
25686
25785
 
25687
25786
  /*!
25688
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Toast
25787
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Toast
25689
25788
  * https://github.com/fomantic/Fomantic-UI/
25690
25789
  *
25691
25790
  *
@@ -26650,7 +26749,7 @@
26650
26749
  })(jQuery, window, document);
26651
26750
 
26652
26751
  /*!
26653
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Transition
26752
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Transition
26654
26753
  * https://github.com/fomantic/Fomantic-UI/
26655
26754
  *
26656
26755
  *
@@ -27685,7 +27784,7 @@
27685
27784
  })(jQuery, window, document);
27686
27785
 
27687
27786
  /*!
27688
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - API
27787
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - API
27689
27788
  * https://github.com/fomantic/Fomantic-UI/
27690
27789
  *
27691
27790
  *
@@ -28911,7 +29010,7 @@
28911
29010
  })(jQuery, window, document);
28912
29011
 
28913
29012
  /*!
28914
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - State
29013
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - State
28915
29014
  * https://github.com/fomantic/Fomantic-UI/
28916
29015
  *
28917
29016
  *
@@ -29609,7 +29708,7 @@
29609
29708
  })(jQuery, window, document);
29610
29709
 
29611
29710
  /*!
29612
- * # Fomantic-UI 2.9.4-beta.81+f3182cf - Visibility
29711
+ * # Fomantic-UI 2.9.4-beta.83+9b313a5 - Visibility
29613
29712
  * https://github.com/fomantic/Fomantic-UI/
29614
29713
  *
29615
29714
  *