govuk_publishing_components 11.0.0 → 11.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/admin_scripts.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +11 -3
  5. data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +2 -4
  6. data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +2 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +2 -6
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -9
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +2 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +2 -6
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +3 -7
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +2 -6
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +3 -7
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +2 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +2 -6
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +2 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +2 -13
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +2 -6
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +3 -8
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +2 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +2 -1
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +15 -10
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +3 -1
  25. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +5 -0
  27. data/app/views/govuk_publishing_components/components/_admin_analytics.html.erb +10 -0
  28. data/app/views/govuk_publishing_components/components/_file_upload.html.erb +1 -1
  29. data/app/views/govuk_publishing_components/components/_input.html.erb +7 -5
  30. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +43 -1
  31. data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
  32. data/app/views/govuk_publishing_components/components/docs/admin_analytics.yml +9 -0
  33. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -2
  34. data/app/views/govuk_publishing_components/components/docs/input.yml +9 -0
  35. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -2
  36. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +117 -3
  37. data/app/views/govuk_publishing_components/components/docs/select.yml +1 -2
  38. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -2
  39. data/config/initializers/assets.rb +1 -1
  40. data/lib/govuk_publishing_components.rb +1 -0
  41. data/lib/govuk_publishing_components/app_helpers/environment.rb +18 -0
  42. data/lib/govuk_publishing_components/version.rb +1 -1
  43. data/node_modules/govuk-frontend/all.js +3 -1
  44. data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
  45. data/node_modules/govuk-frontend/components/back-link/macro-options.json +32 -0
  46. data/node_modules/govuk-frontend/components/breadcrumbs/README.md +12 -0
  47. data/node_modules/govuk-frontend/components/breadcrumbs/macro-options.json +40 -0
  48. data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +1 -1
  49. data/node_modules/govuk-frontend/components/button/_button.scss +4 -9
  50. data/node_modules/govuk-frontend/components/button/macro-options.json +62 -0
  51. data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +2 -4
  52. data/node_modules/govuk-frontend/components/checkboxes/macro-options.json +129 -0
  53. data/node_modules/govuk-frontend/components/date-input/README.md +19 -7
  54. data/node_modules/govuk-frontend/components/date-input/macro-options.json +85 -0
  55. data/node_modules/govuk-frontend/components/date-input/template.njk +2 -22
  56. data/node_modules/govuk-frontend/components/details/_details.scss +3 -0
  57. data/node_modules/govuk-frontend/components/details/macro-options.json +50 -0
  58. data/node_modules/govuk-frontend/components/error-message/macro-options.json +32 -0
  59. data/node_modules/govuk-frontend/components/error-summary/README.md +12 -0
  60. data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +7 -3
  61. data/node_modules/govuk-frontend/components/error-summary/macro-options.json +70 -0
  62. data/node_modules/govuk-frontend/components/error-summary/template.njk +1 -1
  63. data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +1 -2
  64. data/node_modules/govuk-frontend/components/fieldset/macro-options.json +58 -0
  65. data/node_modules/govuk-frontend/components/file-upload/macro-options.json +53 -0
  66. data/node_modules/govuk-frontend/components/footer/README.md +48 -0
  67. data/node_modules/govuk-frontend/components/footer/_footer.scss +10 -2
  68. data/node_modules/govuk-frontend/components/footer/macro-options.json +100 -0
  69. data/node_modules/govuk-frontend/components/footer/template.njk +19 -12
  70. data/node_modules/govuk-frontend/components/header/README.md +14 -2
  71. data/node_modules/govuk-frontend/components/header/_header.scss +9 -1
  72. data/node_modules/govuk-frontend/components/header/macro-options.json +88 -0
  73. data/node_modules/govuk-frontend/components/header/template.njk +2 -2
  74. data/node_modules/govuk-frontend/components/hint/macro-options.json +32 -0
  75. data/node_modules/govuk-frontend/components/input/README.md +1 -1
  76. data/node_modules/govuk-frontend/components/input/_input.scss +1 -3
  77. data/node_modules/govuk-frontend/components/input/macro-options.json +52 -0
  78. data/node_modules/govuk-frontend/components/inset-text/macro-options.json +32 -0
  79. data/node_modules/govuk-frontend/components/label/macro-options.json +38 -0
  80. data/node_modules/govuk-frontend/components/panel/README.md +5 -5
  81. data/node_modules/govuk-frontend/components/panel/_panel.scss +1 -3
  82. data/node_modules/govuk-frontend/components/panel/macro-options.json +44 -0
  83. data/node_modules/govuk-frontend/components/panel/template.njk +1 -2
  84. data/node_modules/govuk-frontend/components/phase-banner/macro-options.json +33 -0
  85. data/node_modules/govuk-frontend/components/radios/_radios.scss +10 -4
  86. data/node_modules/govuk-frontend/components/radios/macro-options.json +135 -0
  87. data/node_modules/govuk-frontend/components/radios/template.njk +1 -1
  88. data/node_modules/govuk-frontend/components/select/README.md +63 -0
  89. data/node_modules/govuk-frontend/components/select/_select.scss +1 -4
  90. data/node_modules/govuk-frontend/components/select/macro-options.json +79 -0
  91. data/node_modules/govuk-frontend/components/select/template.njk +4 -1
  92. data/node_modules/govuk-frontend/components/skip-link/macro-options.json +32 -0
  93. data/node_modules/govuk-frontend/components/table/_table.scss +7 -4
  94. data/node_modules/govuk-frontend/components/table/macro-options.json +108 -0
  95. data/node_modules/govuk-frontend/components/tabs/README.md +29 -5
  96. data/node_modules/govuk-frontend/components/tabs/_tabs.scss +1 -1
  97. data/node_modules/govuk-frontend/components/tabs/macro-options.json +58 -0
  98. data/node_modules/govuk-frontend/components/tabs/tabs.js +3 -1
  99. data/node_modules/govuk-frontend/components/tabs/template.njk +3 -2
  100. data/node_modules/govuk-frontend/components/tag/macro-options.json +26 -0
  101. data/node_modules/govuk-frontend/components/textarea/_textarea.scss +4 -3
  102. data/node_modules/govuk-frontend/components/textarea/macro-options.json +65 -0
  103. data/node_modules/govuk-frontend/components/warning-text/macro-options.json +32 -0
  104. data/node_modules/govuk-frontend/core/_links.scss +1 -14
  105. data/node_modules/govuk-frontend/core/_lists.scss +0 -18
  106. data/node_modules/govuk-frontend/helpers/_grid.scss +1 -2
  107. data/node_modules/govuk-frontend/helpers/_links.scss +52 -1
  108. data/node_modules/govuk-frontend/overrides/_width.scss +4 -0
  109. data/node_modules/govuk-frontend/package.json +19 -19
  110. data/node_modules/govuk-frontend/settings/_colours-applied.scss +10 -0
  111. data/node_modules/govuk-frontend/settings/_compatibility.scss +3 -3
  112. data/node_modules/govuk-frontend/settings/_typography-responsive.scss +10 -3
  113. data/node_modules/govuk-frontend/template.njk +1 -1
  114. data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +0 -5
  115. metadata +32 -2
