govuk_design_system_formbuilder 2.0.0 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f87c2ecd9fbd0615a3061159d7e87b42254115db22f59c260a6e4209f7ff742d
4
- data.tar.gz: a167bde412b2158d9ed303af32e730d5ae27876b1ac4ee80d675b9bc81d15126
3
+ metadata.gz: 2b243fcaf512a7b1edd2455a06cb36368db533c9aa76661fc907d8725a916ecc
4
+ data.tar.gz: 2ac392952f097e0730dc1d10b4b159d273a17335682ddcf8c8a5d589c7d0e53f
5
5
  SHA512:
6
- metadata.gz: 4d184b3fa9ed93c35ea9ef15a72bf79f3520632fd3f501d93cc089a2e4b4e73fb73c2078083a9e0785f812802f2b406c972b568033148c9875bf1c4906ee9122
7
- data.tar.gz: 3462d38207e9220b41bc3bc899d5218bc9ef982e609e2c96f58abbe0d8d20d9e9bd515b1be4566f77b37a4b543e0929a02fd9fa18bb0001815067aa0e6b07ea9
6
+ metadata.gz: b4ff3afdcc29348497365e6e04f4a2848c9db92e57fe6db4098a011d5cefd00e3f0a6e38240e7eb4b5776b79a29f36f64785bbfdeb0181b9efed8d5c46813359
7
+ data.tar.gz: 28c9f927dbfbe0b7176184ececf28c6de7ad229613728f7e57d5aed9d5f93c2d49d2d81ff474bad47a809a85dd847a4658d0af9695cdfa5a10a9705272ed926c
@@ -21,7 +21,7 @@ module GOVUKDesignSystemFormBuilder
21
21
  # Can be either +xl+, +l+, +m+ or +s+.
22
22
  #
23
23
  # * +:default_legend_tag+ controls the default tag that legends are
24
- # wrapped in. Defaults to +h1+.
24
+ # wrapped in. Defaults to +nil+.
25
25
  #
26
26
  # * +:default_submit_button_text+ sets the value assigned to +govuk_submit+,
27
27
  # defaults to 'Continue'.
@@ -47,7 +47,7 @@ module GOVUKDesignSystemFormBuilder
47
47
  brand: 'govuk',
48
48
 
49
49
  default_legend_size: 'm',
50
- default_legend_tag: 'h1',
50
+ default_legend_tag: nil,
51
51
  default_caption_size: 'm',
52
52
  default_submit_button_text: 'Continue',
53
53
  default_radio_divider_text: 'or',
@@ -459,7 +459,7 @@ module GOVUKDesignSystemFormBuilder
459
459
  # @param classes [Array,String] Classes to add to the radio button container.
460
460
  # @option legend text [String] the fieldset legend's text content
461
461
  # @option legend size [String] the size of the fieldset legend font, can be +xl+, +l+, +m+ or +s+
462
- # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+
462
+ # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+.
463
463
  # @option legend hidden [Boolean] control the visibility of the legend. Hidden legends will still be read by screenreaders
464
464
  # @option legend kwargs [Hash] additional arguments are applied as attributes on the +legend+ element
465
465
  # @param caption [Hash] configures or sets the caption content which is inserted above the legend
@@ -538,7 +538,7 @@ module GOVUKDesignSystemFormBuilder
538
538
  # @param small [Boolean] controls whether small radio buttons are used instead of regular-sized ones
539
539
  # @option legend text [String] the fieldset legend's text content
540
540
  # @option legend size [String] the size of the fieldset legend font, can be +xl+, +l+, +m+ or +s+
541
- # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+
541
+ # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+.
542
542
  # @option legend hidden [Boolean] control the visibility of the legend. Hidden legends will still be read by screenreaders
543
543
  # @option legend kwargs [Hash] additional arguments are applied as attributes on the +legend+ element
544
544
  # @param caption [Hash] configures or sets the caption content which is inserted above the legend
@@ -635,7 +635,7 @@ module GOVUKDesignSystemFormBuilder
635
635
  # @param legend [NilClass,Hash,Proc] options for configuring the legend. Legend will be omitted if +nil+.
636
636
  # @option legend text [String] the fieldset legend's text content
637
637
  # @option legend size [String] the size of the fieldset legend font, can be +xl+, +l+, +m+ or +s+
638
- # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+
638
+ # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+.
639
639
  # @option legend hidden [Boolean] control the visibility of the legend. Hidden legends will still be read by screenreaders
640
640
  # @param caption [Hash] configures or sets the caption content which is inserted above the legend
641
641
  # @option caption text [String] the caption text
