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
@@ -13,9 +13,8 @@ accessibility_criteria: |
13
13
  * toggle the visibility of the details element's content when interacted with
14
14
  * indicate the expanded state when details' content is visible
15
15
  * indicate the collapsed state when details' content is hidden
16
- part_of_admin_layout: true
17
16
  govuk_frontend_components:
18
- - header
17
+ - details
19
18
  examples:
20
19
  default:
21
20
  data:
@@ -13,6 +13,8 @@ accessibility_criteria: |
13
13
  * be of the appropriate type for their use, e.g. password inputs should be of type 'password'
14
14
 
15
15
  Labels use the [label component](/component-guide/label).
16
+
17
+ Avoid using autofocus and tabindex unless you have user research to support this behaviour.
16
18
  govuk_frontend_components:
17
19
  - input
18
20
  examples:
@@ -56,3 +58,10 @@ examples:
56
58
  text: "Search for"
57
59
  name: "name"
58
60
  value: "moose"
61
+ autofocused:
62
+ data:
63
+ label:
64
+ text: "Username"
65
+ name: "username"
66
+ autofocus: true
67
+ tabindex: 0
@@ -1,6 +1,5 @@
1
- name: Inset text (experimental)
1
+ name: Inset text
2
2
  description: Use the inset text component to differentiate a block of text from the content that surrounds it.
3
- part_of_admin_layout: true
4
3
  govuk_frontend_components:
5
4
  - inset-text
6
5
  accessibility_criteria: |
@@ -3,10 +3,124 @@ description: The footer provides copyright, licensing and other information
3
3
  part_of_admin_layout: true
4
4
  govuk_frontend_components:
5
5
  - footer
