govuk_publishing_components 51.1.0 → 51.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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/component_guide/application.scss +1 -1
  3. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +3 -19
  5. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +1 -0
  6. data/app/models/govuk_publishing_components/audit_comparer.rb +3 -3
  7. data/app/views/govuk_publishing_components/components/_title.html.erb +2 -3
  8. data/app/views/govuk_publishing_components/components/docs/add_another.yml +1 -1
  9. data/app/views/govuk_publishing_components/components/docs/big_number.yml +1 -0
  10. data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +1 -1
  11. data/lib/govuk_publishing_components/presenters/shared_helper.rb +0 -11
  12. data/lib/govuk_publishing_components/version.rb +1 -1
  13. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +217 -184
  14. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  15. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +216 -184
  16. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  17. data/node_modules/govuk-frontend/dist/govuk/all.mjs +1 -0
  18. data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
  19. data/node_modules/govuk-frontend/dist/govuk/all.scss +6 -0
  20. data/node_modules/govuk-frontend/dist/govuk/all.scss.map +1 -1
  21. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +164 -0
  22. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -0
  23. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  24. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +1 -87
  25. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
  26. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +149 -112
  27. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +148 -111
  29. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
  30. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +5 -8
  31. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
  32. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +149 -112
  33. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
  34. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +148 -111
  35. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
  36. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +5 -8
  37. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
  38. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +174 -140
  39. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
  40. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +173 -139
  41. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
  42. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +17 -16
  43. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
  44. data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +4 -4
  45. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +1 -24
  46. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
  47. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +0 -23
  48. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
  49. data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +2 -2
  50. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +149 -112
  51. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
  52. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +148 -111
  53. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
  54. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +6 -8
  55. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
  56. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +149 -112
  57. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
  58. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +148 -111
  59. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
  60. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +5 -8
  61. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
  62. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +1 -24
  63. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +1 -1
  64. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -23
  65. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +1 -1
  66. data/node_modules/govuk-frontend/dist/govuk/components/input/macro-options.json +4 -4
  67. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +149 -112
  68. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
  69. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +148 -111
  70. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
  71. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +6 -8
  72. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
  73. data/node_modules/govuk-frontend/dist/govuk/components/password-input/macro-options.json +1 -1
  74. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +149 -112
  75. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
  76. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +148 -111
  77. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
  78. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +5 -8
  79. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
  80. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +1 -24
  81. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
  82. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +0 -23
  83. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
  84. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +1 -24
  85. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
  86. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +0 -23
  87. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
  88. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +1 -24
  89. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
  90. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +0 -23
  91. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
  92. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +1 -24
  93. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
  94. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +0 -23
  95. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
  96. data/node_modules/govuk-frontend/dist/govuk/components/textarea/macro-options.json +1 -1
  97. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  98. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +1 -1
  99. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  100. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  101. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  102. data/node_modules/govuk-frontend/dist/govuk/init.mjs +17 -13
  103. data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
  104. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +5 -10
  105. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +1 -1
  106. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
  107. data/node_modules/govuk-frontend/package.json +9 -9
  108. metadata +4 -6
  109. data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +0 -18
  110. data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs.map +0 -1
  111. data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +0 -31
  112. data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs.map +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc93d3d2e0d58cb2889e655c2329ab804743dc817263461f04c1c67992a45b65
4
- data.tar.gz: 3f0105fd23e588fbf9596cc8af2730f9f3b3eec848b2fa2c15c945d8a259702e
3
+ metadata.gz: db74fa9c85934d448152da8903352a36ab46a513068455227b209267bb698a3f
4
+ data.tar.gz: 2fdd9cb41e512fab8054ee4005af8eabd2fa006394a19940388946e4887a31e6
5
5
  SHA512:
6
- metadata.gz: c40f84acabd6a47fe2b46c29e1d759821eec65e16884dccf0feb0d88b868c2cfa11565d1fcdafa1e2f0cea536daf623fbe8233204762285c689fdcb6982f75b7
7
- data.tar.gz: 806abfe7bf6f5b5ef250bde33701af3aaf80b6003588bcf21a1beb337a02370c900140f75f3e3670100a929c538c239160b8def9ca1a31c7e0acd3a8c31d3c9e
6
+ metadata.gz: 1d9d34b3457fb88865bac9df441cd621abba687e5c624a661b6e1f24bb922b2ce8d0eb1f5f9737093096d10bdd0433ea3f23a04e2b20e58f58cff172a67de729
7
+ data.tar.gz: 702d5378bd7d5c1278155f7ad564bea78098a0bb80883abde47c917170f1c42b010de450ba06897517af1809c69b93e1720c772bc8986faabaaed40811eba312
@@ -116,7 +116,7 @@ $gem-guide-border-width: 1px;
116
116
  }
117
117
 
118
118
  .component-guide-preview {
119
- padding: ($govuk-gutter * 1.5) $govuk-gutter $govuk-gutter;
119
+ padding: $govuk-gutter;
120
120
  border: $gem-guide-border-width solid $govuk-border-colour;
121
121
  position: relative;
122
122
 
@@ -38,6 +38,7 @@
38
38
  @import "components/fieldset";
39
39
  @import "components/file-upload";
40
40
  @import "components/glance-metric";
41
+ @import "components/global-banner";
41
42
  @import "components/govspeak-html-publication";
42
43
  @import "components/govspeak";
43
44
  @import "components/heading";
@@ -57,24 +57,13 @@
57
57
 
58
58
  @include govuk-media-query($from: tablet) {
59
59
  box-sizing: border-box;
60
- float: left;
61
- clear: left;
62
- padding-right: govuk-spacing(1);
60
+ float: inline-start;
61
+ padding-inline-start: 0;
62
+ padding-inline-end: govuk-spacing(1);
63
63
  margin-top: 0;
64
64
  }
65
65
  }