@@ -713,7 +713,7 @@ module GOVUKDesignSystemFormBuilder
713
713
  # @param legend [NilClass,Hash,Proc] options for configuring the legend. Legend will be omitted if +nil+.
714
714
  # @option legend text [String] the fieldset legend's text content
715
715
  # @option legend size [String] the size of the fieldset legend font, can be +xl+, +l+, +m+ or +s+
716
- # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+
716
+ # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+.
717
717
  # @option legend hidden [Boolean] control the visibility of the legend. Hidden legends will still be read by screenreaders
718
718
  # @option legend kwargs [Hash] additional arguments are applied as attributes on the +legend+ element
719
719
  # @param caption [Hash] configures or sets the caption content which is inserted above the legend
@@ -816,6 +816,8 @@ module GOVUKDesignSystemFormBuilder
816
816
  # @return [ActiveSupport::SafeBuffer] HTML output
817
817
  # @note Only the first additional button or link (passed in via a block) will be given the
818
818
  # correct left margin, subsequent buttons will need to be manually accounted for
819
+ # @note This helper always renders an +<input type='submit'>+ tag, HTML content is not supported inside. You
820
+ # can place +<button>+ tags inside the form to have the same effect
819
821
  # @see https://design-system.service.gov.uk/components/button/#stop-users-from-accidentally-sending-information-more-than-once
820
822
  # GOV.UK double click prevention
821
823
  #
@@ -840,7 +842,7 @@ module GOVUKDesignSystemFormBuilder
840
842
  # @param legend [NilClass,Hash,Proc] options for configuring the legend. Legend will be omitted if +nil+.
841
843
  # @option legend text [String] the fieldset legend's text content
842
844
  # @option legend size [String] the size of the fieldset legend font, can be +xl+, +l+, +m+ or +s+
843
- # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+
845
+ # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+.
844
846
  # @option legend hidden [Boolean] control the visibility of the legend. Hidden legends will still be read by screenreaders
845
847
  # @option legend kwargs [Hash] additional arguments are applied as attributes on the +legend+ element
846
848
  # @param caption [Hash] configures or sets the caption content which is inserted above the legend
@@ -878,13 +880,18 @@ module GOVUKDesignSystemFormBuilder
878
880
  # part of the form that contains the error
879
881
  #
880
882
  # @param title [String] the error summary heading
883
+ # @param link_base_errors_to [Symbol,String] set the field that errors on +:base+ are linked
884
+ # to, as there won't be a field representing the object base.
885
+ #
886
+ # @note Only the first error in the +#errors+ array for each attribute will
887
+ # be included.
881
888
  #
882
889
  # @example An error summary with a custom title
883
890
  # = f.govuk_error_summary 'Uh-oh, spaghettios'
884
891
  #
885
892
  # @see https://design-system.service.gov.uk/components/error-summary/ GOV.UK error summary
886
- def govuk_error_summary(title = config.default_error_summary_title)
887
- Elements::ErrorSummary.new(self, object_name, title).html
893
+ def govuk_error_summary(title = config.default_error_summary_title, link_base_errors_to: nil)
894
+ Elements::ErrorSummary.new(self, object_name, title, link_base_errors_to: link_base_errors_to).html
888
895
  end
889
896
 
890
897
  # Generates a fieldset containing the contents of the block
@@ -893,7 +900,7 @@ module GOVUKDesignSystemFormBuilder
893
900
  # @param described_by [Array<String>] the ids of the elements that describe this fieldset, usually hints and errors
894
901
  # @option legend text [String] the fieldset legend's text content
895
902
  # @option legend size [String] the size of the fieldset legend font, can be +xl+, +l+, +m+ or +s+
896
- # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+
903
+ # @option legend tag [Symbol,String] the tag used for the fieldset's header, defaults to +h1+.
897
904
  # @option legend hidden [Boolean] control the visibility of the legend. Hidden legends will still be read by screenreaders
898
905
  # @option legend kwargs [Hash] additional arguments are applied as attributes on the +legend+ element
899
906
  # @param caption [Hash] configures or sets the caption content which is inserted above the label
@@ -902,13 +909,13 @@ module GOVUKDesignSystemFormBuilder
902
909
  # @option caption kwargs [Hash] additional arguments are applied as attributes on the caption +span+ element
903
910
  #
904
911
  # @example A fieldset containing address fields
905
- # = f.govuk_fieldset legend: { text: 'Address' }
912
+ # = f.govuk_fieldset legend: { text: 'Address' } do
906
913
  # = f.govuk_text_field :street
907
914
  # = f.govuk_text_field :town
