materialize-sass 0.97.8 → 0.98.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/Rakefile +1 -1
  4. data/app/assets/javascripts/materialize.js +5 -5
  5. data/app/assets/javascripts/materialize/animation.js +8 -9
  6. data/app/assets/javascripts/materialize/carousel.js +52 -25
  7. data/app/assets/javascripts/materialize/character_counter.js +2 -2
  8. data/app/assets/javascripts/materialize/chips.js +39 -10
  9. data/app/assets/javascripts/materialize/dropdown.js +12 -12
  10. data/app/assets/javascripts/materialize/extras/nouislider.js +1917 -1438
  11. data/app/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
  12. data/app/assets/javascripts/materialize/forms.js +131 -35
  13. data/app/assets/javascripts/materialize/global.js +55 -0
  14. data/app/assets/javascripts/materialize/init.js +41 -4
  15. data/app/assets/javascripts/materialize/jquery.hammer.js +0 -0
  16. data/app/assets/javascripts/materialize/materialbox.js +86 -77
  17. data/app/assets/javascripts/materialize/modal.js +12 -12
  18. data/app/assets/javascripts/materialize/parallax.js +48 -48
  19. data/app/assets/javascripts/materialize/scrollFire.js +40 -37
  20. data/app/assets/javascripts/materialize/scrollspy.js +2 -53
  21. data/app/assets/javascripts/materialize/sideNav.js +46 -40
  22. data/app/assets/javascripts/materialize/slider.js +15 -12
  23. data/app/assets/javascripts/materialize/tabs.js +104 -35
  24. data/app/assets/javascripts/materialize/toasts.js +122 -123
  25. data/app/assets/javascripts/materialize/tooltip.js +15 -13
  26. data/app/assets/javascripts/materialize/transitions.js +24 -24
  27. data/app/assets/stylesheets/materialize.scss +2 -0
  28. data/app/assets/stylesheets/materialize/components/_badges.scss +46 -0
  29. data/app/assets/stylesheets/materialize/components/_buttons.scss +29 -17
  30. data/app/assets/stylesheets/materialize/components/_cards.scss +9 -3
  31. data/app/assets/stylesheets/materialize/components/_carousel.scss +1 -1
  32. data/app/assets/stylesheets/materialize/components/_collapsible.scss +3 -7
  33. data/app/assets/stylesheets/materialize/components/_global.scss +6 -62
  34. data/app/assets/stylesheets/materialize/components/_icons-material-design.scss +0 -0
  35. data/app/assets/stylesheets/materialize/components/_materialbox.scss +13 -12
  36. data/app/assets/stylesheets/materialize/components/_navbar.scss +26 -7
  37. data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -0
  38. data/app/assets/stylesheets/materialize/components/_sideNav.scss +8 -5
  39. data/app/assets/stylesheets/materialize/components/_table_of_contents.scss +2 -2
  40. data/app/assets/stylesheets/materialize/components/_tabs.scss +0 -0
  41. data/app/assets/stylesheets/materialize/components/_toast.scss +1 -1
  42. data/app/assets/stylesheets/materialize/components/_tooltip.scss +2 -3
  43. data/app/assets/stylesheets/materialize/components/_transitions.scss +13 -0
  44. data/app/assets/stylesheets/materialize/components/_typography.scss +0 -0
  45. data/app/assets/stylesheets/materialize/components/_variables.scss +7 -1
  46. data/app/assets/stylesheets/materialize/components/_waves.scss +80 -143
  47. data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -0
  48. data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -0
  49. data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -0
  50. data/app/assets/stylesheets/materialize/components/forms/_input-fields.scss +4 -4
  51. data/app/assets/stylesheets/materialize/extras/nouislider.css +263 -123
  52. data/lib/materialize-sass/version.rb +1 -1
  53. metadata +4 -2
@@ -86,18 +86,20 @@
86
86
  started = true;
87
87
  tooltipEl.velocity('stop');
88
88
  backdrop.velocity('stop');
89
- tooltipEl.css({ display: 'block', left: '0px', top: '0px' });
89
+ tooltipEl.css({ visibility: 'visible', left: '0px', top: '0px' });
90
90
 
91
91
  // Tooltip positioning
92
92
  var originWidth = origin.outerWidth();
