govuk_publishing_components 23.3.0 → 23.7.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/govuk_publishing_components/components/copy-to-clipboard.js +16 -14
- data/app/assets/javascripts/govuk_publishing_components/components/details.js +38 -34
- data/app/assets/javascripts/govuk_publishing_components/components/print-link.js +8 -7
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +10 -9
- data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +0 -46
- data/app/assets/stylesheets/govuk_publishing_components/components/_transition-countdown.scss +125 -0
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +5 -4
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +14 -1
- data/app/views/govuk_publishing_components/components/_input.html.erb +6 -6
- data/app/views/govuk_publishing_components/components/_transition_countdown.html.erb +34 -0
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +10 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -1
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +55 -0
- data/app/views/govuk_publishing_components/components/docs/transition_countdown.yml +17 -0
- data/config/locales/cy.yml +9 -1
- data/config/locales/en.yml +7 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/app_helpers/countdown_helper.rb +33 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/govuk/all.js +31 -37
- data/node_modules/govuk-frontend/govuk/components/accordion/README.md +1 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +235 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +56 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +172 -0
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -3
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +275 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +170 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +13 -13
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1015 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +499 -0
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +83 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +66 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +181 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +93 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +5 -1
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +151 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +482 -0
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +2 -5
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +360 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +13 -1
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -5
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +50 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +91 -0
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +538 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +64 -0
- data/node_modules/govuk-frontend/govuk/components/input/template.njk +17 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +49 -0
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +75 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +6 -2
- data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +74 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +65 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +13 -13
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1066 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +248 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +72 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +1 -1
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +2 -10
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +991 -0
- data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +468 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +3 -6
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +229 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +117 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +199 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +68 -0
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -3
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -5
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +2 -1
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +7 -6
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +0 -1
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +2 -3
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +0 -1
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +1 -1
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +1 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +0 -3
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +9 -2
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -4
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +11 -5
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +0 -3
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +0 -3
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +36 -3
- data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +0 -12
@@ -56,6 +56,70 @@
|
|
56
56
|
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
57
57
|
"isComponent": true
|
58
58
|
},
|
59
|
+
{
|
60
|
+
"name": "prefix",
|
61
|
+
"type": "object",
|
62
|
+
"required": false,
|
63
|
+
"description": "Options for the prefix element.",
|
64
|
+
"params": [
|
65
|
+
{
|
66
|
+
"name": "text",
|
67
|
+
"type": "string",
|
68
|
+
"required": true,
|
69
|
+
"description": "Required. If `html` is set, this is not required. Text to use within the label. If `html` is provided, the `text` argument will be ignored."
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"name": "html",
|
73
|
+
"type": "string",
|
74
|
+
"required": true,
|
75
|
+
"description": "Required. If `text` is set, this is not required. HTML to use within the label. If `html` is provided, the `text` argument will be ignored."
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"name": "classes",
|
79
|
+
"type": "string",
|
80
|
+
"required": false,
|
81
|
+
"description": "Classes to add to the prefix."
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"name": "attributes",
|
85
|
+
"type": "object",
|
86
|
+
"required": false,
|
87
|
+
"description": "HTML attributes (for example data attributes) to add to the prefix element."
|
88
|
+
}
|
89
|
+
]
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"name": "suffix",
|
93
|
+
"type": "object",
|
94
|
+
"required": false,
|
95
|
+
"description": "Options for the suffix element.",
|
96
|
+
"params": [
|
97
|
+
{
|
98
|
+
"name": "text",
|
99
|
+
"type": "string",
|
100
|
+
"required": true,
|
101
|
+
"description": "Required. If `html` is set, this is not required. Text to use within the label. If `html` is provided, the `text` argument will be ignored."
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"name": "html",
|
105
|
+
"type": "string",
|
106
|
+
"required": true,
|
107
|
+
"description": "Required. If `text` is set, this is not required. HTML to use within the label. If `html` is provided, the `text` argument will be ignored."
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"name": "classes",
|
111
|
+
"type": "string",
|
112
|
+
"required": false,
|
113
|
+
"description": "Classes to add to the suffix element."
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"name": "attributes",
|
117
|
+
"type": "object",
|
118
|
+
"required": false,
|
119
|
+
"description": "HTML attributes (for example data attributes) to add to the suffix element."
|
120
|
+
}
|
121
|
+
]
|
122
|
+
},
|
59
123
|
{
|
60
124
|
"name": "formGroup",
|
61
125
|
"type": "object",
|
@@ -37,6 +37,15 @@
|
|
37
37
|
visuallyHiddenText: params.errorMessage.visuallyHiddenText
|
38
38
|
}) | indent(2) | trim }}
|
39
39
|
{% endif %}
|
40
|
+
|
41
|
+
{%- if params.prefix or params.suffix %}<div class="govuk-input__wrapper">{% endif -%}
|
42
|
+
|
43
|
+
{%- if params.prefix.text or params.prefix.html %}
|
44
|
+
<div class="govuk-input__prefix {{- ' ' + params.prefix.classes if params.prefix.classes }}" aria-hidden="true" {%- for attribute, value in params.prefix.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
45
|
+
{{- params.prefix.html | safe if params.prefix.html else params.prefix.text -}}
|
46
|
+
</div>
|
47
|
+
{% endif -%}
|
48
|
+
|
40
49
|
<input class="govuk-input {%- if params.classes %} {{ params.classes }}{% endif %} {%- if params.errorMessage %} govuk-input--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" type="{{ params.type | default('text') }}"
|
41
50
|
{%- if (params.spellcheck === false) or (params.spellcheck === true) %} spellcheck="{{ params.spellcheck }}"{% endif %}
|
42
51
|
{%- if params.value %} value="{{ params.value}}"{% endif %}
|
@@ -45,4 +54,12 @@
|
|
45
54
|
{%- if params.pattern %} pattern="{{ params.pattern }}"{% endif %}
|
46
55
|
{%- if params.inputmode %} inputmode="{{ params.inputmode }}"{% endif %}
|
47
56
|
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
57
|
+
|
58
|
+
{%- if params.suffix.text or params.suffix.html %}
|
59
|
+
<div class="govuk-input__suffix {{- ' ' + params.suffix.classes if params.suffix.classes }}" aria-hidden="true" {%- for attribute, value in params.suffix.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
60
|
+
{{- params.suffix.html | safe if params.suffix.html else params.suffix.text -}}
|
61
|
+
</div>
|
62
|
+
{% endif -%}
|
63
|
+
|
64
|
+
{%- if params.prefix or params.suffix %}</div>{% endif %}
|
48
65
|
</div>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"component": "inset-text",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "default",
|
6
|
+
"options": {
|
7
|
+
"text": "It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application."
|
8
|
+
},
|
9
|
+
"html": "<div class=\"govuk-inset-text\">\n It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.\n</div>"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name": "with html",
|
13
|
+
"options": {
|
14
|
+
"html": "<p class=\"govuk-body\">It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.</p>\n<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n You can be fined up to £5,000 if you don’t register.\n </strong>\n</div>\n<p class=\"govuk-body\">It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.</p>\n"
|
15
|
+
},
|
16
|
+
"html": "<div class=\"govuk-inset-text\">\n <p class=\"govuk-body\">It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.</p>\n<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n You can be fined up to £5,000 if you don’t register.\n </strong>\n</div>\n<p class=\"govuk-body\">It can take up to 8 weeks to register a lasting power of attorney if there are no mistakes in the application.</p>\n\n</div>"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "classes",
|
20
|
+
"options": {
|
21
|
+
"classes": "app-inset-text--custom-modifier"
|
22
|
+
},
|
23
|
+
"html": "<div class=\"govuk-inset-text app-inset-text--custom-modifier\">\n \n</div>"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"name": "id",
|
27
|
+
"options": {
|
28
|
+
"id": "my-inset-text"
|
29
|
+
},
|
30
|
+
"html": "<div id=\"my-inset-text\" class=\"govuk-inset-text\">\n \n</div>"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "html as text",
|
34
|
+
"options": {
|
35
|
+
"text": "It can take <b>up to 8 weeks</b> to register a lasting power of attorney if there are no mistakes in the application."
|
36
|
+
},
|
37
|
+
"html": "<div class=\"govuk-inset-text\">\n It can take <b>up to 8 weeks</b> to register a lasting power of attorney if there are no mistakes in the application.\n</div>"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "attributes",
|
41
|
+
"options": {
|
42
|
+
"attributes": {
|
43
|
+
"data-attribute": "my data value"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"html": "<div class=\"govuk-inset-text\" data-attribute=\"my data value\">\n \n</div>"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
{
|
2
|
+
"component": "label",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "default",
|
6
|
+
"options": {
|
7
|
+
"text": "National Insurance number"
|
8
|
+
},
|
9
|
+
"html": "<label class=\"govuk-label\">\n National Insurance number\n</label>"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"name": "with bold text",
|
13
|
+
"options": {
|
14
|
+
"classes": "govuk-label--s",
|
15
|
+
"text": "National Insurance number"
|
16
|
+
},
|
17
|
+
"html": "<label class=\"govuk-label govuk-label--s\">\n National Insurance number\n</label>"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"name": "as page heading",
|
21
|
+
"options": {
|
22
|
+
"text": "National Insurance number",
|
23
|
+
"classes": "govuk-label--xl",
|
24
|
+
"isPageHeading": true
|
25
|
+
},
|
26
|
+
"html": "<h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--xl\">\n National Insurance number\n </label>\n </h1>"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"name": "empty",
|
30
|
+
"options": {},
|
31
|
+
"html": ""
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"name": "classes",
|
35
|
+
"options": {
|
36
|
+
"text": "National Insurance number",
|
37
|
+
"classes": "extra-class one-more-class"
|
38
|
+
},
|
39
|
+
"html": "<label class=\"govuk-label extra-class one-more-class\">\n National Insurance number\n</label>"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"name": "html as text",
|
43
|
+
"options": {
|
44
|
+
"text": "National Insurance number, <em>NINO</em>"
|
45
|
+
},
|
46
|
+
"html": "<label class=\"govuk-label\">\n National Insurance number, <em>NINO</em>\n</label>"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "html",
|
50
|
+
"options": {
|
51
|
+
"html": "National Insurance number <em>NINO</em>"
|
52
|
+
},
|
53
|
+
"html": "<label class=\"govuk-label\">\n National Insurance number <em>NINO</em>\n</label>"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"name": "for",
|
57
|
+
"options": {
|
58
|
+
"for": "#dummy-input",
|
59
|
+
"text": "National Insurance number"
|
60
|
+
},
|
61
|
+
"html": "<label class=\"govuk-label\" for=\"#dummy-input\">\n National Insurance number\n</label>"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"name": "attributes",
|
65
|
+
"options": {
|
66
|
+
"text": "National Insurance number",
|
67
|
+
"attributes": {
|
68
|
+
"first-attribute": "true",
|
69
|
+
"second-attribute": "false"
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"html": "<label class=\"govuk-label\" first-attribute=\"true\" second-attribute=\"false\">\n National Insurance number\n</label>"
|
73
|
+
}
|
74
|
+
]
|
75
|
+
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
@include govuk-exports("govuk/component/panel") {
|
2
|
-
|
3
2
|
.govuk-panel {
|
4
3
|
@include govuk-font($size: 19);
|
5
4
|
|
@@ -20,6 +19,12 @@
|
|
20
19
|
.govuk-panel--confirmation {
|
21
20
|
color: govuk-colour("white");
|
22
21
|
background: govuk-colour("green", $legacy: "turquoise");
|
22
|
+
|
23
|
+
@include govuk-media-query($media-type: print) {
|
24
|
+
border-color: currentColor;
|
25
|
+
color: $govuk-print-text-colour;
|
26
|
+
background: none;
|
27
|
+
}
|
23
28
|
}
|
24
29
|
|
25
30
|
.govuk-panel__title {
|
@@ -36,5 +41,4 @@
|
|
36
41
|
.govuk-panel__body {
|
37
42
|
@include govuk-font($size: 36);
|
38
43
|
}
|
39
|
-
|
40
44
|
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
{
|
2
|
+
"component": "panel",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "default",
|
6
|
+
"options": {
|
7
|
+
"titleHtml": "Application complete",
|
8
|
+
"text": "Your reference number: HDJ2123F"
|
9
|
+
},
|
10
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Application complete\n </h1>\n \n <div class=\"govuk-panel__body\">\n Your reference number: HDJ2123F\n </div>\n \n</div>"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"name": "custom heading level",
|
14
|
+
"options": {
|
15
|
+
"titleText": "Application complete",
|
16
|
+
"headingLevel": 2,
|
17
|
+
"text": "Your reference number: HDJ2123F"
|
18
|
+
},
|
19
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h2 class=\"govuk-panel__title\">\n Application complete\n </h2>\n \n <div class=\"govuk-panel__body\">\n Your reference number: HDJ2123F\n </div>\n \n</div>"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"name": "title html as text",
|
23
|
+
"options": {
|
24
|
+
"titleText": "Application <strong>not</strong> complete"
|
25
|
+
},
|
26
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Application <strong>not</strong> complete\n </h1>\n \n</div>"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"name": "title html",
|
30
|
+
"options": {
|
31
|
+
"titleHtml": "Application <strong>not</strong> complete"
|
32
|
+
},
|
33
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Application <strong>not</strong> complete\n </h1>\n \n</div>"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "body html as text",
|
37
|
+
"options": {
|
38
|
+
"text": "Your reference number<br><strong>HDJ2123F</strong>"
|
39
|
+
},
|
40
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n \n </h1>\n \n <div class=\"govuk-panel__body\">\n Your reference number<br><strong>HDJ2123F</strong>\n </div>\n \n</div>"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"name": "body html",
|
44
|
+
"options": {
|
45
|
+
"html": "Your reference number<br><strong>HDJ2123F</strong>"
|
46
|
+
},
|
47
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n \n </h1>\n \n <div class=\"govuk-panel__body\">\n Your reference number<br><strong>HDJ2123F</strong>\n </div>\n \n</div>"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"name": "classes",
|
51
|
+
"options": {
|
52
|
+
"classes": "extra-class one-more-class"
|
53
|
+
},
|
54
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation extra-class one-more-class\">\n <h1 class=\"govuk-panel__title\">\n \n </h1>\n \n</div>"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "attributes",
|
58
|
+
"options": {
|
59
|
+
"attributes": {
|
60
|
+
"first-attribute": true,
|
61
|
+
"second-attribute": false
|
62
|
+
}
|
63
|
+
},
|
64
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\" first-attribute=\"true\" second-attribute=\"false\">\n <h1 class=\"govuk-panel__title\">\n \n </h1>\n \n</div>"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"name": "title with no body text",
|
68
|
+
"options": {
|
69
|
+
"titleText": "Application complete"
|
70
|
+
},
|
71
|
+
"html": "<div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Application complete\n </h1>\n \n</div>"
|
72
|
+
}
|
73
|
+
]
|
74
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"component": "phase-banner",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "default",
|
6
|
+
"options": {
|
7
|
+
"tag": {
|
8
|
+
"text": "alpha"
|
9
|
+
},
|
10
|
+
"html": "This is a new service - your <a href=\"#\" class=\"govuk-link\">feedback</a> will help us to improve it."
|
11
|
+
},
|
12
|
+
"html": "<div class=\"govuk-phase-banner\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag\">\n alpha\n </strong>\n <span class=\"govuk-phase-banner__text\">\n This is a new service - your <a href=\"#\" class=\"govuk-link\">feedback</a> will help us to improve it.\n </span>\n </p>\n</div>"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "classes",
|
16
|
+
"options": {
|
17
|
+
"classes": "extra-class one-more-class"
|
18
|
+
},
|
19
|
+
"html": "<div class=\"govuk-phase-banner extra-class one-more-class\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag\">\n \n </strong>\n <span class=\"govuk-phase-banner__text\">\n \n </span>\n </p>\n</div>"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"name": "text",
|
23
|
+
"options": {
|
24
|
+
"text": "This is a new service – your feedback will help us to improve it"
|
25
|
+
},
|
26
|
+
"html": "<div class=\"govuk-phase-banner\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag\">\n \n </strong>\n <span class=\"govuk-phase-banner__text\">\n This is a new service – your feedback will help us to improve it\n </span>\n </p>\n</div>"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"name": "html as text",
|
30
|
+
"options": {
|
31
|
+
"text": "This is a new service - your <a href=\"#\" class=\"govuk-link\">feedback</a> will help us to improve it."
|
32
|
+
},
|
33
|
+
"html": "<div class=\"govuk-phase-banner\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag\">\n \n </strong>\n <span class=\"govuk-phase-banner__text\">\n This is a new service - your <a href="#" class="govuk-link">feedback</a> will help us to improve it.\n </span>\n </p>\n</div>"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "attributes",
|
37
|
+
"options": {
|
38
|
+
"attributes": {
|
39
|
+
"first-attribute": true,
|
40
|
+
"second-attribute": false
|
41
|
+
}
|
42
|
+
},
|
43
|
+
"html": "<div class=\"govuk-phase-banner\" first-attribute=\"true\" second-attribute=\"false\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag\">\n \n </strong>\n <span class=\"govuk-phase-banner__text\">\n \n </span>\n </p>\n</div>"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"name": "tag html",
|
47
|
+
"options": {
|
48
|
+
"tag": {
|
49
|
+
"html": "<em>alpha</em>"
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"html": "<div class=\"govuk-phase-banner\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag\">\n <em>alpha</em>\n </strong>\n <span class=\"govuk-phase-banner__text\">\n \n </span>\n </p>\n</div>"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"name": "tag classes",
|
56
|
+
"options": {
|
57
|
+
"tag": {
|
58
|
+
"classes": "govuk-tag--inactive",
|
59
|
+
"text": "alpha"
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"html": "<div class=\"govuk-phase-banner\">\n <p class=\"govuk-phase-banner__content\">\n <strong class=\"govuk-tag govuk-phase-banner__content__tag govuk-tag--inactive\">\n alpha\n </strong>\n <span class=\"govuk-phase-banner__text\">\n \n </span>\n </p>\n</div>"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
}
|
@@ -77,7 +77,7 @@
|
|
77
77
|
}
|
78
78
|
|
79
79
|
// ( ) Radio ring
|
80
|
-
.govuk-radios__label
|
80
|
+
.govuk-radios__label:before {
|
81
81
|
content: "";
|
82
82
|
box-sizing: border-box;
|
83
83
|
position: absolute;
|
@@ -96,7 +96,7 @@
|
|
96
96
|
//
|
97
97
|
// We create the 'button' entirely out of 'border' so that they remain
|
98
98
|
// 'filled' even when colours are overridden in the browser.
|
99
|
-
.govuk-radios__label
|
99
|
+
.govuk-radios__label:after {
|
100
100
|
content: "";
|
101
101
|
|
102
102
|
position: absolute;
|
@@ -119,13 +119,13 @@
|
|
119
119
|
}
|
120
120
|
|
121
121
|
// Focused state
|
122
|
-
.govuk-radios__input:focus + .govuk-radios__label
|
122
|
+
.govuk-radios__input:focus + .govuk-radios__label:before {
|
123
123
|
border-width: 4px;
|
124
124
|
box-shadow: 0 0 0 $govuk-radios-focus-width $govuk-focus-colour;
|
125
125
|
}
|
126
126
|
|
127
127
|
// Selected state
|
128
|
-
.govuk-radios__input:checked + .govuk-radios__label
|
128
|
+
.govuk-radios__input:checked + .govuk-radios__label:after {
|
129
129
|
opacity: 1;
|
130
130
|
}
|
131
131
|
|
@@ -260,7 +260,7 @@
|
|
260
260
|
//
|
261
261
|
// Reduce the size of the control [1], vertically centering it within the
|
262
262
|
// touch target [2]
|
263
|
-
.govuk-radios__label
|
263
|
+
.govuk-radios__label:before {
|
264
264
|
top: $input-offset - $govuk-border-width-form-element; // 2
|
265
265
|
width: $govuk-small-radios-size; // 1
|
266
266
|
height: $govuk-small-radios-size; // 1
|
@@ -269,7 +269,7 @@
|
|
269
269
|
// • Radio button
|
270
270
|
//
|
271
271
|
// Reduce the size of the 'button' and center it within the ring
|
272
|
-
.govuk-radios__label
|
272
|
+
.govuk-radios__label:after {
|
273
273
|
top: 15px;
|
274
274
|
left: 7px;
|
275
275
|
border-width: 5px;
|
@@ -308,7 +308,7 @@
|
|
308
308
|
// is so much larger than their visible size, and so we need to provide
|
309
309
|
// feedback to the user as to which radio they will select when their
|
310
310
|
// cursor is outside of the visible area.
|
311
|
-
.govuk-radios__item:hover .govuk-radios__input:not(:disabled) + .govuk-radios__label
|
311
|
+
.govuk-radios__item:hover .govuk-radios__input:not(:disabled) + .govuk-radios__label:before {
|
312
312
|
box-shadow: 0 0 0 $govuk-hover-width $govuk-hover-colour;
|
313
313
|
}
|
314
314
|
|
@@ -317,10 +317,10 @@
|
|
317
317
|
//
|
318
318
|
// We use two box shadows, one that restores the original focus state [1]
|
319
319
|
// and another that then applies the hover state [2].
|
320
|
-
.govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label
|
321
|
-
|
322
|
-
|
323
|
-
|
320
|
+
.govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label:before {
|
321
|
+
box-shadow:
|
322
|
+
0 0 0 $govuk-radios-focus-width $govuk-focus-colour, // 1
|
323
|
+
0 0 0 $govuk-hover-width $govuk-hover-colour; // 2
|
324
324
|
}
|
325
325
|
|
326
326
|
// For devices that explicitly don't support hover, don't provide a hover
|
@@ -330,11 +330,11 @@
|
|
330
330
|
// state in browsers that don't support `@media (hover)` (like Internet
|
331
331
|
// Explorer) – so we have to 'undo' the hover state instead.
|
332
332
|
@media (hover: none), (pointer: coarse) {
|
333
|
-
.govuk-radios__item:hover .govuk-radios__input:not(:disabled) + .govuk-radios__label
|
333
|
+
.govuk-radios__item:hover .govuk-radios__input:not(:disabled) + .govuk-radios__label:before {
|
334
334
|
box-shadow: initial;
|
335
335
|
}
|
336
336
|
|
337
|
-
.govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label
|
337
|
+
.govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label:before {
|
338
338
|
box-shadow: 0 0 0 $govuk-radios-focus-width $govuk-focus-colour;
|
339
339
|
}
|
340
340
|
}
|