908
915
  # = f.govuk_text_field :city
909
916
  #
910
917
  # @example A fieldset with the legend as a proc
911
- # = f.govuk_fieldset legend: -> { tag.h3('Skills') }
918
+ # = f.govuk_fieldset legend: -> { tag.h3('Skills') } do
912
919
  # = f.govuk_text_area :physical
913
920
  # = f.govuk_text_area :mental
914
921
  #
@@ -30,11 +30,22 @@ module GOVUKDesignSystemFormBuilder
30
30
  end
31
31
 
32
32
  def legend_element
33
- @legend_element ||= Elements::Legend.new(@builder, @object_name, @attribute_name, **legend_options)
33
+ @legend_element ||= if @legend.nil?
34
+ Elements::Null.new
35
+ else
36
+ Elements::Legend.new(@builder, @object_name, @attribute_name, **legend_options)
37
+ end
34
38
  end
35
39
 
36
40
  def legend_options
37
- { legend: @legend, caption: @caption }
41
+ case @legend
42
+ when Hash
43
+ @legend.merge(caption: @caption)
44
+ when Proc
45
+ { content: @legend }
46
+ else
47
+ fail(ArgumentError, %(legend must be a Proc or Hash))
48
+ end
38
49
  end
39
50
  end
40
51
  end
@@ -6,6 +6,7 @@ module GOVUKDesignSystemFormBuilder
6
6
 
7
7
  include Traits::Label
8
8
  include Traits::Hint
9
+ include Traits::FieldsetItem
9
10
  include Traits::Conditional
10
11
 
11
12
  def initialize(builder, object_name, attribute_name, value, unchecked_value, label:, hint:, link_errors:, multiple:, &block)
@@ -54,19 +55,7 @@ module GOVUKDesignSystemFormBuilder
54
55
  %w(checkboxes__input).prefix(brand)
55
56
  end
56
57
 
57
- def label_element
58
- @label_element ||= Elements::Label.new(@builder, @object_name, @attribute_name, **label_content, **label_options)
59
- end
60
-
61
- def label_options
62
- { checkbox: true, value: @value, link_errors: @link_errors }
63
- end
64
-
65
- def hint_element
66
- @hint_element ||= Elements::Hint.new(@builder, @object_name, @attribute_name, **hint_options, **hint_content)
67
- end
68
-
69
- def hint_options
58
+ def fieldset_options
70
59
  { checkbox: true }
71
60
  end
72
61
 
@@ -3,10 +3,11 @@ module GOVUKDesignSystemFormBuilder
3
3
  class ErrorSummary < Base
4
4
  include Traits::Error
5
5
 
6
- def initialize(builder, object_name, title)
7
- @builder = builder
8
- @object_name = object_name
9
- @title = title
6
+ def initialize(builder, object_name, title, link_base_errors_to:)
7
+ @builder = builder
8
+ @object_name = object_name
9
+ @title = title
10
+ @link_base_errors_to = link_base_errors_to
10
11
  end
11
12
 
12
13
  def html
@@ -54,7 +55,11 @@ module GOVUKDesignSystemFormBuilder
54
55
  end
55
56
 
56
57
  def field_id(attribute)
57
- build_id('field-error', attribute_name: attribute)
58
+ if attribute.eql?(:base) && @link_base_errors_to.present?
59
+ build_id('field', attribute_name: @link_base_errors_to)
60
+ else
61
+ build_id('field-error', attribute_name: attribute)
62
+ end
58
63
  end
59
64
 
60
65
  def summary_title_id
@@ -25,7 +25,7 @@ module GOVUKDesignSystemFormBuilder
25
25
  end
26
26
 
27
27
  def html
28
- return nil unless active?
28
+ return unless active?
29
29
 
30
30
  content_tag(hint_tag, **hint_options, **@html_attributes) { hint_body }
31
31
  end
@@ -4,46 +4,45 @@ module GOVUKDesignSystemFormBuilder
4
4
  include Traits::Caption
5
5
  include Traits::Localisation
6
6
 
7
- def initialize(builder, object_name, attribute_name, legend:, caption:, **kwargs)
7
+ def initialize(builder, object_name, attribute_name, text: nil, size: config.default_legend_size, hidden: false, tag: config.default_legend_tag, caption: nil, content: nil, **kwargs)
8
8
  super(builder, object_name, attribute_name)
9
9
 