93
93
  var originHeight = origin.outerHeight();
94
-
95
94
  var tooltipHeight = tooltipEl.outerHeight();
96
95
  var tooltipWidth = tooltipEl.outerWidth();
97
96
  var tooltipVerticalMovement = '0px';
98
97
  var tooltipHorizontalMovement = '0px';
98
+ var backdropOffsetWidth = backdrop[0].offsetWidth;
99
+ var backdropOffsetHeight = backdrop[0].offsetHeight;
99
100
  var scaleXFactor = 8;
100
101
  var scaleYFactor = 8;
102
+ var scaleFactor = 0;
101
103
  var targetTop, targetLeft, newCoordinates;
102
104
 
103
105
  if (tooltipPosition === "top") {
@@ -105,7 +107,6 @@
105
107
  targetTop = origin.offset().top - tooltipHeight - margin;
106
108
  targetLeft = origin.offset().left + originWidth/2 - tooltipWidth/2;
107
109
  newCoordinates = repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
108
-
109
110
  tooltipVerticalMovement = '-10px';
110
111
  backdrop.css({
111
112
  bottom: 0,
@@ -113,7 +114,7 @@
113
114
  borderRadius: '14px 14px 0 0',
114
115
  transformOrigin: '50% 100%',
115
116
  marginTop: tooltipHeight,
116
- marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
117
+ marginLeft: (tooltipWidth/2) - (backdropOffsetWidth/2)
117
118
  });
118
119
  }
119
120
  // Left Position
@@ -161,7 +162,7 @@
161
162
  backdrop.css({
162
163
  top: 0,
163
164
  left: 0,
164
- marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
165
+ marginLeft: (tooltipWidth/2) - (backdropOffsetWidth/2)
165
166
  });
166
167
  }
167
168
 
@@ -172,14 +173,15 @@
172
173
  });
173
174
 
174
175
  // Calculate Scale to fill
175
- scaleXFactor = Math.SQRT2 * tooltipWidth / parseInt(backdrop.css('width'));
176
- scaleYFactor = Math.SQRT2 * tooltipHeight / parseInt(backdrop.css('height'));
176
+ scaleXFactor = Math.SQRT2 * tooltipWidth / parseInt(backdropOffsetWidth);
177
+ scaleYFactor = Math.SQRT2 * tooltipHeight / parseInt(backdropOffsetHeight);
178
+ scaleFactor = Math.max(scaleXFactor, scaleYFactor);
177
179
 
178
- tooltipEl.velocity({ marginTop: tooltipVerticalMovement, marginLeft: tooltipHorizontalMovement}, { duration: 350, queue: false })
180
+ tooltipEl.velocity({ translateY: tooltipVerticalMovement, translateX: tooltipHorizontalMovement}, { duration: 350, queue: false })
179
181
  .velocity({opacity: 1}, {duration: 300, delay: 50, queue: false});
180
- backdrop.css({ display: 'block' })
182
+ backdrop.css({ visibility: 'visible' })
181
183
  .velocity({opacity:1},{duration: 55, delay: 0, queue: false})
182
- .velocity({scaleX: scaleXFactor, scaleY: scaleYFactor}, {duration: 300, delay: 0, queue: false, easing: 'easeInOutQuad'});
184
+ .velocity({scaleX: scaleFactor, scaleY: scaleFactor}, {duration: 300, delay: 0, queue: false, easing: 'easeInOutQuad'});
183
185
  };
184
186
 
185
187
  timeoutRef = setTimeout(showTooltip, tooltipDelay); // End Interval
@@ -195,13 +197,13 @@
195
197
  setTimeout(function() {
196
198
  if (started !== true) {
197
199
  tooltipEl.velocity({
198
- opacity: 0, marginTop: 0, marginLeft: 0}, { duration: 225, queue: false});
200
+ opacity: 0, translateY: 0, translateX: 0}, { duration: 225, queue: false});
199
201
  backdrop.velocity({opacity: 0, scaleX: 1, scaleY: 1}, {
200
202
  duration:225,
201
203
  queue: false,
202
204
  complete: function(){
203
- backdrop.css('display', 'none');
204
- tooltipEl.css('display', 'none');
205
+ backdrop.css({ visibility: 'hidden' });
206
+ tooltipEl.css({ visibility: 'hidden' });
205
207
  started = false;}
206
208
  });
207
209
  }
