govuk_publishing_components 51.2.1 → 52.1.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/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +12 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +0 -7
- data/app/views/govuk_publishing_components/components/_add_another.html.erb +10 -6
- data/app/views/govuk_publishing_components/components/_copy_to_clipboard.html.erb +6 -2
- data/app/views/govuk_publishing_components/components/_inset_text.html.erb +8 -6
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +1 -5
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -2
- data/app/views/govuk_publishing_components/components/_table.html.erb +6 -4
- data/app/views/govuk_publishing_components/components/docs/add_another.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/copy_to_clipboard.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +685 -566
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +0 -16
- data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +1 -7
- data/app/views/govuk_publishing_components/components/docs/table.yml +32 -1
- data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb +6 -2
- data/app/views/govuk_publishing_components/components/layout_for_public/_layout_super_navigation_header_homepage.html.erb +0 -1
- data/lib/govuk_publishing_components/app_helpers/table_helper.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d358986b5bbd3ce3b30799d7cf7222b529b5c423633090273f08edb53b0bba
|
4
|
+
data.tar.gz: f9552e528d85ae9ba87045e65527e82a47eb13847713f8d8a7d6f2557e0e8328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6d4f5ed822cef7d67afcf398939c6e900bc1da3c35aa2701832680363aede5b7a8e882c64d744c771e1dbf9de683a4412353c7e7fdead23a6b4243425cf18f1
|
7
|
+
data.tar.gz: 52242c912e87ea2e6f7f0f6a4ed8ca91ea67b25ad485d0065b87659b44fd03ef3cd66ac58297a6e6ea1df082aa3e45c929f5c25bce323e0ffd9543f27aa74618
|
@@ -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
|
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
|
-
|
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
|
-
|
26
|
+
<% end %>
|
@@ -5,13 +5,15 @@
|
|
5
5
|
local_assigns[:margin_bottom] ||= 6
|
6
6
|
|
7
7
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
8
|
-
component_helper.add_class("gem-c-inset-text
|
8
|
+
component_helper.add_class("gem-c-inset-text gem-c-force-print-link-styles-within")
|
9
9
|
component_helper.set_id(id)
|
10
10
|
%>
|
11
11
|
<%= tag.div(**component_helper.all_attributes) do %>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
<div class="govuk-inset-text">
|
13
|
+
<% if defined? text %>
|
14
|
+
<%= text %>
|
15
|
+
<% elsif block_given? %>
|
16
|
+
<%= yield %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
17
19
|
<% 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 %>
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -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)
|
@@ -9,6 +9,7 @@
|
|
9
9
|
sortable ||= false
|
10
10
|
filterable ||= false
|
11
11
|
label ||= t("components.table.filter_label")
|
12
|
+
margin_bottom ||= nil
|
12
13
|
|
13
14
|
table_id = "table-id-#{SecureRandom.hex(4)}"
|
14
15
|
filter_count_id = "filter-count-id-#{SecureRandom.hex(4)}"
|
@@ -16,10 +17,11 @@
|
|
16
17
|
|
17
18
|
<% @table = capture do %>
|
18
19
|
<%= GovukPublishingComponents::AppHelpers::TableHelper.helper(self, caption, {
|
19
|
-
sortable
|
20
|
-
filterable
|
21
|
-
caption_classes
|
22
|
-
table_id
|
20
|
+
sortable:,
|
21
|
+
filterable:,
|
22
|
+
caption_classes:,
|
23
|
+
table_id:,
|
24
|
+
margin_bottom:,
|
23
25
|
}) do |t| %>
|
24
26
|
|
25
27
|
<% if head.any? %>
|
@@ -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:
|
23
|
+
uses_component_wrapper_helper: true
|
24
24
|
govuk_frontend_components:
|
25
25
|
- button
|
26
26
|
examples:
|