ccs-frontend_helpers 2.1.0 → 2.3.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.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -4
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +23 -1
  5. data/Gemfile +5 -5
  6. data/Gemfile.lock +109 -100
  7. data/README.md +2 -0
  8. data/bun.lock +18 -0
  9. data/ccs-frontend_helpers.gemspec +2 -2
  10. data/lib/ccs/components/ccs/contact_us.rb +2 -2
  11. data/lib/ccs/components/ccs/dashboard_section/panel.rb +2 -2
  12. data/lib/ccs/components/ccs/dashboard_section.rb +2 -2
  13. data/lib/ccs/components/ccs/footer/link.rb +2 -2
  14. data/lib/ccs/components/ccs/footer.rb +2 -2
  15. data/lib/ccs/components/ccs/header/link.rb +23 -5
  16. data/lib/ccs/components/ccs/header.rb +2 -2
  17. data/lib/ccs/components/ccs/password_strength.rb +2 -2
  18. data/lib/ccs/components/govuk/back_link.rb +2 -2
  19. data/lib/ccs/components/govuk/breadcrumbs/link.rb +2 -2
  20. data/lib/ccs/components/govuk/breadcrumbs.rb +2 -2
  21. data/lib/ccs/components/govuk/button.rb +2 -2
  22. data/lib/ccs/components/govuk/cookie_banner/action.rb +2 -2
  23. data/lib/ccs/components/govuk/cookie_banner/message.rb +2 -2
  24. data/lib/ccs/components/govuk/cookie_banner.rb +2 -2
  25. data/lib/ccs/components/govuk/details.rb +2 -2
  26. data/lib/ccs/components/govuk/error_message.rb +2 -2
  27. data/lib/ccs/components/govuk/error_summary/item.rb +2 -2
  28. data/lib/ccs/components/govuk/error_summary.rb +2 -2
  29. data/lib/ccs/components/govuk/field/input/character_count.rb +2 -0
  30. data/lib/ccs/components/govuk/field/input/file_upload.rb +60 -4
  31. data/lib/ccs/components/govuk/field/input/select.rb +2 -2
  32. data/lib/ccs/components/govuk/field/input/text_input/fix.rb +2 -2
  33. data/lib/ccs/components/govuk/field/input/text_input.rb +2 -2
  34. data/lib/ccs/components/govuk/field/input/textarea.rb +2 -2
  35. data/lib/ccs/components/govuk/field/inputs/checkboxes.rb +2 -2
  36. data/lib/ccs/components/govuk/field/inputs/item/checkbox.rb +2 -2
  37. data/lib/ccs/components/govuk/field/inputs/item/radio.rb +2 -2
  38. data/lib/ccs/components/govuk/field/inputs/item.rb +2 -2
  39. data/lib/ccs/components/govuk/field/inputs/radios.rb +2 -2
  40. data/lib/ccs/components/govuk/field/inputs.rb +1 -1
  41. data/lib/ccs/components/govuk/field.rb +2 -2
  42. data/lib/ccs/components/govuk/fieldset/legend.rb +2 -2
  43. data/lib/ccs/components/govuk/fieldset.rb +2 -2
  44. data/lib/ccs/components/govuk/footer/link.rb +2 -2
  45. data/lib/ccs/components/govuk/footer.rb +2 -2
  46. data/lib/ccs/components/govuk/form_group.rb +2 -2
  47. data/lib/ccs/components/govuk/header/link.rb +2 -2
  48. data/lib/ccs/components/govuk/header.rb +2 -2
  49. data/lib/ccs/components/govuk/hint.rb +2 -2
  50. data/lib/ccs/components/govuk/inset_text.rb +2 -2
  51. data/lib/ccs/components/govuk/label.rb +2 -2
  52. data/lib/ccs/components/govuk/notification_banner.rb +2 -2
  53. data/lib/ccs/components/govuk/pagination/increment/next.rb +2 -2
  54. data/lib/ccs/components/govuk/pagination/increment/previous.rb +2 -2
  55. data/lib/ccs/components/govuk/pagination/increment.rb +2 -2
  56. data/lib/ccs/components/govuk/pagination/item/form.rb +2 -2
  57. data/lib/ccs/components/govuk/pagination/item/tag.rb +2 -2
  58. data/lib/ccs/components/govuk/pagination/item.rb +2 -2
  59. data/lib/ccs/components/govuk/pagination.rb +2 -2
  60. data/lib/ccs/components/govuk/panel.rb +2 -2
  61. data/lib/ccs/components/govuk/phase_banner.rb +2 -2
  62. data/lib/ccs/components/govuk/service_navigation.rb +2 -2
  63. data/lib/ccs/components/govuk/skip_link.rb +2 -2
  64. data/lib/ccs/components/govuk/step_by_step_navigation.rb +2 -2
  65. data/lib/ccs/components/govuk/summary_list/action/link.rb +2 -2
  66. data/lib/ccs/components/govuk/summary_list/card/actions.rb +2 -2
  67. data/lib/ccs/components/govuk/summary_list/card/title.rb +2 -2
  68. data/lib/ccs/components/govuk/summary_list/card.rb +2 -2
  69. data/lib/ccs/components/govuk/summary_list/row/actions.rb +2 -2
  70. data/lib/ccs/components/govuk/summary_list/row/key.rb +2 -2
  71. data/lib/ccs/components/govuk/summary_list/row/value.rb +2 -2
  72. data/lib/ccs/components/govuk/summary_list/row.rb +2 -2
  73. data/lib/ccs/components/govuk/summary_list.rb +2 -2
  74. data/lib/ccs/components/govuk/table/body/data_cell.rb +2 -2
  75. data/lib/ccs/components/govuk/table/body/head_cell.rb +2 -2
  76. data/lib/ccs/components/govuk/table/header/head_cell.rb +2 -2
  77. data/lib/ccs/components/govuk/table.rb +2 -2
  78. data/lib/ccs/components/govuk/tabs/panel.rb +2 -2
  79. data/lib/ccs/components/govuk/tabs/tab.rb +2 -2
  80. data/lib/ccs/components/govuk/tabs.rb +2 -2
  81. data/lib/ccs/components/govuk/tag.rb +2 -2
  82. data/lib/ccs/components/govuk/task_list/item/status.rb +2 -2
  83. data/lib/ccs/components/govuk/task_list/item/title.rb +2 -2
  84. data/lib/ccs/components/govuk/task_list/item.rb +2 -2
  85. data/lib/ccs/components/govuk/task_list.rb +2 -2
  86. data/lib/ccs/components/govuk/warning_text.rb +2 -2
  87. data/lib/ccs/frontend_helpers/ccs_frontend/contact_us.rb +2 -2
  88. data/lib/ccs/frontend_helpers/ccs_frontend/dashboard_section.rb +2 -2
  89. data/lib/ccs/frontend_helpers/ccs_frontend/footer.rb +2 -2
  90. data/lib/ccs/frontend_helpers/ccs_frontend/header.rb +2 -2
  91. data/lib/ccs/frontend_helpers/ccs_frontend/password_strength.rb +2 -2
  92. data/lib/ccs/frontend_helpers/govuk_frontend/accordion.rb +2 -2
  93. data/lib/ccs/frontend_helpers/govuk_frontend/back_link.rb +2 -2
  94. data/lib/ccs/frontend_helpers/govuk_frontend/breadcrumbs.rb +2 -2
  95. data/lib/ccs/frontend_helpers/govuk_frontend/button.rb +2 -2
  96. data/lib/ccs/frontend_helpers/govuk_frontend/character_count.rb +2 -2
  97. data/lib/ccs/frontend_helpers/govuk_frontend/checkboxes.rb +2 -2
  98. data/lib/ccs/frontend_helpers/govuk_frontend/cookie_banner.rb +2 -2
  99. data/lib/ccs/frontend_helpers/govuk_frontend/date_input.rb +2 -2
  100. data/lib/ccs/frontend_helpers/govuk_frontend/details.rb +2 -2
  101. data/lib/ccs/frontend_helpers/govuk_frontend/error_message.rb +4 -4
  102. data/lib/ccs/frontend_helpers/govuk_frontend/error_summary.rb +4 -4
  103. data/lib/ccs/frontend_helpers/govuk_frontend/exit_this_page.rb +2 -2
  104. data/lib/ccs/frontend_helpers/govuk_frontend/fieldset.rb +2 -2
  105. data/lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb +2 -2
  106. data/lib/ccs/frontend_helpers/govuk_frontend/footer.rb +2 -2
  107. data/lib/ccs/frontend_helpers/govuk_frontend/header.rb +2 -2
  108. data/lib/ccs/frontend_helpers/govuk_frontend/hint.rb +2 -2
  109. data/lib/ccs/frontend_helpers/govuk_frontend/input.rb +2 -2
  110. data/lib/ccs/frontend_helpers/govuk_frontend/inset_text.rb +2 -2
  111. data/lib/ccs/frontend_helpers/govuk_frontend/label.rb +2 -2
  112. data/lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb +2 -2
  113. data/lib/ccs/frontend_helpers/govuk_frontend/pagination.rb +2 -2
  114. data/lib/ccs/frontend_helpers/govuk_frontend/panel.rb +2 -2
  115. data/lib/ccs/frontend_helpers/govuk_frontend/password_input.rb +2 -2
  116. data/lib/ccs/frontend_helpers/govuk_frontend/phase_banner.rb +2 -2
  117. data/lib/ccs/frontend_helpers/govuk_frontend/radios.rb +2 -2
  118. data/lib/ccs/frontend_helpers/govuk_frontend/select.rb +2 -2
  119. data/lib/ccs/frontend_helpers/govuk_frontend/service_navigation.rb +2 -2
  120. data/lib/ccs/frontend_helpers/govuk_frontend/skip_link.rb +2 -2
  121. data/lib/ccs/frontend_helpers/govuk_frontend/step_by_step_navigation.rb +2 -2
  122. data/lib/ccs/frontend_helpers/govuk_frontend/summary_list.rb +2 -2
  123. data/lib/ccs/frontend_helpers/govuk_frontend/table.rb +2 -2
  124. data/lib/ccs/frontend_helpers/govuk_frontend/tabs.rb +2 -2
  125. data/lib/ccs/frontend_helpers/govuk_frontend/tag.rb +2 -2
  126. data/lib/ccs/frontend_helpers/govuk_frontend/task_list.rb +2 -2
  127. data/lib/ccs/frontend_helpers/govuk_frontend/textarea.rb +2 -2
  128. data/lib/ccs/frontend_helpers/govuk_frontend/warning_text.rb +2 -2
  129. data/lib/ccs/frontend_helpers/version.rb +1 -1
  130. data/package.json +2 -2
  131. metadata +7 -11
  132. data/yarn.lock +0 -13
