material-sass 4.0.0.beta2 → 4.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +3 -3
  4. data/Rakefile +11 -9
  5. data/assets/javascripts/material.js +3278 -825
  6. data/assets/javascripts/material.min.js +17 -1
  7. data/assets/javascripts/material/{initializers/picker.js → addons/pickadate.js} +5 -23
  8. data/assets/javascripts/material/components/expansion-panel.js +9 -18
  9. data/assets/javascripts/material/components/floating-label.js +21 -24
  10. data/assets/javascripts/material/components/{navdrawer.js → nav-drawer.js} +51 -55
  11. data/assets/javascripts/material/components/selection-control-focus.js +15 -21
  12. data/assets/javascripts/material/components/tab-switch.js +13 -20
  13. data/assets/javascripts/material/components/util.js +31 -41
  14. data/assets/stylesheets/material/_functions.scss +1 -1
  15. data/assets/stylesheets/material/_print.scss +13 -2
  16. data/assets/stylesheets/material/_utilities.scss +0 -1
  17. data/assets/stylesheets/material/_variables.scss +0 -1
  18. data/assets/stylesheets/material/base/_base.scss +1 -16
  19. data/assets/stylesheets/material/bootstrap/_close.scss +4 -0
  20. data/assets/stylesheets/material/bootstrap/_code.scss +6 -0
  21. data/assets/stylesheets/material/bootstrap/_custom-form.scss +26 -28
  22. data/assets/stylesheets/material/bootstrap/_form.scss +7 -36
  23. data/assets/stylesheets/material/bootstrap/_pagination.scss +7 -2
  24. data/assets/stylesheets/material/bootstrap/_popover.scss +18 -14
  25. data/assets/stylesheets/material/material.scss +0 -1
  26. data/assets/stylesheets/material/material/_button-flat.scss +8 -8
  27. data/assets/stylesheets/material/material/_button-group.scss +26 -63
  28. data/assets/stylesheets/material/material/_button.scss +18 -18
  29. data/assets/stylesheets/material/material/_dialog.scss +6 -6
  30. data/assets/stylesheets/material/material/_expansion-panel.scss +4 -4
  31. data/assets/stylesheets/material/material/_menu.scss +2 -2
  32. data/assets/stylesheets/material/material/_picker.scss +3 -3
  33. data/assets/stylesheets/material/material/_progress.scss +2 -1
  34. data/assets/stylesheets/material/material/_selection-control.scss +88 -67
  35. data/assets/stylesheets/material/material/_text-field-input-group.scss +49 -82
  36. data/assets/stylesheets/material/material/_text-field.scss +36 -6
  37. data/assets/stylesheets/material/material/_toolbar.scss +4 -0
  38. data/assets/stylesheets/material/material/_tooltip.scss +1 -1
  39. data/assets/stylesheets/material/mixins/_breakpoint.scss +1 -1
  40. data/assets/stylesheets/material/mixins/_form.scss +79 -17
  41. data/assets/stylesheets/material/mixins/_grid-framework.scss +9 -3
  42. data/assets/stylesheets/material/mixins/_grid.scss +3 -1
  43. data/assets/stylesheets/material/mixins/_hover.scss +14 -55
  44. data/assets/stylesheets/material/mixins/_material-icons.scss +2 -4
  45. data/assets/stylesheets/material/mixins/_text-alignment.scss +2 -2
  46. data/assets/stylesheets/material/mixins/_text-hide.scss +1 -1
  47. data/assets/stylesheets/material/utilities/_border.scss +20 -0
  48. data/assets/stylesheets/material/variables/_palette.scss +2 -0
  49. data/assets/stylesheets/material/variables/_variable-bootstrap.scss +17 -0
  50. data/assets/stylesheets/material/variables/_variable-material.scss +2 -6
  51. data/lib/material-sass/version.rb +1 -1
  52. metadata +4 -12
  53. data/assets/javascripts/material/addons/picker.date.js +0 -234
  54. data/assets/javascripts/material/addons/picker.js +0 -172
  55. data/assets/javascripts/material/addons/textarea-autosize.js +0 -23
  56. data/assets/javascripts/material/addons/waves.js +0 -127
  57. data/assets/javascripts/material/initializers/textarea-autosize.js +0 -10
  58. data/assets/javascripts/material/initializers/waves.js +0 -13
  59. data/assets/stylesheets/material/material/_text-field-textarea.scss +0 -15
  60. data/assets/stylesheets/material/utilities/_waves.scss +0 -41
@@ -1,23 +0,0 @@
1
- /*
2
- * textarea autosize v0.4.2
3
- * https://github.com/javierjulio/textarea-autosize
4
- */
5
-
6
- !function (a, b, c, d) {
7
- function h(b, c) {
8
- this.element = b, this.$element = a(b), this.init();
9
- }var e = "textareaAutoSize",
10
- f = "plugin_" + e,
11
- g = function g(a) {
12
- return a.replace(/\s/g, "").length > 0;
13
- };h.prototype = { init: function init() {
14
- var c = parseInt(this.$element.css("paddingBottom")) + parseInt(this.$element.css("paddingTop")) + parseInt(this.$element.css("borderTopWidth")) + parseInt(this.$element.css("borderBottomWidth")) || 0;g(this.element.value) && this.$element.height(this.element.scrollHeight - c), this.$element.on("input keyup", function (d) {
15
- var e = a(b),
16
- f = e.scrollTop();a(this).height(0).height(this.scrollHeight - c), e.scrollTop(f);
17
- });
18
- } }, a.fn[e] = function (b) {
19
- return this.each(function () {
20
- a.data(this, f) || a.data(this, f, new h(this, b));
21
- }), this;
22
- };
23
- }(jQuery, window, document);
@@ -1,127 +0,0 @@
1
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2
-
3
- /*
4
- * waves v0.7.4
5
- * http://fian.my.id/Waves
6
- */
7
-
8
- !function (a, b) {
9
- "use strict";
10
- "function" == typeof define && define.amd ? define([], function () {
11
- return b.apply(a);
12
- }) : "object" == (typeof exports === "undefined" ? "undefined" : _typeof(exports)) ? module.exports = b.call(a) : a.Waves = b.call(a);
13
- }("object" == (typeof global === "undefined" ? "undefined" : _typeof(global)) ? global : this, function () {
14
- "use strict";
15
- function e(a) {
16
- return null !== a && a === a.window;
17
- }function f(a) {
18
- return e(a) ? a : 9 === a.nodeType && a.defaultView;
19
- }function g(a) {
20
- var b = typeof a === "undefined" ? "undefined" : _typeof(a);return "function" === b || "object" === b && !!a;
21
- }function h(a) {
22
- return g(a) && a.nodeType > 0;
23
- }function i(a) {
24
- var d = c.call(a);return "[object String]" === d ? b(a) : g(a) && /^\[object (HTMLCollection|NodeList|Object)\]$/.test(d) && a.hasOwnProperty("length") ? a : h(a) ? [a] : [];
25
- }function j(a) {
26
- var b,
27
- c,
28
- d = { top: 0, left: 0 },
29
- e = a && a.ownerDocument;return b = e.documentElement, "undefined" != typeof a.getBoundingClientRect && (d = a.getBoundingClientRect()), c = f(e), { top: d.top + c.pageYOffset - b.clientTop, left: d.left + c.pageXOffset - b.clientLeft };
30
- }function k(a) {
31
- var b = "";for (var c in a) {
32
- a.hasOwnProperty(c) && (b += c + ":" + a[c] + ";");
33
- }return b;
34
- }function n(a, b, c, d) {
35
- if (c) {
36
- d.classList.remove("waves-wrapping"), c.classList.remove("waves-rippling");var e = c.getAttribute("data-x"),
37
- f = c.getAttribute("data-y"),
38
- g = c.getAttribute("data-scale"),
39
- h = c.getAttribute("data-translate"),
40
- i = Date.now() - Number(c.getAttribute("data-hold")),
41
- j = 350 - i;0 > j && (j = 0), "mousemove" === a.type && (j = 150);var m = "mousemove" === a.type ? 2500 : l.duration;setTimeout(function () {
42
- var a = { top: f + "px", left: e + "px", opacity: "0", "-webkit-transition-duration": m + "ms", "-moz-transition-duration": m + "ms", "-o-transition-duration": m + "ms", "transition-duration": m + "ms", "-webkit-transform": g + " " + h, "-moz-transform": g + " " + h, "-ms-transform": g + " " + h, "-o-transform": g + " " + h, transform: g + " " + h };c.setAttribute("style", k(a)), setTimeout(function () {
43
- try {
44
- d.removeChild(c), b.removeChild(d);
45
- } catch (a) {
46
- return !1;
47
- }
48
- }, m);
49
- }, j);
50
- }
51
- }function p(a) {
52
- if (o.allowEvent(a) === !1) return null;for (var b = null, c = a.target || a.srcElement; null !== c.parentElement;) {
53
- if (c.classList.contains("waves-effect") && !(c instanceof SVGElement)) {
54
- b = c;break;
55
- }c = c.parentElement;
56
- }return b;
57
- }function q(a) {
58
- var b = p(a);if (null !== b) {
59
- if (b.disabled || b.getAttribute("disabled") || b.classList.contains("disabled")) return;if (o.registerEvent(a), "touchstart" === a.type && l.delay) {
60
- var c = !1,
61
- e = setTimeout(function () {
62
- e = null, l.show(a, b);
63
- }, l.delay),
64
- f = function f(d) {
65
- e && (clearTimeout(e), e = null, l.show(a, b)), c || (c = !0, l.hide(d, b));
66
- },
67
- g = function g(a) {
68
- e && (clearTimeout(e), e = null), f(a);
69
- };b.addEventListener("touchmove", g, !1), b.addEventListener("touchend", f, !1), b.addEventListener("touchcancel", f, !1);
70
- } else l.show(a, b), d && (b.addEventListener("touchend", l.hide, !1), b.addEventListener("touchcancel", l.hide, !1)), b.addEventListener("mouseup", l.hide, !1), b.addEventListener("mouseleave", l.hide, !1);
71
- }
72
- }var a = a || {},
73
- b = document.querySelectorAll.bind(document),
74
- c = Object.prototype.toString,
75
- d = "ontouchstart" in window,
76
- l = { duration: 750, delay: 200, show: function show(a, b, c) {
77
- if (2 === a.button) return !1;b = b || this;var d = document.createElement("div");d.className = "waves-wrap waves-wrapping", b.appendChild(d);var e = document.createElement("div");e.className = "waves-ripple waves-rippling", d.appendChild(e);var f = j(b),
78
- g = 0,
79
- h = 0;"touches" in a && a.touches.length ? (g = a.touches[0].pageY - f.top, h = a.touches[0].pageX - f.left) : (g = a.pageY - f.top, h = a.pageX - f.left), h = h >= 0 ? h : 0, g = g >= 0 ? g : 0;var i = "scale(" + b.clientWidth / 100 * 3 + ")",
80
- m = "translate(0,0)";c && (m = "translate(" + c.x + "px, " + c.y + "px)"), e.setAttribute("data-hold", Date.now()), e.setAttribute("data-x", h), e.setAttribute("data-y", g), e.setAttribute("data-scale", i), e.setAttribute("data-translate", m);var n = { top: g + "px", left: h + "px" };e.classList.add("waves-notransition"), e.setAttribute("style", k(n)), e.classList.remove("waves-notransition"), n["-webkit-transform"] = i + " " + m, n["-moz-transform"] = i + " " + m, n["-ms-transform"] = i + " " + m, n["-o-transform"] = i + " " + m, n.transform = i + " " + m, n.opacity = "1";var o = "mousemove" === a.type ? 2500 : l.duration;n["-webkit-transition-duration"] = o + "ms", n["-moz-transition-duration"] = o + "ms", n["-o-transition-duration"] = o + "ms", n["transition-duration"] = o + "ms", e.setAttribute("style", k(n));
81
- }, hide: function hide(a, b) {
82
- b = b || this;for (var c = b.getElementsByClassName("waves-wrapping"), d = b.getElementsByClassName("waves-rippling"), e = 0, f = d.length; f > e; e++) {
83
- n(a, b, d[e], c[e]);
84
- }
85
- } },
86
- m = { input: function input(a) {
87
- var b = a.parentNode;if ("i" !== b.tagName.toLowerCase() || !b.classList.contains("waves-effect")) {
88
- var c = document.createElement("i");c.className = a.className + " waves-input-wrapper", a.className = "waves-button-input", b.replaceChild(c, a), c.appendChild(a);var d = window.getComputedStyle(a, null),
89
- e = d.color,
90
- f = d.backgroundColor;c.setAttribute("style", "color:" + e + ";background:" + f), a.setAttribute("style", "background-color:rgba(0,0,0,0);");
91
- }
92
- }, img: function img(a) {
93
- var b = a.parentNode;if ("i" !== b.tagName.toLowerCase() || !b.classList.contains("waves-effect")) {
94
- var c = document.createElement("i");b.replaceChild(c, a), c.appendChild(a);
95
- }
96
- } },
97
- o = { touches: 0, allowEvent: function allowEvent(a) {
98
- var b = !0;return (/^(mousedown|mousemove)$/.test(a.type) && o.touches && (b = !1), b
99
- );
100
- }, registerEvent: function registerEvent(a) {
101
- var b = a.type;"touchstart" === b ? o.touches += 1 : /^(touchend|touchcancel)$/.test(b) && setTimeout(function () {
102
- o.touches && (o.touches -= 1);
103
- }, 500);
104
- } };return a.init = function (a) {
105
- var b = document.body;a = a || {}, "duration" in a && (l.duration = a.duration), "delay" in a && (l.delay = a.delay), d && (b.addEventListener("touchstart", q, !1), b.addEventListener("touchcancel", o.registerEvent, !1), b.addEventListener("touchend", o.registerEvent, !1)), b.addEventListener("mousedown", q, !1);
106
- }, a.attach = function (a, b) {
107
- a = i(a), "[object Array]" === c.call(b) && (b = b.join(" ")), b = b ? " " + b : "";for (var d, e, f = 0, g = a.length; g > f; f++) {
108
- d = a[f], e = d.tagName.toLowerCase(), -1 !== ["input", "img"].indexOf(e) && (m[e](d), d = d.parentElement), -1 === d.className.indexOf("waves-effect") && (d.className += " waves-effect" + b);
109
- }
110
- }, a.ripple = function (a, b) {
111
- a = i(a);var c = a.length;if (b = b || {}, b.wait = b.wait || 0, b.position = b.position || null, c) for (var d, e, f, g = {}, h = 0, k = { type: "mousedown", button: 1 }, m = function m(a, b) {
112
- return function () {
113
- l.hide(a, b);
114
- };
115
- }; c > h; h++) {
116
- if (d = a[h], e = b.position || { x: d.clientWidth / 2, y: d.clientHeight / 2 }, f = j(d), g.x = f.left + e.x, g.y = f.top + e.y, k.pageX = g.x, k.pageY = g.y, l.show(k, d), b.wait >= 0 && null !== b.wait) {
117
- var n = { type: "mouseup", button: 1 };setTimeout(m(n, d), b.wait);
118
- }
119
- }
120
- }, a.calm = function (a) {
121
- a = i(a);for (var b = { type: "mouseup", button: 1 }, c = 0, d = a.length; d > c; c++) {
122
- l.hide(b, a[c]);
123
- }
124
- }, a.displayEffect = function (b) {
125
- console.error("Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect"), a.init(b);
126
- }, a;
127
- });
@@ -1,10 +0,0 @@
1
- /*
2
- * activate textarea-autosize for material
3
- * requires addons/textarea-autosize.js
4
- */
5
-
6
- $(function () {
7
- if ($('.textarea-autosize').length && typeof $.fn.textareaAutoSize !== 'undefined') {
8
- $('.textarea-autosize').textareaAutoSize();
9
- }
10
- });
@@ -1,13 +0,0 @@
1
- /*
2
- * activate waves for material
3
- * requires addons/waves.js
4
- */
5
-
6
- $(function () {
7
- if ($('.waves-attach').length && typeof Waves !== 'undefined') {
8
- Waves.attach('.waves-attach');
9
- Waves.init({
10
- duration: 300
11
- });
12
- }
13
- });
@@ -1,15 +0,0 @@
1
- .textarea-autosize {
2
- height: $textfield-height;
3
- min-height: $textfield-height;
4
- resize: none;
5
-
6
- &.form-control-lg {
7
- height: $textfield-height-lg;
8
- min-height: $textfield-height-lg;
9
- }
10
-
11
- &.form-control-sm {
12
- height: $textfield-height-sm;
13
- min-height: $textfield-height-sm;
14
- }
15
- }
@@ -1,41 +0,0 @@
1
- .waves-effect {
2
- position: relative;
3
- -webkit-tap-highlight-color: transparent;
4
-
5
- .waves-ripple {
6
- @include transition-standard(opacity, transform);
7
-
8
- background-clip: content-box;
9
- background-color: $waves-bg;
10
- border-radius: 50%;
11
- height: $waves-size;
12
- margin-top: ($waves-size / -2);
13
- margin-left: ($waves-size / -2);
14
- opacity: 0;
15
- position: absolute;
16
- transform: scale(0) translate(0, 0);
17
- width: $waves-size;
18
- }
19
- }
20
-
21
- .waves-light .waves-ripple {
22
- background-color: $waves-bg-light;
23
- }
24
-
25
- .waves-wrap {
26
- overflow: hidden;
27
- pointer-events: none;
28
- position: absolute;
29
- top: 0;
30
- right: 0;
31
- bottom: 0;
32
- left: 0;
33
- user-select: none;
34
-
35
- .waves-circle > & {
36
- border-radius: 50%;
37
- mask: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle fill="none" r="0" stroke-width="0" /%3E%3C/svg%3E');
38
- mask-image: radial-gradient(circle, $white 100%, $black 100%);
39
- transform: translateZ(0);
40
- }
41
- }