Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uswds

Package Overview
Dependencies
Maintainers
6
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uswds - npm Package Compare versions

Comparing version 0.13.3 to 0.14.0

src/stylesheets/components/_navigation.scss

3

dist/js/uswds.min.js

@@ -1,1 +0,2 @@

!function t(e,n,i){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(t,e,n){"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))?!function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],o=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},u=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},c=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,o=n.length;i<o;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=c[n]=[],f=function(){return new c(this)};if(a[n]=Error[n],l.item=function(t){return this[t]||null},l.contains=function(t){return t+="",u(this,t)!==-1},l.add=function(){var t,e=arguments,n=0,i=e.length,o=!1;do t=e[n]+"",u(this,t)===-1&&(this.push(t),o=!0);while(++n<i);o&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,i=0,o=n.length,r=!1;do for(t=n[i]+"",e=u(this,t);e!==-1;)this.splice(e,1),r=!0,e=u(this,t);while(++i<o);r&&this._updateClassName()},l.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},l.toString=function(){return this.join(" ")},o.defineProperty){var d={get:f,enumerable:!0,configurable:!0};try{o.defineProperty(i,e,d)}catch(p){p.number===-2146823252&&(d.enumerable=!1,o.defineProperty(i,e,d))}}else o[n].__defineGetter__&&i.__defineGetter__(e,f)}}(window.self))},{}],2:[function(t,e,n){(function(t){function n(t,e,n){function o(e){var n=v,i=m;return v=m=void 0,L=e,g=t.apply(i,n)}function r(t){return L=t,b=setTimeout(l,e),j?o(t):g}function u(t){var n=t-A,i=t-L,o=e-n;return _?E(o,y-i):o}function c(t){var n=t-A,i=t-L;return void 0===A||n>=e||n<0||_&&i>=y}function l(){var t=x();return c(t)?f(t):void(b=setTimeout(l,u(t)))}function f(t){return b=void 0,k&&v?o(t):(v=m=void 0,g)}function d(){void 0!==b&&clearTimeout(b),L=0,v=A=m=b=void 0}function p(){return void 0===b?g:f(x())}function h(){var t=x(),n=c(t);if(v=arguments,m=this,A=t,n){if(void 0===b)return r(A);if(_)return b=setTimeout(l,e),o(A)}return void 0===b&&(b=setTimeout(l,e)),g}var v,m,y,g,b,A,L=0,j=!1,_=!1,k=!0;if("function"!=typeof t)throw new TypeError(a);return e=s(e)||0,i(n)&&(j=!!n.leading,_="maxWait"in n,y=_?w(s(n.maxWait)||0,e):y,k="trailing"in n?!!n.trailing:k),h.cancel=d,h.flush=p,h}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function o(t){return!!t&&"object"==typeof t}function r(t){return"symbol"==typeof t||o(t)&&b.call(t)==c}function s(t){if("number"==typeof t)return t;if(r(t))return u;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(l,"");var n=d.test(t);return n||p.test(t)?h(t.slice(2),n?2:8):f.test(t)?u:+t}var a="Expected a function",u=NaN,c="[object Symbol]",l=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,p=/^0o[0-7]+$/i,h=parseInt,v="object"==typeof t&&t&&t.Object===Object&&t,m="object"==typeof self&&self&&self.Object===Object&&self,y=v||m||Function("return this")(),g=Object.prototype,b=g.toString,w=Math.max,E=Math.min,x=function(){return y.Date.now()};e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,e,n){!function(t){"use strict";var e=function(t){if(!t)throw new Error("Politespace requires an element argument.");t.getAttribute&&(this.element=t,this.type=this.element.getAttribute("type"),this.delimiter=this.element.getAttribute("data-delimiter")||" ",this.reverse=null!==this.element.getAttribute("data-reverse"),this.groupLength=this.element.getAttribute("data-grouplength")||3)};e.prototype._divideIntoArray=function(t){for(var e,n,i,o=(""+this.groupLength).split(","),r=1===o.length,s=[],a=0;o.length&&a<t.length;)e=r?o[0]:o.shift()||t.length-a,i=Math.min(parseInt(e,10),t.length-a),n=this.reverse?-1*(i+a):a,s.push(t.substr(n,i)),a+=i;return this.reverse&&s.reverse(),s},e.prototype.format=function(t){var e=this.unformat(t);return this._divideIntoArray(e).join(this.delimiter)},e.prototype.trimMaxlength=function(t){var e=this.element.getAttribute("maxlength");return e&&(t=t.substr(0,e)),t},e.prototype.getValue=function(){return this.trimMaxlength(this.element.value)},e.prototype.update=function(){this.element.value=this.useProxy()?this.getValue():this.format(this.getValue())},e.prototype.unformat=function(t){return t.replace(new RegExp(this.delimiter,"g"),"")},e.prototype.reset=function(){this.element.value=this.unformat(this.element.value)},e.prototype.useProxy=function(){return"number"===this.type},e.prototype.updateProxy=function(){var t;this.useProxy()&&(t=this.element.parentNode.firstChild,t.innerHTML=this.format(this.getValue()),t.style.width=this.element.offsetWidth+"px")},e.prototype.createProxy=function(){function t(t,e){return window.getComputedStyle(t,null).getPropertyValue(e)}function e(e,n){for(var i=0,o=0,r=n.length;o<r;o++)i+=parseFloat(t(e,n[o]));return i}if(this.useProxy()){var n=this.element.parentNode,i=document.createElement("div"),o=document.createElement("div");o.style.font=t(this.element,"font"),o.style.paddingLeft=e(this.element,["padding-left","border-left-width"])+"px",o.style.paddingRight=e(this.element,["padding-right","border-right-width"])+"px",o.style.top=e(this.element,["padding-top","border-top-width","margin-top"])+"px",i.appendChild(o),i.className="politespace-proxy active";var r=n.replaceChild(i,this.element);i.appendChild(r),this.updateProxy()}},t.Politespace=e}(this)},{}],4:[function(t,e,n){function i(t,e){var n="true"===t.getAttribute("aria-expanded");return this.hideAll(),n||this.show(t),!1}function o(t){var e=this;this.root=t;var n=r("button",this.root);n.forEach(function(t){t.attachEvent?t.attachEvent("onclick",i.bind(e,t)):t.addEventListener("click",i.bind(e,t))});var o=this.$("button[aria-expanded=true]")[0];this.hideAll(),void 0!==o&&this.show(o)}var r=t("../utils/select");o.prototype.$=function(t){return r(t,this.root)},o.prototype.hide=function(t){var e=t.getAttribute("aria-controls"),n=this.$("#"+e)[0];return t.setAttribute("aria-expanded",!1),n.setAttribute("aria-hidden",!0),this},o.prototype.show=function(t){var e=t.getAttribute("aria-controls"),n=this.$("#"+e)[0];return t.setAttribute("aria-expanded",!0),n.setAttribute("aria-hidden",!1),this},o.prototype.hideAll=function(){var t=this,e=this.$("ul > li > button, .usa-accordion-button");return e.forEach(function(e){t.hide(e)}),this},e.exports=o},{"../utils/select":24}],5:[function(t,e,n){function i(t){t.preventDefault?t.preventDefault():t.returnValue=!1;var e="true"===t.target.getAttribute("aria-expanded");this.classList.toggle("usa-banner-header-expanded",e)}function o(){var t=r(".usa-banner-header");t.forEach(function(t){var e=i.bind(t);r("[aria-controls]").forEach(function(t){s(t,"click",e)})})}var r=t("../utils/select"),s=t("../utils/dispatch");e.exports=o},{"../utils/dispatch":23,"../utils/select":24}],6:[function(t,e,n){function i(t){for(var e=t.parentNode.firstChild,n=[];e;)1==e.nodeType&&e!=t&&n.push(e),e=e.nextSibling;return n}var o=t("../utils/select"),r=t("../utils/dispatch"),s=function(){var t=this.parentNode,e=i(t);t.classList.remove("hidden"),e.forEach(function(t){t.classList.add("hidden")})},a=[];e.exports=function(){var t=o(".usa-footer-big nav ul"),e=o(".usa-footer-big nav .usa-footer-primary-link");a.length&&(a.forEach(function(t){t.off()}),a=[]),window.innerWidth<600?(t.forEach(function(t){t.classList.add("hidden")}),e.forEach(function(t){a.push(r(t,"click",s))})):t.forEach(function(t){t.classList.remove("hidden")})}},{"../utils/dispatch":23,"../utils/select":24}],7:[function(t,e,n){function i(t){var e=s(".usa-overlay, .usa-nav"),n=s(".usa-nav-close")[0];return e.forEach(function(t){t.classList.toggle("is-visible")}),document.body.classList.toggle("usa-mobile_nav-active"),n.focus(),!1}function o(){var t=s(".usa-menu-btn, .usa-overlay, .usa-nav-close");c=t.map(function(t){return a(t,u,i)})}function r(){for(;c.length;)c.pop().off()}var s=t("../utils/select"),a=t("../utils/dispatch"),u="ontouchstart"in document.documentElement?"touchstart":"click",c=[];e.exports=o,e.exports.off=r},{"../utils/dispatch":23,"../utils/select":24}],8:[function(t,e,n){function i(t){return l.hidden?s():(r(),h=m(document.body,g,o)),!1}function o(t){a(t.target)||(s(),h.off(),h=void 0)}function r(){l.classList.remove(y);var t=l.querySelector("[type=search]");t&&t.focus(),f.hidden=!0}function s(){l.classList.add(y),f.hidden=!1}function a(t){return l&&l.contains(t)||d&&d.contains(t)}function u(){l=v(".js-search-form")[0],f=v(".js-search-button")[0],d=v(".js-search-button-container")[0],s(),f&&l&&(p=m(f,g,i))}function c(){p&&p.off(),h&&h.off()}var l,f,d,p,h,v=t("../utils/select"),m=t("../utils/dispatch"),y="usa-sr-only",g="ontouchstart"in document.documentElement?"touchstart":"click";e.exports=u,e.exports.off=c},{"../utils/dispatch":23,"../utils/select":24}],9:[function(t,e,n){e.exports=function(t,e){t.forEach(function(t){t.setAttribute("autocapitalize","off"),t.setAttribute("autocorrect","off"),t.setAttribute("type",e?"password":"text")})}},{}],10:[function(t,e,n){function i(t){var e=t.split(" ");return e.map(function(t){return"#"+t}).join(", ")}function o(t){for(;t&&"FORM"!==t.tagName;)t=t.parentNode;return t}var r=t("./toggle-field-mask"),s=t("../utils/select"),a=function(t,e,n){var a=t.getAttribute("aria-controls");if(!a||0===a.trim().length)throw new Error("Did you forget to define selectors in the aria-controls attribute? Check element "+t.outerHTML);var u=i(a),c=o(t);if(!c)throw new Error("toggleFormInput() needs the supplied element to be inside a <form>. Check element "+t.outerHTML);var l=s(u,c),f=!1,d=function(i){i.preventDefault(),r(l,f),t.textContent=f?e:n,f=!f};t.attachEvent?t.attachEvent("onclick",d):t.addEventListener("click",d)};e.exports=a},{"../utils/select":24,"./toggle-field-mask":9}],11:[function(t,e,n){function i(t){if(t.hasAttributes()){for(var e={},n=t.attributes,i=n.length-1;i>=0;i--){var o=n[i].name.match(/data-(.*)/i);if(o&&o[1]){var r=o[1].replace(/-/,"");e[r]=n[i].value}}return e}}var o=t("../utils/select"),r=t("../utils/dispatch");e.exports=function(t){function e(){for(n in c)if(n.startsWith("validate")){s=n.split("validate")[1],a=new RegExp(c[n]),validatorSelector="[data-validator="+s+"]",u=o(validatorSelector,l)[0];var e=a.test(t.value);u.classList.toggle("usa-checklist-checked",e)}}var n,s,a,u,c=i(t),l=o(c.validationelement)[0];r(t,"keyup",e)}},{"../utils/dispatch":23,"../utils/select":24}],12:[function(t,e,n){var i=t("../utils/select"),o=t("../utils/when-dom-ready"),r=t("../components/accordion");o(function(){var t=i(".usa-accordion, .usa-accordion-bordered");t.forEach(function(t){new r(t)})})},{"../components/accordion":4,"../utils/select":24,"../utils/when-dom-ready":26}],13:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../components/banner");i(function(){o()})},{"../components/banner":5,"../utils/when-dom-ready":26}],14:[function(t,e,n){var i=t("lodash.debounce"),o=t("../utils/when-dom-ready"),r=t("../utils/dispatch"),s=t("../components/footer");o(function(){s(),r(window,"resize",i(s,180))})},{"../components/footer":6,"../utils/dispatch":23,"../utils/when-dom-ready":26,"lodash.debounce":2}],15:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../utils/select"),r=t("../components/validator"),s=t("../components/toggle-form-input");i(function(){var t=o(".usa-show_password")[0],e=o(".usa-show_multipassword")[0],n=o(".js-validate_password")[0];t&&s(t,"Show Password","Hide Password"),e&&s(e,"Show my typing","Hide my typing"),n&&r(n)})},{"../components/toggle-form-input":10,"../components/validator":11,"../utils/select":24,"../utils/when-dom-ready":26}],16:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../components/navigation");i(o)},{"../components/navigation":7,"../utils/when-dom-ready":26}],17:[function(t,e,n){var i=t("../utils/verify-jquery");if(i(window)){var o=window.jQuery,r=t("../../../node_modules/politespace/src/politespace").Politespace,s="politespace";o.fn[s]=function(){return this.each(function(){var t=new r(this);"number"===t.type&&t.createProxy(),o(this).bind("input keydown",function(){t.updateProxy()}).bind("blur",function(){o(this).closest(".politespace-proxy").addClass("active"),t.update(),t.updateProxy()}).bind("focus",function(){o(this).closest(".politespace-proxy").removeClass("active"),t.reset()}).data(s,t),t.update()})},o(function(){o("[data-"+s+"]").politespace()})}},{"../../../node_modules/politespace/src/politespace":3,"../utils/verify-jquery":25}],18:[function(t,e,n){t("../polyfills/element-hidden"),t("classlist-polyfill"),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){var n,i;if(null===this)throw new TypeError(" this is null or not defined");var o=Object(this),r=o.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),i=0;i<r;){var s;i in o&&(s=o[i],t.call(n,s,i,o)),i++}}),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,i=function(){},o=function(){return n.apply(this instanceof i?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),o.prototype=new i,o})},{"../polyfills/element-hidden":21,"classlist-polyfill":1}],19:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../components/search");i(o)},{"../components/search":8,"../utils/when-dom-ready":26}],20:[function(t,e,n){var i=t("../utils/dispatch"),o=t("../utils/select"),r=t("../utils/when-dom-ready");r(function(){var t=o(".skipnav")[0],e=o("#main-content")[0];t&&i(t,"click",function(){e.setAttribute("tabindex","0")}),e&&i(e,"blur",function(){e.setAttribute("tabindex","-1")})})},{"../utils/dispatch":23,"../utils/select":24,"../utils/when-dom-ready":26}],21:[function(t,e,n){var i=window.HTMLElement.prototype,o="hidden";o in i||Object.defineProperty(i,o,{get:function(){return this.hasAttribute(o)},set:function(t){t?this.setAttribute(o,""):this.removeAttribute(o)}})},{}],22:[function(t,e,n){"use strict";t("./initializers/polyfills"),t("./initializers/accordions"),t("./initializers/banner"),t("./initializers/footer"),t("./initializers/forms"),t("./initializers/navigation"),t("./initializers/politespace"),t("./initializers/search"),t("./initializers/skip-nav")},{"./initializers/accordions":12,"./initializers/banner":13,"./initializers/footer":14,"./initializers/forms":15,"./initializers/navigation":16,"./initializers/politespace":17,"./initializers/polyfills":18,"./initializers/search":19,"./initializers/skip-nav":20}],23:[function(t,e,n){e.exports=function(t,e,n,i){var o=e.split(/\s+/),r=function(t,e,n){t.attachEvent&&t.attachEvent("on"+e,n,i),t.addEventListener&&t.addEventListener(e,n,i)},s=function(t,e){var n;"createEvent"in document?(n=document.createEvent("HTMLEvents"),n.initEvent(e,!1,!0),t.dispatchEvent(n)):(n=document.createEventObject(),n.eventType=e,t.fireEvent("on"+t.eventType,n))},a=function(t,e,n){t.detachEvent&&t.detachEvent("on"+e,n,i),t.removeEventListener&&t.removeEventListener(e,n,i)};return o.forEach(function(e){r.call(null,t,e,n)}),{trigger:function(){s.call(null,t,o[0])},off:function(){o.forEach(function(e){a.call(null,t,e,n)})}}}},{}],24:[function(t,e,n){function i(t){return!!t&&"object"==typeof t&&1===t.nodeType}e.exports=function(t,e){if("string"!=typeof t)return[];void 0!==e&&i(e)||(e=window.document);var n=e.querySelectorAll(t);return Array.prototype.slice.call(n)}},{}],25:[function(t,e,n){e.exports=function(t){return t=t||window,!!(t.jQuery&&t.jQuery.fn&&t.jQuery.fn.jquery)}},{}],26:[function(t,e,n){function i(t){return"function"==typeof t}e.exports=function(t){"loading"!==document.readyState?i(t)&&t():document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&i(t)&&t()})}},{}]},{},[22]);
!function t(e,n,i){function o(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(t,e,n){"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))?!function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],o=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},u=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,o=n.length;i<o;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=u[n]=[],f=function(){return new u(this)};if(a[n]=Error[n],l.item=function(t){return this[t]||null},l.contains=function(t){return t+="",c(this,t)!==-1},l.add=function(){var t,e=arguments,n=0,i=e.length,o=!1;do t=e[n]+"",c(this,t)===-1&&(this.push(t),o=!0);while(++n<i);o&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,i=0,o=n.length,r=!1;do for(t=n[i]+"",e=c(this,t);e!==-1;)this.splice(e,1),r=!0,e=c(this,t);while(++i<o);r&&this._updateClassName()},l.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},l.toString=function(){return this.join(" ")},o.defineProperty){var d={get:f,enumerable:!0,configurable:!0};try{o.defineProperty(i,e,d)}catch(h){h.number===-2146823252&&(d.enumerable=!1,o.defineProperty(i,e,d))}}else o[n].__defineGetter__&&i.__defineGetter__(e,f)}}(window.self))},{}],2:[function(t,e,n){(function(t){function n(t,e,n){function o(e){var n=v,i=m;return v=m=void 0,A=e,g=t.apply(i,n)}function r(t){return A=t,b=setTimeout(l,e),k?o(t):g}function c(t){var n=t-L,i=t-A,o=e-n;return T?E(o,y-i):o}function u(t){var n=t-L,i=t-A;return void 0===L||n>=e||n<0||T&&i>=y}function l(){var t=x();return u(t)?f(t):void(b=setTimeout(l,c(t)))}function f(t){return b=void 0,O&&v?o(t):(v=m=void 0,g)}function d(){void 0!==b&&clearTimeout(b),A=0,v=L=m=b=void 0}function h(){return void 0===b?g:f(x())}function p(){var t=x(),n=u(t);if(v=arguments,m=this,L=t,n){if(void 0===b)return r(L);if(T)return b=setTimeout(l,e),o(L)}return void 0===b&&(b=setTimeout(l,e)),g}var v,m,y,g,b,L,A=0,k=!1,T=!1,O=!0;if("function"!=typeof t)throw new TypeError(a);return e=s(e)||0,i(n)&&(k=!!n.leading,T="maxWait"in n,y=T?w(s(n.maxWait)||0,e):y,O="trailing"in n?!!n.trailing:O),p.cancel=d,p.flush=h,p}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function o(t){return!!t&&"object"==typeof t}function r(t){return"symbol"==typeof t||o(t)&&b.call(t)==u}function s(t){if("number"==typeof t)return t;if(r(t))return c;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(l,"");var n=d.test(t);return n||h.test(t)?p(t.slice(2),n?2:8):f.test(t)?c:+t}var a="Expected a function",c=NaN,u="[object Symbol]",l=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,h=/^0o[0-7]+$/i,p=parseInt,v="object"==typeof t&&t&&t.Object===Object&&t,m="object"==typeof self&&self&&self.Object===Object&&self,y=v||m||Function("return this")(),g=Object.prototype,b=g.toString,w=Math.max,E=Math.min,x=function(){return y.Date.now()};e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,e,n){function i(t,e){var n="true"===t.getAttribute("aria-expanded");return this.hideAll(),n||this.show(t),!1}function o(t){var e=this;this.root=t;var n=r("button",this.root);n.forEach(function(t){t.attachEvent?t.attachEvent("onclick",i.bind(e,t)):t.addEventListener("click",i.bind(e,t))});var o=this.$("button[aria-expanded=true]")[0];this.hideAll(),void 0!==o&&this.show(o)}var r=t("../utils/select");o.prototype.$=function(t){return r(t,this.root)},o.prototype.hide=function(t){var e=t.getAttribute("aria-controls"),n=this.$("#"+e)[0];return t.setAttribute("aria-expanded",!1),n.setAttribute("aria-hidden",!0),this},o.prototype.show=function(t){var e=t.getAttribute("aria-controls"),n=this.$("#"+e)[0];return t.setAttribute("aria-expanded",!0),n.setAttribute("aria-hidden",!1),this},o.prototype.hideAll=function(){var t=this,e=this.$("ul > li > button, .usa-accordion-button");return e.forEach(function(e){t.hide(e)}),this},e.exports=o},{"../utils/select":22}],4:[function(t,e,n){function i(t){t.preventDefault?t.preventDefault():t.returnValue=!1,this.classList.toggle("usa-banner-header-expanded")}function o(){var t=r(".usa-banner-header");t.forEach(function(t){var e=i.bind(t);r("[aria-controls]",t).forEach(function(t){s(t,"click",e)})})}var r=t("../utils/select"),s=t("../utils/dispatch");e.exports=o},{"../utils/dispatch":21,"../utils/select":22}],5:[function(t,e,n){function i(t){for(var e=t.parentNode.firstChild,n=[];e;)1==e.nodeType&&e!=t&&n.push(e),e=e.nextSibling;return n}var o=t("../utils/select"),r=t("../utils/dispatch"),s=function(){var t=this.parentNode,e=i(t);t.classList.remove("hidden"),e.forEach(function(t){t.classList.add("hidden")})},a=[];e.exports=function(){var t=o(".usa-footer-big nav ul"),e=o(".usa-footer-big nav .usa-footer-primary-link");a.length&&(a.forEach(function(t){t.off()}),a=[]),window.innerWidth<600?(t.forEach(function(t){t.classList.add("hidden")}),e.forEach(function(t){a.push(r(t,"click",s))})):t.forEach(function(t){t.classList.remove("hidden")})}},{"../utils/dispatch":21,"../utils/select":22}],6:[function(t,e,n){function i(t){var e=s(".usa-overlay, .usa-nav"),n=s(".usa-nav-close")[0];return e.forEach(function(t){t.classList.toggle("is-visible")}),document.body.classList.toggle("usa-mobile_nav-active"),n.focus(),!1}function o(){var t=s(".usa-menu-btn, .usa-overlay, .usa-nav-close");u=t.map(function(t){return a(t,c,i)})}function r(){for(;u.length;)u.pop().off()}var s=t("../utils/select"),a=t("../utils/dispatch"),c="ontouchstart"in document.documentElement?"touchstart":"click",u=[];e.exports=o,e.exports.off=r},{"../utils/dispatch":21,"../utils/select":22}],7:[function(t,e,n){function i(t){return l.hidden?s():(r(),p=m(document.body,g,o)),!1}function o(t){a(t.target)||(s(),p.off(),p=void 0)}function r(){l.classList.remove(y);var t=l.querySelector("[type=search]");t&&t.focus(),f.hidden=!0}function s(){l.classList.add(y),f.hidden=!1}function a(t){return l&&l.contains(t)||d&&d.contains(t)}function c(){l=v(".js-search-form")[0],f=v(".js-search-button")[0],d=v(".js-search-button-container")[0],f&&l&&(s(),h=m(f,g,i))}function u(){h&&h.off(),p&&p.off()}var l,f,d,h,p,v=t("../utils/select"),m=t("../utils/dispatch"),y="usa-sr-only",g="ontouchstart"in document.documentElement?"touchstart":"click";e.exports=c,e.exports.off=u},{"../utils/dispatch":21,"../utils/select":22}],8:[function(t,e,n){e.exports=function(t,e){t.forEach(function(t){t.setAttribute("autocapitalize","off"),t.setAttribute("autocorrect","off"),t.setAttribute("type",e?"password":"text")})}},{}],9:[function(t,e,n){function i(t){var e=t.split(" ");return e.map(function(t){return"#"+t}).join(", ")}function o(t){for(;t&&"FORM"!==t.tagName;)t=t.parentNode;return t}var r=t("./toggle-field-mask"),s=t("../utils/select"),a=function(t,e,n){var a=t.getAttribute("aria-controls");if(!a||0===a.trim().length)throw new Error("Did you forget to define selectors in the aria-controls attribute? Check element "+t.outerHTML);var c=i(a),u=o(t);if(!u)throw new Error("toggleFormInput() needs the supplied element to be inside a <form>. Check element "+t.outerHTML);var l=s(c,u),f=!1,d=function(i){i.preventDefault(),r(l,f),t.textContent=f?e:n,f=!f};t.attachEvent?t.attachEvent("onclick",d):t.addEventListener("click",d)};e.exports=a},{"../utils/select":22,"./toggle-field-mask":8}],10:[function(t,e,n){function i(t){if(t.hasAttributes()){for(var e={},n=t.attributes,i=n.length-1;i>=0;i--){var o=n[i].name.match(/data-(.*)/i);if(o&&o[1]){var r=o[1].replace(/-/,"");e[r]=n[i].value}}return e}}var o=t("../utils/select"),r=t("../utils/dispatch");e.exports=function(t){function e(){for(n in u)if(n.startsWith("validate")){s=n.split("validate")[1],a=new RegExp(u[n]),validatorSelector="[data-validator="+s+"]",c=o(validatorSelector,l)[0];var e=a.test(t.value);c.classList.toggle("usa-checklist-checked",e)}}var n,s,a,c,u=i(t),l=o(u.validationelement)[0];r(t,"keyup",e)}},{"../utils/dispatch":21,"../utils/select":22}],11:[function(t,e,n){var i=t("../utils/select"),o=t("../utils/when-dom-ready"),r=t("../components/accordion");o(function(){var t=i(".usa-accordion, .usa-accordion-bordered");t.forEach(function(t){new r(t)})})},{"../components/accordion":3,"../utils/select":22,"../utils/when-dom-ready":23}],12:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../components/banner");i(function(){o()})},{"../components/banner":4,"../utils/when-dom-ready":23}],13:[function(t,e,n){var i=t("lodash.debounce"),o=t("../utils/when-dom-ready"),r=t("../utils/dispatch"),s=t("../components/footer");o(function(){s(),r(window,"resize",i(s,180))})},{"../components/footer":5,"../utils/dispatch":21,"../utils/when-dom-ready":23,"lodash.debounce":2}],14:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../utils/select"),r=t("../components/validator"),s=t("../components/toggle-form-input");i(function(){var t=o(".usa-show_password")[0],e=o(".usa-show_multipassword")[0],n=o(".js-validate_password")[0];t&&s(t,"Show Password","Hide Password"),e&&s(e,"Show my typing","Hide my typing"),n&&r(n)})},{"../components/toggle-form-input":9,"../components/validator":10,"../utils/select":22,"../utils/when-dom-ready":23}],15:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../components/navigation");i(o)},{"../components/navigation":6,"../utils/when-dom-ready":23}],16:[function(t,e,n){t("../polyfills/element-hidden"),t("classlist-polyfill"),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){var n,i;if(null===this)throw new TypeError(" this is null or not defined");var o=Object(this),r=o.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(n=e),i=0;i<r;){var s;i in o&&(s=o[i],t.call(n,s,i,o)),i++}}),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,i=function(){},o=function(){return n.apply(this instanceof i?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),o.prototype=new i,o})},{"../polyfills/element-hidden":19,"classlist-polyfill":1}],17:[function(t,e,n){var i=t("../utils/when-dom-ready"),o=t("../components/search");i(o)},{"../components/search":7,"../utils/when-dom-ready":23}],18:[function(t,e,n){var i=t("../utils/dispatch"),o=t("../utils/select"),r=t("../utils/when-dom-ready");r(function(){var t=o(".skipnav")[0],e=o("#main-content")[0];t&&i(t,"click",function(){e.setAttribute("tabindex","0")}),e&&i(e,"blur",function(){e.setAttribute("tabindex","-1")})})},{"../utils/dispatch":21,"../utils/select":22,"../utils/when-dom-ready":23}],19:[function(t,e,n){var i=window.HTMLElement.prototype,o="hidden";o in i||Object.defineProperty(i,o,{get:function(){return this.hasAttribute(o)},set:function(t){t?this.setAttribute(o,""):this.removeAttribute(o)}})},{}],20:[function(t,e,n){"use strict";t("./initializers/polyfills"),t("./initializers/accordions"),t("./initializers/banner"),t("./initializers/footer"),t("./initializers/forms"),t("./initializers/navigation"),t("./initializers/search"),t("./initializers/skip-nav")},{"./initializers/accordions":11,"./initializers/banner":12,"./initializers/footer":13,"./initializers/forms":14,"./initializers/navigation":15,"./initializers/polyfills":16,"./initializers/search":17,"./initializers/skip-nav":18}],21:[function(t,e,n){e.exports=function(t,e,n,i){var o=e.split(/\s+/),r=function(t,e,n){t.attachEvent&&t.attachEvent("on"+e,n,i),t.addEventListener&&t.addEventListener(e,n,i)},s=function(t,e){var n;"createEvent"in document?(n=document.createEvent("HTMLEvents"),n.initEvent(e,!1,!0),t.dispatchEvent(n)):(n=document.createEventObject(),n.eventType=e,t.fireEvent("on"+t.eventType,n))},a=function(t,e,n){t.detachEvent&&t.detachEvent("on"+e,n,i),t.removeEventListener&&t.removeEventListener(e,n,i)};return o.forEach(function(e){r.call(null,t,e,n)}),{trigger:function(){s.call(null,t,o[0])},off:function(){o.forEach(function(e){a.call(null,t,e,n)})}}}},{}],22:[function(t,e,n){function i(t){return!!t&&"object"==typeof t&&1===t.nodeType}e.exports=function(t,e){if("string"!=typeof t)return[];void 0!==e&&i(e)||(e=window.document);var n=e.querySelectorAll(t);return Array.prototype.slice.call(n)}},{}],23:[function(t,e,n){function i(t){return"function"==typeof t}e.exports=function(t){"loading"!==document.readyState?i(t)&&t():document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&i(t)&&t()})}},{}]},{},[20]);
//# sourceMappingURL=uswds.min.js.map

@@ -13,14 +13,10 @@ ## A few parts of this project are not in the public domain

The files in `src/stylesheets/_scss/lib/bourbon` are from [Bourbon](http://bourbon.io/), copyright [thoughtbot](https://thoughtbot.com/), inc., under the [MIT license](https://github.com/thoughtbot/neat/blob/master/LICENSE.md).
The files in `src/stylesheets/lib` are from:
The files in `src/stylesheets/_scss/lib/neat` are from [Neat](http://neat.bourbon.io/), copyright [thoughtbot](https://thoughtbot.com/), inc., also under the [MIT license](https://github.com/thoughtbot/neat/blob/master/LICENSE.md).
* [Bourbon](http://bourbon.io/), copyright [thoughtbot](https://thoughtbot.com/), inc., under the [MIT license](https://github.com/thoughtbot/neat/blob/master/LICENSE.md).
* [Neat](http://neat.bourbon.io/), copyright [thoughtbot](https://thoughtbot.com/), inc., also under the [MIT license](https://github.com/thoughtbot/neat/blob/master/LICENSE.md).
* [Normalize.css](https://github.com/necolas/normalize.css), copyright Nicolas Gallagher and Jonathan Neal, under the [MIT license](https://github.com/necolas/normalize.css/blob/master/LICENSE.md).
The file `src/stylesheets/css/normalize.min.css` is from [Normalize.css](https://github.com/necolas/normalize.css), copyright Nicolas Gallagher and Jonathan Neal, under the [MIT license](https://github.com/necolas/normalize.css/blob/master/LICENSE.md).
The file `src/js/initializers/component.js` includes `politespace.js` from [Politespace](https://github.com/filamentgroup/politespace), copyright Zach Leatherman, under the [MIT license](https://github.com/filamentgroup/politespace/blob/master/LICENSE).
The file `src/js/vendor/html5shiv.js` is from [HTML5 Shiv](https://github.com/afarkas/html5shiv), copyright Alexander Farkas (aFarkas), under the [MIT license](https://github.com/aFarkas/html5shiv/blob/master/MIT%20and%20GPL2%20licenses.md).
The file `src/js/vendor/jquery-1.11.3.min.js` is from [jQuery](https://jquery.com/), copyright The jQuery Foundation, under the [MIT license](https://jquery.org/license/).
The file `src/js/vendor/rem.min.js` is from [REM unit polyfill](https://github.com/chuckcarpenter/REM-unit-polyfill), copyright Chuck Carpenter, under the [MIT license](https://github.com/chuckcarpenter/REM-unit-polyfill/blob/master/LICENSE.md).

@@ -32,4 +28,2 @@

The files `docs/assets/js/vendor/prism.js` and `assets-styleguide/css/prism.css` are from [Prism](http://prismjs.com/), copyright Lea Verou, under the [MIT license](https://github.com/PrismJS/prism/blob/gh-pages/LICENSE).
#### Full license text for the MIT licensed files:

@@ -36,0 +30,0 @@

{
"name": "uswds",
"version": "0.13.3",
"version": "0.14.0",
"description": "Open source UI components and visual style guide for U.S. government websites",

@@ -36,12 +36,9 @@ "main": "src/js/start.js",

"bourbon": "^4.2.6",
"bourbon-neat": "^1.7.3",
"bourbon-neat": "github:thoughtbot/neat#neat-1.8.0-node-sass",
"classlist-polyfill": "^1.0.3",
"cross-spawn": "^2.1.5",
"jquery": "^2.2.0",
"normalize.css": "^3.0.3",
"politespace": "0.1.4",
"prismjs": "^1.5.1"
"normalize.css": "^3.0.3"
},
"devDependencies": {
"@18f/stylelint-rules": "^1.0.1",
"@18f/stylelint-rules": "^1.2.0",
"browserify": "^13.0.0",

@@ -63,2 +60,3 @@ "del": "^2.2.0",

"gulp-zip": "^3.1.0",
"jquery": "^2.2.0",
"jsdom": "^9.0.0",

@@ -65,0 +63,0 @@ "jsdom-global": "^2.1.0",

@@ -41,3 +41,3 @@ # Draft U.S. Web Design Standards

* Developers: [Follow the instructions in this README to get started.](#using-the-standards)
* [CSS, JavaScript, image, and font files of all the assets on this site are available for download](https://github.com/18F/web-design-standards/releases/download/v0.13.3/uswds-0.13.3.zip).
* [CSS, JavaScript, image, and font files of all the assets on this site are available for download](https://github.com/18F/web-design-standards/releases/download/v0.14.0/uswds-0.14.0.zip).

@@ -57,3 +57,3 @@ ## Using the Standards

1. Download the [Standards zip file](https://github.com/18F/web-design-standards/releases/download/v0.13.3/uswds-0.13.3.zip) and open that file.
1. Download the [Standards zip file](https://github.com/18F/web-design-standards/releases/download/v0.14.0/uswds-0.14.0.zip) and open that file.

@@ -63,3 +63,3 @@ After extracting the zip file you should see the following file and folder structure:

```
uswds-0.13.3/
uswds-0.14.0/
├── js/

@@ -82,3 +82,3 @@ │   ├── uswds.min.js.map

├── assets/
│   ├── uswds-0.13.3/
│   ├── uswds-0.14.0/
│   ├── stylesheets/

@@ -103,7 +103,7 @@ │   ├── images/

<title>My Example Project</title>
<link rel="stylesheet" href="assets/uswds-0.13.3/css/uswds.min.css">
<link rel="stylesheet" href="assets/uswds-0.14.0/css/uswds.min.css">
</head>
<body>
<script src="assets/uswds-0.13.3/js/uswds.min.js"></script>
<script src="assets/uswds-0.14.0/js/uswds.min.js"></script>
</body>

@@ -110,0 +110,0 @@ </html>

var select = require('../utils/select');
var dispatch = require('../utils/dispatch');
function headerClickHandler (event) {
function bannerClickHandler (event) {
(event.preventDefault) ? event.preventDefault() : event.returnValue = false;
var expanded = event.target.getAttribute('aria-expanded') === 'true';
this.classList.toggle('usa-banner-header-expanded', expanded);
this.classList.toggle('usa-banner-header-expanded');
}
function bannerInit () {
var headers = select('.usa-banner-header');
var banners = select('.usa-banner-header');
headers.forEach(function (header) {
var headerClick = headerClickHandler.bind(header);
select('[aria-controls]').forEach(function (button) {
dispatch(button, 'click', headerClick);
banners.forEach(function (banner) {
var bannerClick = bannerClickHandler.bind(banner);
select('[aria-controls]', banner).forEach(function (button) {
dispatch(button, 'click', bannerClick);
});

@@ -19,0 +18,0 @@ });

@@ -60,5 +60,4 @@ var select = require('../utils/select');

closeSearch();
if (searchButton && searchForm) {
closeSearch();
activateDispatcher = dispatch(searchButton, clickEvent, searchButtonClickHandler);

@@ -65,0 +64,0 @@ }

@@ -14,4 +14,3 @@ 'use strict';

require('./initializers/navigation');
require('./initializers/politespace');
require('./initializers/search');
require('./initializers/skip-nav');

@@ -32,2 +32,3 @@ # Website and applications that use the Standards

- Digital Contracting Cookbook
- [EPA.gov](https://www.epa.gov/home/updates-epagovs-look)
- [EPA e-manifest form](https://e-manifest.18f.gov/)

@@ -53,2 +54,3 @@ - [EPA eRegs Notice & Comment](https://epa-notice.usa.gov/)

- [GSA Open IAE](http://gsa.github.io/openIAE/)
- [GSA Presents: Grace Hopper Day Hackathon!](http://open.gsa.gov/grace-hopper-hackathon/)
- [Hack the Pay Gap](https://paygap.pif.gov/)

@@ -55,0 +57,0 @@ - Internal Revenue Service

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc