katalyst-govuk-formbuilder 1.22.0 → 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 (46) 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/config.rb +0 -2
  7. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +4 -4
  8. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +1 -1
  9. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +2 -2
  10. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +1 -1
  11. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +2 -1
  12. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +4 -4
  13. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +20 -20
  14. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -15
  15. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +2 -2
  16. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +4 -2
  17. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +2 -2
  18. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -2
  19. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +1 -1
  20. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +1 -1
  21. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +1 -7
  22. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +5 -5
  23. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +16 -16
  24. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +1 -1
  25. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +1 -1
  26. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +1 -7
  27. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  29. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +2 -2
  30. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -3
  31. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +34 -0
  32. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  33. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +1 -1
  34. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +172 -33
  35. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +1 -1
  36. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +4 -4
  37. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +1 -1
  38. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +1 -1
  39. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +1 -1
  40. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +2 -2
  41. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +1 -1
  42. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +5 -5
  43. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +7 -0
  44. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +4 -2
  45. metadata +1 -2
  46. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
@@ -1,349 +0,0 @@
1
- // mq() v4.0.2
2
- // sass-mq/sass-mq
3
-
4
- @charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
5
- // See https://github.com/sass-mq/sass-mq/pull/10
6
-
7
- /// Base font size on the `<body>` element
8
- /// @type Number (unit)
9
- $mq-base-font-size: 16px !default;
10
-
11
- /// Responsive mode
12
- ///
13
- /// Set to `false` to enable support for browsers that do not support @media queries,
14
- /// (IE <= 8, Firefox <= 3, Opera <= 9)
15
- ///
16
- /// You could create a stylesheet served exclusively to older browsers,
17
- /// where @media queries are rasterized
18
- ///
19
- /// @example scss
20
- /// // old-ie.scss
21
- /// $mq-responsive: false;
22
- /// @import 'main'; // @media queries in this file will be rasterized up to $mq-static-breakpoint
23
- /// // larger breakpoints will be ignored
24
- ///
25
- /// @type Boolean
26
- /// @link https://github.com/sass-mq/sass-mq#responsive-mode-off Disabled responsive mode documentation
27
- $mq-responsive: true !default;
28
-
29
- /// Breakpoint list
30
- ///
31
- /// Name your breakpoints in a way that creates a ubiquitous language
32
- /// across team members. It will improve communication between
33
- /// stakeholders, designers, developers, and testers.
34
- ///
35
- /// @type Map
36
- /// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint Full documentation and examples
37
- $mq-breakpoints: (
38
- mobile: 320px,
39
- tablet: 740px,
40
- desktop: 980px,
41
- wide: 1300px
42
- ) !default;
43
-
44
- /// Static breakpoint (for fixed-width layouts)
45
- ///
46
- /// Define the breakpoint from $mq-breakpoints that should
47
- /// be used as the target width for the fixed-width layout
48
- /// (i.e. when $mq-responsive is set to 'false') in a old-ie.scss
49
- ///
50
- /// @example scss
51
- /// // tablet-only.scss
52
- /// //
53
- /// // Ignore all styles above tablet breakpoint,
54
- /// // and fix the styles (e.g. layout) at tablet width
55
- /// $mq-responsive: false;
56
- /// $mq-static-breakpoint: tablet;
57
- /// @import 'main'; // @media queries in this file will be rasterized up to tablet
58
- /// // larger breakpoints will be ignored
59
- ///
60
- /// @type String
61
- /// @link https://github.com/sass-mq/sass-mq#adding-custom-breakpoints Full documentation and examples
62
- $mq-static-breakpoint: desktop !default;
63
-
64
- /// Show breakpoints in the top right corner
65
- ///
66
- /// If you want to display the currently active breakpoint in the top
67
- /// right corner of your site during development, add the breakpoints
68
- /// to this list, ordered by width, e.g. (mobile, tablet, desktop).
69
- ///
70
- /// @type map
71
- $mq-show-breakpoints: () !default;
72
-
73
- /// Customize the media type (e.g. `@media screen` or `@media print`)
74
- /// By default sass-mq uses an "all" media type (`@media all and …`)
75
- ///
76
- /// @type String
77
- /// @link https://github.com/sass-mq/sass-mq#changing-media-type Full documentation and examples
78
- $mq-media-type: all !default;
79
-
80
- /// Convert pixels to ems
81
- ///
82
- /// @param {Number} $px - value to convert
83
- /// @param {Number} $base-font-size ($mq-base-font-size) - `<body>` font size
84
- ///
85
- /// @example scss
86
- /// $font-size-in-ems: mq-px2em(16px);
87
- /// p { font-size: mq-px2em(16px); }
88
- ///
89
- /// @requires $mq-base-font-size
90
- /// @returns {Number}
91
- @function mq-px2em($px, $base-font-size: $mq-base-font-size) {
92
- @if unitless($px) {
93
- @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
94
- @return mq-px2em($px * 1px, $base-font-size);
95
- } @else if unit($px) == em {
96
- @return $px;
97
- }
98
- @return ($px / $base-font-size) * 1em;
99
- }
100
-
101
- /// Get a breakpoint's width
102
- ///
103
- /// @param {String} $name - Name of the breakpoint. One of $mq-breakpoints
104
- ///
105
- /// @example scss
106
- /// $tablet-width: mq-get-breakpoint-width(tablet);
107
- /// @media (min-width: mq-get-breakpoint-width(desktop)) {}
108
- ///
109
- /// @requires {Variable} $mq-breakpoints
110
- ///
111
- /// @returns {Number} Value in pixels
112
- @function mq-get-breakpoint-width($name, $breakpoints: $mq-breakpoints) {
113
- @if map-has-key($breakpoints, $name) {
114
- @return map-get($breakpoints, $name);
115
- } @else {
116
- @warn "Breakpoint #{$name} wasn't found in $breakpoints.";
117
- }
118
- }
119
-
120
- /// Media Query mixin
121
- ///
122
- /// @param {String | Boolean} $from (false) - One of $mq-breakpoints
123
- /// @param {String | Boolean} $until (false) - One of $mq-breakpoints
124
- /// @param {String | Boolean} $and (false) - Additional media query parameters
125
- /// @param {String} $media-type ($mq-media-type) - Media type: screen, print…
126
- ///
127
- /// @ignore Undocumented API, for advanced use only:
128
- /// @ignore @param {Map} $breakpoints ($mq-breakpoints)
129
- /// @ignore @param {String} $static-breakpoint ($mq-static-breakpoint)
130
- ///
131
- /// @content styling rules, wrapped into a @media query when $responsive is true
132
- ///
133
- /// @requires {Variable} $mq-media-type
134
- /// @requires {Variable} $mq-breakpoints
135
- /// @requires {Variable} $mq-static-breakpoint
136
- /// @requires {function} mq-px2em
137
- /// @requires {function} mq-get-breakpoint-width
138
- ///
139
- /// @link https://github.com/sass-mq/sass-mq#responsive-mode-on-default Full documentation and examples
140
- ///
141
- /// @example scss
142
- /// .element {
143
- /// @include mq($from: mobile) {
144
- /// color: red;
145
- /// }
146
- /// @include mq($until: tablet) {
147
- /// color: blue;
148
- /// }
149
- /// @include mq(mobile, tablet) {
150
- /// color: green;
151
- /// }
152
- /// @include mq($from: tablet, $and: '(orientation: landscape)') {
153
- /// color: teal;
154
- /// }
155
- /// @include mq(950px) {
156
- /// color: hotpink;
157
- /// }
158
- /// @include mq(tablet, $media-type: screen) {
159
- /// color: hotpink;
160
- /// }
161
- /// // Advanced use:
162
- /// $my-breakpoints: (L: 900px, XL: 1200px);
163
- /// @include mq(L, $breakpoints: $my-breakpoints, $static-breakpoint: L) {
164
- /// color: hotpink;
165
- /// }
166
- /// }
167
- @mixin mq(
168
- $from: false,
169
- $until: false,
170
- $and: false,
171
- $media-type: $mq-media-type,
172
- $breakpoints: $mq-breakpoints,
173
- $responsive: $mq-responsive,
174
- $static-breakpoint: $mq-static-breakpoint
175
- ) {
176
- $min-width: 0;
177
- $max-width: 0;
178
- $media-query: '';
179
-
180
- // From: this breakpoint (inclusive)
181
- @if $from {
182
- @if type-of($from) == number {
183
- $min-width: mq-px2em($from);
184
- } @else {
185
- $min-width: mq-px2em(mq-get-breakpoint-width($from, $breakpoints));
186
- }
187
- }
188
-
189
- // Until: that breakpoint (exclusive)
190
- @if $until {
191
- @if type-of($until) == number {
192
- $max-width: mq-px2em($until);
193
- } @else {
194
- $max-width: mq-px2em(mq-get-breakpoint-width($until, $breakpoints)) - .01em;
195
- }
196
- }
197
-
198
- // Responsive support is disabled, rasterize the output outside @media blocks
199
- // The browser will rely on the cascade itself.
200
- @if $responsive == false {
201
- $static-breakpoint-width: mq-get-breakpoint-width($static-breakpoint, $breakpoints);
202
- $target-width: mq-px2em($static-breakpoint-width);
203
-
204
- // Output only rules that start at or span our target width
205
- @if (
206
- $and == false
207
- and $min-width <= $target-width
208
- and (
209
- $until == false or $max-width >= $target-width
210
- )
211
- and $media-type != 'print'
212
- ) {
213
- @content;
214
- }
215
- }
216
-
217
- // Responsive support is enabled, output rules inside @media queries
218
- @else {
219
- @if $min-width != 0 { $media-query: '#{$media-query} and (min-width: #{$min-width})'; }
220
- @if $max-width != 0 { $media-query: '#{$media-query} and (max-width: #{$max-width})'; }
221
- @if $and { $media-query: '#{$media-query} and #{$and}'; }
222
-
223
- // Remove unnecessary media query prefix 'all and '
224
- @if ($media-type == 'all' and $media-query != '') {
225
- $media-type: '';
226
- $media-query: str-slice(unquote($media-query), 6);
227
- }
228
-
229
- @media #{$media-type + $media-query} {
230
- @content;
231
- }
232
- }
233
- }
234
-
235
- /// Quick sort
236
- ///
237
- /// @author Sam Richards
238
- /// @access private
239
- /// @param {List} $list - List to sort
240
- /// @returns {List} Sorted List
241
- @function _mq-quick-sort($list) {
242
- $less: ();
243
- $equal: ();
244
- $large: ();
245
-
246
- @if length($list) > 1 {
247
- $seed: nth($list, ceil(length($list) / 2));
248
-
249
- @each $item in $list {
250
- @if ($item == $seed) {
251
- $equal: append($equal, $item);
252
- } @else if ($item < $seed) {
253
- $less: append($less, $item);
254
- } @else if ($item > $seed) {
255
- $large: append($large, $item);
256
- }
257
- }
258
-
259
- @return join(join(_mq-quick-sort($less), $equal), _mq-quick-sort($large));
260
- }
261
-
262
- @return $list;
263
- }
264
-
265
- /// Sort a map by values (works with numbers only)
266
- ///
267
- /// @access private
268
- /// @param {Map} $map - Map to sort
269
- /// @returns {Map} Map sorted by value
270
- @function _mq-map-sort-by-value($map) {
271
- $map-sorted: ();
272
- $map-keys: map-keys($map);
273
- $map-values: map-values($map);
274
- $map-values-sorted: _mq-quick-sort($map-values);
275
-
276
- // Reorder key/value pairs based on key values
277
- @each $value in $map-values-sorted {
278
- $index: index($map-values, $value);
279
- $key: nth($map-keys, $index);
280
- $map-sorted: map-merge($map-sorted, ($key: $value));
281
-
282
- // Unset the value in $map-values to prevent the loop
283
- // from finding the same index twice
284
- $map-values: set-nth($map-values, $index, 0);
285
- }
286
-
287
- @return $map-sorted;
288
- }
289
-
290
- /// Add a breakpoint
291
- ///
292
- /// @param {String} $name - Name of the breakpoint
293
- /// @param {Number} $width - Width of the breakpoint
294
- ///
295
- /// @requires {Variable} $mq-breakpoints
296
- ///
297
- /// @example scss
298
- /// @include mq-add-breakpoint(tvscreen, 1920px);
299
- /// @include mq(tvscreen) {}
300
- @mixin mq-add-breakpoint($name, $width) {
301
- $new-breakpoint: ($name: $width);
302
- $mq-breakpoints: map-merge($mq-breakpoints, $new-breakpoint) !global;
303
- $mq-breakpoints: _mq-map-sort-by-value($mq-breakpoints) !global;
304
- }
305
-
306
- /// Show the active breakpoint in the top right corner of the viewport
307
- /// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint
308
- ///
309
- /// @param {List} $show-breakpoints ($mq-show-breakpoints) - List of breakpoints to show in the top right corner
310
- /// @param {Map} $breakpoints ($mq-breakpoints) - Breakpoint names and sizes
311
- ///
312
- /// @requires {Variable} $mq-breakpoints
313
- /// @requires {Variable} $mq-show-breakpoints
314
- ///
315
- /// @example scss
316
- /// // Show breakpoints using global settings
317
- /// @include mq-show-breakpoints;
318
- ///
319
- /// // Show breakpoints using custom settings
320
- /// @include mq-show-breakpoints((L, XL), (S: 300px, L: 800px, XL: 1200px));
321
- @mixin mq-show-breakpoints($show-breakpoints: $mq-show-breakpoints, $breakpoints: $mq-breakpoints) {
322
- body::before {
323
- background-color: #FCF8E3;
324
- border-bottom: 1px solid #FBEED5;
325
- border-left: 1px solid #FBEED5;
326
- color: #C09853;
327
- font: small-caption;
328
- padding: 3px 6px;
329
- pointer-events: none;
330
- position: fixed;
331
- right: 0;
332
- top: 0;
333
- z-index: 100;
334
-
335
- // Loop through the breakpoints that should be shown
336
- @each $show-breakpoint in $show-breakpoints {
337
- $width: mq-get-breakpoint-width($show-breakpoint, $breakpoints);
338
- @include mq($show-breakpoint, $breakpoints: $breakpoints) {
339
- content: "#{$show-breakpoint} ≥ #{$width} (#{mq-px2em($width)})";
340
- }
341
- }
342
- }
343
- }
344
-
345
- @if length($mq-show-breakpoints) > 0 {
346
- @include mq-show-breakpoints;
347
- }
348
-
349
- /*# sourceMappingURL=_sass-mq.scss.map */