@@ -1,6 +1,6 @@
1
1
  (function ($) {
2
2
  // Image transition function
3
- Materialize.fadeInImage = function(selectorOrEl) {
3
+ Materialize.fadeInImage = function(selectorOrEl) {
4
4
  var element;
5
5
  if (typeof(selectorOrEl) === 'string') {
6
6
  element = $(selectorOrEl);
@@ -11,30 +11,30 @@
11
11
  }
12
12
  element.css({opacity: 0});
13
13
  $(element).velocity({opacity: 1}, {
14
- duration: 650,
15
- queue: false,
16
- easing: 'easeOutSine'
17
- });
14
+ duration: 650,
15
+ queue: false,
16
+ easing: 'easeOutSine'
17
+ });
18
18
  $(element).velocity({opacity: 1}, {
19
- duration: 1300,
20
- queue: false,
21
- easing: 'swing',
22
- step: function(now, fx) {
23
- fx.start = 100;
24
- var grayscale_setting = now/100;
25
- var brightness_setting = 150 - (100 - now)/1.75;
26
-
27
- if (brightness_setting < 100) {
28
- brightness_setting = 100;
29
- }
30
- if (now >= 0) {
31
- $(this).css({
32
- "-webkit-filter": "grayscale("+grayscale_setting+")" + "brightness("+brightness_setting+"%)",
33
- "filter": "grayscale("+grayscale_setting+")" + "brightness("+brightness_setting+"%)"
34
- });
35
- }
36
- }
37
- });
19
+ duration: 1300,
20
+ queue: false,
21
+ easing: 'swing',
22
+ step: function(now, fx) {
23
+ fx.start = 100;
24
+ var grayscale_setting = now/100;
25
+ var brightness_setting = 150 - (100 - now)/1.75;
26
+
27
+ if (brightness_setting < 100) {
28
+ brightness_setting = 100;
29
+ }
30
+ if (now >= 0) {
31
+ $(this).css({
32
+ "-webkit-filter": "grayscale("+grayscale_setting+")" + "brightness("+brightness_setting+"%)",
33
+ "filter": "grayscale("+grayscale_setting+")" + "brightness("+brightness_setting+"%)"
34
+ });
35
+ }
36
+ }
37
+ });
38
38
  };
39
39
 
40
40
  // Horizontal staggered list
@@ -13,11 +13,13 @@
13
13
 
14
14
  // materialize/components
15
15
  @import "materialize/components/global";
16
+ @import "materialize/components/badges";
16
17
  @import "materialize/components/icons-material-design";
17
18
  @import "materialize/components/grid";
18
19
  @import "materialize/components/navbar";
19
20
  @import "materialize/components/roboto";
20
21
  @import "materialize/components/typography";
22
+ @import "materialize/components/transitions";
21
23
  @import "materialize/components/cards";
22
24
  @import "materialize/components/toast";
23
25
  @import "materialize/components/tabs";