@@ -152,7 +152,7 @@ Find out when to use the header component in your service in the [GOV.UK Design
152
152
 
153
153
  <div class="govuk-header__content">
154
154
 
155
- <button role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
155
+ <button type="button" role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
156
156
  <nav>
157
157
  <ul id="navigation" class="govuk-header__navigation " aria-label="Top Level Navigation">
158
158
 
@@ -257,7 +257,7 @@ Find out when to use the header component in your service in the [GOV.UK Design
257
257
  Service Name
258
258
  </a>
259
259
 
260
- <button role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
260
+ <button type="button" role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
261
261
  <nav>
262
262
  <ul id="navigation" class="govuk-header__navigation " aria-label="Top Level Navigation">
263
263
 
@@ -473,6 +473,18 @@ If you are using Nunjucks,then macros take the following arguments
473
473
 
474
474
  <tr class="govuk-table__row">
475
475
 
476
+ <th class="govuk-table__header" scope="row">navigation.{}.attributes</th>
477
+
478
+ <td class="govuk-table__cell ">object</td>
479
+
480
+ <td class="govuk-table__cell ">No</td>
481
+
482
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the navigation item anchor.</td>
483
+
484
+ </tr>
485
+
486
+ <tr class="govuk-table__row">
487
+
476
488
  <th class="govuk-table__header" scope="row">navigationClasses</th>
477
489
 
478
490
  <td class="govuk-table__cell ">string</td>
@@ -76,8 +76,10 @@
76
76
  text-decoration: underline;
77
77
  }
78
78
 
79
+ // When focussed, the text colour needs to be darker to ensure that colour
80
+ // contrast is still acceptable
79
81
  &:focus {
80
- color: govuk-colour("black");
82
+ color: $govuk-focus-text-colour;
81
83
  }
82
84
 
83
85
  // alphagov/govuk_template includes a specific a:link:focus selector
@@ -239,6 +241,12 @@
239
241
  &:visited {
240
242
  color: $govuk-header-link-active;
241
243
  }
244
+
245
+ // When focussed, the text colour needs to be darker to ensure that colour
246
+ // contrast is still acceptable
247
+ &:focus {
248
+ color: $govuk-focus-text-colour;
249
+ }
242
250
  }
