govuk_publishing_components 32.1.0 → 33.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/component_guide/accessibility-test.js +0 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +175 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-ecommerce-tracker.js +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +5 -13
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +80 -309
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +2 -2
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-specialist-link-tracker.js +140 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +3 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +12 -1
- data/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js +24 -8
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +22 -1
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +140 -191
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +2 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +3 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +10 -30
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +0 -7
- data/app/views/govuk_publishing_components/components/_accordion.html.erb +14 -1
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +27 -26
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +11 -13
- data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +4 -1
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +15 -3
- data/app/views/govuk_publishing_components/components/docs/button.yml +10 -0
- data/app/views/govuk_publishing_components/components/docs/share_links.yml +59 -30
- data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +10 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +34 -0
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +3 -3
- data/lib/govuk_publishing_components/presenters/button_helper.rb +9 -2
- data/lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb +25 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.js +4559 -4673
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/package.json +2 -2
- data/node_modules/axe-core/sri-history.json +4 -0
- data/node_modules/govuk-frontend/README.md +1 -2
- data/node_modules/govuk-frontend/govuk/all.js +1398 -273
- data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +70 -0
- data/node_modules/govuk-frontend/govuk/common/index.js +172 -0
- data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +373 -0
- data/node_modules/govuk-frontend/govuk/common.js +138 -3
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +753 -25
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +54 -22
- data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +36 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +7 -1
- data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -12
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +22 -22
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +23 -5
- data/node_modules/govuk-frontend/govuk/components/button/button.js +365 -107
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +85 -66
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +9 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1033 -121
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +112 -36
- data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +42 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +27 -3
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +30 -2
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +96 -93
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +46 -46
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +50 -50
- data/node_modules/govuk-frontend/govuk/components/details/details.js +43 -13
- data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +20 -20
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +20 -20
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +268 -6
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +44 -35
- data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +25 -21
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +51 -39
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +26 -26
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +46 -46
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +93 -38
- data/node_modules/govuk-frontend/govuk/components/header/header.js +6 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +8 -2
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -2
- data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +12 -12
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +80 -80
- data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +12 -12
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +34 -34
- data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +56 -46
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +252 -2
- data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +10 -7
- data/node_modules/govuk-frontend/govuk/components/pagination/fixtures.json +33 -26
- data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +18 -18
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +14 -14
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +94 -91
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +30 -2
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +32 -32
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +22 -20
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +10 -4
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +50 -50
- data/node_modules/govuk-frontend/govuk/components/table/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +40 -40
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +29 -29
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +28 -0
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -28
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +34 -34
- data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +14 -14
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +2 -2
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +6 -6
- data/node_modules/govuk-frontend/govuk/i18n.js +390 -0
- data/node_modules/govuk-frontend/govuk/macros/i18n.njk +15 -0
- data/node_modules/govuk-frontend/govuk/settings/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +12 -0
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +26 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +12 -0
- data/node_modules/govuk-frontend/govuk/settings/_warnings.scss +53 -0
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +20 -6
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +21 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +300 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +21 -0
- data/node_modules/govuk-frontend/govuk-esm/all.mjs +50 -27
- data/node_modules/govuk-frontend/govuk-esm/common/closest-attribute-value.mjs +15 -0
- data/node_modules/govuk-frontend/govuk-esm/common/index.mjs +159 -0
- data/node_modules/govuk-frontend/govuk-esm/common/normalise-dataset.mjs +58 -0
- data/node_modules/govuk-frontend/govuk-esm/common.mjs +6 -28
- data/node_modules/govuk-frontend/govuk-esm/components/accordion/accordion.mjs +113 -43
- data/node_modules/govuk-frontend/govuk-esm/components/button/button.mjs +67 -30
- data/node_modules/govuk-frontend/govuk-esm/components/character-count/character-count.mjs +325 -123
- data/node_modules/govuk-frontend/govuk-esm/components/checkboxes/checkboxes.mjs +9 -3
- data/node_modules/govuk-frontend/govuk-esm/components/details/details.mjs +22 -8
- data/node_modules/govuk-frontend/govuk-esm/components/error-summary/error-summary.mjs +48 -6
- data/node_modules/govuk-frontend/govuk-esm/components/header/header.mjs +6 -0
- data/node_modules/govuk-frontend/govuk-esm/components/notification-banner/notification-banner.mjs +32 -2
- data/node_modules/govuk-frontend/govuk-esm/components/radios/radios.mjs +9 -3
- data/node_modules/govuk-frontend/govuk-esm/components/skip-link/skip-link.mjs +10 -4
- data/node_modules/govuk-frontend/govuk-esm/components/tabs/tabs.mjs +8 -2
- data/node_modules/govuk-frontend/govuk-esm/i18n.mjs +380 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Date/now.mjs +13 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Element/prototype/dataset.mjs +68 -0
- data/node_modules/govuk-frontend/govuk-esm/vendor/polyfills/String/prototype/trim.mjs +13 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +7 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit/init.scss +12 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +138 -7
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +22 -3
@@ -6,8 +6,8 @@
|
|
6
6
|
"options": {
|
7
7
|
"text": "Save and continue"
|
8
8
|
},
|
9
|
-
"
|
10
|
-
"
|
9
|
+
"hidden": false,
|
10
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Save and continue\n</button>"
|
11
11
|
},
|
12
12
|
{
|
13
13
|
"name": "disabled",
|
@@ -15,8 +15,8 @@
|
|
15
15
|
"text": "Disabled button",
|
16
16
|
"disabled": true
|
17
17
|
},
|
18
|
-
"
|
19
|
-
"
|
18
|
+
"hidden": false,
|
19
|
+
"html": "<button disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled button\n</button>"
|
20
20
|
},
|
21
21
|
{
|
22
22
|
"name": "link",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"text": "Link button",
|
25
25
|
"href": "/"
|
26
26
|
},
|
27
|
-
"
|
28
|
-
"
|
27
|
+
"hidden": false,
|
28
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Link button\n</a>"
|
29
29
|
},
|
30
30
|
{
|
31
31
|
"name": "link disabled",
|
@@ -34,8 +34,8 @@
|
|
34
34
|
"href": "/",
|
35
35
|
"disabled": true
|
36
36
|
},
|
37
|
-
"
|
38
|
-
"
|
37
|
+
"hidden": false,
|
38
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">\n Disabled link button\n</a>"
|
39
39
|
},
|
40
40
|
{
|
41
41
|
"name": "start",
|
@@ -43,8 +43,8 @@
|
|
43
43
|
"text": "Start now button",
|
44
44
|
"isStartButton": true
|
45
45
|
},
|
46
|
-
"
|
47
|
-
"
|
46
|
+
"hidden": false,
|
47
|
+
"html": "<button class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg></button>"
|
48
48
|
},
|
49
49
|
{
|
50
50
|
"name": "start link",
|
@@ -53,8 +53,8 @@
|
|
53
53
|
"href": "/",
|
54
54
|
"isStartButton": true
|
55
55
|
},
|
56
|
-
"
|
57
|
-
"
|
56
|
+
"hidden": false,
|
57
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--start\" data-module=\"govuk-button\">\n Start now link button\n <svg class=\"govuk-button__start-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"17.5\" height=\"19\" viewBox=\"0 0 33 40\" aria-hidden=\"true\" focusable=\"false\">\n <path fill=\"currentColor\" d=\"M0 0h13l20 20-20 20H0l20-20z\"/>\n </svg></a>"
|
58
58
|
},
|
59
59
|
{
|
60
60
|
"name": "input",
|
@@ -63,8 +63,8 @@
|
|
63
63
|
"name": "start-now",
|
64
64
|
"text": "Start now"
|
65
65
|
},
|
66
|
-
"
|
67
|
-
"
|
66
|
+
"hidden": false,
|
67
|
+
"html": "<input value=\"Start now\" type=\"submit\" name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">"
|
68
68
|
},
|
69
69
|
{
|
70
70
|
"name": "input disabled",
|
@@ -73,8 +73,8 @@
|
|
73
73
|
"text": "Explicit input button disabled",
|
74
74
|
"disabled": true
|
75
75
|
},
|
76
|
-
"
|
77
|
-
"
|
76
|
+
"hidden": false,
|
77
|
+
"html": "<input value=\"Explicit input button disabled\" type=\"submit\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--disabled\" data-module=\"govuk-button\">"
|
78
78
|
},
|
79
79
|
{
|
80
80
|
"name": "prevent double click",
|
@@ -82,8 +82,8 @@
|
|
82
82
|
"text": "Submit",
|
83
83
|
"preventDoubleClick": true
|
84
84
|
},
|
85
|
-
"
|
86
|
-
"
|
85
|
+
"hidden": false,
|
86
|
+
"html": "<button data-prevent-double-click=\"true\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
87
87
|
},
|
88
88
|
{
|
89
89
|
"name": "with active state",
|
@@ -92,8 +92,8 @@
|
|
92
92
|
"text": "Active",
|
93
93
|
"classes": ":active"
|
94
94
|
},
|
95
|
-
"
|
96
|
-
"
|
95
|
+
"hidden": false,
|
96
|
+
"html": "<button name=\"active\" class=\"govuk-button :active\" data-module=\"govuk-button\">\n Active\n</button>"
|
97
97
|
},
|
98
98
|
{
|
99
99
|
"name": "with hover state",
|
@@ -102,8 +102,8 @@
|
|
102
102
|
"text": "Hovered",
|
103
103
|
"classes": ":hover"
|
104
104
|
},
|
105
|
-
"
|
106
|
-
"
|
105
|
+
"hidden": false,
|
106
|
+
"html": "<button name=\"hover\" class=\"govuk-button :hover\" data-module=\"govuk-button\">\n Hovered\n</button>"
|
107
107
|
},
|
108
108
|
{
|
109
109
|
"name": "with focus state",
|
@@ -112,8 +112,8 @@
|
|
112
112
|
"text": "Focussed",
|
113
113
|
"classes": ":focus"
|
114
114
|
},
|
115
|
-
"
|
116
|
-
"
|
115
|
+
"hidden": false,
|
116
|
+
"html": "<button name=\"focus\" class=\"govuk-button :focus\" data-module=\"govuk-button\">\n Focussed\n</button>"
|
117
117
|
},
|
118
118
|
{
|
119
119
|
"name": "Secondary",
|
@@ -122,8 +122,8 @@
|
|
122
122
|
"text": "Secondary button",
|
123
123
|
"classes": "govuk-button--secondary"
|
124
124
|
},
|
125
|
-
"
|
126
|
-
"
|
125
|
+
"hidden": false,
|
126
|
+
"html": "<button name=\"secondary\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</button>"
|
127
127
|
},
|
128
128
|
{
|
129
129
|
"name": "Secondary disabled",
|
@@ -133,8 +133,8 @@
|
|
133
133
|
"classes": "govuk-button--secondary",
|
134
134
|
"disabled": true
|
135
135
|
},
|
136
|
-
"
|
137
|
-
"
|
136
|
+
"hidden": false,
|
137
|
+
"html": "<button name=\"secondary\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--secondary govuk-button--disabled\" data-module=\"govuk-button\">\n Secondary button disabled\n</button>"
|
138
138
|
},
|
139
139
|
{
|
140
140
|
"name": "Secondary link",
|
@@ -144,8 +144,8 @@
|
|
144
144
|
"href": "/",
|
145
145
|
"classes": "govuk-button--secondary"
|
146
146
|
},
|
147
|
-
"
|
148
|
-
"
|
147
|
+
"hidden": false,
|
148
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Secondary button\n</a>"
|
149
149
|
},
|
150
150
|
{
|
151
151
|
"name": "Warning",
|
@@ -154,8 +154,8 @@
|
|
154
154
|
"text": "Warning button",
|
155
155
|
"classes": "govuk-button--warning"
|
156
156
|
},
|
157
|
-
"
|
158
|
-
"
|
157
|
+
"hidden": false,
|
158
|
+
"html": "<button name=\"Warning\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</button>"
|
159
159
|
},
|
160
160
|
{
|
161
161
|
"name": "Warning disabled",
|
@@ -165,8 +165,8 @@
|
|
165
165
|
"classes": "govuk-button--warning",
|
166
166
|
"disabled": true
|
167
167
|
},
|
168
|
-
"
|
169
|
-
"
|
168
|
+
"hidden": false,
|
169
|
+
"html": "<button name=\"warning\" disabled=\"disabled\" aria-disabled=\"true\" class=\"govuk-button govuk-button--warning govuk-button--disabled\" data-module=\"govuk-button\">\n Warning button disabled\n</button>"
|
170
170
|
},
|
171
171
|
{
|
172
172
|
"name": "Warning link",
|
@@ -176,8 +176,8 @@
|
|
176
176
|
"href": "/",
|
177
177
|
"classes": "govuk-button--warning"
|
178
178
|
},
|
179
|
-
"
|
180
|
-
"
|
179
|
+
"hidden": false,
|
180
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button govuk-button--warning\" data-module=\"govuk-button\">\n Warning button\n</a>"
|
181
181
|
},
|
182
182
|
{
|
183
183
|
"name": "attributes",
|
@@ -189,8 +189,8 @@
|
|
189
189
|
"data-tracking-dimension": 123
|
190
190
|
}
|
191
191
|
},
|
192
|
-
"
|
193
|
-
"
|
192
|
+
"hidden": true,
|
193
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n Submit\n</button>"
|
194
194
|
},
|
195
195
|
{
|
196
196
|
"name": "link attributes",
|
@@ -202,8 +202,8 @@
|
|
202
202
|
"data-tracking-dimension": 123
|
203
203
|
}
|
204
204
|
},
|
205
|
-
"
|
206
|
-
"
|
205
|
+
"hidden": true,
|
206
|
+
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">\n Submit\n</a>"
|
207
207
|
},
|
208
208
|
{
|
209
209
|
"name": "input attributes",
|
@@ -215,8 +215,8 @@
|
|
215
215
|
"data-tracking-dimension": 123
|
216
216
|
}
|
217
217
|
},
|
218
|
-
"
|
219
|
-
"
|
218
|
+
"hidden": true,
|
219
|
+
"html": "<input value=\"Submit\" type=\"submit\" class=\"govuk-button\" data-module=\"govuk-button\" aria-controls=\"example-id\" data-tracking-dimension=\"123\">"
|
220
220
|
},
|
221
221
|
{
|
222
222
|
"name": "classes",
|
@@ -225,8 +225,8 @@
|
|
225
225
|
"element": "button",
|
226
226
|
"classes": "app-button--custom-modifier"
|
227
227
|
},
|
228
|
-
"
|
229
|
-
"
|
228
|
+
"hidden": true,
|
229
|
+
"html": "<button class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</button>"
|
230
230
|
},
|
231
231
|
{
|
232
232
|
"name": "link classes",
|
@@ -235,8 +235,8 @@
|
|
235
235
|
"element": "a",
|
236
236
|
"classes": "app-button--custom-modifier"
|
237
237
|
},
|
238
|
-
"
|
239
|
-
"
|
238
|
+
"hidden": true,
|
239
|
+
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">\n Submit\n</a>"
|
240
240
|
},
|
241
241
|
{
|
242
242
|
"name": "input classes",
|
@@ -245,8 +245,8 @@
|
|
245
245
|
"element": "input",
|
246
246
|
"classes": "app-button--custom-modifier"
|
247
247
|
},
|
248
|
-
"
|
249
|
-
"
|
248
|
+
"hidden": true,
|
249
|
+
"html": "<input value=\"Submit\" type=\"submit\" class=\"govuk-button app-button--custom-modifier\" data-module=\"govuk-button\">"
|
250
250
|
},
|
251
251
|
{
|
252
252
|
"name": "name",
|
@@ -255,8 +255,8 @@
|
|
255
255
|
"element": "button",
|
256
256
|
"name": "start-now"
|
257
257
|
},
|
258
|
-
"
|
259
|
-
"
|
258
|
+
"hidden": true,
|
259
|
+
"html": "<button name=\"start-now\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
260
260
|
},
|
261
261
|
{
|
262
262
|
"name": "type",
|
@@ -265,8 +265,8 @@
|
|
265
265
|
"element": "button",
|
266
266
|
"type": "button"
|
267
267
|
},
|
268
|
-
"
|
269
|
-
"
|
268
|
+
"hidden": true,
|
269
|
+
"html": "<button type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
270
270
|
},
|
271
271
|
{
|
272
272
|
"name": "input type",
|
@@ -275,8 +275,8 @@
|
|
275
275
|
"element": "input",
|
276
276
|
"type": "button"
|
277
277
|
},
|
278
|
-
"
|
279
|
-
"
|
278
|
+
"hidden": true,
|
279
|
+
"html": "<input value=\"Submit\" type=\"button\" class=\"govuk-button\" data-module=\"govuk-button\">"
|
280
280
|
},
|
281
281
|
{
|
282
282
|
"name": "explicit link",
|
@@ -285,8 +285,8 @@
|
|
285
285
|
"href": "/",
|
286
286
|
"text": "Continue"
|
287
287
|
},
|
288
|
-
"
|
289
|
-
"
|
288
|
+
"hidden": true,
|
289
|
+
"html": "<a href=\"/\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Continue\n</a>"
|
290
290
|
},
|
291
291
|
{
|
292
292
|
"name": "no href",
|
@@ -294,8 +294,8 @@
|
|
294
294
|
"text": "Submit",
|
295
295
|
"element": "a"
|
296
296
|
},
|
297
|
-
"
|
298
|
-
"
|
297
|
+
"hidden": true,
|
298
|
+
"html": "<a href=\"#\" role=\"button\" draggable=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</a>"
|
299
299
|
},
|
300
300
|
{
|
301
301
|
"name": "value",
|
@@ -304,8 +304,8 @@
|
|
304
304
|
"element": "button",
|
305
305
|
"value": "start"
|
306
306
|
},
|
307
|
-
"
|
308
|
-
"
|
307
|
+
"hidden": true,
|
308
|
+
"html": "<button value=\"start\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
309
309
|
},
|
310
310
|
{
|
311
311
|
"name": "html",
|
@@ -314,14 +314,33 @@
|
|
314
314
|
"element": "button",
|
315
315
|
"html": "Start <em>now</em>"
|
316
316
|
},
|
317
|
-
"
|
318
|
-
"
|
317
|
+
"hidden": true,
|
318
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Start <em>now</em>\n</button>"
|
319
319
|
},
|
320
320
|
{
|
321
|
-
"name": "no
|
322
|
-
"options": {
|
323
|
-
|
324
|
-
|
321
|
+
"name": "no type",
|
322
|
+
"options": {
|
323
|
+
"text": "Button!"
|
324
|
+
},
|
325
|
+
"hidden": true,
|
326
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Button!\n</button>"
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"name": "no data-prevent-double-click",
|
330
|
+
"options": {
|
331
|
+
"text": "Submit"
|
332
|
+
},
|
333
|
+
"hidden": true,
|
334
|
+
"html": "<button class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
335
|
+
},
|
336
|
+
{
|
337
|
+
"name": "don't prevent double click",
|
338
|
+
"options": {
|
339
|
+
"text": "Submit",
|
340
|
+
"preventDoubleClick": false
|
341
|
+
},
|
342
|
+
"hidden": true,
|
343
|
+
"html": "<button data-prevent-double-click=\"false\" class=\"govuk-button\" data-module=\"govuk-button\">\n Submit\n</button>"
|
325
344
|
}
|
326
345
|
]
|
327
346
|
}
|
@@ -37,7 +37,7 @@ treat it as an interactive element - without this it will be
|
|
37
37
|
|
38
38
|
{#- Define common attributes we can use for both button and input types #}
|
39
39
|
|
40
|
-
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %}{% if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}{% if params.preventDoubleClick %} data-prevent-double-click="
|
40
|
+
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %}{% if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}{% if params.preventDoubleClick !== undefined %} data-prevent-double-click="{{params.preventDoubleClick}}"{% endif %}{% endset %}
|
41
41
|
|
42
42
|
{#- Actually create a button... or a link! #}
|
43
43
|
|
@@ -17,6 +17,15 @@
|
|
17
17
|
@include govuk-font($size: false, $tabular: true);
|
18
18
|
margin-top: 0;
|
19
19
|
margin-bottom: 0;
|
20
|
+
|
21
|
+
&:after {
|
22
|
+
// Zero-width space that will reserve vertical space when no hint is provided
|
23
|
+
// as:
|
24
|
+
// - setting a min-height is not possible without a magic number
|
25
|
+
// because the line-height is set by the `govuk-font` call above
|
26
|
+
// - using `:empty` is not possible as the hint macro outputs line breaks
|
27
|
+
content: "\200B";
|
28
|
+
}
|
20
29
|
}
|
21
30
|
|
22
31
|
.govuk-character-count__message--disabled {
|