katalyst-govuk-formbuilder 1.10.2 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/builds/katalyst/govuk/formbuilder.css +20 -20
  3. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +1 -0
  4. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +35 -31
  5. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +4 -4
  6. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +6 -1
  7. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +16 -13
  8. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +1 -2
  9. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -0
  10. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -5
  11. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +8 -9
  12. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +8 -0
  13. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -4
  14. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -2
  15. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +24 -37
  16. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +13 -9
  17. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +12 -9
  18. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +0 -8
  19. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -5
  20. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +5 -5
  21. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +162 -0
  22. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
  23. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +6 -4
  24. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +2 -1
  25. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +11 -8
  26. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +12 -10
  27. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +3 -3
  28. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +2 -2
  29. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  30. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +44 -8
  31. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  32. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +2 -2
  33. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +1 -1
  34. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +17 -0
  35. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +30 -62
  36. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +5 -1
  37. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +235 -9
  38. metadata +5 -3
@@ -2,7 +2,7 @@
2
2
  /// @group helpers/accessibility
3
3
  ////
4
4
 
5
- /// Hide an element visually, but have it available for screen readers
5
+ /// Helper function containing the common code for the following two mixins
6
6
  ///
7
7
  /// @link https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
8
8
  /// - Hiding Content for Accessibility, Jonathan Snook, February 2011
@@ -11,23 +11,11 @@
11
11
  ///
12
12
  /// @param {Boolean} $important [true] - Whether to mark as `!important`
13
13
  ///
14
- /// @access public
14
+ /// @access private
15
15
 
