materialize-sass 0.99.0 → 0.100.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/app/assets/javascripts/materialize.js +6015 -5060
- data/app/assets/javascripts/materialize/animation.js +4 -5
- data/app/assets/javascripts/materialize/buttons.js +24 -38
- data/app/assets/javascripts/materialize/cards.js +13 -21
- data/app/assets/javascripts/materialize/carousel.js +122 -110
- data/app/assets/javascripts/materialize/character_counter.js +14 -22
- data/app/assets/javascripts/materialize/chips.js +41 -44
- data/app/assets/javascripts/materialize/collapsible.js +41 -46
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +965 -1167
- data/app/assets/javascripts/materialize/date_picker/picker.js +546 -634
- data/app/assets/javascripts/materialize/date_picker/picker.time.js +166 -212
- data/app/assets/javascripts/materialize/dropdown.js +53 -68
- data/app/assets/javascripts/materialize/extras/nouislider.js +3 -1
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
- data/app/assets/javascripts/materialize/forms.js +156 -154
- data/app/assets/javascripts/materialize/global.js +34 -43
- data/app/assets/javascripts/materialize/hammer.min.js +424 -1
- data/app/assets/javascripts/materialize/initial.js +3 -3
- data/app/assets/javascripts/materialize/jquery.easing.1.4.js +120 -142
- data/app/assets/javascripts/materialize/jquery.hammer.js +9 -9
- data/app/assets/javascripts/materialize/materialbox.js +81 -107
- data/app/assets/javascripts/materialize/modal.js +373 -162
- data/app/assets/javascripts/materialize/parallax.js +11 -15
- data/app/assets/javascripts/materialize/pushpin.js +2 -5
- data/app/assets/javascripts/materialize/scrollFire.js +9 -11
- data/app/assets/javascripts/materialize/scrollspy.js +84 -92
- data/app/assets/javascripts/materialize/sideNav.js +128 -139
- data/app/assets/javascripts/materialize/slider.js +83 -112
- data/app/assets/javascripts/materialize/tabs.js +196 -196
- data/app/assets/javascripts/materialize/tapTarget.js +170 -173
- data/app/assets/javascripts/materialize/toasts.js +330 -112
- data/app/assets/javascripts/materialize/tooltip.js +134 -145
- data/app/assets/javascripts/materialize/transitions.js +43 -49
- data/app/assets/javascripts/materialize/velocity.min.js +623 -2
- data/app/assets/javascripts/materialize/waves.js +42 -47
- data/app/assets/stylesheets/materialize/components/_buttons.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_carousel.scss +4 -5
- data/app/assets/stylesheets/materialize/components/_chips.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_collapsible.scss +4 -7
- data/app/assets/stylesheets/materialize/components/_color.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_global.scss +8 -14
- data/app/assets/stylesheets/materialize/components/_navbar.scss +0 -1
- data/app/assets/stylesheets/materialize/components/_tabs.scss +1 -7
- data/app/assets/stylesheets/materialize/components/_toast.scss +6 -12
- data/app/assets/stylesheets/materialize/components/_variables.scss +55 -43
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +1 -0
- data/app/assets/stylesheets/materialize/components/forms/_checkboxes.scss +2 -12
- data/app/assets/stylesheets/materialize/components/forms/_file-input.scss +6 -0
- data/app/assets/stylesheets/materialize/components/forms/_input-fields.scss +67 -37
- data/app/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +1 -3
- data/app/assets/stylesheets/materialize/components/forms/_select.scss +72 -11
- data/app/assets/stylesheets/materialize/components/forms/_switches.scss +2 -4
- data/app/assets/stylesheets/materialize/extras/nouislider.css +8 -1
- data/lib/materialize-sass/version.rb +1 -1
- metadata +2 -5
- data/app/assets/javascripts/materialize/init.js +0 -214
- data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
- data/app/assets/javascripts/materialize/prism.js +0 -8
@@ -7,7 +7,7 @@
|
|
7
7
|
* https://github.com/fians/Waves/blob/master/LICENSE
|
8
8
|
*/
|
9
9
|
|
10
|
-
;(function(window) {
|
10
|
+
;(function (window) {
|
11
11
|
'use strict';
|
12
12
|
|
13
13
|
var Waves = Waves || {};
|
@@ -23,8 +23,9 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
function offset(elem) {
|
26
|
-
var docElem,
|
27
|
-
|
26
|
+
var docElem,
|
27
|
+
win,
|
28
|
+
box = { top: 0, left: 0 },
|
28
29
|
doc = elem && elem.ownerDocument;
|
29
30
|
|
30
31
|
docElem = doc.documentElement;
|
@@ -44,7 +45,7 @@
|
|
44
45
|
|
45
46
|
for (var a in obj) {
|
46
47
|
if (obj.hasOwnProperty(a)) {
|
47
|
-
style +=
|
48
|
+
style += a + ':' + obj[a] + ';';
|
48
49
|
}
|
49
50
|
}
|
50
51
|
|
@@ -56,7 +57,7 @@
|
|
56
57
|
// Effect delay
|
57
58
|
duration: 750,
|
58
59
|
|
59
|
-
show: function(e, element) {
|
60
|
+
show: function (e, element) {
|
60
61
|
|
61
62
|
// Disable right click
|
62
63
|
if (e.button === 2) {
|
@@ -71,15 +72,15 @@
|
|
71
72
|
el.appendChild(ripple);
|
72
73
|
|
73
74
|
// Get click coordinate and element witdh
|
74
|
-
var pos
|
75
|
-
var relativeY
|
76
|
-
var relativeX
|
77
|
-
var scale
|
75
|
+
var pos = offset(el);
|
76
|
+
var relativeY = e.pageY - pos.top;
|
77
|
+
var relativeX = e.pageX - pos.left;
|
78
|
+
var scale = 'scale(' + el.clientWidth / 100 * 10 + ')';
|
78
79
|
|
79
80
|
// Support for touch devices
|
80
81
|
if ('touches' in e) {
|
81
|
-
|
82
|
-
|
82
|
+
relativeY = e.touches[0].pageY - pos.top;
|
83
|
+
relativeX = e.touches[0].pageX - pos.left;
|
83
84
|
}
|
84
85
|
|
85
86
|
// Attach data to element
|
@@ -90,8 +91,8 @@
|
|
90
91
|
|
91
92
|
// Set ripple position
|
92
93
|
var rippleStyle = {
|
93
|
-
'top': relativeY+'px',
|
94
|
-
'left': relativeX+'px'
|
94
|
+
'top': relativeY + 'px',
|
95
|
+
'left': relativeX + 'px'
|
95
96
|
};
|
96
97
|
|
97
98
|
ripple.className = ripple.className + ' waves-notransition';
|
@@ -104,22 +105,22 @@
|
|
104
105
|
rippleStyle['-ms-transform'] = scale;
|
105
106
|
rippleStyle['-o-transform'] = scale;
|
106
107
|
rippleStyle.transform = scale;
|
107
|
-
rippleStyle.opacity
|
108
|
+
rippleStyle.opacity = '1';
|
108
109
|
|
109
110
|
rippleStyle['-webkit-transition-duration'] = Effect.duration + 'ms';
|
110
|
-
rippleStyle['-moz-transition-duration']
|
111
|
-
rippleStyle['-o-transition-duration']
|
112
|
-
rippleStyle['transition-duration']
|
111
|
+
rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';
|
112
|
+
rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';
|
113
|
+
rippleStyle['transition-duration'] = Effect.duration + 'ms';
|
113
114
|
|
114
115
|
rippleStyle['-webkit-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
|
115
|
-
rippleStyle['-moz-transition-timing-function']
|
116
|
-
rippleStyle['-o-transition-timing-function']
|
117
|
-
rippleStyle['transition-timing-function']
|
116
|
+
rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
|
117
|
+
rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
|
118
|
+
rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
|
118
119
|
|
119
120
|
ripple.setAttribute('style', convertStyle(rippleStyle));
|
120
121
|
},
|
121
122
|
|
122
|
-
hide: function(e) {
|
123
|
+
hide: function (e) {
|
123
124
|
TouchHandler.touchup(e);
|
124
125
|
|
125
126
|
var el = this;
|
@@ -134,9 +135,9 @@
|
|
134
135
|
return false;
|
135
136
|
}
|
136
137
|
|
137
|
-
var relativeX
|
138
|
-
var relativeY
|
139
|
-
var scale
|
138
|
+
var relativeX = ripple.getAttribute('data-x');
|
139
|
+
var relativeY = ripple.getAttribute('data-y');
|
140
|
+
var scale = ripple.getAttribute('data-scale');
|
140
141
|
|
141
142
|
// Get delay beetween mousedown and mouse leave
|
142
143
|
var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
|
@@ -147,10 +148,10 @@
|
|
147
148
|
}
|
148
149
|
|
149
150
|
// Fade out ripple after delay
|
150
|
-
setTimeout(function() {
|
151
|
+
setTimeout(function () {
|
151
152
|
var style = {
|
152
|
-
'top': relativeY+'px',
|
153
|
-
'left': relativeX+'px',
|
153
|
+
'top': relativeY + 'px',
|
154
|
+
'left': relativeX + 'px',
|
154
155
|
'opacity': '0',
|
155
156
|
|
156
157
|
// Duration
|
@@ -162,15 +163,15 @@
|
|
162
163
|
'-moz-transform': scale,
|
163
164
|
'-ms-transform': scale,
|
164
165
|
'-o-transform': scale,
|
165
|
-
'transform': scale
|
166
|
+
'transform': scale
|
166
167
|
};
|
167
168
|
|
168
169
|
ripple.setAttribute('style', convertStyle(style));
|
169
170
|
|
170
|
-
setTimeout(function() {
|
171
|
+
setTimeout(function () {
|
171
172
|
try {
|
172
173
|
el.removeChild(ripple);
|
173
|
-
} catch(e) {
|
174
|
+
} catch (e) {
|
174
175
|
return false;
|
175
176
|
}
|
176
177
|
}, Effect.duration);
|
@@ -178,7 +179,7 @@
|
|
178
179
|
},
|
179
180
|
|
180
181
|
// Little hack to make <input> can perform waves effect
|
181
|
-
wrapInput: function(elements) {
|
182
|
+
wrapInput: function (elements) {
|
182
183
|
for (var a = 0; a < elements.length; a++) {
|
183
184
|
var el = elements[a];
|
184
185
|
|
@@ -213,7 +214,6 @@
|
|
213
214
|
}
|
214
215
|
};
|
215
216
|
|
216
|
-
|
217
217
|
/**
|
218
218
|
* Disable mousedown event for 500ms during and after touch
|
219
219
|
*/
|
@@ -223,13 +223,13 @@
|
|
223
223
|
* within the 500ms. Cannot mouseup between touchstart and
|
224
224
|
* touchend, nor in the 500ms after touchend. */
|
225
225
|
touches: 0,
|
226
|
-
allowEvent: function(e) {
|
226
|
+
allowEvent: function (e) {
|
227
227
|
var allow = true;
|
228
228
|
|
229
229
|
if (e.type === 'touchstart') {
|
230
230
|
TouchHandler.touches += 1; //push
|
231
231
|
} else if (e.type === 'touchend' || e.type === 'touchcancel') {
|
232
|
-
setTimeout(function() {
|
232
|
+
setTimeout(function () {
|
233
233
|
if (TouchHandler.touches > 0) {
|
234
234
|
TouchHandler.touches -= 1; //pop after 500ms
|
235
235
|
}
|
@@ -240,12 +240,11 @@
|
|
240
240
|
|
241
241
|
return allow;
|
242
242
|
},
|
243
|
-
touchup: function(e) {
|
243
|
+
touchup: function (e) {
|
244
244
|
TouchHandler.allowEvent(e);
|
245
245
|
}
|
246
246
|
};
|
247
247
|
|
248
|
-
|
249
248
|
/**
|
250
249
|
* Delegated click handler for .waves-effect element.
|
251
250
|
* returns null when .waves-effect element not in "click tree"
|
@@ -258,17 +257,13 @@
|
|
258
257
|
var element = null;
|
259
258
|
var target = e.target || e.srcElement;
|
260
259
|
|
261
|
-
while (target.
|
260
|
+
while (target.parentNode !== null) {
|
262
261
|
if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {
|
263
262
|
element = target;
|
264
263
|
break;
|
265
|
-
} else if (target.className.indexOf('waves-effect') !== -1) {
|
266
|
-
element = target;
|
267
|
-
break;
|
268
264
|
}
|
269
|
-
target = target.
|
265
|
+
target = target.parentNode;
|
270
266
|
}
|
271
|
-
|
272
267
|
return element;
|
273
268
|
}
|
274
269
|
|
@@ -288,10 +283,11 @@
|
|
288
283
|
|
289
284
|
element.addEventListener('mouseup', Effect.hide, false);
|
290
285
|
element.addEventListener('mouseleave', Effect.hide, false);
|
286
|
+
element.addEventListener('dragend', Effect.hide, false);
|
291
287
|
}
|
292
288
|
}
|
293
289
|
|
294
|
-
Waves.displayEffect = function(options) {
|
290
|
+
Waves.displayEffect = function (options) {
|
295
291
|
options = options || {};
|
296
292
|
|
297
293
|
if ('duration' in options) {
|
@@ -314,12 +310,12 @@
|
|
314
310
|
* Intended to be used with dynamically loaded forms/inputs, or
|
315
311
|
* where the user doesn't want a delegated click handler.
|
316
312
|
*/
|
317
|
-
Waves.attach = function(element) {
|
313
|
+
Waves.attach = function (element) {
|
318
314
|
//FUTURE: automatically add waves classes and allow users
|
319
315
|
// to specify them with an options param? Eg. light/classic/button
|
320
316
|
if (element.tagName.toLowerCase() === 'input') {
|
321
317
|
Effect.wrapInput([element]);
|
322
|
-
element = element.
|
318
|
+
element = element.parentNode;
|
323
319
|
}
|
324
320
|
|
325
321
|
if ('ontouchstart' in window) {
|
@@ -331,8 +327,7 @@
|
|
331
327
|
|
332
328
|
window.Waves = Waves;
|
333
329
|
|
334
|
-
document.addEventListener('DOMContentLoaded', function() {
|
330
|
+
document.addEventListener('DOMContentLoaded', function () {
|
335
331
|
Waves.displayEffect();
|
336
332
|
}, false);
|
337
|
-
|
338
333
|
})(window);
|
@@ -2,7 +2,6 @@
|
|
2
2
|
&.carousel-slider {
|
3
3
|
top: 0;
|
4
4
|
left: 0;
|
5
|
-
height: 0;
|
6
5
|
|
7
6
|
.carousel-fixed-item {
|
8
7
|
&.with-indicators {
|
@@ -19,7 +18,7 @@
|
|
19
18
|
.carousel-item {
|
20
19
|
width: 100%;
|
21
20
|
height: 100%;
|
22
|
-
min-height:
|
21
|
+
min-height: $carousel-height;
|
23
22
|
position: absolute;
|
24
23
|
top: 0;
|
25
24
|
left: 0;
|
@@ -39,15 +38,15 @@
|
|
39
38
|
overflow: hidden;
|
40
39
|
position: relative;
|
41
40
|
width: 100%;
|
42
|
-
height:
|
41
|
+
height: $carousel-height;
|
43
42
|
perspective: 500px;
|
44
43
|
transform-style: preserve-3d;
|
45
44
|
transform-origin: 0% 50%;
|
46
45
|
|
47
46
|
.carousel-item {
|
48
47
|
display: none;
|
49
|
-
width:
|
50
|
-
height:
|
48
|
+
width: $carousel-item-width;
|
49
|
+
height: $carousel-item-height;
|
51
50
|
position: absolute;
|
52
51
|
top: 0;
|
53
52
|
left: 0;
|
@@ -7,21 +7,18 @@
|
|
7
7
|
}
|
8
8
|
|
9
9
|
.collapsible-header {
|
10
|
-
display:
|
10
|
+
display: flex;
|
11
11
|
cursor: pointer;
|
12
12
|
-webkit-tap-highlight-color: transparent;
|
13
|
-
|
14
|
-
|
15
|
-
padding: 0 1rem;
|
13
|
+
line-height: 1.5;
|
14
|
+
padding: 1rem;
|
16
15
|
background-color: $collapsible-header-color;
|
17
16
|
border-bottom: 1px solid $collapsible-border-color;
|
18
17
|
|
19
18
|
i {
|
20
19
|
width: 2rem;
|
21
20
|
font-size: 1.6rem;
|
22
|
-
|
23
|
-
display: block;
|
24
|
-
float: left;
|
21
|
+
display: inline-block;
|
25
22
|
text-align: center;
|
26
23
|
margin-right: 1rem;
|
27
24
|
}
|
@@ -22,7 +22,7 @@ ul {
|
|
22
22
|
padding-left: 0;
|
23
23
|
list-style-type: none;
|
24
24
|
|
25
|
-
li {
|
25
|
+
& > li {
|
26
26
|
list-style-type: none;
|
27
27
|
}
|
28
28
|
}
|
@@ -75,12 +75,10 @@ a {
|
|
75
75
|
|
76
76
|
.hoverable {
|
77
77
|
transition: box-shadow .25s;
|
78
|
-
box-shadow: 0;
|
79
|
-
}
|
80
78
|
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
&:hover {
|
80
|
+
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
81
|
+
}
|
84
82
|
}
|
85
83
|
|
86
84
|
// Dividers
|
@@ -247,8 +245,7 @@ video.responsive-video {
|
|
247
245
|
bottom: 0;
|
248
246
|
min-width: 100%;
|
249
247
|
min-height: 100%;
|
250
|
-
|
251
|
-
transform: translate3d(0,0,0);
|
248
|
+
transform: translate3d(0,0,0);
|
252
249
|
transform: translateX(-50%);
|
253
250
|
}
|
254
251
|
}
|
@@ -503,7 +500,9 @@ td, th{
|
|
503
500
|
padding-left: 72px;
|
504
501
|
position: relative;
|
505
502
|
|
506
|
-
.
|
503
|
+
// Don't style circles inside preloader classes.
|
504
|
+
&:not(.circle-clipper) > .circle,
|
505
|
+
:not(.circle-clipper) > .circle {
|
507
506
|
position: absolute;
|
508
507
|
width: 42px;
|
509
508
|
height: 42px;
|
@@ -710,11 +709,6 @@ td, th{
|
|
710
709
|
|
711
710
|
// No Text Select
|
712
711
|
.no-select {
|
713
|
-
-webkit-touch-callout: none;
|
714
|
-
-webkit-user-select: none;
|
715
|
-
-khtml-user-select: none;
|
716
|
-
-moz-user-select: none;
|
717
|
-
-ms-user-select: none;
|
718
712
|
user-select: none;
|
719
713
|
}
|
720
714
|
|
@@ -22,10 +22,7 @@
|
|
22
22
|
display: flex;
|
23
23
|
|
24
24
|
.tab {
|
25
|
-
-
|
26
|
-
-webkit-flex-grow: 1;
|
27
|
-
-ms-flex-positive: 1;
|
28
|
-
flex-grow: 1;
|
25
|
+
flex-grow: 1;
|
29
26
|
}
|
30
27
|
}
|
31
28
|
|
@@ -86,9 +83,6 @@
|
|
86
83
|
display: flex;
|
87
84
|
|
88
85
|
.tab {
|
89
|
-
-webkit-box-flex: 1;
|
90
|
-
-webkit-flex-grow: 1;
|
91
|
-
-ms-flex-positive: 1;
|
92
86
|
flex-grow: 1;
|
93
87
|
|
94
88
|
a {
|
@@ -24,7 +24,6 @@
|
|
24
24
|
border-radius: 2px;
|
25
25
|
top: 35px;
|
26
26
|
width: auto;
|
27
|
-
clear: both;
|
28
27
|
margin-top: 10px;
|
29
28
|
position: relative;
|
30
29
|
max-width:100%;
|
@@ -37,13 +36,15 @@
|
|
37
36
|
font-size: 1.1rem;
|
38
37
|
font-weight: 300;
|
39
38
|
color: $toast-text-color;
|
40
|
-
|
41
39
|
display: flex;
|
42
40
|
align-items: center;
|
43
41
|
justify-content: space-between;
|
42
|
+
cursor: default;
|
44
43
|
|
45
|
-
.
|
46
|
-
|
44
|
+
.toast-action {
|
45
|
+
color: $toast-action-color;
|
46
|
+
font-weight: 500;
|
47
|
+
margin-right: -25px;
|
47
48
|
margin-left: 3rem;
|
48
49
|
}
|
49
50
|
|
@@ -52,14 +53,7 @@
|
|
52
53
|
}
|
53
54
|
|
54
55
|
@media #{$small-and-down} {
|
55
|
-
width:100%;
|
56
|
+
width: 100%;
|
56
57
|
border-radius: 0;
|
57
58
|
}
|
58
|
-
@media #{$medium-only} {
|
59
|
-
float: left;
|
60
|
-
}
|
61
|
-
@media #{$large-and-up} {
|
62
|
-
float: right;
|
63
|
-
}
|
64
|
-
|
65
59
|
}
|