govuk_publishing_components 24.3.0 → 24.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/details.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js +108 -0
- data/app/assets/javascripts/govuk_publishing_components/components/show-password.js +7 -2
- data/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js +6 -2
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +11 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +8 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +117 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +17 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +12 -0
- data/app/models/govuk_publishing_components/audit_applications.rb +1 -1
- data/app/models/govuk_publishing_components/audit_comparer.rb +2 -2
- data/app/models/govuk_publishing_components/component_example.rb +4 -3
- data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +8 -5
- data/app/views/govuk_publishing_components/components/_contents_list.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +6 -6
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_list.html.erb +5 -5
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_radio.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_reorderable_list.html.erb +45 -0
- data/app/views/govuk_publishing_components/components/_search.html.erb +27 -16
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_show_password.html.erb +6 -4
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription_links.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +73 -31
- data/app/views/govuk_publishing_components/components/_taxonomy_list.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_translation_nav.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +22 -0
- data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/radio.yml +14 -1
- data/app/views/govuk_publishing_components/components/docs/reorderable_list.yml +85 -0
- data/app/views/govuk_publishing_components/components/docs/search.yml +10 -0
- data/app/views/govuk_publishing_components/components/docs/summary_list.yml +33 -19
- data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +17 -3
- data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +2 -2
- data/config/locales/en.yml +25 -15
- data/lib/govuk_publishing_components/app_helpers/table_helper.rb +2 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/faq_page_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema.rb +1 -7
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -2
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +2 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/tasks/govuk_publishing_components_tasks.rake +1 -1
- data/node_modules/sortablejs/LICENSE +21 -0
- data/node_modules/sortablejs/README.md +815 -0
- data/node_modules/sortablejs/Sortable.js +3721 -0
- data/node_modules/sortablejs/Sortable.min.js +2 -0
- data/node_modules/sortablejs/modular/sortable.complete.esm.js +3713 -0
- data/node_modules/sortablejs/modular/sortable.core.esm.js +3710 -0
- data/node_modules/sortablejs/modular/sortable.esm.js +3711 -0
- data/node_modules/sortablejs/package.json +56 -0
- metadata +19 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6831e98d8b1db5f3d0cef2f7a7e7cc5439f4bfed8e1c929aedcf9fc98774a7c
|
4
|
+
data.tar.gz: 85579af6ac2c4ab5970ef2c55d64e1ef8bbbd8978635a00186514e86a53340aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92158ef074a519f279584aadd38bab2d44fac46b04ee7fffe62bfb8d1d3a15f41825e12d666a692c200dee5baf827bc82190642b48443918f90cd6a62e57c277
|
7
|
+
data.tar.gz: 4937053696a56e4b30b89b9190a3ab99f6c5b080774acc89395eecf6549c233a219ac857fef5d6aa0e8e93671097178f66cec5091660a13e29677ee1d030e13a
|
@@ -13,7 +13,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
13
13
|
|
14
14
|
// If a custom label has been provided, we can simply call the tracking module
|
15
15
|
if (customTrackLabel) {
|
16
|
-
var trackDetails = new window.GOVUK.Modules.
|
16
|
+
var trackDetails = new window.GOVUK.Modules.GemTrackClick()
|
17
17
|
trackDetails.start($module)
|
18
18
|
} else {
|
19
19
|
// If no custom label is set, we use the open/close status as the label
|
@@ -0,0 +1,108 @@
|
|
1
|
+
//= require sortablejs/Sortable.js
|
2
|
+
window.GOVUK = window.GOVUK || {}
|
3
|
+
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
4
|
+
|
5
|
+
(function (Modules) {
|
6
|
+
function ReorderableList () { }
|
7
|
+
|
8
|
+
ReorderableList.prototype.start = function ($module) {
|
9
|
+
this.$module = $module[0]
|
10
|
+
this.$upButtons = this.$module.querySelectorAll('.js-reorderable-list-up')
|
11
|
+
this.$downButtons = this.$module.querySelectorAll('.js-reorderable-list-down')
|
12
|
+
|
13
|
+
this.sortable = window.Sortable.create(this.$module, { // eslint-disable-line new-cap
|
14
|
+
chosenClass: 'gem-c-reorderable-list__item--chosen',
|
15
|
+
dragClass: 'gem-c-reorderable-list__item--drag',
|
16
|
+
onSort: function () {
|
17
|
+
this.updateOrderIndexes()
|
18
|
+
this.triggerEvent(this.$module, 'reorder-drag')
|
19
|
+
}.bind(this)
|
20
|
+
})
|
21
|
+
|
22
|
+
if (typeof window.matchMedia === 'function') {
|
23
|
+
this.setupResponsiveChecks()
|
24
|
+
} else {
|
25
|
+
this.sortable.option('disabled', true)
|
26
|
+
}
|
27
|
+
|
28
|
+
var boundOnClickUpButton = this.onClickUpButton.bind(this)
|
29
|
+
this.$upButtons.forEach(function (button) {
|
30
|
+
button.addEventListener('click', boundOnClickUpButton)
|
31
|
+
})
|
32
|
+
|
33
|
+
var boundOnClickDownButton = this.onClickDownButton.bind(this)
|
34
|
+
this.$downButtons.forEach(function (button) {
|
35
|
+
button.addEventListener('click', boundOnClickDownButton)
|
36
|
+
})
|
37
|
+
}
|
38
|
+
|
39
|
+
ReorderableList.prototype.setupResponsiveChecks = function () {
|
40
|
+
var tabletBreakpoint = '40.0625em' // ~640px
|
41
|
+
this.mediaQueryList = window.matchMedia('(min-width: ' + tabletBreakpoint + ')')
|
42
|
+
this.mediaQueryList.addListener(this.checkMode.bind(this))
|
43
|
+
this.checkMode()
|
44
|
+
}
|
45
|
+
|
46
|
+
ReorderableList.prototype.checkMode = function () {
|
47
|
+
this.sortable.option('disabled', !this.mediaQueryList.matches)
|
48
|
+
}
|
49
|
+
|
50
|
+
ReorderableList.prototype.onClickUpButton = function (e) {
|
51
|
+
var item = e.target.closest('.gem-c-reorderable-list__item')
|
52
|
+
var previousItem = item.previousElementSibling
|
53
|
+
if (item && previousItem) {
|
54
|
+
item.parentNode.insertBefore(item, previousItem)
|
55
|
+
this.updateOrderIndexes()
|
56
|
+
}
|
57
|
+
// if triggered by keyboard preserve focus on button
|
58
|
+
if (e.detail === 0) {
|
59
|
+
if (item !== item.parentNode.firstElementChild) {
|
60
|
+
e.target.focus()
|
61
|
+
} else {
|
62
|
+
e.target.nextElementSibling.focus()
|
63
|
+
}
|
64
|
+
}
|
65
|
+
this.triggerEvent(e.target, 'reorder-move-up')
|
66
|
+
}
|
67
|
+
|
68
|
+
ReorderableList.prototype.onClickDownButton = function (e) {
|
69
|
+
var item = e.target.closest('.gem-c-reorderable-list__item')
|
70
|
+
var nextItem = item.nextElementSibling
|
71
|
+
if (item && nextItem) {
|
72
|
+
item.parentNode.insertBefore(item, nextItem.nextElementSibling)
|
73
|
+
this.updateOrderIndexes()
|
74
|
+
}
|
75
|
+
// if triggered by keyboard preserve focus on button
|
76
|
+
if (e.detail === 0) {
|
77
|
+
if (item !== item.parentNode.lastElementChild) {
|
78
|
+
e.target.focus()
|
79
|
+
} else {
|
80
|
+
e.target.previousElementSibling.focus()
|
81
|
+
}
|
82
|
+
}
|
83
|
+
this.triggerEvent(e.target, 'reorder-move-down')
|
84
|
+
}
|
85
|
+
|
86
|
+
ReorderableList.prototype.updateOrderIndexes = function () {
|
87
|
+
var $orderInputs = this.$module.querySelectorAll('.gem-c-reorderable-list__actions input')
|
88
|
+
$orderInputs.forEach(function (input, index) {
|
89
|
+
input.setAttribute('value', index + 1)
|
90
|
+
})
|
91
|
+
}
|
92
|
+
|
93
|
+
ReorderableList.prototype.triggerEvent = function (element, eventName) {
|
94
|
+
var params = { bubbles: true, cancelable: true }
|
95
|
+
var event
|
96
|
+
|
97
|
+
if (typeof window.CustomEvent === 'function') {
|
98
|
+
event = new window.CustomEvent(eventName, params)
|
99
|
+
} else {
|
100
|
+
event = document.createEvent('CustomEvent')
|
101
|
+
event.initCustomEvent(eventName, params.bubbles, params.cancelable)
|
102
|
+
}
|
103
|
+
|
104
|
+
element.dispatchEvent(event)
|
105
|
+
}
|
106
|
+
|
107
|
+
Modules.ReorderableList = ReorderableList
|
108
|
+
})(window.GOVUK.Modules)
|
@@ -11,8 +11,10 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
11
11
|
this.$module.revertToPasswordOnFormSubmit = this.revertToPasswordOnFormSubmit.bind(this)
|
12
12
|
this.input.classList.add('gem-c-input--with-password')
|
13
13
|
|
14
|
-
this.showPasswordText = this.$module.getAttribute('data-show')
|
15
|
-
this.hidePasswordText = this.$module.getAttribute('data-hide')
|
14
|
+
this.showPasswordText = this.$module.getAttribute('data-show-text')
|
15
|
+
this.hidePasswordText = this.$module.getAttribute('data-hide-text')
|
16
|
+
this.showPasswordFullText = this.$module.getAttribute('data-show-full-text')
|
17
|
+
this.hidePasswordFullText = this.$module.getAttribute('data-hide-full-text')
|
16
18
|
this.shownPassword = this.$module.getAttribute('data-announce-show')
|
17
19
|
this.hiddenPassword = this.$module.getAttribute('data-announce-hide')
|
18
20
|
|
@@ -27,6 +29,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
27
29
|
this.showHide.className = 'gem-c-show-password__toggle'
|
28
30
|
this.showHide.setAttribute('aria-controls', this.input.getAttribute('id'))
|
29
31
|
this.showHide.setAttribute('type', 'button')
|
32
|
+
this.showHide.setAttribute('aria-label', this.showPasswordFullText)
|
30
33
|
this.showHide.innerHTML = this.showPasswordText
|
31
34
|
this.wrapper.insertBefore(this.showHide, this.input.nextSibling)
|
32
35
|
|
@@ -50,12 +53,14 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
50
53
|
ShowPassword.prototype.togglePassword = function (event) {
|
51
54
|
event.preventDefault()
|
52
55
|
this.showHide.innerHTML = this.showHide.innerHTML === this.showPasswordText ? this.hidePasswordText : this.showPasswordText
|
56
|
+
this.showHide.setAttribute('aria-label', this.showHide.getAttribute('aria-label') === this.showPasswordFullText ? this.hidePasswordFullText : this.showPasswordFullText)
|
53
57
|
this.statusText.innerHTML = this.statusText.innerHTML === this.shownPassword ? this.hiddenPassword : this.shownPassword
|
54
58
|
this.input.setAttribute('type', this.input.getAttribute('type') === 'text' ? 'password' : 'text')
|
55
59
|
}
|
56
60
|
|
57
61
|
ShowPassword.prototype.revertToPasswordOnFormSubmit = function (event) {
|
58
62
|
this.showHide.innerHTML = this.showPasswordText
|
63
|
+
this.showHide.setAttribute('aria-label', this.showPasswordFullText)
|
59
64
|
this.statusText.innerHTML = this.hiddenPassword
|
60
65
|
this.input.setAttribute('type', 'password')
|
61
66
|
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
/* eslint-disable no-var */
|
2
|
+
|
1
3
|
// used by the header navigation from govuk_template
|
2
4
|
|
3
5
|
(function () {
|
@@ -14,6 +16,8 @@
|
|
14
16
|
var targetClass = target.getAttribute('class') || ''
|
15
17
|
var sourceClass = this.getAttribute('class') || ''
|
16
18
|
var isSearchToggle = sourceClass.match('search-toggle')
|
19
|
+
var showText = this.getAttribute('data-show-text') || 'Show search'
|
20
|
+
var hideText = this.getAttribute('data-hide-text') || 'Hide search'
|
17
21
|
|
18
22
|
if (targetClass.indexOf('js-visible') !== -1) {
|
19
23
|
target.setAttribute('class', targetClass.replace(/(^|\s)js-visible(\s|$)/, ''))
|
@@ -23,12 +27,12 @@
|
|
23
27
|
if (sourceClass.indexOf('js-visible') !== -1) {
|
24
28
|
this.setAttribute('class', sourceClass.replace(/(^|\s)js-visible(\s|$)/, ''))
|
25
29
|
if (isSearchToggle) {
|
26
|
-
this.innerText =
|
30
|
+
this.innerText = showText
|
27
31
|
}
|
28
32
|
} else {
|
29
33
|
this.setAttribute('class', sourceClass + ' js-visible')
|
30
34
|
if (isSearchToggle) {
|
31
|
-
this.innerText =
|
35
|
+
this.innerText = hideText
|
32
36
|
}
|
33
37
|
}
|
34
38
|
this.setAttribute('aria-expanded', this.getAttribute('aria-expanded') !== 'true')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// This is the file that the application needs to include in order to use
|
2
2
|
// the components.
|
3
3
|
|
4
|
-
@import "
|
4
|
+
@import "govuk_frontend_support";
|
5
5
|
|
6
6
|
@import "components/print/accordion";
|
7
7
|
@import "components/print/attachment";
|
@@ -21,6 +21,17 @@
|
|
21
21
|
border-color: govuk-colour("white");
|
22
22
|
}
|
23
23
|
|
24
|
+
.gem-c-breadcrumbs--border-bottom {
|
25
|
+
border-bottom: 1px solid $govuk-border-colour;
|
26
|
+
padding-bottom: govuk-spacing(1);
|
27
|
+
|
28
|
+
&.govuk-breadcrumbs--collapse-on-mobile {
|
29
|
+
@include govuk-media-query($until: tablet) {
|
30
|
+
padding-bottom: 0;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
24
35
|
.govuk-breadcrumbs--collapse-on-mobile {
|
25
36
|
@include govuk-media-query($until: tablet) {
|
26
37
|
.govuk-breadcrumbs__list-item {
|
@@ -46,11 +46,18 @@ $govuk-cookie-banner-background: govuk-colour("light-grey", "grey-4");
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
49
|
+
// Override style from design system so we can have consistent
|
50
|
+
// padding on the the banner and the confirmation
|
51
|
+
|
52
|
+
.govuk-cookie-banner {
|
53
|
+
padding-top: 0;
|
54
|
+
}
|
55
|
+
|
49
56
|
// Override the styles from govuk_template
|
50
57
|
// stylelint-disable selector-max-id
|
51
58
|
.gem-c-cookie-banner#global-cookie-message {
|
52
59
|
background-color: $govuk-cookie-banner-background;
|
53
|
-
padding: 0;
|
60
|
+
padding: govuk-spacing(3) 0 0 0;
|
54
61
|
box-sizing: border-box;
|
55
62
|
|
56
63
|
.gem-c-cookie-banner__message,
|
@@ -0,0 +1,117 @@
|
|
1
|
+
.gem-c-reorderable-list {
|
2
|
+
@include govuk-font(19, bold);
|
3
|
+
|
4
|
+
list-style-type: none;
|
5
|
+
margin-bottom: govuk-spacing(6);
|
6
|
+
margin-top: 0;
|
7
|
+
padding-left: 0;
|
8
|
+
position: relative;
|
9
|
+
|
10
|
+
.govuk-form-group {
|
11
|
+
margin-bottom: 0;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
.gem-c-reorderable-list__item {
|
16
|
+
margin-bottom: govuk-spacing(3);
|
17
|
+
border: 1px solid $govuk-border-colour;
|
18
|
+
padding: govuk-spacing(3);
|
19
|
+
}
|
20
|
+
|
21
|
+
.gem-c-reorderable-list__item--chosen {
|
22
|
+
background-color: govuk-colour('light-grey');
|
23
|
+
outline: 2px dotted $govuk-border-colour;
|
24
|
+
}
|
25
|
+
|
26
|
+
.gem-c-reorderable-list__item--drag {
|
27
|
+
background-color: govuk-colour('white');
|
28
|
+
list-style-type: none;
|
29
|
+
|
30
|
+
.gem-c-reorderable-list__actions {
|
31
|
+
visibility: hidden;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
.gem-c-reorderable-list__wrapper {
|
36
|
+
display: block;
|
37
|
+
|
38
|
+
@include govuk-media-query($from: desktop) {
|
39
|
+
display: inline-flex;
|
40
|
+
width: 100%;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
.gem-c-reorderable-list__content {
|
45
|
+
margin-bottom: govuk-spacing(2);
|
46
|
+
@include govuk-media-query($from: desktop) {
|
47
|
+
margin-bottom: 0;
|
48
|
+
flex: 0 1 auto;
|
49
|
+
min-width: 65%;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.gem-c-reorderable-list__title {
|
54
|
+
margin: 0;
|
55
|
+
}
|
56
|
+
|
57
|
+
.gem-c-reorderable-list__description {
|
58
|
+
@include govuk-font(16, regular);
|
59
|
+
margin: 0;
|
60
|
+
}
|
61
|
+
|
62
|
+
.gem-c-reorderable-list__actions {
|
63
|
+
display: block;
|
64
|
+
|
65
|
+
@include govuk-media-query($from: desktop) {
|
66
|
+
flex: 1 0 auto;
|
67
|
+
text-align: right;
|
68
|
+
}
|
69
|
+
|
70
|
+
.gem-c-button {
|
71
|
+
display: none;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
.js-enabled {
|
76
|
+
.gem-c-reorderable-list__item {
|
77
|
+
@include govuk-media-query($from: desktop) {
|
78
|
+
cursor: move;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
.gem-c-reorderable-list__actions .govuk-form-group {
|
83
|
+
display: none;
|
84
|
+
}
|
85
|
+
|
86
|
+
.gem-c-reorderable-list__actions .gem-c-button {
|
87
|
+
display: inline-block;
|
88
|
+
margin-left: govuk-spacing(3);
|
89
|
+
width: 80px;
|
90
|
+
}
|
91
|
+
|
92
|
+
.gem-c-reorderable-list__actions .gem-c-button:first-of-type {
|
93
|
+
margin-left: 0;
|
94
|
+
|
95
|
+
@include govuk-media-query($from: desktop) {
|
96
|
+
margin-left: govuk-spacing(3);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
.gem-c-reorderable-list__item:first-child .gem-c-button:first-of-type,
|
101
|
+
.gem-c-reorderable-list__item:last-child .gem-c-button:last-of-type {
|
102
|
+
display: none;
|
103
|
+
|
104
|
+
@include govuk-media-query($from: desktop) {
|
105
|
+
display: inline-block;
|
106
|
+
visibility: hidden;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
.gem-c-reorderable-list__item:first-child .gem-c-button:last-of-type {
|
111
|
+
margin-left: 0;
|
112
|
+
|
113
|
+
@include govuk-media-query($from: desktop) {
|
114
|
+
margin-left: govuk-spacing(3);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
@@ -34,6 +34,21 @@ $large-input-size: 50px;
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
|
37
|
+
%gem-c-search-input-focus {
|
38
|
+
outline: $govuk-focus-width solid $govuk-focus-colour;
|
39
|
+
// Ensure outline appears outside of the element
|
40
|
+
outline-offset: 0;
|
41
|
+
// Double the border by adding its width again. Use `box-shadow` for this // instead of changing `border-width`
|
42
|
+
// Also, `outline` cannot be utilised here as it is already used for the yellow focus state.
|
43
|
+
box-shadow: inset 0 0 0 $govuk-border-width-form-element;
|
44
|
+
|
45
|
+
@include govuk-if-ie8 {
|
46
|
+
// IE8 doesn't support `box-shadow` so double the border with
|
47
|
+
// `border-width`.
|
48
|
+
border-width: $govuk-border-width-form-element * 2;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
37
52
|
.gem-c-search__input[type="search"] { // overly specific to prevent some overrides from outside
|
38
53
|
@include govuk-font($size: 19, $line-height: (28 / 19));
|
39
54
|
margin: 0;
|
@@ -59,25 +74,14 @@ $large-input-size: 50px;
|
|
59
74
|
}
|
60
75
|
|
61
76
|
&:focus {
|
62
|
-
|
63
|
-
// Ensure outline appears outside of the element
|
64
|
-
outline-offset: 0;
|
65
|
-
// Double the border by adding its width again. Use `box-shadow` for this // instead of changing `border-width`
|
66
|
-
// Also, `outline` cannot be utilised here as it is already used for the yellow focus state.
|
67
|
-
box-shadow: inset 0 0 0 $govuk-border-width-form-element;
|
68
|
-
|
69
|
-
@include govuk-if-ie8 {
|
70
|
-
// IE8 doesn't support `box-shadow` so double the border with
|
71
|
-
// `border-width`.
|
72
|
-
border-width: $govuk-border-width-form-element * 2;
|
73
|
-
}
|
77
|
+
@extend %gem-c-search-input-focus;
|
74
78
|
}
|
75
79
|
}
|
76
80
|
|
77
81
|
@include govuk-compatibility(govuk_template) {
|
78
82
|
// ultra specific rule overrides focus styling from govuk_template
|
79
83
|
#global-header .gem-c-search__input[type="search"]:focus { // stylelint-disable selector-max-id
|
80
|
-
@extend
|
84
|
+
@extend %gem-c-search-input-focus;
|
81
85
|
}
|
82
86
|
}
|
83
87
|
|
@@ -38,3 +38,15 @@
|
|
38
38
|
.gem-c-summary__block {
|
39
39
|
@include govuk-responsive-margin(6, "bottom");
|
40
40
|
}
|
41
|
+
|
42
|
+
.gem-c-summary-list--wide-title {
|
43
|
+
@include govuk-media-query($from: 'tablet') {
|
44
|
+
.govuk-summary-list__key {
|
45
|
+
width: 60%;
|
46
|
+
}
|
47
|
+
|
48
|
+
.govuk-summary-list__value {
|
49
|
+
width: 20%;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
@@ -22,7 +22,7 @@ module GovukPublishingComponents
|
|
22
22
|
@find_all_print_stylesheets = /@import ["']{1}govuk_publishing_components\/all_components_print/
|
23
23
|
find_print_stylesheets = /(?<=@import ["']{1}govuk_publishing_components\/components\/print\/)[a-zA-Z_-]+(?=['"])/
|
24
24
|
|
25
|
-
@find_all_javascripts = /\/\/
|
25
|
+
@find_all_javascripts = /\/\/ *= require govuk_publishing_components\/all_components/
|
26
26
|
find_javascripts = /(?<=require govuk_publishing_components\/components\/)[a-zA-Z_-]+/
|
27
27
|
|
28
28
|
components_in_templates = find_components(templates, find_components, "templates") || []
|