@@ -0,0 +1,46 @@
1
+ // Badges
2
+ span.badge {
3
+ min-width: 3rem;
4
+ padding: 0 6px;
5
+ margin-left: 14px;
6
+ text-align: center;
7
+ font-size: 1rem;
8
+ line-height: $badge-height;
9
+ height: $badge-height;
10
+ color: color('grey', 'darken-1');
11
+ float: right;
12
+ box-sizing: border-box;
13
+
14
+ &.new {
15
+ font-weight: 300;
16
+ font-size: 0.8rem;
17
+ color: #fff;
18
+ background-color: $badge-bg-color;
19
+ border-radius: 2px;
20
+ }
21
+ &.new:after {
22
+ content: " new";
23
+ }
24
+
25
+ &[data-badge-caption]::after {
26
+ content: " " attr(data-badge-caption);
27
+ }
28
+ }
29
+ nav ul a span.badge {
30
+ display: inline-block;
31
+ float: none;
32
+ margin-left: 4px;
33
+ line-height: $badge-height;
34
+ height: $badge-height;
35
+ }
36
+
37
+ // Line height centering
38
+ .collection-item span.badge {
39
+ margin-top: calc(#{$collection-line-height / 2} - #{$badge-height / 2});
40
+ }
41
+ .collapsible span.badge {
42
+ margin-top: calc(#{$collapsible-line-height / 2} - #{$badge-height / 2});
43
+ }
44
+ .side-nav span.badge {
45
+ margin-top: calc(#{$sidenav-line-height / 2} - #{$badge-height / 2});
46
+ }
@@ -79,6 +79,35 @@
79
79
 
80
80
  // Floating button
81
81
  .btn-floating {
82
+ &:hover {
83
+ background-color: $button-floating-background-hover;
84
+ @extend .z-depth-1-half;
85
+ }
86
+
87
+ &:before {
88
+ border-radius: 0;
89
+ }
90
+
91
+ &.btn-large {
92
+ width: $button-floating-large-size;
93
+ height: $button-floating-large-size;
94
+ i {
95
+ line-height: $button-floating-large-size;
96
+ }
97
+ }
98
+
99
+ &.halfway-fab {
100
+ &.left {
101
+ right: auto;
102
+ left: 24px;
103
+ }
104
+
105
+ position: absolute;
106
+ right: 24px;
107
+ bottom: 0;
108
+ transform: translateY(50%);
109
+ }
110
+
82
111
  display: inline-block;
83
112
  color: $button-floating-color;
84
113
  position: relative;
@@ -103,23 +132,6 @@
103
132
  font-size: $button-large-icon-font-size;
104
133
  line-height: $button-floating-size;
105
134
  }
106
-
107
- &:hover {
108
- background-color: $button-floating-background-hover;
109
- @extend .z-depth-1-half;
110
- }
111
-
112
- &:before {
113
- border-radius: 0;
114
- }
115
-
116
- &.btn-large {
117
- width: $button-floating-large-size;
118
- height: $button-floating-large-size;
119
- i {
120
- line-height: $button-floating-large-size;
121
- }
122
- }
123
135
  }
124
136
 
125
137
  // button fix
@@ -133,9 +133,9 @@
133
133
  position: absolute;
134
134
  bottom: 0;
135
135
  left: 0;
136
+ max-width: 100%;
136
137
  padding: $card-padding;
137
138
  }
138
-
139
139
  }
140
140
 
141
141
  .card-content {
@@ -147,7 +147,13 @@
147
147
  color: inherit;
148
148
  }
149
149
  .card-title {
150
- line-height: 48px;
150
+ display: block;
151
+ line-height: 32px;
152
+ margin-bottom: 8px;
153
+
154
+ i {
155
+ line-height: 32px;
156
+ }
151
157
  }
152
158
  }
153
159
 
@@ -155,7 +161,7 @@
155
161
  position: relative;
156
162
  background-color: inherit;
157
163
  border-top: 1px solid rgba(160,160,160,.2);
158
- padding: $card-padding;
164
+ padding: 16px $card-padding;
159
165
 
