govuk_design_system_formbuilder 5.5.0 → 5.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/govuk_design_system_formbuilder/builder.rb +14 -0
- data/lib/govuk_design_system_formbuilder/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f8b3583b01c240eacb06312fdc20708460ca82f5c389e8f4ebb2648ace0338b
|
4
|
+
data.tar.gz: f2195f52e78ae2fd6e76a2b1631f65e23fbeaca9150ade2088b30a5ff736f12b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e1bbab516d81a51d841d52e0d731c9bc1fac4bdf70aaf0b73f328ff54e47dbf2d585cc2f2dd8254e92564830eded40ca37061324fcd027b1e4cdca00bcc21d
|
7
|
+
data.tar.gz: c258eaad59ce2f4c9042a6c698a90faad07d26f08f4a96665417086af096d3eaecf1e1ad2c62c12aad459e652fc5f40b8ff7fa5326a347eb06395e5e14841649
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
[](https://rubygems.org/gems/govuk_design_system_formbuilder)
|
7
7
|
[](https://codeclimate.com/github/x-govuk/govuk-form-builder/test_coverage)
|
8
8
|
[](https://github.com/x-govuk/govuk-form-builder/blob/main/LICENSE)
|
9
|
-
[](https://design-system.service.gov.uk)
|
10
10
|
[](https://weblog.rubyonrails.org/releases/)
|
11
11
|
[](https://www.ruby-lang.org/en/downloads/)
|
12
12
|
|
@@ -2,6 +2,20 @@ module GOVUKDesignSystemFormBuilder
|
|
2
2
|
module Builder
|
3
3
|
delegate :config, to: GOVUKDesignSystemFormBuilder
|
4
4
|
|
5
|
+
# Generates a form label without a form group or input
|
6
|
+
# @param text [String] the label text
|
7
|
+
# @param size [String] the size of the label font, can be +xl+, +l+, +m+, +s+ or nil
|
8
|
+
# @param tag [Symbol,String] the label's wrapper tag, intended to allow labels to act as page headings
|
9
|
+
# @param hidden [Boolean] control the visability of the label. Hidden labels will stil be read by screenreaders
|
10
|
+
# @param kwargs [Hash] additional arguments are applied as attributes on the +label+ element
|
11
|
+
#
|
12
|
+
# @example A standalone label for the name field
|
13
|
+
# = f.govuk_label :name, text: 'Full name', size: 'l', caption: { text: 'It must match your driving licence' }
|
14
|
+
#
|
15
|
+
def govuk_label(attribute_name, text: nil, size: nil, hidden: false, tag: nil, caption: nil, **kwargs)
|
16
|
+
GOVUKDesignSystemFormBuilder::Elements::Label.new(self, object_name, attribute_name, text:, size:, hidden:, tag:, caption:, **kwargs).html
|
17
|
+
end
|
18
|
+
|
5
19
|
# Generates a input of type +text+
|
6
20
|
#
|
7
21
|
# @param attribute_name [Symbol] The name of the attribute
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_design_system_formbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Yates
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html-attributes-utils
|
@@ -260,14 +260,14 @@ dependencies:
|
|
260
260
|
requirements:
|
261
261
|
- - "~>"
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version: 0.
|
263
|
+
version: 0.28.0
|
264
264
|
type: :development
|
265
265
|
prerelease: false
|
266
266
|
version_requirements: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
268
|
- - "~>"
|
269
269
|
- !ruby/object:Gem::Version
|
270
|
-
version: 0.
|
270
|
+
version: 0.28.0
|
271
271
|
- !ruby/object:Gem::Dependency
|
272
272
|
name: webrick
|
273
273
|
requirement: !ruby/object:Gem::Requirement
|