less-rails-semantic_ui 2.0.2.0 → 2.0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/Appraisals +3 -3
  4. data/README.md +1 -1
  5. data/assets/javascripts/semantic_ui/definitions/behaviors/api.js +14 -1
  6. data/assets/javascripts/semantic_ui/definitions/behaviors/form.js +135 -91
  7. data/assets/javascripts/semantic_ui/definitions/behaviors/visibility.js +9 -6
  8. data/assets/javascripts/semantic_ui/definitions/modules/checkbox.js +16 -3
  9. data/assets/javascripts/semantic_ui/definitions/modules/dropdown.js +67 -20
  10. data/assets/javascripts/semantic_ui/definitions/modules/modal.js +12 -10
  11. data/assets/javascripts/semantic_ui/definitions/modules/popup.js +92 -59
  12. data/assets/javascripts/semantic_ui/definitions/modules/sidebar.js +0 -1
  13. data/assets/javascripts/semantic_ui/definitions/modules/sticky.js +14 -11
  14. data/assets/javascripts/semantic_ui/definitions/modules/transition.js +6 -3
  15. data/assets/stylesheets/semantic_ui/definitions/collections/form.less +6 -1
  16. data/assets/stylesheets/semantic_ui/definitions/collections/menu.less +35 -15
  17. data/assets/stylesheets/semantic_ui/definitions/collections/message.less +1 -2
  18. data/assets/stylesheets/semantic_ui/definitions/collections/table.less +22 -11
  19. data/assets/stylesheets/semantic_ui/definitions/elements/button.less +17 -20
  20. data/assets/stylesheets/semantic_ui/definitions/elements/container.less +1 -6
  21. data/assets/stylesheets/semantic_ui/definitions/elements/divider.less +1 -0
  22. data/assets/stylesheets/semantic_ui/definitions/elements/icon.less +13 -0
  23. data/assets/stylesheets/semantic_ui/definitions/elements/input.less +2 -2
  24. data/assets/stylesheets/semantic_ui/definitions/elements/segment.less +20 -16
  25. data/assets/stylesheets/semantic_ui/definitions/elements/step.less +35 -25
  26. data/assets/stylesheets/semantic_ui/definitions/modules/accordion.less +2 -1
  27. data/assets/stylesheets/semantic_ui/definitions/modules/checkbox.less +99 -62
  28. data/assets/stylesheets/semantic_ui/definitions/modules/modal.less +1 -1
  29. data/assets/stylesheets/semantic_ui/definitions/modules/popup.less +7 -0
  30. data/assets/stylesheets/semantic_ui/themes/basic/elements/step.overrides +3 -0
  31. data/assets/stylesheets/semantic_ui/themes/basic/elements/step.variables +12 -4
  32. data/assets/stylesheets/semantic_ui/themes/colored/modules/checkbox.variables +15 -3
  33. data/assets/stylesheets/semantic_ui/themes/default/collections/form.variables +1 -1
  34. data/assets/stylesheets/semantic_ui/themes/default/collections/menu.variables +12 -11
  35. data/assets/stylesheets/semantic_ui/themes/default/collections/table.variables +11 -2
  36. data/assets/stylesheets/semantic_ui/themes/default/elements/icon.overrides +2 -0
  37. data/assets/stylesheets/semantic_ui/themes/default/elements/segment.variables +6 -5
  38. data/assets/stylesheets/semantic_ui/themes/default/elements/step.variables +6 -3
  39. data/assets/stylesheets/semantic_ui/themes/default/globals/site.variables +10 -9
  40. data/assets/stylesheets/semantic_ui/themes/default/modules/checkbox.variables +32 -11
  41. data/assets/stylesheets/semantic_ui/themes/github/elements/segment.variables +0 -1
  42. data/assets/stylesheets/semantic_ui/themes/github/elements/step.variables +7 -1
  43. data/less-rails-semantic_ui.gemspec +1 -1
  44. data/lib/less/rails/semantic_ui/version.rb +1 -1
  45. metadata +3 -3
