semantic-ui-sass 1.11.5.0 → 1.12.3.0

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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -1
  3. data/CHANGELOG.md +4 -0
  4. data/README.md +1 -1
  5. data/app/assets/javascripts/semantic-ui/accordion.js +1 -1
  6. data/app/assets/javascripts/semantic-ui/api.js +1 -1
  7. data/app/assets/javascripts/semantic-ui/checkbox.js +4 -4
  8. data/app/assets/javascripts/semantic-ui/dimmer.js +1 -1
  9. data/app/assets/javascripts/semantic-ui/dropdown.js +10 -5
  10. data/app/assets/javascripts/semantic-ui/form.js +1 -1
  11. data/app/assets/javascripts/semantic-ui/modal.js +1 -1
  12. data/app/assets/javascripts/semantic-ui/nag.js +1 -1
  13. data/app/assets/javascripts/semantic-ui/popup.js +2 -2
  14. data/app/assets/javascripts/semantic-ui/progress.js +4 -4
  15. data/app/assets/javascripts/semantic-ui/rating.js +1 -1
  16. data/app/assets/javascripts/semantic-ui/search.js +1 -1
  17. data/app/assets/javascripts/semantic-ui/shape.js +1 -1
  18. data/app/assets/javascripts/semantic-ui/sidebar.js +1 -1
  19. data/app/assets/javascripts/semantic-ui/site.js +1 -1
  20. data/app/assets/javascripts/semantic-ui/state.js +1 -1
  21. data/app/assets/javascripts/semantic-ui/sticky.js +47 -27
  22. data/app/assets/javascripts/semantic-ui/tab.js +1 -1
  23. data/app/assets/javascripts/semantic-ui/transition.js +1 -1
  24. data/app/assets/javascripts/semantic-ui/video.js +1 -1
  25. data/app/assets/javascripts/semantic-ui/visibility.js +96 -37
  26. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
  27. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +7 -5
  28. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +10 -1
  29. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +1 -1
  30. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +1 -1
  31. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1 -1
  32. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +1 -1
  33. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +1 -1
  34. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +2 -2
  35. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +1 -1
  36. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +6 -2
  37. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
  38. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +70 -57
  39. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +1 -1
  40. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +1 -1
  41. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +1 -1
  42. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
  43. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
  44. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +1 -1
  45. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +1 -1
  46. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
  47. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +2 -2
  48. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +1 -1
  49. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +1 -1
  50. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +1 -1
  51. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +3 -7
  52. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +1 -1
  53. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
  54. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +1 -4
  55. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
  56. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
  57. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +1 -1
  58. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
  59. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +1 -1
  60. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
  61. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
  62. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  63. data/app/assets/stylesheets/semantic-ui/modules/_video.scss +1 -1
  64. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +1 -1
  65. data/app/assets/stylesheets/semantic-ui/views/_card.scss +5 -1
  66. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +1 -1
  67. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +1 -1
  68. data/app/assets/stylesheets/semantic-ui/views/_item.scss +1 -1
  69. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +1 -1
  70. data/lib/semantic/ui/sass/version.rb +1 -1
  71. metadata +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI - Video
2
+ * # Semantic UI 1.12.3 - Video
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI - Visibility
2
+ * # Semantic UI 1.12.3 - Visibility
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -42,11 +42,11 @@ $.fn.visibility = function(parameters) {
42
42
  moduleNamespace = 'module-' + namespace,
43
43
 
44
44
  $window = $(window),
45
+
45
46
  $module = $(this),
46
47
  $context = $(settings.context),
47
- $images = $module.find('img'),
48
-
49
48
  selector = $module.selector || '',
49
+
50
50
  instance = $module.data(moduleNamespace),
51
51
 
52
52
  requestAnimationFrame = window.requestAnimationFrame
@@ -76,13 +76,16 @@ $.fn.visibility = function(parameters) {
76
76
  if(settings.type == 'fixed') {
77
77
  module.setup.fixed();
78
78
  }
79
+ if(settings.observeChanges) {
80
+ module.observeChanges();
81
+ }
82
+ if( !module.is.visible() ) {
83
+ module.error(error.visible, $module);
84
+ }
79
85
  }
80
86
  if(settings.initialCheck) {
81
87
  module.checkVisibility();
82
88
  }
83
- if(settings.observeChanges) {
84
- module.observeChanges();
85
- }
86
89
  module.instantiate();
87
90
  },
88
91
 