@@ -32,8 +32,8 @@ module CCS
32
32
  # @option options [String] :classes additional CSS classes for the summary list action link HTML
33
33
  # @option options [Hash] :attributes any additional attributes that will added as part of the HTML
34
34
 
35
- def initialize(text:, href:, visually_hidden_text: nil, card_title: nil, **options)
36
- super(**options)
35
+ def initialize(text:, href:, visually_hidden_text: nil, card_title: nil, **)
36
+ super(**)
37
37
 
38
38
  @text = text
39
39
  @href = href
@@ -25,8 +25,8 @@ module CCS
25
25
  #
26
26
  # @option options [String] :classes additional CSS classes for the summary list card actions HTML
27
27
 
28
- def initialize(items:, card_title:, **options)
29
- super(**options)
28
+ def initialize(items:, card_title:, **)
29
+ super(**)
30
30
 
31
31
  @action_links = items.map { |item| Action::Link.new(context: @context, card_title: card_title, **item) }
32
32
  end
@@ -25,8 +25,8 @@ module CCS
25
25
  #
26
26
  # @option options [String] :classes additional CSS classes for the summary list card title HTML
27
27
 
28
- def initialize(text:, heading_level: '2', **options)
29
- super(**options)
28
+ def initialize(text:, heading_level: '2', **)
29
+ super(**)
30
30
 
