@department-of-veterans-affairs/component-library 46.0.2 → 46.1.3
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/dist/1185.app.bundle.js +1 -1
- package/dist/2108.app.bundle.js +1 -1
- package/dist/2259.app.bundle.js +1 -0
- package/dist/2305.app.bundle.js +1 -1
- package/dist/2843.app.bundle.js +1 -1
- package/dist/3389.app.bundle.js +1 -1
- package/dist/3476.app.bundle.js +1 -1
- package/dist/3499.app.bundle.js +1 -1
- package/dist/3661.app.bundle.js +1 -1
- package/dist/383.app.bundle.js +1 -1
- package/dist/4181.app.bundle.js +1 -1
- package/dist/4818.app.bundle.js +1 -1
- package/dist/529.app.bundle.js +1 -1
- package/dist/5434.app.bundle.js +1 -1
- package/dist/569.app.bundle.js +1 -1
- package/dist/6171.app.bundle.js +1 -1
- package/dist/6391.app.bundle.js +1 -1
- package/dist/6569.app.bundle.js +1 -1
- package/dist/6998.app.bundle.js +1 -1
- package/dist/7375.app.bundle.js +1 -1
- package/dist/753.app.bundle.js +1 -1
- package/dist/783.app.bundle.js +1 -1
- package/dist/8509.app.bundle.js +1 -1
- package/dist/8716.app.bundle.js +1 -1
- package/dist/9370.app.bundle.js +1 -1
- package/dist/9398.app.bundle.js +1 -1
- package/dist/9727.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/types/components.d.ts +16 -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-back-to-top.js +1 -1
- package/dist/components/va-button-icon2.js +1 -1
- package/dist/components/va-button2.js +1 -1
- package/dist/components/va-checkbox-group.js +1 -1
- package/dist/components/va-checkbox2.js +1 -1
- package/dist/components/va-crisis-line-modal2.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-input2.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-link2.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-modal2.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-radio.js +1 -1
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-select2.js +1 -1
- package/dist/components/va-telephone2.js +1 -1
- package/dist/components/va-text-input2.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/package.json +2 -2
- package/dist/265.app.bundle.js +0 -1
package/dist/1185.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 1185.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([[1185,5285,265],{5285:function(e,r,t){t.r(r),t.d(r,{c:function(){return s}});var a,o,s=(a=function(e){!function(){var r={}.hasOwnProperty;function t(){for(var e=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var s=typeof o;if("string"===s||"number"===s)e.push(o);else if(Array.isArray(o)){if(o.length){var i=t.apply(null,o);i&&e.push(i)}}else if("object"===s)if(o.toString===Object.prototype.toString)for(var n in o)r.call(o,n)&&o[n]&&e.push(n);else e.push(o.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()},a(o={path:undefined,exports:{},require:function(e,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),o.exports)},265:function(e,r,t){function a(e,r){var t=e.shadowRoot.querySelector("slot").assignedNodes();return null!==r?Array.from(t).filter((function(e){return e.nodeName.toLowerCase()===r})):Array.from(t)}function o(e){return 1===e?"":"s"}function s(e,r){if(void 0===e||""===e)return"".concat(r," character").concat(o(r)," allowed");var t;if(e.length<=r){var a=r-e.length;t="".concat(a," character").concat(o(a)," left")}else a=e.length-r,t="".concat(a," character").concat(o(a)," over limit");return t}function i(e,r){return Array.from({length:r-e+1},(function(r,t){return e+t}))}t.r(r),t.d(r,{S:function(){return l},a:function(){return h},b:function(){return s},g:function(){return a},m:function(){return i},s:function(){return u}});var n=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,r){var t=function(e,r){if("string"!=typeof e)return[];if(!r||!n(r))return[];var t=r.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,r);return"string"!=typeof e||n(r)&&r.matches(e)&&t.push(r),t}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var r="",t=0;t<e.length;t++)if(r+=e[t],t+1<arguments.length){var a=arguments[t+1]||"";r+=String(a).replace(l._entity,l.getEntity)}return r}};function h(e){var r;return(r="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&r<=6?"h".concat(r):null}},1185:function(e,r,t){t.r(r),t.d(r,{va_radio:function(){return n}});var a=t(218),o=t(5285),s=t(265),i=(t(4786),t(2764)),n=function(){function e(e){(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.vaValueChange=(0,a.c)(this,"vaValueChange",7),this.label=void 0,this.hint=void 0,this.required=!1,this.error=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0}return e.prototype.handleKeyDown=function(e){var r=e.target,t=(0,s.g)(this.el,"va-radio-option").filter((function(e){return!e.disabled}));if(t.length){var a=t.findIndex((function(e){return e===r}));if(-1!==a){var o;switch(e.key){case" ":if(e.preventDefault(),r.checked)return;o=r,this.selectNextNode(r);break;case"ArrowDown":case"ArrowRight":e.preventDefault(),a===t.length-1?(o=t[0],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a+1],this.deselectCurrentNode(r),this.selectNextNode(o));break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),0===a?(o=t[t.length-1],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a-1],this.deselectCurrentNode(r),this.selectNextNode(o))}o&&(this.enableAnalytics&&this.fireAnalyticsEvent(o.label),this.vaValueChange.emit({value:o.value}))}}},e.prototype.radioOptionSelectedHandler=function(e){var r=this,t=e.target;(0,s.g)(this.el,"va-radio-option").filter((function(e){return e!==t})).forEach((function(e){r.deselectCurrentNode(e)})),this.selectNextNode(t),this.enableAnalytics&&this.fireAnalyticsEvent(t.label),this.vaValueChange.emit({value:t.value})},e.prototype.fireAnalyticsEvent=function(e){this.componentLibraryAnalytics.emit({componentName:"va-radio",action:"change",details:{label:this.label,optionLabel:e,required:this.required}})},e.prototype.deselectCurrentNode=function(e){e.removeAttribute("checked")},e.prototype.selectNextNode=function(e){e.setAttribute("checked",""),e.focus()},e.prototype.getHeaderLevel=function(){var e=parseInt(this.labelHeaderLevel,10);return e>=1&&e<=6?"h".concat(e):null},e.prototype.connectedCallback=function(){var e=this;i.i.on("languageChanged",(function(){(0,a.f)(e.el)}))},e.prototype.disconnectedCallback=function(){i.i.off("languageChanged")},e.prototype.render=function(){var e=this,r=e.label,t=e.hint,n=e.required,u=e.error,l=e.headerAriaDescribedby,h=e.useFormsPattern,d=e.formHeadingLevel,f=e.formHeading,m=this.getHeaderLevel(),c=l?"header-message":null,p="".concat(h&&f?"form-question":""," ").concat(h?"form-description":""," ").concat("multiple"===h?"header-message":"").trim()||null,w=(0,o.c)({"usa-legend":!0,"usa-label--error":u}),g=null;if("single"===h||"multiple"===h){var b=(0,s.a)(d);g=(0,a.h)(a.F,null,f&&(0,a.h)(b,{id:"form-question",part:"form-header"},f),(0,a.h)("div",{id:"form-description"},(0,a.h)("slot",{name:"form-description"})))}return(0,a.h)(a.H,{"aria-invalid":u?"true":"false"},g,(0,a.h)("div",{class:"input-wrap"},(0,a.h)("fieldset",{class:"usa-fieldset","aria-labelledby":p},(0,a.h)("legend",{class:w,part:"legend"},m?(0,a.h)(m,{part:"header","aria-describedby":c},r):r," ","multiple"===h&&(0,a.h)("span",{id:"header-message",class:"sr-only"},r),l&&(0,a.h)("span",{id:"header-message",class:"sr-only"},l),n&&(0,a.h)("span",{class:"usa-label--required",part:"required"},i.i.t("required")),t&&(0,a.h)("div",{class:"usa-hint"},t)),(0,a.h)("span",{class:"usa-error-message",role:"alert"},u&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},i.i.t("error"))," ",u)),(0,a.h)("slot",null))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();n.style='button:not([disabled]):focus,:host([uswds=\'false\']) button:not([disabled]):active,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.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}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-form{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}@media all and (min-width: 30em){.usa-form{max-width:20rem}}.usa-form abbr[title=required]{text-decoration:none}.usa-form .usa-input,.usa-form .usa-range,.usa-form .usa-select,.usa-form .usa-textarea{max-width:none}.usa-form .usa-input--2xs,.usa-form .usa-input-group--2xs{max-width:5ex}.usa-form .usa-input--xs,.usa-form .usa-input-group--xs{max-width:9ex}.usa-form .usa-input--sm,.usa-form .usa-input--small,.usa-form .usa-input-group--sm,.usa-form .usa-input-group--small{max-width:13ex}.usa-form .usa-input--md,.usa-form .usa-input--medium,.usa-form .usa-input-group--md,.usa-form .usa-input-group--medium{max-width:20ex}.usa-form .usa-input--lg,.usa-form .usa-input-group--lg{max-width:30ex}.usa-form .usa-input--xl,.usa-form .usa-input-group--xl{max-width:40ex}.usa-form .usa-input--2xl,.usa-form .usa-input-group--2xl{max-width:50ex}.usa-form .usa-button{margin-top:0.5rem}@media all and (min-width: 30em){.usa-form .usa-button{margin-top:1.5rem}}.usa-form a:where(:not(.usa-button)){color:#005ea2;text-decoration:underline}.usa-form a:where(:not(.usa-button)):visited{color:#54278f}.usa-form a:where(:not(.usa-button)):hover{color:#1a4480}.usa-form a:where(:not(.usa-button)):active{color:#162e51}.usa-form a:where(:not(.usa-button)):focus{outline:0.25rem solid #2491ff;outline-offset:0rem}@media all and (min-width: 30em){.usa-form--large{max-width:30rem}}.usa-show-password{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;cursor:pointer}.usa-show-password:visited{color:#54278f}.usa-show-password:hover{color:#1a4480}.usa-show-password:active{color:#162e51}.usa-show-password:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-show-password:hover,.usa-show-password.usa-button--hover,.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password:disabled.usa-button--hover,.usa-show-password[aria-disabled=true].usa-button--hover,.usa-show-password:active,.usa-show-password.usa-button--active,.usa-show-password:disabled:active,.usa-show-password[aria-disabled=true]:active,.usa-show-password:disabled.usa-button--active,.usa-show-password[aria-disabled=true].usa-button--active,.usa-show-password:disabled:focus,.usa-show-password[aria-disabled=true]:focus,.usa-show-password:disabled.usa-focus,.usa-show-password[aria-disabled=true].usa-focus,.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-show-password.usa-button--hover{color:#1a4480}.usa-show-password.usa-button--active{color:#162e51}.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:GrayText}}.usa-form__note,.usa-show-password{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:0.93rem;line-height:1.3;float:right;margin:0.25rem 0 1rem}.usa-fieldset{border:none;margin:0;padding:0}.usa-legend{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-legend--large{font-size:2.13rem;font-weight:700;margin-top:1rem}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""]):not([uswds=false])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""]):not([uswds=false])){margin-left:-0.9rem}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;border:none;padding:0;margin-top:24px}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[1185,5285,2259],{5285:function(e,r,t){t.r(r),t.d(r,{c:function(){return s}});var a,o,s=(a=function(e){!function(){var r={}.hasOwnProperty;function t(){for(var e=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var s=typeof o;if("string"===s||"number"===s)e.push(o);else if(Array.isArray(o)){if(o.length){var i=t.apply(null,o);i&&e.push(i)}}else if("object"===s)if(o.toString===Object.prototype.toString)for(var n in o)r.call(o,n)&&o[n]&&e.push(n);else e.push(o.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()},a(o={path:undefined,exports:{},require:function(e,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),o.exports)},2259:function(e,r,t){function a(e,r){var t=e.shadowRoot.querySelector("slot").assignedNodes();return null!==r?Array.from(t).filter((function(e){return e.nodeName.toLowerCase()===r})):Array.from(t)}function o(e){return 1===e?"":"s"}function s(e,r){if(void 0===e||""===e)return"".concat(r," character").concat(o(r)," allowed");var t;if(e.length<=r){var a=r-e.length;t="".concat(a," character").concat(o(a)," left")}else a=e.length-r,t="".concat(a," character").concat(o(a)," over limit");return t}function i(e,r){return Array.from({length:r-e+1},(function(r,t){return e+t}))}t.r(r),t.d(r,{S:function(){return l},a:function(){return h},b:function(){return s},g:function(){return a},m:function(){return i},s:function(){return u}});var n=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,r){var t=function(e,r){if("string"!=typeof e)return[];if(!r||!n(r))return[];var t=r.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,r);return"string"!=typeof e||n(r)&&r.matches(e)&&t.push(r),t}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var r="",t=0;t<e.length;t++)if(r+=e[t],t+1<arguments.length){var a=arguments[t+1]||"";r+=String(a).replace(l._entity,l.getEntity)}return r}};function h(e){var r;return(r="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&r<=6?"h".concat(r):null}},1185:function(e,r,t){t.r(r),t.d(r,{va_radio:function(){return n}});var a=t(218),o=t(5285),s=t(2259),i=(t(4786),t(2764)),n=function(){function e(e){(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.vaValueChange=(0,a.c)(this,"vaValueChange",7),this.label=void 0,this.hint=void 0,this.required=!1,this.error=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.messageAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0}return e.prototype.handleKeyDown=function(e){var r=e.target,t=(0,s.g)(this.el,"va-radio-option").filter((function(e){return!e.disabled}));if(t.length){var a=t.findIndex((function(e){return e===r}));if(-1!==a){var o;switch(e.key){case" ":if(e.preventDefault(),r.checked)return;o=r,this.selectNextNode(r);break;case"ArrowDown":case"ArrowRight":e.preventDefault(),a===t.length-1?(o=t[0],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a+1],this.deselectCurrentNode(r),this.selectNextNode(o));break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),0===a?(o=t[t.length-1],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a-1],this.deselectCurrentNode(r),this.selectNextNode(o))}o&&(this.enableAnalytics&&this.fireAnalyticsEvent(o.label),this.vaValueChange.emit({value:o.value}))}}},e.prototype.radioOptionSelectedHandler=function(e){var r=this,t=e.target;(0,s.g)(this.el,"va-radio-option").filter((function(e){return e!==t})).forEach((function(e){r.deselectCurrentNode(e)})),this.selectNextNode(t),this.enableAnalytics&&this.fireAnalyticsEvent(t.label),this.vaValueChange.emit({value:t.value})},e.prototype.fireAnalyticsEvent=function(e){this.componentLibraryAnalytics.emit({componentName:"va-radio",action:"change",details:{label:this.label,optionLabel:e,required:this.required}})},e.prototype.deselectCurrentNode=function(e){e.removeAttribute("checked")},e.prototype.selectNextNode=function(e){e.setAttribute("checked",""),e.focus()},e.prototype.getHeaderLevel=function(){var e=parseInt(this.labelHeaderLevel,10);return e>=1&&e<=6?"h".concat(e):null},e.prototype.connectedCallback=function(){var e=this;i.i.on("languageChanged",(function(){(0,a.f)(e.el)}))},e.prototype.disconnectedCallback=function(){i.i.off("languageChanged")},e.prototype.render=function(){var e=this,r=e.label,t=e.hint,n=e.required,u=e.error,l=e.headerAriaDescribedby,h=e.messageAriaDescribedby,d=e.useFormsPattern,f=e.formHeadingLevel,m=e.formHeading,c=this.getHeaderLevel(),p=l?"header-message":null,g=h?"description-message":null,w="".concat(d&&m?"form-question":""," ").concat(d?"form-description":""," ").concat("multiple"===d?"header-message":"").trim()||null,b=(0,o.c)({"usa-legend":!0,"usa-label--error":u}),v=null;if("single"===d||"multiple"===d){var y=(0,s.a)(f);v=(0,a.h)(a.F,null,m&&(0,a.h)(y,{id:"form-question",part:"form-header"},m),(0,a.h)("div",{id:"form-description"},(0,a.h)("slot",{name:"form-description"})))}return(0,a.h)(a.H,{"aria-invalid":u?"true":"false"},v,(0,a.h)("div",{class:"input-wrap"},(0,a.h)("fieldset",{class:"usa-fieldset","aria-labelledby":w},(0,a.h)("legend",{class:b,part:"legend","aria-describedby":g},c?(0,a.h)(c,{part:"header","aria-describedby":p},r):r," ","multiple"===d&&(0,a.h)("span",{id:"header-message",class:"usa-sr-only"},r),l&&(0,a.h)("span",{id:"header-message",class:"usa-sr-only"},l),h&&(0,a.h)("span",{id:"description-message",class:"usa-sr-only"},h),n&&(0,a.h)("span",{class:"usa-label--required",part:"required"},i.i.t("required")),t&&(0,a.h)("div",{class:"usa-hint"},t)),(0,a.h)("span",{class:"usa-error-message",role:"alert"},u&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},i.i.t("error"))," ",u)),(0,a.h)("slot",null))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();n.style='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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}.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}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-form{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}@media all and (min-width: 30em){.usa-form{max-width:20rem}}.usa-form abbr[title=required]{text-decoration:none}.usa-form .usa-input,.usa-form .usa-range,.usa-form .usa-select,.usa-form .usa-textarea{max-width:none}.usa-form .usa-input--2xs,.usa-form .usa-input-group--2xs{max-width:5ex}.usa-form .usa-input--xs,.usa-form .usa-input-group--xs{max-width:9ex}.usa-form .usa-input--sm,.usa-form .usa-input--small,.usa-form .usa-input-group--sm,.usa-form .usa-input-group--small{max-width:13ex}.usa-form .usa-input--md,.usa-form .usa-input--medium,.usa-form .usa-input-group--md,.usa-form .usa-input-group--medium{max-width:20ex}.usa-form .usa-input--lg,.usa-form .usa-input-group--lg{max-width:30ex}.usa-form .usa-input--xl,.usa-form .usa-input-group--xl{max-width:40ex}.usa-form .usa-input--2xl,.usa-form .usa-input-group--2xl{max-width:50ex}.usa-form .usa-button{margin-top:0.5rem}@media all and (min-width: 30em){.usa-form .usa-button{margin-top:1.5rem}}.usa-form a:where(:not(.usa-button)){color:#005ea2;text-decoration:underline}.usa-form a:where(:not(.usa-button)):visited{color:#54278f}.usa-form a:where(:not(.usa-button)):hover{color:#1a4480}.usa-form a:where(:not(.usa-button)):active{color:#162e51}.usa-form a:where(:not(.usa-button)):focus{outline:0.25rem solid #2491ff;outline-offset:0rem}@media all and (min-width: 30em){.usa-form--large{max-width:30rem}}.usa-show-password{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;cursor:pointer}.usa-show-password:visited{color:#54278f}.usa-show-password:hover{color:#1a4480}.usa-show-password:active{color:#162e51}.usa-show-password:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-show-password:hover,.usa-show-password.usa-button--hover,.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password:disabled.usa-button--hover,.usa-show-password[aria-disabled=true].usa-button--hover,.usa-show-password:active,.usa-show-password.usa-button--active,.usa-show-password:disabled:active,.usa-show-password[aria-disabled=true]:active,.usa-show-password:disabled.usa-button--active,.usa-show-password[aria-disabled=true].usa-button--active,.usa-show-password:disabled:focus,.usa-show-password[aria-disabled=true]:focus,.usa-show-password:disabled.usa-focus,.usa-show-password[aria-disabled=true].usa-focus,.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-show-password.usa-button--hover{color:#1a4480}.usa-show-password.usa-button--active{color:#162e51}.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:GrayText}}.usa-form__note,.usa-show-password{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:0.93rem;line-height:1.3;float:right;margin:0.25rem 0 1rem}.usa-fieldset{border:none;margin:0;padding:0}.usa-legend{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-legend--large{font-size:2.13rem;font-weight:700;margin-top:1rem}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;border:none;padding:0;margin-top:24px}'}}]);
|
package/dist/2108.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 2108.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([[2108,5285,265],{5285:function(e,a,t){t.r(a),t.d(a,{c:function(){return o}});var r,i,o=(r=function(e){!function(){var a={}.hasOwnProperty;function t(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var s=t.apply(null,i);s&&e.push(s)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var n in i)a.call(i,n)&&i[n]&&e.push(n);else e.push(i.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()},r(i={path:undefined,exports:{},require:function(e,a){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),i.exports)},265:function(e,a,t){function r(e,a){var t=e.shadowRoot.querySelector("slot").assignedNodes();return null!==a?Array.from(t).filter((function(e){return e.nodeName.toLowerCase()===a})):Array.from(t)}function i(e){return 1===e?"":"s"}function o(e,a){if(void 0===e||""===e)return"".concat(a," character").concat(i(a)," allowed");var t;if(e.length<=a){var r=a-e.length;t="".concat(r," character").concat(i(r)," left")}else r=e.length-a,t="".concat(r," character").concat(i(r)," over limit");return t}function s(e,a){return Array.from({length:a-e+1},(function(a,t){return e+t}))}t.r(a),t.d(a,{S:function(){return u},a:function(){return d},b:function(){return o},g:function(){return r},m:function(){return s},s:function(){return l}});var n=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,a){var t=function(e,a){if("string"!=typeof e)return[];if(!a||!n(a))return[];var t=a.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,a);return"string"!=typeof e||n(a)&&a.matches(e)&&t.push(a),t}var u={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return u._entities[e]},escapeHTML:function(e){for(var a="",t=0;t<e.length;t++)if(a+=e[t],t+1<arguments.length){var r=arguments[t+1]||"";a+=String(r).replace(u._entity,u.getEntity)}return a}};function d(e){var a;return(a="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&a<=6?"h".concat(a):null}},2108:function(e,a,t){t.r(a),t.d(a,{va_textarea:function(){return n}});var r=t(218),i=t(5285),o=(t(4786),t(265)),s=t(2764),n=function(){function e(e){var a=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.handleInput=function(e){var t=e.target;a.value=t.value},this.handleBlur=function(){a.enableAnalytics&&a.value&&a.componentLibraryAnalytics.emit({componentName:"va-textarea",action:"blur",details:{label:a.label,value:a.value}})},this.label=void 0,this.error=void 0,this.placeholder=void 0,this.name=void 0,this.required=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.maxlength=void 0,this.value=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1}return e.prototype.connectedCallback=function(){var e=this;s.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){s.i.off("languageChanged")},e.prototype.getMaxlength=function(){if(!(this.maxlength<=0))return this.maxlength},e.prototype.render=function(){var e=this,a=e.label,t=e.error,n=e.placeholder,l=e.name,u=e.required,d=e.value,c=e.hint,h=e.charcount,f=e.messageAriaDescribedby,m=e.useFormsPattern,p=e.formHeadingLevel,b=e.headerAriaDescribedby,g=e.formHeading,v=this.getMaxlength(),y="".concat(t?"input-error-message":""," ").concat(h&&v?"charcount-message":""," ").concat(f?"input-message":"").trim()||null,x="".concat(m&&g?"form-question":""," ").concat(m?"form-description":""," ").concat(m&&a?"input-label":"").trim()||null,w=(0,o.a)(this.labelHeaderLevel),_=b?"header-message":null,z=h&&(null==d?void 0:d.length)>v,T=(0,i.c)({"usa-label":!0,"usa-label--error":t}),A=(0,i.c)({"usa-textarea":!0,"usa-input--error":t}),S=(0,i.c)({"usa-hint":!0,"usa-character-count__status":h,"usa-character-count__status--invalid":h&&v&&(null==d?void 0:d.length)>v}),k=null;if("single"===m||"multiple"===m){var H=(0,o.a)(p);k=(0,r.h)(r.F,null,g&&(0,r.h)(H,{id:"form-question",part:"form-header"},g),(0,r.h)("div",{id:"form-description"},(0,r.h)("slot",{name:"form-description"})))}return(0,r.h)(r.H,null,k,(0,r.h)("div",{class:"input-wrap"},a&&(0,r.h)("label",{htmlFor:"input-type-textarea",id:"input-label",class:T,part:"label"},w?(0,r.h)(w,{part:"header","aria-describedby":_},a):a," ","multiple"===m&&(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},a),b&&(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},b),u&&(0,r.h)("span",{class:"usa-label--required"},s.i.t("required")),c&&(0,r.h)("div",{class:"usa-hint"},c)),(0,r.h)("slot",null),(0,r.h)("span",{id:"input-error-message",role:"alert"},t&&(0,r.h)(r.F,null,(0,r.h)("span",{class:"usa-sr-only"},s.i.t("error")),(0,r.h)("span",{class:"usa-error-message"},t))),(0,r.h)("textarea",{class:A,"aria-describedby":y,"aria-invalid":t||z?"true":"false","aria-labelledby":x,onInput:this.handleInput,onBlur:this.handleBlur,id:"input-type-textarea",placeholder:n,name:l,maxLength:h?void 0:v,value:d,part:"input-type-textarea"}),!h&&v&&(null==d?void 0:d.length)>=v&&(0,r.h)("span",{class:S,"aria-live":"polite"},s.i.t("max-chars",{length:v})),h&&v&&(0,r.h)("span",{id:"charcount-message",class:S,"aria-live":"polite"},(0,o.b)(d,v)),f&&(0,r.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},f)))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();n.style='button:not([disabled]):focus,:host([uswds=\'false\']) button:not([disabled]):active,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-textarea,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-textarea,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:0;color:GrayText}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:2px solid GrayText}}.usa-textarea{height:10rem}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""]):not([uswds=false])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""]):not([uswds=false])){margin-left:-0.9rem}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){padding-left:0}}.usa-textarea{resize:inherit}:host{color:var(--vads-color-base);display:block;resize:both;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}.usa-hint{display:block}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[2108,5285,2259],{5285:function(e,a,t){t.r(a),t.d(a,{c:function(){return o}});var r,i,o=(r=function(e){!function(){var a={}.hasOwnProperty;function t(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var n=t.apply(null,i);n&&e.push(n)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var s in i)a.call(i,s)&&i[s]&&e.push(s);else e.push(i.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()},r(i={path:undefined,exports:{},require:function(e,a){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),i.exports)},2259:function(e,a,t){function r(e,a){var t=e.shadowRoot.querySelector("slot").assignedNodes();return null!==a?Array.from(t).filter((function(e){return e.nodeName.toLowerCase()===a})):Array.from(t)}function i(e){return 1===e?"":"s"}function o(e,a){if(void 0===e||""===e)return"".concat(a," character").concat(i(a)," allowed");var t;if(e.length<=a){var r=a-e.length;t="".concat(r," character").concat(i(r)," left")}else r=e.length-a,t="".concat(r," character").concat(i(r)," over limit");return t}function n(e,a){return Array.from({length:a-e+1},(function(a,t){return e+t}))}t.r(a),t.d(a,{S:function(){return u},a:function(){return c},b:function(){return o},g:function(){return r},m:function(){return n},s:function(){return l}});var s=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,a){var t=function(e,a){if("string"!=typeof e)return[];if(!a||!s(a))return[];var t=a.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,a);return"string"!=typeof e||s(a)&&a.matches(e)&&t.push(a),t}var u={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return u._entities[e]},escapeHTML:function(e){for(var a="",t=0;t<e.length;t++)if(a+=e[t],t+1<arguments.length){var r=arguments[t+1]||"";a+=String(r).replace(u._entity,u.getEntity)}return a}};function c(e){var a;return(a="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&a<=6?"h".concat(a):null}},2108:function(e,a,t){t.r(a),t.d(a,{va_textarea:function(){return s}});var r=t(218),i=t(5285),o=(t(4786),t(2259)),n=t(2764),s=function(){function e(e){var a=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.handleInput=function(e){var t=e.target;a.value=t.value},this.handleBlur=function(){a.enableAnalytics&&a.value&&a.componentLibraryAnalytics.emit({componentName:"va-textarea",action:"blur",details:{label:a.label,value:a.value}})},this.label=void 0,this.error=void 0,this.placeholder=void 0,this.name=void 0,this.required=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.maxlength=void 0,this.value=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1}return e.prototype.connectedCallback=function(){var e=this;n.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){n.i.off("languageChanged")},e.prototype.getMaxlength=function(){if(!(this.maxlength<=0))return this.maxlength},e.prototype.render=function(){var e=this,a=e.label,t=e.error,s=e.placeholder,l=e.name,u=e.required,c=e.value,d=e.hint,h=e.charcount,f=e.messageAriaDescribedby,m=e.useFormsPattern,p=e.formHeadingLevel,b=e.headerAriaDescribedby,g=e.formHeading,v=this.getMaxlength(),y="".concat(t?"input-error-message":""," ").concat(h&&v?"charcount-message":""," ").concat(f?"input-message":"").trim()||null,x="".concat(m&&g?"form-question":""," ").concat(m?"form-description":""," ").concat(m&&a?"input-label":"").trim()||null,w=(0,o.a)(this.labelHeaderLevel),_=b?"header-message":null,z=h&&(null==c?void 0:c.length)>v,T=(0,i.c)({"usa-label":!0,"usa-label--error":t}),A=(0,i.c)({"usa-textarea":!0,"usa-input--error":t}),S=(0,i.c)({"usa-hint":!0,"usa-character-count__status":h,"usa-character-count__status--invalid":h&&v&&(null==c?void 0:c.length)>v}),k=null;if("single"===m||"multiple"===m){var H=(0,o.a)(p);k=(0,r.h)(r.F,null,g&&(0,r.h)(H,{id:"form-question",part:"form-header"},g),(0,r.h)("div",{id:"form-description"},(0,r.h)("slot",{name:"form-description"})))}return(0,r.h)(r.H,null,k,(0,r.h)("div",{class:"input-wrap"},a&&(0,r.h)("label",{htmlFor:"input-type-textarea",id:"input-label",class:T,part:"label"},w?(0,r.h)(w,{part:"header","aria-describedby":_},a):a," ","multiple"===m&&(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},a),b&&(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},b),u&&(0,r.h)("span",{class:"usa-label--required"},n.i.t("required")),d&&(0,r.h)("div",{class:"usa-hint"},d)),(0,r.h)("slot",null),(0,r.h)("span",{id:"input-error-message",role:"alert"},t&&(0,r.h)(r.F,null,(0,r.h)("span",{class:"usa-sr-only"},n.i.t("error")),(0,r.h)("span",{class:"usa-error-message"},t))),(0,r.h)("textarea",{class:A,"aria-describedby":y,"aria-invalid":t||z?"true":"false","aria-labelledby":x,onInput:this.handleInput,onBlur:this.handleBlur,id:"input-type-textarea",placeholder:s,name:l,maxLength:h?void 0:v,value:c,part:"input-type-textarea"}),!h&&v&&(null==c?void 0:c.length)>=v&&(0,r.h)("span",{class:S,"aria-live":"polite"},n.i.t("max-chars",{length:v})),h&&v&&(0,r.h)("span",{id:"charcount-message",class:S,"aria-live":"polite"},(0,o.b)(c,v)),f&&(0,r.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},f)))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();s.style='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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-textarea,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-textarea,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:0;color:GrayText}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:2px solid GrayText}}.usa-textarea{height:10rem}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}.usa-textarea{resize:inherit}:host{color:var(--vads-color-base);display:block;resize:both;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}.usa-hint{display:block}'}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[2259],{2259:function(t,n,r){function e(t,n){var r=t.shadowRoot.querySelector("slot").assignedNodes();return null!==n?Array.from(r).filter((function(t){return t.nodeName.toLowerCase()===n})):Array.from(r)}function o(t){return 1===t?"":"s"}function a(t,n){if(void 0===t||""===t)return"".concat(n," character").concat(o(n)," allowed");var r;if(t.length<=n){var e=n-t.length;r="".concat(e," character").concat(o(e)," left")}else e=t.length-n,r="".concat(e," character").concat(o(e)," over limit");return r}function c(t,n){return Array.from({length:n-t+1},(function(n,r){return t+r}))}r.r(n),r.d(n,{S:function(){return f},a:function(){return s},b:function(){return a},g:function(){return e},m:function(){return c},s:function(){return i}});var u=function(t){return t&&"object"==typeof t&&1===t.nodeType};function i(t,n){var r=function(t,n){if("string"!=typeof t)return[];if(!n||!u(n))return[];var r=n.shadowRoot.querySelectorAll(t);return Array.from(r)}(t,n);return"string"!=typeof t||u(n)&&n.matches(t)&&r.push(n),r}var f={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(t){return f._entities[t]},escapeHTML:function(t){for(var n="",r=0;r<t.length;r++)if(n+=t[r],r+1<arguments.length){var e=arguments[r+1]||"";n+=String(e).replace(f._entity,f.getEntity)}return n}};function s(t){var n;return(n="string"==typeof t?parseInt(t,10):Math.floor(t))>=1&&n<=6?"h".concat(n):null}}}]);
|
package/dist/2305.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 2305.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([[2305,5285,
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[2305,5285,2259],{5285:function(e,r,t){t.r(r),t.d(r,{c:function(){return i}});var n,o,i=(n=function(e){!function(){var r={}.hasOwnProperty;function t(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=t.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var s in o)r.call(o,s)&&o[s]&&e.push(s);else e.push(o.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()},n(o={path:undefined,exports:{},require:function(e,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),o.exports)},2259:function(e,r,t){function n(e,r){var t=e.shadowRoot.querySelector("slot").assignedNodes();return null!==r?Array.from(t).filter((function(e){return e.nodeName.toLowerCase()===r})):Array.from(t)}function o(e){return 1===e?"":"s"}function i(e,r){if(void 0===e||""===e)return"".concat(r," character").concat(o(r)," allowed");var t;if(e.length<=r){var n=r-e.length;t="".concat(n," character").concat(o(n)," left")}else n=e.length-r,t="".concat(n," character").concat(o(n)," over limit");return t}function a(e,r){return Array.from({length:r-e+1},(function(r,t){return e+t}))}t.r(r),t.d(r,{S:function(){return h},a:function(){return f},b:function(){return i},g:function(){return n},m:function(){return a},s:function(){return l}});var s=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,r){var t=function(e,r){if("string"!=typeof e)return[];if(!r||!s(r))return[];var t=r.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,r);return"string"!=typeof e||s(r)&&r.matches(e)&&t.push(r),t}var h={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return h._entities[e]},escapeHTML:function(e){for(var r="",t=0;t<e.length;t++)if(r+=e[t],t+1<arguments.length){var n=arguments[t+1]||"";r+=String(n).replace(h._entity,h.getEntity)}return r}};function f(e){var r;return(r="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&r<=6?"h".concat(r):null}},2305:function(e,r,t){t.r(r),t.d(r,{va_checkbox_group:function(){return s}});var n=t(218),o=t(5285),i=(t(4786),t(2259)),a=t(2764),s=function(){function e(e){(0,n.r)(this,e),this.componentLibraryAnalytics=(0,n.c)(this,"component-library-analytics",7),this.label=void 0,this.required=!1,this.error=void 0,this.enableAnalytics=!1,this.hint=void 0,this.labelHeaderLevel=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0}return e.prototype.vaChangeHandler=function(e){var r=e.target;this.enableAnalytics&&this.fireAnalyticsEvent(r.label)},e.prototype.fireAnalyticsEvent=function(e){this.componentLibraryAnalytics.emit({componentName:"va-checkbox-group",action:"change",details:{label:this.label,optionLabel:e,required:this.required}})},e.prototype.getHeaderLevel=function(){var e=parseInt(this.labelHeaderLevel,10);return e>=1&&e<=6?"h".concat(e):null},e.prototype.connectedCallback=function(){var e=this;a.i.on("languageChanged",(function(){(0,n.f)(e.el)}))},e.prototype.disconnectedCallback=function(){a.i.off("languageChanged")},e.prototype.render=function(){var e=this,r=e.label,t=e.required,s=e.error,l=e.hint,h=e.useFormsPattern,f=e.formHeadingLevel,u=e.formHeading,c=this.getHeaderLevel(),m="".concat(h&&u?"form-question":""," ").concat(h?"form-description":""," ").concat("multiple"===h?"header-message":"").trim()||null,p=(0,o.c)({"usa-legend":!0,"usa-label--error":s}),d=null;if("single"===h||"multiple"===h){var g=(0,i.a)(f);d=(0,n.h)(n.F,null,u&&(0,n.h)(g,{id:"form-question",part:"form-header"},u),(0,n.h)("div",{id:"form-description"},(0,n.h)("slot",{name:"form-description"})))}return(0,n.h)(n.H,{role:"group"},d,(0,n.h)("div",{class:"input-wrap"},(0,n.h)("fieldset",{class:"usa-fieldset","aria-labelledby":m},(0,n.h)("legend",{class:p},c?(0,n.h)(c,{part:"header"},r):r," ","multiple"===h&&(0,n.h)("span",{id:"header-message",class:"usa-sr-only"},r),t&&(0,n.h)("span",{class:"usa-label--required"},a.i.t("required")),l&&(0,n.h)("div",{class:"usa-hint"},l)),(0,n.h)("span",{id:"checkbox-error-message",role:"alert"},s&&(0,n.h)(n.F,null,(0,n.h)("span",{class:"usa-sr-only"},a.i.t("error")),(0,n.h)("span",{class:"usa-error-message"},s))),(0,n.h)("slot",null))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,n.g)(this)},enumerable:!1,configurable:!0}),e}();s.style='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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-fieldset{border:none;margin:0;padding:0}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;border:none;padding:0;margin-top:24px}'}}]);
|
package/dist/2843.app.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[2843,265],{265:function(e,t,i){function a(e,t){var i=e.shadowRoot.querySelector("slot").assignedNodes();return null!==t?Array.from(i).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(i)}function n(e){return 1===e?"":"s"}function o(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(n(t)," allowed");var i;if(e.length<=t){var a=t-e.length;i="".concat(a," character").concat(n(a)," left")}else a=e.length-t,i="".concat(a," character").concat(n(a)," over limit");return i}function r(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return c},a:function(){return h},b:function(){return o},g:function(){return a},m:function(){return r},s:function(){return l}});var s=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!s(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||s(t)&&t.matches(e)&&i.push(t),i}var c={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return c._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)if(t+=e[i],i+1<arguments.length){var a=arguments[i+1]||"";t+=String(a).replace(c._entity,c.getEntity)}return t}};function h(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}},2843:function(e,t,i){i.r(t),i.d(t,{va_file_input:function(){return W}});var a=i(218),n=(i(4786),i(265)),o=i(2764),r="usa",s="".concat(r,"-file-input"),l=".".concat(s),c="".concat(r,"-file-input__input"),h="".concat(r,"-file-input__target"),d=".".concat(c),f="".concat(r,"-file-input__box"),u="".concat(r,"-file-input__instructions"),p="".concat(r,"-file-input__preview"),m="".concat(r,"-file-input__preview-heading"),g="".concat(r,"-file-input--disabled"),v="".concat(r,"-file-input__choose"),b="".concat(r,"-file-input__accepted-files-message"),x="".concat(r,"-file-input__drag-text"),w="".concat(r,"-file-input--drag"),y="is-loading",A="has-invalid-file",z="".concat(r,"-file-input__preview-image"),L="".concat(z,"--generic"),T="".concat(z,"--pdf"),S="".concat(z,"--word"),_="".concat(z,"--video"),C="".concat(z,"--excel"),M="".concat(r,"-sr-only"),k="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",E=Boolean(!0),F="",H="",q=function(e){var t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"img_".concat(e.toLowerCase()):"__000".concat(t.toString(16).slice(-4))},B=function(e){return e.hasAttribute("multiple")?"files":"file"},R=function(e){var t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),i=function(e){var t=document.createElement("div"),i=document.createElement("div"),a=document.createElement("div");return e.classList.remove(s),e.classList.add(c),t.classList.add(s),a.classList.add(f),i.classList.add(h),i.prepend(a),e.parentNode.insertBefore(i,e),e.parentNode.insertBefore(t,i),i.appendChild(e),t.appendChild(i),i}(e),a=function(e){var t=e.closest(l),i=B(e),a=document.createElement("div"),o="Drag ".concat(i," here or"),r="choose from folder";return F="".concat(o," ").concat(r),a.classList.add(u),a.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",F),a.innerHTML=n.S.escapeHTML('<span class="'.concat(x,'">').concat(o,'</span> <span class="').concat(v,'">').concat(r,"</span>")),e.parentNode.insertBefore(a,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(".".concat(x)).outerHTML=""),a}(e),o=function(e){var t=e.closest(l);if(!t)throw new Error("Element is missing outer ".concat(l));var i=t.querySelector(d);return{dropZoneEl:t,inputEl:i}}(e).dropZoneEl;return t?o.classList.add(g):function(e){var t=document.createElement("div"),i=B(e),a=e.closest(l),n=e.closest(".".concat(h));H="No ".concat(i," selected."),t.classList.add(M),t.setAttribute("aria-live","polite"),t.textContent=H,a.insertBefore(t,n)}(e),{instructions:a,dropTarget:i}},N=function(e,t){var i=e.querySelectorAll(".".concat(p)),a=e.querySelector(".".concat(m)),n=e.querySelector(".".concat(b));a&&(a.outerHTML=""),n&&(n.outerHTML="",e.classList.remove(A)),null!==i&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(i,(function(e){e.parentNode.removeChild(e)})))},j=function(e,t,i,a){!function(e,t,i,a){var n=t.getAttribute("accept");a.classList.remove(A);var o=function(e,t){var i=!1;return e.indexOf(t)>=0&&(i=!0),i};if(n){for(var r=n.split(","),s=document.createElement("div"),l=!0,c=e.target.files||e.dataTransfer.files,h=0;h<c.length;h+=1){var d=c[h];if(!l)break;for(var f=0;f<r.length;f+=1){var u=r[f];if(l=d.name.indexOf(u)>0||o(d.type,u.replace(/\*/g,""))){E=!0;break}}}l||(N(a,i),t.value="",a.insertBefore(s,t),s.textContent=t.dataset.errormessage||"This is not a valid file type.",s.classList.add(b),a.classList.add(A),E=!1,e.preventDefault(),e.stopPropagation())}}(e,t,i,a),!0===E&&function(e,t,i,a){var o=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],r=a.closest(".".concat(s)).querySelector(".".concat(M)),l=[];N(a,i);for(var c=function(e){var t,r=new FileReader,s=o[e].name;l.push(s),r.onloadstart=function(){t=function(e){return"".concat(e,"-").concat(Math.floor(Date.now()/1e3))}(function(e){return e.replace(/[^a-z0-9]/g,q)}(s)),i.insertAdjacentHTML("afterend",n.S.escapeHTML('<div class="'.concat(p,'" aria-hidden="true">\n <img id="').concat(t,'" src="').concat(k,'" alt="" class="').concat(z," ").concat(y,'"/>').concat(s,"\n <div>")))},r.onloadend=function(){var e=a.querySelector("#".concat(t));s.indexOf(".pdf")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(k,'"; this.classList.add("').concat(T,'")')):s.indexOf(".doc")>0||s.indexOf(".pages")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(k,'"; this.classList.add("').concat(S,'")')):s.indexOf(".xls")>0||s.indexOf(".numbers")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(k,'"; this.classList.add("').concat(C,'")')):s.indexOf(".mov")>0||s.indexOf(".mp4")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(k,'"; this.classList.add("').concat(_,'")')):e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(k,'"; this.classList.add("').concat(L,'")')),e.classList.remove(y),e.src=r.result},o[e]&&r.readAsDataURL(o[e])},d=0;d<o.length;d+=1)c(d);0===o.length?t.setAttribute("aria-label",F):function(e,t){var i=document.createElement("div"),a=e.closest(".".concat(h)),o=a.querySelector(".".concat(u)),r="Change file",s="";1===t.length?s=n.S.escapeHTML('Selected file <span class="usa-file-input__choose">'.concat(r,"</span>")):t.length>1&&(r="Change files",s=n.S.escapeHTML("".concat(t.length,' files selected <span class="usa-file-input__choose">').concat(r,"</span>"))),o.setAttribute("hidden","true"),i.classList.add(m),i.innerHTML=s,a.insertBefore(i,o),e.setAttribute("aria-label",r)}(t,o),function(e,t,i){var a=e,n=H;1===t.length?n="You have selected the file: ".concat(i):t.length>1&&(n="You have selected ".concat(t.length," files: ").concat(i.join(", "))),setTimeout((function(){a.textContent=n}),1e3)}(r,o,l)}(e,t,i,a)},D={".txt":"text/plain",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".odt":"application/vnd.oasis.opendocument.text",".rtf":"application/rtf",".csv":"text/csv",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".bmp":"image/bmp",".webp":"image/webp",".tif":"image/tiff",".tiff":"image/tiff",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac",".mp4":"video/mp4",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".webm":"video/webm",".zip":"application/zip",".rar":"application/x-rar-compressed",".7z":"application/x-7z-compressed",".tar":"application/x-tar",".gz":"application/gzip",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript"},W=function(){function e(e){var t=this;(0,a.r)(this,e),this.vaChange=(0,a.c)(this,"vaChange",7),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.uploadStatus="idle",this.handleChange=function(e){var i=e.target;i.files&&i.files.length>0&&t.handleFile(i.files[0]),i.value=""},this.handleDrop=function(e){e.preventDefault(),e.stopPropagation();var i=e.dataTransfer.files;i.length>0&&t.handleFile(i[0])},this.handleFile=function(e){if(t.accept){var i=t.normalizeAcceptProp(t.accept);if(!t.isAcceptedFileType(e.type,i))return t.removeFile(!1),void(t.internalError="This is not a valid file type.")}t.file=e,t.vaChange.emit({files:[t.file]}),t.uploadStatus="success",t.internalError=null,t.generateFileContents(t.file),t.updateStatusMessage("You have selected the file: ".concat(t.file.name)),t.el.focus(),t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:t.label}})},this.removeFile=function(e){void 0===e&&(e=!0),t.closeModal(),t.uploadStatus="idle",t.internalError=null,e&&t.vaChange.emit({files:[]}),t.file=null,t.updateStatusMessage("File removed. No file selected."),t.el.focus()},this.openModal=function(){t.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),t.showModal=!0},this.closeModal=function(){t.showModal=!1,setTimeout((function(){t.fileInputRef.focus()}),0)},this.changeFile=function(){t.fileInputRef&&t.fileInputRef.click()},this.formatFileSize=function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";var i=Math.floor(Math.log(e)/Math.log(1024));if(0===i)return"".concat(e," ").concat(t[i]);var a=(e/Math.pow(1024,i)).toFixed(i<2?0:1);return"".concat(a," ").concat(t[i])},this.normalizeAcceptProp=function(e){return e.split(",").map((function(e){return(e=e.trim()).startsWith(".")?D[e]:e}))},this.isAcceptedFileType=function(e,t){for(var i=0,a=t;i<a.length;i++){var n=a[i];if(n===e)return!0;if(n.endsWith("/*")&&e.startsWith(n.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=function(e,t,i){var n=t?(0,a.h)("span",{class:"required"}," ",o.i.t("required")):null;if(i&&i>=1&&i<=6){var r="h".concat(i);return(0,a.h)("div",{class:"label-header"},(0,a.h)(r,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,n))}return(0,a.h)("div",{class:"label-header"},(0,a.h)("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,n))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.label=void 0,this.name=void 0,this.buttonText=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1}return e.prototype.updateStatusMessage=function(e){var t=this;setTimeout((function(){var i=t.el.shadowRoot.querySelector("#statusMessage");i&&(i.textContent=e)}),1e3)},e.prototype.generateFileContents=function(e){var t=this;if(e){var i=new FileReader;this.fileType=e.type,i.onloadend=function(){t.fileContents=i.result},this.fileType&&("application/pdf"===this.fileType||this.fileType.startsWith("image/"))&&i.readAsDataURL(e)}},e.prototype.componentDidLoad=function(){!function(e){(0,n.s)(l,e).forEach((function(e){var t=R(e),i=t.instructions,a=t.dropTarget;a.addEventListener("dragover",(function(){this.classList.add(w)}),!1),a.addEventListener("dragleave",(function(){this.classList.remove(w)}),!1),a.addEventListener("drop",(function(t){t.preventDefault(),this.classList.remove(w);var n=t.dataTransfer;if(t.target.files=n.files,!(n.files.length>1)){j(t,e,i,a);var o=new CustomEvent("change",{detail:{files:n.files}});e.dispatchEvent(o)}}),!1),e.addEventListener("input",(function(t){return j(t,e,i,a)}),!1)}))}(this.el)},e.prototype.connectedCallback=function(){this.el.addEventListener("change",this.handleChange)},e.prototype.disconnectedCallback=function(){this.el.removeEventListener("change",this.handleChange)},e.prototype.render=function(){var e=this,t=this,i=t.label,n=t.name,r=t.required,s=t.accept,l=t.error,c=t.hint,h=t.file,d=t.uploadStatus,f=t.headerSize,u=t.fileContents,p=t.fileType,m=t.headless,g=this.error||this.internalError,v="".concat(c?"input-hint-message":""," ").concat(g?"input-error-message":"").trim()||null,b="file-input-target ".concat(g?"file-input-target-error":"").trim(),x=(0,a.h)("div",{class:"thumbnail-container"},(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},(0,a.h)("path",{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"})));l?x=(0,a.h)("div",{class:"thumbnail-container"},(0,a.h)("va-icon",{icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):u&&(p.startsWith("image/")?x=(0,a.h)("div",{class:"thumbnail-container","aria-hidden":"true"},(0,a.h)("img",{class:"thumbnail-preview",src:u,alt:"image"})):"application/pdf"===p&&(x=(0,a.h)("div",{class:"thumbnail-container","aria-hidden":"true"},(0,a.h)("object",{class:"thumbnail-preview",data:u,type:"application/pdf"}))));var w=m?"headless-selected-files-wrapper":"selected-files-wrapper",y="usa-hint"+(m?" usa-sr-only":"");return(0,a.h)(a.H,{class:{"has-error":!!g}},(0,a.h)("span",{class:{"usa-sr-only":!!m}},i&&this.renderLabelOrHeader(i,r,f)),c&&(0,a.h)("div",{class:y,id:"input-hint-message"},c),(0,a.h)("div",{class:"file-input-wrapper",onDrop:this.handleDrop},(0,a.h)("input",{id:"fileInputField",class:"file-input",style:{visibility:"success"===this.uploadStatus?"hidden":"unset"},type:"file",ref:function(t){return e.fileInputRef=t},name:n,accept:s,"aria-describedby":v,onChange:this.handleChange}),"idle"===d&&(0,a.h)("div",null,(0,a.h)("span",{id:"file-input-error-alert",role:"alert"},g&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},o.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},g))),(0,a.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,a.h)("div",{class:b},(0,a.h)("div",{class:"file-input-box"}),(0,a.h)("div",{class:"file-input-instructions"},(0,a.h)("span",{class:"file-input-drag-text"},"Drag files here or"," "),(0,a.h)("span",{class:"file-input-choose-text"},"choose from folder")))),"idle"!==d&&(0,a.h)("div",{class:w},!m&&(0,a.h)("div",{class:"selected-files-label"},"Selected files"),(0,a.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,a.h)("va-card",{class:"va-card"},(0,a.h)("div",{class:"file-info-section"},x,(0,a.h)("div",{class:"file-info-group vads-u-line-height--2"},(0,a.h)("span",{class:"file-label"},h.name),(0,a.h)("span",{id:"input-error-message",role:"alert"},g&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},o.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},g))),(0,a.h)("span",{class:"file-size-label"},this.formatFileSize(h.size)))),h&&(0,a.h)("div",null,(0,a.h)("div",{class:"additional-info-slot"},(0,a.h)("slot",null)),(0,a.h)("div",{class:"file-button-section"},(0,a.h)("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:"Change file","aria-label":"change file "+h.name}),(0,a.h)("va-button-icon",{buttonType:"delete",onClick:this.openModal,"aria-label":"delete file "+h.name,label:"Delete"})),(0,a.h)("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, remove this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:function(){return e.removeFile(!0)},onSecondaryButtonClick:this.closeModal},"We'll remove the uploaded document ",(0,a.h)("span",{class:"file-label"},h.name)))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();W.style='button:not([disabled]):focus,:host([uswds=\'false\']) button:not([disabled]):active,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""]):not([uswds=false])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""]):not([uswds=false])){margin-left:-0.9rem}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){padding-left:0}}[hidden]{display:none}:host{display:block;font-family:var(--font-source-sans);font-size:16.96px;}:host .label-header{color:var(--vads-color-base);font-weight:var(--font-weight-normal)}:host .label-header-tag{margin:0;display:inline-block}:host .file-input-wrapper{display:block;max-width:30rem;width:100%;position:relative;margin:8px 0}:host .file-input{cursor:pointer;height:100%;width:100%;max-width:none;top:0;left:0;z-index:1;margin:0;position:absolute;text-indent:-999em;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target{border:1px dashed var(--uswds-system-color-gray-30);display:block;margin-top:0.3125rem;position:relative;text-align:center;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target.file-input-target-error{border:2px dashed var(--vads-color-secondary-dark)}:host .file-input-box{background:var(--vads-color-white);height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}:host .file-input-instructions{font-size:1.06rem;padding:1.25rem 0.625rem;pointer-events:none;position:relative;z-index:3}:host .file-input-choose-text{color:var(--vads-color-link);text-decoration:underline;font-weight:var(--font-weight-normal)}:host .file-icon{color:var(--vads-color-primary-alt-darkest)}:host .selected-files-wrapper{background-color:var(--vads-color-primary-lighter);border:1px solid var(--vads-color-base-light)}:host .selected-files-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;border-bottom:1px solid var(--vads-color-white);margin-bottom:8px;padding:8px}:host .va-card{margin:8px}:host .file-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;padding:0 8px;display:block;width:100%;word-wrap:break-word;word-break:break-word;overflow:hidden}:host #input-error-message{padding:0 8px;width:100%}:host .file-size-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-info-section{border-bottom:1px solid var(--vads-color-base-lighter);padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}:host .file-button-section>va-button-icon{font-size:1.06rem}@media screen and (max-width: 481px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .additional-info-slot{padding-bottom:16px}:host .vads-u-line-height--2{line-height:1.15}:host .thumbnail-container{height:40px;width:40px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .thumbnail-preview{max-width:40px;width:auto;max-height:40px;height:auto}:host .thumbnail-error{color:#b21d38}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}'}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[2843,2259],{2259:function(e,t,i){function a(e,t){var i=e.shadowRoot.querySelector("slot").assignedNodes();return null!==t?Array.from(i).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(i)}function n(e){return 1===e?"":"s"}function o(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(n(t)," allowed");var i;if(e.length<=t){var a=t-e.length;i="".concat(a," character").concat(n(a)," left")}else a=e.length-t,i="".concat(a," character").concat(n(a)," over limit");return i}function r(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return c},a:function(){return h},b:function(){return o},g:function(){return a},m:function(){return r},s:function(){return l}});var s=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!s(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||s(t)&&t.matches(e)&&i.push(t),i}var c={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return c._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)if(t+=e[i],i+1<arguments.length){var a=arguments[i+1]||"";t+=String(a).replace(c._entity,c.getEntity)}return t}};function h(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}},2843:function(e,t,i){i.r(t),i.d(t,{va_file_input:function(){return W}});var a=i(218),n=(i(4786),i(2259)),o=i(2764),r="usa",s="".concat(r,"-file-input"),l=".".concat(s),c="".concat(r,"-file-input__input"),h="".concat(r,"-file-input__target"),d=".".concat(c),f="".concat(r,"-file-input__box"),u="".concat(r,"-file-input__instructions"),p="".concat(r,"-file-input__preview"),m="".concat(r,"-file-input__preview-heading"),g="".concat(r,"-file-input--disabled"),v="".concat(r,"-file-input__choose"),b="".concat(r,"-file-input__accepted-files-message"),x="".concat(r,"-file-input__drag-text"),w="".concat(r,"-file-input--drag"),y="is-loading",A="has-invalid-file",z="".concat(r,"-file-input__preview-image"),L="".concat(z,"--generic"),T="".concat(z,"--pdf"),S="".concat(z,"--word"),_="".concat(z,"--video"),C="".concat(z,"--excel"),k="".concat(r,"-sr-only"),M="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",E=Boolean(!0),F="",H="",q=function(e){var t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"img_".concat(e.toLowerCase()):"__000".concat(t.toString(16).slice(-4))},B=function(e){return e.hasAttribute("multiple")?"files":"file"},R=function(e){var t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),i=function(e){var t=document.createElement("div"),i=document.createElement("div"),a=document.createElement("div");return e.classList.remove(s),e.classList.add(c),t.classList.add(s),a.classList.add(f),i.classList.add(h),i.prepend(a),e.parentNode.insertBefore(i,e),e.parentNode.insertBefore(t,i),i.appendChild(e),t.appendChild(i),i}(e),a=function(e){var t=e.closest(l),i=B(e),a=document.createElement("div"),o="Drag ".concat(i," here or"),r="choose from folder";return F="".concat(o," ").concat(r),a.classList.add(u),a.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",F),a.innerHTML=n.S.escapeHTML('<span class="'.concat(x,'">').concat(o,'</span> <span class="').concat(v,'">').concat(r,"</span>")),e.parentNode.insertBefore(a,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(".".concat(x)).outerHTML=""),a}(e),o=function(e){var t=e.closest(l);if(!t)throw new Error("Element is missing outer ".concat(l));var i=t.querySelector(d);return{dropZoneEl:t,inputEl:i}}(e).dropZoneEl;return t?o.classList.add(g):function(e){var t=document.createElement("div"),i=B(e),a=e.closest(l),n=e.closest(".".concat(h));H="No ".concat(i," selected."),t.classList.add(k),t.setAttribute("aria-live","polite"),t.textContent=H,a.insertBefore(t,n)}(e),{instructions:a,dropTarget:i}},N=function(e,t){var i=e.querySelectorAll(".".concat(p)),a=e.querySelector(".".concat(m)),n=e.querySelector(".".concat(b));a&&(a.outerHTML=""),n&&(n.outerHTML="",e.classList.remove(A)),null!==i&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(i,(function(e){e.parentNode.removeChild(e)})))},j=function(e,t,i,a){!function(e,t,i,a){var n=t.getAttribute("accept");a.classList.remove(A);var o=function(e,t){var i=!1;return e.indexOf(t)>=0&&(i=!0),i};if(n){for(var r=n.split(","),s=document.createElement("div"),l=!0,c=e.target.files||e.dataTransfer.files,h=0;h<c.length;h+=1){var d=c[h];if(!l)break;for(var f=0;f<r.length;f+=1){var u=r[f];if(l=d.name.indexOf(u)>0||o(d.type,u.replace(/\*/g,""))){E=!0;break}}}l||(N(a,i),t.value="",a.insertBefore(s,t),s.textContent=t.dataset.errormessage||"This is not a valid file type.",s.classList.add(b),a.classList.add(A),E=!1,e.preventDefault(),e.stopPropagation())}}(e,t,i,a),!0===E&&function(e,t,i,a){var o=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],r=a.closest(".".concat(s)).querySelector(".".concat(k)),l=[];N(a,i);for(var c=function(e){var t,r=new FileReader,s=o[e].name;l.push(s),r.onloadstart=function(){t=function(e){return"".concat(e,"-").concat(Math.floor(Date.now()/1e3))}(function(e){return e.replace(/[^a-z0-9]/g,q)}(s)),i.insertAdjacentHTML("afterend",n.S.escapeHTML('<div class="'.concat(p,'" aria-hidden="true">\n <img id="').concat(t,'" src="').concat(M,'" alt="" class="').concat(z," ").concat(y,'"/>').concat(s,"\n <div>")))},r.onloadend=function(){var e=a.querySelector("#".concat(t));s.indexOf(".pdf")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(T,'")')):s.indexOf(".doc")>0||s.indexOf(".pages")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(S,'")')):s.indexOf(".xls")>0||s.indexOf(".numbers")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(C,'")')):s.indexOf(".mov")>0||s.indexOf(".mp4")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(_,'")')):e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(M,'"; this.classList.add("').concat(L,'")')),e.classList.remove(y),e.src=r.result},o[e]&&r.readAsDataURL(o[e])},d=0;d<o.length;d+=1)c(d);0===o.length?t.setAttribute("aria-label",F):function(e,t){var i=document.createElement("div"),a=e.closest(".".concat(h)),o=a.querySelector(".".concat(u)),r="Change file",s="";1===t.length?s=n.S.escapeHTML('Selected file <span class="usa-file-input__choose">'.concat(r,"</span>")):t.length>1&&(r="Change files",s=n.S.escapeHTML("".concat(t.length,' files selected <span class="usa-file-input__choose">').concat(r,"</span>"))),o.setAttribute("hidden","true"),i.classList.add(m),i.innerHTML=s,a.insertBefore(i,o),e.setAttribute("aria-label",r)}(t,o),function(e,t,i){var a=e,n=H;1===t.length?n="You have selected the file: ".concat(i):t.length>1&&(n="You have selected ".concat(t.length," files: ").concat(i.join(", "))),setTimeout((function(){a.textContent=n}),1e3)}(r,o,l)}(e,t,i,a)},D={".txt":"text/plain",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".odt":"application/vnd.oasis.opendocument.text",".rtf":"application/rtf",".csv":"text/csv",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".bmp":"image/bmp",".webp":"image/webp",".tif":"image/tiff",".tiff":"image/tiff",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac",".mp4":"video/mp4",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".webm":"video/webm",".zip":"application/zip",".rar":"application/x-rar-compressed",".7z":"application/x-7z-compressed",".tar":"application/x-tar",".gz":"application/gzip",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript"},W=function(){function e(e){var t=this;(0,a.r)(this,e),this.vaChange=(0,a.c)(this,"vaChange",7),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.uploadStatus="idle",this.handleChange=function(e){var i=e.target;i.files&&i.files.length>0&&t.handleFile(i.files[0]),i.value=""},this.handleDrop=function(e){e.preventDefault(),e.stopPropagation();var i=e.dataTransfer.files;i.length>0&&t.handleFile(i[0])},this.handleFile=function(e){if(t.accept){var i=t.normalizeAcceptProp(t.accept);if(!t.isAcceptedFileType(e.type,i))return t.removeFile(!1),void(t.internalError="This is not a valid file type.")}t.file=e,t.vaChange.emit({files:[t.file]}),t.uploadStatus="success",t.internalError=null,t.generateFileContents(t.file),t.updateStatusMessage("You have selected the file: ".concat(t.file.name)),t.el.focus(),t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:t.label}})},this.removeFile=function(e){void 0===e&&(e=!0),t.closeModal(),t.uploadStatus="idle",t.internalError=null,e&&t.vaChange.emit({files:[]}),t.file=null,t.updateStatusMessage("File removed. No file selected."),t.el.focus()},this.openModal=function(){t.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),t.showModal=!0},this.closeModal=function(){t.showModal=!1,setTimeout((function(){t.fileInputRef.focus()}),0)},this.changeFile=function(){t.fileInputRef&&t.fileInputRef.click()},this.formatFileSize=function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";var i=Math.floor(Math.log(e)/Math.log(1024));if(0===i)return"".concat(e," ").concat(t[i]);var a=(e/Math.pow(1024,i)).toFixed(i<2?0:1);return"".concat(a," ").concat(t[i])},this.normalizeAcceptProp=function(e){return e.split(",").map((function(e){return(e=e.trim()).startsWith(".")?D[e]:e}))},this.isAcceptedFileType=function(e,t){for(var i=0,a=t;i<a.length;i++){var n=a[i];if(n===e)return!0;if(n.endsWith("/*")&&e.startsWith(n.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=function(e,t,i){var n=t?(0,a.h)("span",{class:"required"}," ",o.i.t("required")):null;if(i&&i>=1&&i<=6){var r="h".concat(i);return(0,a.h)("div",{class:"label-header"},(0,a.h)(r,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,n))}return(0,a.h)("div",{class:"label-header"},(0,a.h)("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,n))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.label=void 0,this.name=void 0,this.buttonText=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1}return e.prototype.updateStatusMessage=function(e){var t=this;setTimeout((function(){var i=t.el.shadowRoot.querySelector("#statusMessage");i&&(i.textContent=e)}),1e3)},e.prototype.generateFileContents=function(e){var t=this;if(e){var i=new FileReader;this.fileType=e.type,i.onloadend=function(){t.fileContents=i.result},this.fileType&&("application/pdf"===this.fileType||this.fileType.startsWith("image/"))&&i.readAsDataURL(e)}},e.prototype.componentDidLoad=function(){!function(e){(0,n.s)(l,e).forEach((function(e){var t=R(e),i=t.instructions,a=t.dropTarget;a.addEventListener("dragover",(function(){this.classList.add(w)}),!1),a.addEventListener("dragleave",(function(){this.classList.remove(w)}),!1),a.addEventListener("drop",(function(t){t.preventDefault(),this.classList.remove(w);var n=t.dataTransfer;if(t.target.files=n.files,!(n.files.length>1)){j(t,e,i,a);var o=new CustomEvent("change",{detail:{files:n.files}});e.dispatchEvent(o)}}),!1),e.addEventListener("input",(function(t){return j(t,e,i,a)}),!1)}))}(this.el)},e.prototype.connectedCallback=function(){this.el.addEventListener("change",this.handleChange)},e.prototype.disconnectedCallback=function(){this.el.removeEventListener("change",this.handleChange)},e.prototype.render=function(){var e=this,t=this,i=t.label,n=t.name,r=t.required,s=t.accept,l=t.error,c=t.hint,h=t.file,d=t.uploadStatus,f=t.headerSize,u=t.fileContents,p=t.fileType,m=t.headless,g=this.error||this.internalError,v="".concat(c?"input-hint-message":""," ").concat(g?"input-error-message":"").trim()||null,b="file-input-target ".concat(g?"file-input-target-error":"").trim(),x=(0,a.h)("div",{class:"thumbnail-container"},(0,a.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},(0,a.h)("path",{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"})));l?x=(0,a.h)("div",{class:"thumbnail-container"},(0,a.h)("va-icon",{icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):u&&(p.startsWith("image/")?x=(0,a.h)("div",{class:"thumbnail-container","aria-hidden":"true"},(0,a.h)("img",{class:"thumbnail-preview",src:u,alt:"image"})):"application/pdf"===p&&(x=(0,a.h)("div",{class:"thumbnail-container","aria-hidden":"true"},(0,a.h)("object",{class:"thumbnail-preview",data:u,type:"application/pdf"}))));var w=m?"headless-selected-files-wrapper":"selected-files-wrapper",y="usa-hint"+(m?" usa-sr-only":"");return(0,a.h)(a.H,{class:{"has-error":!!g}},(0,a.h)("span",{class:{"usa-sr-only":!!m}},i&&this.renderLabelOrHeader(i,r,f)),c&&(0,a.h)("div",{class:y,id:"input-hint-message"},c),(0,a.h)("div",{class:"file-input-wrapper",onDrop:this.handleDrop},(0,a.h)("input",{id:"fileInputField",class:"file-input",style:{visibility:"success"===this.uploadStatus?"hidden":"unset"},type:"file",ref:function(t){return e.fileInputRef=t},name:n,accept:s,"aria-describedby":v,onChange:this.handleChange}),"idle"===d&&(0,a.h)("div",null,(0,a.h)("span",{id:"file-input-error-alert",role:"alert"},g&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},o.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},g))),(0,a.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,a.h)("div",{class:b},(0,a.h)("div",{class:"file-input-box"}),(0,a.h)("div",{class:"file-input-instructions"},(0,a.h)("span",{class:"file-input-drag-text"},"Drag files here or"," "),(0,a.h)("span",{class:"file-input-choose-text"},"choose from folder")))),"idle"!==d&&(0,a.h)("div",{class:w},!m&&(0,a.h)("div",{class:"selected-files-label"},"Selected files"),(0,a.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,a.h)("va-card",{class:"va-card"},(0,a.h)("div",{class:"file-info-section"},x,(0,a.h)("div",{class:"file-info-group vads-u-line-height--2"},(0,a.h)("span",{class:"file-label"},h.name),(0,a.h)("span",{id:"input-error-message",role:"alert"},g&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},o.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},g))),(0,a.h)("span",{class:"file-size-label"},this.formatFileSize(h.size)))),h&&(0,a.h)("div",null,(0,a.h)("div",{class:"additional-info-slot"},(0,a.h)("slot",null)),(0,a.h)("div",{class:"file-button-section"},(0,a.h)("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:"Change file","aria-label":"change file "+h.name}),(0,a.h)("va-button-icon",{buttonType:"delete",onClick:this.openModal,"aria-label":"delete file "+h.name,label:"Delete"})),(0,a.h)("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, remove this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:function(){return e.removeFile(!0)},onSecondaryButtonClick:this.closeModal},"We'll remove the uploaded document ",(0,a.h)("span",{class:"file-label"},h.name)))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();W.style='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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}[hidden]{display:none}:host{display:block;font-family:var(--font-source-sans);font-size:16.96px;}:host .label-header{color:var(--vads-color-base);font-weight:var(--font-weight-normal)}:host .label-header-tag{margin:0;display:inline-block}:host .file-input-wrapper{display:block;max-width:30rem;width:100%;position:relative;margin:8px 0}:host .file-input{cursor:pointer;height:100%;width:100%;max-width:none;top:0;left:0;z-index:1;margin:0;position:absolute;text-indent:-999em;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target{border:1px dashed var(--vads-color-action-border-base-active-on-dark);display:block;margin-top:0.3125rem;position:relative;text-align:center;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target.file-input-target-error{border:2px dashed var(--vads-color-secondary-dark)}:host .file-input-box{background:var(--vads-color-white);height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}:host .file-input-instructions{font-size:1.06rem;padding:1.25rem 0.625rem;pointer-events:none;position:relative;z-index:3}:host .file-input-choose-text{color:var(--vads-color-link);text-decoration:underline;font-weight:var(--font-weight-normal)}:host .file-icon{color:var(--vads-color-primary-alt-darkest)}:host .selected-files-wrapper{background-color:var(--vads-color-primary-lighter);border:1px solid var(--vads-color-base-light)}:host .selected-files-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;border-bottom:1px solid var(--vads-color-white);margin-bottom:8px;padding:8px}:host .va-card{margin:8px}:host .file-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;padding:0 8px;display:block;width:100%;word-wrap:break-word;word-break:break-word;overflow:hidden}:host #input-error-message{padding:0 8px;width:100%}:host .file-size-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-info-section{border-bottom:1px solid var(--vads-color-base-lighter);padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}:host .file-button-section>va-button-icon{font-size:1.06rem}@media screen and (max-width: 481px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .additional-info-slot{padding-bottom:16px}:host .vads-u-line-height--2{line-height:1.15}:host .thumbnail-container{height:40px;width:40px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .thumbnail-preview{max-width:40px;width:auto;max-height:40px;height:auto}:host .thumbnail-error{color:#b21d38}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}'}}]);
|
package/dist/3389.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3389.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([[3389,5285,265],{5285:function(e,t,i){i.r(t),i.d(t,{c:function(){return s}});var a,r,s=(a=function(e){!function(){var t={}.hasOwnProperty;function i(){for(var e=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var s=typeof r;if("string"===s||"number"===s)e.push(r);else if(Array.isArray(r)){if(r.length){var o=i.apply(null,r);o&&e.push(o)}}else if("object"===s)if(r.toString===Object.prototype.toString)for(var n in r)t.call(r,n)&&r[n]&&e.push(n);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):window.classNames=i}()},a(r={path:undefined,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports)},265:function(e,t,i){function a(e,t){var i=e.shadowRoot.querySelector("slot").assignedNodes();return null!==t?Array.from(i).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(i)}function r(e){return 1===e?"":"s"}function s(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(r(t)," allowed");var i;if(e.length<=t){var a=t-e.length;i="".concat(a," character").concat(r(a)," left")}else a=e.length-t,i="".concat(a," character").concat(r(a)," over limit");return i}function o(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return l},a:function(){return d},b:function(){return s},g:function(){return a},m:function(){return o},s:function(){return u}});var n=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!n(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||n(t)&&t.matches(e)&&i.push(t),i}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)if(t+=e[i],i+1<arguments.length){var a=arguments[i+1]||"";t+=String(a).replace(l._entity,l.getEntity)}return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}},3389:function(e,t,i){i.r(t),i.d(t,{va_select:function(){return n},va_text_input:function(){return u}});var a=i(218),r=i(5285),s=(i(4786),i(265)),o=i(2764),n=function(){function e(e){(0,a.r)(this,e),this.vaKeyDown=(0,a.c)(this,"vaKeyDown",7),this.vaSelect=(0,a.c)(this,"vaSelect",7),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.required=!1,this.label=void 0,this.name=void 0,this.value=void 0,this.error=void 0,this.reflectInputError=!1,this.invalid=!1,this.enableAnalytics=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.options=void 0}return e.prototype.connectedCallback=function(){var e=this;o.i.on("languageChanged",(function(){(0,a.f)(e.el)}))},e.prototype.disconnectedCallback=function(){o.i.off("languageChanged")},e.prototype.handleKeyDown=function(){this.vaKeyDown.emit()},e.prototype.handleChange=function(e){var t=e.target;if(this.value=t.value,this.enableAnalytics){var i={componentName:"va-select",action:"change",details:{label:this.label,selectLabel:this.value}};this.componentLibraryAnalytics.emit(i)}this.vaSelect.emit({value:this.value})},e.prototype.populateOptions=function(){var e=this.value;this.options=(0,s.g)(this.el,"option").map((function(t){return(0,a.h)("option",{value:t.value,selected:e===t.value},t.text)}))},e.prototype.handleValueChange=function(){this.populateOptions()},e.prototype.render=function(){var e=this,t=this,i=t.error,s=t.reflectInputError,n=t.invalid,u=t.label,l=t.required,d=t.name,p=t.hint,c=t.messageAriaDescribedby,h="input-error-message",f="".concat(c?"input-message":""," ").concat(i?h:""," ").concat(p?"input-hint":"").trim()||null,m=(0,r.c)({"usa-label":!0,"usa-label--error":i}),b=(0,r.c)({"usa-select":!0,"usa-input--error":i||s});return(0,a.h)(a.H,null,u&&(0,a.h)("label",{htmlFor:"options",class:m,part:"label"},u,l&&(0,a.h)("span",{class:"usa-label--required"}," ",o.i.t("required"))),p&&(0,a.h)("span",{class:"usa-hint",id:"input-hint"},p),(0,a.h)("span",{id:h,role:"alert"},i&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},o.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},i))),(0,a.h)("slot",{onSlotchange:function(){return e.populateOptions()}}),(0,a.h)("select",{class:b,"aria-describedby":f,"aria-invalid":n||i?"true":"false",id:"options",name:d,required:l||null,onKeyDown:function(){return e.handleKeyDown()},onChange:function(t){return e.handleChange(t)},part:"select"},(0,a.h)("option",{key:"0",value:"",selected:!0},o.i.t("select")),this.options),c&&(0,a.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},c))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{value:["handleValueChange"]}},enumerable:!1,configurable:!0}),e}();n.style='.usa-select,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-select,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-icon{display:inline-block;fill:currentColor;height:1em;position:relative;width:1em}.usa-icon--size-3{height:1.5rem;width:1.5rem}.usa-icon--size-4{height:2rem;width:2rem}.usa-icon--size-5{height:2.5rem;width:2.5rem}.usa-icon--size-6{height:3rem;width:3rem}.usa-icon--size-7{height:3.5rem;width:3.5rem}.usa-icon--size-8{height:4rem;width:4rem}.usa-icon--size-9{height:4.5rem;width:4.5rem}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-select{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:white;background-position:right 0.5rem center;background-size:1.25rem;padding-right:2rem}.usa-select::-ms-expand{display:none}.usa-select:-webkit-autofill{-webkit-appearance:menulist;appearance:menulist}.usa-select:-moz-focusring{color:transparent;text-shadow:0 0 0 black}.usa-select[multiple]{height:auto;background-image:none;padding-right:0}.usa-select option{overflow:hidden;text-overflow:ellipsis}.usa-select:disabled,.usa-select[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:0;color:GrayText}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:2px solid GrayText}}@media (forced-colors: active){.usa-select{-webkit-appearance:listbox;-moz-appearance:listbox;appearance:listbox;background-image:none;padding-right:0}}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""]):not([uswds=false])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""]):not([uswds=false])){margin-left:-0.9rem}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;font-family:var(--font-source-sans);color:var(--vads-color-base)}:host([inert]) select{border:0;background:none}.usa-select{margin-bottom:0}::slotted(option){display:none}';var u=function(){function e(e){var t=this;(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.allowedInputTypes=["email","number","search","tel","text","url"],this.updatePaddingLeft=function(){if(t.inputIconPrefix)t.paddingLeftValue="2.5rem";else if(t.inputPrefix){var e=t.inputPrefix?Math.min(t.inputPrefix.length,25):null;t.paddingLeftValue="".concat(.5*e+1,"rem")}},this.updatePaddingRight=function(){var e=t.inputSuffix?Math.min(t.inputSuffix.length,25):null;t.paddingRightValue="".concat(.5*e+1,"rem")},this.handleInput=function(e){var i=e.target;t.value=i.value},this.handleBlur=function(e){if(t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-text-input",action:"blur",details:{label:t.label,value:t.value}}),"decimal"===t.inputmode||"numeric"===t.inputmode||t.currency){var i=o.i.t("number-error"),a=e.target.checkValidity();t.error||a?t.error&&t.error===i&&a&&(t.error=null,t.el.setAttribute("error","")):(t.error=i,t.el.setAttribute("error",i))}},this.label=void 0,this.error=void 0,this.reflectInputError=!1,this.showInputError=!0,this.invalid=!1,this.required=!1,this.inputmode=void 0,this.step=void 0,this.type="text",this.maxlength=void 0,this.autocomplete=void 0,this.enableAnalytics=!1,this.name=void 0,this.pattern=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0,this.value=void 0,this.success=!1,this.width=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1,this.currency=!1,this.inputPrefix=void 0,this.inputIconPrefix=void 0,this.inputSuffix=void 0,this.inputIconSuffix=void 0,this.min=void 0,this.max=void 0,this.paddingLeftValue="0",this.paddingRightValue="0"}return e.prototype.componentWillLoad=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.componentDidUpdate=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.getInputType=function(){return this.allowedInputTypes.includes(this.type)?this.max||this.min?"number":this.type:"text"},e.prototype.getMaxlength=function(){if(!(this.maxlength<=0))return this.maxlength},e.prototype.getPattern=function(){return this.currency?"^[0-9]+(.[0-9]{2})?$":void 0!==this.pattern||"decimal"!==this.inputmode&&"numeric"!==this.inputmode?this.pattern:"[0-9]+(.[0-9]{1,})?"},e.prototype.getInputmode=function(){return this.currency?"numeric":this.inputmode?this.inputmode:void 0},e.prototype.getStep=function(){return this.step||"decimal"!==this.inputmode?this.step?this.step:void 0:".01"},e.prototype.connectedCallback=function(){var e=this;o.i.on("languageChanged",(function(){(0,a.f)(e.el)}))},e.prototype.disconnectedCallback=function(){o.i.off("languageChanged")},e.prototype.render=function(){var e,t=this,i=this,n=i.label,u=i.error,l=i.reflectInputError,d=i.showInputError,p=i.invalid,c=i.required,h=i.value,f=i.name,m=i.autocomplete,b=i.hint,g=i.handleInput,v=i.handleBlur,x=i.success,y=i.messageAriaDescribedby,w=i.width,k=i.useFormsPattern,z=i.formHeadingLevel,S=i.formHeading,P=i.charcount,T=i.min,A=i.max,C=i.currency,_=i.inputPrefix,L=i.inputIconPrefix,q=i.inputSuffix,F=i.inputIconSuffix,D=this.getInputType(),I=this.getMaxlength(),G=this.getInputmode(),H=this.getStep(),N="".concat(y?"input-message":""," ").concat(u?"input-error-message":""," ").concat(P&&I?"charcount-message":"").trim()||null,R="".concat(k&&S?"form-question":""," ").concat(k?"form-description":""," ").concat(k&&n?"input-label":"").trim()||null,E=this.getPattern(),M=(0,r.c)({"currency-wrapper":C,"usa-input-group":q||_||L||F}),V="0"!==t.paddingLeftValue&&_?{paddingLeft:t.paddingLeftValue}:q?{paddingRight:t.paddingRightValue}:{},W=I&&(null==h?void 0:h.length)>I,j=(0,r.c)({"usa-label":!0,"usa-label--error":u}),O=(0,r.c)(((e={"usa-input":!0,"usa-input--success":x,"usa-input--error":u||l})["usa-input--".concat(w)]=w,e)),B=(0,r.c)({"usa-hint":!0,"usa-character-count__status":I,"usa-character-count__status--invalid":I&&(null==h?void 0:h.length)>I}),K=(0,r.c)({"usa-sr-only":!d}),$=null;if("single"===k||"multiple"===k){var U=(0,s.a)(z);$=(0,a.h)(a.F,null,S&&(0,a.h)(U,{id:"form-question",part:"form-header"},S),(0,a.h)("div",{id:"form-description"},(0,a.h)("slot",{name:"form-description"})))}return(0,a.h)(a.H,null,$,(0,a.h)("div",{class:"input-wrap"},n&&(0,a.h)("label",{htmlFor:"inputField",id:"input-label",class:j,part:"label"},n,c&&(0,a.h)("span",{class:"usa-label--required"}," ",o.i.t("required")),b&&(0,a.h)("span",{class:"usa-hint"},b)),(0,a.h)("slot",null),(0,a.h)("span",{id:"input-error-message",role:"alert",class:K},u&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},o.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},u))),(0,a.h)("div",{class:M},C&&(0,a.h)("div",{id:"symbol"},"$"),_&&(0,a.h)("div",{class:"usa-input-prefix",part:"input-prefix"},_.substring(0,25)),L&&(0,a.h)("div",{class:"usa-input-prefix",part:"input-prefix"},(0,a.h)("va-icon",{icon:L,size:3,part:"icon"})),(0,a.h)("input",{class:O,id:"inputField",type:D,value:h,onInput:g,onBlur:v,"aria-describedby":N,style:V,"aria-labelledby":R,"aria-invalid":p||u||W?"true":"false",inputmode:G,step:H,maxlength:I,pattern:E,name:f,autocomplete:m,required:c||null,part:"input",min:T,max:A}),q&&(0,a.h)("div",{class:"usa-input-suffix",part:"suffix","aria-hidden":"true"},q.substring(0,25)),F&&(0,a.h)("div",{class:"usa-input-suffix",part:"input-suffix"},(0,a.h)("va-icon",{icon:F,size:3,part:"icon"}))),y&&(0,a.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},y),P&&I&&(0,a.h)("span",{id:"charcount-message",class:B,"aria-live":"polite"},(0,s.b)(h,I))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();u.style='button:not([disabled]):focus,:host([uswds=\'false\']) button:not([disabled]):active,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-input-group,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-input-group,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input-group{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:0;position:relative}.usa-input-group--error input:focus,.usa-input-group--success input:focus{outline-offset:0.25rem}.usa-input-group--error{border-width:0.25rem;border-color:#b50909;border-style:solid}.usa-input-group--success{border-width:0.25rem;border-color:#00a91c;border-style:solid}.usa-input-group input{padding-right:2.5rem;border:0;height:100%;margin-top:0;min-width:0;width:100%}.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{border:0;color:GrayText}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input-group input:disabled,.usa-input-group input[aria-disabled=true]{border:0}}@media (forced-colors: active){.usa-input-group:has(input:disabled),.usa-input-group:has(input[aria-disabled=true]){border:2px solid GrayText}}.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){border:0;color:GrayText}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:GrayText}}.usa-input-prefix,.usa-input-suffix{position:absolute;color:#71767a;line-height:0;padding:0 0.5rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.usa-input-prefix .usa-icon,.usa-input-suffix .usa-icon{height:1.5rem;width:1.5rem}.usa-input-prefix+input{padding-left:2.5rem;padding-right:0.5rem}.usa-input-suffix{right:0}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""]):not([uswds=false])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""]):not([uswds=false])){margin-left:-0.9rem}:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""]):not([uswds=false])[use-forms-pattern=multiple]){padding-left:0}}:host([uswds=false]) .usa-input--2xs,:host .usa-input--2xs{max-width:5ex}:host([uswds=false]) .usa-input--xs,:host .usa-input--xs{max-width:9ex}:host([uswds=false]) .usa-input--sm,:host([uswds=false]) .usa-input--small,:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host([uswds=false]) .usa-input--md,:host([uswds=false]) .usa-input--medium,:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host([uswds=false]) .usa-input--lg,:host .usa-input--lg{max-width:30ex}:host([uswds=false]) .usa-input--xl,:host .usa-input--xl{max-width:40ex}:host([uswds=false]) .usa-input--2xl,:host .usa-input--2xl{max-width:50ex}:host(:not([uswds=false])){color:var(--vads-color-base)}:host{display:block;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}:host(:not([uswds=false])) input:not([disabled]):focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}input{-webkit-box-sizing:border-box;box-sizing:border-box}input.usa-input{color:var(--vads-color-base)}.usa-hint{display:block}.currency-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.currency-wrapper>div{position:absolute;left:10px}.currency-wrapper #symbol{margin-top:8px}.currency-wrapper #inputField{padding-left:25px}:host([error]:not([error=""])[show-input-error=false]){border-left:0;padding-left:0;margin-left:0}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[3389,5285,2259],{5285:function(e,t,i){i.r(t),i.d(t,{c:function(){return s}});var a,r,s=(a=function(e){!function(){var t={}.hasOwnProperty;function i(){for(var e=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var s=typeof r;if("string"===s||"number"===s)e.push(r);else if(Array.isArray(r)){if(r.length){var n=i.apply(null,r);n&&e.push(n)}}else if("object"===s)if(r.toString===Object.prototype.toString)for(var o in r)t.call(r,o)&&r[o]&&e.push(o);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):window.classNames=i}()},a(r={path:undefined,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports)},2259:function(e,t,i){function a(e,t){var i=e.shadowRoot.querySelector("slot").assignedNodes();return null!==t?Array.from(i).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(i)}function r(e){return 1===e?"":"s"}function s(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(r(t)," allowed");var i;if(e.length<=t){var a=t-e.length;i="".concat(a," character").concat(r(a)," left")}else a=e.length-t,i="".concat(a," character").concat(r(a)," over limit");return i}function n(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return l},a:function(){return d},b:function(){return s},g:function(){return a},m:function(){return n},s:function(){return u}});var o=function(e){return e&&"object"==typeof e&&1===e.nodeType};function u(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!o(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||o(t)&&t.matches(e)&&i.push(t),i}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)if(t+=e[i],i+1<arguments.length){var a=arguments[i+1]||"";t+=String(a).replace(l._entity,l.getEntity)}return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}},3389:function(e,t,i){i.r(t),i.d(t,{va_select:function(){return o},va_text_input:function(){return u}});var a=i(218),r=i(5285),s=(i(4786),i(2259)),n=i(2764),o=function(){function e(e){(0,a.r)(this,e),this.vaKeyDown=(0,a.c)(this,"vaKeyDown",7),this.vaSelect=(0,a.c)(this,"vaSelect",7),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.required=!1,this.label=void 0,this.name=void 0,this.value=void 0,this.error=void 0,this.reflectInputError=!1,this.invalid=!1,this.enableAnalytics=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.width=void 0,this.options=void 0}return e.prototype.connectedCallback=function(){var e=this;n.i.on("languageChanged",(function(){(0,a.f)(e.el)}))},e.prototype.disconnectedCallback=function(){n.i.off("languageChanged")},e.prototype.handleKeyDown=function(){this.vaKeyDown.emit()},e.prototype.handleChange=function(e){var t=e.target;if(this.value=t.value,this.enableAnalytics){var i={componentName:"va-select",action:"change",details:{label:this.label,selectLabel:this.value}};this.componentLibraryAnalytics.emit(i)}this.vaSelect.emit({value:this.value})},e.prototype.populateOptions=function(){var e=this.value;this.options=(0,s.g)(this.el,"option").map((function(t){return(0,a.h)("option",{value:t.value,selected:e===t.value},t.text)}))},e.prototype.handleValueChange=function(){this.populateOptions()},e.prototype.render=function(){var e,t=this,i=this,s=i.error,o=i.reflectInputError,u=i.invalid,l=i.label,d=i.required,p=i.name,c=i.hint,h=i.messageAriaDescribedby,f=i.width,m="input-error-message",b="".concat(h?"input-message":""," ").concat(s?m:""," ").concat(c?"input-hint":"").trim()||null,g=(0,r.c)({"usa-label":!0,"usa-label--error":s}),v=(0,r.c)(((e={"usa-select":!0,"usa-input--error":s||o})["usa-input--".concat(f)]=f,e));return(0,a.h)(a.H,null,l&&(0,a.h)("label",{htmlFor:"options",class:g,part:"label"},l,d&&(0,a.h)("span",{class:"usa-label--required"}," ",n.i.t("required"))),c&&(0,a.h)("span",{class:"usa-hint",id:"input-hint"},c),(0,a.h)("span",{id:m,role:"alert"},s&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},n.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},s))),(0,a.h)("slot",{onSlotchange:function(){return t.populateOptions()}}),(0,a.h)("select",{class:v,"aria-describedby":b,"aria-invalid":u||s?"true":"false",id:"options",name:p,required:d||null,onKeyDown:function(){return t.handleKeyDown()},onChange:function(e){return t.handleChange(e)},part:"select"},(0,a.h)("option",{key:"0",value:"",selected:!0},n.i.t("select")),this.options),h&&(0,a.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},h))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{value:["handleValueChange"]}},enumerable:!1,configurable:!0}),e}();o.style='.usa-select,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-select,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-icon{display:inline-block;fill:currentColor;height:1em;position:relative;width:1em}.usa-icon--size-3{height:1.5rem;width:1.5rem}.usa-icon--size-4{height:2rem;width:2rem}.usa-icon--size-5{height:2.5rem;width:2.5rem}.usa-icon--size-6{height:3rem;width:3rem}.usa-icon--size-7{height:3.5rem;width:3.5rem}.usa-icon--size-8{height:4rem;width:4rem}.usa-icon--size-9{height:4.5rem;width:4.5rem}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-select{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:white;background-position:right 0.5rem center;background-size:1.25rem;padding-right:2rem}.usa-select::-ms-expand{display:none}.usa-select:-webkit-autofill{-webkit-appearance:menulist;appearance:menulist}.usa-select:-moz-focusring{color:transparent;text-shadow:0 0 0 black}.usa-select[multiple]{height:auto;background-image:none;padding-right:0}.usa-select option{overflow:hidden;text-overflow:ellipsis}.usa-select:disabled,.usa-select[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:0;color:GrayText}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:2px solid GrayText}}@media (forced-colors: active){.usa-select{-webkit-appearance:listbox;-moz-appearance:listbox;appearance:listbox;background-image:none;padding-right:0}}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;font-family:var(--font-source-sans);color:var(--vads-color-base)}:host([inert]) select{border:0;background:none}.usa-select{margin-bottom:0}::slotted(option){display:none}';var u=function(){function e(e){var t=this;(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.allowedInputTypes=["email","number","search","tel","text","url"],this.updatePaddingLeft=function(){if(t.inputIconPrefix)t.paddingLeftValue="2.5rem";else if(t.inputPrefix){var e=t.inputPrefix?Math.min(t.inputPrefix.length,25):null;t.paddingLeftValue="".concat(.5*e+1,"rem")}},this.updatePaddingRight=function(){var e=t.inputSuffix?Math.min(t.inputSuffix.length,25):null;t.paddingRightValue="".concat(.5*e+1,"rem")},this.handleInput=function(e){var i=e.target;t.value=i.value},this.handleBlur=function(e){if(t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-text-input",action:"blur",details:{label:t.label,value:t.value}}),"decimal"===t.inputmode||"numeric"===t.inputmode||t.currency){var i=n.i.t("number-error"),a=e.target.checkValidity();t.error||a?t.error&&t.error===i&&a&&(t.error=null,t.el.setAttribute("error","")):(t.error=i,t.el.setAttribute("error",i))}},this.label=void 0,this.error=void 0,this.reflectInputError=!1,this.showInputError=!0,this.invalid=!1,this.required=!1,this.inputmode=void 0,this.step=void 0,this.type="text",this.maxlength=void 0,this.autocomplete=void 0,this.enableAnalytics=!1,this.name=void 0,this.pattern=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0,this.value=void 0,this.success=!1,this.width=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1,this.currency=!1,this.inputPrefix=void 0,this.inputIconPrefix=void 0,this.inputSuffix=void 0,this.inputIconSuffix=void 0,this.min=void 0,this.max=void 0,this.paddingLeftValue="0",this.paddingRightValue="0"}return e.prototype.componentWillLoad=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.componentDidUpdate=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.getInputType=function(){return this.allowedInputTypes.includes(this.type)?this.max||this.min?"number":this.type:"text"},e.prototype.getMaxlength=function(){if(!(this.maxlength<=0))return this.maxlength},e.prototype.getPattern=function(){return this.currency?"^[0-9]+(.[0-9]{2})?$":void 0!==this.pattern||"decimal"!==this.inputmode&&"numeric"!==this.inputmode?this.pattern:"[0-9]+(.[0-9]{1,})?"},e.prototype.getInputmode=function(){return this.currency?"numeric":this.inputmode?this.inputmode:void 0},e.prototype.getStep=function(){return this.step||"decimal"!==this.inputmode?this.step?this.step:void 0:".01"},e.prototype.connectedCallback=function(){var e=this;n.i.on("languageChanged",(function(){(0,a.f)(e.el)}))},e.prototype.disconnectedCallback=function(){n.i.off("languageChanged")},e.prototype.render=function(){var e,t=this,i=this,o=i.label,u=i.error,l=i.reflectInputError,d=i.showInputError,p=i.invalid,c=i.required,h=i.value,f=i.name,m=i.autocomplete,b=i.hint,g=i.handleInput,v=i.handleBlur,x=i.success,y=i.messageAriaDescribedby,w=i.width,k=i.useFormsPattern,z=i.formHeadingLevel,S=i.formHeading,P=i.charcount,T=i.min,A=i.max,C=i.currency,_=i.inputPrefix,L=i.inputIconPrefix,q=i.inputSuffix,F=i.inputIconSuffix,D=this.getInputType(),I=this.getMaxlength(),G=this.getInputmode(),H=this.getStep(),N="".concat(y?"input-message":""," ").concat(u?"input-error-message":""," ").concat(P&&I?"charcount-message":"").trim()||null,R="".concat(k&&S?"form-question":""," ").concat(k?"form-description":""," ").concat(k&&o?"input-label":"").trim()||null,E=this.getPattern(),M=(0,r.c)({"currency-wrapper":C,"usa-input-group":q||_||L||F}),V="0"!==t.paddingLeftValue&&_?{paddingLeft:t.paddingLeftValue}:q?{paddingRight:t.paddingRightValue}:{},W=I&&(null==h?void 0:h.length)>I,j=(0,r.c)({"usa-label":!0,"usa-label--error":u}),O=(0,r.c)(((e={"usa-input":!0,"usa-input--success":x,"usa-input--error":u||l})["usa-input--".concat(w)]=w,e)),B=(0,r.c)({"usa-hint":!0,"usa-character-count__status":I,"usa-character-count__status--invalid":I&&(null==h?void 0:h.length)>I}),K=(0,r.c)({"usa-sr-only":!d}),$=null;if("single"===k||"multiple"===k){var U=(0,s.a)(z);$=(0,a.h)(a.F,null,S&&(0,a.h)(U,{id:"form-question",part:"form-header"},S),(0,a.h)("div",{id:"form-description"},(0,a.h)("slot",{name:"form-description"})))}return(0,a.h)(a.H,null,$,(0,a.h)("div",{class:"input-wrap"},o&&(0,a.h)("label",{htmlFor:"inputField",id:"input-label",class:j,part:"label"},o,c&&(0,a.h)("span",{class:"usa-label--required"}," ",n.i.t("required")),b&&(0,a.h)("span",{class:"usa-hint"},b)),(0,a.h)("slot",null),(0,a.h)("span",{id:"input-error-message",role:"alert",class:K},u&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"usa-sr-only"},n.i.t("error")),(0,a.h)("span",{class:"usa-error-message"},u))),(0,a.h)("div",{class:M},C&&(0,a.h)("div",{id:"symbol"},"$"),_&&(0,a.h)("div",{class:"usa-input-prefix",part:"input-prefix"},_.substring(0,25)),L&&(0,a.h)("div",{class:"usa-input-prefix",part:"input-prefix"},(0,a.h)("va-icon",{icon:L,size:3,part:"icon"})),(0,a.h)("input",{class:O,id:"inputField",type:D,value:h,onInput:g,onBlur:v,"aria-describedby":N,style:V,"aria-labelledby":R,"aria-invalid":p||u||W?"true":"false",inputmode:G,step:H,maxlength:I,pattern:E,name:f,autocomplete:m,required:c||null,part:"input",min:T,max:A}),q&&(0,a.h)("div",{class:"usa-input-suffix",part:"suffix","aria-hidden":"true"},q.substring(0,25)),F&&(0,a.h)("div",{class:"usa-input-suffix",part:"input-suffix"},(0,a.h)("va-icon",{icon:F,size:3,part:"icon"}))),y&&(0,a.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},y),P&&I&&(0,a.h)("span",{id:"charcount-message",class:B,"aria-live":"polite"},(0,s.b)(h,I))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();u.style='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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:1.875rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:30px}h2{font-size:24px}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-input-group,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-input-group,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input-group{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:0;position:relative}.usa-input-group--error input:focus,.usa-input-group--success input:focus{outline-offset:0.25rem}.usa-input-group--error{border-width:0.25rem;border-color:#b50909;border-style:solid}.usa-input-group--success{border-width:0.25rem;border-color:#00a91c;border-style:solid}.usa-input-group input{padding-right:2.5rem;border:0;height:100%;margin-top:0;min-width:0;width:100%}.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{border:0;color:GrayText}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input-group input:disabled,.usa-input-group input[aria-disabled=true]{border:0}}@media (forced-colors: active){.usa-input-group:has(input:disabled),.usa-input-group:has(input[aria-disabled=true]){border:2px solid GrayText}}.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){border:0;color:GrayText}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:GrayText}}.usa-input-prefix,.usa-input-suffix{position:absolute;color:#71767a;line-height:0;padding:0 0.5rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.usa-input-prefix .usa-icon,.usa-input-suffix .usa-icon{height:1.5rem;width:1.5rem}.usa-input-prefix+input{padding-left:2.5rem;padding-right:0.5rem}.usa-input-suffix{right:0}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}:host{color:var(--vads-color-base)}:host{display:block;font-family:var(--font-source-sans)}input{-webkit-box-sizing:border-box;box-sizing:border-box}input.usa-input{color:var(--vads-color-base)}.usa-hint{display:block}.currency-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.currency-wrapper>div{position:absolute;left:10px}.currency-wrapper #symbol{margin-top:8px}.currency-wrapper #inputField{padding-left:25px}:host([error]:not([error=""])[show-input-error=false]){border-left:0;padding-left:0;margin-left:0}'}}]);
|