sdr_view_components 0.14.0 → 0.16.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: 64d4ff73ede1c97112cbe2b8dc63ba3ae947491d8120a9fd470b4dcdae32a1e9
4
- data.tar.gz: b51e4f9ea31684aeb7f3d001599a117986e6fdd10793ee79cb7e3039eb4a3b53
3
+ metadata.gz: 27f0afaee126ae7798ad6211bc3b046399a06e6d0aa740ba5c90c8e1b8df5c0c
4
+ data.tar.gz: f1dbf12e5241901b8819d994b3d87019fa7366f39d2b0aa682690e44b7b7f64a
5
5
  SHA512:
6
- metadata.gz: e153ce9f7db7f8d970643bca3c269da909198641fedd6751fc359ff4cbb926bba817dbfebc9dfd86c8f9f7fbfe26bd39e2a6ff71ab277fa19e7bddf531a8ed36
7
- data.tar.gz: '085aaa600a6b6ca9e5bccb16da0c8b3b50a606c8352ca027e8816fb17c84831d948cc1e058aadd5543cee7017f6c94f4c238f8a7f40c1aa431b471df2a172554'
6
+ metadata.gz: d90ae68f1ef168082dea45078aea2c4af8803f133ed84054788005b32eb40fbca06f986e3cc21990c42f06949d7486a43a23d8e4a08821b21e72e9baa5dcba1c
7
+ data.tar.gz: 292ded03a7947c21657fdc312750827587a4ee1607b07867d6ea9b4a9a7e557bf6916e6d8e66f8e6a026491cf45924f9217d5fa39c2bfcd7bf383c81b28b42f0
@@ -26,6 +26,8 @@ module SdrViewComponents
26
26
  button_to(link, method: @method,
27
27
  class: ComponentSupport::ButtonSupport.classes(variant: @variant, size: @size, classes:,
28
28
  disabled: @disabled),
29
+ # The class only styles the button; the attribute keeps it from submitting the form.
30
+ disabled: @disabled,
29
31
  form: { data: },
30
32
  params:) do
31
33
  @label || content
@@ -20,10 +20,12 @@ module SdrViewComponents
20
20
  attr_reader :link, :label
21
21
 
22
22
  def call
23
- link_to(link, class: ComponentSupport::ButtonSupport.classes(classes: @classes, variant: @variant,
24
- bordered: @bordered, size: @size,
25
- disabled: @disabled),
26
- **@options) do
23
+ classes = ComponentSupport::ButtonSupport.classes(classes: @classes, variant: @variant,
24
+ bordered: @bordered, size: @size, disabled: @disabled)
25
+ # The class only styles the link; dropping href keeps it from being followed from the keyboard.
26
+ return tag.a(class: classes, aria: { disabled: true }, tabindex: -1, **@options) { label || content } if @disabled
27
+
28
+ link_to(link, class: classes, **@options) do
27
29
  label || content
28
30
  end
29
31
  end
@@ -32,6 +32,8 @@ module SdrViewComponents
32
32
  button_to(link, method: @method,
33
33
  class: ComponentSupport::ButtonSupport.classes(variant: @variant, size: @size, classes:,
34
34
  disabled: @disabled),
35
+ # The class only styles the button; the attribute keeps it from submitting the form.
36
+ disabled: @disabled,
35
37
  form: { data: },
36
38
  params:) do
37
39
  concat button_icon
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SdrViewComponents
4
- VERSION = '0.14.0'
4
+ VERSION = '0.16.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdr_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Collier