katalyst-govuk-formbuilder 1.21.1 → 1.23.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/builds/katalyst/govuk/formbuilder.css +38 -1
  3. data/app/assets/builds/katalyst/govuk/formbuilder.js +29 -134
  4. data/app/assets/builds/katalyst/govuk/formbuilder.min.js +8 -8
  5. data/app/assets/builds/katalyst/govuk/formbuilder.min.js.map +1 -1
  6. data/lib/katalyst/govuk/form_builder/builder.rb +45 -0
  7. data/lib/katalyst/govuk/form_builder/config.rb +0 -2
  8. data/lib/katalyst/govuk/form_builder/elements/time.rb +26 -0
  9. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +4 -4
  10. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +1 -1
  11. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +2 -2
  12. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +1 -1
  13. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +2 -1
  14. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +4 -4
  15. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +20 -20
  16. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -15
  17. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +2 -2
  18. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +4 -2
  19. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +2 -2
  20. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -2
  21. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +1 -1
  22. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +1 -1
  23. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +1 -7
  24. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +5 -5
  25. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +16 -16
  26. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +1 -1
  27. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +1 -7
  29. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +1 -1
  30. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  31. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +2 -2
  32. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -3
  33. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +34 -0
  34. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  35. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +1 -1
  36. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +172 -33
  37. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +1 -1
  38. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +4 -4
  39. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +1 -1
  40. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +1 -1
  41. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +1 -1
  42. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +2 -2
  43. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +1 -1
  44. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +5 -5
  45. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +7 -0
  46. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +4 -2
  47. metadata +2 -2
  48. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
@@ -46,7 +46,7 @@
46
46
 
47
47
  // GOV.UK Frontend JavaScript enabled