@@ -120,7 +120,6 @@ $.fn.sidebar = function(parameters) {
120
120
 
121
121
  destroy: function() {
122
122
  module.verbose('Destroying previous module for', $module);
123
- module.remove.direction();
124
123
  $module
125
124
  .off(eventNamespace)
126
125
  .removeData(moduleNamespace)
@@ -237,8 +237,7 @@ $.fn.sticky = function(parameters) {
237
237
  },
238
238
  context = {
239
239
  offset : $context.offset(),
240
- height : $context.outerHeight(),
241
- bottomPadding : parseInt($context.css('padding-bottom'), 10)
240
+ height : $context.outerHeight()
242
241
  },
243
242
  container = {
244
243
  height: $container.outerHeight()
@@ -260,8 +259,7 @@ $.fn.sticky = function(parameters) {
260
259
  context: {
261
260
  top : context.offset.top,
262
261
  height : context.height,
263
- bottomPadding : context.bottomPadding,
264
- bottom : context.offset.top + context.height - context.bottomPadding
262
+ bottom : context.offset.top + context.height
265
263
  }
266
264
  };
267
265
  module.set.containerSize();
@@ -457,8 +455,14 @@ $.fn.sticky = function(parameters) {
457
455
  }
458
456
  else if(scroll.top > element.top) {
459
457
  module.debug('Element passed, fixing element to page');
460
- module.fixTop();
458
+ if( (element.height + scroll.top - elementScroll) > context.bottom ) {
459
+ module.bindBottom();
460
+ }
461
+ else {
462
+ module.fixTop();
463
+ }
461
464
  }
465
+
462
466
  }
463
467
  else if( module.is.fixed() ) {
464
468
 
@@ -475,6 +479,8 @@ $.fn.sticky = function(parameters) {
475
479
  // scroll element if larger than screen
476
480
  else if(doesntFit) {
477
481
  module.set.scroll(elementScroll);
482
+ module.save.lastScroll(scroll.top);
483
+ module.save.elementScroll(elementScroll);
478
484
  }
479
485
  }
480
486
 
@@ -494,6 +500,8 @@ $.fn.sticky = function(parameters) {
494
500
  // scroll element if larger than screen
495
501
  else if(doesntFit) {
496
502
  module.set.scroll(elementScroll);
503
+ module.save.lastScroll(scroll.top);
504
+ module.save.elementScroll(elementScroll);
497
505
  }
498
506
 
499
507
  }
@@ -513,10 +521,6 @@ $.fn.sticky = function(parameters) {
513
521
  }
514
522
  }
515
523
  }
516
-
517
- // save current scroll for next run
518
- module.save.lastScroll(scroll.top);
519
- module.save.elementScroll(elementScroll);
520
524
  },
521
525
 
