govuk_publishing_components 9.5.1 → 9.5.2
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/step-by-step-nav.js +11 -6
- data/app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +2 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +7 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +3 -5
- data/app/views/layouts/govuk_publishing_components/application.html.erb +6 -0
- data/config/initializers/assets.rb +2 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +1 -1
- data/node_modules/govuk-frontend/all.js +3 -1
- data/node_modules/govuk-frontend/components/back-link/README.md +23 -7
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +26 -26
- data/node_modules/govuk-frontend/components/button/README.md +22 -22
- data/node_modules/govuk-frontend/components/checkboxes/README.md +115 -27
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +7 -1
- data/node_modules/govuk-frontend/components/date-input/README.md +141 -61
- data/node_modules/govuk-frontend/components/date-input/_date-input.scss +0 -5
- data/node_modules/govuk-frontend/components/date-input/template.njk +40 -17
- data/node_modules/govuk-frontend/components/details/README.md +10 -10
- data/node_modules/govuk-frontend/components/error-message/README.md +4 -4
- data/node_modules/govuk-frontend/components/error-summary/README.md +5 -5
- data/node_modules/govuk-frontend/components/fieldset/README.md +7 -7
- data/node_modules/govuk-frontend/components/file-upload/README.md +16 -16
- data/node_modules/govuk-frontend/components/footer/README.md +5 -5
- data/node_modules/govuk-frontend/components/footer/template.njk +1 -1
- data/node_modules/govuk-frontend/components/header/README.md +26 -18
- data/node_modules/govuk-frontend/components/header/_header.scss +3 -2
- data/node_modules/govuk-frontend/components/header/template.njk +5 -3
- data/node_modules/govuk-frontend/components/hint/README.md +14 -10
- data/node_modules/govuk-frontend/components/input/README.md +166 -30
- data/node_modules/govuk-frontend/components/input/_input.scss +20 -3
- data/node_modules/govuk-frontend/components/inset-text/README.md +6 -6
- data/node_modules/govuk-frontend/components/label/README.md +9 -9
- data/node_modules/govuk-frontend/components/panel/README.md +43 -4
- data/node_modules/govuk-frontend/components/panel/template.njk +4 -2
- data/node_modules/govuk-frontend/components/phase-banner/README.md +4 -4
- data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +3 -3
- data/node_modules/govuk-frontend/components/radios/README.md +100 -29
- data/node_modules/govuk-frontend/components/radios/_radios.scss +12 -3
- data/node_modules/govuk-frontend/components/select/README.md +12 -12
- data/node_modules/govuk-frontend/components/skip-link/README.md +4 -4
- data/node_modules/govuk-frontend/components/table/README.md +12 -12
- data/node_modules/govuk-frontend/components/table/_table.scss +2 -2
- data/node_modules/govuk-frontend/components/tabs/README.md +4 -4
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +1 -0
- data/node_modules/govuk-frontend/components/tag/README.md +7 -7
- data/node_modules/govuk-frontend/components/tag/_tag.scss +6 -0
- data/node_modules/govuk-frontend/components/textarea/README.md +16 -16
- data/node_modules/govuk-frontend/components/warning-text/README.md +4 -4
- data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +14 -4
- data/node_modules/govuk-frontend/core/_template.scss +7 -3
- data/node_modules/govuk-frontend/helpers/_typography.scss +44 -10
- data/node_modules/govuk-frontend/objects/_main-wrapper.scss +4 -0
- data/node_modules/govuk-frontend/package.json +18 -12
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +35 -0
- data/node_modules/govuk-frontend/tools/_all.scss +1 -0
- data/node_modules/govuk-frontend/tools/_px-to-rem.scss +20 -0
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +6 -0
- metadata +5 -28
- data/node_modules/govuk-frontend/components/back-link/back-link.njk +0 -3
- data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +0 -14
- data/node_modules/govuk-frontend/components/button/button.njk +0 -3
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +0 -27
- data/node_modules/govuk-frontend/components/date-input/date-input.njk +0 -23
- data/node_modules/govuk-frontend/components/details/details.njk +0 -7
- data/node_modules/govuk-frontend/components/error-message/error-message.njk +0 -7
- data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +0 -17
- data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +0 -13
- data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +0 -9
- data/node_modules/govuk-frontend/components/footer/footer.njk +0 -3
- data/node_modules/govuk-frontend/components/header/header.njk +0 -3
- data/node_modules/govuk-frontend/components/hint/hint.njk +0 -7
- data/node_modules/govuk-frontend/components/input/input.njk +0 -9
- data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +0 -7
- data/node_modules/govuk-frontend/components/label/label.njk +0 -6
- data/node_modules/govuk-frontend/components/panel/panel.njk +0 -7
- data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +0 -7
- data/node_modules/govuk-frontend/components/radios/radios.njk +0 -27
- data/node_modules/govuk-frontend/components/select/select.njk +0 -24
- data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +0 -3
- data/node_modules/govuk-frontend/components/table/table.njk +0 -45
- data/node_modules/govuk-frontend/components/tabs/tabs.njk +0 -3
- data/node_modules/govuk-frontend/components/tag/tag.njk +0 -7
- data/node_modules/govuk-frontend/components/textarea/textarea.njk +0 -11
- data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 884f2ae7c8ef7dd478e4e41f4259d24dec57cbe60ba5eb7b7d239ea67bcae620
|
|
4
|
+
data.tar.gz: b59dc153934e9d15920e4782859afde8906d051dc9be4be3301d369419e6ffd9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 537ae66c5a07ecf928779fd759693207a091950e6fa4c7bb36bf1359033dee03a69b6b4740af395f64c0b472b251a83e59ae271b5ab4990b5b0492e479ebabd3
|
|
7
|
+
data.tar.gz: 2212a7f125b2c851855c4e7e7d3e1755f53f2a70a46ad2fcea136b74378d342a4dfa8c1d5e9d1ca95cb7e04b1ff2dfb4dd507679e052567a33ef445e227d9967
|
|
@@ -45,8 +45,11 @@
|
|
|
45
45
|
bindComponentLinkClicks(stepNavTracker);
|
|
46
46
|
|
|
47
47
|
function getTextForInsertedElements() {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
var openBracket = '<span class="visuallyhidden">(</span>';
|
|
49
|
+
var closeBracket = '<span class="visuallyhidden">)</span>';
|
|
50
|
+
|
|
51
|
+
actions.showText = openBracket + $element.attr('data-show-text') + closeBracket;
|
|
52
|
+
actions.hideText = openBracket + $element.attr('data-hide-text') + closeBracket;
|
|
50
53
|
actions.showAllText = $element.attr('data-show-all-text');
|
|
51
54
|
actions.hideAllText = $element.attr('data-hide-all-text');
|
|
52
55
|
}
|
|
@@ -64,7 +67,9 @@
|
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
if (!$(this).find('.js-toggle-link').length) {
|
|
67
|
-
$(this).find('.js-step-title-button').append(
|
|
70
|
+
$(this).find('.js-step-title-button').append(
|
|
71
|
+
'<span class="gem-c-step-nav__toggle-link js-toggle-link" aria-hidden="true" hidden></span>'
|
|
72
|
+
);
|
|
68
73
|
}
|
|
69
74
|
});
|
|
70
75
|
}
|
|
@@ -250,7 +255,7 @@
|
|
|
250
255
|
|
|
251
256
|
if ($showOrHideAllButton.text() == actions.showAllText) {
|
|
252
257
|
$showOrHideAllButton.text(actions.hideAllText);
|
|
253
|
-
$element.find('.js-toggle-link').
|
|
258
|
+
$element.find('.js-toggle-link').html(actions.hideText);
|
|
254
259
|
shouldshowAll = true;
|
|
255
260
|
|
|
256
261
|
stepNavTracker.track('pageElementInteraction', 'stepNavAllShown', {
|
|
@@ -258,7 +263,7 @@
|
|
|
258
263
|
});
|
|
259
264
|
} else {
|
|
260
265
|
$showOrHideAllButton.text(actions.showAllText);
|
|
261
|
-
$element.find('.js-toggle-link').
|
|
266
|
+
$element.find('.js-toggle-link').html(actions.showText);
|
|
262
267
|
shouldshowAll = false;
|
|
263
268
|
|
|
264
269
|
stepNavTracker.track('pageElementInteraction', 'stepNavAllHidden', {
|
|
@@ -316,7 +321,7 @@
|
|
|
316
321
|
$stepElement.toggleClass('step-is-shown', isShown);
|
|
317
322
|
$stepContent.toggleClass('js-hidden', !isShown);
|
|
318
323
|
$titleLink.attr("aria-expanded", isShown);
|
|
319
|
-
$stepElement.find('.js-toggle-link').
|
|
324
|
+
$stepElement.find('.js-toggle-link').html(isShown ? actions.hideText : actions.showText);
|
|
320
325
|
}
|
|
321
326
|
|
|
322
327
|
function isShown() {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! modernizr 3.6.0 (Custom Build) | MIT *
|
|
2
|
+
* https://modernizr.com/download/?-flexbox-flexboxtweener-history-printshiv-setclasses !*/
|
|
3
|
+
!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in E)if(E.hasOwnProperty(l)){if(e=[],t=E[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)a=e[i],s=a.split("."),1===s.length?Modernizr[s[0]]=o:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=o),x.push((o?"":"no-")+s.join("-"))}}function i(e){var t=C.className,n=Modernizr._config.classPrefix||"";if(b&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),b?C.className.baseVal=t:C.className=t)}function a(e,t){return!!~(""+e).indexOf(t)}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):b?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function l(){var e=t.body;return e||(e=s(b?"svg":"body"),e.fake=!0),e}function u(e,n,r,o){var i,a,u,f,c="modernizr",d=s("div"),p=l();if(parseInt(r,10))for(;r--;)u=s("div"),u.id=o?o[r]:c+(r+1),d.appendChild(u);return i=s("style"),i.type="text/css",i.id="s"+c,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",f=C.style.overflow,C.style.overflow="hidden",C.appendChild(p)),a=n(d,e),p.fake?(p.parentNode.removeChild(p),C.style.overflow=f,C.offsetHeight):d.parentNode.removeChild(d),!!a}function f(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function c(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var i=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var a=i.error?"error":"log";i[a].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}function d(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(f(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+f(t[o])+":"+r+")");return i=i.join(" or "),u("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==c(e,null,"position")})}return n}function p(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function m(e,t,o,i){function l(){f&&(delete _.style,delete _.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var u=d(e,o);if(!r(u,"undefined"))return u}for(var f,c,m,h,v,g=["modernizr","tspan","samp"];!_.style&&g.length;)f=!0,_.modElem=s(g.shift()),_.style=_.modElem.style;for(m=e.length,c=0;m>c;c++)if(h=e[c],v=_.style[h],a(h,"-")&&(h=p(h)),_.style[h]!==n){if(i||r(o,"undefined"))return l(),"pfx"==t?h:!0;try{_.style[h]=o}catch(y){}if(_.style[h]!=v)return l(),"pfx"==t?h:!0}return l(),!1}function h(e,t){return function(){return e.apply(t,arguments)}}function v(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?h(o,n||t):o);return!1}function g(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+N.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?m(s,t,o,i):(s=(e+" "+j.join(a+" ")+a).split(" "),v(s,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var E=[],S={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){E.push({name:e,fn:t,options:n})},addAsyncTest:function(e){E.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=S,Modernizr=new Modernizr;var x=[],C=t.documentElement,b="svg"===C.nodeName.toLowerCase();b||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=w.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=w.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),w.elements=n+" "+e,u(t)}function i(e){var t=b[e[x]];return t||(t={},C++,e[x]=C,b[C]=t),t}function a(e,n,r){if(n||(n=t),v)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():S.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||E.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),v)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return w.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(w,t.frag)}function u(e){e||(e=t);var r=i(e);return!w.shivCSS||h||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),v||l(e,r),e}function f(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(c(t)));return a}function c(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(T+":"+e.nodeName);r--;)t=n[r],t.specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function d(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+T+"\\:$2";o--;)t=n[o]=n[o].split("}"),t[t.length-1]=t[t.length-1].replace(i,a),n[o]=t.join("}");return n.join("{")}function p(e){for(var t=e.length;t--;)e[t].removeNode()}function m(e){function t(){clearTimeout(a._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,o,a=i(e),s=e.namespaces,l=e.parentWindow;return!_||e.printShived?e:("undefined"==typeof s[T]&&s.add(T),l.attachEvent("onbeforeprint",function(){t();for(var i,a,s,l=e.styleSheets,u=[],c=l.length,p=Array(c);c--;)p[c]=l[c];for(;s=p.pop();)if(!s.disabled&&N.test(s.media)){try{i=s.imports,a=i.length}catch(m){a=0}for(c=0;a>c;c++)p.push(i[c]);try{u.push(s.cssText)}catch(m){}}u=d(u.reverse().join("")),o=f(e),r=n(e,u)}),l.attachEvent("onafterprint",function(){p(o),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)}),e.printShived=!0,e)}var h,v,g="3.7.3",y=e.html5||{},E=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,S=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,x="_html5shiv",C=0,b={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",h="hidden"in e,v=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){h=!0,v=!0}}();var w={elements:y.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:g,shivCSS:y.shivCSS!==!1,supportsUnknownElements:v,shivMethods:y.shivMethods!==!1,type:"default",shivDocument:u,createElement:a,createDocumentFragment:s,addElements:o};e.html5=w,u(t);var N=/^$|\b(?:all|print)\b/,T="html5shiv",_=!v&&function(){var n=t.documentElement;return!("undefined"==typeof t.namespaces||"undefined"==typeof t.parentWindow||"undefined"==typeof n.applyElement||"undefined"==typeof n.removeNode||"undefined"==typeof e.attachEvent)}();w.type+=" print",w.shivPrint=m,m(t),"object"==typeof module&&module.exports&&(module.exports=w)}("undefined"!=typeof e?e:this,t),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")||"file:"===location.protocol?e.history&&"pushState"in e.history:!1});var w="Moz O ms Webkit",N=S._config.usePrefixes?w.split(" "):[];S._cssomPrefixes=N;var T={elem:s("modernizr")};Modernizr._q.push(function(){delete T.elem});var _={style:T.elem.style};Modernizr._q.unshift(function(){delete _.style});var j=S._config.usePrefixes?w.toLowerCase().split(" "):[];S._domPrefixes=j,S.testAllProps=g,S.testAllProps=y,Modernizr.addTest("flexbox",y("flexBasis","1px",!0)),Modernizr.addTest("flexboxtweener",y("flexAlign","end",!0)),o(),i(x),delete S.addTest,delete S.addAsyncTest;for(var P=0;P<Modernizr._q.length;P++)Modernizr._q[P]();e.Modernizr=Modernizr}(window,document);
|
|
@@ -263,6 +263,8 @@ $top-border: solid 2px $grey-3;
|
|
|
263
263
|
@include _core-font-generator(14px, 14px, 14px, 1.2, 1.2, false);
|
|
264
264
|
display: block;
|
|
265
265
|
color: $link-colour;
|
|
266
|
+
// core-font-generator sets this to none, so we need to override
|
|
267
|
+
text-transform: capitalize !important;
|
|
266
268
|
|
|
267
269
|
.gem-c-step-nav--large & {
|
|
268
270
|
@include _core-font-generator(16px, 14px, 16px, 1.2, 1.2, false);
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
<meta name="robots" content="noindex,nofollow,noimageindex">
|
|
5
5
|
<%= csrf_meta_tags %>
|
|
6
6
|
<title><%= browser_title %></title>
|
|
7
|
-
|
|
7
|
+
<!--[if !IE 8]><!-->
|
|
8
|
+
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles" %>
|
|
9
|
+
<!--<![endif]-->
|
|
10
|
+
<!--[if IE 8]>
|
|
11
|
+
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles_ie8" %>
|
|
12
|
+
<![endif]-->
|
|
13
|
+
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
|
8
14
|
</head>
|
|
9
15
|
<body class="govuk-template__body">
|
|
10
16
|
<%= yield %>
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
class="gem-c-step-nav js-hidden <% unless small %>gem-c-step-nav--large<% end %>"
|
|
22
22
|
<%= "data-remember" if remember_last_step %>
|
|
23
23
|
<%= "data-id=#{tracking_id}" if tracking_id %>
|
|
24
|
-
data-show-text="<%= t("govuk_component.step_by_step_nav.show", default: "
|
|
25
|
-
data-hide-text="<%= t("govuk_component.step_by_step_nav.hide", default: "
|
|
24
|
+
data-show-text="<%= t("govuk_component.step_by_step_nav.show", default: "show") %>"
|
|
25
|
+
data-hide-text="<%= t("govuk_component.step_by_step_nav.hide", default: "hide") %>"
|
|
26
26
|
data-show-all-text="<%= t("govuk_component.step_by_step_nav.show_all", default: "Show all") %>"
|
|
27
27
|
data-hide-all-text="<%= t("govuk_component.step_by_step_nav.hide_all", default: "Hide all") %>"
|
|
28
28
|
>
|
|
@@ -54,9 +54,7 @@
|
|
|
54
54
|
<% if logic %>
|
|
55
55
|
<%= logic %>
|
|
56
56
|
<% else %>
|
|
57
|
-
<%
|
|
58
|
-
step_number += 1
|
|
59
|
-
%>
|
|
57
|
+
<% step_number += 1 %>
|
|
60
58
|
<span class="visuallyhidden">Step</span> <%= step_number %>
|
|
61
59
|
<% end %>
|
|
62
60
|
</span>
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
<% end %>
|
|
19
19
|
|
|
20
20
|
<% if @component_doc && @component_doc.part_of_admin_layout? %>
|
|
21
|
+
<!--[if !IE 8]><!-->
|
|
21
22
|
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles" %>
|
|
23
|
+
<!--<![endif]-->
|
|
24
|
+
<!--[if IE 8]>
|
|
25
|
+
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles_ie8" %>
|
|
26
|
+
<![endif]-->
|
|
27
|
+
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
|
22
28
|
<% end %>
|
|
23
29
|
|
|
24
30
|
<%= javascript_include_tag "component_guide/application" %>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Rails.application.config.assets.precompile += %w(
|
|
2
|
+
govuk_publishing_components/vendor/modernizr.js
|
|
2
3
|
govuk_publishing_components/admin_scripts.js
|
|
3
4
|
govuk_publishing_components/admin_styles.css
|
|
5
|
+
govuk_publishing_components/admin_styles_ie8.css
|
|
4
6
|
govuk_publishing_components/component_guide.css
|
|
5
7
|
component_guide/all_components.css
|
|
6
8
|
component_guide/all_components_print.css
|
|
@@ -16,7 +16,7 @@ team](mailto:govuk-design-system-support@digital.cabinet-office.gov.uk) or get i
|
|
|
16
16
|
There are 2 ways to start using GOV.UK Frontend in your app.
|
|
17
17
|
|
|
18
18
|
Once installed, you will be able to use the code from the examples in the
|
|
19
|
-
[GOV.UK Design System](https://www.gov.uk/design-system in your service.
|
|
19
|
+
[GOV.UK Design System](https://www.gov.uk/design-system) in your service.
|
|
20
20
|
|
|
21
21
|
### 1. Install with npm (recommended)
|
|
22
22
|
|
|
@@ -1677,8 +1677,10 @@ Tabs.prototype.getHref = function ($tab) {
|
|
|
1677
1677
|
};
|
|
1678
1678
|
|
|
1679
1679
|
function initAll () {
|
|
1680
|
+
// Find all buttons with [role=button] on the document to enhance.
|
|
1680
1681
|
new Button(document).init();
|
|
1681
1682
|
|
|
1683
|
+
// Find all global details elements to enhance.
|
|
1682
1684
|
var $details = document.querySelectorAll('details');
|
|
1683
1685
|
nodeListForEach($details, function ($detail) {
|
|
1684
1686
|
new Details($detail).init();
|
|
@@ -1689,7 +1691,7 @@ function initAll () {
|
|
|
1689
1691
|
new Checkboxes($checkbox).init();
|
|
1690
1692
|
});
|
|
1691
1693
|
|
|
1692
|
-
// Find first
|
|
1694
|
+
// Find first error summary module to enhance.
|
|
1693
1695
|
var $errorSummary = document.querySelector('[data-module="error-summary"]');
|
|
1694
1696
|
new ErrorSummary($errorSummary).init();
|
|
1695
1697
|
|
|
@@ -6,25 +6,41 @@ Link back component, to go back a page.
|
|
|
6
6
|
|
|
7
7
|
## Guidance
|
|
8
8
|
|
|
9
|
-
Find out when to use the
|
|
9
|
+
Find out when to use the back link component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/back-link).
|
|
10
10
|
|
|
11
11
|
## Quick start examples
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Back link
|
|
14
14
|
|
|
15
|
-
[Preview the
|
|
15
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/back-link/preview)
|
|
16
16
|
|
|
17
17
|
#### Markup
|
|
18
18
|
|
|
19
|
-
<a href="
|
|
19
|
+
<a href="#" class="govuk-back-link">Back</a>
|
|
20
20
|
|
|
21
21
|
#### Macro
|
|
22
22
|
|
|
23
|
-
{% from
|
|
23
|
+
{% from "back-link/macro.njk" import govukBackLink %}
|
|
24
24
|
|
|
25
25
|
{{ govukBackLink({
|
|
26
|
-
"href": "
|
|
27
|
-
|
|
26
|
+
"href": "#"
|
|
27
|
+
}) }}
|
|
28
|
+
|
|
29
|
+
### Back link with custom text
|
|
30
|
+
|
|
31
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/back-link/with-custom-text/preview)
|
|
32
|
+
|
|
33
|
+
#### Markup
|
|
34
|
+
|
|
35
|
+
<a href="#" class="govuk-back-link">Back to home</a>
|
|
36
|
+
|
|
37
|
+
#### Macro
|
|
38
|
+
|
|
39
|
+
{% from "back-link/macro.njk" import govukBackLink %}
|
|
40
|
+
|
|
41
|
+
{{ govukBackLink({
|
|
42
|
+
"href": "#",
|
|
43
|
+
"text": "Back to home"
|
|
28
44
|
}) }}
|
|
29
45
|
|
|
30
46
|
## Requirements
|
|
@@ -6,13 +6,13 @@ The Breadcrumbs component helps users to understand where they are within a webs
|
|
|
6
6
|
|
|
7
7
|
## Guidance
|
|
8
8
|
|
|
9
|
-
Find out when to use the
|
|
9
|
+
Find out when to use the breadcrumbs component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/breadcrumbs).
|
|
10
10
|
|
|
11
11
|
## Quick start examples
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Breadcrumbs
|
|
14
14
|
|
|
15
|
-
[Preview the
|
|
15
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/preview)
|
|
16
16
|
|
|
17
17
|
#### Markup
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
20
20
|
<ol class="govuk-breadcrumbs__list">
|
|
21
21
|
|
|
22
22
|
<li class="govuk-breadcrumbs__list-item">
|
|
23
|
-
<a class="govuk-breadcrumbs__link" href="/section">Section
|
|
23
|
+
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
|
|
24
24
|
</li>
|
|
25
25
|
|
|
26
26
|
<li class="govuk-breadcrumbs__list-item">
|
|
@@ -32,12 +32,12 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
32
32
|
|
|
33
33
|
#### Macro
|
|
34
34
|
|
|
35
|
-
{% from
|
|
35
|
+
{% from "breadcrumbs/macro.njk" import govukBreadcrumbs %}
|
|
36
36
|
|
|
37
37
|
{{ govukBreadcrumbs({
|
|
38
38
|
"items": [
|
|
39
39
|
{
|
|
40
|
-
"text": "Section
|
|
40
|
+
"text": "Section",
|
|
41
41
|
"href": "/section"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
@@ -47,9 +47,9 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
47
47
|
]
|
|
48
48
|
}) }}
|
|
49
49
|
|
|
50
|
-
### Breadcrumbs
|
|
50
|
+
### Breadcrumbs with one level
|
|
51
51
|
|
|
52
|
-
[Preview the
|
|
52
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/with-one-level/preview)
|
|
53
53
|
|
|
54
54
|
#### Markup
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
57
57
|
<ol class="govuk-breadcrumbs__list">
|
|
58
58
|
|
|
59
59
|
<li class="govuk-breadcrumbs__list-item">
|
|
60
|
-
<a class="govuk-breadcrumbs__link" href="/section">Section
|
|
60
|
+
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
|
|
61
61
|
</li>
|
|
62
62
|
|
|
63
63
|
</ol>
|
|
@@ -65,20 +65,20 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
65
65
|
|
|
66
66
|
#### Macro
|
|
67
67
|
|
|
68
|
-
{% from
|
|
68
|
+
{% from "breadcrumbs/macro.njk" import govukBreadcrumbs %}
|
|
69
69
|
|
|
70
70
|
{{ govukBreadcrumbs({
|
|
71
71
|
"items": [
|
|
72
72
|
{
|
|
73
|
-
"text": "Section
|
|
73
|
+
"text": "Section",
|
|
74
74
|
"href": "/section"
|
|
75
75
|
}
|
|
76
76
|
]
|
|
77
77
|
}) }}
|
|
78
78
|
|
|
79
|
-
### Breadcrumbs
|
|
79
|
+
### Breadcrumbs with multiple levels
|
|
80
80
|
|
|
81
|
-
[Preview the
|
|
81
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/with-multiple-levels/preview)
|
|
82
82
|
|
|
83
83
|
#### Markup
|
|
84
84
|
|
|
@@ -90,15 +90,15 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
90
90
|
</li>
|
|
91
91
|
|
|
92
92
|
<li class="govuk-breadcrumbs__list-item">
|
|
93
|
-
<a class="govuk-breadcrumbs__link" href="/section">Section
|
|
93
|
+
<a class="govuk-breadcrumbs__link" href="/section">Section</a>
|
|
94
94
|
</li>
|
|
95
95
|
|
|
96
96
|
<li class="govuk-breadcrumbs__list-item">
|
|
97
|
-
<a class="govuk-breadcrumbs__link" href="/section/sub-section">Sub-section
|
|
97
|
+
<a class="govuk-breadcrumbs__link" href="/section/sub-section">Sub-section</a>
|
|
98
98
|
</li>
|
|
99
99
|
|
|
100
100
|
<li class="govuk-breadcrumbs__list-item">
|
|
101
|
-
<a class="govuk-breadcrumbs__link" href="/section/sub-section/sub-sub-section">Sub Sub-section
|
|
101
|
+
<a class="govuk-breadcrumbs__link" href="/section/sub-section/sub-sub-section">Sub Sub-section</a>
|
|
102
102
|
</li>
|
|
103
103
|
|
|
104
104
|
</ol>
|
|
@@ -106,7 +106,7 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
106
106
|
|
|
107
107
|
#### Macro
|
|
108
108
|
|
|
109
|
-
{% from
|
|
109
|
+
{% from "breadcrumbs/macro.njk" import govukBreadcrumbs %}
|
|
110
110
|
|
|
111
111
|
{{ govukBreadcrumbs({
|
|
112
112
|
"items": [
|
|
@@ -115,23 +115,23 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
115
115
|
"href": "/"
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
|
-
"text": "Section
|
|
118
|
+
"text": "Section",
|
|
119
119
|
"href": "/section"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
"text": "Sub-section
|
|
122
|
+
"text": "Sub-section",
|
|
123
123
|
"href": "/section/sub-section"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
|
-
"text": "Sub Sub-section
|
|
126
|
+
"text": "Sub Sub-section",
|
|
127
127
|
"href": "/section/sub-section/sub-sub-section"
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
130
|
}) }}
|
|
131
131
|
|
|
132
|
-
### Breadcrumbs
|
|
132
|
+
### Breadcrumbs without the home section
|
|
133
133
|
|
|
134
|
-
[Preview the
|
|
134
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/without-the-home-section/preview)
|
|
135
135
|
|
|
136
136
|
#### Markup
|
|
137
137
|
|
|
@@ -151,7 +151,7 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
151
151
|
|
|
152
152
|
#### Macro
|
|
153
153
|
|
|
154
|
-
{% from
|
|
154
|
+
{% from "breadcrumbs/macro.njk" import govukBreadcrumbs %}
|
|
155
155
|
|
|
156
156
|
{{ govukBreadcrumbs({
|
|
157
157
|
"items": [
|
|
@@ -166,9 +166,9 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
166
166
|
]
|
|
167
167
|
}) }}
|
|
168
168
|
|
|
169
|
-
### Breadcrumbs
|
|
169
|
+
### Breadcrumbs with last breadcrumb as current page
|
|
170
170
|
|
|
171
|
-
[Preview the
|
|
171
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/with-last-breadcrumb-as-current-page/preview)
|
|
172
172
|
|
|
173
173
|
#### Markup
|
|
174
174
|
|
|
@@ -190,7 +190,7 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De
|
|
|
190
190
|
|
|
191
191
|
#### Macro
|
|
192
192
|
|
|
193
|
-
{% from
|
|
193
|
+
{% from "breadcrumbs/macro.njk" import govukBreadcrumbs %}
|
|
194
194
|
|
|
195
195
|
{{ govukBreadcrumbs({
|
|
196
196
|
"items": [
|
|
@@ -6,15 +6,15 @@ A button is an element that allows users to carry out an action on a GOV.UK page
|
|
|
6
6
|
|
|
7
7
|
## Guidance
|
|
8
8
|
|
|
9
|
-
Find out when to use the
|
|
9
|
+
Find out when to use the button component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/button).
|
|
10
10
|
|
|
11
11
|
## Quick start examples
|
|
12
12
|
|
|
13
13
|
Buttons are configured to perform an action and they can have a different look. For example, they can be disabled until a valid action has been performed by the user.
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Button
|
|
16
16
|
|
|
17
|
-
[Preview the
|
|
17
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/preview)
|
|
18
18
|
|
|
19
19
|
#### Markup
|
|
20
20
|
|
|
@@ -24,15 +24,15 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
24
24
|
|
|
25
25
|
#### Macro
|
|
26
26
|
|
|
27
|
-
{% from
|
|
27
|
+
{% from "button/macro.njk" import govukButton %}
|
|
28
28
|
|
|
29
29
|
{{ govukButton({
|
|
30
30
|
"text": "Save and continue"
|
|
31
31
|
}) }}
|
|
32
32
|
|
|
33
|
-
### Button
|
|
33
|
+
### Button disabled
|
|
34
34
|
|
|
35
|
-
[Preview the
|
|
35
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/disabled/preview)
|
|
36
36
|
|
|
37
37
|
#### Markup
|
|
38
38
|
|
|
@@ -42,16 +42,16 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
42
42
|
|
|
43
43
|
#### Macro
|
|
44
44
|
|
|
45
|
-
{% from
|
|
45
|
+
{% from "button/macro.njk" import govukButton %}
|
|
46
46
|
|
|
47
47
|
{{ govukButton({
|
|
48
48
|
"text": "Disabled button",
|
|
49
49
|
"disabled": true
|
|
50
50
|
}) }}
|
|
51
51
|
|
|
52
|
-
### Button
|
|
52
|
+
### Button link
|
|
53
53
|
|
|
54
|
-
[Preview the
|
|
54
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/link/preview)
|
|
55
55
|
|
|
56
56
|
#### Markup
|
|
57
57
|
|
|
@@ -61,16 +61,16 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
61
61
|
|
|
62
62
|
#### Macro
|
|
63
63
|
|
|
64
|
-
{% from
|
|
64
|
+
{% from "button/macro.njk" import govukButton %}
|
|
65
65
|
|
|
66
66
|
{{ govukButton({
|
|
67
67
|
"text": "Link button",
|
|
68
68
|
"href": "/"
|
|
69
69
|
}) }}
|
|
70
70
|
|
|
71
|
-
### Button
|
|
71
|
+
### Button link disabled
|
|
72
72
|
|
|
73
|
-
[Preview the
|
|
73
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/link-disabled/preview)
|
|
74
74
|
|
|
75
75
|
#### Markup
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
80
80
|
|
|
81
81
|
#### Macro
|
|
82
82
|
|
|
83
|
-
{% from
|
|
83
|
+
{% from "button/macro.njk" import govukButton %}
|
|
84
84
|
|
|
85
85
|
{{ govukButton({
|
|
86
86
|
"text": "Disabled link button",
|
|
@@ -88,9 +88,9 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
88
88
|
"disabled": true
|
|
89
89
|
}) }}
|
|
90
90
|
|
|
91
|
-
### Button
|
|
91
|
+
### Button start link
|
|
92
92
|
|
|
93
|
-
[Preview the
|
|
93
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/start-link/preview)
|
|
94
94
|
|
|
95
95
|
#### Markup
|
|
96
96
|
|
|
@@ -100,7 +100,7 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
100
100
|
|
|
101
101
|
#### Macro
|
|
102
102
|
|
|
103
|
-
{% from
|
|
103
|
+
{% from "button/macro.njk" import govukButton %}
|
|
104
104
|
|
|
105
105
|
{{ govukButton({
|
|
106
106
|
"text": "Start now link button",
|
|
@@ -108,9 +108,9 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
108
108
|
"classes": "govuk-button--start"
|
|
109
109
|
}) }}
|
|
110
110
|
|
|
111
|
-
### Button
|
|
111
|
+
### Button input
|
|
112
112
|
|
|
113
|
-
[Preview the
|
|
113
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/input/preview)
|
|
114
114
|
|
|
115
115
|
#### Markup
|
|
116
116
|
|
|
@@ -118,7 +118,7 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
118
118
|
|
|
119
119
|
#### Macro
|
|
120
120
|
|
|
121
|
-
{% from
|
|
121
|
+
{% from "button/macro.njk" import govukButton %}
|
|
122
122
|
|
|
123
123
|
{{ govukButton({
|
|
124
124
|
"element": "input",
|
|
@@ -126,9 +126,9 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
126
126
|
"text": "Start now"
|
|
127
127
|
}) }}
|
|
128
128
|
|
|
129
|
-
### Button
|
|
129
|
+
### Button input disabled
|
|
130
130
|
|
|
131
|
-
[Preview the
|
|
131
|
+
[Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/button/input-disabled/preview)
|
|
132
132
|
|
|
133
133
|
#### Markup
|
|
134
134
|
|
|
@@ -136,7 +136,7 @@ Buttons are configured to perform an action and they can have a different look.
|
|
|
136
136
|
|
|
137
137
|
#### Macro
|
|
138
138
|
|
|
139
|
-
{% from
|
|
139
|
+
{% from "button/macro.njk" import govukButton %}
|
|
140
140
|
|
|
141
141
|
{{ govukButton({
|
|
142
142
|
"element": "input",
|