stimulus-password-strength 0.1.8 → 0.1.9

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: 787fe4298029dcee2caeb7017f855898db05922601132037d26b8a7b22538694
4
- data.tar.gz: a1eb04050ff77b58dc236c85ac2056744e2b4a082a48475d56060747a9123cf1
3
+ metadata.gz: d7c21137ca8a5f181ad4bd726edc6692074146eb5c8ffb89299b16792398e5b2
4
+ data.tar.gz: 5da199bf30c539c22a71666bb9ef7fd163526bac6f17c3553f0b1b2af6d119ff
5
5
  SHA512:
6
- metadata.gz: af929a1bef9d1d660a12008e05f31242a1ac09b02e947ea64a551d9aec002a91aaf28d3db02b8050c4d1d5a74e1de968a2e1123fffa4966916fa062016df14f9
7
- data.tar.gz: 4e9d6016040a619edf04ada7473f8e78c9404abc3f0aff2aa468ef8376caeb730ad3d7c9f984cb1531709990ba4e10f70be077a6f8049c7d9354b58d47a12a07
6
+ metadata.gz: 93e8e495a10b7eb5378f08d2cf1b58b360436b0baa21ece47b97d4f9a6c0eb78c07d7f026af4374abc7207809e7db80a3a74d5db7ecb256cb7eace382adffa54
7
+ data.tar.gz: 846abdc66278229d5fb8773467937ab38b63fd9ac73ee58a42b97f1e691467156f98ea84d8ca42908afbdcf2566715eb007f281fbe6e00a002252da0a46dd863
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.9
4
+
5
+ - removed positional Tailwind utilities from the default `toggle_class` so the show/hide icon no longer gets a second vertical translation on host apps that also use the inline `toggle_style`
6
+ - documented that `toggle_class` should stay visual only and must not reintroduce `absolute`, `right-*`, `top-1/2`, or `-translate-y-1/2`
7
+ - refreshed the installer template to reflect the new toggle customization contract
8
+
3
9
  ## 0.1.8
4
10
 
5
11
  - moved the field wrapper and label row layout into inline style defaults so critical flex/position behavior no longer depends on host-app utility classes
data/README.md CHANGED
@@ -116,6 +116,7 @@ StimulusPasswordStrength.configure do |config|
116
116
  config.input_class = "w-full rounded-md border px-3 py-2 pr-16"
117
117
  config.wrapper_style = "position: relative;"
118
118
  config.toggle_style = "position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);"
119
+ config.toggle_class = "cursor-pointer text-xs font-medium text-gray-500 hover:text-gray-700"
119
120
  config.text_style = "width: 5.5rem; text-align: right; white-space: nowrap;"
120
121
  config.status_row_class = "flex min-h-5 flex-row-reverse items-center justify-start gap-2"
121
122
  config.requirements_style = "min-height: 1rem;"
@@ -145,6 +146,8 @@ The gem now treats critical layout as component mechanics, not host-app theme:
145
146
 
146
147
  If you override these settings, preserve the same mechanics and keep right-side padding on the input (`pr-16` or equivalent) so typed text does not collide with the toggle.
147
148
 
149
+ Do not put positional utility classes such as `absolute`, `right-*`, `top-1/2`, or `-translate-y-1/2` into `toggle_class`. Positioning is already owned by `toggle_style`; duplicating it can shift the icon upward.
150
+
148
151
  ## Post-Install Checklist
149
152
 
150
153
  1. Signup: weak password -> backend validation still works.
@@ -3,7 +3,8 @@
3
3
  StimulusPasswordStrength.configure do |config|
4
4
  # Example customization:
5
5
  # config.input_class = "w-full rounded-md border px-3 py-2 pr-16"
6
- # config.text_style = "min-width: 2.5rem; text-align: right; white-space: nowrap;"
6
+ # config.toggle_class = "cursor-pointer text-xs font-medium text-gray-500 hover:text-gray-700"
7
+ # config.text_style = "display: inline-block; width: 5.5rem; text-align: right; white-space: nowrap;"
7
8
  # config.status_row_class = "flex min-h-5 items-center gap-2"
8
9
  # config.status_row_style = "min-height: 1rem;"
9
10
  # config.requirements_style = "min-height: 1rem;"
@@ -46,7 +46,7 @@ module StimulusPasswordStrength
46
46
  @requirement_style = "font-size: 0.75rem; line-height: 1rem; text-align: right;"
47
47
  @wrapper_style = "position: relative;"
48
48
  @input_class = "w-full rounded-xl border border-gray-300 px-4 py-3 pr-16 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-200"
49
- @toggle_class = "absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer text-xs font-medium text-gray-500 hover:text-gray-700"
49
+ @toggle_class = "cursor-pointer text-xs font-medium text-gray-500 hover:text-gray-700"
50
50
  @toggle_style = "position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; line-height: 0; z-index: 1;"
51
51
  @bar_track_class = "h-1.5 w-20 overflow-hidden rounded-full bg-gray-100"
52
52
  @bar_track_style = "height: 0.375rem; width: 5rem; overflow: hidden; border-radius: 9999px; background-color: #e5e7eb; visibility: hidden; flex-shrink: 0;"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusPasswordStrength
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus-password-strength
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justyna Wojtczak