@department-of-veterans-affairs/component-library 54.4.1 → 54.4.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.
- package/Modal.js +1 -1
- package/Modal.unit.spec.js +1 -1
- package/contacts.js +1 -1
- package/dist/1339.app.bundle.js +1 -1
- package/dist/1351.app.bundle.js +1 -1
- package/dist/2387.app.bundle.js +1 -1
- package/dist/2654.app.bundle.js +1 -1
- package/dist/2664.app.bundle.js +1 -1
- package/dist/2801.app.bundle.js +1 -1
- package/dist/3126.app.bundle.js +1 -1
- package/dist/4064.app.bundle.js +1 -1
- package/dist/4117.app.bundle.js +1 -1
- package/dist/4140.app.bundle.js +1 -1
- package/dist/4708.app.bundle.js +1 -1
- package/dist/4715.app.bundle.js +1 -1
- package/dist/5019.app.bundle.js +1 -1
- package/dist/5155.app.bundle.js +1 -1
- package/dist/5189.app.bundle.js +1 -1
- package/dist/5306.app.bundle.js +1 -1
- package/dist/5699.app.bundle.js +1 -1
- package/dist/6034.app.bundle.js +1 -1
- package/dist/6246.app.bundle.js +1 -1
- package/dist/6349.app.bundle.js +1 -1
- package/dist/641.app.bundle.js +1 -1
- package/dist/6527.app.bundle.js +1 -1
- package/dist/6633.app.bundle.js +1 -1
- package/dist/6683.app.bundle.js +1 -1
- package/dist/6771.app.bundle.js +1 -1
- package/dist/712.app.bundle.js +1 -1
- package/dist/7367.app.bundle.js +1 -1
- package/dist/7531.app.bundle.js +1 -1
- package/dist/7663.app.bundle.js +1 -1
- package/dist/7814.app.bundle.js +1 -1
- package/dist/7821.app.bundle.js +1 -1
- package/dist/8175.app.bundle.js +1 -1
- package/dist/82.app.bundle.js +1 -1
- package/dist/8206.app.bundle.js +1 -1
- package/dist/8495.app.bundle.js +1 -1
- package/dist/8762.app.bundle.js +1 -1
- package/dist/8859.app.bundle.js +1 -1
- package/dist/890.app.bundle.js +1 -1
- package/dist/9288.app.bundle.js +1 -1
- package/dist/9755.app.bundle.js +1 -1
- package/dist/9794.app.bundle.js +1 -1
- package/dist/9800.app.bundle.js +1 -1
- package/dist/9915.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-0311e4e3.js +1 -0
- package/dist/components/p-067d7618.js +1 -0
- package/dist/components/p-3962731f.js +1 -0
- package/dist/components/p-40738d84.js +1 -0
- package/dist/components/p-494b538e.js +1 -0
- package/dist/components/p-6a3cf3d7.js +1 -0
- package/dist/components/p-6b349d85.js +1 -0
- package/dist/components/p-6e4b9401.js +1 -0
- package/dist/components/p-70a619e9.js +1 -0
- package/dist/components/p-7129443f.js +1 -0
- package/dist/components/p-784bed9b.js +1 -0
- package/dist/components/p-a12014b1.js +1 -0
- package/dist/components/{index2.js → p-a5dce9e6.js} +1 -1
- package/dist/components/p-a836c3e1.js +1 -0
- package/dist/components/{parsePhoneNumber_.js → p-b276cef8.js} +1 -1
- package/dist/components/p-b92d2c38.js +1 -0
- package/dist/components/p-bac94659.js +1 -0
- package/dist/components/p-bea05aab.js +1 -0
- package/dist/components/p-c3fdb782.js +1 -0
- package/dist/components/p-ce1b8abc.js +1 -0
- package/dist/components/p-cf580be9.js +1 -0
- package/dist/components/p-d20739b4.js +20 -0
- package/dist/components/p-d4b7abf9.js +1 -0
- package/dist/components/p-d9f21f0d.js +1 -0
- package/dist/components/p-dffbc03b.js +1 -0
- package/dist/components/p-e1092a04.js +1 -0
- package/dist/components/p-ef5c0d66.js +1 -0
- package/dist/components/p-f3a1dcd5.js +1 -0
- package/dist/components/p-fda59844.js +1 -0
- package/dist/components/types/index.d.ts +2 -0
- package/dist/components/va-accordion-item.js +1 -1
- package/dist/components/va-accordion.js +1 -1
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-alert-sign-in.js +1 -1
- package/dist/components/va-alert.js +1 -1
- package/dist/components/va-back-to-top.js +1 -1
- package/dist/components/va-banner.js +1 -1
- package/dist/components/va-breadcrumbs.js +1 -1
- package/dist/components/va-button-icon.js +1 -1
- package/dist/components/va-button-pair.js +1 -1
- package/dist/components/va-button-segmented.js +1 -1
- package/dist/components/va-button.js +1 -1
- package/dist/components/va-card.js +1 -1
- package/dist/components/va-checkbox-group.js +1 -1
- package/dist/components/va-checkbox.js +1 -1
- package/dist/components/va-combo-box.js +1 -1
- package/dist/components/va-crisis-line-modal.js +1 -1
- package/dist/components/va-critical-action.js +1 -1
- package/dist/components/va-date.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input.js +1 -1
- package/dist/components/va-header-minimal.js +1 -1
- package/dist/components/va-icon.js +1 -1
- package/dist/components/va-language-toggle.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-link.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-maintenance-banner.js +1 -1
- package/dist/components/va-memorable-date.js +1 -1
- package/dist/components/va-minimal-footer.js +1 -1
- package/dist/components/va-modal.js +1 -1
- package/dist/components/va-need-help.js +1 -1
- package/dist/components/va-notification.js +1 -1
- package/dist/components/va-official-gov-banner.js +1 -1
- package/dist/components/va-omb-info.js +1 -1
- package/dist/components/va-on-this-page.js +1 -1
- package/dist/components/va-pagination.js +1 -1
- package/dist/components/va-privacy-agreement.js +1 -1
- package/dist/components/va-process-list-item.js +1 -1
- package/dist/components/va-process-list.js +1 -1
- package/dist/components/va-progress-bar.js +1 -1
- package/dist/components/va-promo-banner.js +1 -1
- package/dist/components/va-radio-option.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-filter.js +1 -1
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-segmented-progress-bar.js +1 -1
- package/dist/components/va-select.js +1 -1
- package/dist/components/va-service-list-item.js +1 -1
- package/dist/components/va-sidenav-item.js +1 -1
- package/dist/components/va-sidenav-submenu.js +1 -1
- package/dist/components/va-sidenav.js +1 -1
- package/dist/components/va-statement-of-truth.js +1 -1
- package/dist/components/va-summary-box.js +1 -1
- package/dist/components/va-tab-item.js +1 -1
- package/dist/components/va-tab-panel.js +1 -1
- package/dist/components/va-table-inner.js +1 -1
- package/dist/components/va-table-row.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-tabs.js +1 -1
- package/dist/components/va-tag-status.js +1 -1
- package/dist/components/va-telephone-input.js +1 -1
- package/dist/components/va-telephone.js +1 -1
- package/dist/components/va-text-input.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/dist/react-bindings/components.d.ts +336 -0
- package/dist/react-bindings/components.js +1 -0
- package/dist/react-bindings/components.js.map +1 -0
- package/dist/react-bindings/components.ts +961 -0
- package/dist/react-bindings/index.d.ts +6 -67
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +6 -75
- package/format-date.js +1 -1
- package/format-date.unit.spec.js +1 -1
- package/package.json +3 -2
- package/test-helpers.js +1 -1
- package/utilities.unit.spec.js +1 -1
- package/validations.js +1 -1
- package/dist/components/contacts.js +0 -1
- package/dist/components/date-utils.js +0 -1
- package/dist/components/i18next.js +0 -1
- package/dist/components/utils.js +0 -1
- package/dist/components/va-accordion-item2.js +0 -1
- package/dist/components/va-accordion2.js +0 -1
- package/dist/components/va-alert2.js +0 -1
- package/dist/components/va-button-icon2.js +0 -1
- package/dist/components/va-button2.js +0 -1
- package/dist/components/va-card2.js +0 -1
- package/dist/components/va-checkbox-group2.js +0 -1
- package/dist/components/va-checkbox2.js +0 -1
- package/dist/components/va-combo-box2.js +0 -20
- package/dist/components/va-crisis-line-modal2.js +0 -1
- package/dist/components/va-critical-action2.js +0 -1
- package/dist/components/va-file-input2.js +0 -1
- package/dist/components/va-icon2.js +0 -1
- package/dist/components/va-link2.js +0 -1
- package/dist/components/va-modal2.js +0 -1
- package/dist/components/va-official-gov-banner2.js +0 -1
- package/dist/components/va-progress-bar2.js +0 -1
- package/dist/components/va-select2.js +0 -1
- package/dist/components/va-table-inner2.js +0 -1
- package/dist/components/va-telephone2.js +0 -1
- package/dist/components/va-text-input2.js +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.d.ts +0 -10
- package/dist/react-bindings/react-component-lib/createComponent.js +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.js.map +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.tsx +0 -106
- package/dist/react-bindings/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/dist/react-bindings/react-component-lib/createOverlayComponent.js +0 -1
- package/dist/react-bindings/react-component-lib/createOverlayComponent.js.map +0 -1
- package/dist/react-bindings/react-component-lib/createOverlayComponent.tsx +0 -142
- package/dist/react-bindings/react-component-lib/index.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/index.js +0 -1
- package/dist/react-bindings/react-component-lib/index.js.map +0 -1
- package/dist/react-bindings/react-component-lib/index.ts +0 -2
- package/dist/react-bindings/react-component-lib/interfaces.d.ts +0 -29
- package/dist/react-bindings/react-component-lib/interfaces.js +0 -1
- package/dist/react-bindings/react-component-lib/interfaces.js.map +0 -1
- package/dist/react-bindings/react-component-lib/interfaces.ts +0 -34
- package/dist/react-bindings/react-component-lib/utils/attachProps.d.ts +0 -16
- package/dist/react-bindings/react-component-lib/utils/attachProps.js +0 -2
- package/dist/react-bindings/react-component-lib/utils/attachProps.js.LICENSE.txt +0 -4
- package/dist/react-bindings/react-component-lib/utils/attachProps.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/attachProps.ts +0 -125
- package/dist/react-bindings/react-component-lib/utils/case.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/utils/case.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/case.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/case.ts +0 -7
- package/dist/react-bindings/react-component-lib/utils/dev.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/utils/dev.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/dev.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/dev.ts +0 -14
- package/dist/react-bindings/react-component-lib/utils/index.d.ts +0 -10
- package/dist/react-bindings/react-component-lib/utils/index.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/index.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/index.tsx +0 -50
- /package/dist/components/{index2.js.LICENSE.txt → p-a5dce9e6.js.LICENSE.txt} +0 -0
- /package/dist/components/{va-combo-box2.js.LICENSE.txt → p-d20739b4.js.LICENSE.txt} +0 -0
package/Modal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(require("react")),_classnames=_interopRequireDefault(require("classnames")),_reactFocusOn=require("react-focus-on"),_analytics=_interopRequireDefault(require("./analytics"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function
|
|
1
|
+
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(require("react")),_classnames=_interopRequireDefault(require("classnames")),_reactFocusOn=require("react-focus-on"),_analytics=_interopRequireDefault(require("./analytics"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _callSuper(e,t,o){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,o||[],_getPrototypeOf(e).constructor):t.apply(e,o))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}var ESCAPE_KEY=27,Modal=function(){function e(t){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t])).handleDocumentKeyDown=o.handleDocumentKeyDown.bind(o),o.handleClose=o.handleClose.bind(o),o.handleDocumentClicked=o.handleDocumentClicked.bind(o),o}return _inherits(e,_react.default.Component),_createClass(e,[{key:"componentDidMount",value:function(){this.props.visible&&this.setupModal()}},{key:"componentDidUpdate",value:function(e){!e.visible&&this.props.visible?this.setupModal():e.visible&&!this.props.visible&&this.teardownModal()}},{key:"componentWillUnmount",value:function(){this.props.visible&&this.teardownModal()}},{key:"setupModal",value:function(){var e,t;this.setInitialModalFocus(),document.body.classList.add("modal-open"),document.addEventListener("keydown",this.handleDocumentKeyDown,!1),this.props.clickToClose&&document.addEventListener("click",this.handleDocumentClicked,!0),this.props.disableAnalytics||(0,_analytics.default)({componentName:"Modal",action:"show",details:{status:this.props.status,title:this.props.title,primaryButtonText:null===(e=this.props.primaryButton)||void 0===e?void 0:e.text,secondaryButtonText:null===(t=this.props.secondaryButton)||void 0===t?void 0:t.text}})}},{key:"teardownModal",value:function(){document.body.classList.remove("modal-open"),document.removeEventListener("keydown",this.handleDocumentKeyDown,!1),this.props.clickToClose&&document.removeEventListener("click",this.handleDocumentClicked,!0)}},{key:"handleDocumentKeyDown",value:function(e){e.keyCode===ESCAPE_KEY&&this.handleClose(e)}},{key:"handleClose",value:function(e){e.preventDefault(),this.props.onClose()}},{key:"handleDocumentClicked",value:function(e){this.props.visible&&!this.element.contains(e.target)&&this.props.onClose()}},{key:"setInitialModalFocus",value:function(){if(this.props.initialFocusSelector){var e=this.element.querySelector(this.props.initialFocusSelector);e&&e.setAttribute("data-autofocus","true")}}},{key:"renderAlertActions",value:function(){var e=this.props,t=e.primaryButton,o=e.secondaryButton;return t||o?_react.default.createElement("div",{className:"alert-actions"},t&&_react.default.createElement("button",{className:"usa-button",onClick:t.action},t.text),o&&_react.default.createElement("button",{className:"usa-button-secondary",onClick:o.action},o.text)):null}},{key:"render",value:function(){var e=this;if(!this.props.visible)return null;var t=this.props,o=t.id,r=t.status,n=t.title,a="".concat(o||"va-modal","-title"),i=this.props.contents||this.props.children,l=(0,_classnames.default)("va-modal",this.props.cssClass),s=(0,_classnames.default)("va-modal-inner",_defineProperty(_defineProperty({"usa-alert":r},"usa-alert-".concat(r),r),"va-modal-alert",r)),c=r?"usa-alert-body":"va-modal-body",u=(0,_classnames.default)(r?"usa-alert-heading":"va-modal-title","vads-u-font-size--h3"),d=(0,_classnames.default)({"usa-alert-text":r}),p=n?"close ".concat(n," modal"):"close modal",f=!this.props.hideCloseButton&&_react.default.createElement("button",{className:"va-modal-close",type:"button","aria-label":p,onClick:this.handleClose},_react.default.createElement("i",{className:"fas fa-times-circle","aria-hidden":"true"}));return _react.default.createElement(_reactFocusOn.FocusOn,{returnFocus:!0},_react.default.createElement("div",{className:l,id:o,role:function(e){return"warning"===e||"error"===e?"alertdialog":"dialog"}(r),"aria-labelledby":a,"aria-modal":!0},_react.default.createElement("div",{className:s,ref:function(t){e.element=t}},f,_react.default.createElement("div",{className:c},_react.default.createElement("div",{role:"document"},n&&_react.default.createElement("h1",{id:a,className:u,tabIndex:"-1"},n),i&&_react.default.createElement("div",{className:d},i)),this.renderAlertActions()))))}}])}();Modal.defaultProps={visible:!1,clickToClose:!1,focusSelector:"button, input, select, a"};var _default=exports.default=Modal;
|
package/Modal.unit.spec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _react=_interopRequireDefault(require("react")),_sinon=_interopRequireDefault(require("sinon")),_enzyme=require("enzyme"),_chai=require("chai"),_testHelpers=require("./test-helpers"),_Modal=_interopRequireDefault(require("./Modal.jsx"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}describe("<Modal/>",
|
|
1
|
+
"use strict";var _react=_interopRequireDefault(require("react")),_sinon=_interopRequireDefault(require("sinon")),_enzyme=require("enzyme"),_chai=require("chai"),_testHelpers=require("./test-helpers"),_Modal=_interopRequireDefault(require("./Modal.jsx"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}describe("<Modal/>",function(){it("should render",function(){var e=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",title:"Modal title",visible:!0,onClose:function(){}},"Modal contents"));(0,_chai.expect)(e.text()).to.contain("Modal contents"),e.unmount()}),it("should have an <h1> as the heading",function(){var e=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{title:"Modal title",visible:!0,onClose:function(){}},"Some content"));(0,_chai.expect)(e.find("h1").text()).to.equal("Modal title"),e.unmount()}),describe("event listeners",function(){var e,t=function(e,t){return e.filter(function(e){return e.firstArg===t})};before(function(){_sinon.default.spy(global.document,"addEventListener"),_sinon.default.spy(global.document,"removeEventListener")}),after(function(){global.document.addEventListener.restore(),global.document.removeEventListener.restore()}),it("should set up a keydown and a click listener",function(){e=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",title:"Modal title",visible:!0,clickToClose:!0,onClose:function(){}},"Modal contents"));var n=global.document.addEventListener.getCalls();(0,_chai.expect)(t(n,"keydown").length).to.be.at.least(1),(0,_chai.expect)(t(n,"click").length).to.be.at.least(1)}),it("should tear down keydown and click listeners when the modal is closed",function(){e.unmount();var n=global.document.removeEventListener.getCalls();(0,_chai.expect)(t(n,"keydown").length).to.be.at.least(1),(0,_chai.expect)(t(n,"click").length).to.be.at.least(1)})}),it("should pass aXe check",function(){return(0,_testHelpers.axeCheck)(_react.default.createElement(_Modal.default,{id:"modal",title:"aXe Check",visible:!0,onClose:function(){}}))}),describe("programmatic focus",function(){var e;before(function(){e=document.createElement("div"),global.document.body.appendChild(e)}),after(function(){global.document.body.removeChild(e)}),it("should open with focus assigned to the close button",function(){var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",title:"Programmatic focus",visible:!0,onClose:function(){}},_react.default.createElement("button",{id:"first-button"},"First button"),_react.default.createElement("button",{id:"second-button"},"Second button")),{attachTo:e});(0,_chai.expect)(global.document.activeElement.className).to.equal("va-modal-close"),t.unmount()}),it("should open with focus assigned to the first button when the close button is turned off",function(){var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",title:"Programmatic focus",visible:!0,hideCloseButton:!0,onClose:function(){}},_react.default.createElement("button",{id:"first-button"},"First button"),_react.default.createElement("button",{id:"second-button"},"Second button")),{attachTo:e});(0,_chai.expect)(global.document.activeElement.id).to.equal("first-button"),t.unmount()}),it("should start on the first element matching initialFocusSelector if specified",function(){var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",title:"My modal",visible:!0,hideCloseButton:!0,onClose:function(){},initialFocusSelector:"#second-button"},_react.default.createElement("button",{id:"first-button"},"First button"),_react.default.createElement("button",{id:"second-button"},"Second button")),{attachTo:e});(0,_chai.expect)(global.document.activeElement.id).to.equal("second-button"),t.unmount()}),it("should include the title in the close button aria label if given",function(){var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",title:"Programmatic focus",visible:!0,onClose:function(){}},_react.default.createElement("button",{id:"first-button"},"First button"),_react.default.createElement("button",{id:"second-button"},"Second button")),{attachTo:e});(0,_chai.expect)(global.document.activeElement.ariaLabel).to.equal("close Programmatic focus modal"),t.unmount()}),it("should not include the title in the close button aria label when not given",function(){var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",visible:!0,onClose:function(){}},_react.default.createElement("button",{id:"first-button"},"First button"),_react.default.createElement("button",{id:"second-button"},"Second button")),{attachTo:e});(0,_chai.expect)(global.document.activeElement.ariaLabel).to.equal("close modal"),t.unmount()})}),describe("analytics event",function(){it("should be triggered when modal is visible",function(){var e=_sinon.default.spy();global.document.body.addEventListener("component-library-analytics",e);var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",visible:!0,clickToClose:!0,onClose:function(){}},"Modal contents"));(0,_chai.expect)(e.calledWith(_sinon.default.match.has("detail",{componentName:"Modal",action:"show",details:{status:void 0,title:void 0,primaryButtonText:void 0,secondaryButtonText:void 0},version:_sinon.default.match.string}))).to.be.true,global.document.body.removeEventListener("component-library-analytics",e),t.unmount()}),it("should include title when present",function(){var e=_sinon.default.spy();global.document.body.addEventListener("component-library-analytics",e);var t=(0,_enzyme.mount)(_react.default.createElement(_Modal.default,{id:"modal",visible:!0,title:"My modal title",clickToClose:!0,onClose:function(){}},"Modal contents"));(0,_chai.expect)(e.calledWith(_sinon.default.match.has("detail",{componentName:"Modal",action:"show",details:{status:void 0,title:"My modal title",primaryButtonText:void 0,secondaryButtonText:void 0},version:_sinon.default.match.string}))).to.be.true,global.document.body.removeEventListener("component-library-analytics",e),t.unmount()})})});
|
package/contacts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(
|
|
1
|
+
"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(e){var r=_toPrimitive(e,"string");return"symbol"==_typeof(r)?r:r+""}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.contactsMap=exports.CONTACTS=void 0;var contactsMap=exports.contactsMap=Object.freeze({"222_VETS":{phoneNumber:"8772228387",description:"VA Help Line"},"4AID_VET":{phoneNumber:"8774243838",description:"National Call Center for Homeless Veterans"},711:{phoneNumber:"711",description:"Telecommunications Relay Service"},911:{phoneNumber:"911",description:"911"},CAREGIVER:{phoneNumber:"8552603274",description:"VA National Caregiver Support Line"},CRISIS_LINE:{phoneNumber:"8002738255",description:"Veterans Crisis hotline"},CRISIS_TTY:{phoneNumber:"8007994889",description:"Veterans Crisis hotline TTY"},DMC:{phoneNumber:"8008270648",description:"Debt Management Center"},DMC_OVERSEAS:{phoneNumber:"6127136415",description:"Debt Management Center (Overseas)"},DMDC_DEERS:{phoneNumber:"8663632883",description:"Defense Manpower Data Center (DMDC) | Defense Enrollment Eligibility Reporting System (DEERS) Support Office"},DS_LOGON:{phoneNumber:"8005389552",description:"Defense Manpower Data Center"},DS_LOGON_TTY:{phoneNumber:"8663632883",description:"Defense Manpower Data Center TTY"},FEDERAL_RELAY_SERVICE:{phoneNumber:"8008778339",description:"Federal Relay Service"},GI_BILL:{phoneNumber:"8884424551",description:"Education Call Center (1-888-GI-BILL-1)"},GO_DIRECT:{phoneNumber:"8003331795",description:"Go Direct/Direct Express (Treasury)"},HELP_DESK:{phoneNumber:"8006982411",description:"VA Help desk"},HEALTH_RESOURCE_CENTER:{phoneNumber:"8664001238",description:"Health Resource Center"},HEALTHCARE_ELIGIBILITY_CENTER:{phoneNumber:"8554888440",description:"VA Healthcare Eligibility Center (Eligibility Division)"},HELP_TTY:{phoneNumber:"8008778339",description:"VA Help Desk TTY"},MY_HEALTHEVET:{phoneNumber:"8773270022",description:"My HealtheVet help desk"},NCA:{phoneNumber:"8005351117",description:"National Cemetery Scheduling Office"},SUICIDE_PREVENTION_LIFELINE:{phoneNumber:"8007994889",description:"Suicide Prevention Line"},TESC:{phoneNumber:"8882242950",description:"U.S. Treasury Electronic Payment Solution Center"},TREASURY_DMS:{phoneNumber:"8888263127",description:"U.S. Department of the Treasury (Debt Management Services)"},VA_311:{phoneNumber:"8006982411",description:"VA Help desk (VA411)"},VA_411:{phoneNumber:"8006982411",description:"VA Help desk (VA411)"},VA_BENEFITS:{phoneNumber:"8008271000",description:"Veterans Benefits Assistance"}}),CONTACTS=exports.CONTACTS=Object.freeze(Object.entries(contactsMap).reduce(function(e,r){return _objectSpread(_objectSpread({},e),{},_defineProperty({},r[0],r[1].phoneNumber))},{}));
|
package/dist/1339.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 1339.app.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[1339,4164],{4164:function(e,t,a){a.r(t),a.d(t,{c:function(){return s}});var n,i={exports:{}};n=i,function(){var e={}.hasOwnProperty;function t(){for(var a=[],n=0;n<arguments.length;n++){var i=arguments[n];if(i){var s=typeof i;if("string"===s||"number"===s)a.push(i);else if(Array.isArray(i)){if(i.length){var r=t.apply(null,i);r&&a.push(r)}}else if("object"===s)if(i.toString===Object.prototype.toString)for(var o in i)e.call(i,o)&&i[o]&&a.push(o);else a.push(i.toString())}}return a.join(" ")}n.exports?(t.default=t,n.exports=t):window.classNames=t}();var s=i.exports},1339:function(e,t,a){a.r(t),a.d(t,{va_segmented_progress_bar:function(){return s}});var n=a(2625),i=a(4164),s=function(){function e(e){(0,n.r)(this,e),this.componentLibraryAnalytics=(0,n.c)(this,"component-library-analytics",7),this.enableAnalytics=!1,this.current=void 0,this.total=void 0,this.label=void 0,this.headerLevel=4,this.progressTerm="Step",this.labels=void 0,this.centeredLabels=void 0,this.counters=void 0,this.headingText=void 0,this.useDiv=void 0}return e.prototype.componentDidRender=function(){this.enableAnalytics&&this.componentLibraryAnalytics.emit({componentName:"va-segmented-progress-bar",action:"change",details:{current:this.current,total:this.total}})},e.prototype.render=function(){var e,t=this,a=t.current,s=t.total,r=t.labels,o=t.centeredLabels,c=t.counters,l=t.headingText,d=t.headerLevel,u=t.progressTerm,p=t.useDiv;r&&(e=r.split(";"));var m=Array.from({length:s},(function(e,t){return t})),g=p?"div":"h".concat(d),h=(0,i.c)({"usa-step-indicator":!0,"usa-step-indicator--center":o,"usa-step-indicator--counters":"default"===c,"usa-step-indicator--counters-sm":"small"===c}),_=function(e){return(0,i.c)({"usa-step-indicator__segment":!0,"usa-step-indicator__segment--complete":a>e+1,"usa-step-indicator__segment--current":a===e+1})};return(0,n.h)(n.H,null,(0,n.h)("div",{class:h},(0,n.h)("ol",{class:"usa-step-indicator__segments","aria-hidden":r?null:"true"},m.map((function(t){return(0,n.h)("li",{class:_(t),"aria-current":a===t+1?"step":null},r?(0,n.h)("span",{class:"usa-step-indicator__segment-label"},e[t],a!==t+1?(0,n.h)("span",{class:"usa-sr-only"},a>t+1?"completed":"not completed"):null):null)}))),(0,n.h)("div",{class:"usa-step-indicator__header"},(0,n.h)(g,{class:"usa-step-indicator__heading"},(0,n.h)("span",{class:"usa-sr-only"},"You are on ",u," ",a," of ",s,": ",r?e[a-1]:l),(0,n.h)("span",{"aria-hidden":"true",class:"usa-step-indicator__heading-counter"},(0,n.h)("span",{class:"usa-step-indicator__current-step"},a),(0,n.h)("span",{class:"usa-step-indicator__total-steps"}," of ",s)),(0,n.h)("span",{"aria-hidden":"true",class:"usa-step-indicator__heading-text"},r?e[a-1]:l)))))},e}();s.style='.sr-only{border:0;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}.usa-step-indicator{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.1;background-color:white;margin-bottom:2rem;margin-left:-1px;margin-right:-1px}@media all and (min-width: 40em){.usa-step-indicator{margin-left:0;margin-right:0}}.usa-step-indicator__segments{counter-reset:usa-step-indicator;display:-ms-flexbox;display:flex;list-style:none;margin:0;padding:0}.usa-step-indicator__segment{-ms-flex:1 1 0%;flex:1 1 0%;counter-increment:usa-step-indicator;margin-left:1px;margin-right:1px;max-width:15rem;min-height:0.5rem;position:relative}.usa-step-indicator__segment:after{background-color:#919191;content:"";display:block;height:0.5rem;left:0;position:absolute;right:0;top:0}@media all and (min-width: 40em){.usa-step-indicator__segment:after{height:0.5rem}}.usa-step-indicator__segment--complete::after{background-color:#162e51}.usa-step-indicator__segment--complete .usa-step-indicator__segment-label{color:#162e51}.usa-step-indicator__segment--current::after{background-color:#005ea2}.usa-step-indicator__segment--current .usa-step-indicator__segment-label{color:#005ea2;font-weight:700}.usa-step-indicator__segment-label{display:none}@media all and (min-width: 40em){.usa-step-indicator__segment-label{color:#565c65;display:block;font-size:1.06rem;margin-top:calc(\n 0.5rem + 0.5rem\n );padding-right:2rem;text-align:left}}.usa-step-indicator__header{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex}.usa-step-indicator__heading{color:#1b1b1b;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.13rem;font-weight:700;margin:1rem 0 0}@media all and (min-width: 40em){.usa-step-indicator__heading{font-size:1.46rem;margin-top:2rem}}.usa-step-indicator__current-step{height:2.5rem;border-radius:99rem;width:2.5rem;font-weight:normal;-webkit-font-feature-settings:"tnum" 1, "kern" 1;font-feature-settings:"tnum" 1, "kern" 1;background-color:#005ea2;color:white;display:inline-block;padding:calc((2.5rem - (2ex * 1.1)) * 0.5);text-align:center}.usa-step-indicator__total-steps{font-weight:normal;-webkit-font-feature-settings:"tnum" 1, "kern" 1;font-feature-settings:"tnum" 1, "kern" 1;color:#005ea2;margin-right:0.5rem}@media all and (min-width: 40em){.usa-step-indicator--counters .usa-step-indicator__segment,.usa-step-indicator--counters-sm .usa-step-indicator__segment{margin-left:0;margin-right:0;margin-top:calc(\n (\n (\n 2.5rem -\n 0.5rem\n ) /\n 2\n ) +\n 0.25rem\n )}.usa-step-indicator--counters .usa-step-indicator__segment:before,.usa-step-indicator--counters-sm .usa-step-indicator__segment:before{height:2.5rem;border-radius:99rem;width:2.5rem;-webkit-font-feature-settings:"tnum" 1, "kern" 1;font-feature-settings:"tnum" 1, "kern" 1;background-color:white;-webkit-box-shadow:inset 0 0 0 0.25rem #919191, 0 0 0 0.25rem white;box-shadow:inset 0 0 0 0.25rem #919191, 0 0 0 0.25rem white;color:#565c65;content:counter(usa-step-indicator);display:block;font-weight:700;left:0;line-height:0.9;padding:calc((2.5rem - (2ex * 0.9)) * 0.5);position:absolute;text-align:center;top:calc((\n 2.5rem - 0.5rem\n ) / -2);z-index:100}.usa-step-indicator--counters .usa-step-indicator__segment:last-child:after,.usa-step-indicator--counters-sm .usa-step-indicator__segment:last-child:after{display:none}}.usa-step-indicator--counters .usa-step-indicator__segment--complete::before,.usa-step-indicator--counters-sm .usa-step-indicator__segment--complete::before{background-color:#162e51;-webkit-box-shadow:0 0 0 0.25rem white;box-shadow:0 0 0 0.25rem white;color:white}.usa-step-indicator--counters .usa-step-indicator__segment--current::before,.usa-step-indicator--counters-sm .usa-step-indicator__segment--current::before{background-color:#005ea2;-webkit-box-shadow:0 0 0 0.25rem white;box-shadow:0 0 0 0.25rem white;color:white}@media all and (min-width: 40em){.usa-step-indicator--counters .usa-step-indicator__segment-label,.usa-step-indicator--counters-sm .usa-step-indicator__segment-label{margin-top:calc(\n (\n (\n 2.5rem + 0.5rem\n ) / 2\n ) + 0.5rem\n )}}@media all and (min-width: 40em){.usa-step-indicator--counters.usa-step-indicator--center .usa-step-indicator__segment:first-child:after,.usa-step-indicator--counters-sm.usa-step-indicator--center .usa-step-indicator__segment:first-child:after{left:50%;right:0;width:auto}.usa-step-indicator--counters.usa-step-indicator--center .usa-step-indicator__segment:last-child:after,.usa-step-indicator--counters-sm.usa-step-indicator--center .usa-step-indicator__segment:last-child:after{display:block;left:0;right:50%;width:auto}}@media all and (min-width: 40em){.usa-step-indicator--counters-sm .usa-step-indicator__segment{margin-top:calc(\n (\n (\n 1.5rem -\n 0.5rem\n ) /\n 2\n ) +\n 0.25rem\n )}.usa-step-indicator--counters-sm .usa-step-indicator__segment:before{height:1.5rem;border-radius:99rem;width:1.5rem;font-size:0.93rem;padding:calc(0.25rem + 1px);top:calc((\n 1.5rem - 0.5rem\n ) / -2)}.usa-step-indicator--counters-sm .usa-step-indicator__segment:last-child:after{display:none}}@media all and (min-width: 40em){.usa-step-indicator--counters-sm .usa-step-indicator__segment-label{margin-top:calc(\n (\n (\n 1.5rem + 0.5rem\n ) / 2\n ) + 0.5rem\n )}}.usa-step-indicator--no-labels{margin-left:-1px;margin-right:-1px}.usa-step-indicator--no-labels .usa-step-indicator__segment{margin-top:0;margin-left:1px;margin-right:1px}.usa-step-indicator--no-labels .usa-step-indicator__segment:before{display:none}.usa-step-indicator--no-labels .usa-step-indicator__segment:last-child:after{display:block}.usa-step-indicator--no-labels .usa-step-indicator__heading{margin-top:1rem}.usa-step-indicator--no-labels .usa-step-indicator__segment-label{display:none}.usa-step-indicator--center{margin-left:-1px;margin-right:-1px}.usa-step-indicator--center .usa-step-indicator__segment{margin-left:1px;margin-right:1px}.usa-step-indicator--center .usa-step-indicator__segment:before{left:calc(50% - (\n 2.5rem +\n 0.25rem\n ) / 2)}.usa-step-indicator--center .usa-step-indicator__segment-label{padding-left:0.5rem;padding-right:0.5rem;text-align:center}.usa-step-indicator--center.usa-step-indicator--no-labels .usa-step-indicator__segment:first-child:after{left:0}.usa-step-indicator--center.usa-step-indicator--no-labels .usa-step-indicator__segment:last-child:after{right:0}.usa-step-indicator--center.usa-step-indicator--counters-sm .usa-step-indicator__segment:before{left:calc(50% - (\n 1.5rem +\n 0.25rem\n ) / 2)}.usa-sr-only{position:absolute;left:-999em;right:auto}*,::after,::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}:host .usa-step-indicator__heading{display:-ms-flexbox;display:flex}:host .usa-step-indicator__heading-counter{-ms-flex-negative:0;flex-shrink:0}:host .usa-step-indicator__heading-text{text-wrap:wrap;padding-top:calc(-1.1ex + 1.25rem)}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[1339,4164],{4164:function(e,t,a){a.r(t),a.d(t,{c:function(){return s}});var n,i={exports:{}};n=i,function(){var e={}.hasOwnProperty;function t(){for(var a=[],n=0;n<arguments.length;n++){var i=arguments[n];if(i){var s=typeof i;if("string"===s||"number"===s)a.push(i);else if(Array.isArray(i)){if(i.length){var r=t.apply(null,i);r&&a.push(r)}}else if("object"===s)if(i.toString===Object.prototype.toString)for(var o in i)e.call(i,o)&&i[o]&&a.push(o);else a.push(i.toString())}}return a.join(" ")}n.exports?(t.default=t,n.exports=t):window.classNames=t}();var s=i.exports},1339:function(e,t,a){a.r(t),a.d(t,{va_segmented_progress_bar:function(){return s}});var n=a(2625),i=a(4164),s=function(){function e(e){(0,n.r)(this,e),this.componentLibraryAnalytics=(0,n.c)(this,"component-library-analytics",7),this.enableAnalytics=!1,this.current=void 0,this.total=void 0,this.label=void 0,this.headerLevel=4,this.progressTerm="Step",this.labels=void 0,this.centeredLabels=void 0,this.counters=void 0,this.headingText=void 0,this.useDiv=void 0}return e.prototype.componentDidRender=function(){this.enableAnalytics&&this.componentLibraryAnalytics.emit({componentName:"va-segmented-progress-bar",action:"change",details:{current:this.current,total:this.total}})},e.prototype.render=function(){var e,t=this,a=t.current,s=t.total,r=t.labels,o=t.centeredLabels,c=t.counters,l=t.headingText,d=t.headerLevel,u=t.progressTerm,p=t.useDiv;r&&(e=r.split(";"));var m=Array.from({length:s},function(e,t){return t}),g=p?"div":"h".concat(d),h=(0,i.c)({"usa-step-indicator":!0,"usa-step-indicator--center":o,"usa-step-indicator--counters":"default"===c,"usa-step-indicator--counters-sm":"small"===c}),_=function(e){return(0,i.c)({"usa-step-indicator__segment":!0,"usa-step-indicator__segment--complete":a>e+1,"usa-step-indicator__segment--current":a===e+1})};return(0,n.h)(n.H,null,(0,n.h)("div",{class:h},(0,n.h)("ol",{class:"usa-step-indicator__segments","aria-hidden":r?null:"true"},m.map(function(t){return(0,n.h)("li",{class:_(t),"aria-current":a===t+1?"step":null},r?(0,n.h)("span",{class:"usa-step-indicator__segment-label"},e[t],a!==t+1?(0,n.h)("span",{class:"usa-sr-only"},a>t+1?"completed":"not completed"):null):null)})),(0,n.h)("div",{class:"usa-step-indicator__header"},(0,n.h)(g,{class:"usa-step-indicator__heading"},(0,n.h)("span",{class:"usa-sr-only"},"You are on ",u," ",a," of ",s,": ",r?e[a-1]:l),(0,n.h)("span",{"aria-hidden":"true",class:"usa-step-indicator__heading-counter"},(0,n.h)("span",{class:"usa-step-indicator__current-step"},a),(0,n.h)("span",{class:"usa-step-indicator__total-steps"}," of ",s)),(0,n.h)("span",{"aria-hidden":"true",class:"usa-step-indicator__heading-text"},r?e[a-1]:l)))))},e}();s.style='.sr-only{border:0;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}.usa-step-indicator{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.1;background-color:white;margin-bottom:2rem;margin-left:-1px;margin-right:-1px}@media all and (min-width: 40em){.usa-step-indicator{margin-left:0;margin-right:0}}.usa-step-indicator__segments{counter-reset:usa-step-indicator;display:-ms-flexbox;display:flex;list-style:none;margin:0;padding:0}.usa-step-indicator__segment{-ms-flex:1 1 0%;flex:1 1 0%;counter-increment:usa-step-indicator;margin-left:1px;margin-right:1px;max-width:15rem;min-height:0.5rem;position:relative}.usa-step-indicator__segment:after{background-color:#919191;content:"";display:block;height:0.5rem;left:0;position:absolute;right:0;top:0}@media all and (min-width: 40em){.usa-step-indicator__segment:after{height:0.5rem}}.usa-step-indicator__segment--complete::after{background-color:#162e51}.usa-step-indicator__segment--complete .usa-step-indicator__segment-label{color:#162e51}.usa-step-indicator__segment--current::after{background-color:#005ea2}.usa-step-indicator__segment--current .usa-step-indicator__segment-label{color:#005ea2;font-weight:700}.usa-step-indicator__segment-label{display:none}@media all and (min-width: 40em){.usa-step-indicator__segment-label{color:#565c65;display:block;font-size:1.06rem;margin-top:calc(\n 0.5rem + 0.5rem\n );padding-right:2rem;text-align:left}}.usa-step-indicator__header{-ms-flex-align:baseline;align-items:baseline;display:-ms-flexbox;display:flex}.usa-step-indicator__heading{color:#1b1b1b;font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.13rem;font-weight:700;margin:1rem 0 0}@media all and (min-width: 40em){.usa-step-indicator__heading{font-size:1.46rem;margin-top:2rem}}.usa-step-indicator__current-step{height:2.5rem;border-radius:99rem;width:2.5rem;font-weight:normal;-webkit-font-feature-settings:"tnum" 1, "kern" 1;font-feature-settings:"tnum" 1, "kern" 1;background-color:#005ea2;color:white;display:inline-block;padding:calc((2.5rem - (2ex * 1.1)) * 0.5);text-align:center}.usa-step-indicator__total-steps{font-weight:normal;-webkit-font-feature-settings:"tnum" 1, "kern" 1;font-feature-settings:"tnum" 1, "kern" 1;color:#005ea2;margin-right:0.5rem}@media all and (min-width: 40em){.usa-step-indicator--counters .usa-step-indicator__segment,.usa-step-indicator--counters-sm .usa-step-indicator__segment{margin-left:0;margin-right:0;margin-top:calc(\n (\n (\n 2.5rem -\n 0.5rem\n ) /\n 2\n ) +\n 0.25rem\n )}.usa-step-indicator--counters .usa-step-indicator__segment:before,.usa-step-indicator--counters-sm .usa-step-indicator__segment:before{height:2.5rem;border-radius:99rem;width:2.5rem;-webkit-font-feature-settings:"tnum" 1, "kern" 1;font-feature-settings:"tnum" 1, "kern" 1;background-color:white;-webkit-box-shadow:inset 0 0 0 0.25rem #919191, 0 0 0 0.25rem white;box-shadow:inset 0 0 0 0.25rem #919191, 0 0 0 0.25rem white;color:#565c65;content:counter(usa-step-indicator);display:block;font-weight:700;left:0;line-height:0.9;padding:calc((2.5rem - (2ex * 0.9)) * 0.5);position:absolute;text-align:center;top:calc((\n 2.5rem - 0.5rem\n ) / -2);z-index:100}.usa-step-indicator--counters .usa-step-indicator__segment:last-child:after,.usa-step-indicator--counters-sm .usa-step-indicator__segment:last-child:after{display:none}}.usa-step-indicator--counters .usa-step-indicator__segment--complete::before,.usa-step-indicator--counters-sm .usa-step-indicator__segment--complete::before{background-color:#162e51;-webkit-box-shadow:0 0 0 0.25rem white;box-shadow:0 0 0 0.25rem white;color:white}.usa-step-indicator--counters .usa-step-indicator__segment--current::before,.usa-step-indicator--counters-sm .usa-step-indicator__segment--current::before{background-color:#005ea2;-webkit-box-shadow:0 0 0 0.25rem white;box-shadow:0 0 0 0.25rem white;color:white}@media all and (min-width: 40em){.usa-step-indicator--counters .usa-step-indicator__segment-label,.usa-step-indicator--counters-sm .usa-step-indicator__segment-label{margin-top:calc(\n (\n (\n 2.5rem + 0.5rem\n ) / 2\n ) + 0.5rem\n )}}@media all and (min-width: 40em){.usa-step-indicator--counters.usa-step-indicator--center .usa-step-indicator__segment:first-child:after,.usa-step-indicator--counters-sm.usa-step-indicator--center .usa-step-indicator__segment:first-child:after{left:50%;right:0;width:auto}.usa-step-indicator--counters.usa-step-indicator--center .usa-step-indicator__segment:last-child:after,.usa-step-indicator--counters-sm.usa-step-indicator--center .usa-step-indicator__segment:last-child:after{display:block;left:0;right:50%;width:auto}}@media all and (min-width: 40em){.usa-step-indicator--counters-sm .usa-step-indicator__segment{margin-top:calc(\n (\n (\n 1.5rem -\n 0.5rem\n ) /\n 2\n ) +\n 0.25rem\n )}.usa-step-indicator--counters-sm .usa-step-indicator__segment:before{height:1.5rem;border-radius:99rem;width:1.5rem;font-size:0.93rem;padding:calc(0.25rem + 1px);top:calc((\n 1.5rem - 0.5rem\n ) / -2)}.usa-step-indicator--counters-sm .usa-step-indicator__segment:last-child:after{display:none}}@media all and (min-width: 40em){.usa-step-indicator--counters-sm .usa-step-indicator__segment-label{margin-top:calc(\n (\n (\n 1.5rem + 0.5rem\n ) / 2\n ) + 0.5rem\n )}}.usa-step-indicator--no-labels{margin-left:-1px;margin-right:-1px}.usa-step-indicator--no-labels .usa-step-indicator__segment{margin-top:0;margin-left:1px;margin-right:1px}.usa-step-indicator--no-labels .usa-step-indicator__segment:before{display:none}.usa-step-indicator--no-labels .usa-step-indicator__segment:last-child:after{display:block}.usa-step-indicator--no-labels .usa-step-indicator__heading{margin-top:1rem}.usa-step-indicator--no-labels .usa-step-indicator__segment-label{display:none}.usa-step-indicator--center{margin-left:-1px;margin-right:-1px}.usa-step-indicator--center .usa-step-indicator__segment{margin-left:1px;margin-right:1px}.usa-step-indicator--center .usa-step-indicator__segment:before{left:calc(50% - (\n 2.5rem +\n 0.25rem\n ) / 2)}.usa-step-indicator--center .usa-step-indicator__segment-label{padding-left:0.5rem;padding-right:0.5rem;text-align:center}.usa-step-indicator--center.usa-step-indicator--no-labels .usa-step-indicator__segment:first-child:after{left:0}.usa-step-indicator--center.usa-step-indicator--no-labels .usa-step-indicator__segment:last-child:after{right:0}.usa-step-indicator--center.usa-step-indicator--counters-sm .usa-step-indicator__segment:before{left:calc(50% - (\n 1.5rem +\n 0.25rem\n ) / 2)}.usa-sr-only{position:absolute;left:-999em;right:auto}*,::after,::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host{display:block}:host .usa-step-indicator__heading{display:-ms-flexbox;display:flex}:host .usa-step-indicator__heading-counter{-ms-flex-negative:0;flex-shrink:0}:host .usa-step-indicator__heading-text{text-wrap:wrap;padding-top:calc(-1.1ex + 1.25rem)}'}}]);
|