31
31
  @text = text
32
32
  @heading_level = heading_level
@@ -30,8 +30,8 @@ module CCS
30
30
  # @option options [String] :classes additional CSS classes for the summary card HTML
31
31
  # @option options [Hash] :attributes any additional attributes that will be added as part of the HTML
32
32
 
33
- def initialize(title: nil, actions: nil, **options)
34
- super(**options)
33
+ def initialize(title: nil, actions: nil, **)
34
+ super(**)
35
35
 
36
36
  @title = Title.new(context: @context, **title) if title
37
37
  @actions = Actions.new(context: @context, card_title: title&.dig(:text), **actions) if actions
@@ -25,8 +25,8 @@ module CCS
25
25
  #
26
26
  # @option options [String] :classes additional CSS classes for the summary list row actions HTML
27
27
 
28
- def initialize(items:, card_title: nil, **options)
29
- super(**options)
28
+ def initialize(items:, card_title: nil, **)
29
+ super(**)
30
30
 
31
31
  @action_links = items.map { |item| Action::Link.new(card_title: card_title, context: @context, **item) }
32
32
  end
@@ -22,8 +22,8 @@ module CCS
22
22
  #
23
23
  # @option options [String] :classes additional CSS classes for the summary list row key HTML
24
24
 
25
- def initialize(text:, **options)
26
- super(**options)
25
+ def initialize(text:, **)
26
+ super(**)
27
27
 
