katalyst-govuk-formbuilder 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/builds/katalyst/govuk/formbuilder.css +164 -21
- data/app/assets/{javascripts → builds}/katalyst/govuk/formbuilder.js +606 -203
- data/app/assets/builds/katalyst/govuk/formbuilder.min.js +1 -0
- data/app/assets/config/katalyst-govuk-formbuilder.js +2 -0
- data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss +48 -0
- data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_richtextarea.scss +2 -0
- data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +26 -0
- data/config/importmap.rb +5 -0
- data/lib/govuk_design_system_formbuilder/elements/{boolean_checkbox_field.rb → check_box_field.rb} +9 -9
- data/lib/govuk_design_system_formbuilder/elements/rich_text_area.rb +2 -3
- data/lib/katalyst/govuk/formbuilder/engine.rb +3 -8
- data/lib/katalyst/govuk/formbuilder/frontend.rb +2 -0
- data/lib/katalyst/govuk/formbuilder/version.rb +3 -1
- data/lib/katalyst/govuk/formbuilder.rb +3 -1
- metadata +9 -5
- data/app/assets/javascripts/katalyst/govuk/formbuilder.min.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f4dd71a5f26238850ca0057e3ff8e96348189dfa14e7d88a7f77c578c95129
|
4
|
+
data.tar.gz: b8b84cf1f025413fa173b7aeaab4382e0bee0b6f16c1cee0019149efd52081d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846e83020aafb6de0ac16a9ee2cf6114fba343cd938b8747c69f0a7f3729410d4a26671b45a575311dac7f832c64b472764eea9b6df3ab29f7b2c2d35f21c0d9
|
7
|
+
data.tar.gz: e8548fbb75ff3c77a0f40c366dead57239d3f7cfe65fd242e94ae43add06ea414e57fa3bae024e4d7b8ae993c0c3b8091aa4abb5b44e826822a2f33e89fbe5ff
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ You can use the provided helper to load the formbuilder esm from importmaps and
|
|
40
40
|
You'll need to include the helper to make this method available, which you can add to your `ApplicationController`:
|
41
41
|
|
42
42
|
```ruby
|
43
|
-
helper Katalyst::GOVUK::
|
43
|
+
helper Katalyst::GOVUK::Formbuilder::Frontend
|
44
44
|
```
|
45
45
|
|
46
46
|
## Contributing
|
@@ -15,6 +15,8 @@
|
|
15
15
|
background-color: #ffdd00;
|
16
16
|
box-shadow: 0 -2px #ffdd00, 0 4px #0b0c0c;
|
17
17
|
text-decoration: none;
|
18
|
+
-webkit-box-decoration-break: clone;
|
19
|
+
box-decoration-break: clone;
|
18
20
|
}
|
19
21
|
.govuk-link:link {
|
20
22
|
color: #1d70b8;
|
@@ -165,7 +167,7 @@
|
|
165
167
|
}
|
166
168
|
@media (min-width: 40.0625em) {
|
167
169
|
.govuk-list--bullet > li,
|
168
|
-
.govuk-list--number > li {
|
170
|
+
.govuk-list--number > li {
|
169
171
|
margin-bottom: 5px;
|
170
172
|
}
|
171
173
|
}
|
@@ -624,8 +626,8 @@
|
|
624
626
|
}
|
625
627
|
@media (min-width: 40.0625em) {
|
626
628
|
.govuk-body-m + .govuk-heading-l, .govuk-body + .govuk-heading-l,
|
627
|
-
.govuk-body-s + .govuk-heading-l,
|
628
|
-
.govuk-list + .govuk-heading-l {
|
629
|
+
.govuk-body-s + .govuk-heading-l,
|
630
|
+
.govuk-list + .govuk-heading-l {
|
629
631
|
padding-top: 20px;
|
630
632
|
}
|
631
633
|
}
|
@@ -641,12 +643,12 @@
|
|
641
643
|
}
|
642
644
|
@media (min-width: 40.0625em) {
|
643
645
|
.govuk-body-m + .govuk-heading-m, .govuk-body + .govuk-heading-m,
|
644
|
-
.govuk-body-s + .govuk-heading-m,
|
645
|
-
.govuk-list + .govuk-heading-m,
|
646
|
-
.govuk-body-m + .govuk-heading-s,
|
647
|
-
.govuk-body + .govuk-heading-s,
|
648
|
-
.govuk-body-s + .govuk-heading-s,
|
649
|
-
.govuk-list + .govuk-heading-s {
|
646
|
+
.govuk-body-s + .govuk-heading-m,
|
647
|
+
.govuk-list + .govuk-heading-m,
|
648
|
+
.govuk-body-m + .govuk-heading-s,
|
649
|
+
.govuk-body + .govuk-heading-s,
|
650
|
+
.govuk-body-s + .govuk-heading-s,
|
651
|
+
.govuk-list + .govuk-heading-s {
|
650
652
|
padding-top: 10px;
|
651
653
|
}
|
652
654
|
}
|
@@ -765,7 +767,7 @@
|
|
765
767
|
align-items: baseline;
|
766
768
|
}
|
767
769
|
.govuk-button-group .govuk-button,
|
768
|
-
.govuk-button-group .govuk-link {
|
770
|
+
.govuk-button-group .govuk-link {
|
769
771
|
margin-right: 15px;
|
770
772
|
}
|
771
773
|
.govuk-button-group .govuk-link {
|
@@ -828,7 +830,7 @@
|
|
828
830
|
}
|
829
831
|
@media (min-width: 40.0625em) {
|
830
832
|
.govuk-grid-column-one-third {
|
831
|
-
width: 33.
|
833
|
+
width: 33.3333333333%;
|
832
834
|
float: left;
|
833
835
|
}
|
834
836
|
}
|
@@ -852,7 +854,7 @@
|
|
852
854
|
}
|
853
855
|
@media (min-width: 40.0625em) {
|
854
856
|
.govuk-grid-column-two-thirds {
|
855
|
-
width: 66.
|
857
|
+
width: 66.6666666667%;
|
856
858
|
float: left;
|
857
859
|
}
|
858
860
|
}
|
@@ -898,7 +900,7 @@
|
|
898
900
|
}
|
899
901
|
@media (min-width: 48.0625em) {
|
900
902
|
.govuk-grid-column-one-third-from-desktop {
|
901
|
-
width: 33.
|
903
|
+
width: 33.3333333333%;
|
902
904
|
float: left;
|
903
905
|
}
|
904
906
|
}
|
@@ -920,7 +922,7 @@
|
|
920
922
|
}
|
921
923
|
@media (min-width: 48.0625em) {
|
922
924
|
.govuk-grid-column-two-thirds-from-desktop {
|
923
|
-
width: 66.
|
925
|
+
width: 66.6666666667%;
|
924
926
|
float: left;
|
925
927
|
}
|
926
928
|
}
|
@@ -965,7 +967,7 @@
|
|
965
967
|
}
|
966
968
|
@media (min-width: 40.0625em) {
|
967
969
|
.govuk-main-wrapper--auto-spacing:first-child,
|
968
|
-
.govuk-main-wrapper--l {
|
970
|
+
.govuk-main-wrapper--l {
|
969
971
|
padding-top: 50px;
|
970
972
|
}
|
971
973
|
}
|
@@ -1250,7 +1252,7 @@
|
|
1250
1252
|
|
1251
1253
|
@supports not (caret-color: auto) {
|
1252
1254
|
.govuk-fieldset,
|
1253
|
-
x:-moz-any-link {
|
1255
|
+
x:-moz-any-link {
|
1254
1256
|
display: table-cell;
|
1255
1257
|
}
|
1256
1258
|
}
|
@@ -1983,13 +1985,13 @@ x:-moz-any-link {
|
|
1983
1985
|
}
|
1984
1986
|
@media print {
|
1985
1987
|
.govuk-input__prefix,
|
1986
|
-
.govuk-input__suffix {
|
1988
|
+
.govuk-input__suffix {
|
1987
1989
|
font-family: sans-serif;
|
1988
1990
|
}
|
1989
1991
|
}
|
1990
1992
|
@media (min-width: 40.0625em) {
|
1991
1993
|
.govuk-input__prefix,
|
1992
|
-
.govuk-input__suffix {
|
1994
|
+
.govuk-input__suffix {
|
1993
1995
|
font-size: 19px;
|
1994
1996
|
font-size: 1.1875rem;
|
1995
1997
|
line-height: 1.3157894737;
|
@@ -1997,20 +1999,20 @@ x:-moz-any-link {
|
|
1997
1999
|
}
|
1998
2000
|
@media print {
|
1999
2001
|
.govuk-input__prefix,
|
2000
|
-
.govuk-input__suffix {
|
2002
|
+
.govuk-input__suffix {
|
2001
2003
|
font-size: 14pt;
|
2002
2004
|
line-height: 1.15;
|
2003
2005
|
}
|
2004
2006
|
}
|
2005
2007
|
@media (max-width: 40.0525em) {
|
2006
2008
|
.govuk-input__prefix,
|
2007
|
-
.govuk-input__suffix {
|
2009
|
+
.govuk-input__suffix {
|
2008
2010
|
line-height: 1.6;
|
2009
2011
|
}
|
2010
2012
|
}
|
2011
2013
|
@media (max-width: 19.99em) {
|
2012
2014
|
.govuk-input__prefix,
|
2013
|
-
.govuk-input__suffix {
|
2015
|
+
.govuk-input__suffix {
|
2014
2016
|
display: block;
|
2015
2017
|
height: 100%;
|
2016
2018
|
white-space: normal;
|
@@ -2182,6 +2184,8 @@ x:-moz-any-link {
|
|
2182
2184
|
background-color: #ffdd00;
|
2183
2185
|
box-shadow: 0 -2px #ffdd00, 0 4px #0b0c0c;
|
2184
2186
|
text-decoration: none;
|
2187
|
+
-webkit-box-decoration-break: clone;
|
2188
|
+
box-decoration-break: clone;
|
2185
2189
|
}
|
2186
2190
|
.govuk-error-summary__list a:link, .govuk-error-summary__list a:visited {
|
2187
2191
|
color: #d4351c;
|
@@ -4091,6 +4095,145 @@ x:-moz-any-link {
|
|
4091
4095
|
}
|
4092
4096
|
}
|
4093
4097
|
|
4098
|
+
.govuk-multi-select {
|
4099
|
+
display: block;
|
4100
|
+
position: relative;
|
4101
|
+
font-family: "Open Sans", sans-serif;
|
4102
|
+
-webkit-font-smoothing: antialiased;
|
4103
|
+
-moz-osx-font-smoothing: grayscale;
|
4104
|
+
font-weight: 400;
|
4105
|
+
font-size: 16px;
|
4106
|
+
font-size: 1rem;
|
4107
|
+
line-height: 1.25;
|
4108
|
+
}
|
4109
|
+
@media print {
|
4110
|
+
.govuk-multi-select {
|
4111
|
+
font-family: sans-serif;
|
4112
|
+
}
|
4113
|
+
}
|
4114
|
+
@media (min-width: 40.0625em) {
|
4115
|
+
.govuk-multi-select {
|
4116
|
+
font-size: 19px;
|
4117
|
+
font-size: 1.1875rem;
|
4118
|
+
line-height: 1.25;
|
4119
|
+
}
|
4120
|
+
}
|
4121
|
+
@media print {
|
4122
|
+
.govuk-multi-select {
|
4123
|
+
font-size: 14pt;
|
4124
|
+
line-height: 1.25;
|
4125
|
+
}
|
4126
|
+
}
|
4127
|
+
|
4128
|
+
.govuk-multi-select > .summary {
|
4129
|
+
display: inline-block;
|
4130
|
+
white-space: nowrap;
|
4131
|
+
position: relative;
|
4132
|
+
cursor: pointer;
|
4133
|
+
box-sizing: border-box;
|
4134
|
+
min-width: 10.5em;
|
4135
|
+
max-width: 100%;
|
4136
|
+
height: 40px;
|
4137
|
+
height: 2.5rem;
|
4138
|
+
padding: 5px;
|
4139
|
+
padding-right: calc(5px + 1em);
|
4140
|
+
border: 2px solid #0b0c0c;
|
4141
|
+
color: #0b0c0c;
|
4142
|
+
background-color: #ffffff;
|
4143
|
+
}
|
4144
|
+
.govuk-multi-select > .summary.placeholder {
|
4145
|
+
color: #505a5f;
|
4146
|
+
}
|
4147
|
+
.govuk-multi-select > .summary::after {
|
4148
|
+
content: "";
|
4149
|
+
display: block;
|
4150
|
+
position: absolute;
|
4151
|
+
top: 50%;
|
4152
|
+
margin-top: -4.5px;
|
4153
|
+
width: 5px;
|
4154
|
+
height: 5px;
|
4155
|
+
right: 3px;
|
4156
|
+
border-style: solid;
|
4157
|
+
border-color: transparent #0b0c0c #0b0c0c transparent;
|
4158
|
+
border-width: 1px;
|
4159
|
+
pointer-events: none;
|
4160
|
+
transform: rotate(45deg);
|
4161
|
+
}
|
4162
|
+
|
4163
|
+
.govuk-multi-select > .summary:focus,
|
4164
|
+
.govuk-multi-select[data-multi-select-open-value=true] > .summary {
|
4165
|
+
outline: 3px solid #ffdd00;
|
4166
|
+
outline-offset: 0;
|
4167
|
+
box-shadow: inset 0 0 0 2px;
|
4168
|
+
}
|
4169
|
+
|
4170
|
+
.govuk-multi-select [role=listbox] {
|
4171
|
+
display: none;
|
4172
|
+
list-style: none;
|
4173
|
+
padding-left: 0;
|
4174
|
+
}
|
4175
|
+
.govuk-multi-select [role=listbox][aria-expanded=true] {
|
4176
|
+
display: block;
|
4177
|
+
position: absolute;
|
4178
|
+
top: calc(100% - 2px - 3px);
|
4179
|
+
left: 0;
|
4180
|
+
z-index: 999;
|
4181
|
+
width: 100%;
|
4182
|
+
overflow-y: auto;
|
4183
|
+
background: #ffffff;
|
4184
|
+
box-shadow: 0 3px 15px 0 rgba(0, 0, 0, 0.1882352941);
|
4185
|
+
border: 2px solid #0b0c0c;
|
4186
|
+
}
|
4187
|
+
|
4188
|
+
.govuk-multi-select [role=option] {
|
4189
|
+
outline-offset: -4px;
|
4190
|
+
position: relative;
|
4191
|
+
padding: 0.5rem 1.25rem 0.5rem 2.25rem;
|
4192
|
+
background: #ffffff;
|
4193
|
+
cursor: pointer;
|
4194
|
+
display: flex;
|
4195
|
+
justify-content: space-between;
|
4196
|
+
line-height: 1.5rem;
|
4197
|
+
}
|
4198
|
+
.govuk-multi-select [role=option][selected] {
|
4199
|
+
padding-right: 22px;
|
4200
|
+
}
|
4201
|
+
.govuk-multi-select [role=option][disabled] {
|
4202
|
+
opacity: 0.5;
|
4203
|
+
}
|
4204
|
+
.govuk-multi-select [role=option]:hover {
|
4205
|
+
background-color: #b1b4b6;
|
4206
|
+
}
|
4207
|
+
.govuk-multi-select [role=option]:focus, .govuk-multi-select [role=option]:active {
|
4208
|
+
outline: none;
|
4209
|
+
color: #ffffff;
|
4210
|
+
background-color: #1d70b8;
|
4211
|
+
}
|
4212
|
+
.govuk-multi-select [role=option]::after {
|
4213
|
+
content: "";
|
4214
|
+
width: 0.75rem;
|
4215
|
+
height: 0.75rem;
|
4216
|
+
position: absolute;
|
4217
|
+
top: 20px;
|
4218
|
+
left: 20px;
|
4219
|
+
transform: translate(-50%, -50%);
|
4220
|
+
border: 2px solid #0b0c0c;
|
4221
|
+
background: #0b0c0c;
|
4222
|
+
box-shadow: inset 0 0 0 1em #ffffff;
|
4223
|
+
transition: box-shadow 0.2s;
|
4224
|
+
}
|
4225
|
+
.govuk-multi-select [role=option][selected]::after {
|
4226
|
+
box-shadow: inset 0 0 0 2px #ffffff;
|
4227
|
+
border: 2px solid #0b0c0c;
|
4228
|
+
}
|
4229
|
+
|
4230
|
+
.govuk-multi-select--error > .summary {
|
4231
|
+
border-color: #d4351c;
|
4232
|
+
}
|
4233
|
+
.govuk-multi-select--error > .summary > .summary:focus {
|
4234
|
+
border-color: #0b0c0c;
|
4235
|
+
}
|
4236
|
+
|
4094
4237
|
.govuk-richtextarea {
|
4095
4238
|
font-family: "Open Sans", sans-serif;
|
4096
4239
|
-webkit-font-smoothing: antialiased;
|