govuk_publishing_components 51.2.1 → 52.0.0

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: c50d14be7610561ed91341a0824caa29b9c767d839acb2c6f7c65b5f58514ac4
4
- data.tar.gz: d8bd8854736387adecda29ca77c0f31af6b7e5f0d8123c30c4b9fa5223e2530e
3
+ metadata.gz: 198f8ac365179c47560311c0629f3ff7e8e698cc3dbc96d2e7b400e8fc090a0d
4
+ data.tar.gz: dee1f0c019a773b93009f9028ae39e9f4c9cb8c3d344df15e89c04a9021dae50
5
5
  SHA512:
6
- metadata.gz: 8a3fd0fbac03888e39e3aecd3adcc1c69dd9c1f3b179f8eeb853c14cb3edbea20df8593a00126fc3d23fa3b550af45746f6b42679a145287abf31b92e20886a1
7
- data.tar.gz: e26f92b617d944bee8ffaee93c200eef6bf1b8596c946092e5646f4862d9043a7c4ba26e9d784ce4f0445cda143ef57f27003c94275b2c2423e8117a743553de
6
+ metadata.gz: ee48bbc9936311ebceb2c168f63ac94e13345b59507e1cf9a7268c5a752a1f7898a5a985e4cf9e606bb186f6b4cce4b830f7ef1fc9cf4cdbc593160f9cbff7db
7
+ data.tar.gz: 8468d0dd135db6de987149366fb6388b07603c2e8cc9248f2ab2818d17136e2af361c28a871bd17bf5cf97433fefafd1828a70b4ceaba1b20c2879b9f132d12c
@@ -311,12 +311,10 @@ $after-button-padding-left: govuk-spacing(4);
311
311
  }
312
312
 
313
313
  .gem-c-layout-super-navigation-header__navigation-item-link-inner {
314
- border-left: 1px solid $button-pipe-colour;
315
314
  padding: govuk-spacing(1) $after-link-padding;
316
315
  }
317
316
 
318
317
  .gem-c-layout-super-navigation-header__navigation-item-link-inner--blue-background {
319
- border-left: 0;
320
318
  border-right: 1px solid $pale-blue-colour;
321
319
  }
322
320
 
@@ -589,7 +587,6 @@ $after-button-padding-left: govuk-spacing(4);
589
587
 
590
588
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
591
589
  display: inline-block;
592
- border-left: 1px solid govuk-colour("white");
593
590
  border-right: 1px solid govuk-colour("white");
594
591
  margin: 0;
595
592
  padding: govuk-spacing(1) govuk-spacing(4);
@@ -601,10 +598,6 @@ $after-button-padding-left: govuk-spacing(4);
601
598
  }
602
599
  }
603
600
 
604
- .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner--no-left-border {
605
- border-left: 0;
606
- }
607
-
608
601
  // Styles for search toggle button.
609
602
  .gem-c-layout-super-navigation-header__search-toggle-button {
610
603
  background: none;
@@ -5,14 +5,18 @@
5
5
  fieldset_legend ||= ""
6
6
  add_button_text ||= "Add another"
7
7
  empty_fields ||= false
8
+
9
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
10
+ component_helper.add_class("gem-c-add-another")
11
+ component_helper.add_data_attribute({
12
+ module: "add-another",
13
+ add_button_text:,
14
+ fieldset_legend:,
15
+ empty_fields:,
16
+ })
8
17
  %>
9
18
 
10
- <%= tag.div class: "gem-c-add-another", data: {
11
- module: "add-another",
12
- "add-button-text": add_button_text,
13
- "fieldset-legend": fieldset_legend,
14
- "empty-fields": empty_fields
15
- } do %>
19
+ <%= tag.div(**component_helper.all_attributes) do %>
16
20
  <% unless empty_fields && items.count == 0 %>
17
21
  <% items.each_with_index do |item, index| %>
18
22
  <%= render "govuk_publishing_components/components/fieldset", {
@@ -1,8 +1,12 @@
1
1
  <%
2
2
  button_data_attributes ||= nil
3
3
  input_data_attributes ||= nil
4
+
5
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
6
+ component_helper.add_class("gem-c-copy-to-clipboard")
7
+ component_helper.add_data_attribute({ module: "copy-to-clipboard" })
4
8
  %>
5
- <div class="gem-c-copy-to-clipboard" data-module="copy-to-clipboard">
9
+ <%= tag.div(**component_helper.all_attributes) do %>
6
10
  <%= render "govuk_publishing_components/components/input", {
7
11
  label: {
8
12
  text: label,
@@ -19,4 +23,4 @@
19
23
  data_attributes: button_data_attributes,
20
24
  secondary_quiet: true,
21
25
  } %>
22
- </div>
26
+ <% end %>
@@ -18,7 +18,6 @@
18
18
  omit_footer_navigation ||= false
19
19
  omit_footer_border ||= false
20
20
  omit_header ||= false
21
- custom_layout ||= false
22
21
  product_name ||= nil
23
22
  show_explore_header ||= false
24
23
  show_cross_service_header ||= false
@@ -119,8 +118,6 @@
119
118
  service_navigation_items: service_navigation_items,
120
119
  product_name: product_name,
121
120
  } %>
122
- <% elsif content_for?(:custom_header) %>
123
- <%= yield :custom_header %>
124
121
  <% else %>
125
122
  <%= render "govuk_publishing_components/components/layout_header", {
126
123
  search: show_search,
@@ -156,12 +153,11 @@
156
153
  omit_account_phase_banner: omit_account_phase_banner,
157
154
  omit_account_navigation: omit_account_navigation,
158
155
  account_nav_location: account_nav_location,
156
+ for_static: for_static,
159
157
  } do %>
160
158
  <%= yield :before_content %>
161
159
  <%= yield %>
162
160
  <% end %>
163
- <% elsif custom_layout %>
164
- <%= yield %>
165
161
  <% elsif for_static %>
166
162
  <div id="wrapper" class="<%= "govuk-width-container" unless full_width %>">
167
163
  <%= yield :before_content %>
@@ -7,7 +7,6 @@
7
7
  logo_text = t("components.layout_super_navigation_header.logo_text")
8
8
 
9
9
  hide_logo_text ||= false
10
- hide_button_left_border ||= false
11
10
  blue_background ||= false
12
11
  large_navbar ||= false
13
12
 
@@ -28,7 +27,6 @@
28
27
  top_toggle_button_classes << "gem-c-layout-super-navigation-header__navigation-top-toggle-button--large-navbar" if large_navbar
29
28
 
30
29
  top_toggle_button_inner_classes = %w(gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner)
31
- top_toggle_button_inner_classes << "gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner--no-left-border" if hide_button_left_border
32
30
  top_toggle_button_inner_classes << "gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner--blue-background" if blue_background
33
31
 
34
32
  search_toggle_button_classes = %w(gem-c-layout-super-navigation-header__search-toggle-button)
@@ -20,7 +20,7 @@ body: |
20
20
  accessibility_criteria: |
21
21
  The form controls within the fieldsets must be fully accessible as per the
22
22
  design system guidance for each of the form control components.
23
- uses_component_wrapper_helper: false
23
+ uses_component_wrapper_helper: true
24
24
  govuk_frontend_components:
25
25
  - button
26
26
  examples:
@@ -1,5 +1,6 @@
1
1
  name: Copy to clipboard
2
2
  description: Content that a user is intended to copy, like a URL
3
+ uses_component_wrapper_helper: true
3
4
  examples:
4
5
  default:
5
6
  data: