materialize-sass 0.97.0 → 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitattributes +1 -0
- data/.gitignore +3 -0
- data/README.md +48 -10
- data/Rakefile +129 -1
- data/assets/javascripts/materialize/anime.min.js +417 -0
- data/assets/javascripts/materialize/autocomplete.js +504 -0
- data/assets/javascripts/materialize/buttons.js +409 -0
- data/assets/javascripts/materialize/cards.js +34 -0
- data/assets/javascripts/materialize/carousel.js +797 -0
- data/assets/javascripts/materialize/cash.js +990 -0
- data/assets/javascripts/materialize/characterCounter.js +180 -0
- data/assets/javascripts/materialize/chips.js +564 -0
- data/assets/javascripts/materialize/collapsible.js +337 -0
- data/assets/javascripts/materialize/component.js +57 -0
- data/assets/javascripts/materialize/datepicker.js +935 -0
- data/assets/javascripts/materialize/dropdown.js +659 -0
- data/assets/javascripts/materialize/extras/nouislider.js +2147 -0
- data/assets/javascripts/materialize/extras/nouislider.min.js +1 -0
- data/assets/javascripts/materialize/forms.js +244 -0
- data/assets/javascripts/materialize/global.js +408 -0
- data/assets/javascripts/materialize/materialbox.js +513 -0
- data/assets/javascripts/materialize/modal.js +449 -0
- data/assets/javascripts/materialize/parallax.js +173 -0
- data/assets/javascripts/materialize/pushpin.js +179 -0
- data/assets/javascripts/materialize/range.js +310 -0
- data/assets/javascripts/materialize/scrollspy.js +328 -0
- data/assets/javascripts/materialize/select.js +497 -0
- data/assets/javascripts/materialize/sidenav.js +655 -0
- data/assets/javascripts/materialize/slider.js +424 -0
- data/assets/javascripts/materialize/tabs.js +476 -0
- data/assets/javascripts/materialize/tapTarget.js +364 -0
- data/assets/javascripts/materialize/timepicker.js +647 -0
- data/assets/javascripts/materialize/toasts.js +355 -0
- data/assets/javascripts/materialize/tooltip.js +351 -0
- data/{app/assets → assets}/javascripts/materialize/waves.js +42 -47
- data/assets/javascripts/materialize-sprockets.js +29 -0
- data/assets/javascripts/materialize.js +12374 -0
- data/assets/stylesheets/materialize/components/_badges.scss +55 -0
- data/assets/stylesheets/materialize/components/_buttons.scss +322 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_cards.scss +72 -29
- data/assets/stylesheets/materialize/components/_carousel.scss +90 -0
- data/assets/stylesheets/materialize/components/_chips.scss +90 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_collapsible.scss +23 -17
- data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
- data/{app/assets/stylesheets/materialize/components/_color.scss → assets/stylesheets/materialize/components/_color-variables.scss} +22 -64
- data/assets/stylesheets/materialize/components/_datepicker.scss +191 -0
- data/assets/stylesheets/materialize/components/_dropdown.scss +85 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_global.scss +197 -144
- data/{app/assets → assets}/stylesheets/materialize/components/_grid.scss +57 -18
- data/assets/stylesheets/materialize/components/_icons-material-design.scss +5 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_materialbox.scss +15 -13
- data/{app/assets → assets}/stylesheets/materialize/components/_modal.scss +18 -14
- data/{app/assets → assets}/stylesheets/materialize/components/_navbar.scss +89 -25
- data/assets/stylesheets/materialize/components/_normalize.scss +447 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_preloader.scss +5 -3
- data/assets/stylesheets/materialize/components/_pulse.scss +34 -0
- data/assets/stylesheets/materialize/components/_sidenav.scss +208 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_slider.scss +2 -2
- data/{app/assets → assets}/stylesheets/materialize/components/_table_of_contents.scss +5 -5
- data/assets/stylesheets/materialize/components/_tabs.scss +99 -0
- data/assets/stylesheets/materialize/components/_tapTarget.scss +103 -0
- data/assets/stylesheets/materialize/components/_timepicker.scss +183 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_toast.scss +17 -22
- data/assets/stylesheets/materialize/components/_tooltip.scss +32 -0
- data/assets/stylesheets/materialize/components/_transitions.scss +13 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_typography.scss +11 -9
- data/assets/stylesheets/materialize/components/_variables.scss +349 -0
- data/assets/stylesheets/materialize/components/_waves.scss +114 -0
- data/assets/stylesheets/materialize/components/forms/_checkboxes.scss +200 -0
- data/assets/stylesheets/materialize/components/forms/_file-input.scss +44 -0
- data/assets/stylesheets/materialize/components/forms/_forms.scss +22 -0
- data/assets/stylesheets/materialize/components/forms/_input-fields.scss +354 -0
- data/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +115 -0
- data/assets/stylesheets/materialize/components/forms/_range.scss +161 -0
- data/assets/stylesheets/materialize/components/forms/_select.scss +190 -0
- data/assets/stylesheets/materialize/components/forms/_switches.scss +89 -0
- data/assets/stylesheets/materialize/extras/nouislider.css +406 -0
- data/{app/assets → assets}/stylesheets/materialize.scss +13 -10
- data/lib/materialize-sass/engine.rb +11 -6
- data/lib/materialize-sass/helpers.rb +38 -0
- data/lib/materialize-sass/version.rb +1 -1
- data/lib/materialize-sass.rb +13 -28
- data/materialize-sass.gemspec +5 -5
- metadata +97 -105
- data/app/assets/fonts/material-design-icons/LICENSE.txt +0 -428
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.eot +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.svg +0 -769
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.ttf +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/app/assets/javascripts/materialize/animation.js +0 -9
- data/app/assets/javascripts/materialize/buttons.js +0 -61
- data/app/assets/javascripts/materialize/cards.js +0 -27
- data/app/assets/javascripts/materialize/character_counter.js +0 -59
- data/app/assets/javascripts/materialize/collapsible.js +0 -139
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +0 -1430
- data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1123
- data/app/assets/javascripts/materialize/dropdown.js +0 -178
- data/app/assets/javascripts/materialize/forms.js +0 -456
- data/app/assets/javascripts/materialize/global.js +0 -36
- data/app/assets/javascripts/materialize/hammer.min.js +0 -1
- data/app/assets/javascripts/materialize/init.js +0 -136
- data/app/assets/javascripts/materialize/jquery.easing.1.3.js +0 -205
- data/app/assets/javascripts/materialize/jquery.hammer.js +0 -33
- data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
- data/app/assets/javascripts/materialize/leanModal.js +0 -178
- data/app/assets/javascripts/materialize/materialbox.js +0 -249
- data/app/assets/javascripts/materialize/parallax.js +0 -58
- data/app/assets/javascripts/materialize/prism.js +0 -8
- data/app/assets/javascripts/materialize/pushpin.js +0 -62
- data/app/assets/javascripts/materialize/scrollFire.js +0 -44
- data/app/assets/javascripts/materialize/scrollspy.js +0 -284
- data/app/assets/javascripts/materialize/sideNav.js +0 -312
- data/app/assets/javascripts/materialize/slider.js +0 -301
- data/app/assets/javascripts/materialize/tabs.js +0 -136
- data/app/assets/javascripts/materialize/toasts.js +0 -125
- data/app/assets/javascripts/materialize/tooltip.js +0 -166
- data/app/assets/javascripts/materialize/transitions.js +0 -154
- data/app/assets/javascripts/materialize/velocity.min.js +0 -4
- data/app/assets/javascripts/materialize-sprockets.js +0 -27
- data/app/assets/javascripts/materialize.js +0 -6159
- data/app/assets/stylesheets/materialize/components/_buttons.scss +0 -157
- data/app/assets/stylesheets/materialize/components/_dropdown.scss +0 -40
- data/app/assets/stylesheets/materialize/components/_form.scss +0 -886
- data/app/assets/stylesheets/materialize/components/_icons-material-design.scss +0 -3257
- data/app/assets/stylesheets/materialize/components/_mixins.scss +0 -5
- data/app/assets/stylesheets/materialize/components/_normalize.scss +0 -427
- data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -376
- data/app/assets/stylesheets/materialize/components/_roboto.scss +0 -38
- data/app/assets/stylesheets/materialize/components/_sideNav.scss +0 -111
- data/app/assets/stylesheets/materialize/components/_tabs.scss +0 -47
- data/app/assets/stylesheets/materialize/components/_tooltip.scss +0 -34
- data/app/assets/stylesheets/materialize/components/_variables.scss +0 -152
- data/app/assets/stylesheets/materialize/components/_waves.scss +0 -167
- data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -435
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -201
- data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -125
@@ -0,0 +1,180 @@
|
|
1
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
2
|
+
|
3
|
+
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
4
|
+
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6
|
+
|
7
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
8
|
+
|
9
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
10
|
+
|
11
|
+
(function ($) {
|
12
|
+
'use strict';
|
13
|
+
|
14
|
+
var _defaults = {};
|
15
|
+
|
16
|
+
/**
|
17
|
+
* @class
|
18
|
+
*
|
19
|
+
*/
|
20
|
+
|
21
|
+
var CharacterCounter = function (_Component) {
|
22
|
+
_inherits(CharacterCounter, _Component);
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Construct CharacterCounter instance
|
26
|
+
* @constructor
|
27
|
+
* @param {Element} el
|
28
|
+
* @param {Object} options
|
29
|
+
*/
|
30
|
+
function CharacterCounter(el, options) {
|
31
|
+
_classCallCheck(this, CharacterCounter);
|
32
|
+
|
33
|
+
var _this = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options));
|
34
|
+
|
35
|
+
_this.el.M_CharacterCounter = _this;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Options for the character counter
|
39
|
+
*/
|
40
|
+
_this.options = $.extend({}, CharacterCounter.defaults, options);
|
41
|
+
|
42
|
+
_this.isInvalid = false;
|
43
|
+
_this.isValidLength = false;
|
44
|
+
_this._setupCounter();
|
45
|
+
_this._setupEventHandlers();
|
46
|
+
return _this;
|
47
|
+
}
|
48
|
+
|
49
|
+
_createClass(CharacterCounter, [{
|
50
|
+
key: 'destroy',
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Teardown component
|
55
|
+
*/
|
56
|
+
value: function destroy() {
|
57
|
+
this._removeEventHandlers();
|
58
|
+
this.el.CharacterCounter = undefined;
|
59
|
+
this._removeCounter();
|
60
|
+
}
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Setup Event Handlers
|
64
|
+
*/
|
65
|
+
|
66
|
+
}, {
|
67
|
+
key: '_setupEventHandlers',
|
68
|
+
value: function _setupEventHandlers() {
|
69
|
+
this._handleUpdateCounterBound = this.updateCounter.bind(this);
|
70
|
+
|
71
|
+
this.el.addEventListener('focus', this._handleUpdateCounterBound, true);
|
72
|
+
this.el.addEventListener('input', this._handleUpdateCounterBound, true);
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Remove Event Handlers
|
77
|
+
*/
|
78
|
+
|
79
|
+
}, {
|
80
|
+
key: '_removeEventHandlers',
|
81
|
+
value: function _removeEventHandlers() {
|
82
|
+
this.el.removeEventListener('focus', this._handleUpdateCounterBound, true);
|
83
|
+
this.el.removeEventListener('input', this._handleUpdateCounterBound, true);
|
84
|
+
}
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Setup counter element
|
88
|
+
*/
|
89
|
+
|
90
|
+
}, {
|
91
|
+
key: '_setupCounter',
|
92
|
+
value: function _setupCounter() {
|
93
|
+
this.counterEl = document.createElement('span');
|
94
|
+
$(this.counterEl).addClass('character-counter').css({
|
95
|
+
float: 'right',
|
96
|
+
'font-size': '12px',
|
97
|
+
height: 1
|
98
|
+
});
|
99
|
+
|
100
|
+
this.$el.parent().append(this.counterEl);
|
101
|
+
}
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Remove counter element
|
105
|
+
*/
|
106
|
+
|
107
|
+
}, {
|
108
|
+
key: '_removeCounter',
|
109
|
+
value: function _removeCounter() {
|
110
|
+
$(this.counterEl).remove();
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Update counter
|
115
|
+
*/
|
116
|
+
|
117
|
+
}, {
|
118
|
+
key: 'updateCounter',
|
119
|
+
value: function updateCounter() {
|
120
|
+
var maxLength = +this.$el.attr('data-length'),
|
121
|
+
actualLength = this.el.value.length;
|
122
|
+
this.isValidLength = actualLength <= maxLength;
|
123
|
+
var counterString = actualLength;
|
124
|
+
|
125
|
+
if (maxLength) {
|
126
|
+
counterString += '/' + maxLength;
|
127
|
+
this._validateInput();
|
128
|
+
}
|
129
|
+
|
130
|
+
$(this.counterEl).html(counterString);
|
131
|
+
}
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Add validation classes
|
135
|
+
*/
|
136
|
+
|
137
|
+
}, {
|
138
|
+
key: '_validateInput',
|
139
|
+
value: function _validateInput() {
|
140
|
+
if (this.isValidLength && this.isInvalid) {
|
141
|
+
this.isInvalid = false;
|
142
|
+
this.$el.removeClass('invalid');
|
143
|
+
} else if (!this.isValidLength && !this.isInvalid) {
|
144
|
+
this.isInvalid = true;
|
145
|
+
this.$el.removeClass('valid');
|
146
|
+
this.$el.addClass('invalid');
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}], [{
|
150
|
+
key: 'init',
|
151
|
+
value: function init(els, options) {
|
152
|
+
return _get(CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter), 'init', this).call(this, this, els, options);
|
153
|
+
}
|
154
|
+
|
155
|
+
/**
|
156
|
+
* Get Instance
|
157
|
+
*/
|
158
|
+
|
159
|
+
}, {
|
160
|
+
key: 'getInstance',
|
161
|
+
value: function getInstance(el) {
|
162
|
+
var domElem = !!el.jquery ? el[0] : el;
|
163
|
+
return domElem.M_CharacterCounter;
|
164
|
+
}
|
165
|
+
}, {
|
166
|
+
key: 'defaults',
|
167
|
+
get: function () {
|
168
|
+
return _defaults;
|
169
|
+
}
|
170
|
+
}]);
|
171
|
+
|
172
|
+
return CharacterCounter;
|
173
|
+
}(Component);
|
174
|
+
|
175
|
+
M.CharacterCounter = CharacterCounter;
|
176
|
+
|
177
|
+
if (M.jQueryLoaded) {
|
178
|
+
M.initializeJqueryWrapper(CharacterCounter, 'characterCounter', 'M_CharacterCounter');
|
179
|
+
}
|
180
|
+
})(cash);
|