govuk_publishing_components 4.1.1 → 5.0.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/current-location.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/{task-list.js → step-by-step-nav.js} +42 -45
- data/app/assets/javascripts/history-support.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/component_guide_print.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/{_task-list-header.scss → _step-by-step-nav-header.scss} +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/{_task-list-related.scss → _step-by-step-nav-related.scss} +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/{_task-list.scss → _step-by-step-nav.scss} +118 -131
- data/app/assets/stylesheets/govuk_publishing_components/components/print/{_task-list-header.scss → _step-by-step-nav-header.scss} +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/print/{_task-list.scss → _step-by-step-nav.scss} +20 -20
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +100 -0
- data/app/views/govuk_publishing_components/components/{_task_list_header.html.erb → _step_by_step_nav_header.html.erb} +7 -7
- data/app/views/govuk_publishing_components/components/{_task_list_related.html.erb → _step_by_step_nav_related.html.erb} +10 -10
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1041 -0
- data/app/views/govuk_publishing_components/components/docs/{task_list_header.yml → step_by_step_nav_header.yml} +7 -7
- data/app/views/govuk_publishing_components/components/docs/{task_list_related.yml → step_by_step_nav_related.yml} +5 -5
- data/config/locales/en.yml +2 -0
- data/lib/govuk_publishing_components.rb +1 -1
- data/lib/govuk_publishing_components/components/{task_list_helper.rb → step_by_step_nav_helper.rb} +13 -13
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +15 -15
- data/app/views/govuk_publishing_components/components/_task_list.html.erb +0 -105
- data/app/views/govuk_publishing_components/components/docs/task_list.yml +0 -1085
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2246fa0ef19db8a5d4ce9ab9f9e58c0f7858d1504f4e7c847b45ef511ad38eea
|
4
|
+
data.tar.gz: 3468abaaa41ec8bdd66820bcba7615d28d937da6dd229c4a2eaa9a33a604edb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52ef6feed05da9b9dcc06fac40deb988d93d9b4e9cd56cc772bae21186dd993e9158e802fef751087effd37f8e85e61a9a1106061ccc15b0200fa15a6c25f1d
|
7
|
+
data.tar.gz: 29bab2b37364334ef3f873394fd2859dce85568b83e7b57012e3da1eaa6adafc9398c67433633a9e8cebcedd0cf9807b6584597370ae70387a5b0a816ab1c7e6
|
@@ -4,7 +4,7 @@
|
|
4
4
|
"use strict";
|
5
5
|
window.GOVUK = window.GOVUK || {};
|
6
6
|
|
7
|
-
Modules.
|
7
|
+
Modules.Gemstepnav = function () {
|
8
8
|
|
9
9
|
var actions = {
|
10
10
|
showLinkText: "Show",
|
@@ -25,9 +25,9 @@
|
|
25
25
|
};
|
26
26
|
|
27
27
|
var rememberShownStep = false;
|
28
|
-
var
|
29
|
-
var sessionStoreLink = 'govuk-
|
30
|
-
var activeLinkClass = 'gem-c-
|
28
|
+
var stepNavSize;
|
29
|
+
var sessionStoreLink = 'govuk-step-nav-active-link';
|
30
|
+
var activeLinkClass = 'gem-c-step-nav__link--active';
|
31
31
|
var activeLinkHref = '#content';
|
32
32
|
|
33
33
|
this.start = function ($element) {
|
@@ -35,22 +35,21 @@
|
|
35
35
|
$(window).unload(storeScrollPosition);
|
36
36
|
|
37
37
|
// Indicate that js has worked
|
38
|
-
$element.addClass('gem-c-
|
38
|
+
$element.addClass('gem-c-step-nav--active');
|
39
39
|
|
40
40
|
// Prevent FOUC, remove class hiding content
|
41
41
|
$element.removeClass('js-hidden');
|
42
42
|
|
43
43
|
rememberShownStep = !!$element.filter('[data-remember]').length;
|
44
|
-
|
45
|
-
var $groups = $element.find('.gem-c-task-list__group');
|
44
|
+
stepNavSize = $element.hasClass('gem-c-step-nav--large') ? 'Big' : 'Small';
|
46
45
|
var $steps = $element.find('.js-step');
|
47
46
|
var $stepHeaders = $element.find('.js-toggle-panel');
|
48
47
|
var totalSteps = $element.find('.js-panel').length;
|
49
|
-
var totalLinks = $element.find('.gem-c-
|
48
|
+
var totalLinks = $element.find('.gem-c-step-nav__link-item').length;
|
50
49
|
|
51
50
|
var $showOrHideAllButton;
|
52
51
|
|
53
|
-
var
|
52
|
+
var stepNavTracker = new StepNavTracker(totalSteps, totalLinks);
|
54
53
|
|
55
54
|
addButtonstoSteps();
|
56
55
|
addShowHideAllButton();
|
@@ -61,11 +60,11 @@
|
|
61
60
|
showLinkedStep();
|
62
61
|
ensureOnlyOneActiveLink();
|
63
62
|
|
64
|
-
bindToggleForSteps(
|
65
|
-
bindToggleShowHideAllButton(
|
66
|
-
bindComponentLinkClicks(
|
63
|
+
bindToggleForSteps(stepNavTracker);
|
64
|
+
bindToggleShowHideAllButton(stepNavTracker);
|
65
|
+
bindComponentLinkClicks(stepNavTracker);
|
67
66
|
|
68
|
-
// When navigating back in browser history to the
|
67
|
+
// When navigating back in browser history to the step nav, the browser will try to be "clever" and return
|
69
68
|
// the user to their previous scroll position. However, since we collapse all but the currently-anchored
|
70
69
|
// step, the content length changes and the user is returned to the wrong position (often the footer).
|
71
70
|
// In order to correct this behaviour, as the user leaves the page, we anticipate the correct height we wish the
|
@@ -84,7 +83,7 @@
|
|
84
83
|
}
|
85
84
|
|
86
85
|
function addShowHideAllButton() {
|
87
|
-
$element.prepend('<div class="gem-c-
|
86
|
+
$element.prepend('<div class="gem-c-step-nav__controls"><button aria-expanded="false" class="gem-c-step-nav__button gem-c-step-nav__button--controls js-step-controls-button">' + bulkActions.showAll.buttonText + '</button></div>');
|
88
87
|
}
|
89
88
|
|
90
89
|
function addShowHideToggle() {
|
@@ -95,7 +94,7 @@
|
|
95
94
|
linkText = actions.hideLinkText;
|
96
95
|
}
|
97
96
|
if (!$(this).find('.js-toggle-link').length) {
|
98
|
-
$(this).append('<span class="gem-c-
|
97
|
+
$(this).append('<span class="gem-c-step-nav__toggle-link js-toggle-link">' + linkText + '</span>');
|
99
98
|
}
|
100
99
|
});
|
101
100
|
}
|
@@ -157,20 +156,20 @@
|
|
157
156
|
|
158
157
|
$title.wrapInner(
|
159
158
|
'<button ' +
|
160
|
-
'class="gem-c-
|
159
|
+
'class="gem-c-step-nav__button gem-c-step-nav__button--title js-step-title-button" ' +
|
161
160
|
'aria-expanded="false" aria-controls="' + contentId + '">' +
|
162
161
|
'</button>' );
|
163
162
|
});
|
164
163
|
}
|
165
164
|
|
166
|
-
function bindToggleForSteps(
|
165
|
+
function bindToggleForSteps(stepNavTracker) {
|
167
166
|
$element.find('.js-toggle-panel').click(function (event) {
|
168
167
|
preventLinkFollowingForCurrentTab(event);
|
169
168
|
|
170
169
|
var stepView = new StepView($(this).closest('.js-step'));
|
171
170
|
stepView.toggle();
|
172
171
|
|
173
|
-
var toggleClick = new StepToggleClick(event, stepView, $steps,
|
172
|
+
var toggleClick = new StepToggleClick(event, stepView, $steps, stepNavTracker);
|
174
173
|
toggleClick.track();
|
175
174
|
|
176
175
|
setShowHideAllText();
|
@@ -178,9 +177,9 @@
|
|
178
177
|
}
|
179
178
|
|
180
179
|
// tracking click events on links in step content
|
181
|
-
function bindComponentLinkClicks(
|
180
|
+
function bindComponentLinkClicks(stepNavTracker) {
|
182
181
|
$element.find('.js-link').click(function (event) {
|
183
|
-
var linkClick = new componentLinkClick(event,
|
182
|
+
var linkClick = new componentLinkClick(event, stepNavTracker, $(this).attr('data-position'));
|
184
183
|
linkClick.track();
|
185
184
|
var thisLinkHref = $(this).attr('href');
|
186
185
|
|
@@ -224,11 +223,11 @@
|
|
224
223
|
removeActiveStateFromAllButCurrent($activeLinks, lastClicked);
|
225
224
|
removeFromSessionStorage(sessionStoreLink);
|
226
225
|
} else {
|
227
|
-
var
|
226
|
+
var activeLinkInActiveStep = $element.find('.gem-c-step-nav__step--active').find('.' + activeLinkClass).first();
|
228
227
|
|
229
|
-
if (
|
228
|
+
if (activeLinkInActiveStep.length) {
|
230
229
|
$activeLinks.removeClass(activeLinkClass);
|
231
|
-
|
230
|
+
activeLinkInActiveStep.addClass(activeLinkClass);
|
232
231
|
} else {
|
233
232
|
$activeLinks.slice(1).removeClass(activeLinkClass);
|
234
233
|
}
|
@@ -237,7 +236,7 @@
|
|
237
236
|
|
238
237
|
function removeActiveStateFromAllButCurrent($links, current) {
|
239
238
|
$links.each(function() {
|
240
|
-
if ($(this).find('.js-link').data('position') !== current) {
|
239
|
+
if ($(this).find('.js-link').data('position').toString() !== current.toString()) {
|
241
240
|
$(this).removeClass(activeLinkClass);
|
242
241
|
}
|
243
242
|
});
|
@@ -253,7 +252,7 @@
|
|
253
252
|
event.preventDefault();
|
254
253
|
}
|
255
254
|
|
256
|
-
function bindToggleShowHideAllButton(
|
255
|
+
function bindToggleShowHideAllButton(stepNavTracker) {
|
257
256
|
$showOrHideAllButton = $element.find('.js-step-controls-button');
|
258
257
|
$showOrHideAllButton.on('click', function () {
|
259
258
|
var shouldshowAll;
|
@@ -263,16 +262,16 @@
|
|
263
262
|
$element.find('.js-toggle-link').text(actions.hideLinkText)
|
264
263
|
shouldshowAll = true;
|
265
264
|
|
266
|
-
|
267
|
-
label: bulkActions.showAll.eventLabel + ": " +
|
265
|
+
stepNavTracker.track('pageElementInteraction', 'stepNavAllShown', {
|
266
|
+
label: bulkActions.showAll.eventLabel + ": " + stepNavSize
|
268
267
|
});
|
269
268
|
} else {
|
270
269
|
$showOrHideAllButton.text(bulkActions.showAll.buttonText);
|
271
270
|
$element.find('.js-toggle-link').text(actions.showLinkText);
|
272
271
|
shouldshowAll = false;
|
273
272
|
|
274
|
-
|
275
|
-
label: bulkActions.hideAll.eventLabel + ": " +
|
273
|
+
stepNavTracker.track('pageElementInteraction', 'stepNavAllHidden', {
|
274
|
+
label: bulkActions.hideAll.eventLabel + ": " + stepNavSize
|
276
275
|
});
|
277
276
|
}
|
278
277
|
|
@@ -377,19 +376,17 @@
|
|
377
376
|
history.replaceState({}, '', newLocation);
|
378
377
|
}
|
379
378
|
|
380
|
-
function StepToggleClick(event, stepView, $steps,
|
379
|
+
function StepToggleClick(event, stepView, $steps, stepNavTracker) {
|
381
380
|
this.track = trackClick;
|
382
381
|
var $target = $(event.target);
|
383
|
-
var $thisGroup = stepView.element.closest('.gem-c-task-list__group');
|
384
|
-
var $thisGroupSteps = $thisGroup.find('.gem-c-task-list__step');
|
385
382
|
|
386
383
|
function trackClick() {
|
387
384
|
var tracking_options = {label: trackingLabel(), dimension28: stepView.numberOfContentItems().toString()}
|
388
|
-
|
385
|
+
stepNavTracker.track('pageElementInteraction', trackingAction(), tracking_options);
|
389
386
|
|
390
387
|
if (!stepView.isHidden()) {
|
391
|
-
|
392
|
-
'
|
388
|
+
stepNavTracker.track(
|
389
|
+
'stepNavLinkClicked',
|
393
390
|
String(stepIndex()),
|
394
391
|
{
|
395
392
|
label: stepView.href,
|
@@ -401,16 +398,16 @@
|
|
401
398
|
}
|
402
399
|
|
403
400
|
function trackingLabel() {
|
404
|
-
return $target.closest('.js-toggle-panel').attr('data-position') + ' - ' + stepView.title + ' - ' + locateClickElement() + ": " +
|
401
|
+
return $target.closest('.js-toggle-panel').attr('data-position') + ' - ' + stepView.title + ' - ' + locateClickElement() + ": " + stepNavSize;
|
405
402
|
}
|
406
403
|
|
407
|
-
// returns index of the clicked step in the overall number of
|
404
|
+
// returns index of the clicked step in the overall number of steps
|
408
405
|
function stepIndex() {
|
409
406
|
return $steps.index(stepView.element) + 1;
|
410
407
|
}
|
411
408
|
|
412
409
|
function trackingAction() {
|
413
|
-
return (stepView.isHidden() ? '
|
410
|
+
return (stepView.isHidden() ? 'stepNavHidden' : 'stepNavShown');
|
414
411
|
}
|
415
412
|
|
416
413
|
function locateClickElement() {
|
@@ -436,27 +433,27 @@
|
|
436
433
|
}
|
437
434
|
}
|
438
435
|
|
439
|
-
function componentLinkClick(event,
|
436
|
+
function componentLinkClick(event, stepNavTracker, linkPosition) {
|
440
437
|
this.track = trackClick;
|
441
438
|
|
442
439
|
function trackClick() {
|
443
|
-
var tracking_options = {label: $(event.target).attr('href') + " : " +
|
444
|
-
var dimension28 = $(event.target).closest('.gem-c-
|
440
|
+
var tracking_options = {label: $(event.target).attr('href') + " : " + stepNavSize};
|
441
|
+
var dimension28 = $(event.target).closest('.gem-c-step-nav__links').attr('data-length');
|
445
442
|
|
446
443
|
if (dimension28) {
|
447
444
|
tracking_options['dimension28'] = dimension28;
|
448
445
|
}
|
449
446
|
|
450
|
-
|
447
|
+
stepNavTracker.track('stepNavLinkClicked', linkPosition, tracking_options);
|
451
448
|
}
|
452
449
|
}
|
453
450
|
|
454
451
|
// A helper that sends a custom event request to Google Analytics if
|
455
452
|
// the GOVUK module is setup
|
456
|
-
function
|
453
|
+
function StepNavTracker(totalSteps, totalLinks) {
|
457
454
|
this.track = function(category, action, options) {
|
458
|
-
// dimension26 records the total number of expand/collapse steps in this
|
459
|
-
// dimension27 records the total number of links in this
|
455
|
+
// dimension26 records the total number of expand/collapse steps in this step nav
|
456
|
+
// dimension27 records the total number of links in this step nav
|
460
457
|
// dimension28 records the number of links in the step that was shown/hidden (handled in click event)
|
461
458
|
if (GOVUK.analytics && GOVUK.analytics.trackEvent) {
|
462
459
|
options = options || {};
|
@@ -13,6 +13,6 @@
|
|
13
13
|
@import "components/input";
|
14
14
|
@import "components/label";
|
15
15
|
@import "components/radio";
|
16
|
-
@import "components/
|
17
|
-
@import "components/
|
18
|
-
@import "components/
|
16
|
+
@import "components/step-by-step-nav";
|
17
|
+
@import "components/step-by-step-nav-header";
|
18
|
+
@import "components/step-by-step-nav-related";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.gem-c-
|
1
|
+
.gem-c-step-nav-header {
|
2
2
|
position: relative;
|
3
3
|
padding: 10px;
|
4
4
|
background: $grey-4;
|
@@ -12,18 +12,18 @@
|
|
12
12
|
|
13
13
|
// scss-lint:disable SelectorFormat
|
14
14
|
|
15
|
-
.gem-c-
|
15
|
+
.gem-c-step-nav-header__part-of {
|
16
16
|
@include bold-16;
|
17
17
|
|
18
18
|
display: block;
|
19
19
|
padding-bottom: 0.2em;
|
20
20
|
}
|
21
21
|
|
22
|
-
.gem-c-
|
22
|
+
.gem-c-step-nav-header__title {
|
23
23
|
@include bold-24;
|
24
24
|
}
|
25
25
|
|
26
|
-
.gem-c-
|
26
|
+
.gem-c-step-nav-header__skip-link {
|
27
27
|
position: absolute;
|
28
28
|
top: 0;
|
29
29
|
right: 9999em;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
.gem-c-
|
1
|
+
.gem-c-step-nav-related {
|
2
2
|
margin-bottom: $gutter-half;
|
3
3
|
}
|
4
4
|
|
5
|
-
.gem-c-
|
6
|
-
.gem-c-
|
5
|
+
.gem-c-step-nav-related__heading,
|
6
|
+
.gem-c-step-nav-related__links {
|
7
7
|
@include bold-19;
|
8
8
|
margin: 0;
|
9
9
|
padding: 0;
|
10
10
|
}
|
11
11
|
|
12
|
-
.gem-c-
|
12
|
+
.gem-c-step-nav-related__pretitle {
|
13
13
|
display: block;
|
14
14
|
margin-bottom: $gutter-half;
|
15
15
|
|
@@ -18,11 +18,11 @@
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
|
21
|
-
.gem-c-
|
21
|
+
.gem-c-step-nav-related__links {
|
22
22
|
list-style: none;
|
23
23
|
}
|
24
24
|
|
25
|
-
.gem-c-
|
25
|
+
.gem-c-step-nav-related__link-item {
|
26
26
|
margin-top: $gutter-half;
|
27
27
|
|
28
28
|
@include media(tablet) {
|
@@ -30,7 +30,7 @@
|
|
30
30
|
}
|
31
31
|
}
|
32
32
|
|
33
|
-
.gem-c-
|
33
|
+
.gem-c-step-nav-related__link {
|
34
34
|
text-decoration: none;
|
35
35
|
|
36
36
|
&:hover {
|
@@ -8,7 +8,7 @@ $number-circle-size-large: 35px;
|
|
8
8
|
$dot-size: 16px;
|
9
9
|
$top-border: solid 2px $grey-3;
|
10
10
|
|
11
|
-
@mixin
|
11
|
+
@mixin step-nav-vertical-line ($line-style: solid) {
|
12
12
|
content: "";
|
13
13
|
position: absolute;
|
14
14
|
z-index: 2;
|
@@ -18,27 +18,27 @@ $top-border: solid 2px $grey-3;
|
|
18
18
|
background: $white;
|
19
19
|
}
|
20
20
|
|
21
|
-
@mixin
|
22
|
-
left:
|
21
|
+
@mixin step-nav-line-position {
|
22
|
+
left: 0;
|
23
23
|
margin-left: ($number-circle-size / 2) - ($stroke-width / 2);
|
24
24
|
}
|
25
25
|
|
26
|
-
@mixin
|
27
|
-
left:
|
26
|
+
@mixin step-nav-line-position-large {
|
27
|
+
left: 0;
|
28
28
|
margin-left: ($number-circle-size-large / 2) - ($stroke-width-large / 2);
|
29
29
|
border-width: $stroke-width-large;
|
30
30
|
}
|
31
31
|
|
32
|
-
.gem-c-
|
32
|
+
.gem-c-step-nav {
|
33
33
|
margin-bottom: $gutter-half;
|
34
34
|
}
|
35
35
|
|
36
|
-
.gem-c-
|
36
|
+
.gem-c-step-nav__controls {
|
37
37
|
padding: 3px 3px 0 0;
|
38
38
|
text-align: right;
|
39
39
|
}
|
40
40
|
|
41
|
-
.gem-c-
|
41
|
+
.gem-c-step-nav__button {
|
42
42
|
color: $link-colour;
|
43
43
|
cursor: pointer;
|
44
44
|
background: none;
|
@@ -48,51 +48,78 @@ $top-border: solid 2px $grey-3;
|
|
48
48
|
|
49
49
|
// removes extra dotted outline from buttons in Firefox
|
50
50
|
// on focus (standard yellow outline unaffected)
|
51
|
-
.gem-c-
|
51
|
+
.gem-c-step-nav__button::-moz-focus-inner {
|
52
52
|
border: 0;
|
53
53
|
}
|
54
54
|
|
55
|
-
.gem-c-
|
55
|
+
.gem-c-step-nav__button--title {
|
56
56
|
@include _core-font-generator(19px, 19px, 19px, 1.4, 1.4, false, bold);
|
57
57
|
display: inline-block;
|
58
58
|
padding: 0;
|
59
59
|
text-align: left;
|
60
60
|
color: $black;
|
61
61
|
|
62
|
-
.gem-c-
|
62
|
+
.gem-c-step-nav--large & {
|
63
63
|
@include _core-font-generator(24px, 19px, 24px, 1.4, 1.4, false, bold);
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
67
|
-
.gem-c-
|
67
|
+
.gem-c-step-nav__button--controls {
|
68
68
|
@include _core-font-generator(14px, 14px, 14px, 1, 1, false);
|
69
69
|
position: relative;
|
70
70
|
z-index: 1; // this and relative position stops focus outline underlap with border of accordion
|
71
71
|
padding: 0.5em 0;
|
72
72
|
|
73
|
-
.gem-c-
|
73
|
+
.gem-c-step-nav--large & {
|
74
74
|
@include _core-font-generator(16px, 14px, 16px, 1, 1, false);
|
75
75
|
}
|
76
76
|
}
|
77
77
|
|
78
|
-
.gem-c-
|
78
|
+
.gem-c-step-nav__steps {
|
79
79
|
padding: 0;
|
80
80
|
margin: 0;
|
81
81
|
}
|
82
82
|
|
83
|
-
.gem-c-
|
83
|
+
.gem-c-step-nav__step {
|
84
84
|
position: relative;
|
85
85
|
padding-left: $gutter + $gutter-half;
|
86
86
|
list-style: none;
|
87
87
|
|
88
|
-
|
88
|
+
// line down the side of a step
|
89
|
+
&:after {
|
90
|
+
@include step-nav-vertical-line;
|
91
|
+
@include step-nav-line-position;
|
92
|
+
top: $gutter-half;
|
93
|
+
}
|
94
|
+
|
95
|
+
.gem-c-step-nav--large & {
|
89
96
|
@include media(tablet) {
|
90
97
|
padding-left: $gutter * 2;
|
98
|
+
|
99
|
+
&:after {
|
100
|
+
@include step-nav-line-position-large;
|
101
|
+
top: $gutter;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
.gem-c-step-nav__step--optional {
|
108
|
+
// broken line down the side of a step
|
109
|
+
&:after {
|
110
|
+
border-left-style: dotted;
|
111
|
+
}
|
112
|
+
|
113
|
+
.gem-c-step-nav--large & {
|
114
|
+
@include media(tablet) {
|
115
|
+
&:after {
|
116
|
+
border-width: $stroke-width-large;
|
117
|
+
}
|
91
118
|
}
|
92
119
|
}
|
93
120
|
}
|
94
121
|
|
95
|
-
.gem-c-
|
122
|
+
.gem-c-step-nav__step:last-child {
|
96
123
|
// little dash at the bottom of the line
|
97
124
|
&:before {
|
98
125
|
content: "";
|
@@ -106,20 +133,18 @@ $top-border: solid 2px $grey-3;
|
|
106
133
|
border-bottom: solid $stroke-width $grey-2;
|
107
134
|
}
|
108
135
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}
|
136
|
+
&:after {
|
137
|
+
// scss-lint:disable DuplicateProperty
|
138
|
+
height: -webkit-calc(100% - #{$gutter-half}); // fallback for iphone 4
|
139
|
+
height: calc(100% - #{$gutter-half});
|
140
|
+
// scss-lint:enable DuplicateProperty
|
141
|
+
}
|
116
142
|
|
117
|
-
|
118
|
-
|
119
|
-
}
|
143
|
+
.gem-c-step-nav__help:after {
|
144
|
+
height: 100%;
|
120
145
|
}
|
121
146
|
|
122
|
-
.gem-c-
|
147
|
+
.gem-c-step-nav--large & {
|
123
148
|
@include media(tablet) {
|
124
149
|
&:before {
|
125
150
|
margin-left: $number-circle-size-large / 4;
|
@@ -127,65 +152,29 @@ $top-border: solid 2px $grey-3;
|
|
127
152
|
border-width: $stroke-width-large;
|
128
153
|
}
|
129
154
|
|
130
|
-
|
131
|
-
|
132
|
-
height: calc(100% - #{$gutter});
|
133
|
-
}
|
155
|
+
&:after {
|
156
|
+
height: calc(100% - #{$gutter});
|
134
157
|
}
|
135
158
|
}
|
136
159
|
}
|
137
160
|
}
|
138
161
|
|
139
|
-
.gem-c-
|
162
|
+
.gem-c-step-nav__step--active {
|
140
163
|
&:last-child:before,
|
141
|
-
.gem-c-
|
142
|
-
|
143
|
-
.gem-c-
|
144
|
-
.gem-c-
|
164
|
+
.gem-c-step-nav__circle--number,
|
165
|
+
&:after,
|
166
|
+
.gem-c-step-nav__substep:after,
|
167
|
+
.gem-c-step-nav__help:after {
|
145
168
|
border-color: $black;
|
146
169
|
}
|
147
170
|
}
|
148
171
|
|
149
|
-
.gem-c-
|
150
|
-
position: relative;
|
151
|
-
|
152
|
-
// line down the side of a step
|
153
|
-
&:after {
|
154
|
-
@include task-list-vertical-line;
|
155
|
-
@include task-list-line-position;
|
156
|
-
top: $gutter-half;
|
157
|
-
}
|
158
|
-
|
159
|
-
.gem-c-task-list--large & {
|
160
|
-
@include media(tablet) {
|
161
|
-
&:after {
|
162
|
-
@include task-list-line-position-large;
|
163
|
-
top: $gutter;
|
164
|
-
}
|
165
|
-
}
|
166
|
-
}
|
167
|
-
}
|
168
|
-
|
169
|
-
.gem-c-task-list__step--optional {
|
170
|
-
// broken line down the side of a step
|
171
|
-
&:after {
|
172
|
-
border-left-style: dotted;
|
173
|
-
}
|
174
|
-
|
175
|
-
.gem-c-task-list--large & {
|
176
|
-
@include media(tablet) {
|
177
|
-
&:after {
|
178
|
-
border-width: $stroke-width-large;
|
179
|
-
}
|
180
|
-
}
|
181
|
-
}
|
182
|
-
}
|
183
|
-
|
184
|
-
.gem-c-task-list__circle {
|
172
|
+
.gem-c-step-nav__circle {
|
185
173
|
@include box-sizing(border-box);
|
186
174
|
position: absolute;
|
187
175
|
z-index: 5;
|
188
176
|
top: $gutter-half;
|
177
|
+
left: 0;
|
189
178
|
width: $number-circle-size;
|
190
179
|
height: $number-circle-size;
|
191
180
|
color: $black;
|
@@ -193,7 +182,7 @@ $top-border: solid 2px $grey-3;
|
|
193
182
|
border-radius: 100px;
|
194
183
|
text-align: center;
|
195
184
|
|
196
|
-
.gem-c-
|
185
|
+
.gem-c-step-nav--large & {
|
197
186
|
@include media(tablet) {
|
198
187
|
top: $gutter;
|
199
188
|
width: $number-circle-size-large;
|
@@ -202,12 +191,11 @@ $top-border: solid 2px $grey-3;
|
|
202
191
|
}
|
203
192
|
}
|
204
193
|
|
205
|
-
.gem-c-
|
194
|
+
.gem-c-step-nav__circle--number {
|
206
195
|
@include _core-font-generator(16px, 16px, 16px, 23px, 23px, false, bold);
|
207
|
-
left: 0;
|
208
196
|
border: solid $stroke-width $grey-2;
|
209
197
|
|
210
|
-
.gem-c-
|
198
|
+
.gem-c-step-nav--large & {
|
211
199
|
@include _core-font-generator(19px, 16px, 19px, 30px, 23px, false, bold);
|
212
200
|
|
213
201
|
@include media(tablet) {
|
@@ -216,26 +204,21 @@ $top-border: solid 2px $grey-3;
|
|
216
204
|
}
|
217
205
|
}
|
218
206
|
|
219
|
-
.gem-c-
|
207
|
+
.gem-c-step-nav__circle--logic {
|
220
208
|
@include _core-font-generator(16px, 16px, 16px, 28px, 28px, false, bold);
|
221
|
-
left: -($gutter + $gutter-half);
|
222
209
|
|
223
|
-
.gem-c-
|
210
|
+
.gem-c-step-nav--large & {
|
224
211
|
@include _core-font-generator(19px, 16px, 19px, 34px, 28px, false, bold);
|
225
|
-
|
226
|
-
@include media(tablet) {
|
227
|
-
left: -$gutter * 2;
|
228
|
-
}
|
229
212
|
}
|
230
213
|
}
|
231
214
|
|
232
215
|
// makes sure logic text expands to the left if text size is zoomed, preventing overlap
|
233
|
-
.gem-c-
|
216
|
+
.gem-c-step-nav__circle-inner {
|
234
217
|
float: right;
|
235
218
|
min-width: 100%;
|
236
219
|
}
|
237
220
|
|
238
|
-
.gem-c-
|
221
|
+
.gem-c-step-nav__circle-background {
|
239
222
|
$shadow-offset: 0.1em;
|
240
223
|
$shadow-colour: $white;
|
241
224
|
|
@@ -246,128 +229,128 @@ $top-border: solid 2px $grey-3;
|
|
246
229
|
-#{$shadow-offset} 0 0 $shadow-colour;
|
247
230
|
}
|
248
231
|
|
249
|
-
.gem-c-
|
232
|
+
.gem-c-step-nav__header {
|
250
233
|
padding: $gutter-half 0;
|
251
234
|
border-top: $top-border;
|
252
235
|
|
253
|
-
.gem-c-
|
236
|
+
.gem-c-step-nav--active & {
|
254
237
|
cursor: pointer;
|
255
238
|
}
|
256
239
|
|
257
240
|
&:hover {
|
258
|
-
.gem-c-
|
241
|
+
.gem-c-step-nav__button {
|
259
242
|
color: $link-colour;
|
260
243
|
}
|
261
244
|
|
262
|
-
.gem-c-
|
245
|
+
.gem-c-step-nav__toggle-link {
|
263
246
|
text-decoration: underline;
|
264
247
|
}
|
265
248
|
}
|
266
249
|
|
267
|
-
.gem-c-
|
250
|
+
.gem-c-step-nav--large & {
|
268
251
|
@include media(tablet) {
|
269
252
|
padding: $gutter 0;
|
270
253
|
}
|
271
254
|
}
|
272
255
|
}
|
273
256
|
|
274
|
-
.gem-c-
|
257
|
+
.gem-c-step-nav__title {
|
275
258
|
@include _core-font-generator(19px, 19px, 19px, 1.4, 1.4, false, bold);
|
276
259
|
margin: 0;
|
277
260
|
|
278
|
-
.gem-c-
|
261
|
+
.gem-c-step-nav--large & {
|
279
262
|
@include _core-font-generator(24px, 19px, 24px, 1.4, 1.4, false, bold);
|
280
263
|
}
|
281
264
|
}
|
282
265
|
|
283
|
-
.gem-c-
|
266
|
+
.gem-c-step-nav__toggle-link {
|
284
267
|
@include _core-font-generator(14px, 14px, 14px, 1.2, 1.2, false);
|
285
268
|
display: block;
|
286
269
|
color: $link-colour;
|
287
270
|
|
288
|
-
.gem-c-
|
271
|
+
.gem-c-step-nav--large & {
|
289
272
|
@include _core-font-generator(16px, 14px, 16px, 1.2, 1.2, false);
|
290
273
|
}
|
291
274
|
}
|
292
275
|
|
293
|
-
.gem-c-
|
276
|
+
.gem-c-step-nav__panel {
|
294
277
|
@include _core-font-generator(16px, 16px, 16px);
|
295
278
|
|
296
|
-
.gem-c-
|
279
|
+
.gem-c-step-nav--large & {
|
297
280
|
@include _core-font-generator(19px, 16px, 19px);
|
298
281
|
}
|
299
282
|
}
|
300
283
|
|
301
|
-
// contents of the
|
284
|
+
// contents of the steps, such as paragraphs and links
|
302
285
|
|
303
|
-
.gem-c-
|
304
|
-
.gem-c-
|
286
|
+
.gem-c-step-nav__paragraph,
|
287
|
+
.gem-c-step-nav__heading {
|
305
288
|
padding-bottom: $gutter-half;
|
306
289
|
margin: 0;
|
307
290
|
font-size: inherit;
|
308
291
|
|
309
|
-
+ .gem-c-
|
292
|
+
+ .gem-c-step-nav__links {
|
310
293
|
margin-top: -5px;
|
311
294
|
|
312
|
-
.gem-c-
|
295
|
+
.gem-c-step-nav--large & {
|
313
296
|
@include media(tablet) {
|
314
297
|
margin-top: -$gutter-half;
|
315
298
|
}
|
316
299
|
}
|
317
300
|
}
|
318
301
|
|
319
|
-
.gem-c-
|
302
|
+
.gem-c-step-nav--large & {
|
320
303
|
@include media(tablet) {
|
321
304
|
padding-bottom: $gutter;
|
322
305
|
}
|
323
306
|
}
|
324
307
|
}
|
325
308
|
|
326
|
-
.gem-c-
|
309
|
+
.gem-c-step-nav__heading {
|
327
310
|
font-weight: bold;
|
328
311
|
}
|
329
312
|
|
330
|
-
.gem-c-
|
313
|
+
.gem-c-step-nav__links {
|
331
314
|
padding: 0;
|
332
315
|
padding-bottom: 10px;
|
333
316
|
|
334
|
-
.gem-c-
|
317
|
+
.gem-c-step-nav--large & {
|
335
318
|
@include media(tablet) {
|
336
319
|
padding-bottom: 20px;
|
337
320
|
}
|
338
321
|
}
|
339
322
|
}
|
340
323
|
|
341
|
-
.gem-c-
|
342
|
-
.gem-c-
|
324
|
+
.gem-c-step-nav__links--required {
|
325
|
+
.gem-c-step-nav__link-item {
|
343
326
|
font-weight: bold;
|
344
327
|
}
|
345
328
|
}
|
346
329
|
|
347
|
-
.gem-c-
|
330
|
+
.gem-c-step-nav__links--choice {
|
348
331
|
$links-margin: 20px;
|
349
332
|
|
350
333
|
margin-left: $links-margin;
|
351
334
|
list-style: disc;
|
352
335
|
|
353
|
-
.gem-c-
|
336
|
+
.gem-c-step-nav__link--active:before {
|
354
337
|
left: -($gutter + $gutter-half) - $links-margin;
|
355
338
|
}
|
356
339
|
|
357
|
-
.gem-c-
|
340
|
+
.gem-c-step-nav--large & {
|
358
341
|
@include media(tablet) {
|
359
|
-
.gem-c-
|
342
|
+
.gem-c-step-nav__link--active:before {
|
360
343
|
left: -($gutter * 2) - $links-margin;
|
361
344
|
}
|
362
345
|
}
|
363
346
|
}
|
364
347
|
}
|
365
348
|
|
366
|
-
.gem-c-
|
349
|
+
.gem-c-step-nav__link {
|
367
350
|
margin-bottom: 10px;
|
368
351
|
}
|
369
352
|
|
370
|
-
.gem-c-
|
353
|
+
.gem-c-step-nav__link--active {
|
371
354
|
position: relative;
|
372
355
|
|
373
356
|
&:before {
|
@@ -386,7 +369,7 @@ $top-border: solid 2px $grey-3;
|
|
386
369
|
border-radius: 100px;
|
387
370
|
}
|
388
371
|
|
389
|
-
.gem-c-
|
372
|
+
.gem-c-step-nav--large & {
|
390
373
|
@include media(tablet) {
|
391
374
|
&:before {
|
392
375
|
left: -($gutter * 2);
|
@@ -395,7 +378,7 @@ $top-border: solid 2px $grey-3;
|
|
395
378
|
}
|
396
379
|
}
|
397
380
|
|
398
|
-
.gem-c-
|
381
|
+
.gem-c-step-nav__link-item {
|
399
382
|
color: $black;
|
400
383
|
|
401
384
|
&:visited,
|
@@ -406,7 +389,7 @@ $top-border: solid 2px $grey-3;
|
|
406
389
|
}
|
407
390
|
}
|
408
391
|
|
409
|
-
.gem-c-
|
392
|
+
.gem-c-step-nav__link-item {
|
410
393
|
text-decoration: none;
|
411
394
|
|
412
395
|
&:hover {
|
@@ -414,7 +397,7 @@ $top-border: solid 2px $grey-3;
|
|
414
397
|
}
|
415
398
|
}
|
416
399
|
|
417
|
-
.gem-c-
|
400
|
+
.gem-c-step-nav__context {
|
418
401
|
display: inline-block;
|
419
402
|
font-weight: normal;
|
420
403
|
color: $grey-1;
|
@@ -424,36 +407,38 @@ $top-border: solid 2px $grey-3;
|
|
424
407
|
}
|
425
408
|
}
|
426
409
|
|
427
|
-
.gem-c-
|
410
|
+
.gem-c-step-nav__help {
|
428
411
|
position: relative;
|
429
412
|
padding: $gutter-half 0;
|
430
413
|
border-top: $top-border;
|
431
414
|
|
432
415
|
&:after {
|
433
|
-
@include
|
434
|
-
@include
|
416
|
+
@include step-nav-vertical-line(dotted);
|
417
|
+
@include step-nav-line-position;
|
435
418
|
z-index: 3;
|
436
419
|
top: 0;
|
420
|
+
left: -($gutter + $gutter-half);
|
437
421
|
height: calc(100% + #{$gutter});
|
438
422
|
}
|
439
423
|
|
440
|
-
.gem-c-
|
424
|
+
.gem-c-step-nav__step--optional & {
|
441
425
|
&:after {
|
442
426
|
display: none;
|
443
427
|
}
|
444
428
|
}
|
445
429
|
|
446
|
-
.gem-c-
|
430
|
+
.gem-c-step-nav--large & {
|
447
431
|
@include media(tablet) {
|
448
432
|
&:after {
|
449
|
-
@include
|
433
|
+
@include step-nav-line-position-large;
|
434
|
+
left: -($gutter * 2);
|
450
435
|
height: calc(100% + #{$gutter} + #{$gutter-half});
|
451
436
|
}
|
452
437
|
}
|
453
438
|
}
|
454
439
|
}
|
455
440
|
|
456
|
-
.gem-c-
|
441
|
+
.gem-c-step-nav__help-link {
|
457
442
|
text-decoration: none;
|
458
443
|
font-weight: bold;
|
459
444
|
|
@@ -462,29 +447,31 @@ $top-border: solid 2px $grey-3;
|
|
462
447
|
}
|
463
448
|
}
|
464
449
|
|
465
|
-
.gem-c-
|
450
|
+
.gem-c-step-nav__substep {
|
466
451
|
position: relative;
|
467
452
|
padding-top: $gutter-half;
|
468
453
|
border-top: $top-border;
|
469
454
|
|
470
455
|
&:after {
|
471
|
-
@include
|
472
|
-
@include
|
456
|
+
@include step-nav-vertical-line;
|
457
|
+
@include step-nav-line-position;
|
473
458
|
z-index: 3;
|
474
459
|
top: 0;
|
460
|
+
left: -($gutter + $gutter-half);
|
475
461
|
}
|
476
462
|
|
477
|
-
.gem-c-
|
463
|
+
.gem-c-step-nav--large & {
|
478
464
|
@include media(tablet) {
|
479
465
|
padding-top: $gutter;
|
480
466
|
|
481
467
|
&:after {
|
482
|
-
@include
|
468
|
+
@include step-nav-line-position-large;
|
469
|
+
left: -($gutter * 2);
|
483
470
|
}
|
484
471
|
}
|
485
472
|
}
|
486
473
|
}
|
487
474
|
|
488
|
-
.gem-c-
|
475
|
+
.gem-c-step-nav__substep--optional:after {
|
489
476
|
border-left-style: dotted;
|
490
477
|
}
|