semantic-ui-sass 2.2.11.0 → 2.2.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/fonts/semantic-ui/icons.eot +0 -0
  4. data/app/assets/fonts/semantic-ui/icons.svg +2668 -682
  5. data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
  6. data/app/assets/fonts/semantic-ui/icons.woff +0 -0
  7. data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
  8. data/app/assets/javascripts/semantic-ui/dropdown.js +49 -10
  9. data/app/assets/javascripts/semantic-ui/modal.js +25 -4
  10. data/app/assets/javascripts/semantic-ui/popup.js +2 -2
  11. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
  12. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +1 -1
  13. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +1 -1
  14. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +0 -1
  15. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +1 -1
  16. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1 -1
  17. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +1 -1
  18. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +1 -1
  19. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +1 -1
  20. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1 -1
  21. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +2 -2
  22. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +1 -1
  23. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
  24. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +1 -1
  25. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +1 -1
  26. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +2 -2
  27. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +1 -1
  28. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
  29. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
  30. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +1 -1
  31. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +1 -1
  32. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
  33. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +1 -1
  34. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +1 -1
  35. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +1 -1
  36. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +1 -1
  37. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +3 -3
  38. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +1 -1
  39. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +6 -1
  40. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
  41. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +1 -1
  42. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
  43. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
  44. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +1 -1
  45. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
  46. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +1 -1
  47. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
  48. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
  49. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  50. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +1 -1
  51. data/app/assets/stylesheets/semantic-ui/views/_card.scss +1 -1
  52. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +1 -1
  53. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +1 -1
  54. data/app/assets/stylesheets/semantic-ui/views/_item.scss +1 -1
  55. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +1 -1
  56. data/lib/semantic/ui/sass/version.rb +2 -2
  57. metadata +2 -2
@@ -97,7 +97,13 @@ $.fn.dropdown = function(parameters) {
97
97
  module.setup.reference();
98
98
  }