@@ -96,12 +99,18 @@ $.fn.visibility = function(parameters) {
96
99
 
97
100
  destroy: function() {
98
101
  module.verbose('Destroying previous module');
102
+ if(observer) {
103
+ observer.disconnect();
104
+ }
105
+ $window
106
+ .off('load' + eventNamespace, module.event.load)
107
+ .off('resize' + eventNamespace, module.event.resize)
108
+ ;
109
+ $context.off('scrollchange' + eventNamespace, module.event.scrollchange);
99
110
  $module
100
111
  .off(eventNamespace)
101
112
  .removeData(moduleNamespace)
102
113
  ;
103
- $window.off('resize' + eventNamespace, module.event.refresh);
104
- $context.off('scroll' + eventNamespace, module.event.scroll);
105
114
  },
106
115
 
107
116
  observeChanges: function() {
@@ -111,7 +120,10 @@ $.fn.visibility = function(parameters) {
111
120
  if('MutationObserver' in window) {
112
121
  observer = new MutationObserver(function(mutations) {
113
122
  module.verbose('DOM tree modified, updating visibility calculations');
114
- module.refresh();
123
+ module.timer = setTimeout(function() {
124
+ module.verbose('DOM tree modified, updating sticky menu');
125
+ module.refresh();
126
+ }, 100);
115
127
  });
116
128
  observer.observe(element, {
117
129
  childList : true,
@@ -125,17 +137,19 @@ $.fn.visibility = function(parameters) {
125
137
  events: function() {
126
138
  module.verbose('Binding visibility events to scroll and resize');
127
139
  $window
128
- .on('resize' + eventNamespace, module.event.refresh)
140
+ .on('load' + eventNamespace, module.event.load)
141
+ .on('resize' + eventNamespace, module.event.resize)
129
142
  ;
143
+ // pub/sub pattern
130
144
  $context
145
+ .off('scroll' + eventNamespace)
131
146
  .on('scroll' + eventNamespace, module.event.scroll)
147
+ .on('scrollchange' + eventNamespace, module.event.scrollchange)
132
148
  ;
133
- if($images.length > 0) {
134
- module.bind.imageLoad();
135
- }
136
149
  },
137
150
  imageLoad: function() {
138
151
  var
152
+ $images = $module.find('img'),
139
153
  imageCount = $images.length,
140
154
  index = imageCount,
141
155
  loadedCount = 0,
@@ -150,44 +164,82 @@ $.fn.visibility = function(parameters) {
150
164
  }
151
165
  }
152
166
  ;
153
- $images
154
- .each(function() {
155
- images.push( $(this).attr('src') );
156
- })
157
- ;
158
- while(index--) {
159
- cacheImage = document.createElement('img');
160
- cacheImage.onload = handleLoad;
161
- cacheImage.onerror = handleLoad;
162
- cacheImage.src = images[index];
163
- cache.push(cacheImage);
167
+ if(imageCount > 0) {
168
+ $images
169
+ .each(function() {
170
+ images.push( $(this).attr('src') );
171
+ })
172
+ ;
173
+ while(index--) {
174
+ cacheImage = document.createElement('img');
175
+ cacheImage.onload = handleLoad;
176
+ cacheImage.onerror = handleLoad;
177
+ cacheImage.src = images[index];
178
+ cache.push(cacheImage);
179
+ }
164
180
  }
165
181
  }
166
182
  },
167
183
 
168
184
  event: {
169
- refresh: function() {
185
+ resize: function() {
186
+ module.debug('Window resized');
170
187
  requestAnimationFrame(module.refresh);
171
188
  },
189
+ load: function() {
190
+ module.debug('Page finished loading');
191
+ requestAnimationFrame(module.refresh);
192
+ },
193
+ // publishes scrollchange event on one scroll
172
194
  scroll: function() {
173
- module.verbose('Scroll position changed');
174
195
  if(settings.throttle) {
175
196
  clearTimeout(module.timer);
176
197
  module.timer = setTimeout(function() {
177
- module.checkVisibility();
198
+ $context.trigger('scrollchange' + eventNamespace, [ $context.scrollTop() ]);
178
199
  }, settings.throttle);
179
200
  }
180
201
  else {
181
202
  requestAnimationFrame(function() {
182
- module.checkVisibility();
203
+ $context.trigger('scrollchange' + eventNamespace, [ $context.scrollTop() ]);
183
204
  });
184
205
  }
206
+ },
207
+ // subscribes to scrollchange
208
+ scrollchange: function(event, scrollPosition) {
209
+ module.checkVisibility(scrollPosition);
210
+ },
211
+ },
212
+
213
+ precache: function(images, callback) {
214
+ if (!(images instanceof Array)) {
215
+ images = [images];
216
+ }
217
+ var
218
+ imagesLength = images.length,
219
+ loadedCounter = 0,
220
+ cache = [],
221
+ cacheImage = document.createElement('img'),
222
+ handleLoad = function() {
223
+ loadedCounter++;
224
+ if (loadedCounter >= images.length) {
225
+ if ($.isFunction(callback)) {
226
+ callback();
227
+ }
228
+ }
229
+ }
230
+ ;
231
+ while (imagesLength--) {
232
+ cacheImage = document.createElement('img');
233
+ cacheImage.onload = handleLoad;
234
+ cacheImage.onerror = handleLoad;
235
+ cacheImage.src = images[imagesLength];
236
+ cache.push(cacheImage);
185
237
  }
186
238
  },
187
239
 
188
240
  should: {
189
241
  trackChanges: function() {
190
- if(methodInvoked && queryArguments.length > 0) {
242
+ if(methodInvoked) {
191
243
  module.debug('One time query, no need to bind events');
192
244
  return false;
193
245
  }
@@ -287,7 +339,7 @@ $.fn.visibility = function(parameters) {
287
339
  },
288
340
 
289
341
  refresh: function() {
290
- module.debug('Refreshing constants (element width/height)');
342
+ module.debug('Refreshing constants (width/height)');
291
343
  module.reset();
292
344
  module.save.position();
293
345
  module.checkVisibility();
@@ -302,11 +354,14 @@ $.fn.visibility = function(parameters) {
302
354
  }
303
355
  },
304
356
 
305
- checkVisibility: function() {
357
+ checkVisibility: function(scroll) {
306
358
  module.verbose('Checking visibility of element', module.cache.element);
307
359
 
308
360
  if( module.is.visible() ) {
309
361
 
362
+ // save scroll position
363
+ module.save.scroll(scroll);
364
+
310
365
  // update calculations derived from scroll
311
366
  module.save.calculations();
312
367
 
@@ -616,7 +671,6 @@ $.fn.visibility = function(parameters) {
616
671
  save: {
617
672
  calculations: function() {
618
673
  module.verbose('Saving all calculations necessary to determine positioning');
619
- module.save.scroll();
620
674
  module.save.direction();
621
675
  module.save.screenCalculations();
622
676
  module.save.elementCalculations();
@@ -629,8 +683,9 @@ $.fn.visibility = function(parameters) {
629
683
  }
630
684
  }
631
685
  },
632
- scroll: function() {
633
- module.cache.scroll = $context.scrollTop() + settings.offset;
686
+ scroll: function(scrollPosition) {
687
+ scrollPosition = scrollPosition + settings.offset || $context.scrollTop() + settings.offset;
688
+ module.cache.scroll = scrollPosition;
634
689
  },
635
690
  direction: function() {
636
691
  var
@@ -855,7 +910,7 @@ $.fn.visibility = function(parameters) {
855
910
  });
856
911
  }
857
912
  clearTimeout(module.performance.timer);
858
- module.performance.timer = setTimeout(module.performance.display, 100);
913
+ module.performance.timer = setTimeout(module.performance.display, 500);
859
914
  },
860
915
  display: function() {
861
916
  var
@@ -975,6 +1030,9 @@ $.fn.visibility.settings = {
975
1030
  // whether to use mutation observers to follow changes
976
1031
  observeChanges : true,
977
1032
 
1033
+ // whether to refresh calculations after all page images load
1034
+ refreshOnLoad : true,
1035
+
978
1036
  // callback should only occur one time
979
1037
  once : true,
980
1038
 
@@ -1029,9 +1087,10 @@ $.fn.visibility.settings = {
1029
1087
  },
1030
1088
 
1031
1089
  error : {
1032
- method : 'The method you called is not defined.'
1090
+ method : 'The method you called is not defined.',
1091
+ visible : 'Element is hidden, you must call refresh after element becomes visible'
1033
1092
  }
1034
1093
 
1035
1094
  };
1036
1095
 
1037
- })( jQuery, window , document );
1096
+ })( jQuery, window , document );
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Breadcrumb
2
+ * # Semantic UI 1.12.3 - Breadcrumb
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Form
2
+ * # Semantic UI 1.12.3 - Form
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -552,20 +552,22 @@
552
552
  Required Field
553
553
  ---------------------*/
554
554
 
555
- .ui.form .required.fields > .field > label:after,
555
+ .ui.form .required.fields:not(.grouped) > .field > label:after,
556
+ .ui.form .required.fields.grouped > label:after,
556
557
  .ui.form .required.field > label:after,
557
- .ui.form .required.fields > .field > .checkbox:after,
558
+ .ui.form .required.fields:not(.grouped) > .field > .checkbox:after,
558
559
  .ui.form .required.field > .checkbox:after {
559
560
  margin: -0.2em 0em 0em 0.2em;
560
561
  content: '*';
561
562
  color: #d95c5c;
562
563
  }
563
- .ui.form .required.fields > .field > label:after,
564
+ .ui.form .required.fields:not(.grouped) > .field > label:after,
565
+ .ui.form .required.fields.grouped > label:after,
564
566
  .ui.form .required.field > label:after {
565
567
  display: inline-block;
566
568
  vertical-align: top;
567
569
  }
568
- .ui.form .required.fields > .field > .checkbox:after,
570
+ .ui.form .required.fields:not(.grouped) > .field > .checkbox:after,
569
571
  .ui.form .required.field > .checkbox:after {
570
572
  position: absolute;
571
573
  top: 0%;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Grid
2
+ * # Semantic UI 1.12.3 - Grid
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1322,6 +1322,7 @@
1322
1322
  -----------------------*/
1323
1323
 
1324
1324
  .ui.grid > .white.row,
1325
+ .ui.grid > .white.column,
1325
1326
  .ui.grid > .row > .white.column {
1326
1327
  background-color: #ffffff !important;
1327
1328
  color: rgba(0, 0, 0, 0.8);
@@ -1333,6 +1334,7 @@
1333
1334
  padding-bottom: 1rem;
1334
1335
  }
1335
1336
  .ui.grid > .black.row,
1337
+ .ui.grid > .black.column,
1336
1338
  .ui.grid > .row > .black.column {
1337
1339
  background-color: #1b1c1d !important;
1338
1340
  color: #ffffff;
@@ -1344,6 +1346,7 @@
1344
1346
  padding-bottom: 1rem;
1345
1347
  }
1346
1348
  .ui.grid > .blue.row,
1349
+ .ui.grid > .blue.column,
1347
1350
  .ui.grid > .row > .blue.column {
1348
1351
  background-color: #3b83c0 !important;
1349
1352
  color: #ffffff;
@@ -1355,6 +1358,7 @@
1355
1358
  padding-bottom: 1rem;
1356
1359
  }
1357
1360
  .ui.grid > .green.row,
1361
+ .ui.grid > .green.column,
1358
1362
  .ui.grid > .row > .green.column {
1359
1363
  background-color: #5bbd72 !important;
1360
1364
  color: #ffffff;
@@ -1366,6 +1370,7 @@
1366
1370
  padding-bottom: 1rem;
1367
1371
  }
1368
1372
  .ui.grid > .orange.row,
1373
+ .ui.grid > .orange.column,
1369
1374
  .ui.grid > .row > .orange.column {
1370
1375
  background-color: #e07b53 !important;
1371
1376
  color: #ffffff;
@@ -1388,6 +1393,7 @@
1388
1393
  padding-bottom: 1rem;
1389
1394
  }
1390
1395
  .ui.grid > .purple.row,
1396
+ .ui.grid > .purple.column,
1391
1397
  .ui.grid > .row > .purple.column {
1392
1398
  background-color: #564f8a !important;
1393
1399
  color: #ffffff;
@@ -1399,6 +1405,7 @@
1399
1405
  padding-bottom: 1rem;
1400
1406
  }
1401
1407
  .ui.grid > .red.row,
1408
+ .ui.grid > .red.column,
1402
1409
  .ui.grid > .row > .red.column {
1403
1410
  background-color: #d95c5c !important;
1404
1411
  color: #ffffff;
@@ -1410,6 +1417,7 @@
1410
1417
  padding-bottom: 1rem;
1411
1418
  }
1412
1419
  .ui.grid > .teal.row,
1420
+ .ui.grid > .teal.column,
1413
1421
  .ui.grid > .row > .teal.column {
1414
1422
  background-color: #00b5ad !important;
1415
1423
  color: #ffffff;
@@ -1421,6 +1429,7 @@
1421
1429
  padding-bottom: 1rem;
1422
1430
  }
1423
1431
  .ui.grid > .yellow.row,
1432
+ .ui.grid > .yellow.column,
1424
1433
  .ui.grid > .row > .yellow.column {
1425
1434
  background-color: #f2c61f !important;
1426
1435
  color: #ffffff;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Menu
2
+ * # Semantic UI 1.12.3 - Menu
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Message
2
+ * # Semantic UI 1.12.3 - Message
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Table
2
+ * # Semantic UI 1.12.3 - Table
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Button
2
+ * # Semantic UI 1.12.3 - Button
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Divider
2
+ * # Semantic UI 1.12.3 - Divider
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Flag
2
+ * # Semantic UI 1.12.3 - Flag
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -32,7 +32,7 @@ i.flag:not(.icon) {
32
32
  i.flag:not(.icon):before {
33
33
  display: inline-block;
34
34
  content: '';
35
- background: image-url("semantic-ui/flags.png") no-repeat 0px 0px;
35
+ background: url("../themes/default/assets/images/flags.png") no-repeat 0px 0px;
36
36
  width: 16px;
37
37
  height: 11px;
38
38
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 1.11.5 - Header
2
+ * # Semantic UI 1.12.3 - Header
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *