katalyst-govuk-formbuilder 2.0.0 → 2.0.1
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.
- checksums.yaml +4 -4
- data/app/assets/builds/katalyst/govuk/formbuilder.css +2 -1
- data/app/helpers/katalyst/govuk/form_builder/builder.rb +4 -4
- data/app/helpers/katalyst/govuk/form_builder/frontend.rb +1 -2
- data/app/helpers/katalyst/govuk/form_builder/traits/attachment.rb +1 -2
- data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss +48 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss +68 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +48 -3
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +16 -2
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9be0ffa5b6b48aa38d62552e76d913b28e37d3b2447970c54889bff8db01b7c9
|
|
4
|
+
data.tar.gz: 0f463db5513498f07b7ee4d73eae197f249a1324b63f5eac7d8063cad00e780a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f57c36fceb0b60c335ce6d767dd4ec3ceb7817e3662b45957187803d1172bc102502532ff6da7bae778ff8690fbc05eea1dde61a0810c718dd3d6aa6b9c647f
|
|
7
|
+
data.tar.gz: d8b4a5b004f54293f3e3bea19be0e951864276045b863621fae633d3ae17c6d664493633c31938910e615e7cc0fcae942dd57e9c286b8ef4bd0b78ad2a5d86e3
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:root {
|
|
9
|
-
--govuk-frontend-version: "6.
|
|
9
|
+
--govuk-frontend-version: "6.5.0";
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
:root {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
@media print {
|
|
36
36
|
:root {
|
|
37
37
|
--govuk-text-colour: var(--govuk-print-text-colour, #000000);
|
|
38
|
+
--govuk-input-border-colour: var(--govuk-print-text-colour, #000000);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -473,10 +473,10 @@ module Katalyst
|
|
|
473
473
|
# @param [ActiveStorage::Variant,ActiveStorage::VariantWithRecord,ActiveStorage::Preview] representation
|
|
474
474
|
# @return [String,nil]
|
|
475
475
|
def attachment_preview_url(representation)
|
|
476
|
-
if @template.respond_to?(:
|
|
477
|
-
@template.
|
|
478
|
-
elsif @template.respond_to?(:main_app) && @template.main_app.respond_to?(:
|
|
479
|
-
@template.main_app.
|
|
476
|
+
if @template.respond_to?(:rails_representation_url)
|
|
477
|
+
@template.rails_representation_url(representation)
|
|
478
|
+
elsif @template.respond_to?(:main_app) && @template.main_app.respond_to?(:rails_representation_url)
|
|
479
|
+
@template.main_app.rails_representation_url(representation)
|
|
480
480
|
end
|
|
481
481
|
end
|
|
482
482
|
|
|
@@ -9,7 +9,7 @@ module Katalyst
|
|
|
9
9
|
# stream inserts). Render at the end of <body>; on a Turbo replace
|
|
10
10
|
# render the snippet re-executes with the new body, and everything it
|
|
11
11
|
# sets up is scoped to the body element it ran against.
|
|
12
|
-
# rubocop:disable Rails/OutputSafety
|
|
12
|
+
# rubocop:disable-next Rails/OutputSafety
|
|
13
13
|
def govuk_formbuilder_init
|
|
14
14
|
tag.script type: "module", nonce: request.content_security_policy_nonce do
|
|
15
15
|
<<~JS.html_safe
|
|
@@ -18,7 +18,6 @@ module Katalyst
|
|
|
18
18
|
JS
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
|
-
# rubocop:enable Rails/OutputSafety
|
|
22
21
|
|
|
23
22
|
private
|
|
24
23
|
|
|
@@ -116,9 +116,8 @@ module Katalyst
|
|
|
116
116
|
if @remove_button_text
|
|
117
117
|
# %{filename} is the option placeholder (govuk-frontend's i18n
|
|
118
118
|
# convention), substituted directly — not a Ruby format token.
|
|
119
|
-
# rubocop:disable Style/FormatStringToken
|
|
119
|
+
# rubocop:disable-next Style/FormatStringToken
|
|
120
120
|
@remove_button_text.gsub("%{filename}", blob.filename.to_s)
|
|
121
|
-
# rubocop:enable Style/FormatStringToken
|
|
122
121
|
else
|
|
123
122
|
attachment_translation(:remove_button, filename: blob.filename.to_s)
|
|
124
123
|
end
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@import "error-message";
|
|
11
11
|
@import "error-summary";
|
|
12
12
|
@import "exit-this-page";
|
|
13
|
+
@import "feedback";
|
|
13
14
|
@import "fieldset";
|
|
14
15
|
@import "file-upload";
|
|
15
16
|
@import "footer";
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
@import "input";
|
|
20
21
|
@import "inset-text";
|
|
21
22
|
@import "label";
|
|
23
|
+
@import "language-navigation";
|
|
22
24
|
@import "notification-banner";
|
|
23
25
|
@import "pagination";
|
|
24
26
|
@import "panel";
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@use "error-message";
|
|
11
11
|
@use "error-summary";
|
|
12
12
|
@use "exit-this-page";
|
|
13
|
+
@use "feedback";
|
|
13
14
|
@use "fieldset";
|
|
14
15
|
@use "file-upload";
|
|
15
16
|
@use "footer";
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
@use "input";
|
|
20
21
|
@use "inset-text";
|
|
21
22
|
@use "label";
|
|
23
|
+
@use "language-navigation";
|
|
22
24
|
@use "notification-banner";
|
|
23
25
|
@use "pagination";
|
|
24
26
|
@use "panel";
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
color: base.govuk-functional-colour(surface-text);
|
|
18
18
|
background-color: base.govuk-functional-colour(surface-background);
|
|
19
|
+
|
|
20
|
+
@media print {
|
|
21
|
+
border-bottom-color: currentcolor;
|
|
22
|
+
color: base.govuk-functional-colour(print-text);
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
// Support older browsers which don't hide elements with the `hidden` attribute
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@use "../../base";
|
|
2
|
+
|
|
3
|
+
/// @access private
|
|
4
|
+
@mixin styles {
|
|
5
|
+
.govuk-feedback {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
// Tie left/right padding to page gutter as it stretches across the whole
|
|
8
|
+
// screen on smaller screens
|
|
9
|
+
padding: base.govuk-spacing(4) base.$govuk-gutter-half base.govuk-spacing(5);
|
|
10
|
+
border-top: 1px solid;
|
|
11
|
+
border-color: base.govuk-functional-colour("brand");
|
|
12
|
+
background-color: base.govuk-functional-colour("surface-background");
|
|
13
|
+
|
|
14
|
+
@media #{base.govuk-from-breakpoint(tablet)} {
|
|
15
|
+
padding-right: base.govuk-spacing(4);
|
|
16
|
+
padding-left: base.govuk-spacing(4);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Override $govuk-width-container's left and right margin as we want Feedback
|
|
20
|
+
// to go across the whole screen on smaller screens
|
|
21
|
+
@media #{base.govuk-until-breakpoint(tablet)} {
|
|
22
|
+
margin-right: 0;
|
|
23
|
+
margin-left: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media print {
|
|
27
|
+
border-color: currentcolor;
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.govuk-feedback__title {
|
|
33
|
+
@include base.govuk-font($size: 24, $weight: bold);
|
|
34
|
+
margin-top: 0;
|
|
35
|
+
color: base.govuk-functional-colour(text);
|
|
36
|
+
@include base.govuk-responsive-margin(1, "bottom");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Removes the bottom margin from the final child element eg: a paragraph
|
|
40
|
+
//
|
|
41
|
+
// Feedback body doesn't have any opinions about typography. Instead we defer
|
|
42
|
+
// to users to use typography classes in their input, or apply a `govuk-body`
|
|
43
|
+
// paragraph for if users pass `text`.
|
|
44
|
+
.govuk-feedback__body > :last-child {
|
|
45
|
+
margin-bottom: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
border-top-color: base.govuk-functional-colour(brand);
|
|
20
20
|
color: $govuk-footer-text;
|
|
21
21
|
background: base.govuk-functional-colour(template-background);
|
|
22
|
+
|
|
23
|
+
@media print {
|
|
24
|
+
border-top-color: currentcolor;
|
|
25
|
+
color: base.govuk-functional-colour(text);
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
.govuk-footer__crown {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "../../base";
|
|
2
|
+
|
|
3
|
+
/// @access private
|
|
4
|
+
@mixin styles {
|
|
5
|
+
.govuk-language-navigation {
|
|
6
|
+
@include base.govuk-font($size: 19);
|
|
7
|
+
|
|
8
|
+
@include base.govuk-responsive-margin(6, "bottom");
|
|
9
|
+
color: base.govuk-functional-colour(text);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.govuk-language-navigation__list {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
row-gap: base.govuk-spacing(2);
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
list-style-type: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.govuk-language-navigation__list-item {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
|
|
25
|
+
&:not(:last-child) {
|
|
26
|
+
&::after {
|
|
27
|
+
content: "";
|
|
28
|
+
display: block;
|
|
29
|
+
height: 1em;
|
|
30
|
+
margin-right: base.govuk-spacing(2);
|
|
31
|
+
margin-left: base.govuk-spacing(2);
|
|
32
|
+
border-right: 1px solid;
|
|
33
|
+
border-right-color: base.govuk-functional-colour(border);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.govuk-language-navigation__link {
|
|
39
|
+
@include base.govuk-link-common;
|
|
40
|
+
@include base.govuk-link-style-default;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.govuk-language-navigation--inverse {
|
|
44
|
+
color: base.govuk-functional-colour(inverse-text);
|
|
45
|
+
|
|
46
|
+
.govuk-language-navigation__link {
|
|
47
|
+
@include base.govuk-link-style-inverse;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.govuk-language-navigation__list-item::after {
|
|
51
|
+
border-right-color: currentcolor;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Ensure the Language navigation has enough
|
|
56
|
+
// spacing with the rest of the Service Navigation
|
|
57
|
+
.govuk-service-navigation .govuk-language-navigation {
|
|
58
|
+
// Slightly smaller margin because the Service Navigation's menu toggle
|
|
59
|
+
// has a little margin underneath it already.
|
|
60
|
+
margin-top: base.govuk-spacing(1);
|
|
61
|
+
margin-bottom: base.govuk-spacing(3);
|
|
62
|
+
|
|
63
|
+
@media #{base.govuk-from-breakpoint(tablet)} {
|
|
64
|
+
margin-top: base.govuk-spacing(3);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -20,6 +20,28 @@
|
|
|
20
20
|
--govuk-text-colour: #{$govuk-service-navigation-text-colour};
|
|
21
21
|
color: base.govuk-functional-colour(text);
|
|
22
22
|
background-color: $govuk-service-navigation-background;
|
|
23
|
+
|
|
24
|
+
@media print {
|
|
25
|
+
border-bottom-color: currentcolor;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.govuk-service-navigation__inlining-container {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
align-items: baseline;
|
|
34
|
+
|
|
35
|
+
.govuk-service-navigation__container {
|
|
36
|
+
// Expand the container to shift the `end` slot to the right
|
|
37
|
+
flex-grow: 1;
|
|
38
|
+
|
|
39
|
+
// Ensure some space between the `end` slot and the container
|
|
40
|
+
// when displayed inline
|
|
41
|
+
&:not(:last-child) {
|
|
42
|
+
margin-right: base.govuk-spacing(6);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
23
45
|
}
|
|
24
46
|
|
|
25
47
|
.govuk-service-navigation__container {
|
|
@@ -27,9 +49,16 @@
|
|
|
27
49
|
flex-direction: column;
|
|
28
50
|
align-items: start;
|
|
29
51
|
|
|
52
|
+
// Avoid the end slot rendering on the right of the container
|
|
53
|
+
// in small viewports by ensuring the container is full width
|
|
54
|
+
@media #{base.govuk-until-breakpoint(tablet)} {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
30
58
|
@media #{base.govuk-from-breakpoint(tablet)} {
|
|
31
59
|
flex-direction: row;
|
|
32
60
|
flex-wrap: wrap;
|
|
61
|
+
align-items: center;
|
|
33
62
|
}
|
|
34
63
|
}
|
|
35
64
|
|
|
@@ -65,6 +94,10 @@
|
|
|
65
94
|
@include base.govuk-responsive-margin(6, $direction: right);
|
|
66
95
|
}
|
|
67
96
|
}
|
|
97
|
+
|
|
98
|
+
@media print {
|
|
99
|
+
border-color: currentcolor;
|
|
100
|
+
}
|
|
68
101
|
}
|
|
69
102
|
|
|
70
103
|
// Remove the top margin of the first nav item if there is a service name but
|
|
@@ -207,10 +240,19 @@
|
|
|
207
240
|
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
|
|
208
241
|
background-color: base.govuk-functional-colour(brand);
|
|
209
242
|
|
|
243
|
+
@media print {
|
|
244
|
+
--govuk-text-colour: #{base.govuk-functional-colour(print-text)};
|
|
245
|
+
background-color: transparent;
|
|
246
|
+
}
|
|
247
|
+
|
|
210
248
|
.govuk-width-container {
|
|
211
249
|
border-width: 1px 0;
|
|
212
250
|
border-style: solid;
|
|
213
251
|
border-color: $govuk-service-navigation-border-colour;
|
|
252
|
+
|
|
253
|
+
@media print {
|
|
254
|
+
border-color: currentcolor;
|
|
255
|
+
}
|
|
214
256
|
}
|
|
215
257
|
|
|
216
258
|
// Subtract 1px of space to account for the extra border-top
|
|
@@ -224,9 +266,12 @@
|
|
|
224
266
|
border-color: currentcolor;
|
|
225
267
|
}
|
|
226
268
|
|
|
227
|
-
// Override link styles
|
|
228
|
-
|
|
229
|
-
|
|
269
|
+
// Override link styles if on screens
|
|
270
|
+
// In print, we want the normal link styles to still apply
|
|
271
|
+
@media not print {
|
|
272
|
+
.govuk-service-navigation__link {
|
|
273
|
+
@include base.govuk-link-style-text;
|
|
274
|
+
}
|
|
230
275
|
}
|
|
231
276
|
|
|
232
277
|
// Override mobile menu toggle colour when not focused
|
|
@@ -29,11 +29,23 @@ $govuk-colours-organisations: (
|
|
|
29
29
|
"civil-service": (
|
|
30
30
|
colour: #b2292e
|
|
31
31
|
),
|
|
32
|
+
"department-for-business-innovation-science-trade": (
|
|
33
|
+
colour: #ff4328,
|
|
34
|
+
contrast-safe: #d92f14
|
|
35
|
+
),
|
|
32
36
|
"department-for-business-trade": (
|
|
33
37
|
colour: #e52d13,
|
|
34
|
-
contrast-safe: #e02c13
|
|
38
|
+
contrast-safe: #e02c13,
|
|
39
|
+
deprecation-message:
|
|
40
|
+
"`department-for-business-trade` was renamed to `department-for-business-innovation-science-trade` in July 2026."
|
|
35
41
|
),
|
|
36
42
|
"department-for-culture-media-sport": (
|
|
43
|
+
colour: #ed1588,
|
|
44
|
+
contrast-safe: #d6177a,
|
|
45
|
+
deprecation-message:
|
|
46
|
+
"`department-for-culture-media-sport` was renamed to `department-for-digital-culture-media-sport` in July 2026."
|
|
47
|
+
),
|
|
48
|
+
"department-for-digital-culture-media-sport": (
|
|
37
49
|
colour: #ed1588,
|
|
38
50
|
contrast-safe: #d6177a
|
|
39
51
|
),
|
|
@@ -49,7 +61,9 @@ $govuk-colours-organisations: (
|
|
|
49
61
|
),
|
|
50
62
|
"department-for-science-innovation-technology": (
|
|
51
63
|
colour: #00f8f8,
|
|
52
|
-
contrast-safe: #008180
|
|
64
|
+
contrast-safe: #008180,
|
|
65
|
+
deprecation-message:
|
|
66
|
+
"`department-for-science-innovation-technology` was dissolved in July 2026. It was split into `department-for-business-innovation-science-trade` and `department-for-digital-culture-media-sport`."
|
|
53
67
|
),
|
|
54
68
|
"department-for-transport": (
|
|
55
69
|
colour: #006853
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: katalyst-govuk-formbuilder
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Katalyst Interactive
|
|
@@ -134,6 +134,10 @@ files:
|
|
|
134
134
|
- node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.import.scss
|
|
135
135
|
- node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss
|
|
136
136
|
- node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss
|
|
137
|
+
- node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss
|
|
138
|
+
- node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss
|
|
139
|
+
- node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss
|
|
140
|
+
- node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss
|
|
137
141
|
- node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.import.scss
|
|
138
142
|
- node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.import.scss
|
|
139
143
|
- node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss
|
|
@@ -170,6 +174,10 @@ files:
|
|
|
170
174
|
- node_modules/govuk-frontend/dist/govuk/components/label/_index.scss
|
|
171
175
|
- node_modules/govuk-frontend/dist/govuk/components/label/_label.import.scss
|
|
172
176
|
- node_modules/govuk-frontend/dist/govuk/components/label/_mixin.scss
|
|
177
|
+
- node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss
|
|
178
|
+
- node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss
|
|
179
|
+
- node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss
|
|
180
|
+
- node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss
|
|
173
181
|
- node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.import.scss
|
|
174
182
|
- node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss
|
|
175
183
|
- node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss
|