dxw_govuk_frontend_rails 3.3.0 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/gempush.yml +2 -2
  3. data/.github/workflows/test.yml +19 -0
  4. data/Gemfile.lock +3 -3
  5. data/dxw_govuk_frontend_rails.gemspec +1 -1
  6. data/lib/dxw_govuk_frontend_rails.rb +12 -1
  7. data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
  8. data/package-lock.json +3 -3
  9. data/package.json +1 -1
  10. data/vendor/assets/javascripts/govuk_frontend_rails.js +41 -68
  11. data/vendor/assets/stylesheets/_base.scss +3 -0
  12. data/vendor/assets/stylesheets/all.scss +1 -3
  13. data/vendor/assets/stylesheets/components/_all.scss +31 -29
  14. data/vendor/assets/stylesheets/components/accordion/_accordion.scss +2 -208
  15. data/vendor/assets/stylesheets/components/accordion/_index.scss +207 -0
  16. data/vendor/assets/stylesheets/components/back-link/_back-link.scss +2 -62
  17. data/vendor/assets/stylesheets/components/back-link/_index.scss +112 -0
  18. data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +2 -118
  19. data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +138 -0
  20. data/vendor/assets/stylesheets/components/button/_button.scss +2 -290
  21. data/vendor/assets/stylesheets/components/button/_index.scss +280 -0
  22. data/vendor/assets/stylesheets/components/character-count/_character-count.scss +2 -31
  23. data/vendor/assets/stylesheets/components/character-count/_index.scss +28 -0
  24. data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +2 -308
  25. data/vendor/assets/stylesheets/components/checkboxes/_index.scss +304 -0
  26. data/vendor/assets/stylesheets/components/date-input/_date-input.scss +2 -30
  27. data/vendor/assets/stylesheets/components/date-input/_index.scss +26 -0
  28. data/vendor/assets/stylesheets/components/details/_details.scss +2 -88
  29. data/vendor/assets/stylesheets/components/details/_index.scss +84 -0
  30. data/vendor/assets/stylesheets/components/error-message/_error-message.scss +2 -15
  31. data/vendor/assets/stylesheets/components/error-message/_index.scss +11 -0
  32. data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +2 -59
  33. data/vendor/assets/stylesheets/components/error-summary/_index.scss +55 -0
  34. data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +2 -68
  35. data/vendor/assets/stylesheets/components/fieldset/_index.scss +64 -0
  36. data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +2 -81
  37. data/vendor/assets/stylesheets/components/file-upload/_index.scss +77 -0
  38. data/vendor/assets/stylesheets/components/footer/_footer.scss +2 -269
  39. data/vendor/assets/stylesheets/components/footer/_index.scss +238 -0
  40. data/vendor/assets/stylesheets/components/header/_header.scss +2 -318
  41. data/vendor/assets/stylesheets/components/header/_index.scss +312 -0
  42. data/vendor/assets/stylesheets/components/hint/_hint.scss +2 -50
  43. data/vendor/assets/stylesheets/components/hint/_index.scss +46 -0
  44. data/vendor/assets/stylesheets/components/input/_index.scss +99 -0
  45. data/vendor/assets/stylesheets/components/input/_input.scss +2 -103
  46. data/vendor/assets/stylesheets/components/inset-text/_index.scss +24 -0
  47. data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +2 -28
  48. data/vendor/assets/stylesheets/components/label/_index.scss +41 -0
  49. data/vendor/assets/stylesheets/components/label/_label.scss +2 -45
  50. data/vendor/assets/stylesheets/components/panel/_index.scss +40 -0
  51. data/vendor/assets/stylesheets/components/panel/_panel.scss +2 -44
  52. data/vendor/assets/stylesheets/components/phase-banner/_index.scss +27 -0
  53. data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +2 -31
  54. data/vendor/assets/stylesheets/components/radios/_index.scss +342 -0
  55. data/vendor/assets/stylesheets/components/radios/_radios.scss +2 -346
  56. data/vendor/assets/stylesheets/components/select/_index.scss +53 -0
  57. data/vendor/assets/stylesheets/components/select/_select.scss +2 -57
  58. data/vendor/assets/stylesheets/components/skip-link/_index.scss +33 -0
  59. data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +2 -31
  60. data/vendor/assets/stylesheets/components/summary-list/_index.scss +153 -0
  61. data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +2 -157
  62. data/vendor/assets/stylesheets/components/table/_index.scss +50 -0
  63. data/vendor/assets/stylesheets/components/table/_table.scss +2 -54
  64. data/vendor/assets/stylesheets/components/tabs/_index.scss +138 -0
  65. data/vendor/assets/stylesheets/components/tabs/_tabs.scss +2 -142
  66. data/vendor/assets/stylesheets/components/tag/_index.scss +87 -0
  67. data/vendor/assets/stylesheets/components/tag/_tag.scss +2 -44
  68. data/vendor/assets/stylesheets/components/textarea/_index.scss +51 -0
  69. data/vendor/assets/stylesheets/components/textarea/_textarea.scss +2 -55
  70. data/vendor/assets/stylesheets/components/warning-text/_index.scss +56 -0
  71. data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +2 -60
  72. data/vendor/assets/stylesheets/core/_global-styles.scss +5 -3
  73. data/vendor/assets/stylesheets/core/_links.scss +5 -3
  74. data/vendor/assets/stylesheets/core/_lists.scss +17 -3
  75. data/vendor/assets/stylesheets/core/_section-break.scss +5 -3
  76. data/vendor/assets/stylesheets/core/_template.scss +5 -3
  77. data/vendor/assets/stylesheets/core/_typography.scss +5 -3
  78. data/vendor/assets/stylesheets/helpers/_clearfix.scss +1 -1
  79. data/vendor/assets/stylesheets/helpers/_focused.scss +1 -1
  80. data/vendor/assets/stylesheets/helpers/_grid.scss +2 -1
  81. data/vendor/assets/stylesheets/helpers/_links.scss +1 -1
  82. data/vendor/assets/stylesheets/helpers/_media-queries.scss +1 -1
  83. data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +1 -1
  84. data/vendor/assets/stylesheets/helpers/_spacing.scss +5 -5
  85. data/vendor/assets/stylesheets/helpers/_typography.scss +6 -6
  86. data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +30 -30
  87. data/vendor/assets/stylesheets/objects/_form-group.scss +1 -3
  88. data/vendor/assets/stylesheets/objects/_grid.scss +1 -3
  89. data/vendor/assets/stylesheets/objects/_main-wrapper.scss +5 -3
  90. data/vendor/assets/stylesheets/objects/_width-container.scss +34 -13
  91. data/vendor/assets/stylesheets/overrides/_display.scss +11 -3
  92. data/vendor/assets/stylesheets/overrides/_spacing.scss +5 -3
  93. data/vendor/assets/stylesheets/overrides/_typography.scss +5 -3
  94. data/vendor/assets/stylesheets/overrides/_width.scss +5 -3
  95. data/vendor/assets/stylesheets/settings/_colours-palette.scss +1 -1
  96. data/vendor/assets/stylesheets/settings/_ie8.scss +1 -1
  97. data/vendor/assets/stylesheets/tools/_compatibility.scss +1 -1
  98. data/vendor/assets/stylesheets/tools/_font-url.scss +1 -1
  99. data/vendor/assets/stylesheets/tools/_ie8.scss +1 -1
  100. data/vendor/assets/stylesheets/tools/_iff.scss +3 -1
  101. data/vendor/assets/stylesheets/tools/_image-url.scss +1 -1
  102. data/vendor/assets/stylesheets/tools/_px-to-em.scss +1 -1
  103. data/vendor/assets/stylesheets/tools/_px-to-rem.scss +1 -1
  104. metadata +36 -5
