katalyst-govuk-formbuilder 1.10.2 → 1.12.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -0
  3. data/app/assets/builds/katalyst/govuk/formbuilder.css +30 -30
  4. data/app/assets/stylesheets/katalyst/govuk/components/combobox/_index.scss +100 -0
  5. data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss +3 -4
  6. data/lib/katalyst/govuk/formbuilder/builder.rb +41 -1
  7. data/lib/katalyst/govuk/formbuilder/elements/combobox.rb +60 -0
  8. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +1 -0
  9. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +35 -31
  10. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +4 -4
  11. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +6 -1
  12. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +16 -13
  13. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +1 -2
  14. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -0
  15. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -5
  16. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +8 -9
  17. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +8 -0
  18. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -4
  19. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -2
  20. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +24 -37
  21. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +13 -9
  22. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +12 -9
  23. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +0 -8
  24. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -5
  25. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +5 -5
  26. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +162 -0
  27. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
  28. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +6 -4
  29. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +2 -1
  30. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +11 -8
  31. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +12 -10
  32. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +3 -3
  33. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +2 -2
  34. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  35. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +44 -8
  36. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  37. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +2 -2
  38. data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +1 -1
  39. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +17 -0
  40. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +30 -62
  41. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +5 -1
  42. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +235 -9
  43. metadata +7 -4
  44. data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_richtextarea.scss +0 -2
@@ -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.12.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-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder
@@ -37,13 +37,14 @@ files:
37
37
  - app/assets/builds/katalyst/govuk/formbuilder.js
38
38
  - app/assets/builds/katalyst/govuk/formbuilder.min.js
39
39
  - app/assets/config/katalyst-govuk-formbuilder.js
40
+ - app/assets/stylesheets/katalyst/govuk/components/combobox/_index.scss
40
41
  - app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss
41
- - app/assets/stylesheets/katalyst/govuk/components/richtextarea/_richtextarea.scss
42
42
  - app/assets/stylesheets/katalyst/govuk/formbuilder.scss
43
43
  - config/importmap.rb
44
44
  - lib/katalyst/govuk/formbuilder.rb
45
45
  - lib/katalyst/govuk/formbuilder/builder.rb
46
46
  - lib/katalyst/govuk/formbuilder/containers/fieldset_context.rb
47
+ - lib/katalyst/govuk/formbuilder/elements/combobox.rb
47
48
  - lib/katalyst/govuk/formbuilder/elements/label.rb
48
49
  - lib/katalyst/govuk/formbuilder/elements/legend.rb
49
50
  - lib/katalyst/govuk/formbuilder/elements/rich_text_area.rb
@@ -109,6 +110,8 @@ files:
109
110
  - node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss
110
111
  - node_modules/govuk-frontend/dist/govuk/components/select/_index.scss
111
112
  - node_modules/govuk-frontend/dist/govuk/components/select/_select.scss
113
+ - node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
114
+ - node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss
112
115
  - node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss
113
116
  - node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss
114
117
  - node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss
@@ -209,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
212
  - !ruby/object:Gem::Version
210
213
  version: '0'
211
214
  requirements: []
212
- rubygems_version: 3.5.11
215
+ rubygems_version: 3.5.16
213
216
  signing_key:
214
217
  specification_version: 4
215
218
  summary: Repackaging of UK.GOV forms for Rails 7 asset pipeline
@@ -1,2 +0,0 @@
1
- @import "govuk-frontend/dist/govuk/base";
2
- @import "./index";