243
251
  }
244
252
 
@@ -0,0 +1,88 @@
1
+ [
2
+ {
3
+ "name": "homepageUrl",
4
+ "type": "string",
5
+ "required": false,
6
+ "description": "The url of the homepage. Defaults to /"
7
+ },
8
+ {
9
+ "name": "assetsPath",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": "The public path for the assets folder. If not provided it defaults to /assets/images"
13
+ },
14
+ {
15
+ "name": "productName",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify)"
19
+ },
20
+ {
21
+ "name": "serviceName",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify)"
25
+ },
26
+ {
27
+ "name": "serviceUrl",
28
+ "type": "string",
29
+ "required": false,
30
+ "description": "Url for the service name anchor."
31
+ },
32
+ {
33
+ "name": "navigation",
34
+ "type": "array",
35
+ "required": false,
36
+ "description": "An array of navigation item objects.",
37
+ "params": [
38
+ {
39
+ "name": "text",
40
+ "type": "string",
41
+ "required": false,
42
+ "description": "Text of the navigation item."
43
+ },
44
+ {
45
+ "name": "href",
46
+ "type": "string",
47
+ "required": false,
48
+ "description": "Url of the navigation item anchor. Both `href` and `text` attributes for navigation items need to be provided to create an item."
49
+ },
50
+ {
51
+ "name": "active",
52
+ "type": "boolean",
53
+ "required": false,
54
+ "description": "Flag to mark the navigation item as active or not."
55
+ },
56
+ {
57
+ "name": "attributes",
58
+ "type": "object",
59
+ "required": false,
60
+ "description": "HTML attributes (for example data attributes) to add to the navigation item anchor."
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "name": "navigationClasses",
66
+ "type": "string",
67
+ "required": false,
68
+ "description": "Classes for the navigation section of the header."
69
+ },
70
+ {
71
+ "name": "containerClasses",
72
+ "type": "string",
73
+ "required": false,
74
+ "description": "Classes for the container, useful if you want to make the header fixed width."
75
+ },
76
+ {
77
+ "name": "classes",
78
+ "type": "string",
79
+ "required": false,
80
+ "description": "Classes to add to the header container."
81
+ },
82
+ {
83
+ "name": "attributes",
84
+ "type": "object",
85
+ "required": false,
86
+ "description": "HTML attributes (for example data attributes) to add to the header container."
87
+ }
88
+ ]
@@ -63,13 +63,13 @@
63
63
  {% endif %}
64
64
 
65
65
  {% if params.navigation %}
66
- <button role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
66
+ <button type="button" role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
67
67
  <nav>
68
68
  <ul id="navigation" class="govuk-header__navigation {{ params.navigationClasses if params.navigationClasses }}" aria-label="Top Level Navigation">
69
69
  {% for item in params.navigation %}
70
70
  {% if item.href and item.text %}
71
71
  <li class="govuk-header__navigation-item{{ ' govuk-header__navigation-item--active' if item.active }}">
72
- <a class="govuk-header__link" href="{{ item.href }}">
72
+ <a class="govuk-header__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
73
73
  {{ item.text }}
74
74
  </a>
75
75
  </li>
@@ -0,0 +1,32 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `html` is set, this is not required. Text to use within the hint. If `html` is provided, the `text` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "html",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `text` is set, this is not required. HTML to use within the hint. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "id",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "Optional id attribute to add to the hint span tag."
19
+ },
20
+ {
21
+ "name": "classes",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Classes to add to the hint span tag."
25
+ },
26
+ {
27
+ "name": "attributes",
28
+ "type": "object",
29
+ "required": false,
30
+ "description": "HTML attributes (for example data attributes) to add to the hint span tag."
31
+ }
32
+ ]
@@ -6,7 +6,7 @@ A single-line text field.
6
6
 