@@ -1,6 +1,4 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
4
2
 
5
3
  @include govuk-exports("govuk/objects/form-group") {
6
4
 
@@ -1,6 +1,4 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
4
2
 
5
3
  @include govuk-exports("govuk/objects/grid") {
6
4
 
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
2
+
3
+ ////
4
+ /// @group objects/layout
5
+ ////
4
6
 
5
7
  // Example usage with Breadcrumbs, phase banners, back links:
6
8
  // <div class="govuk-width-container">
@@ -1,13 +1,30 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
4
2
 
5
- @mixin govuk-width-container {
6
- // Limit the width of the container to the page width
7
- max-width: $govuk-page-width;
3
+ ////
4
+ /// @group objects/layout
5
+ ////
6
+
7
+ /// Width container mixin
8
+ ///
9
+ /// Used to create page width and custom width container classes.
10
+ ///
11
+ /// @param {String} $width [$govuk-page-width] - Width in pixels
12
+ ///
13
+ /// @example scss - Creating a 1200px wide container class
14
+ /// .app-width-container--wide {
15
+ /// @include govuk-width-container(1200px);
16
+ /// }
17
+ ///
18
+ /// @access public
19
+
20
+ @mixin govuk-width-container($width: $govuk-page-width) {
21
+
22
+ // By default, limit the width of the container to the page width
23
+ max-width: $width;
8
24
 
9
25
  // On mobile, add half width gutters
10
- margin: 0 $govuk-gutter-half;
26
+ margin-right: $govuk-gutter-half;
27
+ margin-left: $govuk-gutter-half;
11
28
 
12
29
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
13
30
  @supports (margin: unquote("max(calc(0px))")) {
@@ -22,7 +39,8 @@
22
39
 
23
40
  // On tablet, add full width gutters
24
41
  @include govuk-media-query($from: tablet) {
25
- margin: 0 $govuk-gutter;
42
+ margin-right: $govuk-gutter;
43
+ margin-left: $govuk-gutter;
26
44
 
27
45
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
28
46
  @supports (margin: unquote("max(calc(0px))")) {
@@ -38,21 +56,24 @@
38
56
 
39
57
  // As soon as the viewport is greater than the width of the page plus the
40
58
  // gutters, just centre the content instead of adding gutters.
41
- @include govuk-media-query($and: "(min-width: #{($govuk-page-width + $govuk-gutter * 2)})") {
42
- margin: 0 auto;
59
+ @include govuk-media-query($and: "(min-width: #{($width + $govuk-gutter * 2)})") {
60
+ margin-right: auto;
61
+ margin-left: auto;
43
62
 
44
63
  // Since a safe area may have previously been set above,
45
64
  // we need to duplicate this margin that centers the page.
46
65
  @supports (margin: unquote("max(calc(0px))")) {
47
- margin: 0 auto;
66
+ margin-right: auto;
67
+ margin-left: auto;
48
68
  }
49
69
  }
50
70
 
51
71
  @include govuk-if-ie8 {
52
- width: $govuk-page-width;
72
+ width: $width;
53
73
  // Since media queries are not supported in IE8,
54
74
  // we need to duplicate this margin that centers the page.
55
- margin: 0 auto;
75
+ margin-right: auto;
76
+ margin-left: auto;
56
77
  }
57
78
  }
58
79
 
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
5
7
  @include govuk-exports("govuk/overrides/display") {
6
8
 
@@ -19,4 +21,10 @@
19
21
  .govuk-\!-display-none {
20
22
  display: none !important;
21
23
  }
24
+
25
+ @include govuk-media-query($media-type: print) {
26
+ .govuk-\!-display-none-print {
27
+ display: none !important;
28
+ }
29
+ }
22
30
  }
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
5
7
  ////
6
8
  /// @group overrides
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
5
7
  @include govuk-exports("govuk/overrides/typography") {
6
8
  // Font size and line height
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
5
7
  @include govuk-exports("govuk/overrides/width") {
6
8
  .govuk-\!-width-full {
@@ -70,7 +70,7 @@ $_govuk-colour-palette-modern: (
70
70
  "purple": #4c2c92,
71
71
 
72
72
  "black": #0b0c0c,
73
- "dark-grey": #6f777b,
73
+ "dark-grey": #626a6e,
74
74
  "mid-grey": #b1b4b6,
75
75
  "light-grey": #f3f2f1,
76
76
  "white": #ffffff,
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group settings/ie8
2
+ /// @group settings/internet-explorer-8
3
3
  ////
4
4
 
5
5
  /// Whether the stylesheet being built is targeting Internet Explorer 8.
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group tools
2
+ /// @group tools/compatibility-mode
3
3
  ////
4
4
 
5
5
  /// Conditional Compatibility Mixin
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group tools
2
+ /// @group tools/assets
3
3
  ////
4
4
 
5
5
  // Disable indentation linting in this file only
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group tools
2
+ /// @group tools/internet-explorer-8
3
3
  ////
4
4
 
5
5
  /// Conditionally include rules only for IE8
@@ -8,8 +8,10 @@
8
8
  /// @param {Boolean} $condition - Whether to return the value of `$if-true`
9
9
  /// @param {Mixed} $if-true - Value to return if `$condition` is truthy
10
10
  /// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null
11
- /// @access public
11
+ /// @access private
12
+ /// @deprecated We will be removing this function in a future release, use `if($condition, $if-true, null);` instead.
12
13
 
13
14
  @function iff($condition, $if-true) {
15
+ @warn "The `iff` function will be removed in a future release, use `if($condition, $if-true, null);` instead.";
14
16
  @return if($condition, $if-true, null);
15
17
  }
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group tools
2
+ /// @group tools/assets
3
3
  ////
4
4
 
5
5
  // Disable indentation linting in this file only
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group tools
2
+ /// @group tools/unit-conversion
3
3
  ////
4
4
 
5
5
  /// Convert pixels to em
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group tools
2
+ /// @group tools/unit-conversion
3
3
  ////
4
4
 
5
5
  /// Convert pixels to rem
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: 3.3.0
4
+ version: 3.7.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: 2019-10-09 00:00:00.000000000 Z
12
+ date: 2020-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '10.0'
34
+ version: '13.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '10.0'
41
+ version: '13.0'
42
42
  description: Adds the GOVUK frontend to a Rails application that uses the Asset Pipeline.
43
43
  email:
44
44
  executables: []
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".github/workflows/gempush.yml"
49
+ - ".github/workflows/test.yml"
49
50
  - ".gitignore"
50
51
  - CODE_OF_CONDUCT.md
51
52
  - Gemfile
@@ -75,37 +76,67 @@ files:
75
76
  - vendor/assets/images/govuk-mask-icon.svg
76
77
  - vendor/assets/images/govuk-opengraph-image.png
77
78
  - vendor/assets/javascripts/govuk_frontend_rails.js
79
+ - vendor/assets/stylesheets/_base.scss
78
80
  - vendor/assets/stylesheets/all-ie8.scss
79
81
  - vendor/assets/stylesheets/all.scss
80
82
  - vendor/assets/stylesheets/components/_all.scss
81
83
  - vendor/assets/stylesheets/components/accordion/_accordion.scss
84
+ - vendor/assets/stylesheets/components/accordion/_index.scss
82
85
  - vendor/assets/stylesheets/components/back-link/_back-link.scss
86
+ - vendor/assets/stylesheets/components/back-link/_index.scss
83
87
  - vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss
88
+ - vendor/assets/stylesheets/components/breadcrumbs/_index.scss
84
89
  - vendor/assets/stylesheets/components/button/_button.scss
90
+ - vendor/assets/stylesheets/components/button/_index.scss
85
91
  - vendor/assets/stylesheets/components/character-count/_character-count.scss
92
+ - vendor/assets/stylesheets/components/character-count/_index.scss
86
93
  - vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss
94
+ - vendor/assets/stylesheets/components/checkboxes/_index.scss
87
95
  - vendor/assets/stylesheets/components/date-input/_date-input.scss
96
+ - vendor/assets/stylesheets/components/date-input/_index.scss
88
97
  - vendor/assets/stylesheets/components/details/_details.scss
98
+ - vendor/assets/stylesheets/components/details/_index.scss
89
99
  - vendor/assets/stylesheets/components/error-message/_error-message.scss
100
+ - vendor/assets/stylesheets/components/error-message/_index.scss
90
101
  - vendor/assets/stylesheets/components/error-summary/_error-summary.scss
102
+ - vendor/assets/stylesheets/components/error-summary/_index.scss
91
103
  - vendor/assets/stylesheets/components/fieldset/_fieldset.scss
104
+ - vendor/assets/stylesheets/components/fieldset/_index.scss
92
105
  - vendor/assets/stylesheets/components/file-upload/_file-upload.scss
106
+ - vendor/assets/stylesheets/components/file-upload/_index.scss
93
107
  - vendor/assets/stylesheets/components/footer/_footer.scss
108
+ - vendor/assets/stylesheets/components/footer/_index.scss
94
109
  - vendor/assets/stylesheets/components/header/_header.scss
110
+ - vendor/assets/stylesheets/components/header/_index.scss
95
111
  - vendor/assets/stylesheets/components/hint/_hint.scss
112
+ - vendor/assets/stylesheets/components/hint/_index.scss
113
+ - vendor/assets/stylesheets/components/input/_index.scss
96
114
  - vendor/assets/stylesheets/components/input/_input.scss
115
+ - vendor/assets/stylesheets/components/inset-text/_index.scss
97
116
  - vendor/assets/stylesheets/components/inset-text/_inset-text.scss
117
+ - vendor/assets/stylesheets/components/label/_index.scss
98
118
  - vendor/assets/stylesheets/components/label/_label.scss
119
+ - vendor/assets/stylesheets/components/panel/_index.scss
99
120
  - vendor/assets/stylesheets/components/panel/_panel.scss
121
+ - vendor/assets/stylesheets/components/phase-banner/_index.scss
100
122
  - vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss
123
+ - vendor/assets/stylesheets/components/radios/_index.scss
101
124
  - vendor/assets/stylesheets/components/radios/_radios.scss
125
+ - vendor/assets/stylesheets/components/select/_index.scss
102
126
  - vendor/assets/stylesheets/components/select/_select.scss
127
+ - vendor/assets/stylesheets/components/skip-link/_index.scss
103
128
  - vendor/assets/stylesheets/components/skip-link/_skip-link.scss
129
+ - vendor/assets/stylesheets/components/summary-list/_index.scss
104
130
  - vendor/assets/stylesheets/components/summary-list/_summary-list.scss
131
+ - vendor/assets/stylesheets/components/table/_index.scss
105
132
  - vendor/assets/stylesheets/components/table/_table.scss
133
+ - vendor/assets/stylesheets/components/tabs/_index.scss
106
134
  - vendor/assets/stylesheets/components/tabs/_tabs.scss
135
+ - vendor/assets/stylesheets/components/tag/_index.scss
107
136
  - vendor/assets/stylesheets/components/tag/_tag.scss
137
+ - vendor/assets/stylesheets/components/textarea/_index.scss
108
138
  - vendor/assets/stylesheets/components/textarea/_textarea.scss
139
+ - vendor/assets/stylesheets/components/warning-text/_index.scss
109
140
  - vendor/assets/stylesheets/components/warning-text/_warning-text.scss
110
141
  - vendor/assets/stylesheets/core/_all.scss
111
142
  - vendor/assets/stylesheets/core/_global-styles.scss
@@ -184,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
215
  - !ruby/object:Gem::Version
185
216
  version: '0'
186
217
  requirements: []
187
- rubygems_version: 3.0.3
218
+ rubygems_version: 3.1.2
188
219
  signing_key:
189
220
  specification_version: 4
190
221
  summary: Adds the GOVUK frontend to a Rails application that uses the Asset Pipeline.