28
28
  @text = text
29
29
  end
@@ -22,8 +22,8 @@ module CCS
22
22
  #
23
23
  # @option options [String] :classes additional CSS classes for the summary list row value HTML
24
24
 
25
- def initialize(text:, **options)
26
- super(**options)
25
+ def initialize(text:, **)
26
+ super(**)
27
27
 
28
28
  @text = text
29
29
  end
@@ -36,8 +36,8 @@ module CCS
36
36
  #
37
37
  # @option options [String] :classes additional CSS classes for the summary list row HTML
38
38
 
39
- def initialize(any_row_has_actions:, key:, value:, actions: nil, card_title: nil, **options)
40
- super(**options)
39
+ def initialize(any_row_has_actions:, key:, value:, actions: nil, card_title: nil, **)
40
+ super(**)
41
41
 
42
42
  actions_present = actions && actions[:items].present?
43
43
 
@@ -30,8 +30,8 @@ module CCS
30
30
  # @option options [String] :classes additional CSS classes for the summary list HTML
31
31
  # @option options [Hash] :attributes any additional attributes that will added as part of the HTML
32
32
 
33
- def initialize(summary_list_items:, card: nil, **options)
34
- super(**options)
33
+ def initialize(summary_list_items:, card: nil, **)
34
+ super(**)
35
35
 
36
36
  any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item.dig(:actions, :items).present? }
37
37
 
@@ -26,8 +26,8 @@ module CCS
26
26
  # @option options [String] :format specify format of a cell
27
27
  # @option options [Hash] :attributes ({}) any additional attributes that will be added as part of the cell
28
28
 
29
- def initialize(text:, **options)
30
- super(**options)
29
+ def initialize(text:, **)
30
+ super(**)
31
31
 
32
32
  @options[:attributes][:class] += " govuk-table__cell--#{@options[:format]}" if @options[:format]
33
33
 
@@ -25,8 +25,8 @@ module CCS
25
25
  # @option options [String] :classes additional CSS classes for the cell
26
26
  # @option options [Hash] :attributes ({}) any additional attributes that will be added as part of the cell
27
27
 
28
- def initialize(text:, **options)
29
- super(**options)
28
+ def initialize(text:, **)
29
+ super(**)
30
30
 
31
31
  @options[:attributes][:scope] = 'row'
32
32
 
@@ -26,8 +26,8 @@ module CCS
26
26
  # @option options [String] :format specify format of a cell
27
27
  # @option options [Hash] :attributes ({}) any additional attributes that will be added as part of the cell
28
28
 
29
- def initialize(text:, **options)
30
- super(**options)
29
+ def initialize(text:, **)
30
+ super(**)
31
31
 
32
32
  @options[:attributes][:class] += " govuk-table__header--#{@options[:format]}" if @options[:format]
33
33
  @options[:attributes][:scope] = 'col'
@@ -40,8 +40,8 @@ module CCS
40
40
  # @option options [String] :classes additional CSS classes for the table HTML
41
41
  # @option options [Hash] :attributes ({}) any additional attributes that will be added as part of the HTML
42
42
 
43
- def initialize(rows:, head_cells: nil, caption: nil, first_cell_is_header: nil, **options)
44
- super(**options)
43
+ def initialize(rows:, head_cells: nil, caption: nil, first_cell_is_header: nil, **)
44
+ super(**)
45
45
 
46
46
  @rows = rows.map do |row_cells|
47
47
  row_cells.map.with_index do |row_cell, index|
@@ -32,8 +32,8 @@ module CCS
32
32
  #
33
33
  # @option options [Hash] :attributes any additional attributes that will added as part of the HTML
34
34
 
35
- def initialize(index:, id_prefix:, content: nil, text: nil, **options)
36
- super(**options)
35
+ def initialize(index:, id_prefix:, content: nil, text: nil, **)
36
+ super(**)
37
37
  @options[:attributes][:class] = "govuk-tabs__panel #{'govuk-tabs__panel--hidden' if index > 1}".rstrip
