fomantic-ui 2.9.0-beta.310 → 2.9.0-beta.313

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 (174) hide show
  1. package/dist/components/accordion.css +1 -1
  2. package/dist/components/accordion.js +2 -2
  3. package/dist/components/accordion.min.css +1 -1
  4. package/dist/components/accordion.min.js +2 -2
  5. package/dist/components/ad.css +1 -1
  6. package/dist/components/ad.min.css +1 -1
  7. package/dist/components/api.js +4 -4
  8. package/dist/components/api.min.js +2 -2
  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 +3 -4
  15. package/dist/components/calendar.min.css +1 -1
  16. package/dist/components/calendar.min.js +2 -2
  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 +2 -2
  21. package/dist/components/checkbox.min.css +1 -1
  22. package/dist/components/checkbox.min.js +2 -2
  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 +3 -6
  29. package/dist/components/dimmer.min.css +1 -1
  30. package/dist/components/dimmer.min.js +2 -2
  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 +24 -50
  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 +3 -5
  39. package/dist/components/embed.min.css +1 -1
  40. package/dist/components/embed.min.js +2 -2
  41. package/dist/components/feed.css +1 -1
  42. package/dist/components/feed.min.css +1 -1
  43. package/dist/components/flag.css +1 -1
  44. package/dist/components/flag.min.css +1 -1
  45. package/dist/components/form.css +1 -1
  46. package/dist/components/form.js +8 -13
  47. package/dist/components/form.min.css +1 -1
  48. package/dist/components/form.min.js +2 -2
  49. package/dist/components/grid.css +1 -1
  50. package/dist/components/grid.min.css +1 -1
  51. package/dist/components/header.css +1 -1
  52. package/dist/components/header.min.css +1 -1
  53. package/dist/components/icon.css +1 -1
  54. package/dist/components/icon.min.css +1 -1
  55. package/dist/components/image.css +1 -1
  56. package/dist/components/image.min.css +1 -1
  57. package/dist/components/input.css +1 -1
  58. package/dist/components/input.min.css +1 -1
  59. package/dist/components/item.css +1 -1
  60. package/dist/components/item.min.css +1 -1
  61. package/dist/components/label.css +1 -1
  62. package/dist/components/label.min.css +1 -1
  63. package/dist/components/list.css +1 -1
  64. package/dist/components/list.min.css +1 -1
  65. package/dist/components/loader.css +1 -1
  66. package/dist/components/loader.min.css +1 -1
  67. package/dist/components/message.css +1 -1
  68. package/dist/components/message.min.css +1 -1
  69. package/dist/components/modal.css +1 -1
  70. package/dist/components/modal.js +8 -7
  71. package/dist/components/modal.min.css +1 -1
  72. package/dist/components/modal.min.js +2 -2
  73. package/dist/components/nag.css +1 -1
  74. package/dist/components/nag.js +2 -2
  75. package/dist/components/nag.min.css +1 -1
  76. package/dist/components/nag.min.js +2 -2
  77. package/dist/components/placeholder.css +1 -1
  78. package/dist/components/placeholder.min.css +1 -1
  79. package/dist/components/popup.css +1 -1
  80. package/dist/components/popup.js +5 -13
  81. package/dist/components/popup.min.css +1 -1
  82. package/dist/components/popup.min.js +2 -2
  83. package/dist/components/progress.css +1 -1
  84. package/dist/components/progress.js +3 -3
  85. package/dist/components/progress.min.css +1 -1
  86. package/dist/components/progress.min.js +2 -2
  87. package/dist/components/rail.css +1 -1
  88. package/dist/components/rail.min.css +1 -1
  89. package/dist/components/rating.css +1 -1
  90. package/dist/components/rating.js +2 -2
  91. package/dist/components/rating.min.css +1 -1
  92. package/dist/components/rating.min.js +2 -2
  93. package/dist/components/reset.css +1 -1
  94. package/dist/components/reset.min.css +1 -1
  95. package/dist/components/reveal.css +1 -1
  96. package/dist/components/reveal.min.css +1 -1
  97. package/dist/components/search.css +1 -1
  98. package/dist/components/search.js +11 -8
  99. package/dist/components/search.min.css +1 -1
  100. package/dist/components/search.min.js +2 -2
  101. package/dist/components/segment.css +1 -1
  102. package/dist/components/segment.min.css +1 -1
  103. package/dist/components/shape.css +1 -1
  104. package/dist/components/shape.js +2 -2
  105. package/dist/components/shape.min.css +1 -1
  106. package/dist/components/shape.min.js +2 -2
  107. package/dist/components/sidebar.css +7 -3
  108. package/dist/components/sidebar.js +105 -28
  109. package/dist/components/sidebar.min.css +2 -2
  110. package/dist/components/sidebar.min.js +2 -2
  111. package/dist/components/site.css +1 -1
  112. package/dist/components/site.js +2 -2
  113. package/dist/components/site.min.css +1 -1
  114. package/dist/components/site.min.js +2 -2
  115. package/dist/components/slider.js +12 -14
  116. package/dist/components/slider.min.js +2 -2
  117. package/dist/components/state.js +2 -2
  118. package/dist/components/state.min.js +2 -2
  119. package/dist/components/statistic.css +1 -1
  120. package/dist/components/statistic.min.css +1 -1
  121. package/dist/components/step.css +1 -1
  122. package/dist/components/step.min.css +1 -1
  123. package/dist/components/sticky.css +1 -1
  124. package/dist/components/sticky.js +6 -13
  125. package/dist/components/sticky.min.css +1 -1
  126. package/dist/components/sticky.min.js +2 -2
  127. package/dist/components/tab.css +1 -1
  128. package/dist/components/tab.js +2 -2
  129. package/dist/components/tab.min.css +1 -1
  130. package/dist/components/tab.min.js +2 -2
  131. package/dist/components/table.css +1 -1
  132. package/dist/components/table.min.css +1 -1
  133. package/dist/components/text.css +1 -1
  134. package/dist/components/text.min.css +1 -1
  135. package/dist/components/toast.css +1 -1
  136. package/dist/components/toast.js +4 -4
  137. package/dist/components/toast.min.css +1 -1
  138. package/dist/components/toast.min.js +2 -2
  139. package/dist/components/transition.css +1 -1
  140. package/dist/components/transition.js +6 -8
  141. package/dist/components/transition.min.css +1 -1
  142. package/dist/components/transition.min.js +2 -2
  143. package/dist/components/visibility.js +2 -2
  144. package/dist/components/visibility.min.js +2 -2
  145. package/dist/semantic.css +56 -51
  146. package/dist/semantic.js +224 -199
  147. package/dist/semantic.min.css +2 -2
  148. package/dist/semantic.min.js +2 -2
  149. package/package.json +1 -1
  150. package/src/definitions/behaviors/api.js +3 -3
  151. package/src/definitions/behaviors/form.js +7 -12
  152. package/src/definitions/behaviors/state.js +1 -1
  153. package/src/definitions/behaviors/visibility.js +1 -1
  154. package/src/definitions/globals/site.js +1 -1
  155. package/src/definitions/modules/accordion.js +1 -1
  156. package/src/definitions/modules/calendar.js +2 -3
  157. package/src/definitions/modules/checkbox.js +1 -1
  158. package/src/definitions/modules/dimmer.js +2 -5
  159. package/src/definitions/modules/dropdown.js +23 -49
  160. package/src/definitions/modules/embed.js +2 -4
  161. package/src/definitions/modules/modal.js +7 -6
  162. package/src/definitions/modules/nag.js +1 -1
  163. package/src/definitions/modules/popup.js +4 -12
  164. package/src/definitions/modules/progress.js +2 -2
  165. package/src/definitions/modules/rating.js +1 -1
  166. package/src/definitions/modules/search.js +10 -7
  167. package/src/definitions/modules/shape.js +1 -1
  168. package/src/definitions/modules/sidebar.js +104 -27
  169. package/src/definitions/modules/sidebar.less +6 -2
  170. package/src/definitions/modules/slider.js +11 -13
  171. package/src/definitions/modules/sticky.js +5 -12
  172. package/src/definitions/modules/tab.js +1 -1
  173. package/src/definitions/modules/toast.js +3 -3
  174. package/src/definitions/modules/transition.js +5 -7
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.310+19b7d18
2
+ * # Fomantic UI - 2.9.0-beta.313+6dec24a
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Site
12
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Site
13
13
  * http://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -369,7 +369,7 @@ $.site = $.fn.site = function(parameters) {
