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

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 (154) 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 +5 -5
  28. package/dist/components/dimmer.js +1 -1
  29. package/dist/components/dimmer.min.css +2 -2
  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 +1 -1
  35. package/dist/components/dropdown.min.css +1 -1
  36. package/dist/components/dropdown.min.js +1 -1
  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/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 +1 -1
  47. package/dist/components/form.min.css +1 -1
  48. package/dist/components/form.min.js +1 -1
  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 +7 -1
  70. package/dist/components/modal.js +47 -27
  71. package/dist/components/modal.min.css +2 -2
  72. package/dist/components/modal.min.js +2 -2
  73. package/dist/components/nag.css +1 -1
  74. package/dist/components/nag.js +1 -1
  75. package/dist/components/nag.min.css +1 -1
  76. package/dist/components/nag.min.js +1 -1
  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 +1 -1
  81. package/dist/components/popup.min.css +1 -1
  82. package/dist/components/popup.min.js +1 -1
  83. package/dist/components/progress.css +1 -1
  84. package/dist/components/progress.js +1 -1
  85. package/dist/components/progress.min.css +1 -1
  86. package/dist/components/progress.min.js +1 -1
  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 +1 -1
  91. package/dist/components/rating.min.css +1 -1
  92. package/dist/components/rating.min.js +1 -1
  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 +1 -1
  99. package/dist/components/search.min.css +1 -1
  100. package/dist/components/search.min.js +1 -1
  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 +1 -1
  105. package/dist/components/shape.min.css +1 -1
  106. package/dist/components/shape.min.js +1 -1
  107. package/dist/components/sidebar.css +1 -1
  108. package/dist/components/sidebar.js +1 -3
  109. package/dist/components/sidebar.min.css +1 -1
  110. package/dist/components/sidebar.min.js +2 -2
  111. package/dist/components/site.css +1 -1
  112. package/dist/components/site.js +1 -1
  113. package/dist/components/site.min.css +1 -1
  114. package/dist/components/site.min.js +1 -1
  115. package/dist/components/slider.js +1 -1
  116. package/dist/components/slider.min.js +1 -1
  117. package/dist/components/state.js +1 -1
  118. package/dist/components/state.min.js +1 -1
  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 +1 -1
  125. package/dist/components/sticky.min.css +1 -1
  126. package/dist/components/sticky.min.js +1 -1
  127. package/dist/components/tab.css +1 -1
  128. package/dist/components/tab.js +1 -1
  129. package/dist/components/tab.min.css +1 -1
  130. package/dist/components/tab.min.js +1 -1
  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 +2 -1
  136. package/dist/components/toast.js +1 -1
  137. package/dist/components/toast.min.css +2 -2
  138. package/dist/components/toast.min.js +1 -1
  139. package/dist/components/transition.css +1 -1
  140. package/dist/components/transition.js +1 -1
  141. package/dist/components/transition.min.css +1 -1
  142. package/dist/components/transition.min.js +1 -1
  143. package/dist/components/visibility.js +1 -1
  144. package/dist/components/visibility.min.js +1 -1
  145. package/dist/semantic.css +61 -53
  146. package/dist/semantic.js +71 -53
  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/modules/dimmer.less +4 -4
  151. package/src/definitions/modules/modal.js +46 -26
  152. package/src/definitions/modules/modal.less +4 -0
  153. package/src/definitions/modules/sidebar.js +0 -2
  154. package/src/definitions/modules/toast.less +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fomantic-ui",
3
- "version": "2.9.0-beta.313+6dec24a",
3
+ "version": "2.9.0-beta.315+0963809",
4
4
  "description": "Fomantic empowers designers and developers by creating a shared vocabulary for UI.",