522
526
  bindTop: function() {
@@ -542,8 +546,7 @@ $.fn.sticky = function(parameters) {
542
546
  $module
543
547
  .css({
544
548
  left : '',
545
- top : '',
546
- marginBottom : module.cache.context.bottomPadding
549
+ top : ''
547
550
  })
548
551
  .removeClass(className.fixed)
549
552
  .removeClass(className.top)
@@ -553,7 +553,10 @@ $.fn.transition = function() {
553
553
  ;
554
554
  },
555
555
  currentAnimation: function() {
556
- return module.cache.animation || false;
556
+ return (module.cache && module.cache.animation !== undefined)
557
+ ? module.cache.animation
558
+ : false
559
+ ;
557
560
  },
558
561
  currentDirection: function() {
559
562
  return module.is.inward()
@@ -764,9 +767,9 @@ $.fn.transition = function() {
764
767
  module.remove.display();
765
768
  module.remove.visible();
766
769
  module.set.hidden();
770
+ module.force.hidden();
767
771
  settings.onHide.call(this);
768
772
  settings.onComplete.call(this);
769
- module.force.hidden();
770
773
  // module.repaint();
771
774
  },
772
775
 
@@ -774,9 +777,9 @@ $.fn.transition = function() {
774
777
  module.verbose('Showing element', display);
775
778
  module.remove.hidden();
776
779
  module.set.visible();
780
+ module.force.visible();
777
781
  settings.onShow.call(this);
778
782
  settings.onComplete.call(this);
779
- module.force.visible();
780
783
  // module.repaint();
781
784
  },
782
785
 
@@ -54,7 +54,6 @@
54
54
  Field
55
55
  ---------------------*/
56
56
 
57
- .ui.form .fields .field,
58
57
  .ui.form .field {
59
58
  clear: both;
60
59
  margin: @fieldMargin;
@@ -65,6 +64,12 @@
65
64
  margin-bottom: 0em;
66
65
  }
67
66
 
67
+ .ui.form .fields .field {
68
+ clear: both;
69
+ margin: @fieldMargin;
70
+ }
71
+
72
+
68
73
  /*--------------------
69
74
  Labels
70
75
  ---------------------*/
@@ -1764,39 +1764,59 @@ Floated Menu / Item
1764
1764
  Attached
1765
1765
  ---------------*/
1766
1766
 
1767
+ /* Middle */
1767
1768
  .ui.attached.menu {
1769
+ top: 0px;
1770
+ bottom: 0px;
1768
1771
  border-radius: 0px;
1769
- margin-left: -@borderWidth;
1770
- margin-right: -@borderWidth;
1772
+ margin: 0em @attachedHorizontalOffset;
1771
1773
  width: @attachedWidth;
1772
- box-shadow: @attachedBoxShadow; /* avoid rgba multiplying */
1774
+ max-width: @attachedWidth;
1775
+ box-shadow: @attachedBoxShadow;
1773
1776
  }
1774
-
1775
- /* Direction */
1776
- .ui.attached.menu:not(.top):not(.bottom) {
1777
- margin-top: 0em;
1778
- margin-bottom: 0em;
1777
+ .ui.attached + .ui.attached.menu:not(.top) {
1778
+ border-top: none;
1779
1779
  }
1780
- .ui.top.attached.menu {
1780
+
1781
+ /* Top */
1782
+ .ui[class*="top attached"].menu {
1783
+ bottom: 0px;
1781
1784
  margin-bottom: 0em;
1785
+ top: @attachedTopOffset;
1786
+ margin-top: @verticalMargin;
1782
1787
  border-radius: @borderRadius @borderRadius 0em 0em;
1783
1788
  }
1784
- .ui.top.attached.menu > .item:first-child {
1785
- border-radius: @borderRadius 0em 0em 0em;
1789
+ .ui.menu[class*="top attached"]:first-child {
1790
+ margin-top: 0em;
1786
1791
  }
1787
1792
 
1788
- .ui.bottom.attached.menu {
1793
+ /* Bottom */
1794
+ .ui[class*="bottom attached"].menu {
1795
+ bottom: 0px;
1789
1796
  margin-top: 0em;
1790
- border-top: none;
1797
+ top: @attachedBottomOffset;
1798
+ margin-bottom: @verticalMargin;
1799
+ box-shadow: @attachedBottomBoxShadow;
1791
1800
  border-radius: 0em 0em @borderRadius @borderRadius;
1792
1801
  }
1802
+ .ui[class*="bottom attached"].menu:last-child {
1803
+ margin-bottom: 0em;
1804
+ }
1805
+
1806
+ /* Attached Menu Item */
1807
+ .ui.top.attached.menu > .item:first-child {
1808
+ border-radius: @borderRadius 0em 0em 0em;
1809
+ }
1793
1810
  .ui.bottom.attached.menu > .item:first-child {
1794
1811
  border-radius: 0em 0em 0em @borderRadius;
1795
1812
  }
1796
1813
 
1797
1814
  /* Tabular Attached */
1798
- .ui.top.attached.menu:not(.fixed):not(.tabular) {
1799
- border-bottom: none;
1815
+ .ui.attached.menu:not(.tabular) {
1816
+ border: @attachedBorder;
1817
+ }
1818
+ .ui.attached.inverted.menu {
1819
+ border: none;
1800
1820
  }
1801
1821
  .ui.attached.tabular.menu {
1802
1822
  margin-left: 0;
@@ -214,7 +214,6 @@
214
214
  margin-bottom: @verticalMargin;
215
215
  }
216
216
  .ui.attached.icon.message {
217
- display: block;
218
217
  width: auto;
219
218
  }
220
219
 
@@ -230,7 +229,7 @@
230
229
  }
231
230
  .ui.icon.message > .icon:not(.close) {
232
231
  display: block;
233
- flex: 0 1 auto;
232
+ flex: 0 0 auto;
234
233
  width: auto;
235
234
  line-height: 1;
236
235
  vertical-align: @iconVerticalAlign;
@@ -516,22 +516,30 @@
516
516
  }
517
517
 
518
518
 
519
+ /*-------------------
520
+ Attached
521
+ --------------------*/
519
522
 
520
- /*--------------
521
- Attached
522
- ---------------*/
523
-
524
-
525
- /* All */
523
+ /* Middle */
526
524
  .ui.attached.table {
527
- width: @attachedTableWidth;
528
- margin: 0em @attachedHorizontalOffset;
525
+ top: 0px;
526
+ bottom: 0px;
529
527
  border-radius: 0px;
528
+ margin: 0em @attachedHorizontalOffset;
529
+ width: @attachedWidth;
530
+ max-width: @attachedWidth;
530
531
  box-shadow: @attachedBoxShadow;
532
+ border: @attachedBorder;
533
+ }
534
+ .ui.attached + .ui.attached.table:not(.top) {
535
+ border-top: none;
531
536
  }
532
537
 
533
538
  /* Top */
534
539
  .ui[class*="top attached"].table {
540
+ bottom: 0px;
541
+ margin-bottom: 0em;
542
+ top: @attachedTopOffset;
535
543
  margin-top: @verticalMargin;
536
544
  border-radius: @borderRadius @borderRadius 0em 0em;
537
545
  }
@@ -540,12 +548,15 @@
540
548
  }
541
549
 
542
550
  /* Bottom */
543
- .ui.table[class*="bottom attached"] {
551
+ .ui[class*="bottom attached"].table {
552
+ bottom: 0px;
544
553
  margin-top: 0em;
554
+ top: @attachedBottomOffset;
545
555
  margin-bottom: @verticalMargin;
556
+ box-shadow: @attachedBottomBoxShadow;
546
557
  border-radius: 0em 0em @borderRadius @borderRadius;
547
558
  }
548
- .ui.table[class*="bottom attached"]:last-child {
559
+ .ui[class*="bottom attached"].table:last-child {
549
560
  margin-bottom: 0em;
550
561
  }
551
562
 
@@ -905,7 +916,7 @@
905
916
  }
906
917
  .ui.inverted.table th {
907
918
  background-color: @invertedHeaderBackground;
908
- border-color: @invertedCellBorderColor !important;
919
+ border-color: @invertedHeaderBorderColor !important;
909
920
  color: @invertedHeaderColor;
910
921
  }
911
922
  .ui.inverted.table tr td {
@@ -28,8 +28,6 @@
28
28
 
29
29
  @import (multiple) 'semantic_ui/theme.config';
30
30
 
31
- & {
32
-
33
31
  /*******************************
34
32
  Button
35
33
  *******************************/
@@ -1048,12 +1046,12 @@
1048
1046
  --------------------*/
1049
1047
 
1050
1048
  .ui.fluid.buttons,
1051
- .ui.button.fluid {
1052
- display: flex;
1053
- justify-content: center;
1054
- flex-direction: row;
1049
+ .ui.fluid.button {
1055
1050
  width: 100%;
1056
1051
  }
1052
+ .ui.fluid.button {
1053
+ display: block;
1054
+ }
1057
1055
 
1058
1056
  .ui.two.buttons {
1059
1057
  width: 100%;
@@ -1244,7 +1242,7 @@
1244
1242
  box-shadow: 0px 0px 0px @basicColoredBorderSize @blackDown inset !important;
1245
1243
  color: @blackDown !important;
1246
1244
  }
1247
- .ui.buttons > .basic.black.button:not(:first-child) {
1245
+ .ui.buttons:not(.vertical) > .basic.black.button:not(:first-child) {
1248
1246
  margin-left: -@basicColoredBorderSize;
1249
1247
  }
1250
1248
 
@@ -1382,7 +1380,7 @@
1382
1380
  box-shadow: 0px 0px 0px @basicColoredBorderSize @greyDown inset !important;
1383
1381
  color: @greyDown !important;
1384
1382
  }
1385
- .ui.buttons > .basic.grey.button:not(:first-child) {
1383
+ .ui.buttons:not(.vertical) > .basic.grey.button:not(:first-child) {
1386
1384
  margin-left: -@basicColoredBorderSize;
1387
1385
  }
1388
1386
 
@@ -1521,7 +1519,7 @@
1521
1519
  box-shadow: 0px 0px 0px @basicColoredBorderSize @brownDown inset !important;
1522
1520
  color: @brownDown !important;
1523
1521
  }
1524
- .ui.buttons > .basic.brown.button:not(:first-child) {
1522
+ .ui.buttons:not(.vertical) > .basic.brown.button:not(:first-child) {
1525
1523
  margin-left: -@basicColoredBorderSize;
1526
1524
  }
1527
1525
 
@@ -1659,7 +1657,7 @@
1659
1657
  box-shadow: 0px 0px 0px @basicColoredBorderSize @blueDown inset !important;
1660
1658
  color: @blueDown !important;
1661
1659
  }
1662
- .ui.buttons > .basic.blue.button:not(:first-child) {
1660
+ .ui.buttons:not(.vertical) > .basic.blue.button:not(:first-child) {
1663
1661
  margin-left: -@basicColoredBorderSize;
1664
1662
  }
1665
1663
 
@@ -1798,7 +1796,7 @@
1798
1796
  box-shadow: 0px 0px 0px @basicColoredBorderSize @greenDown inset !important;
1799
1797
  color: @greenDown !important;
1800
1798
  }
1801
- .ui.buttons > .basic.green.button:not(:first-child) {
1799
+ .ui.buttons:not(.vertical) > .basic.green.button:not(:first-child) {
1802
1800
  margin-left: -@basicColoredBorderSize;
1803
1801
  }
1804
1802
 
@@ -1936,7 +1934,7 @@
1936
1934
  box-shadow: 0px 0px 0px @basicColoredBorderSize @orangeDown inset !important;
1937
1935
  color: @orangeDown !important;
1938
1936
  }
1939
- .ui.buttons > .basic.orange.button:not(:first-child) {
1937
+ .ui.buttons:not(.vertical) > .basic.orange.button:not(:first-child) {
1940
1938
  margin-left: -@basicColoredBorderSize;
1941
1939
  }
1942
1940
 
@@ -2074,7 +2072,7 @@
2074
2072
  box-shadow: 0px 0px 0px @basicColoredBorderSize @pinkDown inset !important;
2075
2073
  color: @pinkDown !important;
2076
2074
  }
2077
- .ui.buttons > .basic.pink.button:not(:first-child) {
2075
+ .ui.buttons:not(.vertical) > .basic.pink.button:not(:first-child) {
2078
2076
  margin-left: -@basicColoredBorderSize;
2079
2077
  }
2080
2078
 
@@ -2213,7 +2211,7 @@
2213
2211
  box-shadow: 0px 0px 0px @basicColoredBorderSize @violetDown inset !important;
2214
2212
  color: @violetDown !important;
2215
2213
  }
2216
- .ui.buttons > .basic.violet.button:not(:first-child) {
2214
+ .ui.buttons:not(.vertical) > .basic.violet.button:not(:first-child) {
2217
2215
  margin-left: -@basicColoredBorderSize;
2218
2216
  }
2219
2217
 
@@ -2351,7 +2349,7 @@
2351
2349
  box-shadow: 0px 0px 0px @basicColoredBorderSize @purpleDown inset !important;
2352
2350
  color: @purpleDown !important;
2353
2351
  }
2354
- .ui.buttons > .basic.purple.button:not(:first-child) {
2352
+ .ui.buttons:not(.vertical) > .basic.purple.button:not(:first-child) {
2355
2353
  margin-left: -@basicColoredBorderSize;
2356
2354
  }
2357
2355
 
@@ -2489,7 +2487,7 @@
2489
2487
  box-shadow: 0px 0px 0px @basicColoredBorderSize @redDown inset !important;
2490
2488
  color: @redDown !important;
2491
2489
  }
2492
- .ui.buttons > .basic.red.button:not(:first-child) {
2490
+ .ui.buttons:not(.vertical) > .basic.red.button:not(:first-child) {
2493
2491
  margin-left: -@basicColoredBorderSize;
2494
2492
  }
2495
2493
 
@@ -2628,7 +2626,7 @@
2628
2626
  box-shadow: 0px 0px 0px @basicColoredBorderSize @tealDown inset !important;
2629
2627
  color: @tealDown !important;
2630
2628
  }
2631
- .ui.buttons > .basic.teal.button:not(:first-child) {
2629
+ .ui.buttons:not(.vertical) > .basic.teal.button:not(:first-child) {
2632
2630
  margin-left: -@basicColoredBorderSize;
2633
2631
  }
2634
2632
 
@@ -2767,7 +2765,7 @@
2767
2765
  box-shadow: 0px 0px 0px @basicColoredBorderSize @oliveDown inset !important;
2768
2766
  color: @oliveDown !important;
2769
2767
  }
2770
- .ui.buttons > .basic.olive.button:not(:first-child) {
2768
+ .ui.buttons:not(.vertical) > .basic.olive.button:not(:first-child) {
2771
2769
  margin-left: -@basicColoredBorderSize;
2772
2770
  }
2773
2771
 
@@ -2905,7 +2903,7 @@
2905
2903
  box-shadow: 0px 0px 0px @basicColoredBorderSize @yellowDown inset !important;
2906
2904
  color: @yellowDown !important;
2907
2905
  }
2908
- .ui.buttons > .basic.yellow.button:not(:first-child) {
2906
+ .ui.buttons:not(.vertical) > .basic.yellow.button:not(:first-child) {
2909
2907
  margin-left: -@basicColoredBorderSize;
2910
2908
  }
2911
2909
 
@@ -3217,4 +3215,3 @@
3217
3215
 
3218
3216
  .loadUIOverrides();
3219
3217
 
3220
- }
@@ -28,13 +28,10 @@
28
28
 
29
29
  @import (multiple) 'semantic_ui/theme.config';
30
30
 
31
- & {
32
-
33
31
  /*******************************
34
32
  Container
35
33
  *******************************/
36
34
 
37
-
38
35
  /* All Sizes */
39
36
  .ui.container {
40
37
  display: block;
@@ -130,6 +127,4 @@
130
127
  }
131
128
 
132
129
 
133
- .loadUIOverrides();
134
-
135
- }
130
+ .loadUIOverrides();