48
48
  .govuk-frontend-supported {
49
- @include govuk-media-query($from: tablet) {
49
+ @media #{govuk-from-breakpoint(tablet)} {
50
50
  .govuk-tabs__list {
51
51
  @include govuk-clearfix;
52
52
  margin-bottom: 0;
@@ -21,13 +21,7 @@
21
21
  -webkit-appearance: none;
22
22
 
23
23
  &:focus {
24
- outline: $govuk-focus-width solid $govuk-focus-colour;
25
- // Ensure outline appears outside of the element
26
- outline-offset: 0;
27
- // Double the border by adding its width again. Use `box-shadow` to do
28
- // this instead of changing `border-width` (which changes element size)
29
- // and since `outline` is already used for the yellow focus state.
30
- box-shadow: inset 0 0 0 $govuk-border-width-form-element;
24
+ @include govuk-focused-form-input;
31
25
  }
32
26
 
33
27
  &:disabled {
@@ -19,7 +19,7 @@
19
19
  min-height: 35px;
20
20
  margin-top: -7px;
21
21
 
22
- @include govuk-media-query($from: tablet) {
22
+ @media #{govuk-from-breakpoint(tablet)} {
23
23
  margin-top: -5px;
24
24
  }
25
25
 
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  // This variable is automatically overwritten during builds and releases.
3
3
  // It doesn't need to be updated manually.
4
- --govuk-frontend-version: "5.11.2";
4
+ --govuk-frontend-version: "5.13.0";
5
5
 
6
6
  // CSS custom property for each breakpoint
7
7
  @each $name, $value in $govuk-breakpoints {
@@ -38,7 +38,7 @@
38
38
  %govuk-list--number > li {
39
39
  margin-bottom: 0;
40
40
 
41
- @include govuk-media-query($from: tablet) {
41
+ @media #{govuk-from-breakpoint(tablet)} {
42
42
  margin-bottom: govuk-spacing(1);
43
43
  }
44
44
  }
@@ -46,7 +46,7 @@
46
46
  %govuk-list--spaced > li {
47
47
  margin-bottom: govuk-spacing(2);
48
48
 
49
- @include govuk-media-query($from: tablet) {
49
+ @media #{govuk-from-breakpoint(tablet)} {
50
50
  margin-bottom: govuk-spacing(3);
51
51
  }
52
52
  }
@@ -77,7 +77,7 @@
77
77
  margin-bottom: govuk-spacing(1);
78
78
  color: $govuk-secondary-text-colour;
79
79
 
80
- @include govuk-media-query($from: tablet) {
80
+ @media #{govuk-from-breakpoint(tablet)} {
81
81
  margin-bottom: 0;
82
82
  }
83
83
  }
@@ -161,7 +161,7 @@
161
161
  %govuk-body-l + %govuk-heading-l {
162
162
  padding-top: govuk-spacing(1);
163
163
 
164
- @include govuk-media-query($from: tablet) {
164
+ @media #{govuk-from-breakpoint(tablet)} {
165
165
  padding-top: govuk-spacing(2);
166
166
  }
167
167
  }
@@ -180,7 +180,7 @@
180
180
  %govuk-list + %govuk-heading-s {
181
181
  padding-top: govuk-spacing(1);
182
182
 
183
- @include govuk-media-query($from: tablet) {
183
+ @media #{govuk-from-breakpoint(tablet)} {
184
184
  padding-top: govuk-spacing(2);
185
185
  }
186
186
  }
@@ -7,6 +7,11 @@
7
7
  /// Provides an outline to clearly indicate when the target element is focused.
8
8
  /// Used for interactive text-based elements.
9
9
  ///
10
+ /// @example scss - Styling the focus state for a link
11
+ /// .govuk-link:focus {
12
+ /// @include govuk-focused-text;
13
+ /// }
14
+ ///
10
15
  /// @access public
11
16
 
12
17
  @mixin govuk-focused-text {
@@ -47,6 +52,11 @@
47
52
  /// govuk-focused-box draws an outline around all sides of the element.
48
53
  /// Best used for non-text content contained within links.
49
54
  ///
55
+ /// @example scss - Styling the focus state for a linked image
56
+ /// .govuk-link-image:focus {
57
+ /// @include govuk-focused-box;
58
+ /// }
59
+ ///
50
60
  /// @access public
51
61
 
52
62
  @mixin govuk-focused-box {
@@ -56,4 +66,28 @@
56
66
  0 0 0 8px $govuk-focus-text-colour;
57
67
  }
58
68
 
69
+ /// Focused form input
70
+ ///
71
+ /// Provides an outline to clearly indicate when the target element is focused.
72
+ /// Used for form inputs.
73
+ ///
74
+ /// @example scss - Styling the focus state for a form input
75
+ /// .govuk-input:focus {
76
+ /// @include govuk-focused-form-input;
77
+ /// }
78
+ ///
79
+ /// @access public
80
+
81
+ @mixin govuk-focused-form-input {
82
+ outline: $govuk-focus-width solid $govuk-focus-colour;
83
+ // Ensure outline appears outside of the element
84
+ outline-offset: 0;
85
+ // Double the border by adding its width again. Use `box-shadow` for this
86
+ // instead of changing `border-width` - this is for consistency with
87
+ // components such as textarea where we avoid changing `border-width` as
88
+ // it will change the element size. Also, `outline` cannot be utilised
89
+ // here as it is already used for the yellow focus state.
90
+ box-shadow: inset 0 0 0 $govuk-border-width-form-element;
91
+ }
92
+
59
93
  /*# sourceMappingURL=_focused.scss.map */
@@ -54,7 +54,7 @@
54
54
  width: 100%;
55
55
  }
56
56
  padding: 0 $govuk-gutter-half;
57
- @include govuk-media-query($from: $at) {
57
+ @media #{govuk-from-breakpoint($at)} {
58
58
  width: govuk-grid-width($width);
59
59
  float: $float;
60
60
  }
@@ -348,7 +348,7 @@
348
348
  /// @access public
349
349
 
350
350
  @mixin govuk-link-print-friendly {
351
- @include govuk-media-query($media-type: print) {
351
+ @media print {
352
352
  &[href^="/"],
353
353
  &[href^="http://"],
354
354
  &[href^="https://"]
@@ -2,52 +2,168 @@
2
2
  /// @group helpers/layout
3
3
  ////
4
4
 
5
+ @import "../settings/media-queries";
6
+ @import "../tools/px-to-em";
7
+
5
8
  // =========================================================
6
- // Wrangle sass-mq config...
9
+ // Helpers
7
10
  // =========================================================
8
11
 
9
- // Pass our breakpoint definitions through to sass-mq.
10
- $mq-breakpoints: if(variable-exists(govuk-breakpoints), $govuk-breakpoints, ());
12
+ /// Get the value of a breakpoint by name.
13
+ ///
14
+ /// @param {String | Number} $value - If a string, the name of a breakpoint
15
+ /// in $breakpoints. If a number without units, it will convert to px. If a
16
+ /// number with units, it will return the value unaltered.
17
+ /// @param {Map} $breakpoints [$govuk-breakpoints] - The map to look for $value.
18
+ /// @returns {Number} - The set (minimum) value of the breakpoint
19
+ ///
20
+ /// @example scss
21
+ /// .element {
22
+ /// width: govuk-breakpoint-value(tablet);
23
+ /// @media (min-width: #{govuk-breakpoint-value(desktop)}) {
24
+ /// color: red;
25
+ /// }
26
+ /// @media (min-width: #{govuk-breakpoint-value(400px)}) {
27
+ /// color: green;
28
+ /// }
29
+ /// $custom-breakpoint-map: (
30
+ /// small: 350px,
31
+ /// medium: 769px,
32
+ /// large: 1100px,
33
+ /// extra-large: 1600px
34
+ /// );
35
+ /// @media (orientation: landscape) and (min-width: #{govuk-breakpoint-value(extra-large, $custom-breakpoint-map)}) {
36
+ /// color: blue;
37
+ /// }
38
+ /// }
39
+ ///
40
+ /// @access public
11
41
 
12
- $mq-show-breakpoints: ();
42
+ @function govuk-breakpoint-value($value, $breakpoints: $govuk-breakpoints) {
43
+ // If $value is a number
44
+ @if type-of($value) == "number" {
45
+ // If the number is unitless, coerce it into a pixel value
46
+ @if unitless($value) {
47
+ $value: $value * 1px;
48
+ }
13
49
 
14
- @if variable-exists(govuk-show-breakpoints) and $govuk-show-breakpoints {
15
- $mq-show-breakpoints: map-keys($govuk-breakpoints);
16
- }
50
+ @return $value;
51
+ }
17
52
 
18
- // This is a horrible, horrible hack to prevent the 'dev mode' CSS to display
19
- // the current breakpoint from being included multiple times.
20
- //
21
- // We can't use the `exports` mixin for this because import directives cannot be
22
- // used within control directives 😠
23
- $sass-mq-already-included: false !default;
53
+ // If $value is a string and exists as a key in in $breakpoints,
54
+ // look up and use the value of it
55
+ @if type-of($value) == "string" and map-has-key($breakpoints, $value) {
56
+ @return map-get($breakpoints, $value);
57
+ }
24
58
 
25
- @if $sass-mq-already-included {
26
- $mq-show-breakpoints: ();
59
+ // If we get this far, we can't use the value, so return an error
60
+ @error "Could not find a breakpoint given `#{$value}`.";
27
61
  }
28
62
 
29
- @import "../vendor/sass-mq";
63
+ /// Generate the `min-width` segment of a media query given a breakpoint key
64
+ ///
65
+ /// Pixel values are converted to ems for backwards compatibility with
66
+ /// sass-mq. Unlike sass-mq, non-px and em values can be used as well.
67
+ ///
68
+ /// @param {String | Number} $from - If a string, expects the name of a
69
+ /// breakpoint in $breakpoints. If a number, it will use that number.
70
+ /// @param {Map} $breakpoints [$govuk-breakpoints] - The map to look for $from.
71
+ /// @returns {String} - A `min-width` media query segment
72
+ ///
73
+ /// @example scss
74
+ /// .example {
75
+ /// @media #{govuk-from-breakpoint(tablet)} {
76
+ /// color: red;
77
+ /// }
78
+ /// @media #{govuk-from-breakpoint(30em)} {
79
+ /// color: green;
80
+ /// }
81
+ /// @media #{govuk-from-breakpoint(tablet)} and (orientation: landscape) {
82
+ /// color: blue;
83
+ /// }
84
+ /// $custom-breakpoint-map: (
85
+ /// small: 350px,
86
+ /// medium: 769px,
87
+ /// large: 1100px,
88
+ /// extra-large: 1600px
89
+ /// );
90
+ /// @media #{govuk-from-breakpoint(extra-large, $custom-breakpoint-map)} {
91
+ /// color: cyan;
92
+ /// }
93
+ /// }
94
+ ///
95
+ /// @access public
30
96
 
31
- $sass-mq-already-included: true;
97
+ @function govuk-from-breakpoint($from, $breakpoints: $govuk-breakpoints) {
98
+ $value: govuk-breakpoint-value($from, $breakpoints);
32
99
 
33
- // =========================================================
34
- // Helpers
35
- // =========================================================
100
+ @if type-of($value) == "number" and unit($value) == "px" {
101
+ $value: govuk-em($value);
102
+ }
103
+
104
+ @return "(min-width: #{$value})";
105
+ }
36
106
 
37
- /// Media Query
107
+ /// Generate the `max-width` segment of a media query given a breakpoint key
38
108
  ///
39
- /// This is a currently a wrapper for sass-mq - abstracted so that we can
40
- /// replace it in the future if we so choose.
109
+ /// sass-mq converted pixel values to ems, and only performed subtractions on
110
+ /// named breakpoints. These have been retained for backwards compatibility,
111
+ /// though unlike sass-mq, this also supports using non-px and em values.
41
112
  ///
42
- /// @param {String | Boolean} $from [false] - One of $govuk-breakpoints
43
- /// @param {String | Boolean} $until [false] - One of $govuk-breakpoints
44
- /// @param {String | Boolean} $and [false] - Additional media query parameters
45
- /// @param {String} $media-type [all] - Media type: screen, print…
113
+ /// @param {String | Number} $until - If a string, expects the name of a
114
+ /// breakpoint in $breakpoints. If a number, it will use that number.
115
+ /// @param {Map} $breakpoints [$govuk-breakpoints] - The map to look for $until.
116
+ /// @returns {String} - A `max-width` media query segment
117
+ ///
118
+ /// @example scss
119
+ /// .example {
120
+ /// @media #{govuk-until-breakpoint(desktop)} {
121
+ /// color: red;
122
+ /// }
123
+ /// @media #{govuk-until-breakpoint(40em)} {
124
+ /// color: green;
125
+ /// }
126
+ /// @media #{govuk-until-breakpoint(tablet)} and (orientation: landscape) {
127
+ /// color: blue;
128
+ /// }
129
+ /// $custom-breakpoint-map: (
130
+ /// small: 350px,
131
+ /// medium: 769px,
132
+ /// large: 1100px,
133
+ /// extra-large: 1600px
134
+ /// );
135
+ /// @media #{govuk-until-breakpoint(extra-large, $custom-breakpoint-map)} {
136
+ /// color: cyan;
137
+ /// }
138
+ /// }
139
+ ///
140
+ /// @access public
141
+
142
+ @function govuk-until-breakpoint($until, $breakpoints: $govuk-breakpoints) {
143
+ $value: govuk-breakpoint-value($until, $breakpoints);
144
+
145
+ @if type-of($value) == "number" and unit($value) == "px" {
146
+ // If it's a pixel value, convert it to ems.
147
+ $value: govuk-em($value);
148
+ }
149
+
150
+ // If $value derives from a named breakpoint, additionally subtract .01em
151
+ @if type-of($until) != "number" and unit($value) == "em" {
152
+ $value: $value - 0.01em;
153
+ }
154
+
155
+ @return "(max-width: #{$value})";
156
+ }
157
+
158
+ /// Media query
46
159
  ///
47
- /// @ignore Undocumented mq API, for advanced use only:
48
- /// @ignore @param {Map} $breakpoints [$govuk-breakpoints]
160
+ /// @param {String | Boolean} $from [false] - One of $breakpoints
161
+ /// @param {String | Boolean} $until [false] - One of $breakpoints
162
+ /// @param {String | Boolean} $and [false] - Additional media query parameters
163
+ /// @param {String} $media-type [all] - Override media type: screen, print…
164
+ /// @param {Map} $breakpoints [$govuk-breakpoints] - Map of breakpoints to use
49
165
  ///
50
- /// @content styling rules, wrapped into a @media query when $responsive is true
166
+ /// @content styling rules to use for the given media query range
51
167
  ///
52
168
  /// @example scss
53
169
  /// .element {
@@ -67,14 +183,37 @@ $sass-mq-already-included: true;
67
183
  /// color: hotpink;
68
184
  /// }
69
185
  /// @include govuk-media-query(tablet, $media-type: screen) {
70
- /// color: hotpink;
186
+ /// color: rebeccapurple;
71
187
  /// }
72
188
  /// }
73
189
  ///
74
190
  /// @access public
75
191
 
76
- @mixin govuk-media-query($args...) {
77
- @include mq($args...) {
192
+ @mixin govuk-media-query($from: null, $until: null, $and: null, $media-type: "all", $breakpoints: $govuk-breakpoints) {
193
+ $media-query: "";
194
+ $min-width: if($from, govuk-from-breakpoint($from, $breakpoints), null);
195
+ $max-width: if($until, govuk-until-breakpoint($until, $breakpoints), null);
196
+
197
+ // Assemble the media query string
198
+ @if $media-type != "all" {
199
+ $media-query: "#{$media-type}";
200
+ }
201
+ @if $min-width {
202
+ $media-query: "#{$media-query} and #{$min-width}";
203
+ }
204
+ @if $max-width {
205
+ $media-query: "#{$media-query} and #{$max-width}";
206
+ }
207
+ @if $and {
208
+ $media-query: "#{$media-query} and #{$and}";
209
+ }
210
+
211
+ // If $media-query currently begins with an orphaned ' and ', remove it.
212
+ @if str-index($media-query, " and ") == 1 {
213
+ $media-query: str-slice($media-query, 6);
214
+ }
215
+
216
+ @media #{$media-query} {
78
217
  @content;
79
218
  }
80
219
  }
@@ -107,7 +107,7 @@
107
107
  #{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
108
108
  }
109
109
  } @else {
110
- @include govuk-media-query($from: $breakpoint) {
110
+ @media #{govuk-from-breakpoint($breakpoint)} {
111
111
  @if $direction == all {
112
112
  #{$property}: $breakpoint-value if($important, !important, null);
113
113
  } @else {
@@ -23,7 +23,7 @@
23
23
  @include _govuk-font-face-gds-transport;
24
24
  }
25
25
 
26
- @include govuk-media-query($media-type: print) {
26
+ @media print {
27
27
  font-family: $govuk-font-family-print;
28
28
  }
29
29
  }
@@ -37,7 +37,7 @@
37
37
  @mixin govuk-text-colour {
38
38
  color: $govuk-text-colour;
39
39
 
40
- @include govuk-media-query($media-type: print) {
40
+ @media print {
41
41
  color: $govuk-print-text-colour;
42
42
  }
43
43
  }
@@ -240,12 +240,12 @@
240
240
  font-size: $font-size-rem;
241
241
  line-height: $calculated-line-height;
242
242
  } @else if $breakpoint == "print" {
243
- @include govuk-media-query($media-type: print) {
243
+ @media print {
244
244
  font-size: $font-size;
245
245
  line-height: $calculated-line-height;
246
246
  }
247
247
  } @else {
248
- @include govuk-media-query($from: $breakpoint) {
248
+ @media #{govuk-from-breakpoint($breakpoint)} {
249
249
  font-size: $font-size-rem;
250
250
  line-height: $calculated-line-height;
251
251
  }
@@ -57,7 +57,7 @@
57
57
 
58
58
  // On tablet and above, we also introduce a 'column gap' between the
59
59
  // buttons and links in each row and left align links
60
- @include govuk-media-query($from: tablet) {
60
+ @media #{govuk-from-breakpoint(tablet)} {
61
61
  // Cancel out the column gap for the last item in each row
62
62
  margin-right: ($horizontal-gap * -1);
63
63
 
@@ -30,7 +30,7 @@
30
30
  padding-top: govuk-spacing(4);
31
31
  padding-bottom: govuk-spacing(4);
32
32
 
33
- @include govuk-media-query($from: tablet) {
33
+ @media #{govuk-from-breakpoint(tablet)} {
34
34
  // This spacing is manually adjusted to replicate the margin of
35
35
  // govuk-heading-xl (50px) minus the spacing of back link and
36
36
  // breadcrumbs (10px)
@@ -39,7 +39,7 @@
39
39
 
40
40
  // Force the scrollbar to always display in IE, to prevent horizontal page
41
41
  // jumps as content height changes (e.g. autocomplete results open).
42
- @include govuk-media-query($media-type: screen) {
42
+ @media screen {
43
43
  overflow-y: scroll;
44
44
  }
45
45
  }
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  // On tablet, add full width gutters
40
- @include govuk-media-query($from: tablet) {
40
+ @media #{govuk-from-breakpoint(tablet)} {
41
41
  margin-right: $govuk-gutter;
42
42
  margin-left: $govuk-gutter;
43
43
 
@@ -55,7 +55,7 @@
55
55
 
56
56
  // As soon as the viewport is greater than the width of the page plus the
57
57
  // gutters, just centre the content instead of adding gutters.
58
- @include govuk-media-query($and: "(min-width: #{($width + $govuk-gutter * 2)})") {
58
+ @media (min-width: #{($width + $govuk-gutter * 2)}) {
59
59
  margin-right: auto;
60
60
  margin-left: auto;
61
61
 
@@ -16,7 +16,7 @@
16
16
  display: none !important;
17
17
  }
18
18
 
19
- @include govuk-media-query($media-type: print) {
19
+ @media print {
20
20
  .govuk-\!-display-none-print {
21
21
  display: none !important;
22
22
  }
@@ -7,7 +7,7 @@
7
7
  .govuk-\!-width-three-quarters {
8
8
  width: 100% !important;
9
9
 
10
- @include govuk-media-query($from: tablet) {
10
+ @media #{govuk-from-breakpoint(tablet)} {
11
11
  width: 75% !important;
12
12
  }
13
13
  }
@@ -15,7 +15,7 @@
15
15
  .govuk-\!-width-two-thirds {
16
16
  width: 100% !important;
17
17
 
18
- @include govuk-media-query($from: tablet) {
18
+ @media #{govuk-from-breakpoint(tablet)} {
19
19
  width: 66.66% !important;
20
20
  }
21
21
  }
@@ -23,7 +23,7 @@
23
23
  .govuk-\!-width-one-half {
24
24
  width: 100% !important;
25
25
 
26
- @include govuk-media-query($from: tablet) {
26
+ @media #{govuk-from-breakpoint(tablet)} {
27
27
  width: 50% !important;
28
28
  }
29
29
  }
@@ -31,7 +31,7 @@
31
31
  .govuk-\!-width-one-third {
32
32
  width: 100% !important;
33
33
 
34
- @include govuk-media-query($from: tablet) {
34
+ @media #{govuk-from-breakpoint(tablet)} {
35
35
  width: 33.33% !important;
36
36
  }
37
37
  }
@@ -39,7 +39,7 @@
39
39
  .govuk-\!-width-one-quarter {
40
40
  width: 100% !important;
41
41
 
42
- @include govuk-media-query($from: tablet) {
42
+ @media #{govuk-from-breakpoint(tablet)} {
43
43
  width: 25% !important;
44
44
  }
45
45
  }
@@ -2,6 +2,8 @@
2
2
  /// @group settings/layout
3
3
  ////
4
4
 
5
+ @import "../settings/warnings";
6
+
5
7
  /// Breakpoint definitions
6
8
  ///
7
9
  /// @type Map
@@ -19,7 +21,12 @@ $govuk-breakpoints: (
19
21
  ///
20
22
  /// @type Boolean
21
23
  /// @access public
24
+ /// @deprecated The variable is non-operational and will be removed in Frontend v6.0.
22
25
 
23
26
  $govuk-show-breakpoints: false !default;
24
27
 
28
+ @if $govuk-show-breakpoints and _should-warn("govuk-show-breakpoints") {
29
+ @warn _warning-text("govuk-show-breakpoints", "The `$govuk-show-breakpoints` variable is deprecated and is non-operational. It will be removed in the next major version.");
30
+ }
31
+
25
32
  /*# sourceMappingURL=_media-queries.scss.map */
@@ -2,14 +2,16 @@
2
2
  /// @group tools/unit-conversion
3
3
  ////
4
4
 
5
+ @import "../settings/typography-responsive";
6
+
5
7
  /// Convert pixels to em
6
8
  ///
7
9
  /// @param {Number} $value - Length in pixels
8
- /// @param {Number} $context-font-size - Font size of element
10
+ /// @param {Number} $context-font-size [$govuk-root-font-size] - Font size of element
9
11
  /// @return {Number} Length in ems
10
12
  /// @access public
11
13
 
12
- @function govuk-em($value, $context-font-size) {
14
+ @function govuk-em($value, $context-font-size: $govuk-root-font-size) {
13
15
  @if unitless($value) {
14
16
  $value: $value * 1px;
15
17
  }
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: 1.21.1
4
+ version: 1.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
@@ -52,6 +52,7 @@ files:
52
52
  - lib/katalyst/govuk/form_builder/elements/label.rb
53
53
  - lib/katalyst/govuk/form_builder/elements/legend.rb
54
54
  - lib/katalyst/govuk/form_builder/elements/rich_text_area.rb
55
+ - lib/katalyst/govuk/form_builder/elements/time.rb
55
56
  - lib/katalyst/govuk/form_builder/engine.rb
56
57
  - lib/katalyst/govuk/form_builder/extensions.rb
57
58
  - lib/katalyst/govuk/form_builder/frontend.rb
@@ -198,7 +199,6 @@ files:
198
199
  - node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss
199
200
  - node_modules/govuk-frontend/dist/govuk/utilities/_index.scss
200
201
  - node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss
201
- - node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss
202
202
  homepage: https://github.com/katalyst/govuk-formbuilder
203
203
  licenses:
204
204
  - MIT