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.
Files changed (20) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +12 -0
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +0 -7
  4. data/app/views/govuk_publishing_components/components/_add_another.html.erb +10 -6
  5. data/app/views/govuk_publishing_components/components/_copy_to_clipboard.html.erb +6 -2
  6. data/app/views/govuk_publishing_components/components/_inset_text.html.erb +8 -6
  7. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +1 -5
  8. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -2
  9. data/app/views/govuk_publishing_components/components/_table.html.erb +6 -4
  10. data/app/views/govuk_publishing_components/components/docs/add_another.yml +1 -1
  11. data/app/views/govuk_publishing_components/components/docs/copy_to_clipboard.yml +1 -0
  12. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +685 -566
  13. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +0 -16
  14. data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +1 -7
  15. data/app/views/govuk_publishing_components/components/docs/table.yml +32 -1
  16. data/app/views/govuk_publishing_components/components/layout_for_public/_account-layout.html.erb +6 -2
  17. data/app/views/govuk_publishing_components/components/layout_for_public/_layout_super_navigation_header_homepage.html.erb +0 -1
  18. data/lib/govuk_publishing_components/app_helpers/table_helper.rb +1 -0
  19. data/lib/govuk_publishing_components/version.rb +1 -1
  20. metadata +3 -3
@@ -134,19 +134,3 @@ examples:
134
134
  cookie_preferences:
135
135
  text: How GOV.UK accounts use cookies
136
136
  href: https://www.gov.uk/government/publications/govuk-accounts-trial-full-privacy-notice-and-accessibility-statement
137
- with_custom_layout:
138
- description: Yields a custom layout for the content.
139
- data:
140
- custom_layout: true
141
- block: |
142
- <main id="custom-layout">
143
- <h1>This is a custom layout</h1>
144
- </main>
145
- with_custom_header:
146
- description: Allows the header to be replaced with HTML injected by the calling application in a `content_for` tag named `:custom_header`.
147
- embed: |
148
- <% content_for(:custom_header) do %>
149
- <header id="custom-header">I'm a custom header</header>
150
- <% end %>
151
- <%= render "govuk_publishing_components/components/layout_for_public", {
152
- } %>
@@ -39,10 +39,9 @@ examples:
39
39
  logo_link_title: "Go to example"
40
40
  homepage:
41
41
  description: |
42
- This variant is used for the homepage. It toggles the following attributes: hide_button_left_border, hide_logo_text and blue_background
42
+ This variant is used for the homepage. It toggles the following attributes: hide_logo_text and blue_background
43
43
  data:
44
44
  hide_logo_text: true
45
- hide_button_left_border: true
46
45
  blue_background: true
47
46
  large_navbar: true
48
47
  hide_logo_text:
@@ -50,11 +49,6 @@ examples:
50
49
  Logo text is shown by default. This option allows us to hide the text for the homepage.
51
50
  data:
52
51
  hide_logo_text: true
53
- remove_left_button_border:
54
- description: |
55
- The left border for the toggle button is shown by default. This option allows us to hide the text for the homepage.
56
- data:
57
- hide_button_left_border: true
58
52
  blue_blackground_colour:
59
53
  description: |
60
54
  The black background is shown by default. This option allows us to change the background colour for the homepage.
@@ -140,7 +140,7 @@ examples:
140
140
  - text: £80
141
141
  format: numeric
142
142
  with_filter:
143
- description: This option allows table rows to be filtered by user input. Since this filtering is implemented client-side the filter section is not displayed by default but displays only when JavaScript is enabled. The label for the input field can be set when the coponent is rendered via the `label` key. if this is not set a fallback value will display.
143
+ description: This option allows table rows to be filtered by user input. Since this filtering is implemented client-side the filter section is not displayed by default but displays only when JavaScript is enabled. The label for the input field can be set when the component is rendered via the `label` key. If this is not set a fallback value will display.
144
144
  data:
145
145
  filterable: true
146
146
  label: Filter months
@@ -169,3 +169,34 @@ examples:
169
169
  format: numeric
170
170
  - text: £125
171
171
  format: numeric
172
+ with_custom_margin_bottom:
173
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). By default, this component has a margin bottom of `30px`, as determined by the design system styles.
174
+ data:
175
+ margin_bottom: 0
176
+ filterable: true
177
+ label: Filter months
178
+ head:
179
+ - text: Month you apply
180
+ - text: Rate for bicycles
181
+ format: numeric
182
+ - text: Rate for vehicles
183
+ format: numeric
184
+ rows:
185
+ -
186
+ - text: January
187
+ - text: £85
188
+ format: numeric
189
+ - text: £95
190
+ format: numeric
191
+ -
192
+ - text: February
193
+ - text: £75
194
+ format: numeric
195
+ - text: £55
196
+ format: numeric
197
+ -
198
+ - text: March
199
+ - text: £165
200
+ format: numeric
201
+ - text: £125
202
+ format: numeric
@@ -12,9 +12,13 @@
12
12
  <div class="govuk-grid-column-two-thirds">
13
13
  <div id="wrapper">
14
14
  <%= yield :before_content %>
15
- <main id="content">
15
+ <% if for_static %>
16
+ <main id="content">
17
+ <%= yield %>
18
+ </main>
19
+ <% else %>
16
20
  <%= yield %>
17
- </main>
21
+ <% end %>
18
22
  </div>
19
23
  </div>
20
24
  </div>
@@ -5,7 +5,6 @@
5
5
  hide_logo_text: true,
6
6
  logo_link: logo_link,
7
7
  blue_background: true,
8
- hide_button_left_border: true,
9
8
  large_navbar: true,
10
9
  }
11
10
  %>
@@ -8,6 +8,7 @@ module GovukPublishingComponents
8
8
 
9
9
  classes = %w[gem-c-table govuk-table]
10
10
  classes << "govuk-table--sortable" if opt[:sortable]
11
+ classes << "govuk-!-margin-bottom-#{opt[:margin_bottom]}" if [*0..9].include?(opt[:margin_bottom])
11
12
 
12
13
  caption_classes = %w[govuk-table__caption]
13
14
  caption_classes << opt[:caption_classes] if opt[:caption_classes]
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "51.2.1".freeze
2
+ VERSION = "52.1.0".freeze
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 51.2.1
4
+ version: 52.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-11 00:00:00.000000000 Z
10
+ date: 2025-02-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: govuk_app_config
@@ -1997,7 +1997,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1997
1997
  - !ruby/object:Gem::Version
1998
1998
  version: '0'
1999
1999
  requirements: []
2000
- rubygems_version: 3.6.3
2000
+ rubygems_version: 3.6.5
2001
2001
  specification_version: 4
2002
2002
  summary: A gem to document components in GOV.UK frontend applications
2003
2003
  test_files: []