govuk_design_system_formbuilder 5.4.1 → 5.6.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: 3299c9f686e4099e6dab96d686e3416ce9bb3a001608e85301226dcefd5c9767
|
4
|
+
data.tar.gz: a259a45ace3b0636d31d46b1c6a5761725ace90a5c95866bf780e3d83e009cbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 630d4c73d5995589c62e07dc985d0409ad9bda46802193fadd31f8b39c692020180beaf308cdb50570590a9a9e8ad32feaba8201950325b144188d912211ad66
|
7
|
+
data.tar.gz: 529c6af1caaa85edcc1bc888145ce268b153b346dcd27212dde8dfc322a685d2187393a1847dd5f3632876a0b4a24cdb8bf755034d1c71fca42e05eba7b57fb2
|
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.6.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-09-06 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
|