dxw_govuk_frontend_rails 3.14.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +0 -4
- data/Gemfile.lock +1 -1
- data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
- data/package-lock.json +5 -12
- data/package.json +1 -1
- data/vendor/assets/javascripts/govuk_frontend_rails.js +4527 -2376
- data/vendor/assets/stylesheets/all-ie8.scss +8 -0
- data/vendor/assets/stylesheets/components/_all.scss +2 -1
- data/vendor/assets/stylesheets/components/accordion/_index.scss +294 -99
- data/vendor/assets/stylesheets/components/back-link/_index.scss +20 -20
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +22 -13
- data/vendor/assets/stylesheets/components/button/_index.scss +37 -27
- data/vendor/assets/stylesheets/components/character-count/_index.scss +9 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +9 -8
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +0 -2
- data/vendor/assets/stylesheets/components/error-message/_index.scss +1 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +6 -1
- data/vendor/assets/stylesheets/components/footer/_index.scss +16 -67
- data/vendor/assets/stylesheets/components/header/_index.scss +44 -26
- data/vendor/assets/stylesheets/components/hint/_index.scss +1 -3
- data/vendor/assets/stylesheets/components/input/_index.scss +29 -27
- data/vendor/assets/stylesheets/components/pagination/_index.scss +247 -0
- data/vendor/assets/stylesheets/components/pagination/_pagination.scss +2 -0
- data/vendor/assets/stylesheets/components/panel/_index.scss +1 -1
- data/vendor/assets/stylesheets/components/radios/_index.scss +10 -17
- data/vendor/assets/stylesheets/components/select/_index.scss +19 -2
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +14 -3
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +164 -33
- data/vendor/assets/stylesheets/components/table/_index.scss +1 -1
- data/vendor/assets/stylesheets/components/tabs/_index.scss +2 -2
- data/vendor/assets/stylesheets/components/tag/_index.scss +18 -23
- data/vendor/assets/stylesheets/components/textarea/_index.scss +9 -2
- data/vendor/assets/stylesheets/core/_all.scss +1 -1
- data/vendor/assets/stylesheets/core/_global-styles.scss +0 -6
- data/vendor/assets/stylesheets/core/_govuk-frontend-version.scss +5 -0
- data/vendor/assets/stylesheets/core/_links.scss +0 -6
- data/vendor/assets/stylesheets/core/_lists.scss +0 -6
- data/vendor/assets/stylesheets/core/_section-break.scss +1 -7
- data/vendor/assets/stylesheets/core/_typography.scss +0 -6
- data/vendor/assets/stylesheets/helpers/_colour.scss +10 -7
- data/vendor/assets/stylesheets/helpers/_focused.scss +6 -1
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_links.scss +13 -11
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +2 -2
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_spacing.scss +3 -3
- data/vendor/assets/stylesheets/helpers/_typography.scss +16 -9
- data/vendor/assets/stylesheets/objects/_all.scss +1 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +10 -26
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +15 -30
- data/vendor/assets/stylesheets/objects/_template.scss +32 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +1 -5
- data/vendor/assets/stylesheets/overrides/_display.scss +0 -6
- data/vendor/assets/stylesheets/overrides/_spacing.scss +56 -18
- data/vendor/assets/stylesheets/overrides/_text-align.scss +0 -6
- data/vendor/assets/stylesheets/overrides/_typography.scss +0 -6
- data/vendor/assets/stylesheets/overrides/_width.scss +0 -6
- data/vendor/assets/stylesheets/settings/_all.scss +1 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +7 -0
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +12 -0
- data/vendor/assets/stylesheets/settings/_compatibility.scss +26 -0
- data/vendor/assets/stylesheets/settings/_ie8.scss +16 -0
- data/vendor/assets/stylesheets/settings/_links.scss +5 -1
- data/vendor/assets/stylesheets/settings/_measurements.scss +5 -15
- data/vendor/assets/stylesheets/settings/_spacing.scss +4 -8
- data/vendor/assets/stylesheets/settings/_typography-font.scss +23 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +12 -0
- data/vendor/assets/stylesheets/settings/_warnings.scss +53 -0
- data/vendor/assets/stylesheets/tools/_all.scss +0 -1
- data/vendor/assets/stylesheets/tools/_compatibility.scss +20 -6
- data/vendor/assets/stylesheets/tools/_exports.scss +1 -1
- data/vendor/assets/stylesheets/tools/_font-url.scss +1 -1
- data/vendor/assets/stylesheets/tools/_ie8.scss +38 -2
- data/vendor/assets/stylesheets/tools/_image-url.scss +1 -1
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +2 -2
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +1 -1
- metadata +8 -3
@@ -13,6 +13,8 @@
|
|
13
13
|
///
|
14
14
|
/// @type Boolean
|
15
15
|
/// @access public
|
16
|
+
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
|
17
|
+
/// suite of tools and settings
|
16
18
|
|
17
19
|
$govuk-use-legacy-font: if(
|
18
20
|
(
|
@@ -24,6 +26,17 @@ $govuk-use-legacy-font: if(
|
|
24
26
|
false
|
25
27
|
) !default;
|
26
28
|
|
29
|
+
// Only show the deprecation warning if user is setting $govuk-use-legacy-font
|
30
|
+
// manually instead of automatically via compatibility variables
|
31
|
+
@if $govuk-use-legacy-font == true and
|
32
|
+
$govuk-compatibility-govukfrontendtoolkit == false and
|
33
|
+
$govuk-compatibility-govuktemplate == false and
|
34
|
+
$govuk-compatibility-govukelements == false {
|
35
|
+
@include _warning(legacy-font, "$govuk-use-legacy-font is deprecated. " +
|
36
|
+
"From version 5.0, GOV.UK Frontend will only support the included version " +
|
37
|
+
"of GDS Transport.");
|
38
|
+
}
|
39
|
+
|
27
40
|
// =========================================================
|
28
41
|
// Font families
|
29
42
|
// =========================================================
|
@@ -43,6 +56,8 @@ $govuk-font-family: if(
|
|
43
56
|
///
|
44
57
|
/// @type List
|
45
58
|
/// @access public
|
59
|
+
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
|
60
|
+
/// suite of tools and settings
|
46
61
|
|
47
62
|
$govuk-font-family-tabular: if(
|
48
63
|
$govuk-use-legacy-font,
|
@@ -50,6 +65,14 @@ $govuk-font-family-tabular: if(
|
|
50
65
|
false
|
51
66
|
) !default;
|
52
67
|
|
68
|
+
// Only show the deprecation warning if user is setting $govuk-font-family-tabular
|
69
|
+
// manually instead of automatically via $govuk-use-legacy-font
|
70
|
+
@if $govuk-font-family-tabular != false and $govuk-use-legacy-font == false {
|
71
|
+
@include _warning(tabular-font-face, "$govuk-font-family-tabular is deprecated. " +
|
72
|
+
"From version 5.0, GOV.UK Frontend will not support using a separate " +
|
73
|
+
"font-face for tabular numbers.");
|
74
|
+
}
|
75
|
+
|
53
76
|
/// Font families to use for print media
|
54
77
|
///
|
55
78
|
/// We recommend that you use system fonts when printing. This will avoid issues
|
@@ -13,6 +13,8 @@
|
|
13
13
|
///
|
14
14
|
/// @type Boolean
|
15
15
|
/// @access public
|
16
|
+
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
|
17
|
+
/// suite of tools and settings
|
16
18
|
|
17
19
|
$govuk-typography-use-rem: if(
|
18
20
|
(
|
@@ -24,6 +26,16 @@ $govuk-typography-use-rem: if(
|
|
24
26
|
true
|
25
27
|
) !default;
|
26
28
|
|
29
|
+
// Only show the deprecation warning if user is setting $govuk-typography-use-rem
|
30
|
+
// manually instead of automatically via compatibility variables
|
31
|
+
@if $govuk-typography-use-rem == false and
|
32
|
+
$govuk-compatibility-govukfrontendtoolkit == false and
|
33
|
+
$govuk-compatibility-govuktemplate == false and
|
34
|
+
$govuk-compatibility-govukelements == false {
|
35
|
+
@include _warning(allow-not-using-rem, "$govuk-typography-use-rem is deprecated. " +
|
36
|
+
"From version 5.0, GOV.UK Frontend will not support disabling rem font sizes.");
|
37
|
+
}
|
38
|
+
|
27
39
|
/// Root font size
|
28
40
|
///
|
29
41
|
/// This is used to calculate rem sizes for the typography, and should match the
|
@@ -0,0 +1,53 @@
|
|
1
|
+
////
|
2
|
+
/// @group settings/warnings
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Suppressed warnings map
|
6
|
+
///
|
7
|
+
/// This map is used to determine which deprecation warnings to **not** show
|
8
|
+
/// to users when compiling sass. This is in place for codebases that do not
|
9
|
+
/// have the necessary capacity to upgrade and remove the deprecation,
|
10
|
+
/// particularly if the deprecation is significant. For example, removal of
|
11
|
+
/// compatibility with legacy libraries such as govuk_elements.
|
12
|
+
///
|
13
|
+
/// You can add to this map and define which warnings to suppress by appending to
|
14
|
+
/// it using the warning key, found in the warning message. For example:
|
15
|
+
///
|
16
|
+
/// @example scss:
|
17
|
+
/// // warning message:
|
18
|
+
/// // $foobar is no longer supported. To silence this warning, update
|
19
|
+
/// // $govuk-suppressed-warnings with key: "foobar"
|
20
|
+
/// $govuk-suppressed-warnings: (
|
21
|
+
/// foobar
|
22
|
+
/// );
|
23
|
+
///
|
24
|
+
/// @type List
|
25
|
+
/// @access public
|
26
|
+
|
27
|
+
$govuk-suppressed-warnings: () !default;
|
28
|
+
|
29
|
+
/// Warnings
|
30
|
+
///
|
31
|
+
/// Acts as a wrapper for the built in `@warn` sass function
|
32
|
+
///
|
33
|
+
/// We use this instead of using `@warn` for 3 reasons:
|
34
|
+
///
|
35
|
+
/// - To check if a warning is being suppressed through `$govuk-suppressed-warnings`,
|
36
|
+
/// in which case we don't call `@warn` and printing the warning to the user
|
37
|
+
/// - To format the passed warning `$message` with the warning key at the end
|
38
|
+
/// - To prevent duplicate warnings by adding the passed `$key` to
|
39
|
+
/// `$govuk-suppressed-warnings` after `@warn` is called to ensure it only runs
|
40
|
+
/// once per sass compilation
|
41
|
+
///
|
42
|
+
/// @param {String} $key - The key to be checked against `$govuk-suppressed-warnings`
|
43
|
+
/// and then passed to it to prevent multiple of the same warning.
|
44
|
+
/// @param {String} $message - The message to use when calling `@warn`
|
45
|
+
/// @access private
|
46
|
+
|
47
|
+
@mixin _warning($key, $message) {
|
48
|
+
@if not index($govuk-suppressed-warnings, $key) {
|
49
|
+
@warn $message + " To silence this warning, update $govuk-suppressed-warnings " +
|
50
|
+
"with key: \"#{$key}\"";
|
51
|
+
$govuk-suppressed-warnings: append($govuk-suppressed-warnings, $key) !global;
|
52
|
+
}
|
53
|
+
}
|
@@ -2,6 +2,20 @@
|
|
2
2
|
/// @group tools/compatibility-mode
|
3
3
|
////
|
4
4
|
|
5
|
+
/// Temporary private version of govuk-compatibility to avoid deprecation warnings
|
6
|
+
///
|
7
|
+
/// @access private
|
8
|
+
|
9
|
+
@mixin _govuk-compatibility($product) {
|
10
|
+
@if map-has-key($_govuk-compatibility, $product) {
|
11
|
+
@if map-get($_govuk-compatibility, $product) == true {
|
12
|
+
@content;
|
13
|
+
}
|
14
|
+
} @else {
|
15
|
+
@error "Non existent product '#{$product}'";
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
5
19
|
/// Conditional Compatibility Mixin
|
6
20
|
///
|
7
21
|
/// Selectively output a block (available to the mixin as @content) if a given
|
@@ -24,13 +38,13 @@
|
|
24
38
|
/// this product
|
25
39
|
/// @throw Errors if product name is not recognised
|
26
40
|
/// @access public
|
41
|
+
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
|
42
|
+
/// suite of tools and settings
|
27
43
|
|
28
44
|
@mixin govuk-compatibility($product) {
|
29
|
-
@
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
} @else {
|
34
|
-
@error "Non existent product '#{$product}'";
|
45
|
+
@include _warning(compatibility-helper, "govuk-compatibility is deprecated. " +
|
46
|
+
"From version 5.0, GOV.UK Frontend will not support compatibility mode.");
|
47
|
+
@include _govuk-compatibility($product) {
|
48
|
+
@content;
|
35
49
|
}
|
36
50
|
}
|
@@ -22,7 +22,7 @@ $_govuk-imported-modules: () !default;
|
|
22
22
|
|
23
23
|
@mixin govuk-exports($name) {
|
24
24
|
// If the mixin is not in the list of modules already exported...
|
25
|
-
@if
|
25
|
+
@if not index($_govuk-imported-modules, $name) {
|
26
26
|
// ... then add it to the list
|
27
27
|
$_govuk-imported-modules: append($_govuk-imported-modules, $name) !global;
|
28
28
|
// ... and output the CSS for that module
|
@@ -17,7 +17,7 @@
|
|
17
17
|
and $govuk-font-url-function
|
18
18
|
and function-exists($govuk-font-url-function);
|
19
19
|
|
20
|
-
@if
|
20
|
+
@if $use-custom-function {
|
21
21
|
@return call(get-function($govuk-font-url-function), $filename);
|
22
22
|
} @else {
|
23
23
|
@return url($govuk-fonts-path + $filename);
|
@@ -1,7 +1,20 @@
|
|
1
|
+
@import "../settings/warnings";
|
2
|
+
|
1
3
|
////
|
2
4
|
/// @group tools/internet-explorer-8
|
3
5
|
////
|
4
6
|
|
7
|
+
/// A private version of the govuk-if-ie8 mixin to avoid deprecation
|
8
|
+
/// warnings where we use it internally
|
9
|
+
///
|
10
|
+
/// @access private
|
11
|
+
|
12
|
+
@mixin _govuk-if-ie8 {
|
13
|
+
@if $govuk-is-ie8 {
|
14
|
+
@content;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
5
18
|
/// Conditionally include rules only for IE8
|
6
19
|
///
|
7
20
|
/// @content Passed content is only outputted if we're compiling a stylesheet
|
@@ -18,9 +31,26 @@
|
|
18
31
|
/// }
|
19
32
|
///
|
20
33
|
/// @access public
|
34
|
+
/// @deprecated Will be removed in v5.0
|
21
35
|
|
22
36
|
@mixin govuk-if-ie8 {
|
23
|
-
@
|
37
|
+
@include _warning(
|
38
|
+
ie8,
|
39
|
+
"The govuk-if-ie8 mixin is deprecated and will be removed in v5.0."
|
40
|
+
);
|
41
|
+
|
42
|
+
@include _govuk-if-ie8 {
|
43
|
+
@content;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
/// A private version of the govuk-not-ie8 mixin to avoid deprecation
|
48
|
+
/// warnings where we use it internally
|
49
|
+
///
|
50
|
+
/// @access private
|
51
|
+
|
52
|
+
@mixin _govuk-not-ie8 {
|
53
|
+
@if not $govuk-is-ie8 {
|
24
54
|
@content;
|
25
55
|
}
|
26
56
|
}
|
@@ -43,9 +73,15 @@
|
|
43
73
|
/// }
|
44
74
|
///
|
45
75
|
/// @access public
|
76
|
+
/// @deprecated Will be removed in v5.0
|
46
77
|
|
47
78
|
@mixin govuk-not-ie8 {
|
48
|
-
@
|
79
|
+
@include _warning(
|
80
|
+
ie8,
|
81
|
+
"The govuk-not-ie8 mixin is deprecated and will be removed in v5.0."
|
82
|
+
);
|
83
|
+
|
84
|
+
@include _govuk-not-ie8 {
|
49
85
|
@content;
|
50
86
|
}
|
51
87
|
}
|
@@ -17,7 +17,7 @@
|
|
17
17
|
and $govuk-image-url-function
|
18
18
|
and function-exists($govuk-image-url-function);
|
19
19
|
|
20
|
-
@if
|
20
|
+
@if $use-custom-function {
|
21
21
|
@return call(get-function($govuk-image-url-function), $filename);
|
22
22
|
} @else {
|
23
23
|
@return url($govuk-images-path + $filename);
|
@@ -10,10 +10,10 @@
|
|
10
10
|
/// @access public
|
11
11
|
|
12
12
|
@function govuk-em($value, $context-font-size) {
|
13
|
-
@if
|
13
|
+
@if unitless($value) {
|
14
14
|
$value: $value * 1px;
|
15
15
|
}
|
16
|
-
@if
|
16
|
+
@if unitless($context-font-size) {
|
17
17
|
$context-font-size: $context-font-size * 1px;
|
18
18
|
}
|
19
19
|
@return $value / $context-font-size * 1em;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dxw_govuk_frontend_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mec
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -121,6 +121,8 @@ files:
|
|
121
121
|
- vendor/assets/stylesheets/components/label/_label.scss
|
122
122
|
- vendor/assets/stylesheets/components/notification-banner/_index.scss
|
123
123
|
- vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss
|
124
|
+
- vendor/assets/stylesheets/components/pagination/_index.scss
|
125
|
+
- vendor/assets/stylesheets/components/pagination/_pagination.scss
|
124
126
|
- vendor/assets/stylesheets/components/panel/_index.scss
|
125
127
|
- vendor/assets/stylesheets/components/panel/_panel.scss
|
126
128
|
- vendor/assets/stylesheets/components/phase-banner/_index.scss
|
@@ -145,6 +147,7 @@ files:
|
|
145
147
|
- vendor/assets/stylesheets/components/warning-text/_warning-text.scss
|
146
148
|
- vendor/assets/stylesheets/core/_all.scss
|
147
149
|
- vendor/assets/stylesheets/core/_global-styles.scss
|
150
|
+
- vendor/assets/stylesheets/core/_govuk-frontend-version.scss
|
148
151
|
- vendor/assets/stylesheets/core/_links.scss
|
149
152
|
- vendor/assets/stylesheets/core/_lists.scss
|
150
153
|
- vendor/assets/stylesheets/core/_section-break.scss
|
@@ -169,6 +172,7 @@ files:
|
|
169
172
|
- vendor/assets/stylesheets/objects/_form-group.scss
|
170
173
|
- vendor/assets/stylesheets/objects/_grid.scss
|
171
174
|
- vendor/assets/stylesheets/objects/_main-wrapper.scss
|
175
|
+
- vendor/assets/stylesheets/objects/_template.scss
|
172
176
|
- vendor/assets/stylesheets/objects/_width-container.scss
|
173
177
|
- vendor/assets/stylesheets/overrides/_all.scss
|
174
178
|
- vendor/assets/stylesheets/overrides/_display.scss
|
@@ -191,6 +195,7 @@ files:
|
|
191
195
|
- vendor/assets/stylesheets/settings/_typography-font-families.scss
|
192
196
|
- vendor/assets/stylesheets/settings/_typography-font.scss
|
193
197
|
- vendor/assets/stylesheets/settings/_typography-responsive.scss
|
198
|
+
- vendor/assets/stylesheets/settings/_warnings.scss
|
194
199
|
- vendor/assets/stylesheets/tools/_all.scss
|
195
200
|
- vendor/assets/stylesheets/tools/_compatibility.scss
|
196
201
|
- vendor/assets/stylesheets/tools/_exports.scss
|
@@ -223,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
228
|
- !ruby/object:Gem::Version
|
224
229
|
version: '0'
|
225
230
|
requirements: []
|
226
|
-
rubygems_version: 3.
|
231
|
+
rubygems_version: 3.3.26
|
227
232
|
signing_key:
|
228
233
|
specification_version: 4
|
229
234
|
summary: Adds the GOVUK frontend to a Rails application that uses the Asset Pipeline.
|