369
369
  response
370
370
  ;
371
371
  passedArguments = passedArguments || queryArguments;
372
- context = element || context;
372
+ context = context || element;
373
373
  if(typeof query == 'string' && object !== undefined) {
374
374
  query = query.split(/[\. ]/);
375
375
  maxDepth = query.length - 1;
@@ -503,7 +503,7 @@ $.extend($.expr[ ":" ], {
503
503
  })( jQuery, window, document );
504
504
 
505
505
  /*!
506
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Form Validation
506
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Form Validation
507
507
  * http://github.com/fomantic/Fomantic-UI/
508
508
  *
509
509
  *
@@ -969,7 +969,7 @@ $.fn.form = function(parameters) {
969
969
  },
970
970
  beforeUnload: function(event) {
971
971
  if (module.is.dirty() && !submitting) {
972
- var event = event || window.event;
972
+ event = event || window.event;
973
973
 
974
974
  // For modern browsers
975
975
  if (event) {
@@ -1305,16 +1305,11 @@ $.fn.form = function(parameters) {
1305
1305
  if(typeof identifier !== 'string') {
1306
1306
  module.error(error.identifier, identifier);
1307
1307
  }
1308
- if($field.filter('#' + identifier).length > 0 ) {
1309
- return true;
1310
- }
1311
- else if( $field.filter('[name="' + identifier +'"]').length > 0 ) {
1312
- return true;
1313
- }
1314
- else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) {
1315
- return true;
1316
- }
1317
- return false;
1308
+ return (
1309
+ $field.filter('#' + identifier).length > 0 ||
1310
+ $field.filter('[name="' + identifier +'"]').length > 0 ||
1311
+ $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0
1312
+ );
1318
1313
  }
1319
1314
 
1320
1315
  },
@@ -1961,7 +1956,7 @@ $.fn.form = function(parameters) {
1961
1956
  response
1962
1957
  ;
1963
1958
  passedArguments = passedArguments || queryArguments;
1964
- context = element || context;
1959
+ context = context || element;
1965
1960
  if(typeof query == 'string' && object !== undefined) {
1966
1961
  query = query.split(/[\. ]/);
1967
1962
  maxDepth = query.length - 1;
@@ -2584,7 +2579,7 @@ $.fn.form.settings = {
2584
2579
  })( jQuery, window, document );
2585
2580
 
2586
2581
  /*!
2587
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Accordion
2582
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Accordion
2588
2583
  * http://github.com/fomantic/Fomantic-UI/
2589
2584
  *
2590
2585
  *
@@ -3081,7 +3076,7 @@ $.fn.accordion = function(parameters) {
3081
3076
  response
3082
3077
  ;
3083
3078
  passedArguments = passedArguments || queryArguments;
3084
- context = element || context;
3079
+ context = context || element;
3085
3080
  if(typeof query == 'string' && object !== undefined) {
3086
3081
  query = query.split(/[\. ]/);
3087
3082
  maxDepth = query.length - 1;
@@ -3209,7 +3204,7 @@ $.extend( $.easing, {
3209
3204
 
3210
3205
 
3211
3206
  /*!
3212
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Calendar
3207
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Calendar
3213
3208
  * http://github.com/fomantic/Fomantic-UI/
3214
3209
  *
3215
3210
  *
@@ -3809,9 +3804,9 @@ $.fn.calendar = function(parameters) {
3809
3804
  }
3810
3805
 
3811
3806
  if (module.popup('is visible')) {
3807
+ var mode = module.get.mode();
3812
3808
  if (keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
3813
3809
  //arrow keys
3814
- var mode = module.get.mode();
3815
3810
  var bigIncrement = mode === 'day' ? 7 : mode === 'hour' ? 4 : mode === 'minute' ? timeGap['column'] : 3;
3816
3811
  var increment = keyCode === 37 ? -1 : keyCode === 38 ? -bigIncrement : keyCode == 39 ? 1 : bigIncrement;
3817
3812
  increment *= mode === 'minute' ? settings.minTimeGap : 1;
@@ -3830,7 +3825,6 @@ $.fn.calendar = function(parameters) {
3830
3825
  }
3831
3826
  } else if (keyCode === 13) {
3832
3827
  //enter
3833
- var mode = module.get.mode();
3834
3828
  var date = module.get.focusDate();
3835
3829
  if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode) && module.helper.isEnabled(date, mode)) {
3836
3830
  if (settings.onSelect.call(element, date, module.get.mode()) !== false) {
@@ -4623,7 +4617,7 @@ $.fn.calendar = function(parameters) {
4623
4617
  response
4624
4618
  ;
4625
4619
  passedArguments = passedArguments || queryArguments;
4626
- context = element || context;
4620
+ context = context || element;
4627
4621
  if (typeof query == 'string' && object !== undefined) {
4628
4622
  query = query.split(/[\. ]/);
4629
4623
  maxDepth = query.length - 1;
@@ -5101,7 +5095,7 @@ $.fn.calendar.settings = {
5101
5095
  })(jQuery, window, document);
5102
5096
 
5103
5097
  /*!
5104
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Checkbox
5098
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Checkbox
5105
5099
  * http://github.com/fomantic/Fomantic-UI/
5106
5100
  *
5107
5101
  *
@@ -5856,7 +5850,7 @@ $.fn.checkbox = function(parameters) {
5856
5850
  response
5857
5851
  ;
5858
5852
  passedArguments = passedArguments || queryArguments;
5859
- context = element || context;
5853
+ context = context || element;
5860
5854
  if(typeof query == 'string' && object !== undefined) {
5861
5855
  query = query.split(/[\. ]/);
5862
5856
  maxDepth = query.length - 1;
@@ -5985,7 +5979,7 @@ $.fn.checkbox.settings = {
5985
5979
  })( jQuery, window, document );
5986
5980
 
5987
5981
  /*!
5988
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Dimmer
5982
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Dimmer
5989
5983
  * http://github.com/fomantic/Fomantic-UI/
5990
5984
  *
5991
5985
  *
@@ -6366,10 +6360,7 @@ $.fn.dimmer = function(parameters) {
6366
6360
  },
6367
6361
  closable: function() {
6368
6362
  if(settings.closable == 'auto') {
6369
- if(settings.on == 'hover') {
6370
- return false;
6371
- }
6372
- return true;
6363
+ return settings.on != 'hover';
6373
6364
  }
6374
6365
  return settings.closable;
6375
6366
  },
@@ -6588,7 +6579,7 @@ $.fn.dimmer = function(parameters) {
6588
6579
  response
6589
6580
  ;
6590
6581
  passedArguments = passedArguments || queryArguments;
6591
- context = element || context;
6582
+ context = context || element;
6592
6583
  if(typeof query == 'string' && object !== undefined) {
6593
6584
  query = query.split(/[\. ]/);
6594
6585
  maxDepth = query.length - 1;
@@ -6754,7 +6745,7 @@ $.fn.dimmer.settings = {
6754
6745
  })( jQuery, window, document );
6755
6746
 
6756
6747
  /*!
6757
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Dropdown
6748
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Dropdown
6758
6749
  * http://github.com/fomantic/Fomantic-UI/
6759
6750
  *
6760
6751
  *
@@ -6983,7 +6974,6 @@ $.fn.dropdown = function(parameters) {
6983
6974
  var
6984
6975
  $userChoices,
6985
6976
  $userChoice,
6986
- isUserValue,
6987
6977
  html
6988
6978
  ;
6989
6979
  values = values || module.get.userValues();
@@ -7669,30 +7659,18 @@ $.fn.dropdown = function(parameters) {
7669
7659
  }
7670
7660
  if(settings.match === 'both' || settings.match === 'text') {
7671
7661
  text = module.remove.diacritics(String(module.get.choiceText($choice, false)));
7672
- if(text.search(beginsWithRegExp) !== -1) {
7673
- results.push(this);
7674
- return true;
7675
- }
7676
- else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, text)) {
7677
- results.push(this);
7678
- return true;
7679
- }
7680
- else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text)) {
7662
+ if(text.search(beginsWithRegExp) !== -1 ||
7663
+ (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, text)) ||
7664
+ (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text))) {
7681
7665
  results.push(this);
7682
7666
  return true;
7683
7667
  }
7684
7668
  }
7685
7669
  if(settings.match === 'both' || settings.match === 'value') {
7686
7670
  value = module.remove.diacritics(String(module.get.choiceValue($choice, text)));
7687
- if(value.search(beginsWithRegExp) !== -1) {
7688
- results.push(this);
7689
- return true;
7690
- }
7691
- else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, value)) {
7692
- results.push(this);
7693
- return true;
7694
- }
7695
- else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, value)) {
7671
+ if(value.search(beginsWithRegExp) !== -1 ||
7672
+ (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, value)) ||
7673
+ (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, value))) {
7696
7674
  results.push(this);
7697
7675
  return true;
7698
7676
  }
@@ -8193,8 +8171,7 @@ $.fn.dropdown = function(parameters) {
8193
8171
  isFocusedOnSearch = module.is.focusedOnSearch(),
8194
8172
  isFocused = module.is.focused(),
8195
8173
  caretAtStart = (isFocusedOnSearch && module.get.caretPosition(false) === 0),
8196
- isSelectedSearch = (caretAtStart && module.get.caretPosition(true) !== 0),
8197
- $nextLabel
8174
+ isSelectedSearch = (caretAtStart && module.get.caretPosition(true) !== 0)
8198
8175
  ;
8199
8176
  if(isSearch && !hasActiveLabel && !isFocusedOnSearch) {
8200
8177
  return;
@@ -8311,8 +8288,7 @@ $.fn.dropdown = function(parameters) {
8311
8288
  delimiterPressed = (event.key === settings.delimiter && module.is.multiple()),
8312
8289
  isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && (pressedKey == keys.enter || delimiterPressed) && selectedIsSelectable),
8313
8290
  $nextItem,
8314
- isSubMenuItem,
8315
- newIndex
8291
+ isSubMenuItem
8316
8292
  ;
8317
8293
  // allow selection with menu closed
8318
8294
  if(isAdditionWithoutMenu) {
@@ -8416,7 +8392,7 @@ $.fn.dropdown = function(parameters) {
8416
8392
  // down arrow (traverse menu down)
8417
8393
  if(pressedKey == keys.downArrow) {
8418
8394
  $nextItem = (hasSelectedItem && inVisibleMenu)
8419
- ? $nextItem = $selectedItem.nextAll(selector.item + ':not(' + selector.unselectable + ')').eq(0)
8395
+ ? $selectedItem.nextAll(selector.item + ':not(' + selector.unselectable + ')').eq(0)
8420
8396
  : $item.eq(0)
8421
8397
  ;
8422
8398
  if($nextItem.length === 0) {
@@ -9171,7 +9147,6 @@ $.fn.dropdown = function(parameters) {
9171
9147
  currentScroll = $menu.scrollTop(),
9172
9148
  itemHeight = $item.eq(0).outerHeight(),
9173
9149
  itemsPerPage = Math.floor(menuHeight / itemHeight),
9174
- maxScroll = $menu.prop('scrollHeight'),
9175
9150
  newScroll = (direction == 'up')
9176
9151
  ? currentScroll - (itemHeight * itemsPerPage)
9177
9152
  : currentScroll + (itemHeight * itemsPerPage),
@@ -9296,7 +9271,6 @@ $.fn.dropdown = function(parameters) {
9296
9271
  $menu,
9297
9272
  hasActive,
9298
9273
  offset,
9299
- itemHeight,
9300
9274
  itemOffset,
9301
9275
  menuOffset,
9302
9276
  menuScroll,
@@ -9459,8 +9433,7 @@ $.fn.dropdown = function(parameters) {
9459
9433
  currentValue = module.get.values(),
9460
9434
  stringValue = (value !== undefined)
9461
9435
  ? String(value)
9462
- : value,
9463
- newValue
9436
+ : value
9464
9437
  ;
9465
9438
  if(hasInput) {
9466
9439
  if(!settings.allowReselection && stringValue == currentValue) {
@@ -9669,7 +9642,7 @@ $.fn.dropdown = function(parameters) {
9669
9642
  ;
9670
9643
  }
9671
9644
  else {
9672
- $message = $('<div/>')
9645
+ $('<div/>')
9673
9646
  .html(html)
9674
9647
  .addClass(className.message)
9675
9648
  .appendTo($menu)
@@ -9752,16 +9725,13 @@ $.fn.dropdown = function(parameters) {
9752
9725
  hasCount = (message.search('{count}') !== -1),
9753
9726
  hasMaxCount = (message.search('{maxCount}') !== -1),
9754
9727
  hasTerm = (message.search('{term}') !== -1),
9755
- count,
9756
9728
  query
9757
9729
  ;
9758
9730
  module.verbose('Adding templated variables to message', message);
9759
9731
  if(hasCount) {
9760
- count = module.get.selectionCount();
9761
- message = message.replace('{count}', count);
9732
+ message = message.replace('{count}', module.get.selectionCount());
9762
9733
  }
9763
9734
  if(hasMaxCount) {
9764
- count = module.get.selectionCount();
9765
9735
  message = message.replace('{maxCount}', settings.maxSelections);
9766
9736
  }
9767
9737
  if(hasTerm) {
@@ -10208,7 +10178,7 @@ $.fn.dropdown = function(parameters) {
10208
10178
  return (document.activeElement === $search[0]);
10209
10179
  },
10210
10180
  allFiltered: function() {
10211
- return( (module.is.multiple() || module.has.search()) && !(settings.hideAdditions == false && module.has.userSuggestion()) && !module.has.message() && module.has.allResultsFiltered() );
10181
+ return( (module.is.multiple() || module.has.search()) && !(!settings.hideAdditions && module.has.userSuggestion()) && !module.has.message() && module.has.allResultsFiltered() );
10212
10182
  },
10213
10183
  hidden: function($subMenu) {
10214
10184
  return !module.is.visible($subMenu);
@@ -10294,22 +10264,17 @@ $.fn.dropdown = function(parameters) {
10294
10264
 
10295
10265
  can: {
10296
10266
  activate: function($item) {
10297
- if(settings.useLabels) {
10298
- return true;
10299
- }
10300
- if(!module.has.maxSelections()) {
10301
- return true;
10302
- }
10303
- if(module.has.maxSelections() && $item.hasClass(className.active)) {
10304
- return true;
10305
- }
10306
- return false;
10267
+ return (
10268
+ settings.useLabels ||
10269
+ !module.has.maxSelections() ||
10270
+ (module.has.maxSelections() && $item.hasClass(className.active))
10271
+ );
10307
10272
  },
10308
10273
  openDownward: function($subMenu) {
10309
10274
  var
10310
10275
  $currentMenu = $subMenu || $menu,
10311
- canOpenDownward = true,
10312
- onScreen = {},
10276
+ canOpenDownward,
10277
+ onScreen,
10313
10278
  calculations
10314
10279
  ;
10315
10280
  $currentMenu
@@ -10569,7 +10534,7 @@ $.fn.dropdown = function(parameters) {
10569
10534
  }
10570
10535
  ;
10571
10536
  if(shouldEscape.test(string)) {
10572
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
10537
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
10573
10538
  return string.replace(badChars, escapedChar);
10574
10539
  }
10575
10540
  return string;
@@ -10691,7 +10656,7 @@ $.fn.dropdown = function(parameters) {
10691
10656
  response
10692
10657
  ;
10693
10658
  passedArguments = passedArguments || queryArguments;
10694
- context = element || context;
10659
+ context = context || element;
10695
10660
  if(typeof query == 'string' && object !== undefined) {
10696
10661
  query = query.split(/[\. ]/);
10697
10662
  maxDepth = query.length - 1;
@@ -11006,7 +10971,7 @@ $.fn.dropdown.settings.templates = {
11006
10971
  }
11007
10972
  ;
11008
10973
  if(shouldEscape.test(string)) {
11009
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
10974
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
11010
10975
  return string.replace(badChars, escapedChar);
11011
10976
  }
11012
10977
  return string;
@@ -11136,7 +11101,7 @@ $.fn.dropdown.settings.templates = {
11136
11101
  })( jQuery, window, document );
11137
11102
 
11138
11103
  /*!
11139
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Embed
11104
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Embed
11140
11105
  * http://github.com/fomantic/Fomantic-UI/
11141
11106
  *
11142
11107
  *
@@ -11265,9 +11230,7 @@ $.fn.embed = function(parameters) {
11265
11230
 
11266
11231
  createPlaceholder: function(placeholder) {
11267
11232
  var
11268
- icon = module.get.icon(),
11269
- url = module.get.url(),
11270
- embed = module.generate.embed(url)
11233
+ icon = module.get.icon()
11271
11234
  ;
11272
11235
  placeholder = placeholder || module.get.placeholder();
11273
11236
  $module.html( templates.placeholder(placeholder, icon) );
@@ -11646,7 +11609,7 @@ $.fn.embed = function(parameters) {
11646
11609
  response
11647
11610
  ;
11648
11611
  passedArguments = passedArguments || queryArguments;
11649
- context = element || context;
11612
+ context = context || element;
11650
11613
  if(typeof query == 'string' && object !== undefined) {
11651
11614
  query = query.split(/[\. ]/);
11652
11615
  maxDepth = query.length - 1;
@@ -11852,7 +11815,7 @@ $.fn.embed.settings = {
11852
11815
  })( jQuery, window, document );
11853
11816
 
11854
11817
  /*!
11855
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Modal
11818
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Modal
11856
11819
  * http://github.com/fomantic/Fomantic-UI/
11857
11820
  *
11858
11821
  *
@@ -11876,7 +11839,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
11876
11839
  : Function('return this')()
11877
11840
  ;
11878
11841
 
11879
- $.fn.modal = function(parameters) {
11842
+ $.modal = $.fn.modal = function(parameters) {
11880
11843
  var
11881
11844
  $allModules = $(this),
11882
11845
  $window = $(window),
@@ -11928,8 +11891,10 @@ $.fn.modal = function(parameters) {
11928
11891
  $dimmable,
11929
11892
  $dimmer,
11930
11893
 
11894
+ isModalComponent = $module.hasClass('modal'),
11895
+
11931
11896
  element = this,
11932
- instance = $module.hasClass('modal') ? $module.data(moduleNamespace) : undefined,
11897
+ instance = isModalComponent ? $module.data(moduleNamespace) : undefined,
11933
11898
 
11934
11899
  ignoreRepeatedEvents = false,
11935
11900
 
@@ -11947,7 +11912,7 @@ $.fn.modal = function(parameters) {
11947
11912
 
11948
11913
  initialize: function() {
11949
11914
  module.create.id();
11950
- if(!$module.hasClass('modal')) {
11915
+ if(!isModalComponent) {
11951
11916
  module.create.modal();
11952
11917
  if(!$.isFunction(settings.onHidden)) {
11953
11918
  settings.onHidden = function () {
@@ -12522,7 +12487,6 @@ $.fn.modal = function(parameters) {
12522
12487
  }
12523
12488
  else {
12524
12489
  module.debug('Dimmer is not visible cannot hide');
12525
- return;
12526
12490
  }
12527
12491
  },
12528
12492
 
@@ -12714,7 +12678,7 @@ $.fn.modal = function(parameters) {
12714
12678
  }
12715
12679
  ;
12716
12680
  if(shouldEscape.test(string)) {
12717
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
12681
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
12718
12682
  return string.replace(badChars, escapedChar);
12719
12683
  }
12720
12684
  return string;
@@ -13075,7 +13039,7 @@ $.fn.modal = function(parameters) {
13075
13039
  response
13076
13040
  ;
13077
13041
  passedArguments = passedArguments || queryArguments;
13078
- context = element || context;
13042
+ context = context || element;
13079
13043
  if(typeof query == 'string' && object !== undefined) {
13080
13044
  query = query.split(/[\. ]/);
13081
13045
  maxDepth = query.length - 1;
@@ -13387,7 +13351,7 @@ $.fn.modal.settings.templates = {
13387
13351
  })( jQuery, window, document );
13388
13352
 
13389
13353
  /*!
13390
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Nag
13354
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Nag
13391
13355
  * http://github.com/fomantic/Fomantic-UI/
13392
13356
  *
13393
13357
  *
@@ -13791,7 +13755,7 @@ $.fn.nag = function(parameters) {
13791
13755
  response
13792
13756
  ;
13793
13757
  passedArguments = passedArguments || queryArguments;
13794
- context = element || context;
13758
+ context = context || element;
13795
13759
  if(typeof query == 'string' && object !== undefined) {
13796
13760
  query = query.split(/[\. ]/);
13797
13761
  maxDepth = query.length - 1;
@@ -13946,7 +13910,7 @@ $.extend( $.easing, {
13946
13910
  })( jQuery, window, document );
13947
13911
 
13948
13912
  /*!
13949
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Popup
13913
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Popup
13950
13914
  * http://github.com/fomantic/Fomantic-UI/
13951
13915
  *
13952
13916
  *
@@ -15034,10 +14998,7 @@ $.fn.popup = function(parameters) {
15034
14998
  is: {
15035
14999
  closable: function() {
15036
15000
  if(settings.closable == 'auto') {
15037
- if(settings.on == 'hover') {
15038
- return false;
15039
- }
15040
- return true;
15001
+ return settings.on != 'hover';
15041
15002
  }
15042
15003
  return settings.closable;
15043
15004
  },
@@ -15052,12 +15013,7 @@ $.fn.popup = function(parameters) {
15052
15013
  offstage.push(direction);
15053
15014
  }
15054
15015
  });
15055
- if(offstage.length > 0) {
15056
- return true;
15057
- }
15058
- else {
15059
- return false;
15060
- }
15016
+ return offstage.length > 0;
15061
15017
  },
15062
15018
  svg: function(element) {
15063
15019
  return module.supports.svg() && (element instanceof SVGGraphicsElement);
@@ -15211,7 +15167,7 @@ $.fn.popup = function(parameters) {
15211
15167
  response
15212
15168
  ;
15213
15169
  passedArguments = passedArguments || queryArguments;
15214
- context = element || context;
15170
+ context = context || element;
15215
15171
  if(typeof query == 'string' && object !== undefined) {
15216
15172
  query = query.split(/[\. ]/);
15217
15173
  maxDepth = query.length - 1;
@@ -15460,7 +15416,7 @@ $.fn.popup.settings = {
15460
15416
  }
15461
15417
  ;
15462
15418
  if(shouldEscape.test(string)) {
15463
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
15419
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
15464
15420
  return string.replace(badChars, escapedChar);
15465
15421
  }
15466
15422
  return string;
@@ -15490,7 +15446,7 @@ $.fn.popup.settings = {
15490
15446
  })( jQuery, window, document );
15491
15447
 
15492
15448
  /*!
15493
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Progress
15449
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Progress
15494
15450
  * http://github.com/fomantic/Fomantic-UI/
15495
15451
  *
15496
15452
  *
@@ -16368,7 +16324,7 @@ $.fn.progress = function(parameters) {
16368
16324
  response
16369
16325
  ;
16370
16326
  passedArguments = passedArguments || queryArguments;
16371
- context = element || context;
16327
+ context = context || element;
16372
16328
  if(typeof query == 'string' && object !== undefined) {
16373
16329
  query = query.split(/[\. ]/);
16374
16330
  maxDepth = query.length - 1;
@@ -16489,7 +16445,7 @@ $.fn.progress.settings = {
16489
16445
  },
16490
16446
 
16491
16447
  regExp: {
16492
- variable: /\{\$*[A-z0-9]+\}/g
16448
+ variable: /\{\$*[a-z0-9]+\}/gi
16493
16449
  },
16494
16450
 
16495
16451
  metadata: {
@@ -16527,7 +16483,7 @@ $.fn.progress.settings = {
16527
16483
  })( jQuery, window, document );
16528
16484
 
16529
16485
  /*!
16530
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Slider
16486
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Slider
16531
16487
  * http://github.com/fomantic/Fomantic-UI/
16532
16488
  *
16533
16489
  *
@@ -16982,8 +16938,8 @@ $.fn.slider = function(parameters) {
16982
16938
  module.setup.labels();
16983
16939
  },
16984
16940
  takeStep: function(multiplier) {
16941
+ multiplier = multiplier != undefined ? multiplier : 1;
16985
16942
  var
16986
- multiplier = multiplier != undefined ? multiplier : 1,
16987
16943
  step = module.get.step(),
16988
16944
  currValue = module.get.currentThumbValue()
16989
16945
  ;
@@ -17000,8 +16956,8 @@ $.fn.slider = function(parameters) {
17000
16956
  },
17001
16957
 
17002
16958
  backStep: function(multiplier) {
16959
+ multiplier = multiplier != undefined ? multiplier : 1;
17003
16960
  var
17004
- multiplier = multiplier != undefined ? multiplier : 1,
17005
16961
  step = module.get.step(),
17006
16962
  currValue = module.get.currentThumbValue()
17007
16963
  ;
@@ -17249,11 +17205,11 @@ $.fn.slider = function(parameters) {
17249
17205
  ;
17250
17206
  return pos;
17251
17207
  },
17252
- positionFromValue: function(value) {
17208
+ positionFromValue: function(val) {
17253
17209
  var
17254
17210
  min = module.get.min(),
17255
17211
  max = module.get.max(),
17256
- value = value > max ? max : value < min ? min : value,
17212
+ value = val > max ? max : val < min ? min : val,
17257
17213
  trackLength = module.get.trackLength(),
17258
17214
  ratio = (value - min) / (max - min),
17259
17215
  position = Math.round(ratio * trackLength)
@@ -17461,14 +17417,12 @@ $.fn.slider = function(parameters) {
17461
17417
  },
17462
17418
  position: function(position, which) {
17463
17419
  var thumbVal = module.determine.value(position);
17464
- switch (which) {
17465
- case 'second':
17466
- module.secondThumbVal = thumbVal;
17467
- module.update.position(thumbVal, $secondThumb);
17468
- break;
17469
- default:
17470
- module.thumbVal = thumbVal;
17471
- module.update.position(thumbVal, $thumb);
17420
+ if (which === 'second') {
17421
+ module.secondThumbVal = thumbVal;
17422
+ module.update.position(thumbVal, $secondThumb);
17423
+ } else {
17424
+ module.thumbVal = thumbVal;
17425
+ module.update.position(thumbVal, $thumb);
17472
17426
  }
17473
17427
  value = Math.abs(module.thumbVal - (module.secondThumbVal || 0));
17474
17428
  module.set.value(value);
@@ -17737,7 +17691,7 @@ $.fn.slider = function(parameters) {
17737
17691
  response
17738
17692
  ;
17739
17693
  passedArguments = passedArguments || queryArguments;
17740
- context = element || context;
17694
+ context = context || element;
17741
17695
  if(typeof query == 'string' && object !== undefined) {
17742
17696
  query = query.split(/[\. ]/);
17743
17697
  maxDepth = query.length - 1;
@@ -17883,7 +17837,7 @@ $.fn.slider.settings = {
17883
17837
  })( jQuery, window, document );
17884
17838
 
17885
17839
  /*!
17886
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Rating
17840
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Rating
17887
17841
  * http://github.com/fomantic/Fomantic-UI/
17888
17842
  *
17889
17843
  *
@@ -18303,7 +18257,7 @@ $.fn.rating = function(parameters) {
18303
18257
  response
18304
18258
  ;
18305
18259
  passedArguments = passedArguments || queryArguments;
18306
- context = element || context;
18260
+ context = context || element;
18307
18261
  if(typeof query == 'string' && object !== undefined) {
18308
18262
  query = query.split(/[\. ]/);
18309
18263
  maxDepth = query.length - 1;
@@ -18442,7 +18396,7 @@ $.fn.rating.settings = {
18442
18396
  })( jQuery, window, document );
18443
18397
 
18444
18398
  /*!
18445
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Search
18399
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Search
18446
18400
  * http://github.com/fomantic/Fomantic-UI/
18447
18401
  *
18448
18402
  *
@@ -18919,10 +18873,7 @@ $.fn.search = function(parameters) {
18919
18873
  return $prompt.val();
18920
18874
  },
18921
18875
  results: function() {
18922
- var
18923
- results = $module.data(metadata.results)
18924
- ;
18925
- return results;
18876
+ return $module.data(metadata.results);
18926
18877
  },
18927
18878
  result: function(value, results) {
18928
18879
  var
@@ -19139,7 +19090,7 @@ $.fn.search = function(parameters) {
19139
19090
  // content fuzzy matches (last in results)
19140
19091
  addResult(exactResults, content);
19141
19092
  }
19142
- else if(settings.fullTextSearch == true && module.fuzzySearch(searchTerm, text) ) {
19093
+ else if(settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text) ) {
19143
19094
  // content fuzzy matches (last in results)
19144
19095
  addResult(fuzzyResults, content);
19145
19096
  }
@@ -19649,7 +19600,7 @@ $.fn.search = function(parameters) {
19649
19600
  response
19650
19601
  ;
19651
19602
  passedArguments = passedArguments || queryArguments;
19652
- context = element || context;
19603
+ context = context || element;
19653
19604
  if(typeof query == 'string' && object !== undefined) {
19654
19605
  query = query.split(/[\. ]/);
19655
19606
  maxDepth = query.length - 1;
@@ -19880,7 +19831,7 @@ $.fn.search.settings = {
19880
19831
  }
19881
19832
  ;
19882
19833
  if(shouldEscape.test(string)) {
19883
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
19834
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
19884
19835
  return string.replace(badChars, escapedChar);
19885
19836
  }
19886
19837
  return string;
@@ -20031,10 +19982,16 @@ $.fn.search.settings = {
20031
19982
  }
20032
19983
  };
20033
19984
 
19985
+ $.extend($.easing, {
19986
+ easeOutExpo: function(x) {
19987
+ return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);
19988
+ }
19989
+ });
19990
+
20034
19991
  })( jQuery, window, document );
20035
19992
 
20036
19993
  /*!
20037
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Shape
19994
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Shape
20038
19995
  * http://github.com/fomantic/Fomantic-UI/
20039
19996
  *
20040
19997
  *
@@ -20742,7 +20699,7 @@ $.fn.shape = function(parameters) {
20742
20699
  response
20743
20700
  ;
20744
20701
  passedArguments = passedArguments || queryArguments;
20745
- context = element || context;
20702
+ context = context || element;
20746
20703
  if(typeof query == 'string' && object !== undefined) {
20747
20704
  query = query.split(/[\. ]/);
20748
20705
  maxDepth = query.length - 1;
@@ -20883,7 +20840,7 @@ $.fn.shape.settings = {
20883
20840
  })( jQuery, window, document );
20884
20841
 
20885
20842
  /*!
20886
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Sidebar
20843
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Sidebar
20887
20844
  * http://github.com/fomantic/Fomantic-UI/
20888
20845
  *
20889
20846
  *
@@ -20912,6 +20869,7 @@ $.fn.sidebar = function(parameters) {
20912
20869
  $allModules = $(this),
20913
20870
  $window = $(window),
20914
20871
  $document = $(document),
20872
+ $body = $('body'),
20915
20873
  $html = $('html'),
20916
20874
  $head = $('head'),
20917
20875
 
@@ -20950,7 +20908,8 @@ $.fn.sidebar = function(parameters) {
20950
20908
  moduleNamespace = 'module-' + namespace,
20951
20909
 
20952
20910
  $module = $(this),
20953
- $context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
20911
+ $context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $body,
20912
+ isBody = $context[0] === $body[0],
20954
20913
 
20955
20914
  $sidebars = $module.children(selector.sidebar),
20956
20915
  $fixed = $context.children(selector.fixed),
@@ -20964,6 +20923,9 @@ $.fn.sidebar = function(parameters) {
20964
20923
  id,
20965
20924
  currentScroll,
20966
20925
  transitionEvent,
20926
+ initialBodyMargin = '',
20927
+ tempBodyMargin = '',
20928
+ hadScrollbar = false,
20967
20929
 
20968
20930
  module
20969
20931
  ;
@@ -21069,9 +21031,12 @@ $.fn.sidebar = function(parameters) {
21069
21031
  scrollLock: function() {
21070
21032
  if(settings.scrollLock) {
21071
21033
  module.debug('Disabling page scroll');
21072
- $window
21073
- .on('DOMMouseScroll' + elementNamespace, module.event.scroll)
21074
- ;
21034
+ hadScrollbar = module.has.scrollbar();
21035
+ if(hadScrollbar) {
21036
+ module.save.bodyMargin();
21037
+ module.set.bodyMargin();
21038
+ }
21039
+ $context.addClass(className.locked);
21075
21040
  }
21076
21041
  module.verbose('Adding events to contain sidebar scroll');
21077
21042
  $document
@@ -21089,8 +21054,11 @@ $.fn.sidebar = function(parameters) {
21089
21054
  },
21090
21055
  scrollLock: function() {
21091
21056
  module.verbose('Removing scroll lock from page');
21057
+ if(hadScrollbar) {
21058
+ module.restore.bodyMargin();
21059
+ }
21060
+ $context.removeClass(className.locked);
21092
21061
  $document.off(elementNamespace);
21093
- $window.off(elementNamespace);
21094
21062
  $module.off('scroll' + eventNamespace);
21095
21063
  }
21096
21064
  },
@@ -21248,7 +21216,22 @@ $.fn.sidebar = function(parameters) {
21248
21216
  module.error(error.notFound, selector);
21249
21217
  }
21250
21218
  },
21251
-
21219
+ can: {
21220
+ leftBodyScrollbar: function () {
21221
+ if (module.cache.leftBodyScrollbar === undefined) {
21222
+ module.cache.leftBodyScrollbar = module.is.rtl() && ((module.is.iframe && !module.is.firefox()) || module.is.safari() || module.is.edge() || module.is.ie());
21223
+ }
21224
+ return module.cache.leftBodyScrollbar;
21225
+ }
21226
+ },
21227
+ save: {
21228
+ bodyMargin: function() {
21229
+ initialBodyMargin = $context.css((isBody ? 'margin-':'padding-')+(module.can.leftBodyScrollbar() ? 'left':'right'));
21230
+ var bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
21231
+ bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
21232
+ tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
21233
+ }
21234
+ },
21252
21235
  show: function(callback) {
21253
21236
  callback = $.isFunction(callback)
21254
21237
  ? callback
@@ -21359,9 +21342,13 @@ $.fn.sidebar = function(parameters) {
21359
21342
  ? callback
21360
21343
  : function(){}
21361
21344
  ;
21362
- if(settings.transition == 'scale down') {
21345
+ if(settings.returnScroll) {
21346
+ currentScroll = (isBody ? $window : $context).scrollTop();
21347
+ }
21348
+ if(settings.transition === 'scale down') {
21363
21349
  module.scrollToTop();
21364
21350
  }
21351
+ module.bind.scrollLock();
21365
21352
  module.set.transition(transition);
21366
21353
  module.repaint();
21367
21354
  animate = function() {
@@ -21377,7 +21364,6 @@ $.fn.sidebar = function(parameters) {
21377
21364
  if( event.target == $transition[0] ) {
21378
21365
  $transition.off(transitionEvent + elementNamespace, transitionEnd);
21379
21366
  module.remove.animating();
21380
- module.bind.scrollLock();
21381
21367
  callback.call(element);
21382
21368
  }
21383
21369
  };
@@ -21421,7 +21407,7 @@ $.fn.sidebar = function(parameters) {
21421
21407
  module.remove.animating();
21422
21408
  module.remove.transition();
21423
21409
  module.remove.inlineCSS();
21424
- if(transition == 'scale down' || (settings.returnScroll && module.is.mobile()) ) {
21410
+ if(transition === 'scale down' || settings.returnScroll) {
21425
21411
  module.scrollBack();
21426
21412
  }
21427
21413
  callback.call(element);
@@ -21434,14 +21420,13 @@ $.fn.sidebar = function(parameters) {
21434
21420
 
21435
21421
  scrollToTop: function() {
21436
21422
  module.verbose('Scrolling to top of page to avoid animation issues');
21437
- currentScroll = $(window).scrollTop();
21438
21423
  $module.scrollTop(0);
21439
- window.scrollTo(0, 0);
21424
+ (isBody ? $window : $context)[0].scrollTo(0, 0);
21440
21425
  },
21441
21426
 
21442
21427
  scrollBack: function() {
21443
21428
  module.verbose('Scrolling back to original page position');
21444
- window.scrollTo(0, currentScroll);
21429
+ (isBody ? $window : $context)[0].scrollTo(0, currentScroll);
21445
21430
  },
21446
21431
 
21447
21432
  clear: {
@@ -21452,7 +21437,16 @@ $.fn.sidebar = function(parameters) {
21452
21437
  },
21453
21438
 
21454
21439
  set: {
21455
-
21440
+ bodyMargin: function() {
21441
+ var position = module.can.leftBodyScrollbar() ? 'left':'right';
21442
+ $context.css((isBody ? 'margin-':'padding-')+position, tempBodyMargin + 'px');
21443
+ $context.find(selector.bodyFixed.replace('right',position)).each(function(){
21444
+ var el = $(this),
21445
+ attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
21446
+ ;
21447
+ el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
21448
+ });
21449
+ },
21456
21450
  // ios only (scroll on html not document). This prevent auto-resize canvas/scroll in ios
21457
21451
  // (This is no longer necessary in latest iOS)
21458
21452
  ios: function() {
@@ -21538,7 +21532,18 @@ $.fn.sidebar = function(parameters) {
21538
21532
  $module.removeClass(className.overlay);
21539
21533
  }
21540
21534
  },
21541
-
21535
+ restore: {
21536
+ bodyMargin: function() {
21537
+ var position = module.can.leftBodyScrollbar() ? 'left':'right';
21538
+ $context.css((isBody ? 'margin-':'padding-')+position, initialBodyMargin);
21539
+ $context.find(selector.bodyFixed.replace('right',position)).each(function(){
21540
+ var el = $(this),
21541
+ attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
21542
+ ;
21543
+ el.css(attribute, '');
21544
+ });
21545
+ }
21546
+ },
21542
21547
  get: {
21543
21548
  direction: function() {
21544
21549
  if($module.hasClass(className.top)) {
@@ -21586,15 +21591,42 @@ $.fn.sidebar = function(parameters) {
21586
21591
  }
21587
21592
  }
21588
21593
  },
21589
-
21594
+ has: {
21595
+ scrollbar: function() {
21596
+ return isBody || $context.css('overflow-y') !== 'hidden';
21597
+ }
21598
+ },
21590
21599
  is: {
21591
-
21600
+ safari: function() {
21601
+ if(module.cache.isSafari === undefined) {
21602
+ module.cache.isSafari = /constructor/i.test(window.HTMLElement) || !!window.ApplePaySession;
21603
+ }
21604
+ return module.cache.isSafari;
21605
+ },
21606
+ edge: function(){
21607
+ if(module.cache.isEdge === undefined) {
21608
+ module.cache.isEdge = !!window.setImmediate && !module.is.ie();
21609
+ }
21610
+ return module.cache.isEdge;
21611
+ },
21612
+ firefox: function(){
21613
+ if(module.cache.isFirefox === undefined) {
21614
+ module.cache.isFirefox = !!window.InstallTrigger;
21615
+ }
21616
+ return module.cache.isFirefox;
21617
+ },
21618
+ iframe: function() {
21619
+ return !(self === top);
21620
+ },
21592
21621
  ie: function() {
21593
- var
21594
- isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
21595
- isIE = ('ActiveXObject' in window)
21596
- ;
21597
- return (isIE11 || isIE);
21622
+ if(module.cache.isIE === undefined) {
21623
+ var
21624
+ isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),
21625
+ isIE = ('ActiveXObject' in window)
21626
+ ;
21627
+ module.cache.isIE = (isIE11 || isIE);
21628
+ }
21629
+ return module.cache.isIE;
21598
21630
  },
21599
21631
 
21600
21632
  ios: function() {
@@ -21644,12 +21676,12 @@ $.fn.sidebar = function(parameters) {
21644
21676
  animating: function() {
21645
21677
  return $context.hasClass(className.animating);
21646
21678
  },
21647
- rtl: function () {
21648
- if(module.cache.rtl === undefined) {
21649
- module.cache.rtl = $module.attr('dir') === 'rtl' || $module.css('direction') === 'rtl';
21679
+ rtl: function() {
21680
+ if(module.cache.isRTL === undefined) {
21681
+ module.cache.isRTL = $module.attr('dir') === 'rtl' || $module.css('direction') === 'rtl' || $body.attr('dir') === 'rtl' || $body.css('direction') === 'rtl' || $context.attr('dir') === 'rtl' || $context.css('direction') === 'rtl';
21650
21682
  }
21651
- return module.cache.rtl;
21652
- }
21683
+ return module.cache.isRTL;
21684
+ },
21653
21685
  },
21654
21686
 
21655
21687
  setting: function(name, value) {
@@ -21767,7 +21799,7 @@ $.fn.sidebar = function(parameters) {
21767
21799
  response
21768
21800
  ;
21769
21801
  passedArguments = passedArguments || queryArguments;
21770
- context = element || context;
21802
+ context = context || element;
21771
21803
  if(typeof query == 'string' && object !== undefined) {
21772
21804
  query = query.split(/[\. ]/);
21773
21805
  maxDepth = query.length - 1;
@@ -21886,6 +21918,7 @@ $.fn.sidebar.settings = {
21886
21918
  animating : 'animating',
21887
21919
  dimmed : 'dimmed',
21888
21920
  ios : 'ios',
21921
+ locked : 'locked',
21889
21922
  pushable : 'pushable',
21890
21923
  pushed : 'pushed',
21891
21924
  right : 'right',
@@ -21896,6 +21929,7 @@ $.fn.sidebar.settings = {
21896
21929
  },
21897
21930
 
21898
21931
  selector: {
21932
+ bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close',
21899
21933
  fixed : '.fixed',
21900
21934
  omitted : 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed',
21901
21935
  pusher : '.pusher',
@@ -21922,7 +21956,7 @@ $.fn.sidebar.settings = {
21922
21956
  })( jQuery, window, document );
21923
21957
 
21924
21958
  /*!
21925
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Sticky
21959
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Sticky
21926
21960
  * http://github.com/fomantic/Fomantic-UI/
21927
21961
  *
21928
21962
  *
@@ -22078,7 +22112,6 @@ $.fn.sticky = function(parameters) {
22078
22112
  }
22079
22113
  if($context.length === 0) {
22080
22114
  module.error(error.invalidContext, settings.context, $module);
22081
- return;
22082
22115
  }
22083
22116
  },
22084
22117
 
@@ -22089,7 +22122,6 @@ $.fn.sticky = function(parameters) {
22089
22122
  if(module.cache.element.height > module.cache.context.height) {
22090
22123
  module.reset();
22091
22124
  module.error(error.elementSize, $module);
22092
- return;
22093
22125
  }
22094
22126
  },
22095
22127
 
@@ -22240,13 +22272,8 @@ $.fn.sticky = function(parameters) {
22240
22272
  direction = 'down'
22241
22273
  ;
22242
22274
  scroll = scroll || $scroll.scrollTop();
22243
- if(module.lastScroll !== undefined) {
22244
- if(module.lastScroll < scroll) {
22245
- direction = 'down';
22246
- }
22247
- else if(module.lastScroll > scroll) {
22275
+ if(module.lastScroll && module.lastScroll > scroll) {
22248
22276
  direction = 'up';
22249
- }
22250
22277
  }
22251
22278
  return direction;
22252
22279
  },
@@ -22294,7 +22321,7 @@ $.fn.sticky = function(parameters) {
22294
22321
  lastScroll: function() {
22295
22322
  delete module.lastScroll;
22296
22323
  },
22297
- elementScroll: function(scroll) {
22324
+ elementScroll: function() {
22298
22325
  delete module.elementScroll;
22299
22326
  },
22300
22327
  minimumSize: function() {
@@ -22390,9 +22417,9 @@ $.fn.sticky = function(parameters) {
22390
22417
  }
22391
22418
  },
22392
22419
 
22393
- stick: function(scroll) {
22420
+ stick: function(scrollPosition) {
22394
22421
  var
22395
- cachedPosition = scroll || $scroll.scrollTop(),
22422
+ cachedPosition = scrollPosition || $scroll.scrollTop(),
22396
22423
  cache = module.cache,
22397
22424
  fits = cache.fits,
22398
22425
  sameHeight = cache.sameHeight,
@@ -22739,7 +22766,7 @@ $.fn.sticky = function(parameters) {
22739
22766
  response
22740
22767
  ;
22741
22768
  passedArguments = passedArguments || queryArguments;
22742
- context = element || context;
22769
+ context = context || element;
22743
22770
  if(typeof query == 'string' && object !== undefined) {
22744
22771
  query = query.split(/[\. ]/);
22745
22772
  maxDepth = query.length - 1;
@@ -22880,7 +22907,7 @@ $.fn.sticky.settings = {
22880
22907
  })( jQuery, window, document );
22881
22908
 
22882
22909
  /*!
22883
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Tab
22910
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Tab
22884
22911
  * http://github.com/fomantic/Fomantic-UI/
22885
22912
  *
22886
22913
  *
@@ -23749,7 +23776,7 @@ $.fn.tab = function(parameters) {
23749
23776
  response
23750
23777
  ;
23751
23778
  passedArguments = passedArguments || queryArguments;
23752
- context = element || context;
23779
+ context = context || element;
23753
23780
  if(typeof query == 'string' && object !== undefined) {
23754
23781
  query = query.split(/[\. ]/);
23755
23782
  maxDepth = query.length - 1;
@@ -23900,7 +23927,7 @@ $.fn.tab.settings = {
23900
23927
  })( jQuery, window, document );
23901
23928
 
23902
23929
  /*!
23903
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Toast
23930
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Toast
23904
23931
  * http://github.com/fomantic/Fomantic-UI/
23905
23932
  *
23906
23933
  *
@@ -23924,7 +23951,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
23924
23951
  : Function('return this')()
23925
23952
  ;
23926
23953
 
23927
- $.fn.toast = function(parameters) {
23954
+ $.toast = $.fn.toast = function(parameters) {
23928
23955
  var
23929
23956
  $allModules = $(this),
23930
23957
  moduleSelector = $allModules.selector || '',
@@ -24476,7 +24503,7 @@ $.fn.toast = function(parameters) {
24476
24503
  }
24477
24504
  ;
24478
24505
  if(shouldEscape.test(string)) {
24479
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
24506
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
24480
24507
  return string.replace(badChars, escapedChar);
24481
24508
  }
24482
24509
  return string;
@@ -24608,7 +24635,7 @@ $.fn.toast = function(parameters) {
24608
24635
  response
24609
24636
  ;
24610
24637
  passedArguments = passedArguments || queryArguments;
24611
- context = element || context;
24638
+ context = context || element;
24612
24639
  if(typeof query == 'string' && object !== undefined) {
24613
24640
  query = query.split(/[\. ]/);
24614
24641
  maxDepth = query.length - 1;
@@ -24827,7 +24854,7 @@ $.extend( $.easing, {
24827
24854
  })( jQuery, window, document );
24828
24855
 
24829
24856
  /*!
24830
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Transition
24857
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Transition
24831
24858
  * http://github.com/fomantic/Fomantic-UI/
24832
24859
  *
24833
24860
  *
@@ -24914,7 +24941,7 @@ $.fn.transition = function() {
24914
24941
  if(methodInvoked === false) {
24915
24942
  module.verbose('Converted arguments into settings object', settings);
24916
24943
  if(settings.interval) {
24917
- module.delay(settings.animate);
24944
+ module.delay(settings.interval);
24918
24945
  }
24919
24946
  else {
24920
24947
  module.animate();
@@ -24981,9 +25008,9 @@ $.fn.transition = function() {
24981
25008
  : settings.interval
24982
25009
  ;
24983
25010
  shouldReverse = (settings.reverse == 'auto' && direction == className.outward);
24984
- delay = (shouldReverse || settings.reverse == true)
24985
- ? ($allModules.length - index) * settings.interval
24986
- : index * settings.interval
25011
+ delay = (shouldReverse || settings.reverse === true)
25012
+ ? ($allModules.length - index) * interval
25013
+ : index * interval
24987
25014
  ;
24988
25015
  module.debug('Delaying animation by', delay);
24989
25016
  setTimeout(module.animate, delay);
@@ -25620,7 +25647,6 @@ $.fn.transition = function() {
25620
25647
  module.force.hidden();
25621
25648
  settings.onHidden.call(element);
25622
25649
  settings.onComplete.call(element);
25623
- // module.repaint();
25624
25650
  },
25625
25651
 
25626
25652
  show: function(display) {
@@ -25635,7 +25661,6 @@ $.fn.transition = function() {
25635
25661
  module.set.visible();
25636
25662
  settings.onVisible.call(element);
25637
25663
  settings.onComplete.call(element);
25638
- // module.repaint();
25639
25664
  },
25640
25665
 
25641
25666
  toggle: function() {
@@ -25794,7 +25819,7 @@ $.fn.transition = function() {
25794
25819
  response
25795
25820
  ;
25796
25821
  passedArguments = passedArguments || queryArguments;
25797
- context = element || context;
25822
+ context = context || element;
25798
25823
  if(typeof query == 'string' && object !== undefined) {
25799
25824
  query = query.split(/[\. ]/);
25800
25825
  maxDepth = query.length - 1;
@@ -25944,7 +25969,7 @@ $.fn.transition.settings = {
25944
25969
  })( jQuery, window, document );
25945
25970
 
25946
25971
  /*!
25947
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - API
25972
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - API
25948
25973
  * http://github.com/fomantic/Fomantic-UI/
25949
25974
  *
25950
25975
  *
@@ -26960,7 +26985,7 @@ $.api = $.fn.api = function(parameters) {
26960
26985
  response
26961
26986
  ;
26962
26987
  passedArguments = passedArguments || queryArguments;
26963
- context = element || context;
26988
+ context = context || element;
26964
26989
  if(typeof query == 'string' && object !== undefined) {
26965
26990
  query = query.split(/[\. ]/);
26966
26991
  maxDepth = query.length - 1;
@@ -27151,8 +27176,8 @@ $.api.settings = {
27151
27176
  },
27152
27177
 
27153
27178
  regExp : {
27154
- required : /\{\$*[A-z0-9]+\}/g,
27155
- optional : /\{\/\$*[A-z0-9]+\}/g,
27179
+ required : /\{\$*[a-z0-9]+\}/gi,
27180
+ optional : /\{\/\$*[a-z0-9]+\}/gi,
27156
27181
  validate: /^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,
27157
27182
  key: /[a-z0-9_-]+|(?=\[\])/gi,
27158
27183
  push: /^$/,
@@ -27181,7 +27206,7 @@ $.api.settings = {
27181
27206
  })( jQuery, window, document );
27182
27207
 
27183
27208
  /*!
27184
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - State
27209
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - State
27185
27210
  * http://github.com/fomantic/Fomantic-UI/
27186
27211
  *
27187
27212
  *
@@ -27709,7 +27734,7 @@ $.fn.state = function(parameters) {
27709
27734
  response
27710
27735
  ;
27711
27736
  passedArguments = passedArguments || queryArguments;
27712
- context = element || context;
27737
+ context = context || element;
27713
27738
  if(typeof query == 'string' && object !== undefined) {
27714
27739
  query = query.split(/[\. ]/);
27715
27740
  maxDepth = query.length - 1;
@@ -27893,7 +27918,7 @@ $.fn.state.settings = {
27893
27918
  })( jQuery, window, document );
27894
27919
 
27895
27920
  /*!
27896
- * # Fomantic-UI 2.9.0-beta.310+19b7d18 - Visibility
27921
+ * # Fomantic-UI 2.9.0-beta.313+6dec24a - Visibility
27897
27922
  * http://github.com/fomantic/Fomantic-UI/
27898
27923
  *
27899
27924
  *
@@ -29033,7 +29058,7 @@ $.fn.visibility = function(parameters) {
29033
29058
  response
29034
29059
  ;
29035
29060
  passedArguments = passedArguments || queryArguments;
29036
- context = element || context;
29061
+ context = context || element;
29037
29062
  if(typeof query == 'string' && object !== undefined) {
29038
29063
  query = query.split(/[\. ]/);
29039
29064
  maxDepth = query.length - 1;