materialize-sass 1.0.0.rc2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df937f4701001a6343da5404f13305e3c5991515d733573e8c19110f47da1f19
4
- data.tar.gz: 5400216bad459a90d99e76401e9bf2aae3d45538946883a40629d8369142ad6c
3
+ metadata.gz: bfaa6f414778ef56858cb4ecf44d2591f7f3ca4c01ede22c37ebfda7450fcbac
4
+ data.tar.gz: 8afb0bf1383123b4503c98f3c8a91110585d1188302a9ee24d919f2a4a8e0967
5
5
  SHA512:
6
- metadata.gz: 97cefac389c7d0c4de37e24962e2d2b12616e1835847c95558a764014e7f5eaa951896e5e636a7e1330dcff812c87f99aad5faaa4c4f68dc989f85ccda584f4b
7
- data.tar.gz: '0515880d93dc6026470fb0eb75c40d1ad740e3c642c93b05a29308a3636c74a7d4e2f29c358d4a79ac25943c6935718caea0c613e5973071f6b139e3c951daaa'
6
+ metadata.gz: 4dd18f83943beddad92bf30645fca04e9947050935336810cf9438514ba53cc297e710cf63bec8e2e03f4c66cfd8257f6c1cc0285a6395b8bbd8c4cc3c5f38dc
7
+ data.tar.gz: a4cf324a1fc6032ee08a71c7e067343dddfdd09ba39e15b46539814a7bfb65a6e19dc73e30a49cdbc61661c5ba4358201bdb9844ed6bbd290265a5bc322c8a11
data/README.md CHANGED
@@ -7,7 +7,7 @@ example: http://materialize.labs.my/
7
7
  source: https://github.com/mkhairi/materialize-rails
8
8
 
9
9
  # Notices
10
- This master branch now v1.0.0.rc2
10
+ This master branch now v1.0.0
11
11
 