38
38
  @options[:attributes][:id] ||= "#{id_prefix}-#{index}"
39
39
 
@@ -30,8 +30,8 @@ module CCS
30
30
  #
31
31
  # @option options [Hash] :attributes any additional attributes that will added as part of the HTML
32
32
 
33
- def initialize(index:, id_prefix:, label:, panel:, **options)
34
- super(**options)
33
+ def initialize(index:, id_prefix:, label:, panel:, **)
34
+ super(**)
35
35
 
36
36
  @options[:attributes][:class] = 'govuk-tabs__tab'
37
37
 
@@ -34,8 +34,8 @@ module CCS
34
34
  # @option options [String] :classes additional CSS classes for the tabs HTML
35
35
  # @option options [Hash] :attributes ({}) any additional attributes that will be added as part of the HTML
36
36
 
37
- def initialize(items:, title: nil, id_prefix: nil, **options)
38
- super(**options)
37
+ def initialize(items:, title: nil, id_prefix: nil, **)
38
+ super(**)
39
39
 
40
40
  @title = title || 'Contents'
41
41
  id_prefix ||= sanitize_to_id(@title.downcase)
@@ -27,8 +27,8 @@ module CCS
27
27
  # @option options [String] :classes additional CSS classes for the tag HTML
28
28
  # @option options [Hash] :attributes ({}) any additional attributes that will added as part of the HTML
29
29
 
30
- def initialize(text:, colour: nil, **options)
31
- super(**options)
30
+ def initialize(text:, colour: nil, **)
31
+ super(**)
32
32
  @options[:attributes][:class][..8] = "govuk-tag govuk-tag--#{colour}" if colour
33
33
 
34
34
  @text = text
@@ -31,8 +31,8 @@ module CCS
31
31
  #
32
32
  # @option options [String] :classes additional CSS classes for the task list row status HTML
33
33
 
34
- def initialize(id_prefix:, tag_options: nil, text: nil, **options)
35
- super(**options)
34
+ def initialize(id_prefix:, tag_options: nil, text: nil, **)
35
+ super(**)
36
36
  @options[:attributes][:id] = "#{id_prefix}-status"
37
37
 
38
38
  @text = text
@@ -27,8 +27,8 @@ module CCS
27
27
  #
28
28
  # @option options [String] :classes additional CSS classes for the task list item title HTML
29
29
 
30
- def initialize(text:, id_prefix:, href: nil, hint_text: nil, **options)
31
- super(**options)
30
+ def initialize(text:, id_prefix:, href: nil, hint_text: nil, **)
31
+ super(**)
32
32
  @options[:attributes][:aria] = { describedby: (hint_text ? "#{id_prefix}-hint " : '') + "#{id_prefix}-status" } if href
33
33
 
34
34
  @text = text
@@ -39,8 +39,8 @@ module CCS
39
39
  #
40
40
  # @option options [String] :classes additional CSS classes for the task list item HTML
41
41
 
42
- def initialize(title:, status:, index:, id_prefix:, hint_text: nil, **options)
43
- super(**options)
42
+ def initialize(title:, status:, index:, id_prefix:, hint_text: nil, **)
43
+ super(**)
44
44
  @options[:attributes][:class] << ' govuk-task-list__item--with-link' if title[:href]
45
45
 
46
46
  @id_prefix = "#{id_prefix}-#{index}"
@@ -27,8 +27,8 @@ module CCS
27
27
  # @option options [Sting] :id_prefix id prefix for the task list, defaults to +'task-list'+
28
28
  # @option options [Hash] :attributes any additional attributes that will added as part of the HTML
29
29
 
30
- def initialize(task_list_items:, id_prefix: nil, **options)
31
- super(**options)
30
+ def initialize(task_list_items:, id_prefix: nil, **)
31
+ super(**)
32
32
 
33
33
  @task_list_items = task_list_items.map.with_index(1) { |task_list_item, index| Item.new(context: @context, index: index, id_prefix: id_prefix || 'task-list', **task_list_item) if task_list_item.present? }
34
34
  end
@@ -26,8 +26,8 @@ module CCS
26
26
  # @option options [String] :icon_fallback_text the fallback text for the icon (default: +'Warning'+)
27
27
  # @option options [Hash] :attributes ({}) any additional attributes that will added as part of the HTML