160
166
  a:not(.btn):not(.btn-large):not(.btn-floating) {
161
167
  color: $card-link-color;
@@ -47,7 +47,7 @@
47
47
  .carousel-item {
48
48
  display: none;
49
49
  width: 200px;
50
- height: 400px;
50
+ height: 200px;
51
51
  position: absolute;
52
52
  top: 0;
53
53
  left: 0;
@@ -10,7 +10,7 @@
10
10
  display: block;
11
11
  cursor: pointer;
12
12
  min-height: $collapsible-height;
13
- line-height: $collapsible-height;
13
+ line-height: $collapsible-line-height;
14
14
  padding: 0 1rem;
15
15
  background-color: $collapsible-header-color;
16
16
  border-bottom: 1px solid $collapsible-border-color;
@@ -18,7 +18,7 @@
18
18
  i {
19
19
  width: 2rem;
20
20
  font-size: 1.6rem;
21
- line-height: $collapsible-height;
21
+ line-height: $collapsible-line-height;
22
22
  display: block;
23
23
  float: left;
24
24
  text-align: center;
@@ -30,11 +30,7 @@
30
30
  display: none;
31
31
  border-bottom: 1px solid $collapsible-border-color;
32
32
  box-sizing: border-box;
33
-
34
- p {
35
- margin: 0;
36
- padding: 2rem;
37
- }
33
+ padding: 2rem;
38
34
  }
39
35
 
40
36
  // sideNav collapsible styling
@@ -344,15 +344,16 @@ ul.staggered-list li {
344
344
  }
345
345
 
346
346
  // Footer
347
- footer.page-footer {
348
- margin-top: 20px;
347
+ .page-footer {
349
348
  padding-top: 20px;
350
349
  background-color: $footer-bg-color;
351
350
 
352
351
  .footer-copyright {
353
352
  overflow: hidden;
354
- height: 50px;
355
- line-height: 50px;
353
+ min-height: 50px;
354
+ display: flex;
355
+ align-items: center;
356
+ padding: 10px 0px;
356
357
  color: rgba(255,255,255,.8);
357
358
  background-color: rgba(51,51,51,.08);
358
359
  @extend .light;
@@ -495,7 +496,7 @@ td, th{
495
496
 
496
497
  .collection-item {
497
498
  background-color: $collection-bg-color;
498
- line-height: 1.5rem;
499
+ line-height: $collection-line-height;
499
500
  padding: 10px 20px;
500
501
  margin: 0;
501
502
  border-bottom: 1px solid $collection-border-color;
@@ -592,63 +593,6 @@ td, th{
592
593
 
593
594
 
594
595
 
595
- // Badges
596
- span.badge {
597
- min-width: 3rem;
598
- padding: 0 6px;
599
- margin-left: 14px;
600
- text-align: center;
601
- font-size: 1rem;
602
- line-height: inherit;
603
- color: color('grey', 'darken-1');
604
- float: right;
605
- box-sizing: border-box;
606
-
607
- &.new {
608
- font-weight: 300;
609
- font-size: 0.8rem;
610
- color: #fff;
611
- background-color: $badge-bg-color;
612
- border-radius: 2px;
613
- }
614
- &.new:after {
615
- content: " new";
616
- }
617
-
618
- &[data-badge-caption]::after {
619
- content: " " attr(data-badge-caption);
620
- }
621
- }
622
- nav ul a span.badge {
623
- display: inline-block;
624
- float: none;
625
- margin-left: 4px;
626
- line-height: 22px;
627
- height: 22px;
628
- }
629
- .side-nav span.badge.new,
630
- .collapsible span.badge.new {
631
- &::before {
632
- content: '';
633
- position: absolute;
634
- top: 10px;
635
- right: 0;
636
- bottom: 10px;
637
- left: 0;
638
- background-color: $badge-bg-color;
639
- border-radius: 2px;
640
- z-index: -1;
641
- }
642
-
643
- position: relative;
644
- background-color: transparent;
645
- }
646
- .collapsible span.badge.new {
647
- z-index: 1;
648
- }
649
-
650
-
651
-
652
596
  // Responsive Videos
653
597
  .video-container {
654
598
  position: relative;
@@ -1,38 +1,39 @@
1
1
  .materialboxed {
2
- display: block;
3
- cursor: zoom-in;
4
- position: relative;
5
- transition: opacity .4s;
6
-
7
2
  &:hover {
8
3
  &:not(.active) {
9
4
  opacity: .8;
10
5
  }
11
- will-change: left, top, width, height;
12
6
  }
13
- }
14
7
 
15
- .materialboxed.active {
16
- cursor: zoom-out;
8
+ display: block;
9
+ cursor: zoom-in;
10
+ position: relative;
11
+ transition: opacity .4s;
12
+ -webkit-backface-visibility: hidden;
13
+
14
+ &.active {
15
+ cursor: zoom-out;
16
+ }
17
17
  }
18
18
 
19
19
  #materialbox-overlay {
20
20
  position:fixed;
21
- top:0;
22
- left:0;
21
+ top: 0;
23
22
  right: 0;
24
23
  bottom: 0;
24
+ left: 0;
25
25
  background-color: #292929;
26
26
  z-index: 1000;
27
-
28
27
  will-change: opacity;
29
28
  }
29
+
30
30
  .materialbox-caption {
31
31
  position: fixed;
32
32
  display: none;
33
33
  color: #fff;
34
34
  line-height: 50px;
35
35
  bottom: 0;
36
+ left: 0;
36
37
  width: 100%;
37
38
  text-align: center;
38
39
  padding: 0% 15%;