12
12
  Documentation for previous releases (v0.100.*) are available [this branch.](https://github.com/mkhairi/materialize-sass/tree/v0.100)
13
13
 
@@ -16,7 +16,7 @@ Documentation for previous releases (v0.100.*) are available [this branch.](http
16
16
  In your Gemfile you need to add the `materialize-sass` gem:
17
17
 
18
18
  ```ruby
19
- gem 'materialize-sass', '~> 1.0.0.rc2'
19
+ gem 'materialize-sass', '~> 1.0.0'
20
20
  ```
21
21
 
22
22
 
data/Rakefile CHANGED
@@ -45,7 +45,7 @@ namespace :javascripts do
45
45
 
46
46
 
47
47
  desc "Setup javascript assets"
48
- task setup: [:clean, :copy, :copy_extras, :turbolinks_init]
48
+ task setup: [:clean, :copy, :copy_extras]
49
49
  #task setup: [:clean, :copy, :copy_extras]
50
50
  end
51
51
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v1.0.0-rc.2 (http://materializecss.com)
2
+ * Materialize v1.0.0 (http://materializecss.com)
3
3
  * Copyright 2014-2017 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -1084,6 +1084,8 @@ if (typeof define === 'function' && define.amd) {
1084
1084
  exports.default = M;
1085
1085
  }
1086
1086
 
1087
+ M.version = '1.0.0';
1088
+
1087
1089
  M.keys = {
1088
1090
  TAB: 9,
1089
1091
  ENTER: 13,
@@ -2507,7 +2509,11 @@ $jscomp.polyfill = function (e, r, p, m) {
2507
2509
  var $activatableElement = $(focusedElement).find('a, button').first();
2508
2510
 
2509
2511
  // Click a or button tag if exists, otherwise click li tag
2510
- !!$activatableElement.length ? $activatableElement[0].click() : focusedElement.click();
2512
+ if (!!$activatableElement.length) {
2513
+ $activatableElement[0].click();
2514
+ } else if (!!focusedElement) {
2515
+ focusedElement.click();
2516
+ }
2511
2517
 
2512
2518
  // Close dropdown on ESC
2513
2519
  } else if (e.which === M.keys.ESC && this.isOpen) {
@@ -2687,8 +2693,7 @@ $jscomp.polyfill = function (e, r, p, m) {
2687
2693
 
2688
2694
  // onOpenEnd callback
2689
2695
  if (typeof _this11.options.onOpenEnd === 'function') {
2690
- var elem = anim.animatables[0].target;
2691
- _this11.options.onOpenEnd.call(elem, _this11.el);
2696
+ _this11.options.onOpenEnd.call(_this11, _this11.el);
2692
2697
  }
2693
2698
  }
2694
2699
  });
@@ -2719,7 +2724,6 @@ $jscomp.polyfill = function (e, r, p, m) {
2719
2724
 
2720
2725
  // onCloseEnd callback
2721
2726
  if (typeof _this12.options.onCloseEnd === 'function') {
2722
- var elem = anim.animatables[0].target;
2723
2727
  _this12.options.onCloseEnd.call(_this12, _this12.el);
2724
2728
  }
2725
2729
  }
@@ -2849,7 +2853,7 @@ $jscomp.polyfill = function (e, r, p, m) {
2849
2853
 
2850
2854
  Dropdown._dropdowns = [];
2851
2855
 
2852
- window.M.Dropdown = Dropdown;
2856
+ M.Dropdown = Dropdown;
2853
2857
 
2854
2858
  if (M.jQueryLoaded) {
2855
2859
  M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
@@ -4420,7 +4424,7 @@ $jscomp.polyfill = function (e, r, p, m) {
4420
4424
  return Tabs;
4421
4425
  }(Component);
4422
4426
 
4423
- window.M.Tabs = Tabs;
4427
+ M.Tabs = Tabs;
4424
4428
 
4425
4429
  if (M.jQueryLoaded) {
4426
4430
  M.initializeJqueryWrapper(Tabs, 'tabs', 'M_Tabs');
@@ -6090,7 +6094,7 @@ $jscomp.polyfill = function (e, r, p, m) {
6090
6094
 
6091
6095
  Sidenav._sidenavs = [];
6092
6096
 
6093
- window.M.Sidenav = Sidenav;
6097
+ M.Sidenav = Sidenav;
6094
6098
 
6095
6099
  if (M.jQueryLoaded) {
6096
6100
  M.initializeJqueryWrapper(Sidenav, 'sidenav', 'M_Sidenav');
@@ -11833,10 +11837,20 @@ $jscomp.polyfill = function (e, r, p, m) {
11833
11837
  // Add callback for centering selected option when dropdown content is scrollable
11834
11838
  dropdownOptions.onOpenEnd = function (el) {
11835
11839
  var selectedOption = $(_this71.dropdownOptions).find('.selected').first();
11836
- if (_this71.dropdown.isScrollable && selectedOption.length) {
11837
- var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
11838
- scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown
11839
- _this71.dropdownOptions.scrollTop = scrollOffset;
11840
+
11841
+ if (selectedOption.length) {
11842
+ // Focus selected option in dropdown
11843
+ M.keyDown = true;
11844
+ _this71.dropdown.focusedIndex = selectedOption.index();
11845
+ _this71.dropdown._focusFocusedItem();
11846
+ M.keyDown = false;
11847
+
11848
+ // Handle scrolling to selected option
11849
+ if (_this71.dropdown.isScrollable) {
11850
+ var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
11851
+ scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown
11852
+ _this71.dropdownOptions.scrollTop = scrollOffset;
11853
+ }
11840
11854
  }
11841
11855
  };
11842
11856
 
@@ -551,7 +551,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
551
551
  M.initializeJqueryWrapper(Chips, 'chips', 'M_Chips');
552
552
  }
553
553
 
554
- $(document).on('ready turbolinks:load', function () {
554
+ $(document).ready(function () {
555
555
  // Handle removal of static chips.
556
556
  $(document.body).on('click', '.chip .close', function () {
557
557
  var $chips = $(this).closest('.chips');
@@ -307,7 +307,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
307
307
  var $activatableElement = $(focusedElement).find('a, button').first();
308
308
 
309
309
  // Click a or button tag if exists, otherwise click li tag
310
- !!$activatableElement.length ? $activatableElement[0].click() : focusedElement.click();
310
+ if (!!$activatableElement.length) {
311
+ $activatableElement[0].click();
312
+ } else if (!!focusedElement) {
313
+ focusedElement.click();
314
+ }
311
315
 
312
316
  // Close dropdown on ESC
313
317
  } else if (e.which === M.keys.ESC && this.isOpen) {
@@ -487,8 +491,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
487
491
 
488
492
  // onOpenEnd callback
489
493
  if (typeof _this3.options.onOpenEnd === 'function') {
490
- var elem = anim.animatables[0].target;
491
- _this3.options.onOpenEnd.call(elem, _this3.el);
494
+ _this3.options.onOpenEnd.call(_this3, _this3.el);
492
495
  }
493
496
  }
494
497
  });
@@ -519,7 +522,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
519
522
 
520
523
  // onCloseEnd callback
521
524
  if (typeof _this4.options.onCloseEnd === 'function') {
522
- var elem = anim.animatables[0].target;
523
525
  _this4.options.onCloseEnd.call(_this4, _this4.el);
524
526
  }
525
527
  }
@@ -649,7 +651,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
649
651
 
650
652
  Dropdown._dropdowns = [];
651
653
 
652
- window.M.Dropdown = Dropdown;
654
+ M.Dropdown = Dropdown;
653
655
 
654
656
  if (M.jQueryLoaded) {
655
657
  M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize 1.0.0-rc.2 (http://materializecss.com)
2
+ * Materialize 1.0.0 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -128,7 +128,7 @@
128
128
  $textarea.data('previous-length', $textarea[0].value.length);
129
129
  };
130
130
 
131
- $(document).on('ready turbolinks:load', function () {
131
+ $(document).ready(function () {
132
132
  // Text based inputs
133
133
  var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea';
134
134
 
@@ -141,7 +141,7 @@
141
141
  });
142
142
 
143
143
  // Add active if input element has been pre-populated on document ready
144
- $(document).on('ready turbolinks:load', function () {
144
+ $(document).ready(function () {
145
145
  M.updateTextFields();
146
146
  });
147
147
 
@@ -24,6 +24,8 @@ if (typeof define === 'function' && define.amd) {
24
24
  exports.default = M;
25
25
  }
26
26
 
27
+ M.version = '1.0.0';
28
+
27
29
  M.keys = {
28
30
  TAB: 9,
29
31
  ENTER: 13,
@@ -249,10 +249,20 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
249
249
  // Add callback for centering selected option when dropdown content is scrollable
250
250
  dropdownOptions.onOpenEnd = function (el) {
251
251
  var selectedOption = $(_this4.dropdownOptions).find('.selected').first();
252
- if (_this4.dropdown.isScrollable && selectedOption.length) {
253
- var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this4.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
254
- scrollOffset -= _this4.dropdownOptions.clientHeight / 2; // center in dropdown
255
- _this4.dropdownOptions.scrollTop = scrollOffset;
252
+
253
+ if (selectedOption.length) {
254
+ // Focus selected option in dropdown
255
+ M.keyDown = true;
256
+ _this4.dropdown.focusedIndex = selectedOption.index();
257
+ _this4.dropdown._focusFocusedItem();
258
+ M.keyDown = false;
259
+
260
+ // Handle scrolling to selected option
261
+ if (_this4.dropdown.isScrollable) {
262
+ var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this4.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
263
+ scrollOffset -= _this4.dropdownOptions.clientHeight / 2; // center in dropdown
264
+ _this4.dropdownOptions.scrollTop = scrollOffset;
265
+ }
256
266
  }
257
267
  };
258
268
 
@@ -647,7 +647,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
647
647
 
648
648
  Sidenav._sidenavs = [];
649
649
 
650
- window.M.Sidenav = Sidenav;
650
+ M.Sidenav = Sidenav;
651
651
 
652
652
  if (M.jQueryLoaded) {
653
653
  M.initializeJqueryWrapper(Sidenav, 'sidenav', 'M_Sidenav');
@@ -468,7 +468,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
468
468
  return Tabs;
469
469
  }(Component);
470
470
 
471
- window.M.Tabs = Tabs;
471
+ M.Tabs = Tabs;
472
472
 
473
473
  if (M.jQueryLoaded) {
474
474
  M.initializeJqueryWrapper(Tabs, 'tabs', 'M_Tabs');
@@ -194,7 +194,7 @@ textarea.materialize-textarea {
194
194
  }
195
195
 
196
196
  // Autofill + date + time inputs
197
- & > input[type]:-webkit-autofill:not(.browser-default) + label,
197
+ & > input[type]:-webkit-autofill:not(.browser-default):not([type="search"]) + label,
198
198
  & > input[type=date]:not(.browser-default) + label,
199
199
  & > input[type=time]:not(.browser-default) + label {
200
200
  transform: translateY(-14px) scale(.8);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize 1.0.0-rc.2 (http://materializecss.com)
2
+ * Materialize 1.0.0 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -12,9 +12,10 @@ module Materialize
12
12
  register_hanami
13
13
  elsif sprockets?
14
14
  register_sprockets
15
+ elsif defined?(::Sass) && ::Sass.respond_to?(:load_paths)
16
+ # The deprecated `sass` gem:
17
+ ::Sass.load_paths << stylesheets_path
15
18
  end
16
-
17
- configure_sass
18
19
  end
19
20
 
20
21
  # Paths
@@ -49,12 +50,6 @@ module Materialize
49
50
 
50
51
  private
51
52
 
52
- def configure_sass
53
- require 'sass'
54
-
55
- ::Sass.load_paths << stylesheets_path
56
- end
57
-
58
53
  def register_rails_engine
59
54
  require 'materialize-sass/engine'
60
55
  end
@@ -1,6 +1,6 @@
1
1
  module Materialize
2
2
  module Sass
3
- VERSION = "1.0.0.rc2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
6
6
 
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Materialize::Sass::VERSION
9
9
  spec.authors = ["mkhairi"]
10
10
  spec.email = ["khairi@labs.my"]
11
- spec.summary = %q{Materialzecss sass for rails.}
12
- spec.description = %q{Use materialzecss in your rails asset pipeline.}
11
+ spec.summary = %q{Materializecss rubygem for rails/sprockets base}
12
+ spec.description = %q{A modern responsive front-end framework based on Material Design. https://materializecss.com/}
13
13
  spec.homepage = "https://github.com/mkhairi/materialize-sass"
14
14
  spec.license = "MIT"
15
15
 
@@ -23,6 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
 
25
25
  #runtime dependencies
26
- spec.add_runtime_dependency 'sass', '>= 3.5.2'
27
26
  spec.add_runtime_dependency 'autoprefixer-rails', '>= 6.0.3'
28
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: materialize-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mkhairi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-24 00:00:00.000000000 Z
11
+ date: 2018-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: sass
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 3.5.2
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 3.5.2
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: autoprefixer-rails
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +52,7 @@ dependencies:
66
52
  - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: 6.0.3
69
- description: Use materialzecss in your rails asset pipeline.
55
+ description: A modern responsive front-end framework based on Material Design. https://materializecss.com/
70
56
  email:
71
57
  - khairi@labs.my
72
58
  executables: []
@@ -172,13 +158,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
158
  version: '0'
173
159
  required_rubygems_version: !ruby/object:Gem::Requirement
174
160
  requirements:
175
- - - ">"
161
+ - - ">="
176
162
  - !ruby/object:Gem::Version
177
- version: 1.3.1
163
+ version: '0'
178
164
  requirements: []
179
165
  rubyforge_project:
180
166
  rubygems_version: 2.7.6
181
167
  signing_key:
182
168
  specification_version: 4
183
- summary: Materialzecss sass for rails.
169
+ summary: Materializecss rubygem for rails/sprockets base
184
170
  test_files: []