ifms 0.1.1 → 0.1.2

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: 964a0b3c74591a7c0f7a9224b5bfe0dd2243fe46a1a758a6897bd240794f0058
4
- data.tar.gz: 8633f6dc48fd33977da152243428af34449d606ba43f4a808411661f93ee257f
3
+ metadata.gz: 47301b68da3ccdcae64673f9acccf7046bf81841cac40fe0a6c6cc63343ca54e
4
+ data.tar.gz: 573e1d155fe5e778c45ccbb507d6d91031fa6ae9d9fa761d7d274d8241c485ef
5
5
  SHA512:
6
- metadata.gz: 7660fe116e99c7af2c4237692e5faddf00abfd6e6e9ab8976032033420cbe45955b6a593a4446057dcc90032a05369eaf671a44a54586e4511edbfa7aad031f3
7
- data.tar.gz: 01c6df51ef44d3330c625d6f5925b887f0e5c309e2118f64b2cb56c6c74cc5b824df6eca1055db2b01985f989850821e7be2dd0b29ffcf7eb4317fd52bd0b13b
6
+ metadata.gz: cb1ee69ffb57a1ba06af5bdedcfc67603e6f264babe5edcd545f0484d9d4d05c955dc1b62f088565f8ee6446366006678ef426657f3c9c51a02f2859357cd1c4
7
+ data.tar.gz: b05e82f0fdb338c63ce6118e956371505b4276b6f80ebef3bb53015d789ecf712699ea1fee7dfacdd8da58a0356f675603775bb10efc29345402286b736d6a57
File without changes
@@ -0,0 +1,3 @@
1
+ "strict mode";
2
+ var ifms = function() { document.querySelectorAll(['.mat-input input[type="text"]', '.mat-input input[type="email"]', '.mat-input input[type="password"]', '.mat-input input[type="number"]'].join(", ")).forEach(function (t) { t.addEventListener("focus", function () { this.parentElement.classList.add("active"), this.parentElement.classList.add("focus") }), t.addEventListener("blur", function () { this.parentElement.classList.remove("focus"), "" == this.value && this.parentElement.classList.remove("active") }) }); };
3
+ (function() { ifms(); })();document.addEventListener("turbolinks:load", function () { ifms() });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ifms.js"],"names":["document","querySelectorAll","join","forEach","elem","addEventListener","parentElement","classList","add","remove","value"],"mappings":";AAAA,aAUwBA,SAASC,iBAPZ,CACjB,gCACA,iCACA,oCACA,mCAGyDC,KAAK,OAElDC,QAAQ,SAAAC,GACpBA,EAAKC,iBAAiB,QAAS,WACxBC,KAAAA,cAAcC,UAAUC,IAAI,UAC5BF,KAAAA,cAAcC,UAAUC,IAAI,WAGnCJ,EAAKC,iBAAiB,OAAQ,WACvBC,KAAAA,cAAcC,UAAUE,OAAO,SAClB,IAAd,KAAKC,OACFJ,KAAAA,cAAcC,UAAUE,OAAO","file":"main.map","sourceRoot":"..","sourcesContent":["'use strict';\r\n\r\n(function() {\r\n const inputTypes = [\r\n '.mat-input input[type=\"text\"]',\r\n '.mat-input input[type=\"email\"]',\r\n '.mat-input input[type=\"password\"]',\r\n '.mat-input input[type=\"number\"]',\r\n ]\r\n \r\n const inputElements = document.querySelectorAll(inputTypes.join(', '));\r\n \r\n inputElements.forEach(elem => {\r\n elem.addEventListener('focus', function() {\r\n this.parentElement.classList.add('active')\r\n this.parentElement.classList.add('focus')\r\n })\r\n \r\n elem.addEventListener('blur', function() {\r\n this.parentElement.classList.remove('focus')\r\n if (this.value == '') {\r\n this.parentElement.classList.remove('active')\r\n }\r\n })\r\n })\r\n})()\r\n"]}
@@ -0,0 +1 @@
1
+ main.container{margin-top:50px}.mat-input{border:1px solid #ddd;position:relative;height:50px;display:flex;flex-direction:row;align-content:center;border-radius:4px;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}.mat-input input[type=email],.mat-input input[type=number],.mat-input input[type=password],.mat-input input[type=text]{border-radius:4px;padding:20px 12px 8px 13px;border:none;flex:1}.mat-input input[type=email]:focus,.mat-input input[type=number]:focus,.mat-input input[type=password]:focus,.mat-input input[type=text]:focus{outline:none}.mat-input label{position:absolute;line-height:14px;left:13px;top:16px;font-size:16px;color:#858587;cursor:inherit;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}.mat-input.inline{height:46px}.mat-input.inline input[type=text]{padding:8px 12px 8px 13px}.mat-input.inline label{top:14px}.mat-input.inline.active label{font-size:12px;top:-10px;left:10px;padding:0 3px;background:#fff;font-weight:400}.mat-input.active label{color:#858587;font-weight:700;font-size:11px;left:13px;top:2px}.mat-input.focus{border-color:#00bcd4;box-shadow:0 0 0 1px #00bcd4}.mat-input.focus label{color:#00bcd4}.mat-group{margin-bottom:20px}.mat-group .info{font-size:12px;display:block;padding:2px 12px 0 13px;color:#858587}.mat-group.error .info{color:#f44336}.mat-group.error .mat-input{border-color:#f44336;box-shadow:0 0 0 1px #f44336}.mat-group.error .mat-input.active.focus label{color:#f44336}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ifms.map","sourceRoot":".."}
data/lib/ifms.rb CHANGED
@@ -1,20 +1,5 @@
1
1
  require "ifms/version"
2
2
 
3
3
  module Ifms
4
- class Error < StandardError; end
5
- class << self
6
- def load!
7
- register_rails_engine if rails?
8
- end
9
-
10
- def rails?
11
- defined?(::Rails)
12
- end
13
-
14
- private
15
-
16
- def register_rails_engine
17
- require 'ifms/engine'
18
- end
19
- end
4
+ require 'ifms/engine'
20
5
  end
@@ -0,0 +1,11 @@
1
+ module Ifms
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ initializer 'ifms.assets' do |app|
5
+ %w(stylesheets javascripts).each do |sub|
6
+ app.config.assets.paths << root.join('assets', sub).to_s
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/ifms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ifms
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wallas Faria
@@ -59,18 +59,14 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".travis.yml"
65
- - CODE_OF_CONDUCT.md
66
- - Gemfile
67
- - LICENSE.txt
68
- - README.md
69
62
  - Rakefile
70
- - bin/console
71
- - bin/setup
72
- - ifms.gemspec
63
+ - Readme.md
64
+ - assets/javascripts/ifms.js
65
+ - assets/javascripts/ifms.map
66
+ - assets/stylesheets/ifms.css
67
+ - assets/stylesheets/ifms.map
73
68
  - lib/ifms.rb
69
+ - lib/ifms/engine.rb
74
70
  - lib/ifms/version.rb
75
71
  homepage: https://github.com/WallasFaria/input-fields-material-design-style
76
72
  licenses:
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
- *.gem
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.1
7
- before_install: gem install bundler -v 1.17.3
data/CODE_OF_CONDUCT.md DELETED
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at wallasfaria@hotmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in ifms.gemspec
6
- gemspec
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Wallas Faria
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "ifms"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/ifms.gemspec DELETED
@@ -1,37 +0,0 @@
1
-
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "ifms/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "ifms"
8
- spec.version = Ifms::VERSION
9
- spec.authors = ["Wallas Faria"]
10
- spec.email = ["wallasfaria@hotmail.com"]
11
-
12
- spec.summary = %q{Input fields material design style}
13
- spec.homepage = "https://github.com/WallasFaria/input-fields-material-design-style"
14
- spec.license = "MIT"
15
-
16
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
- # to allow pushing to a single host or delete this section to allow pushing to any host.
18
- if spec.respond_to?(:metadata)
19
- spec.metadata["homepage_uri"] = spec.homepage
20
- else
21
- raise "RubyGems 2.0 or newer is required to protect against " \
22
- "public gem pushes."
23
- end
24
-
25
- # Specify which files should be added to the gem when it is released.
26
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
28
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
- end
30
- spec.bindir = "exe"
31
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
- spec.require_paths = ["lib", "assets"]
33
-
34
- spec.add_development_dependency "bundler", "~> 1.17"
35
- spec.add_development_dependency "rake", "~> 10.0"
36
- spec.add_development_dependency "rspec", "~> 3.0"
37
- end