5
5
  "keywords": [
6
6
  "fomantic-ui",
@@ -28,8 +28,8 @@
28
28
  .ui.dimmer {
29
29
  display: none;
30
30
  position: @dimmerPosition;
31
- top: 0 !important;
32
- left: 0 !important;
31
+ top: 0;
32
+ left: 0;
33
33
 
34
34
  width: 100%;
35
35
  height: 100%;
@@ -303,11 +303,11 @@ body.dimmable > .dimmer {
303
303
  height: auto;
304
304
  }
305
305
  .ui[class*="bottom dimmer"] {
306
- top: auto !important;
306
+ top: auto;
307
307
  bottom: 0;
308
308
  }
309
309
  .ui[class*="center dimmer"] {
310
- top:50% !important;
310
+ top:50%;
311
311
  transform: translateY(-50%);
312
312
  -webkit-transform: translateY(calc(-50% - .5px));
313
313
  }
@@ -65,7 +65,8 @@ $.modal = $.fn.modal = function(parameters) {
65
65
  moduleNamespace = 'module-' + namespace,
66
66
 
67
67
  $module = $(this),
68
- $context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
68
+ $context = [window,document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body,
69
+ isBody = $context[0] === $body[0],
69
70
  $closeIcon = $module.find(selector.closeIcon),
70
71
  $inputs,
71
72
 
@@ -86,6 +87,8 @@ $.modal = $.fn.modal = function(parameters) {
86
87
  initialMouseDownInScrollbar,
87
88
  initialBodyMargin = '',
88
89
  tempBodyMargin = '',
90
+ keepScrollingClass = false,
91
+ hadScrollbar = false,
89
92
 
90
93
  elementEventNamespace,
91
94
  id,
@@ -203,6 +206,7 @@ $.modal = $.fn.modal = function(parameters) {
203
206
  }
204
207
  module.debug('Creating dimmer');
205
208
  $dimmable = $context.dimmer(dimmerSettings);
209
+ keepScrollingClass = module.is.scrolling();
206
210
  if(settings.detachable) {
207
211
  module.verbose('Modal is detachable, moving content into dimmer');
208
212
  $dimmable.dimmer('add content', $module);
@@ -328,13 +332,13 @@ $.modal = $.fn.modal = function(parameters) {
328
332
  },
329
333
  scrollLock: function() {
330
334
  // touch events default to passive, due to changes in chrome to optimize mobile perf
331
- $dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
335
+ $dimmable[0].addEventListener('touchmove', module.event.preventScroll, { passive: false });
332
336
  }
333
337
  },
334
338
 
335
339
  unbind: {
336
340
  scrollLock: function() {
337
- $dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
341
+ $dimmable[0].removeEventListener('touchmove', module.event.preventScroll, { passive: false });
338
342
  }
339
343
  },
340
344
 
@@ -416,7 +420,7 @@ $.modal = $.fn.modal = function(parameters) {
416
420
  if(initialMouseDownInModal) {
417
421
  module.verbose('Mouse down event registered inside the modal');
418
422
  }
419
- initialMouseDownInScrollbar = module.is.scrolling() && ((!isRtl && $(window).outerWidth() - settings.scrollbarWidth <= event.clientX) || (isRtl && settings.scrollbarWidth >= event.clientX));
423
+ initialMouseDownInScrollbar = module.is.scrolling() && ((!isRtl && $window.outerWidth() - settings.scrollbarWidth <= event.clientX) || (isRtl && settings.scrollbarWidth >= event.clientX));
420
424
  if(initialMouseDownInScrollbar) {
421
425
  module.verbose('Mouse down event registered inside the scrollbar');
422
426
  }
@@ -520,9 +524,12 @@ $.modal = $.fn.modal = function(parameters) {
520
524
  module.verbose('Show callback returned false cancelling show');
521
525
  return;
522
526
  }
527
+ hadScrollbar = module.has.scrollbar();
523
528
  module.showDimmer();
524
529
  module.cacheSizes();
525
- module.set.bodyMargin();
530
+ if(hadScrollbar) {
531
+ module.set.bodyMargin();
532
+ }
526
533
  if(module.can.useFlex()) {
527
534
  module.remove.legacy();
528
535
  }
@@ -651,7 +658,12 @@ $.modal = $.fn.modal = function(parameters) {
651
658
 
652
659
  showDimmer: function() {
653
660
  if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) {
654
- module.save.bodyMargin();
661
+ if(hadScrollbar) {
662
+ if(!isBody) {
663
+ $dimmer.css('top', $dimmable.scrollTop());
664
+ }
665
+ module.save.bodyMargin();
666
+ }
655
667
  module.debug('Showing dimmer');
656
668
  $dimmable.dimmer('show');
657
669
  }
@@ -664,7 +676,9 @@ $.modal = $.fn.modal = function(parameters) {
664
676
  if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
665
677
  module.unbind.scrollLock();
666
678
  $dimmable.dimmer('hide', function() {
667
- module.restore.bodyMargin();
679
+ if(hadScrollbar) {
680
+ module.restore.bodyMargin();
681
+ }
668
682
  module.remove.clickaway();
669
683
  module.remove.screenHeight();
670
684
  });
@@ -744,9 +758,9 @@ $.modal = $.fn.modal = function(parameters) {
744
758
  }
745
759
  },
746
760
  bodyMargin: function() {
747
- initialBodyMargin = $body.css('margin-'+(module.can.leftBodyScrollbar() ? 'left':'right'));
761
+ initialBodyMargin = $context.css((isBody ? 'margin-':'padding-')+(module.can.leftBodyScrollbar() ? 'left':'right'));
748
762
  var bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
749
- bodyScrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
763
+ bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
750
764
  tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
751
765
  }
752
766
  },
@@ -759,8 +773,8 @@ $.modal = $.fn.modal = function(parameters) {
759
773
  },
760
774
  bodyMargin: function() {
761
775
  var position = module.can.leftBodyScrollbar() ? 'left':'right';
762
- $body.css('margin-'+position, initialBodyMargin);
763
- $body.find(selector.bodyFixed.replace('right',position)).each(function(){
776
+ $context.css((isBody ? 'margin-':'padding-')+position, initialBodyMargin);
777
+ $context.find(selector.bodyFixed.replace('right',position)).each(function(){
764
778
  var el = $(this),
765
779
  attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
766
780
  ;
@@ -794,16 +808,17 @@ $.modal = $.fn.modal = function(parameters) {
794
808
  $dimmable.removeClass(className.blurring);
795
809
  },
796
810
  bodyStyle: function() {
797
- if($body.attr('style') === '') {
811
+ if($context.attr('style') === '') {
798
812
  module.verbose('Removing style attribute');
799
- $body.removeAttr('style');
813
+ $context.removeAttr('style');
800
814
  }
801
815
  },
802
816
  screenHeight: function() {
803
817
  module.debug('Removing page height');
804
- $body
818
+ $context
805
819
  .css('height', '')
806
820
  ;
821
+ module.remove.bodyStyle()
807
822
  },
808
823
  keyboardShortcuts: function() {
809
824
  module.verbose('Removing keyboard shortcuts');
@@ -812,7 +827,9 @@ $.modal = $.fn.modal = function(parameters) {
812
827
  ;
813
828
  },
814
829
  scrolling: function() {
815
- $dimmable.removeClass(className.scrolling);
830
+ if(!keepScrollingClass) {
831
+ $dimmable.removeClass(className.scrolling);
832
+ }
816
833
  $module.removeClass(className.scrolling);
817
834
  }
818
835
  },
@@ -826,12 +843,12 @@ $.modal = $.fn.modal = function(parameters) {
826
843
  ;
827
844
  if(module.cache.pageHeight === undefined || modalHeight !== 0) {
828
845
  $.extend(module.cache, {
829
- pageHeight : $(document).outerHeight(),
846
+ pageHeight : $document.outerHeight(),
830
847
  width : modalWidth,
831
848
  height : modalHeight + settings.offset,
832
849
  scrollHeight : scrollHeight + settings.offset,
833
- contextHeight : (settings.context == 'body')
834
- ? $(window).height()
850
+ contextHeight : isBody
851
+ ? $window.height()
835
852
  : $dimmable.height(),
836
853
  });
837
854
  module.cache.topOffset = -(module.cache.height / 2);
@@ -905,6 +922,9 @@ $.modal = $.fn.modal = function(parameters) {
905
922
  has: {
906
923
  configActions: function () {
907
924
  return Array.isArray(settings.actions) && settings.actions.length > 0;
925
+ },
926
+ scrollbar: function() {
927
+ return isBody || $context.css('overflow-y') !== 'hidden';
908
928
  }
909
929
  },
910
930
  is: {
@@ -936,7 +956,7 @@ $.modal = $.fn.modal = function(parameters) {
936
956
  },
937
957
  rtl: function() {
938
958
  if(module.cache.isRTL === undefined) {
939
- module.cache.isRTL = $body.attr('dir') === 'rtl' || $body.css('direction') === 'rtl';
959
+ 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';
940
960
  }
941
961
  return module.cache.isRTL;
942
962
  },
@@ -978,9 +998,9 @@ $.modal = $.fn.modal = function(parameters) {
978
998
  bodyMargin: function() {
979
999
  var position = module.can.leftBodyScrollbar() ? 'left':'right';
980
1000
  if(settings.detachable || module.can.fit()) {
981
- $body.css('margin-'+position, tempBodyMargin + 'px');
1001
+ $context.css((isBody ? 'margin-':'padding-')+position, tempBodyMargin + 'px');
982
1002
  }
983
- $body.find(selector.bodyFixed.replace('right',position)).each(function(){
1003
+ $context.find(selector.bodyFixed.replace('right',position)).each(function(){
984
1004
  var el = $(this),
985
1005
  attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
986
1006
  ;
@@ -1046,10 +1066,10 @@ $.modal = $.fn.modal = function(parameters) {
1046
1066
  $module
1047
1067
  .css({
1048
1068
  top: (!$module.hasClass('aligned') && canFit)
1049
- ? $(document).scrollTop() + (module.cache.contextHeight - module.cache.height) / 2
1069
+ ? $document.scrollTop() + (module.cache.contextHeight - module.cache.height) / 2
1050
1070
  : !canFit || $module.hasClass('top')
1051
- ? $(document).scrollTop() + settings.padding
1052
- : $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
1071
+ ? $document.scrollTop() + settings.padding
1072
+ : $document.scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
1053
1073
  marginLeft: -(module.cache.width / 2)
1054
1074
  })
1055
1075
  ;
@@ -1067,11 +1087,11 @@ $.modal = $.fn.modal = function(parameters) {
1067
1087
  },
1068
1088
  screenHeight: function() {
1069
1089
  if( module.can.fit() ) {
1070
- $body.css('height', '');
1090
+ $context.css('height', '');
1071
1091
  }
1072
1092
  else if(!$module.hasClass('bottom')) {
1073
1093
  module.debug('Modal is taller than page content, resizing page height');
1074
- $body
1094
+ $context
1075
1095
  .css('height', module.cache.height + (settings.padding * 2) )
1076
1096
  ;
1077
1097
  }
@@ -447,6 +447,10 @@
447
447
  justify-content: flex-start;
448
448
  position: fixed;
449
449
  }
450
+ .scrolling.dimmable:not(body) > .dimmer {
451
+ justify-content: center;
452
+ position: absolute;
453
+ }
450
454
  .scrolling.dimmable.dimmed > .dimmer {
451
455
  overflow: auto;
452
456
  -webkit-overflow-scrolling: touch;
@@ -1063,8 +1063,6 @@ $.fn.sidebar.settings = {
1063
1063
  returnScroll : false,
1064
1064
  delaySetup : false,
1065
1065
 
1066
- duration : 500,
1067
-
1068
1066
  onChange : function(){},
1069
1067
  onShow : function(){},
1070
1068
  onHide : function(){},
@@ -127,6 +127,7 @@
127
127
  margin-bottom: @toastBoxMarginBottom;
128
128
  border-radius: @defaultBorderRadius;
129
129
  cursor: default;
130
+ will-change: transform, opacity;
130
131
  &:hover {
131
132
  opacity: @toastOpacityOnHover;
132
133
  }