6
+ accessibility_criteria: |
7
+ Text and links in the Footer must:
8
+
9
+ - have a text contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
10
+
11
+ Links in the Footer must:
12
+
13
+ - accept focus
14
+ - be focusable with a keyboard
15
+ - be usable with a keyboard
16
+ - indicate when they have focus
17
+ - change in appearance when touched (in the touch-down state)
18
+ - change in appearance when hovered
19
+ - have visible text
20
+
21
+ Images in the Footer must:
22
+
23
+ - be presentational when linked to from accompanying text "Open Government Licence (OGL) icon".
24
+
25
+ Landmarks and Roles in the Footer should:
26
+
27
+ - avoid navigation landmarks or roles
28
+
29
+ The footer element alone is sufficient for such cases; while a [nav element](https://www.w3.org/TR/html52/sections.html#the-nav-element) can be used, it is usually unnecessary.
30
+
31
+ Note: This decision has been made based on prior experience seeing removal of overuse of `<nav>` elements from www.GOV.UK, which made it confusing for users of assistive technologies to know what were the most important navigation aspects of GOV.UK.
32
+ Should be challenged if user research indicates this is an issue.
33
+
34
+ - have a role of [`contentinfo`](https://www.w3.org/TR/wai-aria-1.1/#contentinfo) at the root of the component (<footer>)
35
+
36
+ Note: This decision has been made given that most uses of this role tend to be used directly on a `<footer>` element.
37
+ Assumption made is that is most predictable for users of assistive technologies.
38
+ The spec indicates that `contentinfo` is useful for "Examples of information included in this region of the page are copyrights and links to privacy statements.", which may indicate that it might be better placed around the 'meta' section of this component.
39
+ Should be challenged if user research indicates this is an issue.
6
40
  examples:
7
41
  default:
8
42
  data: {}
9
- accessibility_criteria: |
10
- The component must:
11
43
 
12
- * implement accessible links
44
+ with_meta:
45
+ data:
46
+ meta:
47
+ items:
48
+ - href: '/help'
49
+ text: Help
50
+ - href: '/help/cookies'
51
+ text: Cookies
52
+ - href: '/contact'
53
+ text: Contact
54
+ - href: '/help/terms-conditions'
55
+ text: Terms and conditions
56
+ - href: '/cymraeg'
57
+ text: Rhestr o Wasanaethau Cymraeg
58
+ - href: '/government/organisations/government-digital-service'
59
+ text: Government Digital Service
60
+
61
+ with_navigation:
62
+ data:
63
+ navigation:
64
+ - title: Services and information
65
+ columns: 2
66
+ items:
67
+ - href: '/browse/benefits'
68
+ text: Benefits
69
+ - href: '/browse/births-deaths-marriages'
70
+ text: Births, deaths, marriages and care
71
+ - href: '/browse/business'
72
+ text: Business and self-employed
73
+ - href: '/browse/childcare-parenting'
74
+ text: Childcare and parenting
75
+ - href: '/browse/citizenship'
76
+ text: Citizenship and living in the UK
77
+ - href: '/browse/justice'
78
+ text: Crime, justice and the law
79
+ - href: '/browse/disabilities'
80
+ text: Disabled people
81
+ - href: '/browse/driving'
82
+ text: Driving and transport
83
+ - href: '/browse/education'
84
+ text: Education and learning
85
+ - href: '/browse/employing-people'
86
+ text: Employing people
87
+ - href: '/browse/environment-countryside'
88
+ text: Environment and countryside
89
+ - href: '/browse/housing-local-services'
90
+ text: Housing and local services
91
+ - href: '/browse/tax'
92
+ text: Money and tax
93
+ - href: '/browse/abroad'
94
+ text: Passports, travel and living abroad
95
+ - href: '/browse/visas-immigration'
96
+ text: Visas and immigration
97
+ - href: '/browse/working'
98
+ text: Working, jobs and pensions
99
+ - title: Departments and policy
100
+ items:
101
+ - href: '/government/how-government-works'
102
+ text: How government works
103
+ - href: '/government/organisations'
104
+ text: Departments
105
+ - href: '/world'
106
+ text: Worldwide
107
+ - href: '/government/policies'
108
+ text: Policies
109
+ - href: '/government/publications'
110
+ text: Publications
111
+ - href: '/government/announcements'
112
+ text: Announcements
113
+ meta:
114
+ items:
115
+ - href: '/help'
116
+ text: Help
117
+ - href: '/help/cookies'
118
+ text: Cookies
119
+ - href: '/contact'
120
+ text: Contact
121
+ - href: '/help/terms-conditions'
122
+ text: Terms and conditions
123
+ - href: '/cymraeg'
124
+ text: Rhestr o Wasanaethau Cymraeg
125
+ - href: '/government/organisations/government-digital-service'
126
+ text: Government Digital Service
@@ -1,6 +1,5 @@
1
- name: Select (experimental)
1
+ name: Select
2
2
  description: A dropdown select
3
- part_of_admin_layout: true
4
3
  govuk_frontend_components:
5
4
  - select
6
5
  accessibility_criteria: |
@@ -1,6 +1,5 @@
1
- name: Form textarea (experimental)
1
+ name: Form textarea
2
2
  description: A textarea field and an associated label
3
- part_of_admin_layout: true
4
3
  govuk_frontend_components:
5
4
  - textarea
6
5
  accessibility_criteria: |
@@ -32,5 +32,5 @@ Rails.application.config.assets.precompile += %w(
32
32
  Rails.application.config.assets.paths += %W(
33
33
  #{__dir__}/../../node_modules/govuk-frontend/assets/images
34
34
  #{__dir__}/../../node_modules/govuk-frontend/assets/fonts
35
- #{__dir__}/../../node_modules/govuk-frontend/
35
+ #{__dir__}/../../node_modules/
36
36
  )
@@ -26,6 +26,7 @@ require "govuk_publishing_components/presenters/taxonomy_list_helper"
26
26
  require "govuk_publishing_components/app_helpers/taxon_breadcrumbs"
27
27
  require "govuk_publishing_components/app_helpers/table_helper"
28
28
  require "govuk_publishing_components/app_helpers/brand_helper"
29
+ require "govuk_publishing_components/app_helpers/environment"
29
30
 
30
31
  module GovukPublishingComponents
31
32
  end
@@ -0,0 +1,18 @@
1
+ module GovukPublishingComponents
2
+ module AppHelpers
3
+ class Environment
4
+ GOVUK_ENVIRONMENTS = {
5
+ "production" => "production",
6
+ "staging" => "staging",
7
+ "integration-blue-aws" => "integration",
8
+ }.freeze
9
+
10
+ # The "acceptance environment" we're in - not the same as Rails env.
11
+ #
12
+ # Can be "production", "staging", "integration", or "development"
13
+ def self.current_acceptance_environment
14
+ GOVUK_ENVIRONMENTS.fetch(ENV["ERRBIT_ENVIRONMENT_NAME"], "development")
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '11.0.0'.freeze
2
+ VERSION = '11.1.0'.freeze
3
3
  end
@@ -1655,16 +1655,18 @@ Tabs.prototype.hidePanel = function (tab) {
1655
1655
 
1656
1656
  Tabs.prototype.unhighlightTab = function ($tab) {
1657
1657
  $tab.setAttribute('aria-selected', 'false');
1658
+ $tab.classList.remove('govuk-tabs__tab--selected');
1658
1659
  $tab.setAttribute('tabindex', '-1');
1659
1660
  };
1660
1661
 
1661
1662
  Tabs.prototype.highlightTab = function ($tab) {
1662
1663
  $tab.setAttribute('aria-selected', 'true');
1664
+ $tab.classList.add('govuk-tabs__tab--selected');
1663
1665
  $tab.setAttribute('tabindex', '0');
1664
1666
  };
1665
1667
 
1666
1668
  Tabs.prototype.getCurrentTab = function () {
1667
- return this.$module.querySelector('[role=tab][aria-selected=true]')
1669
+ return this.$module.querySelector('.govuk-tabs__tab--selected')
1668
1670
  };
1669
1671
 
1670
1672
  // this is because IE doesn't always return the actual value but a relative full path
@@ -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": "href",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "The value of the link href attribute."
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
+ ]
@@ -288,6 +288,18 @@ If you are using Nunjucks,then macros take the following arguments
288
288
 
289
289
  <tr class="govuk-table__row">
290
290
 
291
+ <th class="govuk-table__header" scope="row">items.{}.attributes</th>
292
+
293
+ <td class="govuk-table__cell ">object</td>
294
+
295
+ <td class="govuk-table__cell ">No</td>
296
+
297
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the breadcrumb anchor item.</td>
298
+
299
+ </tr>
300
+
301
+ <tr class="govuk-table__row">
302
+
291
303
  <th class="govuk-table__header" scope="row">classes</th>
292
304
 
293
305
  <td class="govuk-table__cell ">string</td>
@@ -0,0 +1,40 @@
1
+ [
2
+ {
3
+ "name": "items",
4
+ "type": "array",
5
+ "required": true,
6
+ "description": "Array of breadcrumbs item objects.",
7
+ "params": [
8
+ {
9
+ "name": "text",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `html` is set, this is not required. Text to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "html",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "If `text` is set, this is not required. HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored."
19
+ },
20
+ {
21
+ "name": "href",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item."
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "name": "classes",
30
+ "type": "string",
31
+ "required": false,
32
+ "description": "Classes to add to the breadcrumbs container."
33
+ },
34
+ {
35
+ "name": "attributes",
36
+ "type": "object",
37
+ "required": false,
38
+ "description": "HTML attributes (for example data attributes) to add to the breadcrumbs container."
39
+ }
40
+ ]
@@ -3,7 +3,7 @@
3
3
  {% for item in params.items %}
4
4
  {% if item.href %}
5
5
  <li class="govuk-breadcrumbs__list-item">
6
- <a class="govuk-breadcrumbs__link" href="{{ item.href }}">{{ item.html | safe if item.html else item.text }}</a>
6
+ <a class="govuk-breadcrumbs__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | safe if item.html else item.text }}</a>
7
7
  </li>
8
8
  {% else %}
9
9
  <li class="govuk-breadcrumbs__list-item" aria-current="page">{{ item.html | safe if item.html else item.text }}</li>
@@ -18,9 +18,7 @@
18
18
  @include govuk-font($size: 19, $line-height: 19px);
19
19
  @include govuk-focusable;
20
20
 
21
- -webkit-box-sizing: border-box;
22
-
23
- box-sizing: border-box;
21
+ box-sizing: border-box;
24
22
  display: inline-block;
25
23
  position: relative;
26
24
  width: 100%;
@@ -31,8 +29,7 @@
31
29
  border-radius: 0;
32
30
  color: $govuk-button-text-colour;
33
31
  background-color: $govuk-button-colour;
34
- -webkit-box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour;
35
- box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
32
+ box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
36
33
  text-align: center;
37
34
  vertical-align: top;
38
35
  cursor: pointer;
@@ -79,8 +76,7 @@
79
76
 
80
77
  &:active {
81
78
  top: $button-shadow-size;
82
- -webkit-box-shadow: none;
83
- box-shadow: none;
79
+ box-shadow: none;
84
80
 
85
81
  @include govuk-if-ie8 {
86
82
  border-bottom-width: 0;
@@ -138,8 +134,7 @@
138
134
 
139
135
  &:active {
140
136
  top: 0;
141
- -webkit-box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour;
142
- box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
137
+ box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
143
138
  @include govuk-if-ie8 {
144
139
  border-bottom: $button-shadow-size solid $govuk-button-shadow-colour; // s0
145
140
  }
@@ -0,0 +1,62 @@
1
+ [
2
+ {
3
+ "name": "element",
4
+ "type": "string",
5
+ "required": false,
6
+ "description": "Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`."
7
+ },
8
+ {
9
+ "name": "text",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `html` is set, this is not required. Text for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`."
13
+ },
14
+ {
15
+ "name": "html",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "If `text` is set, this is not required. HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`."
19
+ },
20
+ {
21
+ "name": "name",
22
+ "type": "string",
23
+ "required": true,
24
+ "description": "Name for the `input` or `button`. This has no effect on `a` elements."
25
+ },
26
+ {
27
+ "name": "type",
28
+ "type": "string",
29
+ "required": true,
30
+ "description": "Type of `input` or `button` – `button`, `submit` or `reset`. Defaults to `submit`. This has no effect on `a` elements."
31
+ },
32
+ {
33
+ "name": "value",
34
+ "type": "string",
35
+ "required": true,
36
+ "description": "Value for the `button` tag. This has no effect on `a` or `input` elements."
37
+ },
38
+ {
39
+ "name": "disabled",
40
+ "type": "boolean",
41
+ "required": false,
42
+ "description": "Whether the button should be disabled. For button and input elements, `disabled` and `aria-disabled` attributes will be set automatically."
43
+ },
44
+ {
45
+ "name": "href",
46
+ "type": "string",
47
+ "required": false,
48
+ "description": "The URL that the button should link to. If this is set, `element` will be automatically set to `a` if it has not already been defined."
49
+ },
50
+ {
51
+ "name": "classes",
52
+ "type": "string",
53
+ "required": false,
54
+ "description": "Classes to add to the button component."
55
+ },
56
+ {
57
+ "name": "attributes",
58
+ "type": "object",
59
+ "required": false,
60
+ "description": "HTML attributes (for example data attributes) to add to the button component."
61
+ }
62
+ ]