10
- @html_attributes = kwargs
11
-
12
- case legend
13
- when NilClass
14
- @active = false
15
- when Proc
16
- @raw = capture { legend.call }
17
- when Hash
18
- defaults.merge(legend).tap do |l|
19
- @text = retrieve_text(l.dig(:text))
20
- @hidden = l.dig(:hidden)
21
- @tag = l.dig(:tag)
22
- @size = l.dig(:size)
23
- @caption = caption
24
- end
10
+ if content
11
+ @content = capture { content.call }
25
12
  else
26
- fail(ArgumentError, %(legend must be a Proc or Hash))
13
+ @text = retrieve_text(text)
14
+ @tag = tag
15
+ @size_class = size_class(size)
16
+ @tag = tag
17
+ @caption = caption
18
+ @hidden = hidden
19
+ @html_attributes = kwargs
27
20
  end
28
21
  end
29
22
 
30
23
  def html
31
- @raw || content
24
+ @content || legend
32
25
  end
33
26
 
34
27
  private
35
28
 
36
29
  def active?
37
- [@text, @raw].any?(&:present?)
30
+ [@text, @content].any?(&:present?)
31
+ end
32
+
33
+ def legend
34
+ return unless active?
35
+
36
+ tag.legend(legend_content, class: classes, **@html_attributes)
38
37
  end
39
38
 
40
- def content
41
- return nil unless active?
39
+ def legend_content
40
+ caption_and_text = safe_join([caption_element, @text])
42
41
 
43
- tag.legend(class: classes, **@html_attributes) do
44
- content_tag(@tag, class: heading_classes) do
45
- safe_join([caption_element, @text])
46
- end
42
+ if @tag.present?
43
+ content_tag(@tag, class: heading_classes) { caption_and_text }
44
+ else
45
+ caption_and_text
47
46
  end
48
47
  end
49
48
 
@@ -52,17 +51,14 @@ module GOVUKDesignSystemFormBuilder
52
51
  end
53
52
 
54
53
  def classes