28
28
 
29
- def initialize(text: nil, **options)
30
- super(**options)
29
+ def initialize(text: nil, **)
30
+ super(**)
31
31
 
32
32
  @text = text
33
33
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::CCS::ContactUs#render)
21
21
 
22
- def ccs_contact_us(contact_us_link_href, **options)
23
- Components::CCS::ContactUs.new(contact_us_link_href: contact_us_link_href, context: self, **options).render
22
+ def ccs_contact_us(contact_us_link_href, **)
23
+ Components::CCS::ContactUs.new(contact_us_link_href: contact_us_link_href, context: self, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -18,8 +18,8 @@ module CCS
18
18
  #
19
19
  # @return (see CCS::Components::CCS::DashboardSection#render)
20
20
 
21
- def ccs_dashboard_section(dashboard_section_panels, title_text = nil, **options)
22
- Components::CCS::DashboardSection.new(context: self, dashboard_section_panels: dashboard_section_panels, title_text: title_text, **options).render
21
+ def ccs_dashboard_section(dashboard_section_panels, title_text = nil, **)
22
+ Components::CCS::DashboardSection.new(context: self, dashboard_section_panels: dashboard_section_panels, title_text: title_text, **).render
23
23
  end
24
24
  end
25
25
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::CCS::Footer#render)
21
21
 
22
- def ccs_footer(**options)
23
- Components::CCS::Footer.new(context: self, **options).render
22
+ def ccs_footer(**)
23
+ Components::CCS::Footer.new(context: self, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::CCS::Header#render)
21
21
 
22
- def ccs_header(**options)
23
- Components::CCS::Header.new(context: self, **options).render
22
+ def ccs_header(**)
23
+ Components::CCS::Header.new(context: self, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::CCS::PasswordStrength#render)
21
21
 
22
- def ccs_password_strength(password_id, password_strength_tests, **options)
23
- Components::CCS::PasswordStrength.new(password_id: password_id, password_strength_tests: password_strength_tests, context: self, **options).render
22
+ def ccs_password_strength(password_id, password_strength_tests, **)
23
+ Components::CCS::PasswordStrength.new(password_id: password_id, password_strength_tests: password_strength_tests, context: self, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Accordion#render)
21
21
 
22
- def govuk_accordion(accordion_id, accordion_sections, **options)
23
- Components::GovUK::Accordion.new(context: self, accordion_id: accordion_id, accordion_sections: accordion_sections, **options).render
22
+ def govuk_accordion(accordion_id, accordion_sections, **)
23
+ Components::GovUK::Accordion.new(context: self, accordion_id: accordion_id, accordion_sections: accordion_sections, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::BackLink#render)
21
21
 
22
- def govuk_back_link(text, href, **options)
23
- Components::GovUK::BackLink.new(context: self, text: text, href: href, **options).render
22
+ def govuk_back_link(text, href, **)
23
+ Components::GovUK::BackLink.new(context: self, text: text, href: href, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Breadcrumbs#render)
21
21
 
22
- def govuk_breadcrumbs(breadcrumb_links, **options)
23
- Components::GovUK::Breadcrumbs.new(context: self, breadcrumb_links: breadcrumb_links, **options).render
22
+ def govuk_breadcrumbs(breadcrumb_links, **)
23
+ Components::GovUK::Breadcrumbs.new(context: self, breadcrumb_links: breadcrumb_links, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Button#render)
21
21
 
22
- def govuk_button(text, **options)
23
- Components::GovUK::Button.new(context: self, text: text, **options).render
22
+ def govuk_button(text, **)
23
+ Components::GovUK::Button.new(context: self, text: text, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Input::CharacterCount#render)
21
21
 
22
- def govuk_character_count(attribute, character_count_options = {}, **options)
23
- Components::GovUK::Field::Input::CharacterCount.new(context: self, attribute: attribute, character_count_options: character_count_options, **options).render
22
+ def govuk_character_count(attribute, character_count_options = {}, **)
23
+ Components::GovUK::Field::Input::CharacterCount.new(context: self, attribute: attribute, character_count_options: character_count_options, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Inputs::Checkboxes#render)
21
21
 
22
- def govuk_checkboxes(attribute, checkbox_items, **options)
23
- Components::GovUK::Field::Inputs::Checkboxes.new(context: self, attribute: attribute, checkbox_items: checkbox_items, **options).render
22
+ def govuk_checkboxes(attribute, checkbox_items, **)
23
+ Components::GovUK::Field::Inputs::Checkboxes.new(context: self, attribute: attribute, checkbox_items: checkbox_items, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::CookieBanner#render)
21
21
 
22
- def govuk_cookie_banner(messages, **options)
23
- Components::GovUK::CookieBanner.new(context: self, messages: messages, **options).render
22
+ def govuk_cookie_banner(messages, **)
23
+ Components::GovUK::CookieBanner.new(context: self, messages: messages, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Inputs::DateInput#render)
21
21
 
22
- def govuk_date_input(attribute, **options)
23
- Components::GovUK::Field::Inputs::DateInput.new(context: self, attribute: attribute, **options).render
22
+ def govuk_date_input(attribute, **)
23
+ Components::GovUK::Field::Inputs::DateInput.new(context: self, attribute: attribute, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -21,8 +21,8 @@ module CCS
21
21
  #
22
22
  # @return (see CCS::Components::GovUK::Details#render)
23
23
 
24
- def govuk_details(summary_text, **options, &)
25
- Components::GovUK::Details.new(context: self, summary_text: summary_text, **options).render(&)
24
+ def govuk_details(summary_text, **, &)
25
+ Components::GovUK::Details.new(context: self, summary_text: summary_text, **).render(&)
26
26
  end
27
27
  end
28
28
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::ErrorMessage#render)
21
21
 
22
- def govuk_error_message(error_message, attribute = nil, **options)
23
- Components::GovUK::ErrorMessage.new(context: self, message: error_message, attribute: attribute, **options).render
22
+ def govuk_error_message(error_message, attribute = nil, **)
23
+ Components::GovUK::ErrorMessage.new(context: self, message: error_message, attribute: attribute, **).render
24
24
  end
25
25
 
26
26
  # Generates the HTML for the GOV.UK Error message component using the error messages in an ActiveModel
@@ -34,11 +34,11 @@ module CCS
34
34
  # @return [NilClass, ActiveSupport::SafeBuffer] if the error message is not on the model it will return nil,
35
35
  # otherwise it returns the error message HTML
36
36
 
37
- def govuk_error_message_with_model(model, attribute, **options)
37
+ def govuk_error_message_with_model(model, attribute, **)
38
38
  error_message = model.errors[attribute].first
39
39
  return unless error_message
40
40
 
41
- Components::GovUK::ErrorMessage.new(context: self, message: error_message, attribute: attribute, **options).render
41
+ Components::GovUK::ErrorMessage.new(context: self, message: error_message, attribute: attribute, **).render
42
42
  end
43
43
  end
44
44
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::ErrorSummary#render)
21
21
 
22
- def govuk_error_summary(title, error_summary_items = [], description = nil, **options)
23
- Components::GovUK::ErrorSummary.new(context: self, title: title, error_summary_items: error_summary_items, description: description, **options).render
22
+ def govuk_error_summary(title, error_summary_items = [], description = nil, **)
23
+ Components::GovUK::ErrorSummary.new(context: self, title: title, error_summary_items: error_summary_items, description: description, **).render
24
24
  end
25
25
 
26
26
  # Generates the HTML for the GOV.UK Error summary component using the error messages in an ActiveModel
@@ -35,12 +35,12 @@ module CCS
35
35
  # @return [NilClass, ActiveSupport::SafeBuffer] if error messages are not on the model it will return nil,
36
36
  # otherwise it returns the error summary HTML.
37
37
 
38
- def govuk_error_summary_with_model(model, title, description = nil, **options)
38
+ def govuk_error_summary_with_model(model, title, description = nil, **)
39
39
  return if model.errors.blank?
40
40
 
41
41
  error_summary_items = model.errors.map { |error| { text: error.message, href: "##{error.attribute}-error" } }
42
42
 
43
- Components::GovUK::ErrorSummary.new(context: self, title: title, error_summary_items: error_summary_items, description: description, **options).render
43
+ Components::GovUK::ErrorSummary.new(context: self, title: title, error_summary_items: error_summary_items, description: description, **).render
44
44
  end
45
45
  end
46
46
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::ExitThisPage#render)
21
21
 
22
- def govuk_exit_this_page(text = nil, redirect_url = nil, **options)
23
- Components::GovUK::ExitThisPage.new(context: self, text: text, redirect_url: redirect_url, **options).render
22
+ def govuk_exit_this_page(text = nil, redirect_url = nil, **)
23
+ Components::GovUK::ExitThisPage.new(context: self, text: text, redirect_url: redirect_url, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -21,8 +21,8 @@ module CCS
21
21
  #
22
22
  # @return (see CCS::Components::GovUK::Fieldset#render)
23
23
 
24
- def govuk_fieldset(**options, &)
25
- Components::GovUK::Fieldset.new(context: self, **options).render(&)
24
+ def govuk_fieldset(**, &)
25
+ Components::GovUK::Fieldset.new(context: self, **).render(&)
26
26
  end
27
27
  end
28
28
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Input::FileUpload#render)
21
21
 
22
- def govuk_file_upload(attribute, **options)
23
- Components::GovUK::Field::Input::FileUpload.new(context: self, attribute: attribute, **options).render
22
+ def govuk_file_upload(attribute, **)
23
+ Components::GovUK::Field::Input::FileUpload.new(context: self, attribute: attribute, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Footer#render)
21
21
 
22
- def govuk_footer(**options)
23
- Components::GovUK::Footer.new(context: self, **options).render
22
+ def govuk_footer(**)
23
+ Components::GovUK::Footer.new(context: self, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Header#render)
21
21
 
22
- def govuk_header(**options)
23
- Components::GovUK::Header.new(context: self, **options).render
22
+ def govuk_header(**)
23
+ Components::GovUK::Header.new(context: self, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -20,8 +20,8 @@ module CCS
20
20
  #
21
21
  # @return (see CCS::Components::GovUK::Hint#render)
22
22
 
23
- def govuk_hint(text = nil, **options, &)
24
- Components::GovUK::Hint.new(context: self, text: text, **options).render(&)
23
+ def govuk_hint(text = nil, **, &)
24
+ Components::GovUK::Hint.new(context: self, text: text, **).render(&)
25
25
  end
26
26
  end
27
27
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Input::TextInput#render)
21
21
 
22
- def govuk_input(attribute, **options)
23
- Components::GovUK::Field::Input::TextInput.new(context: self, attribute: attribute, **options).render
22
+ def govuk_input(attribute, **)
23
+ Components::GovUK::Field::Input::TextInput.new(context: self, attribute: attribute, **).render
24
24
  end
25
25
  end
26
26
  end
@@ -21,8 +21,8 @@ module CCS
21
21
  #
22
22
  # @return (see CCS::Components::GovUK::InsetText#render)
23
23
 
24
- def govuk_inset_text(text = nil, **options, &)
25
- Components::GovUK::InsetText.new(context: self, text: text, **options).render(&)
24
+ def govuk_inset_text(text = nil, **, &)
25
+ Components::GovUK::InsetText.new(context: self, text: text, **).render(&)
26
26
  end
27
27
  end
28
28
  end
@@ -20,8 +20,8 @@ module CCS
20
20
  #
21
21
  # @return (see CCS::Components::GovUK::Label#render)
22
22
 
23
- def govuk_label(attribute, text = nil, **options, &)
24
- Components::GovUK::Label.new(context: self, attribute: attribute, text: text, **options).render(&)
23
+ def govuk_label(attribute, text = nil, **, &)
24
+ Components::GovUK::Label.new(context: self, attribute: attribute, text: text, **).render(&)
25
25
  end
26
26
  end
27
27
  end
@@ -21,8 +21,8 @@ module CCS
21
21
  #
22
22
  # @return (see CCS::Components::GovUK::NotificationBanner#render)
23
23
 
24
- def govuk_notification_banner(text = nil, success_banner = nil, **options, &)
25
- Components::GovUK::NotificationBanner.new(context: self, text: text, success_banner: success_banner, **options).render(&)
24
+ def govuk_notification_banner(text = nil, success_banner = nil, **, &)
25
+ Components::GovUK::NotificationBanner.new(context: self, text: text, success_banner: success_banner, **).render(&)
26
26
  end
27
27
  end
28
28
  end
@@ -19,8 +19,8 @@ module CCS
19
19
  #
20
20
  # @return (see CCS::Components::GovUK::Pagination#render)
21
21
 
22
- def govuk_pagination(**options)
23
- Components::GovUK::Pagination.new(context: self, **options).render
22
+ def govuk_pagination(**)
23
+ Components::GovUK::Pagination.new(context: self, **).render
24
24
  end
25
25
  end
26
26
  end