govuk-components 5.0.0b1 → 5.0.0b2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/govuk_visually_hidden_helper.rb +4 -8
- data/lib/govuk/components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6c2597cbc2b6db48def0781c11e2173bb2e3a1bf5b661c695145d68ea41fa7f
|
4
|
+
data.tar.gz: c6853251961b9b9e2e102cbdd6439cf20b99d695ba548008c1d68edb1c287158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d908043c42e33bf274e2d06e8873ec6fe207825b866064fc12dcd46ce9c113db3476dd7ee9537d65b5648e2521da1b7abcaccdd23fdbbf715003d9672390952
|
7
|
+
data.tar.gz: 3595863554678c2eb81f5a286d71257a0340bcb57d9dda6596d6d7efa0e985e8dd59cd72d984cba87cb86ad0c2f49e3280dc918f207970cdd0e9b3246cd793f9
|
@@ -1,13 +1,9 @@
|
|
1
1
|
module GovukVisuallyHiddenHelper
|
2
|
-
def govuk_visually_hidden(text = nil,
|
3
|
-
|
2
|
+
def govuk_visually_hidden(text = nil, &block)
|
3
|
+
return if text.blank? && block.nil?
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
visually_hidden_class = focusable ? "govuk-visually-hidden-focusable" : "govuk-visually-hidden"
|
8
|
-
|
9
|
-
tag.span(content, class: visually_hidden_class)
|
5
|
+
tag.span(text, class: "govuk-visually-hidden", &block)
|
10
6
|
end
|
11
7
|
end
|
12
8
|
|
13
|
-
ActiveSupport.on_load(:action_view) { include
|
9
|
+
ActiveSupport.on_load(:action_view) { include GovukVisuallyHiddenHelper }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk-components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.0b2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DfE developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html-attributes-utils
|