type_number_imitate 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b2e4edc526650500489058a0e180316bf02b82fb
4
+ data.tar.gz: 004d05628b6d9267bdc91a03496d17d1af975c14
5
+ SHA512:
6
+ metadata.gz: f5321da312b965f79e9e76bae9e65ef40dbd335e0f37fba82133fa5c575c38c219e2517468bf2a3d0f6bd772ea9cca09aea9a73b872e0ef6f1b9ac7514979729
7
+ data.tar.gz: 5d784b4f4125123c86c031cce6bc6ce3d7b2274960bcbe67ffa3bf9ba088c6dd5ff9dd08d07d2db093e93818de0956ddc45de6d3a135404fa89bc1f2e5c4b637
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ /.idea/*
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 byzg
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/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # TypeNumberImitate
2
+
3
+ jQuery-library to imitate `input[type='number']` for `input[type='text']`
4
+
5
+ WARNING: jQuery and [Lodash](https://lodash.com/docs) required.
6
+
7
+ Attributes `step` (default 1), `min`, `max` are supported.
8
+
9
+ Use attribute `float` (default false) to allow float typing.
10
+
11
+ Handlers on keyboard up (↑) and down (↓) changes value of input on step
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ ```ruby
18
+ gem 'type_number_imitate'
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install type_number_imitate
28
+
29
+ ## Usage
30
+
31
+ ```html
32
+ <input class="first" float="" min="1" placeholder="1" type="text">
33
+ ```
34
+ ```javascript
35
+ new TypeNumberImitate('input.first');
36
+ ```
37
+
38
+ Result:
39
+ ```html
40
+ <div class="type-number-imitate">
41
+ <input autocomplete="off" class="cart_variation_quantity" min="1" name="cart_variation[quantity]" placeholder="1" value="1">
42
+ <span class="plus">+</span>
43
+ <span class="minus">–</span>
44
+ </div>
45
+ ```
46
+
47
+ ## Options
48
+ ```javascript
49
+ new TypeNumberImitate(inputSelector, options);
50
+ ```
51
+ * *wrapperClasses* - additional clases for wrapper div.type-number-imitate
52
+ * *plusClasses*, *minusClasses* - additional clases for plus and minus spans
53
+ ```javascript
54
+ new TypeNumberImitate('input.second', {wrapperClasses: 'green-border large'});
55
+ ```
56
+
57
+ [Live demo](http://codepen.io/byzg/pen/VaNPMO)
58
+
59
+ ## Development
60
+
61
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
62
+
63
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
64
+
65
+ ## Contributing
66
+
67
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/type_number_imitate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
68
+
69
+
70
+ ## License
71
+
72
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
73
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler/gem_tasks'
2
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "type_number_imitate"
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
data/bin/setup ADDED
@@ -0,0 +1,8 @@
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/demo/demo.html ADDED
@@ -0,0 +1,17 @@
1
+ <style>
2
+ .green-border { border: solid 3px green; }
3
+ .large { zoom: 1.2; }
4
+ </style>
5
+
6
+ Default input:
7
+ <input class="first" float="" min="1" placeholder="1" type="text">
8
+ <br>
9
+ Input with classes of wrapper:
10
+ <input class="second" float="" min="1" placeholder="1" type="text">
11
+
12
+ <script>
13
+ jQuery(function() {
14
+ new TypeNumberImitate('input.first');
15
+ new TypeNumberImitate('input.second', {wrapperClasses: 'green-border large'});
16
+ });
17
+ </script>
data/demo/demo.slim ADDED
@@ -0,0 +1,15 @@
1
+ style
2
+ | .green-border { border: solid 3px green; }
3
+ | .large { zoom: 1.2; }
4
+
5
+ | Default input:
6
+ input.first type='text' min='1' placeholder='1' float=true
7
+ br
8
+ | Input with classes of wrapper:
9
+ input.second type='text' min='1' placeholder='1' float=true
10
+
11
+ script
12
+ | jQuery(function() {
13
+ | new TypeNumberImitate('input.first');
14
+ | new TypeNumberImitate('input.second', {wrapperClasses: 'green-border large'});
15
+ | });
@@ -0,0 +1,3 @@
1
+ module TypeNumberImitate
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,5 @@
1
+ require "type_number_imitate/version"
2
+
3
+ module TypeNumberImitate
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'type_number_imitate/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "type_number_imitate"
8
+ spec.version = TypeNumberImitate::VERSION
9
+ spec.authors = ['byzg']
10
+ spec.email = ['byzg00@gmail.ru']
11
+
12
+ spec.summary = 'This gem can imitate input[type="number"]'
13
+ spec.homepage = 'http://codepen.io/byzg/pen/VaNPMO'
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['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
20
+ # else
21
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
+ # end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ spec.add_development_dependency "bundler", "~> 1.12"
30
+ spec.add_development_dependency "rake", "~> 10.0"
31
+ end
@@ -0,0 +1,103 @@
1
+ # created by byzg
2
+ # https://github.com/byzg/type_number_imitate
3
+ # created by byzg
4
+ # https://github.com/byzg/type_number_imitate
5
+ window.TypeNumberImitate = class TypeNumberImitate
6
+ constructor: ($input, opts = {}) ->
7
+ @$input = jQuery($input)
8
+ @opts = opts
9
+ @opts.wrapperClasses ||= ''
10
+ @opts.plusClasses ||= ''
11
+ @opts.minusClasses ||= ''
12
+ if @$input.length && !@alreadyImitated()
13
+ @init()
14
+ @toggleDisabled()
15
+
16
+ isValid: (val)->
17
+ return true if val == '' || !(@min? || @max?)
18
+ parsed = @parseFn(val);
19
+ result = !isNaN(parsed) && !!('' + val).match(@regex)
20
+ result &= (parsed >= @min) if @min
21
+ result &= (parsed <= @max) if @max
22
+ !!result
23
+
24
+ valAfterType: (typedStr, keyDownCode = null)->
25
+ currentVal = @$input.val()
26
+ selectionStart = @$input.get(0).selectionStart
27
+ selectionEnd = @$input.get(0).selectionEnd
28
+ deltaStart = deltaEnd = 0
29
+ deltaStart = -1 if keyDownCode == 8
30
+ deltaEnd = 1 if keyDownCode == 46
31
+ currentVal.substr(0, selectionStart + deltaStart) + typedStr + currentVal.substr(selectionEnd + deltaEnd)
32
+
33
+ toggleDisabled: ->
34
+ val = @$input.val()
35
+ @$plus.toggleClass 'disabled', val == @max
36
+ @$minus.toggleClass 'disabled', val == @min
37
+
38
+ stepFn: (val)->
39
+ oldVal = @$input.val()
40
+ oldVal = 0 if oldVal == ''
41
+ oldVal = @parseFn(oldVal)
42
+ newVal = oldVal + @parseFn(val)
43
+ if @isValid(newVal)
44
+ @$input.val newVal
45
+ @toggleDisabled()
46
+ @$input.trigger 'change'
47
+ newVal
48
+ else
49
+ oldVal
50
+
51
+ alreadyImitated: ->
52
+ @$input.data().typeNumberImitated
53
+
54
+ increment: ->
55
+ @stepFn(@step)
56
+
57
+ decrement: ->
58
+ @stepFn(-@step)
59
+
60
+ init: ->
61
+ @initAttrs()
62
+ @initWrap()
63
+ @initHandlers()
64
+ @$input.data('type-number-imitated', true)
65
+
66
+ initAttrs: ->
67
+ @float = @$input.is('[float]')
68
+ @parseFn = if @float then parseFloat else parseInt
69
+ @min = @parseFn(min) if min = @$input.attr('min')
70
+ @max = @parseFn(max) if max = @$input.attr('max')
71
+ @step = @parseFn(@$input.attr('step') || 1)
72
+ regexStr = '^[0-9]+'
73
+ regexStr += '\.?([0-9]+)?' if @float
74
+ regexStr += '$'
75
+ regexStr = regexStr.replace(/[.]/g, '\\$&')
76
+ @regex = new RegExp(regexStr, 'g')
77
+
78
+ initHandlers: ->
79
+ @$input.on('keypress', (e) =>
80
+ @isValid(@valAfterType(String.fromCharCode(e.charCode)))
81
+ ).on('keydown', (e) =>
82
+ if _.includes([38, 40], e.keyCode)
83
+ @increment() if e.keyCode == 38
84
+ @decrement() if e.keyCode == 40
85
+ e.preventDefault()
86
+ else if _.includes([8, 46], e.keyCode)
87
+ e.preventDefault() unless @isValid(@valAfterType('', e.keyCode))
88
+ ).on('paste', (e) =>
89
+ pasted = e.originalEvent.clipboardData.getData('text')
90
+ e.preventDefault() unless @isValid(@valAfterType(pasted))
91
+ ).on('cut', (e) =>
92
+ e.preventDefault() unless @isValid(@valAfterType(''))
93
+ )
94
+ @$plus.click => @increment()
95
+ @$minus.click => @decrement()
96
+
97
+ initWrap: ->
98
+ @$input.wrap("<div class='type-number-imitate #{@opts.wrapperClasses}'></div>")
99
+ @$container = @$input.parent()
100
+ @$plus = jQuery("<span class='plus #{@opts.plusClasses}'>+</span>")
101
+ @$minus = jQuery("<span class='minus #{@opts.minusClasses}'>–</span>")
102
+ @$container.append(@$plus)
103
+ @$container.append(@$minus)
@@ -0,0 +1,181 @@
1
+ // created by byzg
2
+ // https://github.com/byzg/type_number_imitate
3
+ (function () {
4
+ var TypeNumberImitate;
5
+
6
+ window.TypeNumberImitate = TypeNumberImitate = (function() {
7
+ function TypeNumberImitate($input, opts) {
8
+ var base, base1, base2;
9
+ if (opts == null) {
10
+ opts = {};
11
+ }
12
+ this.$input = jQuery($input);
13
+ this.opts = opts;
14
+ (base = this.opts).wrapperClasses || (base.wrapperClasses = '');
15
+ (base1 = this.opts).plusClasses || (base1.plusClasses = '');
16
+ (base2 = this.opts).minusClasses || (base2.minusClasses = '');
17
+ if (this.$input.length && !this.alreadyImitated()) {
18
+ this.init();
19
+ this.toggleDisabled();
20
+ }
21
+ }
22
+
23
+ TypeNumberImitate.prototype.isValid = function(val) {
24
+ var parsed, result;
25
+ if (val === '' || !((this.min != null) || (this.max != null))) {
26
+ return true;
27
+ }
28
+ parsed = this.parseFn(val);
29
+ result = !isNaN(parsed) && !!('' + val).match(this.regex);
30
+ if (this.min) {
31
+ result &= parsed >= this.min;
32
+ }
33
+ if (this.max) {
34
+ result &= parsed <= this.max;
35
+ }
36
+ return !!result;
37
+ };
38
+
39
+ TypeNumberImitate.prototype.valAfterType = function(typedStr, keyDownCode) {
40
+ var currentVal, deltaEnd, deltaStart, selectionEnd, selectionStart;
41
+ if (keyDownCode == null) {
42
+ keyDownCode = null;
43
+ }
44
+ currentVal = this.$input.val();
45
+ selectionStart = this.$input.get(0).selectionStart;
46
+ selectionEnd = this.$input.get(0).selectionEnd;
47
+ deltaStart = deltaEnd = 0;
48
+ if (keyDownCode === 8) {
49
+ deltaStart = -1;
50
+ }
51
+ if (keyDownCode === 46) {
52
+ deltaEnd = 1;
53
+ }
54
+ return currentVal.substr(0, selectionStart + deltaStart) + typedStr + currentVal.substr(selectionEnd + deltaEnd);
55
+ };
56
+
57
+ TypeNumberImitate.prototype.toggleDisabled = function() {
58
+ var val;
59
+ val = this.$input.val();
60
+ this.$plus.toggleClass('disabled', val === this.max);
61
+ return this.$minus.toggleClass('disabled', val === this.min);
62
+ };
63
+
64
+ TypeNumberImitate.prototype.stepFn = function(val) {
65
+ var newVal, oldVal;
66
+ oldVal = this.$input.val();
67
+ if (oldVal === '') {
68
+ oldVal = 0;
69
+ }
70
+ oldVal = this.parseFn(oldVal);
71
+ newVal = oldVal + this.parseFn(val);
72
+ if (this.isValid(newVal)) {
73
+ this.$input.val(newVal);
74
+ this.toggleDisabled();
75
+ this.$input.trigger('change');
76
+ return newVal;
77
+ } else {
78
+ return oldVal;
79
+ }
80
+ };
81
+
82
+ TypeNumberImitate.prototype.alreadyImitated = function() {
83
+ return this.$input.data().typeNumberImitated;
84
+ };
85
+
86
+ TypeNumberImitate.prototype.increment = function() {
87
+ return this.stepFn(this.step);
88
+ };
89
+
90
+ TypeNumberImitate.prototype.decrement = function() {
91
+ return this.stepFn(-this.step);
92
+ };
93
+
94
+ TypeNumberImitate.prototype.init = function() {
95
+ this.initAttrs();
96
+ this.initWrap();
97
+ this.initHandlers();
98
+ return this.$input.data('type-number-imitated', true);
99
+ };
100
+
101
+ TypeNumberImitate.prototype.initAttrs = function() {
102
+ var max, min, regexStr;
103
+ this.float = this.$input.is('[float]');
104
+ this.parseFn = this.float ? parseFloat : parseInt;
105
+ if (min = this.$input.attr('min')) {
106
+ this.min = this.parseFn(min);
107
+ }
108
+ if (max = this.$input.attr('max')) {
109
+ this.max = this.parseFn(max);
110
+ }
111
+ this.step = this.parseFn(this.$input.attr('step') || 1);
112
+ regexStr = '^[0-9]+';
113
+ if (this.float) {
114
+ regexStr += '\.?([0-9]+)?';
115
+ }
116
+ regexStr += '$';
117
+ regexStr = regexStr.replace(/[.]/g, '\\$&');
118
+ return this.regex = new RegExp(regexStr, 'g');
119
+ };
120
+
121
+ TypeNumberImitate.prototype.initHandlers = function() {
122
+ this.$input.on('keypress', (function(_this) {
123
+ return function(e) {
124
+ return _this.isValid(_this.valAfterType(String.fromCharCode(e.charCode)));
125
+ };
126
+ })(this)).on('keydown', (function(_this) {
127
+ return function(e) {
128
+ if (_.includes([38, 40], e.keyCode)) {
129
+ if (e.keyCode === 38) {
130
+ _this.increment();
131
+ }
132
+ if (e.keyCode === 40) {
133
+ _this.decrement();
134
+ }
135
+ return e.preventDefault();
136
+ } else if (_.includes([8, 46], e.keyCode)) {
137
+ if (!_this.isValid(_this.valAfterType('', e.keyCode))) {
138
+ return e.preventDefault();
139
+ }
140
+ }
141
+ };
142
+ })(this)).on('paste', (function(_this) {
143
+ return function(e) {
144
+ var pasted;
145
+ pasted = e.originalEvent.clipboardData.getData('text');
146
+ if (!_this.isValid(_this.valAfterType(pasted))) {
147
+ return e.preventDefault();
148
+ }
149
+ };
150
+ })(this)).on('cut', (function(_this) {
151
+ return function(e) {
152
+ if (!_this.isValid(_this.valAfterType(''))) {
153
+ return e.preventDefault();
154
+ }
155
+ };
156
+ })(this));
157
+ this.$plus.click((function(_this) {
158
+ return function() {
159
+ return _this.increment();
160
+ };
161
+ })(this));
162
+ return this.$minus.click((function(_this) {
163
+ return function() {
164
+ return _this.decrement();
165
+ };
166
+ })(this));
167
+ };
168
+
169
+ TypeNumberImitate.prototype.initWrap = function() {
170
+ this.$input.wrap("<div class='type-number-imitate " + this.opts.wrapperClasses + "'></div>");
171
+ this.$container = this.$input.parent();
172
+ this.$plus = jQuery("<span class='plus " + this.opts.plusClasses + "'>+</span>");
173
+ this.$minus = jQuery("<span class='minus " + this.opts.minusClasses + "'>–</span>");
174
+ this.$container.append(this.$plus);
175
+ return this.$container.append(this.$minus);
176
+ };
177
+
178
+ return TypeNumberImitate;
179
+
180
+ })();
181
+ }.call(this));
@@ -0,0 +1,54 @@
1
+ .type-number-imitate {
2
+ width: 60px;
3
+ height: 30px;
4
+ position: relative;
5
+ }
6
+ .type-number-imitate input {
7
+ box-sizing: border-box;
8
+ width: 44px;
9
+ padding: 0 10px;
10
+ vertical-align: top;
11
+ text-align: left;
12
+ outline: none;
13
+ border-radius: 3px 0 0 3px;
14
+ border: 1px solid #EDC5D8;
15
+ height: 30px;
16
+ border-right: none;
17
+ color: #141415;
18
+ }
19
+ .type-number-imitate .minus, .type-number-imitate .plus {
20
+ -webkit-touch-callout: none;
21
+ -webkit-user-select: none;
22
+ -khtml-user-select: none;
23
+ -moz-user-select: none;
24
+ -ms-user-select: none;
25
+ user-select: none;
26
+ display: block;
27
+ width: 16px;
28
+ height: 15px;
29
+ line-height: 13px;
30
+ background: #F4F5F5;
31
+ border: 1px solid #EDC5D8;
32
+ color: #95989D;
33
+ text-align: center;
34
+ font-family: none;
35
+ font-weight: bold;
36
+ cursor: pointer;
37
+ position: absolute;
38
+ right: 0;
39
+ }
40
+ .type-number-imitate .minus:active, .type-number-imitate .plus:active {
41
+ background: #ddd;
42
+ }
43
+ .type-number-imitate .minus.disabled, .type-number-imitate .plus.disabled {
44
+ pointer-events: none;
45
+ color: #D5D6D8;
46
+ }
47
+ .type-number-imitate .minus {
48
+ border-radius: 0 0 3px 0;
49
+ bottom: 0;
50
+ }
51
+ .type-number-imitate .plus {
52
+ border-radius: 0 3px 0 0;
53
+ top: 0;
54
+ }
@@ -0,0 +1,56 @@
1
+ // design by Mike Burns
2
+ .type-number-imitate
3
+ $black-russian: #141415
4
+ $zircon: #F4F5F5
5
+ $grey-chateau: #95989D
6
+ $athens-grey: #D5D6D8
7
+ $chantilly: #EDC5D8
8
+ =no-select
9
+ -webkit-touch-callout: none
10
+ -webkit-user-select: none
11
+ -khtml-user-select: none
12
+ -moz-user-select: none
13
+ -ms-user-select: none
14
+ user-select: none
15
+ width: 60px
16
+ height: 30px
17
+ position: relative
18
+ input
19
+ box-sizing: border-box
20
+ width: 44px
21
+ padding: 0 10px
22
+ vertical-align: top
23
+ text-align: left
24
+ outline: none
25
+ border-radius: 3px 0 0 3px
26
+ border: 1px solid $chantilly
27
+ height: 30px
28
+ border-right: none
29
+ color: $black-russian
30
+ .minus, .plus
31
+ +no-select
32
+ display: block
33
+ width: 16px
34
+ height: 15px
35
+ line-height: 13px
36
+ background: $zircon
37
+ border: 1px solid $chantilly
38
+ color: $grey-chateau
39
+ text-align: center
40
+ font-family: none
41
+ font-weight: bold
42
+ cursor: pointer
43
+ position: absolute
44
+ right: 0
45
+ &:active
46
+ background: #ddd
47
+ &.disabled
48
+ pointer-events: none
49
+ color: $athens-grey
50
+ .minus
51
+ border-radius: 0 0 3px 0
52
+ bottom: 0
53
+ border-top: 0px
54
+ .plus
55
+ border-radius: 0 3px 0 0
56
+ top: 0
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: type_number_imitate
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - byzg
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-07-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - byzg00@gmail.ru
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - bin/console
54
+ - bin/setup
55
+ - demo/demo.html
56
+ - demo/demo.slim
57
+ - lib/type_number_imitate.rb
58
+ - lib/type_number_imitate/version.rb
59
+ - type_number_imitate.gemspec
60
+ - vendor/assets/javascripts/type_number_imitate.coffee
61
+ - vendor/assets/javascripts/type_number_imitate.js
62
+ - vendor/assets/stylesheets/type_number_imitate.css
63
+ - vendor/assets/stylesheets/type_number_imitate.sass
64
+ homepage: http://codepen.io/byzg/pen/VaNPMO
65
+ licenses:
66
+ - MIT
67
+ metadata: {}
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubyforge_project:
84
+ rubygems_version: 2.6.2
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: This gem can imitate input[type="number"]
88
+ test_files: []