katalyst-govuk-formbuilder 1.3.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/assets/builds/katalyst/govuk/formbuilder.css +58 -5
  4. data/app/assets/builds/katalyst/govuk/formbuilder.js +98 -64
  5. data/app/assets/builds/katalyst/govuk/formbuilder.min.js +1 -1
  6. data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss +7 -6
  7. data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
  8. data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
  9. data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
  10. data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
  11. data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +14 -0
  12. data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
  13. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
  14. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
  15. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
  16. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
  17. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  18. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
  19. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
  20. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
  21. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +297 -0
  22. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
  23. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
  24. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
  25. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
  26. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  27. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
  28. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
  29. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  30. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
  31. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
  32. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
  33. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
  34. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
  35. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  36. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
  37. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  38. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
  39. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +55 -0
  40. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
  41. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +193 -0
  42. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
  43. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
  44. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
  45. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
  46. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +193 -0
  47. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
  48. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  49. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
  50. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
  51. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
  52. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  53. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  54. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  55. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  56. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
  57. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
  58. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  59. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
  60. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
  61. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
  62. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +66 -0
  63. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
  64. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
  65. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
  66. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
  67. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
  68. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
  69. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
  70. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  71. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
  72. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
  73. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
  74. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +54 -0
  75. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
  76. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  77. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
  78. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +6 -0
  79. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
  80. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  81. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
  82. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
  83. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
  84. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
  85. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
  86. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
  87. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +98 -0
  88. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
  89. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
  90. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  91. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
  92. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
  93. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
  94. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
  95. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
  96. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
  97. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
  98. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
  99. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
  100. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
  101. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
  102. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
  103. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
  104. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
  105. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
  106. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
  107. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
  108. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
  109. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
  110. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
  111. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
  112. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
  113. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
  114. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +146 -0
  115. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
  116. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
  117. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
  118. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +34 -0
  119. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +66 -0
  120. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
  121. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
  122. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
  123. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
  124. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
  125. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
  126. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  127. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
  128. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
  129. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
  130. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
  131. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +87 -0
  132. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
  133. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
  134. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
  135. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
  136. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
  137. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
  138. data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
  139. metadata +132 -4
  140. data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
@@ -0,0 +1,347 @@
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
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-govuk-formbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder
@@ -35,7 +35,6 @@ files:
35
35
  - README.md
36
36
  - app/assets/builds/katalyst/govuk/formbuilder.css
37
37
  - app/assets/builds/katalyst/govuk/formbuilder.js
38
- - app/assets/builds/katalyst/govuk/formbuilder.min.css
39
38
  - app/assets/builds/katalyst/govuk/formbuilder.min.js
40
39
  - app/assets/config/katalyst-govuk-formbuilder.js
41
40
  - app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss
@@ -48,6 +47,135 @@ files:
48
47
  - lib/katalyst/govuk/formbuilder/engine.rb
49
48
  - lib/katalyst/govuk/formbuilder/frontend.rb
50
49
  - lib/katalyst/govuk/formbuilder/version.rb
50
+ - vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss
51
+ - vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss
52
+ - vendor/assets/stylesheets/govuk-frontend/govuk/all.scss
53
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss
54
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss
55
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss
56
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss
57
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss
58
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss
59
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss
60
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss
61
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss
62
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss
63
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss
64
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss
65
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss
66
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss
67
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss
68
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss
69
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss
70
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss
71
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss
72
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss
73
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss
74
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss
75
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss
76
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss
77
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss
78
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss
79
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss
80
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss
81
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss
82
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss
83
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss
84
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss
85
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss
86
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss
87
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss
88
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss
89
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss
90
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss
91
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss
92
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss
93
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss
94
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss
95
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss
96
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss
97
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss
98
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss
99
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss
100
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss
101
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss
102
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss
103
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss
104
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss
105
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss
106
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss
107
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss
108
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss
109
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss
110
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss
111
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss
112
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss
113
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss
114
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss
115
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss
116
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss
117
+ - vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss
118
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss
119
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss
120
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_govuk-frontend-version.scss
121
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss
122
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss
123
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss
124
+ - vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss
125
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss
126
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss
127
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss
128
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss
129
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss
130
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss
131
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss
132
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss
133
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss
134
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss
135
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss
136
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss
137
+ - vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss
138
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss
139
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss
140
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss
141
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss
142
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss
143
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss
144
+ - vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss
145
+ - vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss
146
+ - vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss
147
+ - vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss
148
+ - vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss
149
+ - vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss
150
+ - vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss
151
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss
152
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss
153
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss
154
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss
155
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss
156
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss
157
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss
158
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss
159
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss
160
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss
161
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss
162
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss
163
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss
164
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss
165
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss
166
+ - vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss
167
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss
168
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss
169
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss
170
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss
171
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss
172
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss
173
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss
174
+ - vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss
175
+ - vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss
176
+ - vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss
177
+ - vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss
178
+ - vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss
51
179
  homepage: https://github.com/katalyst/govuk-formbuilder
52
180
  licenses:
53
181
  - MIT
@@ -68,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
196
  - !ruby/object:Gem::Version
69
197
  version: '0'
70
198
  requirements: []
71
- rubygems_version: 3.3.7
199
+ rubygems_version: 3.4.12
72
200
  signing_key:
73
201
  specification_version: 4
74
202
  summary: Repackaging of UK.GOV forms for Rails 7 asset pipeline