7
7
  ## Guidance
8
8
 
9
- Find out when to use the input component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/text-input).
9
+ Find out when to use the input component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/text-input).
10
10
 
11
11
  ## Quick start examples
12
12
 
@@ -11,9 +11,7 @@
11
11
  @include govuk-font($size: 19);
12
12
  @include govuk-focusable;
13
13
 
14
- -webkit-box-sizing: border-box;
15
-
16
- box-sizing: border-box;
14
+ box-sizing: border-box;
17
15
  width: 100%;
18
16
  height: 40px;
19
17
  margin-top: 0;
@@ -0,0 +1,52 @@
1
+ [
2
+ {
3
+ "name": "id",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "The id of the input."
7
+ },
8
+ {
9
+ "name": "name",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "The name of the input, which is submitted with the form data."
13
+ },
14
+ {
15
+ "name": "type",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "Type of input control to render. Defaults to \"text\"."
19
+ },
20
+ {
21
+ "name": "value",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Optional initial value of the input."
25
+ },
26
+ {
27
+ "name": "hint",
28
+ "type": "object",
29
+ "required": false,
30
+ "description": "Options for the hint component.",
31
+ "isComponent": true
32
+ },
33
+ {
34
+ "name": "errorMessage",
35
+ "type": "object",
36
+ "required": false,
37
+ "description": "Options for the errorMessage component.",
38
+ "isComponent": true
39
+ },
40
+ {
41
+ "name": "classes",
42
+ "type": "string",
43
+ "required": false,
44
+ "description": "Classes to add to the anchor tag."
45
+ },
46
+ {
47
+ "name": "attributes",
48
+ "type": "object",
49
+ "required": false,
50
+ "description": "HTML attributes (for example data attributes) to add to the anchor tag."
51
+ }
52
+ ]
@@ -0,0 +1,32 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `html` is set, this is not required. Text to use within the back link component. If `html` is provided, the `text` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "html",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `text` is set, this is not required. HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "id",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "Id attribute to add to the inset text container."
19
+ },
20
+ {
21
+ "name": "classes",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Classes to add to the anchor tag."
25
+ },
26
+ {
27
+ "name": "attributes",
28
+ "type": "object",
29
+ "required": false,
30
+ "description": "HTML attributes (for example data attributes) to add to the anchor tag."
31
+ }
32
+ ]
@@ -0,0 +1,38 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `html` is set, this is not required. Text to use within the label. If `html` is provided, the `text` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "html",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `text` is set, this is not required. HTML to use within the label. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "for",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "The value of the for attribute, the id of the input the label is associated with."
19
+ },
20
+ {
21
+ "name": "isPageHeading",
22
+ "type": "boolean",
23
+ "required": false,
24
+ "description": "Whether the label also acts as the heading for the page."
25
+ },
26
+ {
27
+ "name": "classes",
28
+ "type": "string",
29
+ "required": false,
30
+ "description": "Classes to add to the label tag."
31
+ },
32
+ {
33
+ "name": "attributes",
34
+ "type": "object",
35
+ "required": false,
36
+ "description": "HTML attributes (for example data attributes) to add to the label tag."
37
+ }
38
+ ]
@@ -17,9 +17,9 @@ Find out when to use the panel component in your service in the [GOV.UK Design S
17
17
  #### Markup
18
18
 
19
19
  <div class="govuk-panel govuk-panel--confirmation">
20
- <h2 class="govuk-panel__title">
20
+ <h1 class="govuk-panel__title">
21
21
  Application complete
22
- </h2>
22
+ </h1>
23
23
 
24
24
  <div class="govuk-panel__body">
25
25
  Your reference number: HDJ2123F
@@ -43,9 +43,9 @@ Find out when to use the panel component in your service in the [GOV.UK Design S
43
43
  #### Markup
44
44
 
45
45
  <div class="govuk-panel govuk-panel--confirmation">
46
- <h1 class="govuk-panel__title">
46
+ <h2 class="govuk-panel__title">
47
47
  Application complete
48
- </h1>
48
+ </h2>
49
49
 
50
50
  <div class="govuk-panel__body">
51
51
  Your reference number: HDJ2123F
@@ -59,7 +59,7 @@ Find out when to use the panel component in your service in the [GOV.UK Design S
59
59
 
60
60
  {{ govukPanel({
61
61
  "titleText": "Application complete",
62
- "headingLevel": 1,
62
+ "headingLevel": 2,
63
63
  "text": "Your reference number: HDJ2123F"
64
64
  }) }}
65
65
 
@@ -7,9 +7,7 @@
7
7
  .govuk-panel {
8
8
  @include govuk-font($size: 19);
9
9
 
10
- -webkit-box-sizing: border-box;
11
-
12
- box-sizing: border-box;
10
+ box-sizing: border-box;
13
11
 
14
12
  margin-bottom: govuk-spacing(3);
15
13
  padding: govuk-spacing(7) - $govuk-border-width;
@@ -0,0 +1,44 @@
1
+ [
2
+ {
3
+ "name": "titleText",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `titleHtml` is set, this is not required. Text to use within the panel. If `titleHtml` is provided, the `titleText` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "titleHtml",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `titleText` is set, this is not required. HTML to use within the panel. If `titleHtml` is provided, the `titleText` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "headingLevel",
16
+ "type": "integer",
17
+ "required": false,
18
+ "description": "Heading level, from 1 to 6. Default is 1."
19
+ },
20
+ {
21
+ "name": "text",
22
+ "type": "string",
23
+ "required": true,
24
+ "description": "If `html` is set, this is not required. Text to use within the panel content. If `html` is provided, the `text` argument will be ignored."
25
+ },
26
+ {
27
+ "name": "html",
28
+ "type": "string",
29
+ "required": true,
30
+ "description": "If `text` is set, this is not required. HTML to use within the panel content. If `html` is provided, the `text` argument will be ignored."
31
+ },
32
+ {
33
+ "name": "classes",
34
+ "type": "string",
35
+ "required": false,
36
+ "description": "Classes to add to the panel container."
37
+ },
38
+ {
39
+ "name": "attributes",
40
+ "type": "object",
41
+ "required": false,
42
+ "description": "HTML attributes (for example data attributes) to add to the panel container."
43
+ }
44
+ ]
@@ -1,5 +1,4 @@
1
- {#- TODO: Change default title heading level to 1 - https://github.com/alphagov/govuk-frontend/issues/864 -#}
2
- {% set headingLevel = params.headingLevel if params.headingLevel else 2 %}
1
+ {% set headingLevel = params.headingLevel if params.headingLevel else 1 %}
3
2
  <div class="govuk-panel govuk-panel--confirmation
4
3
  {%- if params.classes %} {{ params.classes }}{% endif %}"
5
4
  {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
@@ -0,0 +1,33 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `html` is set, this is not required. Text to use within the phase banner. If `html` is provided, the `text` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "html",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `text` is set, this is not required. HTML to use within the phase banner. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "tag",
16
+ "type": "object",
17
+ "required": false,
18
+ "description": "Options for the tag component.",
19
+ "isComponent": true
20
+ },
21
+ {
22
+ "name": "classes",
23
+ "type": "string",
24
+ "required": false,
25
+ "description": "Classes to add to the phase banner container."
26
+ },
27
+ {
28
+ "name": "attributes",
29
+ "type": "object",
30
+ "required": false,
31
+ "description": "HTML attributes (for example data attributes) to add to the phase banner container."
32
+ }
33
+ ]