simple_form_password_with_hints 0.0.8 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '02782b6967dbc85699b9e268dd2b2fc43b0e600ba852971934d44218458bc363'
4
- data.tar.gz: 86bab6de753550c8ec05e4967a1d0bc2c3e9da03dd49fdd652ef5ce6508fd320
3
+ metadata.gz: d83415f47aa069c001ae4ef753a4f5c8adf2d51ecef3810f0b73c09d9d4cccd9
4
+ data.tar.gz: a617f17aa73ce03dfa9a014d0beb09403d802a608d375d566dd6ed7e112feac0
5
5
  SHA512:
6
- metadata.gz: 83162349e3012fb9993192604c25db015f516b5deb2b457dd269f78f2d2b80942609d74f23eedc5b8510bdb2be4de3d299d14a6c9c6e4aa0963643bafa8741e6
7
- data.tar.gz: 94ae725420153b2b7255d282e27bcf9387e75be83b699cc9e2a4396d2d194e2a2208d77fc206dd1de88e712df24f2a1bbeb41df66c85bda710142507ead67ee7
6
+ metadata.gz: eca8cf2fc11d72662bb5c273716a9cda54fe71889e183971a4fd6516729f099a092c131cd645ab0ee1217acdf226aa82ffeed576e22a0d95ad30467777942382
7
+ data.tar.gz: 6d7e1328160d9f33a9a3f583ce466a6c2a7788d47e3ea6974d96e63eca717de3d8467d4f03b05b6f6c932a846bf3426b9bd4c0336a614e8d16a90bbafc6cc0cd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_form_password_with_hints (0.0.8)
4
+ simple_form_password_with_hints (0.0.10)
5
5
  rails
6
6
  simple_form
7
7
 
data/UPGRADING ADDED
@@ -0,0 +1,5 @@
1
+ ###################################
2
+ # NOTE FOR UPGRADING FROM 0.0.7 #
3
+ ###################################
4
+
5
+ The eye icon is now correctly placed vertically, so if you had any overwrite to adjust the vertical position of the eye you should now remove it
@@ -31,11 +31,16 @@
31
31
  background-size: 8px auto
32
32
  &-input-div
33
33
  position: relative
34
+ &-invalid ~ .invalid-feedback
35
+ display: block
34
36
  &-password-toggle
35
37
  cursor: pointer
38
+ height: 20px
39
+ line-height: 1
36
40
  position: absolute
37
41
  right: 10px
38
- top: calc(50% - 10px)
42
+ top: 50%
43
+ transform: translateY(-50%)
39
44
  width: 20px
40
45
  &::before
41
46
  content: asset-url('icon-eye.svg')
@@ -4,7 +4,9 @@ class PasswordWithHintsInput < ::SimpleForm::Inputs::Base
4
4
  def input(wrapper_options = nil)
5
5
  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
6
6
  merged_input_options[:class] << " js-sfpwh-input js-sfpwh-hints-input "
7
- ( template.content_tag(:div, '', class: 'sfpwh-input-div') do
7
+ input_wrapper_class = 'sfpwh-input-div'
8
+ input_wrapper_class += ' sfpwh-input-div-invalid' if has_errors?
9
+ ( template.content_tag(:div, '', class: input_wrapper_class) do
8
10
  [
9
11
  @builder.password_field(attribute_name, merged_input_options),
10
12
  password_uncloaking_div
@@ -4,13 +4,15 @@ class PasswordWithSyncInput < ::SimpleForm::Inputs::Base
4
4
  def input(wrapper_options = nil)
5
5
  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
6
6
  merged_input_options[:class] << " js-sfpwh-input js-sfpwh-sync-input "
7
+ input_wrapper_class = 'sfpwh-input-div'
8
+ input_wrapper_class += ' sfpwh-input-div-invalid' if has_errors?
7
9
  if options[:compare_with_field]
8
10
  if merged_input_options[:data].nil?
9
11
  merged_input_options[:data] = { link_to: linked_field_name }
10
12
  else
11
13
  merged_input_options[:data][:link_to] = linked_field_name
12
14
  end
13
- ( template.content_tag(:div, '', class: 'sfpwh-input-div') do
15
+ ( template.content_tag(:div, '', class: input_wrapper_class) do
14
16
  [
15
17
  @builder.password_field(attribute_name, merged_input_options) +
16
18
  password_uncloaking_div
@@ -1,3 +1,3 @@
1
1
  module SimpleFormPasswordWithHints
2
- VERSION = "0.0.8".freeze
2
+ VERSION = "0.0.10".freeze
3
3
  end
@@ -12,6 +12,10 @@ Gem::Specification.new do |s|
12
12
  s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
13
13
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
14
14
  end
15
+ if File.exist?('UPGRADING')
16
+ s.post_install_message = File.read("UPGRADING")
17
+ end
18
+
15
19
  s.require_paths = ['lib']
16
20
  s.homepage =
17
21
  'https://github.com/noesya/simple_form_password_with_hints'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_password_with_hints
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre-andré Boissinot
@@ -81,6 +81,7 @@ files:
81
81
  - LICENSE
82
82
  - README.md
83
83
  - Rakefile
84
+ - UPGRADING
84
85
  - app/assets/images/icon-cancel.svg
85
86
  - app/assets/images/icon-check.svg
86
87
  - app/assets/images/icon-eye-slash.svg
@@ -99,7 +100,12 @@ homepage: https://github.com/noesya/simple_form_password_with_hints
99
100
  licenses:
100
101
  - MIT
101
102
  metadata: {}
102
- post_install_message:
103
+ post_install_message: |-
104
+ ###################################
105
+ # NOTE FOR UPGRADING FROM 0.0.7 #
106
+ ###################################
107
+
108
+ The eye icon is now correctly placed vertically, so if you had any overwrite to adjust the vertical position of the eye you should now remove it
103
109
  rdoc_options: []
104
110
  require_paths:
105
111
  - lib