16
- @mixin govuk-visually-hidden($important: true) {
16
+ @mixin _govuk-visually-hide-content($important: true) {
17
17
  position: absolute if($important, !important, null);
18
18
 
19
- // Absolute positioning has the unintended consequence of removing any
20
- // whitespace surrounding visually hidden text from the accessibility tree.
21
- // Insert a space character before and after visually hidden text to separate
22
- // it from any visible text surrounding it.
23
- &::before {
24
- content: "\00a0";
25
- }
26
-
27
- &::after {
28
- content: "\00a0";
29
- }
30
-
31
19
  width: 1px if($important, !important, null);
32
20
  height: 1px if($important, !important, null);
33
21
  // If margin is set to a negative value it can cause text to be announced in
@@ -36,6 +24,8 @@
36
24
  padding: 0 if($important, !important, null);
37
25
 
38
26
  overflow: hidden if($important, !important, null);
27
+
28
+ // `clip` is needed for IE11 support
39
29
  clip: rect(0 0 0 0) if($important, !important, null);
40
30
  -webkit-clip-path: inset(50%) if($important, !important, null);
41
31
  clip-path: inset(50%) if($important, !important, null);
@@ -55,62 +45,40 @@
55
45
  user-select: none;
56
46
  }
57
47
 
58
- /// Hide an element visually, but have it available for screen readers whilst
59
- /// allowing the element to be focused when navigated to via the keyboard (e.g.
60
- /// for the skip link)
61
- ///
62
- /// This is slightly less opinionated about borders and padding to make it
63
- /// easier to style the focussed element.
48
+ /// Hide an element visually, but have it available for screen readers
64
49
  ///
65
50
  /// @param {Boolean} $important [true] - Whether to mark as `!important`
66
51
  ///
67
52
  /// @access public
68
53
 
69
- @mixin govuk-visually-hidden-focusable($important: true) {
70
- position: absolute if($important, !important, null);
71
-
72
- width: 1px if($important, !important, null);
73
- height: 1px if($important, !important, null);
74
- // If margin is set to a negative value it can cause text to be announced in
75
- // the wrong order in VoiceOver for OSX
76
- margin: 0 if($important, !important, null);
77
-
78
- overflow: hidden if($important, !important, null);
79
- clip: rect(0 0 0 0) if($important, !important, null);
80
- -webkit-clip-path: inset(50%) if($important, !important, null);
81
- clip-path: inset(50%) if($important, !important, null);
82
-
83
- // For long content, line feeds are not interpreted as spaces and small width
84
- // causes content to wrap 1 word per line:
85
- // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
86
- white-space: nowrap if($important, !important, null);
87
-
88
- // Prevent users from selecting or copying visually-hidden text. This prevents
89
- // a user unintentionally copying more text than they intended and needing to
90
- // manually trim it down again.
91
- -webkit-user-select: none;
92
- -ms-user-select: none;
93
- user-select: none;
94
-
95
- &:active,
96
- &:focus {
97
- position: static if($important, !important, null);
54
+ @mixin govuk-visually-hidden($important: true) {
55
+ @include _govuk-visually-hide-content($important: $important);
98
56
 
99
- width: auto if($important, !important, null);
100
- height: auto if($important, !important, null);
101
- margin: inherit if($important, !important, null);
57
+ // Absolute positioning has the unintended consequence of removing any
58
+ // whitespace surrounding visually hidden text from the accessibility tree.
59
+ // Insert a space character before and after visually hidden text to separate
60
+ // it from any visible text surrounding it.
61
+ &::before {
62
+ content: "\00a0";
63
+ }
102
64
 
103
- overflow: visible if($important, !important, null);
104
- clip: auto if($important, !important, null);
105
- -webkit-clip-path: none if($important, !important, null);
106
- clip-path: none if($important, !important, null);
65
+ &::after {
66
+ content: "\00a0";
67
+ }
68
+ }
107
69
 
108
- white-space: inherit if($important, !important, null);
70
+ /// Hide an element visually, but have it available for screen readers whilst
71
+ /// allowing the element to be focused when navigated to via the keyboard (e.g.
72
+ /// for the skip link)
73
+ ///
74
+ /// @param {Boolean} $important [true] - Whether to mark as `!important`
75
+ ///
76
+ /// @access public
109
77
 
110
- // Allow the text to be selectable now it's visible
111
- -webkit-user-select: text;
112
- -ms-user-select: text;
113
- user-select: text;
78
+ @mixin govuk-visually-hidden-focusable($important: true) {
79
+ // IE 11 doesn't support the combined `:not(:active, :focus)` syntax.
80
+ &:not(:active):not(:focus) {
81
+ @include _govuk-visually-hide-content($important: $important);
114
82
  }
115
83
  }
116
84
 
@@ -28,11 +28,15 @@
28
28
  @include govuk-typography-weight-bold($important: true);
29
29
  }
30
30
 
31
- // Tabular numbers
31
+ // Typography helpers
32
32
 
33
33
  .govuk-\!-font-tabular-numbers {
34
34
  @include govuk-font-tabular-numbers($important: true);
35
35
  }
36
+
37
+ .govuk-\!-text-break-word {
38
+ @include govuk-text-break-word($important: true);
39
+ }
36
40
  }
37
41
 
38
42
  /*# sourceMappingURL=_typography.scss.map */
@@ -2,19 +2,213 @@
2
2
  /// @group settings/colours
3
3
  ////
4
4
 
5
- /// Organisation colours
5
+ /// Feature flag for updated organisation list and colours
6
+ ///
7
+ /// When set to true, $govuk-colours-organisations will use the new
8
+ /// organisation list and colour selection.
9
+ ///
10
+ /// Should be removed in 6.0.
11
+ ///
12
+ /// @type Boolean
13
+ /// @access public
14
+
15
+ $govuk-new-organisation-colours: false !default;
16
+
17
+ /// Current organisation colours
6
18
  ///
7
19
  /// @type Map
8
20
  ///
9
21
  /// @prop $organisation.colour - Colour for the given `$organisation`
10
- /// @prop $organisation.colour-websafe - Websafe colour for the given
11
- /// `$organisation`. We use `websafe` to mean strong enough contrast against
12
- /// white to be used for copy and meet the AAA (large text) and AA (smaller
22
+ /// @prop $organisation.contrast-safe - 'Contrast safe' colour for the given
23
+ /// `$organisation`. This colour has at least a 4.5:1 contrast against
24
+ /// white, to be used for copy and meet the AAA (large text) and AA (smaller
13
25
  /// copy) WCAG guidelines.
26
+ /// @prop $organisation.deprecation-message - Marks this organisation as
27
+ /// deprecated (usually because it has ceased to exist). Value is the
28
+ /// deprecation message output to the terminal when compiling.
14
29
  ///
15
- /// @access public
30
+ /// @access private
16
31
 
17
- $govuk-colours-organisations: (
32
+ $_govuk-organisation-colours: (
33
+ "attorney-generals-office": (
34
+ colour: #a91c8e
35
+ ),
36
+ "cabinet-office": (
37
+ colour: #0056b8
38
+ ),
39
+ "civil-service": (
40
+ colour: #b2292e
41
+ ),
42
+ "department-for-business-trade": (
43
+ colour: #e52d13,
44
+ contrast-safe: #e02c13
45
+ ),
46
+ "department-for-business-energy-industrial-strategy": (
47
+ colour: #003479,
48
+ deprecation-message:
49
+ "`department-for-business-energy-industrial-strategy` was dissolved in 2023. It was replaced by `department-for-business-trade`, `department-for-energy-security-net-zero` and `department-science-innovation-technology`."
50
+ ),
51
+ "department-for-business-innovation-skills": (
52
+ colour: #003479,
53
+ deprecation-message:
54
+ "`department-for-business-innovation-skills` became `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-business-trade` or `department-science-innovation-technology`."
55
+ ),
56
+ "department-for-communities-local-government": (
57
+ colour: #009999,
58
+ contrast-safe: #008080,
59
+ deprecation-message:
60
+ "`department-for-communities-local-government` became `ministry-of-housing-communities-local-government` in 2018."
61
+ ),
62
+ "department-for-culture-media-sport": (
63
+ colour: #d6006e
64
+ ),
65
+ "department-for-digital-culture-media-sport": (
66
+ colour: #d40072,
67
+ deprecation-message:
68
+ "`department-for-digital-culture-media-sport` became `department-for-culture-media-sport` in 2023."
69
+ ),
70
+ "department-for-education": (
71
+ colour: #003764
72
+ ),
73
+ "department-for-energy-security-net-zero": (
74
+ colour: #00a33b,
75
+ contrast-safe: #00852f
76
+ ),
77
+ "department-for-environment-food-rural-affairs": (
78
+ colour: #00af43,
79
+ contrast-safe: #008733
80
+ ),
81
+ "department-for-exiting-the-european-union": (
82
+ colour: #009fe3,
83
+ contrast-safe: #007db6,
84
+ deprecation-message: "`department-for-exiting-the-european-union` was dissolved in 2020."
85
+ ),
86
+ "department-for-international-development": (
87
+ colour: #002878,
88
+ deprecation-message:
89
+ "`department-for-international-development` was merged into `foreign-commonwealth-development-office` in 2020."
90
+ ),
91
+ "department-for-international-trade": (
92
+ colour: #cf102d,
93
+ deprecation-message: "`department-for-international-trade` was merged into `department-for-business-trade` in 2023."
94
+ ),
95
+ "department-for-levelling-up-housing-communities": (
96
+ colour: #012169,
97
+ deprecation-message:
98
+ "`department-for-levelling-up-housing-communities` was renamed to `ministry-of-housing-communities-local-government` in 2024."
99
+ ),
100
+ "department-for-science-innovation-technology": (
101
+ colour: #00f9f8,
102
+ contrast-safe: #008180
103
+ ),
104
+ "department-for-transport": (
105
+ colour: #006853
106
+ ),
107
+ "department-for-work-pensions": (
108
+ colour: #00bcb5,
109
+ contrast-safe: #00857e
110
+ ),
111
+ "department-of-energy-climate-change": (
112
+ colour: #009ddb,
113
+ contrast-safe: #007db3,
114
+ deprecation-message:
115
+ "`department-of-energy-climate-change` was merged into `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-energy-security-net-zero`."
116
+ ),
117
+ "department-of-health": (
118
+ colour: #00ad93,
119
+ contrast-safe: #008573,
120
+ deprecation-message: "`department-of-health` became `department-of-health-social-care` in 2018."
121
+ ),
122
+ "department-of-health-social-care": (
123
+ colour: #00a990,
124
+ contrast-safe: #008674
125
+ ),
126
+ "foreign-commonwealth-office": (
127
+ colour: #003e74,
128
+ deprecation-message: "`foreign-commonwealth-office` became `foreign-commonwealth-development-office` in 2018."
129
+ ),
130
+ "foreign-commonwealth-development-office": (
131
+ colour: #002269
132
+ ),
133
+ "government-equalities-office": (
134
+ colour: #0056b8,
135
+ deprecation-message: "`government-equalities-office` is deprecated. Use `cabinet-office` instead."
136
+ ),
137
+ "hm-government": (
138
+ colour: #266ebc
139
+ ),
140
+ "hm-revenue-customs": (
141
+ colour: #008476
142
+ ),
143
+ "hm-treasury": (
144
+ colour: #b2292e
145
+ ),
146
+ "home-office": (
147
+ colour: #732282
148
+ ),
149
+ "ministry-of-defence": (
150
+ colour: #532a45
151
+ ),
152
+ "ministry-of-housing-communities-local-government": (
153
+ colour: #00625e
154
+ ),
155
+ "ministry-of-justice": (
156
+ colour: #000000
157
+ ),
158
+ "northern-ireland-office": (
159
+ colour: #00205c
160
+ ),
161
+ "office-of-the-advocate-general-for-scotland": (
162
+ colour: #00205c
163
+ ),
164
+ "office-of-the-leader-of-the-house-of-commons": (
165
+ colour: #497629
166
+ ),
167
+ "office-of-the-leader-of-the-house-of-lords": (
168
+ colour: #9c182f
169
+ ),
170
+ "office-of-the-secretary-of-state-for-scotland": (
171
+ colour: #00205c
172
+ ),
173
+ "office-of-the-secretary-of-state-for-wales": (
174
+ colour: #a8353a
175
+ ),
176
+ "prime-ministers-office-10-downing-street": (
177
+ colour: #0b0c0c
178
+ ),
179
+ "scotland-office": (
180
+ colour: #002663,
181
+ deprecation-message: "`scotland-office` became `office-of-the-secretary-of-state-for-scotland` in 2018."
182
+ ),
183
+ "uk-export-finance": (
184
+ colour: #cf102d
185
+ ),
186
+ "uk-trade-investment": (
187
+ colour: #c80651,
188
+ deprecation-message:
189
+ "`uk-trade-investment` became `department-for-international-trade` in 2016. As of 2023, it is equivalent to `department-for-business-trade`."
190
+ ),
191
+ "wales-office": (
192
+ colour: #a33038,
193
+ deprecation-message: "`wales-office` became `office-of-the-secretary-of-state-for-wales` in 2018."
194
+ )
195
+ );
196
+
197
+ /// Legacy organisation colours
198
+ ///
199
+ /// These are the colours included with Frontend prior to 5.3.0. They will be
200
+ /// removed in a future major version of Frontend.
201
+ ///
202
+ /// @type Map
203
+ ///
204
+ /// @prop $organisation.colour - Colour for the given `$organisation`
205
+ /// @prop $organisation.colour-websafe - Optional alternative shade of the
206
+ /// organisation colour. Despite the name, is not guaranteed to be websafe
207
+ /// nor provide better contrast than the base colour.
208
+ ///
209
+ /// @access private
210
+
211
+ $_govuk-legacy-organisation-colours: (
18
212
  "attorney-generals-office": (
19
213
  colour: #9f1888,
20
214
  colour-websafe: #a03a88
@@ -30,7 +224,7 @@ $govuk-colours-organisations: (
30
224
  colour: #003479,
31
225
  colour-websafe: #347da4
32
226
  ),
33
- "department-for-communities-and-local-government": (
227
+ "department-for-communities-local-government": (
34
228
  colour: #009999,
35
229
  colour-websafe: #37836e
36
230
  ),
@@ -54,11 +248,11 @@ $govuk-colours-organisations: (
54
248
  colour: #cf102d,
55
249
  colour-websafe: #005ea5
56
250
  ),
57
- "department-for-business-and-trade": (
251
+ "department-for-business-trade": (
58
252
  colour: #cf102d,
59
253
  colour-websafe: #005ea5
60
254
  ),
61
- "department-for-levelling-up-housing-and-communities": (
255
+ "department-for-levelling-up-housing-communities": (
62
256
  colour: #012169
63
257
  ),
64
258
  "department-for-transport": (
@@ -143,6 +337,38 @@ $govuk-colours-organisations: (
143
337
  colour: #a33038,
144
338
  colour-websafe: #7a242a
145
339
  )
340
+ );
341
+
342
+ /// Set public organisation colours variable to one of the two maps.
343
+ /// Users can also pass their own map to this to override it entirely.
344
+ ///
345
+ /// @type Map
346
+ /// @access public
347
+
348
+ $govuk-colours-organisations: if(
349
+ $govuk-new-organisation-colours,
350
+ $_govuk-organisation-colours,
351
+ $_govuk-legacy-organisation-colours
146
352
  ) !default;
147
353
 
354
+ /// Organisation colour aliases
355
+ ///
356
+ /// Some organisations have been renamed within our code over time. Here we
357
+ /// map the prior key to the new equivalent key.
358
+ ///
359
+ /// Note: This is for internal renames only. If a department has changed name
360
+ /// or brand colour in a machinery of government change, it should be added to
361
+ /// $govuk-colours-organisations as a new entry with any superseded
362
+ /// organisations marked deprecated.
363
+ ///
364
+ /// @type Map
365
+ ///
366
+ /// @access private
367
+
368
+ $_govuk-colours-organisations-aliases: (
369
+ "department-for-business-and-trade": "department-for-business-trade",
370
+ "department-for-communities-and-local-government": "department-for-communities-local-government",
371
+ "department-for-levelling-up-housing-and-communities": "department-for-levelling-up-housing-communities"
372
+ );
373
+
148
374
  /*# sourceMappingURL=_colours-organisations.scss.map */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-govuk-formbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
11
+ date: 2024-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder
@@ -109,6 +109,8 @@ files:
109
109
  - node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss
110
110
  - node_modules/govuk-frontend/dist/govuk/components/select/_index.scss
111
111
  - node_modules/govuk-frontend/dist/govuk/components/select/_select.scss
112
+ - node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
113
+ - node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss
112
114
  - node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss
113
115
  - node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss
114
116
  - node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss
@@ -209,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
211
  - !ruby/object:Gem::Version
210
212
  version: '0'
211
213
  requirements: []
212
- rubygems_version: 3.5.11
214
+ rubygems_version: 3.5.16
213
215
  signing_key:
214
216
  specification_version: 4
215
217
  summary: Repackaging of UK.GOV forms for Rails 7 asset pipeline