materialize-sass 1.0.0.alpha1 → 1.0.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/javascripts/materialize-sprockets.js +1 -1
- data/assets/javascripts/materialize.js +1162 -1218
- data/assets/javascripts/materialize/anime.min.js +417 -0
- data/assets/javascripts/materialize/buttons.js +49 -26
- data/assets/javascripts/materialize/cards.js +14 -8
- data/assets/javascripts/materialize/cash.js +3 -5
- data/assets/javascripts/materialize/chips.js +22 -19
- data/assets/javascripts/materialize/collapsible.js +53 -17
- data/assets/javascripts/materialize/datepicker.js +94 -78
- data/assets/javascripts/materialize/dropdown.js +33 -26
- data/assets/javascripts/materialize/extras/nouislider.js +1 -1
- data/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
- data/assets/javascripts/materialize/forms.js +17 -6
- data/assets/javascripts/materialize/global.js +17 -15
- data/assets/javascripts/materialize/materialbox.js +62 -35
- data/assets/javascripts/materialize/modal.js +50 -19
- data/assets/javascripts/materialize/range.js +40 -16
- data/assets/javascripts/materialize/scrollspy.js +9 -3
- data/assets/javascripts/materialize/select.js +62 -38
- data/assets/javascripts/materialize/sidenav.js +52 -18
- data/assets/javascripts/materialize/slider.js +56 -16
- data/assets/javascripts/materialize/tabs.js +35 -23
- data/assets/javascripts/materialize/timepicker.js +581 -579
- data/assets/javascripts/materialize/toasts.js +11 -7
- data/assets/javascripts/materialize/tooltip.js +16 -18
- data/assets/stylesheets/materialize.scss +3 -3
- data/assets/stylesheets/materialize/components/_buttons.scss +2 -2
- data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
- data/assets/stylesheets/materialize/components/{_color.scss → _color-variables.scss} +0 -42
- data/assets/stylesheets/materialize/components/_datepicker.scss +10 -4
- data/assets/stylesheets/materialize/components/_dropdown.scss +5 -0
- data/assets/stylesheets/materialize/components/_navbar.scss +3 -3
- data/assets/stylesheets/materialize/components/_pulse.scss +1 -1
- data/assets/stylesheets/materialize/components/_timepicker.scss +1 -0
- data/assets/stylesheets/materialize/components/_variables.scss +0 -1
- data/assets/stylesheets/materialize/components/forms/_input-fields.scss +6 -4
- data/assets/stylesheets/materialize/components/forms/_range.scss +3 -3
- data/assets/stylesheets/materialize/components/forms/_select.scss +7 -7
- data/assets/stylesheets/materialize/extras/nouislider.css +1 -1
- data/lib/materialize-sass/engine.rb +2 -0
- data/lib/materialize-sass/helpers.rb +38 -0
- data/lib/materialize-sass/version.rb +1 -1
- metadata +6 -5
- data/assets/javascripts/materialize/velocity.min.js +0 -782
- data/assets/stylesheets/materialize/components/_mixins.scss +0 -5
@@ -0,0 +1,417 @@
|
|
1
|
+
/*
|
2
|
+
v2.2.0
|
3
|
+
2017 Julian Garnier
|
4
|
+
Released under the MIT license
|
5
|
+
*/
|
6
|
+
var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) {
|
7
|
+
if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value);
|
8
|
+
};$jscomp.getGlobal = function (e) {
|
9
|
+
return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e;
|
10
|
+
};$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_";
|
11
|
+
$jscomp.initSymbol = function () {
|
12
|
+
$jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol);
|
13
|
+
};$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) {
|
14
|
+
return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++;
|
15
|
+
};
|
16
|
+
$jscomp.initSymbolIterator = function () {
|
17
|
+
$jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () {
|
18
|
+
return $jscomp.arrayIterator(this);
|
19
|
+
} });$jscomp.initSymbolIterator = function () {};
|
20
|
+
};$jscomp.arrayIterator = function (e) {
|
21
|
+
var r = 0;return $jscomp.iteratorPrototype(function () {
|
22
|
+
return r < e.length ? { done: !1, value: e[r++] } : { done: !0 };
|
23
|
+
});
|
24
|
+
};
|
25
|
+
$jscomp.iteratorPrototype = function (e) {
|
26
|
+
$jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () {
|
27
|
+
return this;
|
28
|
+
};return e;
|
29
|
+
};$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) {
|
30
|
+
$jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0,
|
31
|
+
m = { next: function () {
|
32
|
+
if (p < e.length) {
|
33
|
+
var u = p++;return { value: r(u, e[u]), done: !1 };
|
34
|
+
}m.next = function () {
|
35
|
+
return { done: !0, value: void 0 };
|
36
|
+
};return m.next();
|
37
|
+
} };m[Symbol.iterator] = function () {
|
38
|
+
return m;
|
39
|
+
};return m;
|
40
|
+
};
|
41
|
+
$jscomp.polyfill = function (e, r, p, m) {
|
42
|
+
if (r) {
|
43
|
+
p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) {
|
44
|
+
var u = e[m];u in p || (p[u] = {});p = p[u];
|
45
|
+
}e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r });
|
46
|
+
}
|
47
|
+
};$jscomp.polyfill("Array.prototype.keys", function (e) {
|
48
|
+
return e ? e : function () {
|
49
|
+
return $jscomp.iteratorFromArray(this, function (e) {
|
50
|
+
return e;
|
51
|
+
});
|
52
|
+
};
|
53
|
+
}, "es6-impl", "es3");var $jscomp$this = this;
|
54
|
+
(function (r) {
|
55
|
+
M.anime = r();
|
56
|
+
})(function () {
|
57
|
+
function e(a) {
|
58
|
+
if (!h.col(a)) try {
|
59
|
+
return document.querySelectorAll(a);
|
60
|
+
} catch (c) {}
|
61
|
+
}function r(a, c) {
|
62
|
+
for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) {
|
63
|
+
if (n in a) {
|
64
|
+
var k = a[n];c.call(b, k, n, a) && f.push(k);
|
65
|
+
}
|
66
|
+
}return f;
|
67
|
+
}function p(a) {
|
68
|
+
return a.reduce(function (a, d) {
|
69
|
+
return a.concat(h.arr(d) ? p(d) : d);
|
70
|
+
}, []);
|
71
|
+
}function m(a) {
|
72
|
+
if (h.arr(a)) return a;
|
73
|
+
h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a];
|
74
|
+
}function u(a, c) {
|
75
|
+
return a.some(function (a) {
|
76
|
+
return a === c;
|
77
|
+
});
|
78
|
+
}function C(a) {
|
79
|
+
var c = {},
|
80
|
+
d;for (d in a) {
|
81
|
+
c[d] = a[d];
|
82
|
+
}return c;
|
83
|
+
}function D(a, c) {
|
84
|
+
var d = C(a),
|
85
|
+
b;for (b in a) {
|
86
|
+
d[b] = c.hasOwnProperty(b) ? c[b] : a[b];
|
87
|
+
}return d;
|
88
|
+
}function z(a, c) {
|
89
|
+
var d = C(a),
|
90
|
+
b;for (b in c) {
|
91
|
+
d[b] = h.und(a[b]) ? c[b] : a[b];
|
92
|
+
}return d;
|
93
|
+
}function T(a) {
|
94
|
+
a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) {
|
95
|
+
return c + c + d + d + k + k;
|
96
|
+
});var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
|
97
|
+
a = parseInt(c[1], 16);var d = parseInt(c[2], 16),
|
98
|
+
c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)";
|
99
|
+
}function U(a) {
|
100
|
+
function c(a, c, b) {
|
101
|
+
0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a;
|
102
|
+
}var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100,
|
103
|
+
f = parseInt(d[3]) / 100,
|
104
|
+
d = d[4] || 1;if (0 == b) f = b = a = f;else {
|
105
|
+
var n = .5 > f ? f * (1 + b) : f + b - f * b,
|
106
|
+
k = 2 * f - n,
|
107
|
+
f = c(k, n, a + 1 / 3),
|
108
|
+
b = c(k, n, a);a = c(k, n, a - 1 / 3);
|
109
|
+
}return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")";
|
110
|
+
}function y(a) {
|
111
|
+
if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2];
|
112
|
+
}function V(a) {
|
113
|
+
if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
|
114
|
+
}function I(a, c) {
|
115
|
+
return h.fnc(a) ? a(c.target, c.id, c.total) : a;
|
116
|
+
}function E(a, c) {
|
117
|
+
if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0";
|
118
|
+
}function J(a, c) {
|
119
|
+
if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object";
|
120
|
+
}function X(a, c) {
|
121
|
+
var d = V(c),
|
122
|
+
d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) {
|
123
|
+
f.push(b[1]), n.push(b[2]);
|
124
|
+
}a = r(n, function (a, b) {
|
125
|
+
return f[b] === c;
|
126
|
+
});return a.length ? a[0] : d;
|
127
|
+
}function K(a, c) {
|
128
|
+
switch (J(a, c)) {case "transform":
|
129
|
+
return X(a, c);case "css":
|
130
|
+
return E(a, c);case "attribute":
|
131
|
+
return a.getAttribute(c);}return a[c] || 0;
|
132
|
+
}function L(a, c) {
|
133
|
+
var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+":
|
134
|
+
return c + a + b;case "-":
|
135
|
+
return c - a + b;case "*":
|
136
|
+
return c * a + b;}
|
137
|
+
}function F(a, c) {
|
138
|
+
return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2));
|
139
|
+
}function M(a) {
|
140
|
+
a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) {
|
141
|
+
var f = a.getItem(b);0 < b && (c += F(d, f));d = f;
|
142
|
+
}return c;
|
143
|
+
}function N(a) {
|
144
|
+
if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle":
|
145
|
+
return 2 * Math.PI * a.getAttribute("r");case "rect":
|
146
|
+
return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line":
|
147
|
+
return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline":
|
148
|
+
return M(a);case "polygon":
|
149
|
+
var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));}
|
150
|
+
}function Y(a, c) {
|
151
|
+
function d(b) {
|
152
|
+
b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0);
|
153
|
+
}var b = d(),
|
154
|
+
f = d(-1),
|
155
|
+
n = d(1);switch (a.property) {case "x":
|
156
|
+
return b.x;case "y":
|
157
|
+
return b.y;
|
158
|
+
case "angle":
|
159
|
+
return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;}
|
160
|
+
}function O(a, c) {
|
161
|
+
var d = /-?\d*\.?\d+/g,
|
162
|
+
b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) {
|
163
|
+
if (h.rgb(b)) {
|
164
|
+
var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b;
|
165
|
+
} else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0;
|
166
|
+
} else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] };
|
167
|
+
}function P(a) {
|
168
|
+
a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) {
|
169
|
+
return b.indexOf(a) === d;
|
170
|
+
});
|
171
|
+
}function Z(a) {
|
172
|
+
var c = P(a);return c.map(function (a, b) {
|
173
|
+
return { target: a, id: b, total: c.length };
|
174
|
+
});
|
175
|
+
}function aa(a, c) {
|
176
|
+
var d = C(c);if (h.arr(a)) {
|
177
|
+
var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a };
|
178
|
+
}return m(a).map(function (a, b) {
|
179
|
+
b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a;
|
180
|
+
}).map(function (a) {
|
181
|
+
return z(a, d);
|
182
|
+
});
|
183
|
+
}function ba(a, c) {
|
184
|
+
var d = {},
|
185
|
+
b;for (b in a) {
|
186
|
+
var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) {
|
187
|
+
return I(a, c);
|
188
|
+
}), 1 === f.length && (f = f[0]));d[b] = f;
|
189
|
+
}d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d;
|
190
|
+
}function ca(a) {
|
191
|
+
return h.arr(a) ? A.apply(this, a) : Q[a];
|
192
|
+
}function da(a, c) {
|
193
|
+
var d;return a.tweens.map(function (b) {
|
194
|
+
b = ba(b, c);var f = b.value,
|
195
|
+
e = K(c.target, a.name),
|
196
|
+
k = d ? d.to.original : e,
|
197
|
+
k = h.arr(f) ? f[0] : k,
|
198
|
+
w = L(h.arr(f) ? f[1] : f, k),
|
199
|
+
e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b;
|
200
|
+
});
|
201
|
+
}function ea(a, c) {
|
202
|
+
return r(p(a.map(function (a) {
|
203
|
+
return c.map(function (b) {
|
204
|
+
var c = J(a.target, b.name);if (c) {
|
205
|
+
var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay };
|
206
|
+
} else b = void 0;return b;
|
207
|
+
});
|
208
|
+
})), function (a) {
|
209
|
+
return !h.und(a);
|
210
|
+
});
|
211
|
+
}function R(a, c, d, b) {
|
212
|
+
var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) {
|
213
|
+
return b[a];
|
214
|
+
})) : f ? b.delay : d.offset + b.delay + b.duration;
|
215
|
+
}function fa(a) {
|
216
|
+
var c = D(ga, a),
|
217
|
+
d = D(S, a),
|
218
|
+
b = Z(a.targets),
|
219
|
+
f = [],
|
220
|
+
e = z(c, d),
|
221
|
+
k;for (k in a) {
|
222
|
+
e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) });
|
223
|
+
}a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) });
|
224
|
+
}function q(a) {
|
225
|
+
function c() {
|
226
|
+
return window.Promise && new Promise(function (a) {
|
227
|
+
return p = a;
|
228
|
+
});
|
229
|
+
}function d(a) {
|
230
|
+
return g.reversed ? g.duration - a : a;
|
231
|
+
}function b(a) {
|
232
|
+
for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) {
|
233
|
+
var e = d[b],
|
234
|
+
k = e.animatable,
|
235
|
+
h = e.tweens,
|
236
|
+
n = h.length - 1,
|
237
|
+
l = h[n];n && (l = r(h, function (b) {
|
238
|
+
return a < b.end;
|
239
|
+
})[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) {
|
240
|
+
var x = void 0,
|
241
|
+
x = l.to.numbers[t],
|
242
|
+
q = l.from.numbers[t],
|
243
|
+
x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x);
|
244
|
+
}if (l = h.length) for (m = h[0], w = 0; w < l; w++) {
|
245
|
+
p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " "));
|
246
|
+
} else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++;
|
247
|
+
}if (b = Object.keys(c).length) for (d = 0; d < b; d++) {
|
248
|
+
H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" ");
|
249
|
+
}g.currentTime = a;g.progress = a / g.duration * 100;
|
250
|
+
}function f(a) {
|
251
|
+
if (g[a]) g[a](g);
|
252
|
+
}function e() {
|
253
|
+
g.remaining && !0 !== g.remaining && g.remaining--;
|
254
|
+
}function k(a) {
|
255
|
+
var k = g.duration,
|
256
|
+
n = g.offset,
|
257
|
+
w = n + g.delay,
|
258
|
+
r = g.currentTime,
|
259
|
+
x = g.reversed,
|
260
|
+
q = d(a);if (g.children.length) {
|
261
|
+
var u = g.children,
|
262
|
+
v = u.length;
|
263
|
+
if (q >= g.currentTime) for (var G = 0; G < v; G++) {
|
264
|
+
u[G].seek(q);
|
265
|
+
} else for (; v--;) {
|
266
|
+
u[v].seek(q);
|
267
|
+
}
|
268
|
+
}if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0);
|
269
|
+
}a = void 0 === a ? {} : a;var h,
|
270
|
+
t,
|
271
|
+
l = 0,
|
272
|
+
p = null,
|
273
|
+
m = c(),
|
274
|
+
g = fa(a);g.reset = function () {
|
275
|
+
var a = g.direction,
|
276
|
+
c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) {
|
277
|
+
g.children[a].reset();
|
278
|
+
}
|
279
|
+
};g.tick = function (a) {
|
280
|
+
h = a;t || (t = h);k((l + h - t) * q.speed);
|
281
|
+
};g.seek = function (a) {
|
282
|
+
k(d(a));
|
283
|
+
};g.pause = function () {
|
284
|
+
var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0;
|
285
|
+
};g.play = function () {
|
286
|
+
g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia());
|
287
|
+
};g.reverse = function () {
|
288
|
+
g.reversed = !g.reversed;t = 0;l = d(g.currentTime);
|
289
|
+
};g.restart = function () {
|
290
|
+
g.pause();
|
291
|
+
g.reset();g.play();
|
292
|
+
};g.finished = m;g.reset();g.autoplay && g.play();return g;
|
293
|
+
}var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 },
|
294
|
+
S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 },
|
295
|
+
W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
|
296
|
+
H,
|
297
|
+
h = { arr: function (a) {
|
298
|
+
return Array.isArray(a);
|
299
|
+
}, obj: function (a) {
|
300
|
+
return -1 < Object.prototype.toString.call(a).indexOf("Object");
|
301
|
+
},
|
302
|
+
pth: function (a) {
|
303
|
+
return h.obj(a) && a.hasOwnProperty("totalLength");
|
304
|
+
}, svg: function (a) {
|
305
|
+
return a instanceof SVGElement;
|
306
|
+
}, dom: function (a) {
|
307
|
+
return a.nodeType || h.svg(a);
|
308
|
+
}, str: function (a) {
|
309
|
+
return "string" === typeof a;
|
310
|
+
}, fnc: function (a) {
|
311
|
+
return "function" === typeof a;
|
312
|
+
}, und: function (a) {
|
313
|
+
return "undefined" === typeof a;
|
314
|
+
}, hex: function (a) {
|
315
|
+
return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
|
316
|
+
);
|
317
|
+
}, rgb: function (a) {
|
318
|
+
return (/^rgb/.test(a)
|
319
|
+
);
|
320
|
+
}, hsl: function (a) {
|
321
|
+
return (/^hsl/.test(a)
|
322
|
+
);
|
323
|
+
}, col: function (a) {
|
324
|
+
return h.hex(a) || h.rgb(a) || h.hsl(a);
|
325
|
+
} },
|
326
|
+
A = function () {
|
327
|
+
function a(a, d, b) {
|
328
|
+
return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a;
|
329
|
+
}return function (c, d, b, f) {
|
330
|
+
if (0 <= c && 1 >= c && 0 <= b && 1 >= b) {
|
331
|
+
var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) {
|
332
|
+
e[k] = a(.1 * k, c, b);
|
333
|
+
}return function (k) {
|
334
|
+
if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) {
|
335
|
+
h += .1;
|
336
|
+
}--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1,
|
337
|
+
n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) {
|
338
|
+
for (h = 0; 4 > h; ++h) {
|
339
|
+
n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k,
|
340
|
+
l = l - m / n;
|
341
|
+
}k = l;
|
342
|
+
} else if (0 === n) k = l;else {
|
343
|
+
var l = h,
|
344
|
+
h = h + .1,
|
345
|
+
g = 0;do {
|
346
|
+
m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m;
|
347
|
+
} while (1e-7 < Math.abs(n) && 10 > ++g);k = m;
|
348
|
+
}return a(k, d, f);
|
349
|
+
};
|
350
|
+
}
|
351
|
+
};
|
352
|
+
}(),
|
353
|
+
Q = function () {
|
354
|
+
function a(a, b) {
|
355
|
+
return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b);
|
356
|
+
}var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
|
357
|
+
d = { In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) {
|
358
|
+
return 1 - a(1 - b, c);
|
359
|
+
}], InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) {
|
360
|
+
return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
|
361
|
+
}] },
|
362
|
+
b = { linear: A(.25, .25, .75, .75) },
|
363
|
+
f = {},
|
364
|
+
e;for (e in d) {
|
365
|
+
f.type = e, d[f.type].forEach(function (a) {
|
366
|
+
return function (d, f) {
|
367
|
+
b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d);
|
368
|
+
};
|
369
|
+
}(f)), f = { type: f.type };
|
370
|
+
}return b;
|
371
|
+
}(),
|
372
|
+
ha = { css: function (a, c, d) {
|
373
|
+
return a.style[c] = d;
|
374
|
+
}, attribute: function (a, c, d) {
|
375
|
+
return a.setAttribute(c, d);
|
376
|
+
}, object: function (a, c, d) {
|
377
|
+
return a[c] = d;
|
378
|
+
}, transform: function (a, c, d, b, f) {
|
379
|
+
b[f] || (b[f] = []);b[f].push(c + "(" + d + ")");
|
380
|
+
} },
|
381
|
+
v = [],
|
382
|
+
B = 0,
|
383
|
+
ia = function () {
|
384
|
+
function a() {
|
385
|
+
B = requestAnimationFrame(c);
|
386
|
+
}function c(c) {
|
387
|
+
var b = v.length;if (b) {
|
388
|
+
for (var d = 0; d < b;) {
|
389
|
+
v[d] && v[d].tick(c), d++;
|
390
|
+
}a();
|
391
|
+
} else cancelAnimationFrame(B), B = 0;
|
392
|
+
}return a;
|
393
|
+
}();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) {
|
394
|
+
a = P(a);for (var c = v.length; c--;) {
|
395
|
+
for (var d = v[c], b = d.animations, f = b.length; f--;) {
|
396
|
+
u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause());
|
397
|
+
}
|
398
|
+
}
|
399
|
+
};q.getValue = K;q.path = function (a, c) {
|
400
|
+
var d = h.str(a) ? e(a)[0] : a,
|
401
|
+
b = c || 100;return function (a) {
|
402
|
+
return { el: d, property: a, totalLength: N(d) * (b / 100) };
|
403
|
+
};
|
404
|
+
};q.setDashoffset = function (a) {
|
405
|
+
var c = N(a);a.setAttribute("stroke-dasharray", c);return c;
|
406
|
+
};q.bezier = A;q.easings = Q;q.timeline = function (a) {
|
407
|
+
var c = q(a);c.pause();c.duration = 0;c.add = function (d) {
|
408
|
+
c.children.forEach(function (a) {
|
409
|
+
a.began = !0;a.completed = !0;
|
410
|
+
});m(d).forEach(function (b) {
|
411
|
+
var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d);
|
412
|
+
});c.seek(0);c.reset();c.autoplay && c.restart();return c;
|
413
|
+
};return c;
|
414
|
+
};q.random = function (a, c) {
|
415
|
+
return Math.floor(Math.random() * (c - a + 1)) + a;
|
416
|
+
};return q;
|
417
|
+
});
|
@@ -2,7 +2,7 @@ var _createClass = function () { function defineProperties(target, props) { for
|
|
2
2
|
|
3
3
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4
4
|
|
5
|
-
(function ($,
|
5
|
+
(function ($, anim) {
|
6
6
|
'use strict';
|
7
7
|
|
8
8
|
var _defaults = {
|
@@ -51,6 +51,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
51
51
|
this.$menu = this.$el.children('ul').first();
|
52
52
|
this.$floatingBtns = this.$el.find('ul .btn-floating');
|
53
53
|
this.$floatingBtnsReverse = this.$el.find('ul .btn-floating').reverse();
|
54
|
+
this.offsetY = 0;
|
55
|
+
this.offsetX = 0;
|
54
56
|
if (this.options.direction === 'top') {
|
55
57
|
this.$el.addClass('direction-top');
|
56
58
|
this.offsetY = 40;
|
@@ -187,15 +189,22 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
187
189
|
}, {
|
188
190
|
key: '_animateInFAB',
|
189
191
|
value: function _animateInFAB() {
|
192
|
+
var _this = this;
|
193
|
+
|
190
194
|
this.$el.addClass('active');
|
191
|
-
Vel.hook(this.$floatingBtns, 'scaleX', 0.4);
|
192
|
-
Vel.hook(this.$floatingBtns, 'scaleY', 0.4);
|
193
|
-
Vel.hook(this.$floatingBtns, 'translateY', this.offsetY + 'px');
|
194
|
-
Vel.hook(this.$floatingBtns, 'translateX', this.offsetX + 'px');
|
195
195
|
|
196
196
|
var time = 0;
|
197
|
-
this.$floatingBtnsReverse.each(function () {
|
198
|
-
|
197
|
+
this.$floatingBtnsReverse.each(function (el) {
|
198
|
+
anim({
|
199
|
+
targets: el,
|
200
|
+
opacity: 1,
|
201
|
+
scale: [.4, 1],
|
202
|
+
translateY: [_this.offsetY, 0],
|
203
|
+
translateX: [_this.offsetX, 0],
|
204
|
+
duration: 275,
|
205
|
+
delay: time,
|
206
|
+
easing: 'easeInOutQuad'
|
207
|
+
});
|
199
208
|
time += 40;
|
200
209
|
});
|
201
210
|
}
|
@@ -207,9 +216,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
207
216
|
}, {
|
208
217
|
key: '_animateOutFAB',
|
209
218
|
value: function _animateOutFAB() {
|
210
|
-
this
|
211
|
-
|
212
|
-
|
219
|
+
var _this2 = this;
|
220
|
+
|
221
|
+
this.$floatingBtnsReverse.each(function (el) {
|
222
|
+
anim.remove(el);
|
223
|
+
anim({
|
224
|
+
targets: el,
|
225
|
+
opacity: 0,
|
226
|
+
scale: .4,
|
227
|
+
translateY: _this2.offsetY,
|
228
|
+
translateX: _this2.offsetX,
|
229
|
+
duration: 175,
|
230
|
+
easing: 'easeOutQuad',
|
231
|
+
complete: function () {
|
232
|
+
_this2.$el.removeClass('active');
|
233
|
+
}
|
234
|
+
});
|
235
|
+
});
|
213
236
|
}
|
214
237
|
|
215
238
|
/**
|
@@ -219,7 +242,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
219
242
|
}, {
|
220
243
|
key: '_animateInToolbar',
|
221
244
|
value: function _animateInToolbar() {
|
222
|
-
var
|
245
|
+
var _this3 = this;
|
223
246
|
|
224
247
|
var scaleFactor = void 0;
|
225
248
|
var windowWidth = window.innerWidth;
|
@@ -255,18 +278,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
255
278
|
});
|
256
279
|
|
257
280
|
setTimeout(function () {
|
258
|
-
|
281
|
+
_this3.$el.css({
|
259
282
|
transform: '',
|
260
283
|
transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'
|
261
284
|
});
|
262
|
-
|
285
|
+
_this3.$anchor.css({
|
263
286
|
overflow: 'visible',
|
264
287
|
transform: '',
|
265
288
|
transition: 'transform .2s'
|
266
289
|
});
|
267
290
|
|
268
291
|
setTimeout(function () {
|
269
|
-
|
292
|
+
_this3.$el.css({
|
270
293
|
overflow: 'hidden',
|
271
294
|
'background-color': fabColor
|
272
295
|
});
|
@@ -274,14 +297,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
274
297
|
transform: 'scale(' + scaleFactor + ')',
|
275
298
|
transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
|
276
299
|
});
|
277
|
-
|
300
|
+
_this3.$menu.children('li').children('a').css({
|
278
301
|
opacity: 1
|
279
302
|
});
|
280
303
|
|
281
304
|
// Scroll to close.
|
282
|
-
|
283
|
-
window.addEventListener('scroll',
|
284
|
-
document.body.addEventListener('click',
|
305
|
+
_this3._handleDocumentClickBound = _this3._handleDocumentClick.bind(_this3);
|
306
|
+
window.addEventListener('scroll', _this3._handleCloseBound, true);
|
307
|
+
document.body.addEventListener('click', _this3._handleDocumentClickBound, true);
|
285
308
|
}, 100);
|
286
309
|
}, 0);
|
287
310
|
}
|
@@ -293,7 +316,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
293
316
|
}, {
|
294
317
|
key: '_animateOutToolbar',
|
295
318
|
value: function _animateOutToolbar() {
|
296
|
-
var
|
319
|
+
var _this4 = this;
|
297
320
|
|
298
321
|
var windowWidth = window.innerWidth;
|
299
322
|
var windowHeight = window.innerHeight;
|
@@ -324,26 +347,26 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
324
347
|
backdrop.remove();
|
325
348
|
|
326
349
|
// Set initial state.
|
327
|
-
|
350
|
+
_this4.$el.css({
|
328
351
|
'text-align': '',
|
329
352
|
width: '',
|
330
353
|
bottom: '',
|
331
354
|
left: '',
|
332
355
|
overflow: '',
|
333
356
|
'background-color': '',
|
334
|
-
transform: 'translate3d(' + -
|
357
|
+
transform: 'translate3d(' + -_this4.offsetX + 'px,0,0)'
|
335
358
|
});
|
336
|
-
|
359
|
+
_this4.$anchor.css({
|
337
360
|
overflow: '',
|
338
|
-
transform: 'translate3d(0,' +
|
361
|
+
transform: 'translate3d(0,' + _this4.offsetY + 'px,0)'
|
339
362
|
});
|
340
363
|
|
341
364
|
setTimeout(function () {
|
342
|
-
|
365
|
+
_this4.$el.css({
|
343
366
|
transform: 'translate3d(0,0,0)',
|
344
367
|
transition: 'transform .2s'
|
345
368
|
});
|
346
|
-
|
369
|
+
_this4.$anchor.css({
|
347
370
|
transform: 'translate3d(0,0,0)',
|
348
371
|
transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
|
349
372
|
});
|
@@ -385,4 +408,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
385
408
|
if (M.jQueryLoaded) {
|
386
409
|
M.initializeJqueryWrapper(FloatingActionButton, 'floatingActionButton', 'M_FloatingActionButton');
|
387
410
|
}
|
388
|
-
})(cash, M.
|
411
|
+
})(cash, M.anime);
|