govuk_publishing_components 51.1.1 → 51.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) 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/helpers/_markdown-typography.scss +1 -0
  5. data/app/models/govuk_publishing_components/audit_comparer.rb +3 -3
  6. data/app/views/govuk_publishing_components/components/_title.html.erb +2 -3
  7. data/app/views/govuk_publishing_components/components/docs/add_another.yml +1 -1
  8. data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +1 -1
  9. data/lib/govuk_publishing_components/presenters/shared_helper.rb +0 -11
  10. data/lib/govuk_publishing_components/version.rb +1 -1
  11. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +217 -184
  12. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  13. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +216 -184
  14. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  15. data/node_modules/govuk-frontend/dist/govuk/all.mjs +1 -0
  16. data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
  17. data/node_modules/govuk-frontend/dist/govuk/all.scss +6 -0
  18. data/node_modules/govuk-frontend/dist/govuk/all.scss.map +1 -1
  19. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +164 -0
  20. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -0
  21. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  22. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +1 -87
  23. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
  24. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +149 -112
  25. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
  26. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +148 -111
  27. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +5 -8
  29. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
  30. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +149 -112
  31. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
  32. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +148 -111
  33. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
  34. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +5 -8
  35. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
  36. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +174 -140
  37. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
  38. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +173 -139
  39. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
  40. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +17 -16
  41. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
  42. data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +4 -4
  43. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +1 -24
  44. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
  45. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +0 -23
  46. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
  47. data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +2 -2
  48. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +149 -112
  49. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
  50. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +148 -111
  51. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
  52. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +6 -8
  53. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
  54. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +149 -112
  55. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
  56. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +148 -111
  57. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
  58. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +5 -8
  59. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
  60. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +1 -24
  61. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +1 -1
  62. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -23
  63. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +1 -1
  64. data/node_modules/govuk-frontend/dist/govuk/components/input/macro-options.json +4 -4
  65. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +149 -112
  66. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
  67. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +148 -111
  68. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
  69. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +6 -8
  70. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
  71. data/node_modules/govuk-frontend/dist/govuk/components/password-input/macro-options.json +1 -1
  72. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +149 -112
  73. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
  74. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +148 -111
  75. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
  76. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +5 -8
  77. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
  78. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +1 -24
  79. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
  80. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +0 -23
  81. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
  82. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +1 -24
  83. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
  84. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +0 -23
  85. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
  86. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +1 -24
  87. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
  88. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +0 -23
  89. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
  90. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +1 -24
  91. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
  92. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +0 -23
  93. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
  94. data/node_modules/govuk-frontend/dist/govuk/components/textarea/macro-options.json +1 -1
  95. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  96. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +1 -1
  97. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  98. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  99. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  100. data/node_modules/govuk-frontend/dist/govuk/init.mjs +17 -13
  101. data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
  102. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +5 -10
  103. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +1 -1
  104. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
  105. data/node_modules/govuk-frontend/package.json +9 -9
  106. metadata +4 -6
  107. data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +0 -18
  108. data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs.map +0 -1
  109. data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +0 -31
  110. 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: 7b340b1565779a9e7ae1a1c56063a386e1083cad425b65b5b77313233767bf48
4
- data.tar.gz: ee7fd33d63fd4a00e2d8820637c859153d49047040df417453274eec0a81f048
3
+ metadata.gz: db74fa9c85934d448152da8903352a36ab46a513068455227b209267bb698a3f
4
+ data.tar.gz: 2fdd9cb41e512fab8054ee4005af8eabd2fa006394a19940388946e4887a31e6
5
5
  SHA512:
6
- metadata.gz: 20d167ef2111b13c7e9c97b6e2171cd85c426a713269e32c5cdc5b51459b1c14782a3975f1481e29046656461aa74f819f198e9edfb73750afd3a9774339d960
7
- data.tar.gz: 185782d6c5e7b10409bdd9a6dfc60c063bde552d9ecf2d3c8eede100a230feb189e1add437a927786dce35ad667a503b9f835153286a145fb5aea05358700ac8
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";
@@ -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>
@@ -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.1".freeze
2
+ VERSION = "51.2.0".freeze
3
3
  end