99
99
  else {
100
+
100
101
  module.setup.layout();
102
+
103
+ if(settings.values) {
104
+ module.change.values(settings.values);
105
+ }
106
+
101
107
  module.refreshData();
102
108
 
103
109
  module.save.defaults();
@@ -162,7 +168,7 @@ $.fn.dropdown = function(parameters) {
162
168
  observe: {
163
169
  select: function() {
164
170
  if(module.has.input()) {
165
- selectObserver.observe($input[0], {
171
+ selectObserver.observe($module[0], {
166
172
  childList : true,
167
173
  subtree : true
168
174
  });
@@ -383,19 +389,16 @@ $.fn.dropdown = function(parameters) {
383
389
  reference: function() {
384
390
  module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
385
391
  // replace module reference
386
- $module = $module.parent(selector.dropdown);
392
+ $module = $module.parent(selector.dropdown);
393
+ instance = $module.data(moduleNamespace);
394
+ element = $module.get(0);
387
395
  module.refresh();
388
396
  module.setup.returnedObject();
389
- // invoke method in context of current instance
390
- if(methodInvoked) {
391
- instance = module;
392
- module.invoke(query);
393
- }
394
397
  },
395
398
  returnedObject: function() {
396
399
  var
397
400
  $firstModules = $allModules.slice(0, elementIndex),
398
- $lastModules = $allModules.slice(elementIndex + 1)
401
+ $lastModules = $allModules.slice(elementIndex + 1)
399
402
  ;
400
403
  // adjust all modules to use correct reference
401
404
  $allModules = $firstModules.add($module).add($lastModules);
@@ -913,6 +916,23 @@ $.fn.dropdown = function(parameters) {
913
916
  }
914
917
  },
915
918
 
919
+ change: {
920
+ values: function(values) {
921
+ if(!settings.allowAdditions) {
922
+ module.clear();
923
+ }
924
+ module.debug('Creating dropdown with specified values', values);
925
+ module.setup.menu({values: values});
926
+ $.each(values, function(index, item) {
927
+ if(item.selected == true) {
928
+ module.debug('Setting initial selection to', item.value);
929
+ module.set.selected(item.value);
930
+ return true;
931
+ }
932
+ });
933
+ }
934
+ },
935
+
916
936
  event: {
917
937
  change: function() {
918
938
  if(!internalChange) {
@@ -1081,7 +1101,22 @@ $.fn.dropdown = function(parameters) {
1081
1101
  select: {
1082
1102
  mutation: function(mutations) {
1083
1103
  module.debug('<select> modified, recreating menu');
1084
- module.setup.select();
1104
+ var
1105
+ isSelectMutation = false
1106
+ ;
1107
+ $.each(mutations, function(index, mutation) {
1108
+ if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
1109
+ isSelectMutation = true;
1110
+ return true;
1111
+ }
1112
+ });
1113
+ if(isSelectMutation) {
1114
+ module.disconnect.selectObserver();
1115
+ module.refresh();
1116
+ module.setup.select();
1117
+ module.set.selected();
1118
+ module.observe.select();
1119
+ }
1085
1120
  }
1086
1121
  },
1087
1122
  menu: {
@@ -1619,6 +1654,9 @@ $.fn.dropdown = function(parameters) {
1619
1654
  return $module.data(metadata.defaultValue);
1620
1655
  },
1621
1656
  placeholderText: function() {
1657
+ if(settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
1658
+ return settings.placeholder;
1659
+ }
1622
1660
  return $module.data(metadata.placeholderText) || '';
1623
1661
  },
1624
1662
  text: function() {
@@ -3044,7 +3082,7 @@ $.fn.dropdown = function(parameters) {
3044
3082
  return $(event.target).closest($icon).length > 0;
3045
3083
  },
3046
3084
  alreadySetup: function() {
3047
- return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0);
3085
+ return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
3048
3086
  },
3049
3087
  animating: function($subMenu) {
3050
3088
  return ($subMenu)
@@ -3594,6 +3632,7 @@ $.fn.dropdown.settings = {
3594
3632
  on : 'click', // what event should show menu action on item selection
3595
3633
  action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})
3596
3634
 
3635
+ values : false, // specify values to use for dropdown
3597
3636
 
3598
3637
  apiSettings : false,
3599
3638
  selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
@@ -329,6 +329,9 @@ $.fn.modal = function(parameters) {
329
329
  module.hideOthers(module.showModal);
330
330
  }
331
331
  else {
332
+ if(settings.allowMultiple && settings.detachable) {
333
+ $module.detach().appendTo($dimmer);
334
+ }
332
335
  settings.onShow.call(element);
333
336
  if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
334
337
  module.debug('Showing modal with css animations');
@@ -532,24 +535,41 @@ $.fn.modal = function(parameters) {
532
535
  },
533
536
 
534
537
  cacheSizes: function() {
538
+ $module.addClass(className.loading);
535
539
  var
536
- modalHeight = $module.outerHeight()
540
+ scrollHeight = $module.prop('scrollHeight'),
541
+ modalHeight = $module.outerHeight()
537
542
  ;
538
543
  if(module.cache === undefined || modalHeight !== 0) {
539
544
  module.cache = {
540
545
  pageHeight : $(document).outerHeight(),
541
546
  height : modalHeight + settings.offset,
547
+ scrollHeight : scrollHeight + settings.offset,
542
548
  contextHeight : (settings.context == 'body')
543
549
  ? $(window).height()
544
- : $dimmable.height()
550
+ : $dimmable.height(),
545
551
  };
552
+ module.cache.topOffset = -(module.cache.height / 2);
546
553
  }
554
+ $module.removeClass(className.loading);
547
555
  module.debug('Caching modal and container sizes', module.cache);
548
556
  },
549
557
 
550
558
  can: {
551
559
  fit: function() {
552
- return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight);
560
+ var
561
+ contextHeight = module.cache.contextHeight,
562
+ verticalCenter = module.cache.contextHeight / 2,
563
+ topOffset = module.cache.topOffset,
564
+ scrollHeight = module.cache.scrollHeight,
565
+ height = module.cache.height,
566
+ paddingHeight = settings.padding,
567
+ startPosition = (verticalCenter + topOffset)
568
+ ;
569
+ return (scrollHeight > height)
570
+ ? (startPosition + scrollHeight + paddingHeight < contextHeight)
571
+ : (height + (paddingHeight * 2) < contextHeight)
572
+ ;
553
573
  }
554
574
  },
555
575
 
@@ -664,7 +684,7 @@ $.fn.modal = function(parameters) {
664
684
  $module
665
685
  .css({
666
686
  top: '',
667
- marginTop: -(module.cache.height / 2)
687
+ marginTop: module.cache.topOffset
668
688
  })
669
689
  ;
670
690
  }
@@ -937,6 +957,7 @@ $.fn.modal.settings = {
937
957
  animating : 'animating',
938
958
  blurring : 'blurring',
939
959
  inverted : 'inverted',
960
+ loading : 'loading',
940
961
  scrolling : 'scrolling',
941
962
  undetached : 'undetached'
942
963
  }
@@ -125,7 +125,7 @@ $.fn.popup = function(parameters) {
125
125
  }
126
126
  if(settings.popup) {
127
127
  $popup.addClass(className.loading);
128
- $offsetParent = module.get.offsetParent($target);
128
+ $offsetParent = module.get.offsetParent();
129
129
  $popup.removeClass(className.loading);
130
130
  if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
131
131
  module.debug('Moving popup to the same offset parent as target');
@@ -139,7 +139,7 @@ $.fn.popup = function(parameters) {
139
139
  $offsetParent = (settings.inline)
140
140
  ? module.get.offsetParent($target)
141
141
  : module.has.popup()
142
- ? module.get.offsetParent($target)
142
+ ? module.get.offsetParent($popup)
143
143
  : $body
144
144
  ;
145
145
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Breadcrumb
2
+ * # Semantic UI 2.2.12 - Breadcrumb
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Form
2
+ * # Semantic UI 2.2.12 - Form
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Grid
2
+ * # Semantic UI 2.2.12 - Grid
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -217,7 +217,6 @@
217
217
 
218
218
  /* Menu */
219
219
  .ui.menu .dropdown.item .menu {
220
- left: 0px;
221
220
  min-width: calc(100% - 1px);
222
221
  border-radius: 0em 0em 0.28571429rem 0.28571429rem;
223
222
  background: #FFFFFF;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Message
2
+ * # Semantic UI 2.2.12 - Message
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Table
2
+ * # Semantic UI 2.2.12 - Table
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Button
2
+ * # Semantic UI 2.2.12 - Button
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Container
2
+ * # Semantic UI 2.2.12 - Container
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Divider
2
+ * # Semantic UI 2.2.12 - Divider
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Flag
2
+ * # Semantic UI 2.2.12 - Flag
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Header
2
+ * # Semantic UI 2.2.12 - Header
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -54,7 +54,7 @@
54
54
  display: table-cell;
55
55
  opacity: 1;
56
56
  font-size: 1.5em;
57
- padding-top: 0.14285714em;
57
+ padding-top: 0em;
58
58
  vertical-align: middle;
59
59
  }
60
60
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Icon
2
+ * # Semantic UI 2.2.12 - Icon
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Image
2
+ * # Semantic UI 2.2.12 - Image
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Input
2
+ * # Semantic UI 2.2.12 - Input
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Label
2
+ * # Semantic UI 2.2.12 - Label
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - List
2
+ * # Semantic UI 2.2.12 - List
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -96,7 +96,7 @@ ol.ui.list ol li,
96
96
  .ui.list > .item > i.icon {
97
97
  display: table-cell;
98
98
  margin: 0em;
99
- padding-top: 0.07142857em;
99
+ padding-top: 0em;
100
100
  padding-right: 0.28571429em;
101
101
  vertical-align: top;
102
102
  -webkit-transition: color 0.1s ease;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Loader
2
+ * # Semantic UI 2.2.12 - Loader
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Rail
2
+ * # Semantic UI 2.2.12 - Rail
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Reveal
2
+ * # Semantic UI 2.2.12 - Reveal
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Segment
2
+ * # Semantic UI 2.2.12 - Segment
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Step
2
+ * # Semantic UI 2.2.12 - Step
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Reset
2
+ * # Semantic UI 2.2.12 - Reset
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Site
2
+ * # Semantic UI 2.2.12 - Site
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Accordion
2
+ * # Semantic UI 2.2.12 - Accordion
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Checkbox
2
+ * # Semantic UI 2.2.12 - Checkbox
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Dimmer
2
+ * # Semantic UI 2.2.12 - Dimmer
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Semantic UI 2.2.11 - Dropdown
2
+ * # Semantic UI 2.2.12 - Dropdown
3
3
  * http://github.com/semantic-org/semantic-ui/
4
4
  *
5
5
  *
@@ -834,8 +834,8 @@ select.ui.dropdown {
834
834
  .ui.default.dropdown:not(.button) > .text {
835
835
  color: rgba(191, 191, 191, 0.87);
836
836
  }
837
- .ui.dropdown:not(.button) > input:focus + .default.text,
838
- .ui.default.dropdown:not(.button) > input:focus + .text {
837
+ .ui.dropdown:not(.button) > input:focus ~ .default.text,
838
+ .ui.default.dropdown:not(.button) > input:focus ~ .text {
839
839
  color: rgba(115, 115, 115, 0.87);
840
840
  }
841
841