55
- [%(#{brand}-fieldset__legend), size_class, visually_hidden_class].compact
54
+ [%(#{brand}-fieldset__legend), @size_class, visually_hidden_class].compact
56
55
  end
57
56
 
58
- def size_class
59
- case @size
60
- when 'xl' then %(#{brand}-fieldset__legend--xl)
61
- when 'l' then %(#{brand}-fieldset__legend--l)
62
- when 'm' then %(#{brand}-fieldset__legend--m)
63
- when 's' then %(#{brand}-fieldset__legend--s)
57
+ def size_class(size)
58
+ if size.in?(%w(xl l m s))
59
+ %(#{brand}-fieldset__legend--#{size})
64
60
  else
65
- fail "invalid size '#{@size}', must be xl, l, m or s"
61
+ fail "invalid size '#{size}', must be xl, l, m or s"
66
62
  end
67
63
  end
68
64
 
@@ -73,15 +69,6 @@ module GOVUKDesignSystemFormBuilder
73
69
  def heading_classes
74
70
  %(#{brand}-fieldset__heading)
75
71
  end
76
-
77
- def defaults
78
- {
79
- hidden: false,
80
- text: nil,
81
- tag: config.default_legend_tag,
82
- size: config.default_legend_size
83
- }
84
- end
85
72
  end
86
73
  end
87
74
  end
@@ -0,0 +1,19 @@
1
+ module GOVUKDesignSystemFormBuilder
2
+ module Elements
3
+ class Null < Base
4
+ def initialize; end
5
+
6
+ def html
7
+ nil
8
+ end
9
+
10
+ def active?
11
+ false
12
+ end
13
+
14
+ def hint_id
15
+ nil
16
+ end
17
+ end
18
+ end
19
+ end
@@ -6,6 +6,7 @@ module GOVUKDesignSystemFormBuilder
6
6
 
7
7
  include Traits::Label
8
8
  include Traits::Hint
9
+ include Traits::FieldsetItem
9
10
  include Traits::Conditional
10
11
 
11
12
  def initialize(builder, object_name, attribute_name, value, label:, hint:, link_errors:, &block)
@@ -34,26 +35,10 @@ module GOVUKDesignSystemFormBuilder
34
35
  end
35
36
  end
36
37
 
37
- def radio_options
38
+ def fieldset_options
38
39
  { radio: true }
39
40
  end
40
41
 
41
- def label_element
42
- @label_element ||= Elements::Label.new(@builder, @object_name, @attribute_name, **label_content, **label_options)
43
- end
44
-
45
- def label_options
46
- { value: @value, link_errors: @link_errors }.merge(radio_options)
47
- end
48
-
49
- def hint_element
50
- @hint_element ||= Elements::Hint.new(@builder, @object_name, @attribute_name, **hint_options, **hint_content)
51
- end
52
-
53
- def hint_options
54
- { value: @value }.merge(radio_options)
55
- end
56
-
57
42
  def input
58
43
  @builder.radio_button(@attribute_name, @value, **options)
59
44
  end
@@ -4,11 +4,11 @@ module GOVUKDesignSystemFormBuilder
4
4
  private
5
5
 
6
6
  def caption_element
7
- @caption_element ||= Elements::Caption.new(@builder, @object_name, @attribute_name, **caption_options)
8
- end
9
-
10
- def caption_options
11
- @caption
7
+ @caption_element ||= if @caption.nil?
8
+ Elements::Null.new
9
+ else
10
+ Elements::Caption.new(@builder, @object_name, @attribute_name, **@caption)
11
+ end
12
12
  end
13
13
  end
14
14
  end
@@ -0,0 +1,31 @@
1
+ module GOVUKDesignSystemFormBuilder
2
+ module Traits
3
+ module FieldsetItem
4
+ private
5
+
6
+ def label_element
7
+ @label_element ||= if @label.nil?
8
+ Elements::Null.new
9
+ else
10
+ Elements::Label.new(@builder, @object_name, @attribute_name, **label_content, **label_options)
11
+ end
12
+ end
13
+
14
+ def label_options
15
+ { value: @value, link_errors: @link_errors }.merge(fieldset_options)
16
+ end
17
+
18
+ def hint_element
19
+ @hint_element ||= if @hint.nil?
20
+ Elements::Null.new
21
+ else
22
+ Elements::Hint.new(@builder, @object_name, @attribute_name, **hint_options, **hint_content)
23
+ end
24
+ end
25
+
26
+ def hint_options
27
+ { value: @value }.merge(fieldset_options)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -10,13 +10,15 @@ module GOVUKDesignSystemFormBuilder
10
10
  private
11
11
 
12
12
  def hint_element
13
- @hint_element ||= Elements::Hint.new(@builder, @object_name, @attribute_name, **hint_content)
13
+ @hint_element ||= if @hint.nil?
14
+ Elements::Null.new
15
+ else
16
+ Elements::Hint.new(@builder, @object_name, @attribute_name, **hint_content)
17
+ end
14
18
  end
15
19
 
16
20
  def hint_content
17
21
  case @hint
18
- when NilClass
19
- {}
20
22
  when Hash
21
23
  @hint
22
24
  when Proc
@@ -4,7 +4,11 @@ module GOVUKDesignSystemFormBuilder
4
4
  private
5
5
 
6
6
  def label_element
7
- @label_element ||= Elements::Label.new(@builder, @object_name, @attribute_name, caption: @caption, **label_content)
7
+ @label_element ||= if @label.nil?
8
+ Elements::Null.new
9
+ else
10
+ Elements::Label.new(@builder, @object_name, @attribute_name, caption: @caption, **label_content)
11
+ end
8
12
  end
9
13
 
10
14
  def label_content
@@ -1,3 +1,3 @@
1
1
  module GOVUKDesignSystemFormBuilder
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.4'.freeze
3
3
  end
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: 2.0.0
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Yates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-27 00:00:00.000000000 Z
11
+ date: 2020-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.17.0
61
+ version: 3.17.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 3.17.0
68
+ version: 3.17.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: 3.22.0
179
+ version: 3.24.0
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: 3.22.0
186
+ version: 3.24.0
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: rubypants
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -278,6 +278,7 @@ files:
278
278
  - lib/govuk_design_system_formbuilder/elements/inputs/url.rb
279
279
  - lib/govuk_design_system_formbuilder/elements/label.rb
280
280
  - lib/govuk_design_system_formbuilder/elements/legend.rb
281
+ - lib/govuk_design_system_formbuilder/elements/null.rb
281
282
  - lib/govuk_design_system_formbuilder/elements/radios/collection.rb
282
283
  - lib/govuk_design_system_formbuilder/elements/radios/collection_radio_button.rb
283
284
  - lib/govuk_design_system_formbuilder/elements/radios/fieldset_radio_button.rb
@@ -288,6 +289,7 @@ files:
288
289
  - lib/govuk_design_system_formbuilder/traits/collection_item.rb
289
290
  - lib/govuk_design_system_formbuilder/traits/conditional.rb
290
291
  - lib/govuk_design_system_formbuilder/traits/error.rb
292
+ - lib/govuk_design_system_formbuilder/traits/fieldset_item.rb
291
293
  - lib/govuk_design_system_formbuilder/traits/hint.rb
292
294
  - lib/govuk_design_system_formbuilder/traits/input.rb
293
295
  - lib/govuk_design_system_formbuilder/traits/label.rb