66
66
 
67
- .direction-rtl .gem-c-metadata .gem-c-metadata__term,
68
- .gem-c-metadata.direction-rtl .gem-c-metadata__term {
69
- float: inline-start;
70
- clear: inline-start;
71
-
72
- @include govuk-media-query($from: tablet) {
73
- padding-left: govuk-spacing(1);
74
- padding-right: 0;
75
- }
76
- }
77
-
78
67
  .gem-c-metadata__definition {
79
68
  margin: 0;
80
69
 
@@ -85,11 +74,6 @@
85
74
  }
86
75
  }
87
76
 
88
- .direction-rtl .gem-c-metadata .gem-c-metadata__definition,
89
- .gem-c-metadata.direction-rtl .gem-c-metadata__definition {
90
- float: inline-start;
91
- }
92
-
93
77
  .gem-c-metadata__toggle-wrap {
94
78
  display: none;
95
79
  }
@@ -77,6 +77,7 @@
77
77
  a {
78
78
  @include govuk-link-common;
79
79
  @include govuk-link-style-default;
80
+ @include govuk-text-break-word;
80
81
 
81
82
  &:focus {
82
83
  @include govuk-focused-text;
@@ -182,7 +182,7 @@ module GovukPublishingComponents
182
182
  warnings = []
183
183
 
184
184
  locations.each do |location|
185
- next if location[:location] == "template" || location[:location] == "ruby"
185
+ next if %w[template ruby].include?(location[:location])
186
186
 
187
187
  location[:components].each do |component|
188
188
  raise_warning = asset_already_in_static(location[:location], component)
@@ -196,14 +196,14 @@ module GovukPublishingComponents
196
196
  def warn_about_missing_assets(components)
197
197
  warnings = []
198
198
 
199
- code = components.select { |c| c[:location] == "template" || c[:location] == "ruby" }
199
+ code = components.select { |c| %w[template ruby].include?(c[:location]) }
200
200
  code = [
201
201
  {
202
202
  location: "code",
203
203
  components: code.map { |c| c[:components] }.flatten.uniq.sort,
204
204
  },
205
205
  ]
206
- assets = components.select { |c| c[:location] == "stylesheet" || c[:location] == "javascript" }
206
+ assets = components.select { |c| %w[stylesheet javascript].include?(c[:location]) }
207
207
 
208
208
  warnings << find_missing_items(code, assets)
209
209
  warnings << find_missing_items(assets, code)
@@ -9,12 +9,11 @@
9
9
 
10
10
  inverse ||= false
11
11
  local_assigns[:margin_bottom] ||= 8
12
-
13
- shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
12
+ margin_bottom = [*0..9].include?(local_assigns[:margin_bottom]) ? "govuk-!-margin-bottom-#{local_assigns[:margin_bottom]}" : "govuk-!-margin-bottom-3"
14
13
 
15
14
  classes = %w[gem-c-title]
16
15
  classes << "gem-c-title--inverse" if inverse
17
- classes << shared_helper.get_margin_bottom
16
+ classes << margin_bottom
18
17
 
19
18
  heading_classes = %w[gem-c-title__text]
20
19
  heading_classes << (average_title_length.present? ? 'govuk-heading-l' : 'govuk-heading-xl')
@@ -35,7 +35,7 @@ examples:
35
35
  <input class="gem-c-input govuk-input" id="person_0_name" name="person[0]name">
36
36
  </div>
37
37
  destroy_checkbox: >
38
- <div class="govuk-checkboxes" data-module="govuk-checkboxes" data-govuk-checkboxes-init="">
38
+ <div class="govuk-checkboxes" data-module="govuk-checkboxes">
39
39
  <div class="govuk-checkboxes__item">
40
40
  <input type="checkbox" name="person[0][_destroy]" id="person_0__destroy" class="govuk-checkboxes__input">
41
41
  <label for="person_0__destroy" class="govuk-label govuk-checkboxes__label">Delete</label>
@@ -9,6 +9,7 @@ accessibility_criteria: |
9
9
  - convey the meaning of the number shown
10
10
  shared_accessibility_criteria:
11
11
  - link
12
+ uses_component_wrapper_helper: true
12
13
  examples:
13
14
  default:
14
15
  data:
@@ -34,7 +34,7 @@ module GovukPublishingComponents
34
34
  @is_page_heading = options[:is_page_heading]
35
35
  @description = options[:description] || nil
36
36
  @no_hint_text = options[:no_hint_text]
37
- @hint_text = options[:hint_text] || "Select all that apply." unless @no_hint_text
37
+ @hint_text = options[:hint_text] || "Select all that apply" unless @no_hint_text
38
38
  @visually_hide_heading = options[:visually_hide_heading]
39
39
  end
40
40
 
@@ -7,17 +7,6 @@ module GovukPublishingComponents
7
7
  @options = local_assigns
8
8
  @margin_bottom = @options[:margin_bottom] || 3
9
9
  @heading_level = @options[:heading_level] || 2
10
-
11
- if local_assigns.include?(:classes)
12
- @classes = local_assigns[:classes].split(" ")
13
- unless @classes.all? { |c| c.start_with?("js-") }
14
- raise(ArgumentError, "Passed classes must be prefixed with `js-`")
15
- end
16
- end
17
- end
18
-
19
- def get_margin_bottom
20
- [*0..9].include?(@margin_bottom) ? "govuk-!-margin-bottom-#{margin_bottom}" : "govuk-!-margin-bottom-3"
21
10
  end
22
11
 
23
12
  def get_heading_level
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "51.1.0".freeze
2
+ VERSION = "51.2.0".freeze
3
3
  end