ccs-frontend_helpers 2.1.0 → 2.2.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +10 -1
- data/Gemfile +5 -5
- data/Gemfile.lock +35 -29
- data/README.md +1 -0
- data/ccs-frontend_helpers.gemspec +1 -1
- data/lib/ccs/components/ccs/contact_us.rb +2 -2
- data/lib/ccs/components/ccs/dashboard_section/panel.rb +2 -2
- data/lib/ccs/components/ccs/dashboard_section.rb +2 -2
- data/lib/ccs/components/ccs/footer/link.rb +2 -2
- data/lib/ccs/components/ccs/footer.rb +2 -2
- data/lib/ccs/components/ccs/header/link.rb +2 -2
- data/lib/ccs/components/ccs/header.rb +2 -2
- data/lib/ccs/components/ccs/password_strength.rb +2 -2
- data/lib/ccs/components/govuk/back_link.rb +2 -2
- data/lib/ccs/components/govuk/breadcrumbs/link.rb +2 -2
- data/lib/ccs/components/govuk/breadcrumbs.rb +2 -2
- data/lib/ccs/components/govuk/button.rb +2 -2
- data/lib/ccs/components/govuk/cookie_banner/action.rb +2 -2
- data/lib/ccs/components/govuk/cookie_banner/message.rb +2 -2
- data/lib/ccs/components/govuk/cookie_banner.rb +2 -2
- data/lib/ccs/components/govuk/details.rb +2 -2
- data/lib/ccs/components/govuk/error_message.rb +2 -2
- data/lib/ccs/components/govuk/error_summary/item.rb +2 -2
- data/lib/ccs/components/govuk/error_summary.rb +2 -2
- data/lib/ccs/components/govuk/field/input/character_count.rb +2 -0
- data/lib/ccs/components/govuk/field/input/file_upload.rb +60 -4
- data/lib/ccs/components/govuk/field/input/select.rb +2 -2
- data/lib/ccs/components/govuk/field/input/text_input/fix.rb +2 -2
- data/lib/ccs/components/govuk/field/input/text_input.rb +2 -2
- data/lib/ccs/components/govuk/field/input/textarea.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/checkboxes.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/item/checkbox.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/item/radio.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/item.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/radios.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs.rb +1 -1
- data/lib/ccs/components/govuk/field.rb +2 -2
- data/lib/ccs/components/govuk/fieldset/legend.rb +2 -2
- data/lib/ccs/components/govuk/fieldset.rb +2 -2
- data/lib/ccs/components/govuk/footer/link.rb +2 -2
- data/lib/ccs/components/govuk/footer.rb +2 -2
- data/lib/ccs/components/govuk/form_group.rb +2 -2
- data/lib/ccs/components/govuk/header/link.rb +2 -2
- data/lib/ccs/components/govuk/header.rb +2 -2
- data/lib/ccs/components/govuk/hint.rb +2 -2
- data/lib/ccs/components/govuk/inset_text.rb +2 -2
- data/lib/ccs/components/govuk/label.rb +2 -2
- data/lib/ccs/components/govuk/notification_banner.rb +2 -2
- data/lib/ccs/components/govuk/pagination/increment/next.rb +2 -2
- data/lib/ccs/components/govuk/pagination/increment/previous.rb +2 -2
- data/lib/ccs/components/govuk/pagination/increment.rb +2 -2
- data/lib/ccs/components/govuk/pagination/item/form.rb +2 -2
- data/lib/ccs/components/govuk/pagination/item/tag.rb +2 -2
- data/lib/ccs/components/govuk/pagination/item.rb +2 -2
- data/lib/ccs/components/govuk/pagination.rb +2 -2
- data/lib/ccs/components/govuk/panel.rb +2 -2
- data/lib/ccs/components/govuk/phase_banner.rb +2 -2
- data/lib/ccs/components/govuk/service_navigation.rb +2 -2
- data/lib/ccs/components/govuk/skip_link.rb +2 -2
- data/lib/ccs/components/govuk/step_by_step_navigation.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/action/link.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/card/actions.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/card/title.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/card.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row/actions.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row/key.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row/value.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row.rb +2 -2
- data/lib/ccs/components/govuk/summary_list.rb +2 -2
- data/lib/ccs/components/govuk/table/body/data_cell.rb +2 -2
- data/lib/ccs/components/govuk/table/body/head_cell.rb +2 -2
- data/lib/ccs/components/govuk/table/header/head_cell.rb +2 -2
- data/lib/ccs/components/govuk/table.rb +2 -2
- data/lib/ccs/components/govuk/tabs/panel.rb +2 -2
- data/lib/ccs/components/govuk/tabs/tab.rb +2 -2
- data/lib/ccs/components/govuk/tabs.rb +2 -2
- data/lib/ccs/components/govuk/tag.rb +2 -2
- data/lib/ccs/components/govuk/task_list/item/status.rb +2 -2
- data/lib/ccs/components/govuk/task_list/item/title.rb +2 -2
- data/lib/ccs/components/govuk/task_list/item.rb +2 -2
- data/lib/ccs/components/govuk/task_list.rb +2 -2
- data/lib/ccs/components/govuk/warning_text.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/contact_us.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/dashboard_section.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/footer.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/header.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/password_strength.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/accordion.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/back_link.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/breadcrumbs.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/button.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/character_count.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/checkboxes.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/cookie_banner.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/date_input.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/details.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/error_message.rb +4 -4
- data/lib/ccs/frontend_helpers/govuk_frontend/error_summary.rb +4 -4
- data/lib/ccs/frontend_helpers/govuk_frontend/exit_this_page.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/fieldset.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/footer.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/header.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/hint.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/input.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/inset_text.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/label.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/pagination.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/panel.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/password_input.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/phase_banner.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/radios.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/select.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/service_navigation.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/skip_link.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/step_by_step_navigation.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/summary_list.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/table.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/tabs.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/tag.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/task_list.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/textarea.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/warning_text.rb +2 -2
- data/lib/ccs/frontend_helpers/version.rb +1 -1
- data/package.json +2 -2
- data/yarn.lock +8 -8
- metadata +4 -8
@@ -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, **
|
23
|
-
Components::CCS::ContactUs.new(contact_us_link_href: contact_us_link_href, context: self, **
|
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, **
|
22
|
-
Components::CCS::DashboardSection.new(context: self, dashboard_section_panels: dashboard_section_panels, title_text: title_text, **
|
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(**
|
23
|
-
Components::CCS::Footer.new(context: self, **
|
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(**
|
23
|
-
Components::CCS::Header.new(context: self, **
|
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, **
|
23
|
-
Components::CCS::PasswordStrength.new(password_id: password_id, password_strength_tests: password_strength_tests, context: self, **
|
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, **
|
23
|
-
Components::GovUK::Accordion.new(context: self, accordion_id: accordion_id, accordion_sections: accordion_sections, **
|
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, **
|
23
|
-
Components::GovUK::BackLink.new(context: self, text: text, href: href, **
|
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, **
|
23
|
-
Components::GovUK::Breadcrumbs.new(context: self, breadcrumb_links: breadcrumb_links, **
|
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, **
|
23
|
-
Components::GovUK::Button.new(context: self, text: text, **
|
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 = {}, **
|
23
|
-
Components::GovUK::Field::Input::CharacterCount.new(context: self, attribute: attribute, character_count_options: character_count_options, **
|
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, **
|
23
|
-
Components::GovUK::Field::Inputs::Checkboxes.new(context: self, attribute: attribute, checkbox_items: checkbox_items, **
|
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, **
|
23
|
-
Components::GovUK::CookieBanner.new(context: self, messages: messages, **
|
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, **
|
23
|
-
Components::GovUK::Field::Inputs::DateInput.new(context: self, attribute: attribute, **
|
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,
|
25
|
-
Components::GovUK::Details.new(context: self, summary_text: summary_text, **
|
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, **
|
23
|
-
Components::GovUK::ErrorMessage.new(context: self, message: error_message, attribute: attribute, **
|
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, **
|
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, **
|
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, **
|
23
|
-
Components::GovUK::ErrorSummary.new(context: self, title: title, error_summary_items: error_summary_items, description: description, **
|
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, **
|
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, **
|
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, **
|
23
|
-
Components::GovUK::ExitThisPage.new(context: self, text: text, redirect_url: redirect_url, **
|
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(
|
25
|
-
Components::GovUK::Fieldset.new(context: self, **
|
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, **
|
23
|
-
Components::GovUK::Field::Input::FileUpload.new(context: self, attribute: attribute, **
|
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(**
|
23
|
-
Components::GovUK::Footer.new(context: self, **
|
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(**
|
23
|
-
Components::GovUK::Header.new(context: self, **
|
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,
|
24
|
-
Components::GovUK::Hint.new(context: self, text: text, **
|
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, **
|
23
|
-
Components::GovUK::Field::Input::TextInput.new(context: self, attribute: attribute, **
|
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,
|
25
|
-
Components::GovUK::InsetText.new(context: self, text: text, **
|
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,
|
24
|
-
Components::GovUK::Label.new(context: self, attribute: attribute, text: text, **
|
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,
|
25
|
-
Components::GovUK::NotificationBanner.new(context: self, text: text, success_banner: success_banner, **
|
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(**
|
23
|
-
Components::GovUK::Pagination.new(context: self, **
|
22
|
+
def govuk_pagination(**)
|
23
|
+
Components::GovUK::Pagination.new(context: self, **).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::Panel#render)
|
23
23
|
|
24
|
-
def govuk_panel(title_text, panel_text = nil,
|
25
|
-
Components::GovUK::Panel.new(context: self, title_text: title_text, panel_text: panel_text, **
|
24
|
+
def govuk_panel(title_text, panel_text = nil, **, &)
|
25
|
+
Components::GovUK::Panel.new(context: self, title_text: title_text, panel_text: panel_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::Input::PasswordInput#render)
|
21
21
|
|
22
|
-
def govuk_password_input(attribute, **
|
23
|
-
Components::GovUK::Field::Input::PasswordInput.new(context: self, attribute: attribute, **
|
22
|
+
def govuk_password_input(attribute, **)
|
23
|
+
Components::GovUK::Field::Input::PasswordInput.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::PhaseBanner#render)
|
23
23
|
|
24
|
-
def govuk_phase_banner(tag_options, text = nil,
|
25
|
-
Components::GovUK::PhaseBanner.new(context: self, tag_options: tag_options, text: text, **
|
24
|
+
def govuk_phase_banner(tag_options, text = nil, **, &)
|
25
|
+
Components::GovUK::PhaseBanner.new(context: self, tag_options: tag_options, text: 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::Inputs::Radios#render)
|
21
21
|
|
22
|
-
def govuk_radios(attribute, radio_items, **
|
23
|
-
Components::GovUK::Field::Inputs::Radios.new(context: self, attribute: attribute, radio_items: radio_items, **
|
22
|
+
def govuk_radios(attribute, radio_items, **)
|
23
|
+
Components::GovUK::Field::Inputs::Radios.new(context: self, attribute: attribute, radio_items: radio_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::Input::Select#render)
|
21
21
|
|
22
|
-
def govuk_select(attribute, items, **
|
23
|
-
Components::GovUK::Field::Input::Select.new(context: self, attribute: attribute, items: items, **
|
22
|
+
def govuk_select(attribute, items, **)
|
23
|
+
Components::GovUK::Field::Input::Select.new(context: self, attribute: attribute, items: 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::ServiceNavigation#render)
|
21
21
|
|
22
|
-
def govuk_service_navigation(**
|
23
|
-
Components::GovUK::ServiceNavigation.new(context: self, **
|
22
|
+
def govuk_service_navigation(**)
|
23
|
+
Components::GovUK::ServiceNavigation.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::SkipLink#render)
|
21
21
|
|
22
|
-
def govuk_skip_link(text, href = nil, **
|
23
|
-
Components::GovUK::SkipLink.new(context: self, text: text, href: href, **
|
22
|
+
def govuk_skip_link(text, href = nil, **)
|
23
|
+
Components::GovUK::SkipLink.new(context: self, text: text, href: href, **).render
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -27,8 +27,8 @@ module CCS
|
|
27
27
|
#
|
28
28
|
# @return (see CCS::Components::GovUK::StepByStepNavigation#render)
|
29
29
|
|
30
|
-
def govuk_step_by_step_navigation(step_by_step_navigation_sections, **
|
31
|
-
Components::GovUK::StepByStepNavigation.new(context: self, step_by_step_navigation_sections: step_by_step_navigation_sections, **
|
30
|
+
def govuk_step_by_step_navigation(step_by_step_navigation_sections, **)
|
31
|
+
Components::GovUK::StepByStepNavigation.new(context: self, step_by_step_navigation_sections: step_by_step_navigation_sections, **).render
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -19,8 +19,8 @@ module CCS
|
|
19
19
|
#
|
20
20
|
# @return (see CCS::Components::GovUK::SummaryList#render)
|
21
21
|
|
22
|
-
def govuk_summary_list(summary_list_items, **
|
23
|
-
Components::GovUK::SummaryList.new(context: self, summary_list_items: summary_list_items, **
|
22
|
+
def govuk_summary_list(summary_list_items, **)
|
23
|
+
Components::GovUK::SummaryList.new(context: self, summary_list_items: summary_list_items, **).render
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -19,7 +19,7 @@ module CCS
|
|
19
19
|
#
|
20
20
|
# @return (see CCS::Components::GovUK::Table#render)
|
21
21
|
|
22
|
-
def govuk_table(head_cells_or_rows, rows = nil, **
|
22
|
+
def govuk_table(head_cells_or_rows, rows = nil, **)
|
23
23
|
if rows.nil?
|
24
24
|
rows = head_cells_or_rows
|
25
25
|
head_cells = nil
|
@@ -27,7 +27,7 @@ module CCS
|
|
27
27
|
head_cells = head_cells_or_rows
|
28
28
|
end
|
29
29
|
|
30
|
-
Components::GovUK::Table.new(context: self, rows: rows, head_cells: head_cells, **
|
30
|
+
Components::GovUK::Table.new(context: self, rows: rows, head_cells: head_cells, **).render
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -19,8 +19,8 @@ module CCS
|
|
19
19
|
#
|
20
20
|
# @return (see CCS::Components::GovUK::Tabs#render)
|
21
21
|
|
22
|
-
def govuk_tabs(items, title = nil, **
|
23
|
-
Components::GovUK::Tabs.new(context: self, items: items, title: title, **
|
22
|
+
def govuk_tabs(items, title = nil, **)
|
23
|
+
Components::GovUK::Tabs.new(context: self, items: items, title: title, **).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::Tag#render)
|
21
21
|
|
22
|
-
def govuk_tag(text, colour = nil, **
|
23
|
-
Components::GovUK::Tag.new(context: self, text: text, colour: colour, **
|
22
|
+
def govuk_tag(text, colour = nil, **)
|
23
|
+
Components::GovUK::Tag.new(context: self, text: text, colour: colour, **).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::TaskList#render)
|
21
21
|
|
22
|
-
def govuk_task_list(task_list_items, **
|
23
|
-
Components::GovUK::TaskList.new(context: self, task_list_items: task_list_items, **
|
22
|
+
def govuk_task_list(task_list_items, **)
|
23
|
+
Components::GovUK::TaskList.new(context: self, task_list_items: task_list_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::Input::Textarea#render)
|
21
21
|
|
22
|
-
def govuk_textarea(attribute, **
|
23
|
-
Components::GovUK::Field::Input::Textarea.new(context: self, attribute: attribute, **
|
22
|
+
def govuk_textarea(attribute, **)
|
23
|
+
Components::GovUK::Field::Input::Textarea.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::WarningText#render)
|
23
23
|
|
24
|
-
def govuk_warning_text(text = nil,
|
25
|
-
Components::GovUK::WarningText.new(context: self, text: text, **
|
24
|
+
def govuk_warning_text(text = nil, **, &)
|
25
|
+
Components::GovUK::WarningText.new(context: self, text: text, **).render(&)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/package.json
CHANGED
data/yarn.lock
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
# yarn lockfile v1
|
3
3
|
|
4
4
|
|
5
|
-
ccs-frontend@^1.3.
|
6
|
-
version "1.3.
|
7
|
-
resolved "https://registry.yarnpkg.com/ccs-frontend/-/ccs-frontend-1.3.
|
8
|
-
integrity sha512-
|
5
|
+
ccs-frontend@^1.3.3:
|
6
|
+
version "1.3.3"
|
7
|
+
resolved "https://registry.yarnpkg.com/ccs-frontend/-/ccs-frontend-1.3.3.tgz#1f4e61ef03329bd184df878d72892b0130acb70a"
|
8
|
+
integrity sha512-bOdlXVtxkFMawR32eaVZh37XeFXn0RdBCpxtr6+YkmDq0aDhK+DDmEbhyk8vZ/i+b5hku9jLP45HdUuRItp1CQ==
|
9
9
|
|
10
|
-
govuk-frontend@^5.
|
11
|
-
version "5.
|
12
|
-
resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.
|
13
|
-
integrity sha512-
|
10
|
+
govuk-frontend@^5.9.0:
|
11
|
+
version "5.9.0"
|
12
|
+
resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-5.9.0.tgz#4064ac692019e60f030d6311c49330a6454a5689"
|
13
|
+
integrity sha512-8NzmyoDtRFYyHs413DfNPR8Zo6qw6Q02Mruxml/Yfy+EueaOI/JZ4gVM8d0pqzJmTiMcJuHhvxqYEgBRmqeoyA==
|