@department-of-veterans-affairs/component-library 54.4.1 → 54.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Modal.js +1 -1
- package/Modal.unit.spec.js +1 -1
- package/contacts.js +1 -1
- package/dist/1339.app.bundle.js +1 -1
- package/dist/1351.app.bundle.js +1 -1
- package/dist/2387.app.bundle.js +1 -1
- package/dist/2654.app.bundle.js +1 -1
- package/dist/2664.app.bundle.js +1 -1
- package/dist/2801.app.bundle.js +1 -1
- package/dist/3126.app.bundle.js +1 -1
- package/dist/4064.app.bundle.js +1 -1
- package/dist/4117.app.bundle.js +1 -1
- package/dist/4140.app.bundle.js +1 -1
- package/dist/4708.app.bundle.js +1 -1
- package/dist/4715.app.bundle.js +1 -1
- package/dist/5019.app.bundle.js +1 -1
- package/dist/5155.app.bundle.js +1 -1
- package/dist/5189.app.bundle.js +1 -1
- package/dist/5306.app.bundle.js +1 -1
- package/dist/5699.app.bundle.js +1 -1
- package/dist/6034.app.bundle.js +1 -1
- package/dist/6246.app.bundle.js +1 -1
- package/dist/6349.app.bundle.js +1 -1
- package/dist/641.app.bundle.js +1 -1
- package/dist/6527.app.bundle.js +1 -1
- package/dist/6633.app.bundle.js +1 -1
- package/dist/6683.app.bundle.js +1 -1
- package/dist/6771.app.bundle.js +1 -1
- package/dist/712.app.bundle.js +1 -1
- package/dist/7367.app.bundle.js +1 -1
- package/dist/7531.app.bundle.js +1 -1
- package/dist/7663.app.bundle.js +1 -1
- package/dist/7814.app.bundle.js +1 -1
- package/dist/7821.app.bundle.js +1 -1
- package/dist/8175.app.bundle.js +1 -1
- package/dist/82.app.bundle.js +1 -1
- package/dist/8206.app.bundle.js +1 -1
- package/dist/8495.app.bundle.js +1 -1
- package/dist/8762.app.bundle.js +1 -1
- package/dist/8859.app.bundle.js +1 -1
- package/dist/890.app.bundle.js +1 -1
- package/dist/9288.app.bundle.js +1 -1
- package/dist/9755.app.bundle.js +1 -1
- package/dist/9794.app.bundle.js +1 -1
- package/dist/9800.app.bundle.js +1 -1
- package/dist/9915.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-0311e4e3.js +1 -0
- package/dist/components/p-067d7618.js +1 -0
- package/dist/components/p-3962731f.js +1 -0
- package/dist/components/p-40738d84.js +1 -0
- package/dist/components/p-494b538e.js +1 -0
- package/dist/components/p-6a3cf3d7.js +1 -0
- package/dist/components/p-6b349d85.js +1 -0
- package/dist/components/p-6e4b9401.js +1 -0
- package/dist/components/p-70a619e9.js +1 -0
- package/dist/components/p-7129443f.js +1 -0
- package/dist/components/p-784bed9b.js +1 -0
- package/dist/components/p-a12014b1.js +1 -0
- package/dist/components/{index2.js → p-a5dce9e6.js} +1 -1
- package/dist/components/p-a836c3e1.js +1 -0
- package/dist/components/{parsePhoneNumber_.js → p-b276cef8.js} +1 -1
- package/dist/components/p-b92d2c38.js +1 -0
- package/dist/components/p-bac94659.js +1 -0
- package/dist/components/p-bea05aab.js +1 -0
- package/dist/components/p-c3fdb782.js +1 -0
- package/dist/components/p-ce1b8abc.js +1 -0
- package/dist/components/p-cf580be9.js +1 -0
- package/dist/components/p-d20739b4.js +20 -0
- package/dist/components/p-d4b7abf9.js +1 -0
- package/dist/components/p-d9f21f0d.js +1 -0
- package/dist/components/p-dffbc03b.js +1 -0
- package/dist/components/p-e1092a04.js +1 -0
- package/dist/components/p-ef5c0d66.js +1 -0
- package/dist/components/p-f3a1dcd5.js +1 -0
- package/dist/components/p-fda59844.js +1 -0
- package/dist/components/types/index.d.ts +2 -0
- package/dist/components/va-accordion-item.js +1 -1
- package/dist/components/va-accordion.js +1 -1
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-alert-sign-in.js +1 -1
- package/dist/components/va-alert.js +1 -1
- package/dist/components/va-back-to-top.js +1 -1
- package/dist/components/va-banner.js +1 -1
- package/dist/components/va-breadcrumbs.js +1 -1
- package/dist/components/va-button-icon.js +1 -1
- package/dist/components/va-button-pair.js +1 -1
- package/dist/components/va-button-segmented.js +1 -1
- package/dist/components/va-button.js +1 -1
- package/dist/components/va-card.js +1 -1
- package/dist/components/va-checkbox-group.js +1 -1
- package/dist/components/va-checkbox.js +1 -1
- package/dist/components/va-combo-box.js +1 -1
- package/dist/components/va-crisis-line-modal.js +1 -1
- package/dist/components/va-critical-action.js +1 -1
- package/dist/components/va-date.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input.js +1 -1
- package/dist/components/va-header-minimal.js +1 -1
- package/dist/components/va-icon.js +1 -1
- package/dist/components/va-language-toggle.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-link.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-maintenance-banner.js +1 -1
- package/dist/components/va-memorable-date.js +1 -1
- package/dist/components/va-minimal-footer.js +1 -1
- package/dist/components/va-modal.js +1 -1
- package/dist/components/va-need-help.js +1 -1
- package/dist/components/va-notification.js +1 -1
- package/dist/components/va-official-gov-banner.js +1 -1
- package/dist/components/va-omb-info.js +1 -1
- package/dist/components/va-on-this-page.js +1 -1
- package/dist/components/va-pagination.js +1 -1
- package/dist/components/va-privacy-agreement.js +1 -1
- package/dist/components/va-process-list-item.js +1 -1
- package/dist/components/va-process-list.js +1 -1
- package/dist/components/va-progress-bar.js +1 -1
- package/dist/components/va-promo-banner.js +1 -1
- package/dist/components/va-radio-option.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-filter.js +1 -1
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-segmented-progress-bar.js +1 -1
- package/dist/components/va-select.js +1 -1
- package/dist/components/va-service-list-item.js +1 -1
- package/dist/components/va-sidenav-item.js +1 -1
- package/dist/components/va-sidenav-submenu.js +1 -1
- package/dist/components/va-sidenav.js +1 -1
- package/dist/components/va-statement-of-truth.js +1 -1
- package/dist/components/va-summary-box.js +1 -1
- package/dist/components/va-tab-item.js +1 -1
- package/dist/components/va-tab-panel.js +1 -1
- package/dist/components/va-table-inner.js +1 -1
- package/dist/components/va-table-row.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-tabs.js +1 -1
- package/dist/components/va-tag-status.js +1 -1
- package/dist/components/va-telephone-input.js +1 -1
- package/dist/components/va-telephone.js +1 -1
- package/dist/components/va-text-input.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/dist/react-bindings/components.d.ts +336 -0
- package/dist/react-bindings/components.js +1 -0
- package/dist/react-bindings/components.js.map +1 -0
- package/dist/react-bindings/components.ts +961 -0
- package/dist/react-bindings/index.d.ts +6 -67
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +6 -75
- package/format-date.js +1 -1
- package/format-date.unit.spec.js +1 -1
- package/package.json +3 -2
- package/test-helpers.js +1 -1
- package/utilities.unit.spec.js +1 -1
- package/validations.js +1 -1
- package/dist/components/contacts.js +0 -1
- package/dist/components/date-utils.js +0 -1
- package/dist/components/i18next.js +0 -1
- package/dist/components/utils.js +0 -1
- package/dist/components/va-accordion-item2.js +0 -1
- package/dist/components/va-accordion2.js +0 -1
- package/dist/components/va-alert2.js +0 -1
- package/dist/components/va-button-icon2.js +0 -1
- package/dist/components/va-button2.js +0 -1
- package/dist/components/va-card2.js +0 -1
- package/dist/components/va-checkbox-group2.js +0 -1
- package/dist/components/va-checkbox2.js +0 -1
- package/dist/components/va-combo-box2.js +0 -20
- package/dist/components/va-crisis-line-modal2.js +0 -1
- package/dist/components/va-critical-action2.js +0 -1
- package/dist/components/va-file-input2.js +0 -1
- package/dist/components/va-icon2.js +0 -1
- package/dist/components/va-link2.js +0 -1
- package/dist/components/va-modal2.js +0 -1
- package/dist/components/va-official-gov-banner2.js +0 -1
- package/dist/components/va-progress-bar2.js +0 -1
- package/dist/components/va-select2.js +0 -1
- package/dist/components/va-table-inner2.js +0 -1
- package/dist/components/va-telephone2.js +0 -1
- package/dist/components/va-text-input2.js +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.d.ts +0 -10
- package/dist/react-bindings/react-component-lib/createComponent.js +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.js.map +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.tsx +0 -106
- package/dist/react-bindings/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/dist/react-bindings/react-component-lib/createOverlayComponent.js +0 -1
- package/dist/react-bindings/react-component-lib/createOverlayComponent.js.map +0 -1
- package/dist/react-bindings/react-component-lib/createOverlayComponent.tsx +0 -142
- package/dist/react-bindings/react-component-lib/index.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/index.js +0 -1
- package/dist/react-bindings/react-component-lib/index.js.map +0 -1
- package/dist/react-bindings/react-component-lib/index.ts +0 -2
- package/dist/react-bindings/react-component-lib/interfaces.d.ts +0 -29
- package/dist/react-bindings/react-component-lib/interfaces.js +0 -1
- package/dist/react-bindings/react-component-lib/interfaces.js.map +0 -1
- package/dist/react-bindings/react-component-lib/interfaces.ts +0 -34
- package/dist/react-bindings/react-component-lib/utils/attachProps.d.ts +0 -16
- package/dist/react-bindings/react-component-lib/utils/attachProps.js +0 -2
- package/dist/react-bindings/react-component-lib/utils/attachProps.js.LICENSE.txt +0 -4
- package/dist/react-bindings/react-component-lib/utils/attachProps.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/attachProps.ts +0 -125
- package/dist/react-bindings/react-component-lib/utils/case.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/utils/case.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/case.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/case.ts +0 -7
- package/dist/react-bindings/react-component-lib/utils/dev.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/utils/dev.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/dev.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/dev.ts +0 -14
- package/dist/react-bindings/react-component-lib/utils/index.d.ts +0 -10
- package/dist/react-bindings/react-component-lib/utils/index.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/index.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/index.tsx +0 -50
- /package/dist/components/{index2.js.LICENSE.txt → p-a5dce9e6.js.LICENSE.txt} +0 -0
- /package/dist/components/{va-combo-box2.js.LICENSE.txt → p-d20739b4.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,forceUpdate,Host,Fragment}from"@stencil/core/internal/client";import"./contacts.js";import{s as selectOrMatches,S as Sanitizer}from"./utils.js";import{d as defineCustomElement$7}from"./va-button2.js";import{d as defineCustomElement$6}from"./va-button-icon2.js";import{d as defineCustomElement$5}from"./va-card2.js";import{d as defineCustomElement$4}from"./va-icon2.js";import{d as defineCustomElement$3}from"./va-modal2.js";import{d as defineCustomElement$2}from"./va-progress-bar2.js";import{d as defineCustomElement$1}from"./va-text-input2.js";import{i as instance}from"./i18next.js";const PREFIX="usa",DROPZONE_CLASS="usa-file-input",DROPZONE=`.${DROPZONE_CLASS}`,INPUT_CLASS="usa-file-input__input",TARGET_CLASS="usa-file-input__target",INPUT=`.${INPUT_CLASS}`,BOX_CLASS="usa-file-input__box",INSTRUCTIONS_CLASS="usa-file-input__instructions",PREVIEW_CLASS="usa-file-input__preview",PREVIEW_HEADING_CLASS="usa-file-input__preview-heading",DISABLED_CLASS="usa-file-input--disabled",CHOOSE_CLASS="usa-file-input__choose",ACCEPTED_FILE_MESSAGE_CLASS="usa-file-input__accepted-files-message",DRAG_TEXT_CLASS="usa-file-input__drag-text",DRAG_CLASS="usa-file-input--drag",LOADING_CLASS="is-loading",INVALID_FILE_CLASS="has-invalid-file",GENERIC_PREVIEW_CLASS_NAME="usa-file-input__preview-image",GENERIC_PREVIEW_CLASS=`${GENERIC_PREVIEW_CLASS_NAME}--generic`,PDF_PREVIEW_CLASS=`${GENERIC_PREVIEW_CLASS_NAME}--pdf`,WORD_PREVIEW_CLASS=`${GENERIC_PREVIEW_CLASS_NAME}--word`,VIDEO_PREVIEW_CLASS=`${GENERIC_PREVIEW_CLASS_NAME}--video`,EXCEL_PREVIEW_CLASS=`${GENERIC_PREVIEW_CLASS_NAME}--excel`,SR_ONLY_CLASS="usa-sr-only",SPACER_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";let TYPE_IS_VALID=Boolean(!0),DEFAULT_ARIA_LABEL_TEXT="",DEFAULT_FILE_STATUS_TEXT="";const getFileInputContext=e=>{const t=e.closest(DROPZONE);if(!t)throw new Error(`Element is missing outer ${DROPZONE}`);const i=t.querySelector(INPUT);return{dropZoneEl:t,inputEl:i}},disable=e=>{const{dropZoneEl:t,inputEl:i}=getFileInputContext(e);i.disabled=!0,t.classList.add(DISABLED_CLASS)},ariaDisable=e=>{const{dropZoneEl:t}=getFileInputContext(e);t.classList.add(DISABLED_CLASS)},enable=e=>{const{dropZoneEl:t,inputEl:i}=getFileInputContext(e);i.disabled=!1,t.classList.remove(DISABLED_CLASS),t.removeAttribute("aria-disabled")},replaceName=e=>{const t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?`img_${e.toLowerCase()}`:`__000${t.toString(16).slice(-4)}`},makeSafeForID=e=>e.replace(/[^a-z0-9]/g,replaceName),createUniqueID=e=>`${e}-${Math.floor(Date.now()/1e3)}`,getItemsLabel=e=>e.hasAttribute("multiple")?"files":"file",createTargetArea=e=>{const t=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");return e.classList.remove(DROPZONE_CLASS),e.classList.add(INPUT_CLASS),t.classList.add(DROPZONE_CLASS),s.classList.add(BOX_CLASS),i.classList.add(TARGET_CLASS),i.prepend(s),e.parentNode.insertBefore(i,e),e.parentNode.insertBefore(t,i),i.appendChild(e),t.appendChild(i),i},createVisibleInstructions=e=>{const t=e.closest(DROPZONE),i=getItemsLabel(e),s=document.createElement("div"),a=`Drag ${i} here or`,r="choose from folder";return DEFAULT_ARIA_LABEL_TEXT=`${a} ${r}`,s.classList.add(INSTRUCTIONS_CLASS),s.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",DEFAULT_ARIA_LABEL_TEXT),s.innerHTML=Sanitizer.escapeHTML(`<span class="${DRAG_TEXT_CLASS}">${a}</span> <span class="${CHOOSE_CLASS}">${r}</span>`),e.parentNode.insertBefore(s,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(`.${DRAG_TEXT_CLASS}`).outerHTML=""),s},createSROnlyStatus=e=>{const t=document.createElement("div"),i=getItemsLabel(e),s=e.closest(DROPZONE),a=e.closest(`.${TARGET_CLASS}`);DEFAULT_FILE_STATUS_TEXT=`No ${i} selected.`,t.classList.add("usa-sr-only"),t.setAttribute("aria-live","polite"),t.textContent=DEFAULT_FILE_STATUS_TEXT,s.insertBefore(t,a)},enhanceFileInput=e=>{const t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),i=createTargetArea(e),s=createVisibleInstructions(e),{dropZoneEl:a}=getFileInputContext(e);return t?a.classList.add(DISABLED_CLASS):createSROnlyStatus(e),{instructions:s,dropTarget:i}},removeOldPreviews=(e,t)=>{const i=e.querySelectorAll(`.${PREVIEW_CLASS}`),s=e.querySelector(`.${PREVIEW_HEADING_CLASS}`),a=e.querySelector(`.${ACCEPTED_FILE_MESSAGE_CLASS}`);s&&(s.outerHTML=""),a&&(a.outerHTML="",e.classList.remove("has-invalid-file")),null!==i&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(i,(e=>{e.parentNode.removeChild(e)})))},updateStatusMessage=(e,t,i)=>{const s=e;let a=DEFAULT_FILE_STATUS_TEXT;1===t.length?a=`You have selected the file: ${i}`:t.length>1&&(a=`You have selected ${t.length} files: ${i.join(", ")}`),setTimeout((()=>{s.textContent=a}),1e3)},addPreviewHeading=(e,t)=>{const i=document.createElement("div"),s=e.closest(`.${TARGET_CLASS}`),a=s.querySelector(`.${INSTRUCTIONS_CLASS}`);let r="Change file",o="";1===t.length?o=Sanitizer.escapeHTML(`Selected file <span class="usa-file-input__choose">${r}</span>`):t.length>1&&(r="Change files",o=Sanitizer.escapeHTML(`${t.length} files selected <span class="usa-file-input__choose">${r}</span>`)),a.setAttribute("hidden","true"),i.classList.add(PREVIEW_HEADING_CLASS),i.innerHTML=o,s.insertBefore(i,a),e.setAttribute("aria-label",r)},handleChange=(e,t,i,s)=>{const a=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],r=s.closest(`.${DROPZONE_CLASS}`).querySelector(".usa-sr-only"),o=[];removeOldPreviews(s,i);for(let e=0;e<a.length;e+=1){const t=new FileReader,r=a[e].name;let n;o.push(r),t.onloadstart=function(){n=createUniqueID(makeSafeForID(r)),i.insertAdjacentHTML("afterend",Sanitizer.escapeHTML(`<div class="${PREVIEW_CLASS}" aria-hidden="true">\n <img id="${n}" src="${SPACER_GIF}" alt="" class="${GENERIC_PREVIEW_CLASS_NAME} is-loading"/>${r}\n <div>`))},t.onloadend=function(){const e=s.querySelector(`#${n}`);r.indexOf(".pdf")>0?e.setAttribute("onerror",`this.onerror=null;this.src="${SPACER_GIF}"; this.classList.add("${PDF_PREVIEW_CLASS}")`):r.indexOf(".doc")>0||r.indexOf(".pages")>0?e.setAttribute("onerror",`this.onerror=null;this.src="${SPACER_GIF}"; this.classList.add("${WORD_PREVIEW_CLASS}")`):r.indexOf(".xls")>0||r.indexOf(".numbers")>0?e.setAttribute("onerror",`this.onerror=null;this.src="${SPACER_GIF}"; this.classList.add("${EXCEL_PREVIEW_CLASS}")`):r.indexOf(".mov")>0||r.indexOf(".mp4")>0?e.setAttribute("onerror",`this.onerror=null;this.src="${SPACER_GIF}"; this.classList.add("${VIDEO_PREVIEW_CLASS}")`):e.setAttribute("onerror",`this.onerror=null;this.src="${SPACER_GIF}"; this.classList.add("${GENERIC_PREVIEW_CLASS}")`),e.classList.remove("is-loading"),e.src=t.result},a[e]&&t.readAsDataURL(a[e])}0===a.length?t.setAttribute("aria-label",DEFAULT_ARIA_LABEL_TEXT):addPreviewHeading(t,a),updateStatusMessage(r,a,o)},preventInvalidFiles=(e,t,i,s)=>{const a=t.getAttribute("accept");s.classList.remove("has-invalid-file");const r=(e,t)=>{let i=!1;return e.indexOf(t)>=0&&(i=!0),i};if(a){const o=a.split(","),n=document.createElement("div");let l=!0;const d=e.target.files||e.dataTransfer.files;for(let e=0;e<d.length;e+=1){const t=d[e];if(!l)break;for(let e=0;e<o.length;e+=1){const i=o[e];if(l=t.name.indexOf(i)>0||r(t.type,i.replace(/\*/g,"")),l){TYPE_IS_VALID=!0;break}}}l||(removeOldPreviews(s,i),t.value="",s.insertBefore(n,t),n.textContent=t.dataset.errormessage||"This is not a valid file type.",n.classList.add(ACCEPTED_FILE_MESSAGE_CLASS),s.classList.add("has-invalid-file"),TYPE_IS_VALID=!1,e.preventDefault(),e.stopPropagation())}},handleUpload=(e,t,i,s)=>{preventInvalidFiles(e,t,i,s),!0===TYPE_IS_VALID&&handleChange(e,t,i,s)},fileInput={init(e){selectOrMatches(DROPZONE,e).forEach((e=>{const{instructions:t,dropTarget:i}=enhanceFileInput(e);i.addEventListener("dragover",(function(){this.classList.add(DRAG_CLASS)}),!1),i.addEventListener("dragleave",(function(){this.classList.remove(DRAG_CLASS)}),!1),i.addEventListener("drop",(function(s){s.preventDefault(),this.classList.remove(DRAG_CLASS);const a=s.dataTransfer;if(s.target.files=a.files,a.files.length>1)return;handleUpload(s,e,t,i);const r=new CustomEvent("change",{detail:{files:a.files}});e.dispatchEvent(r)}),!1),e.addEventListener("input",(s=>handleUpload(s,e,t,i)),!1)}))},teardown(e){selectOrMatches(INPUT,e).forEach((e=>{const t=e.parentElement.parentElement;t.parentElement.replaceChild(e,t),e.className=DROPZONE_CLASS}))},getFileInputContext:getFileInputContext,disable:disable,ariaDisable:ariaDisable,enable:enable},extensionToMimeType={".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",".heic":"image/heic"},vaFileInputCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}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 Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}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:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}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=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--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,:host .file-status-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-status-label{font-style:italic}:host .file-info-section{padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{margin-top:8px;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: 320px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .with-separator{border-top:1px solid var(--vads-color-base-lighter)}: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 va-progress-bar{font-size:var(--vads-font-size-root);display:block;margin-left:16px}:host .uploading-status{font-style:var(--font-style-italic)}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}h1 .required,h2 .required,h3 .required,h4 .required,h5 .required,h6 .required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}',VaFileInputStyle0=vaFileInputCss,VaFileInput=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.vaChange=createEvent(this,"vaChange",7),this.vaPasswordChange=createEvent(this,"vaPasswordChange",7),this.vaFileInputError=createEvent(this,"vaFileInputError",7),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.uploadStatus="idle",this.chooseFileString="choose from folder",this.dragFileString="Drag a file here or ",this.FILE_PREVIEW_SIZE_LIMIT=5242880,this.handleChange=e=>{const t=e.target;this.fileContents=null,t.files&&t.files.length>0&&this.handleFile(t.files[0]),t.value=""},this.handleDrop=e=>{e.preventDefault(),e.stopPropagation();const t=e.dataTransfer.files;t.length>0&&this.handleFile(t[0])},this.getExtension=e=>{const t=e.name.replace(/^\./,"");return(t.includes(".")?`.${t.split(".").pop()}`:null)||e.type},this.getFileTypeErrorMessage=e=>{const t=this.getExtension(e);return`We do not accept ${t?`${t} files`:"this file type"}. Choose a new file.`},this.handleFile=(e,t=!0)=>{let i=null;if(this.accept){const t=this.normalizeAcceptProp(this.accept);this.isAcceptedFileType(e.type,t)||(this.removeFile(!1),i=this.getFileTypeErrorMessage(e))}if(0===e.size&&(i="The file you selected is empty. Files must be larger than 0B."),e.size>this.maxFileSize&&(i=`\n We can't upload your file because it's too big. Files must be less than ${this.formatFileSize(this.maxFileSize)}.`),e.size<this.minFileSize&&(i=`We can't upload your file because it's too small. Files must be at least ${this.formatFileSize(this.minFileSize)}.`),this.uploadedFile=null,this.file=e,i)return this.internalError=i,this.vaFileInputError.emit({error:i}),void this.resetState();t&&this.vaChange.emit({files:[this.file]}),this.uploadStatus="success",this.internalError=null,e.size<this.FILE_PREVIEW_SIZE_LIMIT&&this.generateFileContents(this.file),this.updateStatusMessage(`You have selected the file: ${this.file.name}`),this.el.focus(),this.enableAnalytics&&this.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:this.label}})},this.removeFile=(e=!0)=>{this.closeModal(),this.uploadStatus="idle",this.internalError=null,e&&this.vaChange.emit({files:[]}),this.file=null,this.uploadedFile=null,this.updateStatusMessage("File deleted. No file selected."),this.el.focus()},this.openModal=()=>{this.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),this.showModal=!0},this.closeModal=()=>{this.showModal=!1,setTimeout((()=>{this.fileInputRef.focus()}),0)},this.changeFile=()=>{this.fileInputRef&&this.fileInputRef.click()},this.formatFileSize=e=>{const t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";const i=Math.floor(Math.log(e)/Math.log(1024));return 0===i?`${e} ${t[i]}`:`${(e/Math.pow(1024,i)).toFixed(i<2?0:1)} ${t[i]}`},this.normalizeAcceptProp=e=>e.split(",").map((e=>(e=e.trim()).startsWith(".")?extensionToMimeType[e]:e)),this.isAcceptedFileType=(e,t)=>{for(const i of t){if(i===e)return!0;if(i.endsWith("/*")&&e.startsWith(i.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=(e,t,i)=>{const s=t?h("span",{class:"required"}," ",instance.t("required")):null;return h("div",{class:"label-header"},i&&i>=1&&i<=6?h(`h${i}`,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,s):h("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,s))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.showSeparator=!0,this.label=void 0,this.name=void 0,this.value=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.statusText=void 0,this.uploadMessage=null,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1,this.readOnly=!1,this.encrypted=!1,this.uploadedFile=void 0,this.maxFileSize=1/0,this.minFileSize=0,this.percentUploaded=null,this.passwordError=void 0}handleValueChange(e){setTimeout((()=>{this.updateStatusMessage(e)}))}percentHandler(e){e>=100&&this.resetState()}handleError(e,t){t&&e&&this.resetState()}resetState(){this.fileContents=null,this.uploadStatus="idle",this.percentUploaded=null,forceUpdate(this.el)}updateStatusMessage(e){setTimeout((()=>{const t=this.el.shadowRoot.querySelector("#statusMessage");t&&(t.textContent=e),setTimeout((()=>{t&&(t.textContent="")}),1e4)}),1e3)}async generateFileContents(e){if(!e)return;const t=e.slice(0,20),i=await t.arrayBuffer();if(new Uint8Array(i).every((e=>0===e)))return;const s=new FileReader;this.fileType=e.type,s.onloadend=()=>{this.fileContents=s.result},!this.fileType||"application/pdf"!==this.fileType&&!this.fileType.startsWith("image/")||this.fileType.includes("heic")||s.readAsDataURL(e)}componentWillRender(){const e=!!this.el.querySelector(":scope > *"),t=!(!this.value&&!this.file||this.readOnly);this.showSeparator=e||t}componentDidLoad(){fileInput.init(this.el)}connectedCallback(){this.el.addEventListener("change",this.handleChange)}disconnectedCallback(){this.el.removeEventListener("change",this.handleChange)}getDefaultUploadMessage(){return h("span",null,this.dragFileString,h("span",{class:"file-input-choose-text"},this.chooseFileString))}handlePasswordChange(e){this.vaPasswordChange.emit({password:e.target.value})}render(){const{label:e,name:t,required:i,accept:s,error:a,hint:r,dragFileString:o,chooseFileString:n,uploadMessage:l,headerSize:d,fileContents:c,fileType:p,headless:u,value:m,readOnly:f,encrypted:g,statusText:v,uploadedFile:b,percentUploaded:E,passwordError:S,internalError:A}=this;m&&!this.file&&this.handleFile(m,!1);const{uploadStatus:_,file:C}=this,x=a||A,L=`${r?"input-hint-message":""} ${x?"input-error-message":""}`.trim()||null,w=("file-input-target "+(x?"file-input-target-error":"")).trim();let y=h("div",{key:"2a9207d6c52c70f433e690919b5d8bbede45ce3c",class:"thumbnail-container","aria-hidden":"true"},h("svg",{key:"0ef12f3c26be697762b8482f9c4cec22402897ec",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},h("path",{key:"0e1afced00c7d8d7a8317c4b1673487e7683a085",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"})));x?y=h("div",{key:"645297225cdd9b0f619dd04660f3883acb72feeb",class:"thumbnail-container"},h("va-icon",{key:"02297e086380fe0cd80e56625c23cec071bdca5c",icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):c&&p.startsWith("image/")&&(y=h("div",{key:"51507a9f5a8b45594aca5fdbc7252f55eac030e7",class:"thumbnail-container","aria-hidden":"true"},h("img",{key:"1e304b78de0bf0772e9cab22bbb74835b8860933",class:"thumbnail-preview",src:c,alt:"image"})));let I=u?"headless-selected-files-wrapper":"selected-files-wrapper";const T=null!==E&&E<100;let F="file-status-label";return T&&(F=`${F} uploading-status`),h(Host,{key:"d416dceedca410c4c3e74809fa5376a34894ea6a",class:{"has-error":!!x}},!f&&!u&&h("span",{key:"d347036d030bbda5780450d2df503a1905908c47"},e&&this.renderLabelOrHeader(e,i,d)),r&&!f&&!u&&h("div",{key:"0a576102d95284eb486bd8c4a4af408183eb968a",class:"usa-hint",id:"input-hint-message"},r),h("div",{key:"af20643cc5c1dd22a32324be60e08fb408272a2c",class:"file-input-wrapper",onDrop:this.handleDrop},h("input",{key:"1c380295da8d477fbe72be36f5cd1befa6472c31",id:"fileInputField",class:"file-input","aria-label":`${e}${i?" "+instance.t("required"):""}. ${o}${n}`,style:{visibility:"success"===_||b||A?"hidden":"unset"},type:"file",ref:e=>this.fileInputRef=e,name:t,accept:s,"aria-describedby":L,onChange:this.handleChange}),b||C?h("div",{class:I},!u&&h("div",{class:"selected-files-label"},f?"Files you uploaded":"Selected files"),h("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),h("va-card",{class:"va-card"},h("div",{class:"file-info-section"},y,h("div",{class:"file-info-group vads-u-line-height--2"},h("span",{class:"file-label"},C?C.name:b.name),x&&h("span",{id:"input-error-message",role:"alert"},h("span",{class:"usa-sr-only"},instance.t("error")),h("span",{"aria-live":"polite",class:"usa-error-message"},x)),!T&&h("span",{class:"file-size-label"},this.formatFileSize(C?C.size:b.size)),h("span",{class:F,"aria-live":"polite"},T?"Uploading...":v))),h("div",{class:this.showSeparator?"with-separator":void 0},!f&&T&&h(Fragment,null,h("va-progress-bar",{percent:E,noPercentScreenReader:!0}),h("va-button-icon",{buttonType:"cancel",onClick:this.resetState.bind(this)})),!T&&h(Fragment,null,g&&h("va-text-input",{type:"password",onInput:e=>{this.handlePasswordChange(e)},label:"File password",required:!0,error:S}),h("div",{class:"additional-info-slot"},h("slot",null))),!f&&!T&&h(Fragment,null,h("div",{class:"file-button-section"},h("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:`change file ${C?C.name:b.name}`}),h("va-button-icon",{buttonType:"delete",onClick:this.openModal,label:`delete file ${C?C.name:b.name}`})),h("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, delete this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:()=>this.removeFile(!0),onSecondaryButtonClick:this.closeModal},"We'll delete the uploaded file"," ",h("span",{class:"file-label"},C?C.name:b.name)))))):h("div",null,h("span",{id:"file-input-error-alert",role:"alert"},x&&h(Fragment,null,h("span",{class:"usa-sr-only"},instance.t("error")),h("span",{class:"usa-error-message"},x))),h("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),h("div",{class:w},h("div",{class:"file-input-box"}),h("div",{class:"file-input-instructions"},l||this.getDefaultUploadMessage())))))}get el(){return this}static get watchers(){return{statusText:["handleValueChange"],percentUploaded:["percentHandler"],error:["handleError"]}}static get style(){return VaFileInputStyle0}},[1,"va-file-input",{label:[1],name:[1],value:[16],required:[4],accept:[1],error:[1],hint:[1],statusText:[1,"status-text"],uploadMessage:[16],enableAnalytics:[4,"enable-analytics"],headerSize:[2,"header-size"],headless:[4],readOnly:[4,"read-only"],encrypted:[4],uploadedFile:[1040],maxFileSize:[2,"max-file-size"],minFileSize:[2,"min-file-size"],percentUploaded:[1538,"percent-uploaded"],passwordError:[1,"password-error"],file:[32],fileContents:[32],internalError:[32],showModal:[32],showSeparator:[32]},void 0,{statusText:["handleValueChange"],percentUploaded:["percentHandler"],error:["handleError"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-file-input","va-button","va-button-icon","va-card","va-icon","va-modal","va-progress-bar","va-text-input"].forEach((e=>{switch(e){case"va-file-input":customElements.get(e)||customElements.define(e,VaFileInput);break;case"va-button":customElements.get(e)||defineCustomElement$7();break;case"va-button-icon":customElements.get(e)||defineCustomElement$6();break;case"va-card":customElements.get(e)||defineCustomElement$5();break;case"va-icon":customElements.get(e)||defineCustomElement$4();break;case"va-modal":customElements.get(e)||defineCustomElement$3();break;case"va-progress-bar":customElements.get(e)||defineCustomElement$2();break;case"va-text-input":customElements.get(e)||defineCustomElement$1()}}))}export{VaFileInput as V,defineCustomElement as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import{c as consoleDevError}from"./utils.js";function initIconSpriteLocation(){const e="__VA_ICON_SPRITE_LOCATION__";globalThis.setVaIconSpriteLocation=i=>{globalThis[e]=i},globalThis.getVaIconSpriteLocation=()=>globalThis[e]||"/img/sprite.svg"}const vaIconCss=".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}:host{display:inline-block;line-height:0;vertical-align:bottom}",VaIconStyle0=vaIconCss,VaIcon=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.fallbackSpriteLocation="/img/sprite.svg",this.icon=void 0,this.spriteLocation=void 0,this.size=void 0,this.srtext=void 0}getSize(){return this.size&&![3,4,5,6,7,8,9].includes(this.size)?(consoleDevError("Size must be an integer between 3 and 9, inclusive."),null):this.size}validateSpriteLocation(e){let i=this.fallbackSpriteLocation,t=`Invalid SVG sprite path provided to <va-icon>: ${e}`;try{const o=new URL(e,window.location.origin);return o.origin===window.location.origin&&o.pathname.endsWith(".svg")&&!e.includes("..")?i=o.pathname:consoleDevError(t),i}catch(e){return consoleDevError(t),i}}componentWillLoad(){globalThis.getVaIconSpriteLocation||initIconSpriteLocation()}render(){const{icon:e,srtext:i,spriteLocation:t}=this,o=this.getSize(),n=classnames({"usa-icon":!0,[`usa-icon--size-${o}`]:!!o}),s=this.validateSpriteLocation(t||globalThis.getVaIconSpriteLocation())+`#${e}`;return h(Host,{key:"87937ec8feb83c5fda54a8df2e4fb8d568c3e6bf"},h("svg",{key:"90af82328276ad672588d5595164fb4ab7a6123e",class:n,"aria-labelledby":i?"icon-title":null,"aria-hidden":i?null:"true",focusable:"false",role:"img"},i&&h("title",{key:"8bd56db2a5c8adcb615472314cdb99f1a7084396",id:"icon-title"},i),h("use",{key:"e7f1b8669691a35229718e0406cdde453729d6c7",href:s})))}static get assetsDirs(){return["../img"]}static get style(){return VaIconStyle0}},[1,"va-icon",{icon:[1],spriteLocation:[1,"sprite-location"],size:[2],srtext:[1]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-icon"].forEach((e=>{"va-icon"===e&&(customElements.get(e)||customElements.define(e,VaIcon))}))}export{VaIcon as V,defineCustomElement as d,initIconSpriteLocation as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import{d as defineCustomElement$1}from"./va-icon2.js";const vaLinkCss='p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}a{text-decoration:none;color:var(--vads-color-link);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}a:hover{background-color:rgba(0, 0, 0, 0.05);color:inherit}a:visited{color:var(--vads-color-link-visited)}.usa-sr-only{position:absolute;left:-999em;right:auto}:host{display:inline}:host([href]:focus){outline:none !important}:host a{cursor:pointer;text-decoration:underline;font:inherit}:host a.va-link--reverse,:host a.va-link--reverse .link-icon--back{color:var(--vads-color-white)}:host a.va-link--reverse:hover,:host a.va-link--reverse:active,:host a.va-link--reverse:hover .link-icon--back,:host a.va-link--reverse:active .link-icon--back,:host a.va-link--reverse .link-icon--back:hover,:host a.va-link--reverse .link-icon--back:active,:host a.va-link--reverse .link-icon--back:hover .link-icon--back,:host a.va-link--reverse .link-icon--back:active .link-icon--back{color:var(--vads-color-action-focus-on-light);background-color:transparent}:host([active]:not([active=false])) a{font-weight:700}:host([icon-name]) va-icon{margin-right:4px}:host .link-icon--active-icon-wrapper{white-space:nowrap}.link-icon--active{vertical-align:baseline;position:relative;top:3px}.link-icon--left{margin-right:4px;vertical-align:baseline;position:relative;top:3px}.link-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.link-icon--back{color:var(--vads-color-gray-medium);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}.link--center{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}dfn{font-style:normal}abbr{text-decoration:none}.external-link-icon{margin-left:4px}@media print{.screen-only{display:none}}',VaLinkStyle0=vaLinkCss,VaLink=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.handleClick=e=>{if(!this.disableAnalytics){const e={componentName:"va-link",action:"click",details:{label:this.text,destination:this.href,origin:window.location.href}};this.componentLibraryAnalytics.emit(e)}},this.getAbbreviationTitle=()=>{const{abbrTitle:e,filetype:i}=this;return"PDF"===i?"Portable Document Format":e},this.abbrTitle=void 0,this.active=!1,this.back=!1,this.calendar=!1,this.channel=!1,this.disableAnalytics=!1,this.download=!1,this.href=void 0,this.filename=void 0,this.filetype=void 0,this.pages=void 0,this.text=void 0,this.video=!1,this.reverse=!1,this.external=!1,this.label=null,this.iconName=null,this.iconSize=3,this.language=void 0}render(){const{active:e,back:i,calendar:n,channel:o,download:a,filetype:t,filename:l,getAbbreviationTitle:r,handleClick:s,href:c,pages:d,text:v,video:u,reverse:b,external:k,iconName:f,iconSize:m,language:p,label:g}=this,y=classnames({"va-link--reverse":b,"link--center":f});if(e)return h(Host,null,h("a",{href:c,class:y,onClick:s,"aria-label":g},v,h("span",{class:"link-icon--active-icon-wrapper"},h("va-icon",{class:"link-icon--active",icon:"chevron_right"}))));if(i){const e=h("va-icon",{icon:"arrow_back",class:"link-icon--left link-icon--back"});return h(Host,null,h("div",{class:"link-container"},e,h("a",{href:c,class:y,onClick:s,"aria-label":g},v)))}if(o||u)return h(Host,null,h("a",{href:c,class:y,"aria-label":g,onClick:s,rel:"noopener",target:"_blank"},h("va-icon",{class:"link-icon--left",icon:o?"youtube":"play_circle"}),v," ",h("dfn",null,o?"YouTube":"on YouTube")));if(n)return h(Host,null,h("a",{href:c,class:y,download:l,"aria-label":g,onClick:s},h("va-icon",{class:"link-icon--left",icon:"calendar_today"}),v));if(a)return h(Host,null,h("a",{href:c,class:y,download:l,"aria-label":g,onClick:s},h("va-icon",{class:"link-icon--left",icon:"file_download"}),v," ",t&&h("dfn",null,"(",h("abbr",{title:r()},t),d&&`, ${d} pages`,")")));if(f)return h(Host,null,h("a",{href:c,class:y,"aria-label":g,onClick:s},h("va-icon",{icon:f,size:m,part:"icon"}),v));if(k)return h(Host,null,h("a",{href:c,rel:"noreferrer",class:y,onClick:s,"aria-label":g,target:"_blank"},v," ",h("span",{class:"screen-only"},"(opens in a new tab)")));const x=p||null;return h(Host,null,h("a",{href:c,class:y,onClick:s,"aria-label":g,part:"anchor",lang:x,hrefLang:x},v))}static get style(){return VaLinkStyle0}},[1,"va-link",{abbrTitle:[1,"abbr-title"],active:[516],back:[4],calendar:[4],channel:[4],disableAnalytics:[4,"disable-analytics"],download:[4],href:[1],filename:[1],filetype:[1],pages:[2],text:[1],video:[4],reverse:[4],external:[4],label:[1],iconName:[1,"icon-name"],iconSize:[2,"icon-size"],language:[1]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-link","va-icon"].forEach((e=>{switch(e){case"va-link":customElements.get(e)||customElements.define(e,VaLink);break;case"va-icon":customElements.get(e)||defineCustomElement$1()}}))}export{VaLink as V,defineCustomElement as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import{d as defineCustomElement$2}from"./va-button2.js";import{d as defineCustomElement$1}from"./va-icon2.js";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}return Array.from(t)}var hasPassiveEvents=!1;if("undefined"!=typeof window){var passiveTestOptions={get passive(){hasPassiveEvents=!0}};window.addEventListener("testPassive",null,passiveTestOptions),window.removeEventListener("testPassive",null,passiveTestOptions)}var isIosDevice="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),locks=[],documentListenerAdded=!1,initialClientY=-1,previousBodyOverflowSetting=void 0,previousBodyPosition=void 0,previousBodyPaddingRight=void 0,allowTouchMove=function(t){return locks.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},preventDefault=function(t){var e=t||window.event;return!!allowTouchMove(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},setOverflowHidden=function(t){if(void 0===previousBodyPaddingRight){var e=!!t&&!0===t.reserveScrollBarGap,o=window.innerWidth-document.documentElement.clientWidth;if(e&&o>0){var a=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);previousBodyPaddingRight=document.body.style.paddingRight,document.body.style.paddingRight=a+o+"px"}}void 0===previousBodyOverflowSetting&&(previousBodyOverflowSetting=document.body.style.overflow,document.body.style.overflow="hidden")},restoreOverflowSetting=function(){void 0!==previousBodyPaddingRight&&(document.body.style.paddingRight=previousBodyPaddingRight,previousBodyPaddingRight=void 0),void 0!==previousBodyOverflowSetting&&(document.body.style.overflow=previousBodyOverflowSetting,previousBodyOverflowSetting=void 0)},setPositionFixed=function(){return window.requestAnimationFrame((function(){if(void 0===previousBodyPosition){previousBodyPosition={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,o=t.scrollX,a=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-o,setTimeout((function(){return window.requestAnimationFrame((function(){var t=a-window.innerHeight;t&&e>=a&&(document.body.style.top=-(e+t))}))}),300)}}))},restorePositionSetting=function(){if(void 0!==previousBodyPosition){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=previousBodyPosition.position,document.body.style.top=previousBodyPosition.top,document.body.style.left=previousBodyPosition.left,window.scrollTo(e,t),previousBodyPosition=void 0}},isTargetElementTotallyScrolled=function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight},handleScroll=function(t,e){var o=t.targetTouches[0].clientY-initialClientY;return!allowTouchMove(t.target)&&(e&&0===e.scrollTop&&o>0||isTargetElementTotallyScrolled(e)&&o<0?preventDefault(t):(t.stopPropagation(),!0))},disableBodyScroll=function(t,e){if(t){if(!locks.some((function(e){return e.targetElement===t}))){var o={targetElement:t,options:e||{}};locks=[].concat(_toConsumableArray(locks),[o]),isIosDevice?setPositionFixed():setOverflowHidden(e),isIosDevice&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(initialClientY=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&handleScroll(e,t)},documentListenerAdded||(document.addEventListener("touchmove",preventDefault,hasPassiveEvents?{passive:!1}:void 0),documentListenerAdded=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},clearAllBodyScrollLocks=function(){isIosDevice&&(locks.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),documentListenerAdded&&(document.removeEventListener("touchmove",preventDefault,hasPassiveEvents?{passive:!1}:void 0),documentListenerAdded=!1),initialClientY=-1),isIosDevice?restorePositionSetting():restoreOverflowSetting(),locks=[]},getDefaultParent=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,hideOthers=function(t,e,o){void 0===e&&(e=getDefaultParent(t)),void 0===o&&(o="data-aria-hidden");var a=Array.isArray(t)?t:[t];markerMap[o]||(markerMap[o]=new WeakMap);var n=markerMap[o],s=[],i=new Set,u=function(t){t&&!i.has(t)&&(i.add(t),u(t.parentNode))};a.forEach(u);var r=function(t){!t||a.indexOf(t)>=0||Array.prototype.forEach.call(t.children,(function(t){if(i.has(t))r(t);else{var e=t.getAttribute("aria-hidden"),a=null!==e&&"false"!==e,u=(counterMap.get(t)||0)+1,l=(n.get(t)||0)+1;counterMap.set(t,u),n.set(t,l),s.push(t),1===u&&a&&uncontrolledNodes.set(t,!0),1===l&&t.setAttribute(o,"true"),a||t.setAttribute("aria-hidden","true")}}))};return r(e),i.clear(),lockCount++,function(){s.forEach((function(t){var e=counterMap.get(t)-1,a=n.get(t)-1;counterMap.set(t,e),n.set(t,a),e||(uncontrolledNodes.has(t)||t.removeAttribute("aria-hidden"),uncontrolledNodes.delete(t)),a||t.removeAttribute(o)})),--lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}};const focusableQueryString=['a[href]:not([tabindex^="-"])','.hydrated:not([tabindex^="-"]):not(va-radio-option)','[tabindex]:not([tabindex^="-"])','input:not([type=hidden]):not([tabindex^="-"])','textarea:not([tabindex^="-"])','button:not([tabindex^="-"])','select:not([tabindex^="-"])'].join(","),vaModalCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;border-radius:5px;color:var(--vads-button-color-text-primary-alt-on-light);cursor:pointer;display:inline-block;font-family:var(--font-source-sans);font-size:1rem;font-weight:700;line-height:1;padding:0.625rem 1.25rem;text-align:center;text-decoration:none}.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-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-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-button{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:0.9;color:white;background-color:#005ea2;-webkit-appearance:none;-moz-appearance:none;appearance:none;-ms-flex-align:center;align-items:center;border:0;border-radius:0.25rem;cursor:pointer;-webkit-column-gap:0.5rem;-moz-column-gap:0.5rem;column-gap:0.5rem;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;-ms-flex-pack:center;justify-content:center;margin-right:0.5rem;padding:0.75rem 1.25rem;text-align:center;text-decoration:none;width:100%}@media all and (min-width: 30em){.usa-button{width:auto}}.usa-button:visited{color:white}.usa-button:hover,.usa-button.usa-button--hover{color:white;background-color:#1a4480;border-bottom:0;text-decoration:none}.usa-button:active,.usa-button.usa-button--active{color:white;background-color:#162e51}.usa-button:not([disabled]):focus,.usa-button:not([disabled]).usa-focus{outline-offset:0.25rem}.usa-button:disabled,.usa-button[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-button:disabled:hover,.usa-button:disabled:active,.usa-button:disabled:focus,.usa-button:disabled.usa-focus,.usa-button[aria-disabled=true]:hover,.usa-button[aria-disabled=true]:active,.usa-button[aria-disabled=true]:focus,.usa-button[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-button:disabled,.usa-button[aria-disabled=true]{border:0;color:GrayText}.usa-button:disabled:hover,.usa-button:disabled:active,.usa-button:disabled:focus,.usa-button:disabled.usa-focus,.usa-button[aria-disabled=true]:hover,.usa-button[aria-disabled=true]:active,.usa-button[aria-disabled=true]:focus,.usa-button[aria-disabled=true].usa-focus{color:GrayText}}.usa-button:disabled.usa-button--hover,.usa-button:disabled.usa-button--active,.usa-button[aria-disabled=true].usa-button--hover,.usa-button[aria-disabled=true].usa-button--active{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-button:disabled.usa-button--hover:hover,.usa-button:disabled.usa-button--hover:active,.usa-button:disabled.usa-button--hover:focus,.usa-button:disabled.usa-button--hover.usa-focus,.usa-button:disabled.usa-button--active:hover,.usa-button:disabled.usa-button--active:active,.usa-button:disabled.usa-button--active:focus,.usa-button:disabled.usa-button--active.usa-focus,.usa-button[aria-disabled=true].usa-button--hover:hover,.usa-button[aria-disabled=true].usa-button--hover:active,.usa-button[aria-disabled=true].usa-button--hover:focus,.usa-button[aria-disabled=true].usa-button--hover.usa-focus,.usa-button[aria-disabled=true].usa-button--active:hover,.usa-button[aria-disabled=true].usa-button--active:active,.usa-button[aria-disabled=true].usa-button--active:focus,.usa-button[aria-disabled=true].usa-button--active.usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-button:disabled.usa-button--hover,.usa-button:disabled.usa-button--active,.usa-button[aria-disabled=true].usa-button--hover,.usa-button[aria-disabled=true].usa-button--active{border:0;color:GrayText}.usa-button:disabled.usa-button--hover:hover,.usa-button:disabled.usa-button--hover:active,.usa-button:disabled.usa-button--hover:focus,.usa-button:disabled.usa-button--hover.usa-focus,.usa-button:disabled.usa-button--active:hover,.usa-button:disabled.usa-button--active:active,.usa-button:disabled.usa-button--active:focus,.usa-button:disabled.usa-button--active.usa-focus,.usa-button[aria-disabled=true].usa-button--hover:hover,.usa-button[aria-disabled=true].usa-button--hover:active,.usa-button[aria-disabled=true].usa-button--hover:focus,.usa-button[aria-disabled=true].usa-button--hover.usa-focus,.usa-button[aria-disabled=true].usa-button--active:hover,.usa-button[aria-disabled=true].usa-button--active:active,.usa-button[aria-disabled=true].usa-button--active:focus,.usa-button[aria-disabled=true].usa-button--active.usa-focus{color:GrayText}}@media (forced-colors: active){.usa-button:disabled:not(.usa-button--unstyled),.usa-button[aria-disabled=true]:not(.usa-button--unstyled){border:2px solid GrayText}}.usa-button .usa-icon{-ms-flex-negative:0;flex-shrink:0}@media (forced-colors: active){.usa-button:not(.usa-button--unstyled){border:2px solid transparent}}.usa-button--accent-cool{color:#1b1b1b;background-color:#00bde3}.usa-button--accent-cool:visited{color:#1b1b1b;background-color:#00bde3}.usa-button--accent-cool:hover,.usa-button--accent-cool.usa-button--hover{color:#1b1b1b;background-color:#28a0cb}.usa-button--accent-cool:active,.usa-button--accent-cool.usa-button--active{color:white;background-color:#07648d}.usa-button--accent-warm{color:#1b1b1b;background-color:#fa9441}.usa-button--accent-warm:visited{color:#1b1b1b;background-color:#fa9441}.usa-button--accent-warm:hover,.usa-button--accent-warm.usa-button--hover{color:white;background-color:#c05600}.usa-button--accent-warm:active,.usa-button--accent-warm.usa-button--active{color:white;background-color:#775540}.usa-button--outline{background-color:transparent;-webkit-box-shadow:inset 0 0 0 2px #005ea2;box-shadow:inset 0 0 0 2px #005ea2;color:#005ea2}.usa-button--outline:visited{color:#005ea2}.usa-button--outline:hover,.usa-button--outline.usa-button--hover{background-color:transparent;-webkit-box-shadow:inset 0 0 0 2px #1a4480;box-shadow:inset 0 0 0 2px #1a4480;color:#1a4480}.usa-button--outline:active,.usa-button--outline.usa-button--active{background-color:transparent;-webkit-box-shadow:inset 0 0 0 2px #162e51;box-shadow:inset 0 0 0 2px #162e51;color:#162e51}.usa-button--outline.usa-button--inverse{-webkit-box-shadow:inset 0 0 0 2px #dfe1e2;box-shadow:inset 0 0 0 2px #dfe1e2;color:#dfe1e2}.usa-button--outline.usa-button--inverse:visited{color:#dfe1e2}.usa-button--outline.usa-button--inverse:hover,.usa-button--outline.usa-button--inverse.usa-button--hover{-webkit-box-shadow:inset 0 0 0 2px #f0f0f0;box-shadow:inset 0 0 0 2px #f0f0f0;color:#f0f0f0}.usa-button--outline.usa-button--inverse:active,.usa-button--outline.usa-button--inverse.usa-button--active{background-color:transparent;-webkit-box-shadow:inset 0 0 0 2px white;box-shadow:inset 0 0 0 2px white;color:white}.usa-button--outline.usa-button--inverse.usa-button--unstyled{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;width:auto;color:#dfe1e2}.usa-button--outline.usa-button--inverse.usa-button--unstyled:visited{color:#54278f}.usa-button--outline.usa-button--inverse.usa-button--unstyled:hover{color:#1a4480}.usa-button--outline.usa-button--inverse.usa-button--unstyled:active{color:#162e51}.usa-button--outline.usa-button--inverse.usa-button--unstyled:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-button--outline.usa-button--inverse.usa-button--unstyled:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled.usa-button--hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true].usa-button--hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled:active,.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--active,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled:active,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:active,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled.usa-button--active,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true].usa-button--active,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled:focus,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:focus,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled.usa-focus,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true].usa-focus,.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true],.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--hover{color:#1a4480}.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--active{color:#162e51}.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true],.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true],.usa-button--outline.usa-button--inverse.usa-button--unstyled:disabled:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled[aria-disabled=true]:focus{color:GrayText}}.usa-button--outline.usa-button--inverse.usa-button--unstyled:visited{color:#dfe1e2}.usa-button--outline.usa-button--inverse.usa-button--unstyled:hover,.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--hover{color:#f0f0f0}.usa-button--outline.usa-button--inverse.usa-button--unstyled:active,.usa-button--outline.usa-button--inverse.usa-button--unstyled.usa-button--active{color:white}.usa-button--base{color:white;background-color:#71767a}.usa-button--base:hover,.usa-button--base.usa-button--hover{color:white;background-color:#565c65}.usa-button--base:active,.usa-button--base.usa-button--active{color:white;background-color:#3d4551}.usa-button--secondary{color:white;background-color:#d83933}.usa-button--secondary:hover,.usa-button--secondary.usa-button--hover{color:white;background-color:#b50909}.usa-button--secondary:active,.usa-button--secondary.usa-button--active{color:white;background-color:#8b0a03}.usa-button--big{border-radius:0.25rem;font-size:1.46rem;padding:1rem 1.5rem}.usa-button--outline:disabled,.usa-button--outline:disabled:hover,.usa-button--outline:disabled:active,.usa-button--outline:disabled:focus,.usa-button--outline[aria-disabled=true],.usa-button--outline[aria-disabled=true]:hover,.usa-button--outline[aria-disabled=true]:active,.usa-button--outline[aria-disabled=true]:focus,.usa-button--outline-inverse:disabled,.usa-button--outline-inverse:disabled:hover,.usa-button--outline-inverse:disabled:active,.usa-button--outline-inverse:disabled:focus,.usa-button--outline-inverse[aria-disabled=true],.usa-button--outline-inverse[aria-disabled=true]:hover,.usa-button--outline-inverse[aria-disabled=true]:active,.usa-button--outline-inverse[aria-disabled=true]:focus{background-color:transparent;color:#757575}.usa-button--outline:disabled,.usa-button--outline[aria-disabled=true]{-webkit-box-shadow:inset 0 0 0 2px #c9c9c9;box-shadow:inset 0 0 0 2px #c9c9c9}.usa-button--outline:disabled.usa-button--inverse,.usa-button--outline[aria-disabled=true].usa-button--inverse{-webkit-box-shadow:inset 0 0 0 2px #919191;box-shadow:inset 0 0 0 2px #919191;color:#919191}@media (forced-colors: active){.usa-button--outline:disabled.usa-button--inverse,.usa-button--outline[aria-disabled=true].usa-button--inverse{color:GrayText}}.usa-button--unstyled{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;width:auto}.usa-button--unstyled:visited{color:#54278f}.usa-button--unstyled:hover{color:#1a4480}.usa-button--unstyled:active{color:#162e51}.usa-button--unstyled:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-button--unstyled:hover,.usa-button--unstyled.usa-button--hover,.usa-button--unstyled:disabled:hover,.usa-button--unstyled[aria-disabled=true]:hover,.usa-button--unstyled:disabled.usa-button--hover,.usa-button--unstyled[aria-disabled=true].usa-button--hover,.usa-button--unstyled:active,.usa-button--unstyled.usa-button--active,.usa-button--unstyled:disabled:active,.usa-button--unstyled[aria-disabled=true]:active,.usa-button--unstyled:disabled.usa-button--active,.usa-button--unstyled[aria-disabled=true].usa-button--active,.usa-button--unstyled:disabled:focus,.usa-button--unstyled[aria-disabled=true]:focus,.usa-button--unstyled:disabled.usa-focus,.usa-button--unstyled[aria-disabled=true].usa-focus,.usa-button--unstyled:disabled,.usa-button--unstyled[aria-disabled=true],.usa-button--unstyled.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-button--unstyled.usa-button--hover{color:#1a4480}.usa-button--unstyled.usa-button--active{color:#162e51}.usa-button--unstyled:disabled,.usa-button--unstyled[aria-disabled=true],.usa-button--unstyled:disabled:hover,.usa-button--unstyled[aria-disabled=true]:hover,.usa-button--unstyled[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-button--unstyled:disabled,.usa-button--unstyled[aria-disabled=true],.usa-button--unstyled:disabled:hover,.usa-button--unstyled[aria-disabled=true]:hover,.usa-button--unstyled[aria-disabled=true]:focus{color:GrayText}}.usa-button-group{margin-bottom:0;margin-top:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;list-style-type:none;margin-left:-0.25rem;margin-right:-0.25rem;padding-left:0}@media all and (min-width: 30em){.usa-button-group{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:row;flex-direction:row}}.usa-button-group .usa-button-group{height:100%}@media all and (min-width: 30em){.usa-button-group .usa-button-group .usa-button-group__item{margin-top:0;margin-bottom:0}}.usa-button-group .usa-button-group--segmented .usa-button-group__item{margin-top:0;margin-bottom:0}.usa-button-group__item{margin:0.25rem}@media all and (min-width: 30em){.usa-button-group__item:last-child{margin-right:0}}.usa-button-group__item .usa-button{height:100%;margin-left:0;margin-right:0}.usa-button-group--segmented{-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;margin-left:0;margin-right:0}@media all and (min-width: 30em){.usa-button-group--segmented{-ms-flex-pack:start;justify-content:flex-start}}.usa-button-group--segmented .usa-button{position:relative;width:calc(100% + 2px)}@media all and (min-width: 30em){.usa-button-group--segmented .usa-button{width:auto}}.usa-button-group--segmented .usa-button:hover,.usa-button-group--segmented .usa-button:active{z-index:2}.usa-button-group--segmented .usa-button:focus{z-index:3}.usa-button-group--segmented .usa-button-group__item{margin-left:0;margin-right:0;width:100%}@media all and (min-width: 30em){.usa-button-group--segmented .usa-button-group__item{width:auto}}.usa-button-group--segmented .usa-button-group__item:first-child>.usa-button{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}.usa-button-group--segmented .usa-button-group__item:last-child>.usa-button{border-top-left-radius:0;border-bottom-left-radius:0;margin-right:0;margin-left:-2px;width:calc(100% + 2px)}@media all and (min-width: 30em){.usa-button-group--segmented .usa-button-group__item:last-child>.usa-button{margin-left:-1px;width:auto}}.usa-button-group--segmented .usa-button-group__item:where(:not(:first-child):not(:last-child))>.usa-button{border-radius:0;margin-right:-1px;margin-left:-1px}.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) .usa-button::before{border-right:1px solid #1a4480;bottom:0;content:"";display:block;height:100%;position:absolute;right:1px;top:0;width:1px;z-index:3}.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) .usa-button--secondary::before{border-right-color:#b50909}.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) .usa-button--accent-cool::before{border-right-color:#28a0cb}.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) .usa-button--base::before{border-right-color:#565c65}.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) [class*=usa-button]:disabled::before,.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) [class*=usa-button][aria-disabled=true]::before{border-right-color:white}.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) .usa-button:active::before,.usa-button-group--segmented .usa-button-group__item:where(:not(:last-child)) .usa-button--outline::before{display:none}.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-js-no-click{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.usa-js-no-click .usa-modal,.usa-js-no-click .usa-modal *{pointer-events:auto;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}[data-open-modal] *{pointer-events:none}.usa-modal-wrapper{text-align:center;-webkit-transition:opacity 0.15s ease-in-out;transition:opacity 0.15s ease-in-out}.usa-modal-wrapper.is-hidden{visibility:hidden;opacity:0;position:fixed}.usa-modal-wrapper.is-visible{visibility:visible;opacity:1;position:fixed;z-index:99999}.usa-modal-overlay{background:rgba(0, 0, 0, 0.7);bottom:0;height:100%;left:0;overflow:scroll;overflow-x:hidden;padding:1.5rem;position:fixed;scroll-behavior:smooth;top:0;width:100%}.usa-modal-overlay:before{content:"";display:inline-block;height:100%;vertical-align:middle}.usa-modal-overlay[data-force-action=true]{pointer-events:none}.usa-modal-overlay[data-force-action=true] *{pointer-events:auto}.usa-js-loading .usa-modal-wrapper{position:absolute;left:-999em;right:auto}.usa-js-loading .usa-modal-wrapper:target{position:static}.usa-modal{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5;border-radius:0.5rem;background:white;color:#1b1b1b;display:inline-block;margin:1.25rem auto;max-width:30rem;position:relative;text-align:left;vertical-align:middle;width:100%}.usa-modal:focus{outline:none}.usa-modal__content{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse;padding-top:2rem;width:100%}.usa-modal__main{margin:0 auto;padding:0.5rem 2rem 2rem}.usa-modal-wrapper [data-close-modal]>.usa-icon,.usa-modal-wrapper [data-close-modal]>.usa-icon use{pointer-events:none !important}.usa-modal__close{-ms-flex-align:center;align-items:center;-ms-flex-item-align:end;align-self:flex-end;background-color:transparent;color:#71767a;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;font-size:0.93rem;margin:-2rem 0 0 auto;padding:0.25rem 0.25rem;width:auto}.usa-modal__close:hover,.usa-modal__close:active{background-color:transparent;color:#1b1b1b}.usa-modal__close:focus{outline-offset:0}.usa-modal__close .usa-icon{height:2rem;margin:2px 2px 0 0;width:2rem}.usa-modal__heading{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.4;margin-top:0}.usa-modal__footer{margin-top:1.5rem}.usa-modal--lg{max-width:55rem;width:100%}.usa-modal--lg .usa-modal__main{padding-bottom:4rem;padding-top:1.25rem;width:100%;max-width:40rem}@media all and (min-width: 40em){.usa-modal--lg .usa-modal__heading{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem}}.usa-js-modal--active{overflow:hidden}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}.usa-modal-alert{padding:0px;margin-left:1rem}.usa-modal__heading,.usa-modal--lg .usa-modal__heading{font-family:var(--font-serif)}.usa-modal:not(.usa-modal--lg){width:auto}.usa-modal va-button{width:100%}.usa-modal__main div[role=document]{overflow-wrap:anywhere}@media screen and (max-width: 481px){.usa-modal__content{width:85%}}:host([status=info]) .usa-modal{border-left-color:var(--vads-color-primary-alt-dark);background-color:var(--vads-color-primary-alt-lightest)}:host .usa-modal__main{position:relative;margin:0px auto;-webkit-box-sizing:border-box;box-sizing:border-box}.va-modal__content{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:baseline;align-items:baseline}.va-modal-alert__icon{color:var(--vads-color-base-darker);padding-top:1.25rem;position:relative;top:0.25rem}:host([status=continue]) .usa-modal{border-left-color:var(--vads-color-success-dark);background-color:var(--vads-color-success-lighter)}:host([status=success]) .usa-modal{border-left-color:var(--vads-color-success-dark);background-color:var(--vads-color-success-lighter)}:host([status=warning]) .usa-modal{border-left-color:var(--vads-color-warning);background-color:var(--vads-color-gold-lightest)}:host([status=error]) .usa-modal{border-left-color:var(--vads-color-secondary-dark);background-color:var(--vads-color-secondary-lightest)}.va-modal-alert{-webkit-box-sizing:border-box;box-sizing:border-box;border-left-style:solid;border-left-width:10px;display:-ms-inline-flexbox;display:inline-flex;padding:2rem 4rem 2rem 1.5rem}:host{display:block}:host([visible]:not([visible=false])){background:rgba(50, 58, 69, 0.8);bottom:0;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;left:0;overflow-y:auto;padding:0.938rem;position:fixed;scroll-behavior:smooth;text-align:center;top:0;width:100%;z-index:9001}:host([visible]:not([visible=false]))::before{content:"";display:inline-block;height:100%;vertical-align:middle}.va-modal-inner{background:var(--vads-color-white);bottom:0;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:auto;display:inline-block;margin:0.781rem auto;max-width:25rem;position:relative;text-align:left;vertical-align:middle;width:100%}.va-modal-close{background-color:transparent;color:var(--vads-color-base-darker);font-size:1.4rem;padding:6px;position:absolute;margin:0 0 0 auto;right:0;top:0;width:auto;z-index:9;white-space:nowrap}.va-modal-close:hover{color:var(--vads-color-base)}.va-modal-body{margin-right:1.25rem;overflow-wrap:break-word;padding:1.25rem;word-break:break-word;word-wrap:break-word}h1{font-family:var(--font-serif);font-size:1.25rem;line-height:1.3;margin-bottom:0.3125rem;margin-top:0.9375rem}.va-modal-title{margin:0 0 1rem 0}.alert-actions button{background-color:var(--vads-color-primary);margin-top:0.5rem;margin-right:0.5rem;margin-bottom:0.5rem;white-space:nowrap}.alert-actions .button-secondary{background-color:transparent;-webkit-box-shadow:inset 0 0 0 2px var(--vads-color-primary);box-shadow:inset 0 0 0 2px var(--vads-color-primary);color:var(--vads-color-primary)}.alert-actions button:hover,.alert-actions button:focus{background-color:var(--vads-color-primary-dark)}.alert-actions .button-secondary:hover,.alert-actions .button-secondary:focus{background-color:var(--vads-color-gray-cool-light)}.va-modal-alert::before{display:block;width:auto;background:none;font-family:"Font Awesome 5 Free";font-size:1.25rem;margin-right:1rem;position:static;font-weight:900;height:100%;left:0;top:0}.va-modal-alert .va-modal-alert-body{display:table-cell;padding-left:1rem;padding-right:0;width:100%;vertical-align:middle;margin:inherit}.va-modal-alert-title{margin:0 0 1.25rem 0}:host([status=continue]) .va-modal-inner{border-left-color:var(--vads-color-success-dark)}:host([status=error]) .va-modal-inner{border-left-color:var(--vads-color-secondary-dark)}:host([status=info]) .va-modal-inner{border-left-color:var(--vads-color-primary-alt-dark)}:host([status=success]) .va-modal-inner{border-left-color:var(--vads-color-success-dark)}:host([status=warning]) .va-modal-inner{border-left-color:var(--vads-color-warning)}.va-modal-alert .alert-actions{margin-top:1.5rem}.va-modal-alert .alert-actions button{margin:0}.va-modal-alert .alert-actions button+button{margin-left:1.25rem}@media (max-width: 320px){.alert-actions button{width:100%}.va-modal-alert .alert-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.va-modal-alert .alert-actions button+button{margin:1rem 0 0 0}}@media screen and (max-width: 481px){:host([visible]:not([visible=false])){overflow-y:scroll}.va-modal-inner{top:0}.va-modal-alert .alert-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.va-modal-alert .alert-actions button+button{margin:1rem 0 0 0}.usa-modal--lg .usa-modal__main{max-width:-webkit-fill-available;max-width:-moz-fit-content}}:host([large]:not([large=false])) .va-modal-inner{max-width:46.875rem;width:75vw}',VaModalStyle0=vaModalCss,VaModal=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.closeEvent=createEvent(this,"closeEvent",7),this.primaryButtonClick=createEvent(this,"primaryButtonClick",7),this.secondaryButtonClick=createEvent(this,"secondaryButtonClick",7),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.undoAriaHidden=[],this.focusableChildren=null,this.clickToClose=!1,this.disableAnalytics=!1,this.large=!1,this.modalTitle=void 0,this.forcedModal=!1,this.unstyled=!1,this.initialFocusSelector=void 0,this.primaryButtonText=void 0,this.secondaryButtonText=void 0,this.status=void 0,this.visible=!1,this.label=""}watchVisibleHandler(){this.isVisibleDirty=!0}componentDidLoad(){this.visible&&requestAnimationFrame((()=>this.setupModal()))}componentDidUpdate(){this.isVisibleDirty&&(this.isVisibleDirty=!1,this.visible?requestAnimationFrame((()=>this.setupModal())):this.teardownModal())}disconnectedCallback(){this.teardownModal()}handleButtonClickAnalytics(t){"va-modal"!==t.detail.componentName&&t.stopPropagation()}handleClick(t){this.clickToClose&&this.visible&&t.composedPath()[0]===this.el&&this.handleClose(t)}handleKeyDown(t){if(!this.visible)return;const e=t.key;if("Escape"===e&&this.handleClose(t),"Tab"!==e)return;const o=this.getRealActiveElement(),a=this.focusableChildren[0],n=this.focusableChildren[this.focusableChildren.length-1];t.shiftKey||o!==n?t.shiftKey&&o===a&&(t.preventDefault(),n.focus()):(t.preventDefault(),a.focus())}handleClose(t){this.closeEvent.emit(t)}handlePrimaryButtonClick(t){if(this.primaryButtonClick.emit(t),!this.disableAnalytics){const t={componentName:"va-modal",action:"click",details:{clickLabel:this.primaryButtonText,status:this.status,title:this.modalTitle}};this.componentLibraryAnalytics.emit(t)}}handleSecondaryButtonClick(t){if(this.secondaryButtonClick.emit(t),!this.disableAnalytics){const t={componentName:"va-modal",action:"click",details:{clickLabel:this.secondaryButtonText,status:this.status,title:this.modalTitle}};this.componentLibraryAnalytics.emit(t)}}getFocusableChildren(){var t,e;const o=Array.from((null===(t=this.el)||void 0===t?void 0:t.querySelectorAll(focusableQueryString))||[]),a=Array.from((null===(e=this.alertActions)||void 0===e?void 0:e.querySelectorAll(focusableQueryString))||[]),n=[];return[this.closeButton,...o,...a].reduce(((t,e)=>{if(e&&(e.offsetWidth||e.offsetHeight))if(e.classList.contains("hydrated")){let o=[];if(e.shadowRoot?(n.push(e.tagName),o=Array.from(e.shadowRoot.querySelectorAll(focusableQueryString)||[])):o=Array.from(e.querySelectorAll(focusableQueryString)||[]),o.length)return t.push(e),t.concat(o)}else t.push(e);return t}),[]).filter((t=>!n.includes(t.tagName)))}getRealActiveElement(){let t=document.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}setupModal(){var t;this.savedFocus=this.getRealActiveElement(),this.focusableChildren=this.getFocusableChildren();const e=this.el.querySelector(this.initialFocusSelector)||(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector(this.initialFocusSelector))||this.closeButton;null==e||e.focus(),disableBodyScroll(this.el),this.undoAriaHidden=[];const{ancestors:o,shadowRoots:a}=this.getModalHierarchy();if(this.undoAriaHidden.push(hideOthers(o)),a.forEach((t=>{this.undoAriaHidden.push(hideOthers([this.el],t))})),!this.disableAnalytics){const t={componentName:"va-modal",action:"show",details:{status:this.status,title:this.modalTitle,primaryButtonText:this.primaryButtonText,secondaryButtonText:this.secondaryButtonText}};this.componentLibraryAnalytics.emit(t)}}teardownModal(){var t;clearAllBodyScrollLocks(),this.undoAriaHidden.forEach((t=>null==t?void 0:t())),this.undoAriaHidden=[],null===(t=this.savedFocus)||void 0===t||t.focus()}getModalHierarchy(){var t;const e=[],o=[];if(!this.el)return{ancestors:e,shadowRoots:o};e.push(this.el);let a=this.el;for(;a;){const n=null===(t=a.getRootNode)||void 0===t?void 0:t.call(a);if(!(n instanceof ShadowRoot))break;o.push(n);const s=n.host;if(!s)break;e.push(s),a=s}return{ancestors:e,shadowRoots:o}}render(){const{label:t,modalTitle:e,primaryButtonClick:o,primaryButtonText:a,secondaryButtonClick:n,secondaryButtonText:s,status:i,visible:u,forcedModal:r,unstyled:l}=this;if(!u)return null;let d=null,c="Close modal";t?(d=t,c=`Close ${t} modal`):e&&""!==e?(d=`${e} modal`,c=`Close ${e} modal`):console.warn("<va-modal>: An accessible name for the modal is required. Please provide either a label or modalTitle prop value.");const b=classnames({"usa-modal":!0,"va-modal-alert":i,"usa-modal--lg":this.large}),m=classnames({"usa-modal__content":!0,"usa-modal-alert":i,"va-modal__content":!0}),v=classnames({"usa-modal__main":!0,"usa-modal-alert":i,"va-modal-alert-body":i}),p=classnames({"usa-modal__heading":!0,"va-modal-alert-title":i}),f=r?"":h("button",{"aria-label":c,class:"va-modal-close",onClick:t=>this.handleClose(t),ref:t=>this.closeButton=t,type:"button"},h("va-icon",{icon:"close",size:4}));return h(Host,null,h("div",{class:b,role:"warning"===i||"error"===i?"alertdialog":"dialog","aria-modal":"true","aria-label":d},h("div",{class:m},f,i&&h("va-icon",{class:"va-modal-alert__icon",icon:{continue:"lock",error:"error",info:"info",success:"check",warning:"warning"}[i],size:4}),h("div",{class:v},h("div",{role:"document"},e&&h("h2",{class:p,tabindex:-1,id:"heading"},e),h("div",{class:"usa-prose",id:"description"},h("slot",null))),(o&&a||n&&s)&&h("div",{class:"usa-modal__footer",ref:t=>this.alertActions=t},h("ul",{class:"usa-button-group"},o&&a&&h("li",{class:"usa-button-group__item"},h("va-button",{onClick:t=>this.handlePrimaryButtonClick(t),text:a})),n&&s&&h("li",{class:"usa-button-group__item"},!l&&h("va-button",{onClick:t=>this.handleSecondaryButtonClick(t),secondary:!0,text:s}),l&&h("button",{onClick:t=>this.handlePrimaryButtonClick(t),type:"button",class:"usa-button usa-button--unstyled"},s))))))))}get el(){return this}static get watchers(){return{visible:["watchVisibleHandler"]}}static get style(){return VaModalStyle0}},[1,"va-modal",{clickToClose:[4,"click-to-close"],disableAnalytics:[4,"disable-analytics"],large:[516],modalTitle:[1,"modal-title"],forcedModal:[4,"forced-modal"],unstyled:[4],initialFocusSelector:[1,"initial-focus-selector"],primaryButtonText:[1,"primary-button-text"],secondaryButtonText:[1,"secondary-button-text"],status:[1],visible:[516],label:[1]},[[0,"component-library-analytics","handleButtonClickAnalytics"],[0,"click","handleClick"],[8,"keydown","handleKeyDown"]],{visible:["watchVisibleHandler"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-modal","va-button","va-icon"].forEach((t=>{switch(t){case"va-modal":customElements.get(t)||customElements.define(t,VaModal);break;case"va-button":customElements.get(t)||defineCustomElement$2();break;case"va-icon":customElements.get(t)||defineCustomElement$1()}}))}export{VaModal as V,defineCustomElement as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Build,proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Host}from"@stencil/core/internal/client";import"./contacts.js";import{i as instance}from"./i18next.js";const iconHttpsSvg="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiIHdpZHRoPSI2NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMzIgMGMxNy42NzMgMCAzMiAxNC4zMjcgMzIgMzJzLTE0LjMyNyAzMi0zMiAzMi0zMi0xNC4zMjctMzItMzIgMTQuMzI3LTMyIDMyLTMyem0wIDEuMjA4Yy0xNy4wMDYgMC0zMC43OTIgMTMuNzg2LTMwLjc5MiAzMC43OTJzMTMuNzg2IDMwLjc5MiAzMC43OTIgMzAuNzkyIDMwLjc5Mi0xMy43ODYgMzAuNzkyLTMwLjc5Mi0xMy43ODYtMzAuNzkyLTMwLjc5Mi0zMC43OTJ6bTAgMTguODg2YTcuMjQ1IDcuMjQ1IDAgMCAxIDcuMjQ1IDcuMjQ1djMuMTAzaC41MmMuODYgMCAxLjU1Ny42OTggMS41NTcgMS41NTh2OS4zMjJjMCAuODYtLjY5NyAxLjU1OC0xLjU1NyAxLjU1OGgtMTUuNTNjLS44NiAwLTEuNTU3LS42OTctMS41NTctMS41NTh2LTkuMzIyYzAtLjg2LjY5Ny0xLjU1OCAxLjU1Ny0xLjU1OGguNTJ2LTMuMTAyYTcuMjQ1IDcuMjQ1IDAgMCAxIDcuMjQ1LTcuMjQ2em0wIDMuMTAzYTQuMTQyIDQuMTQyIDAgMCAwIC00LjE0MiA0LjE0MnYzLjEwM2g4LjI4NHYtMy4xMDJhNC4xNDIgNC4xNDIgMCAwIDAgLTQuMTQyLTQuMTQzeiIgZmlsbD0iIzcxOWYyYSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",iconDotGovSvg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5pY29uLWRvdC1nb3Y8L3RpdGxlPjxwYXRoIGZpbGw9IiMyMzc4QzMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTMyIDBjMTcuNjczIDAgMzIgMTQuMzI3IDMyIDMyIDAgMTcuNjczLTE0LjMyNyAzMi0zMiAzMkMxNC4zMjcgNjQgMCA0OS42NzMgMCAzMiAwIDE0LjMyNyAxNC4zMjcgMCAzMiAwem0wIDEuMjA4QzE0Ljk5NCAxLjIwOCAxLjIwOCAxNC45OTQgMS4yMDggMzJTMTQuOTk0IDYyLjc5MiAzMiA2Mi43OTIgNjIuNzkyIDQ5LjAwNiA2Mi43OTIgMzIgNDkuMDA2IDEuMjA4IDMyIDEuMjA4em0xMC41OSAzOC44NThhLjg1Ny44NTcgMCAwIDEgLjg4Mi44MjJ2MS42NDJIMTguODg2di0xLjY0MmEuODU3Ljg1NyAwIDAgMSAuODgyLS44MjJINDIuNTl6TTI1LjQ0MyAyNy43NzR2OS44MjloMS42NDJ2LTkuODNoMy4yNzN2OS44M0gzMnYtOS44M2gzLjI3MnY5LjgzaDEuNjQzdi05LjgzaDMuMjcydjkuODNoLjc2YS44NTcuODU3IDAgMCAxIC44ODIuODIxdi44MjFoLTIxLjN2LS44MDlhLjg1Ny44NTcgMCAwIDEgLjg4LS44MmguNzYydi05Ljg0MmgzLjI3MnptNS43MzYtOC4xODhsMTIuMjkzIDQuOTE1djEuNjQyaC0xLjYzYS44NTcuODU3IDAgMCAxLS44ODIuODIySDIxLjQxYS44NTcuODU3IDAgMCAxLS44ODItLjgyMmgtMS42NDJ2LTEuNjQybDEyLjI5My00LjkxNXoiLz48L3N2Zz4=",vaOfficialGovBannerCss='p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}:host{display:block}.banner{background-color:#f0f0f0;font-size:12px;line-height:1.5;padding-bottom:0}.accordion{color:#1b1b1b;line-height:1.5;list-style-type:none;margin:0;padding:0;width:100%}.grid-col-fill{-ms-flex:1 1 0%;flex:1 1 0%;min-width:1px}.grid-col-auto,.grid-col-fill{-ms-flex:0 1 auto;flex:0 1 auto;width:auto;max-width:100%}.grid-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-0.469rem;margin-right:-0.469rem;margin-top:0;margin-bottom:0}.col{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex:0 0 46%;flex:0 0 46%;padding-left:0.469rem;padding-right:0.469rem}@media (max-width: 767px){.col{-ms-flex:unset;flex:unset}}#header{padding-bottom:6px;padding-top:6px;position:relative}#header.expanded .header-action{display:none}@media (max-width: 767px){#header{min-height:32px}#header.expanded{padding-right:56px}}.inner{margin-left:auto;margin-right:auto;max-width:1024px;padding-left:16px;padding-right:16px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:start;align-items:flex-start;padding-right:0}.header-flag{float:left;margin-right:8px;width:16px}.header-text{font-size:12px;margin-bottom:2px;margin-right:5px;margin-top:2px;line-height:1.1}.header-action{color:#005ea2;font-size:12px;line-height:1.1;margin-bottom:0;margin-top:2px;text-decoration:underline}@media (min-width: 768px){.header-action{display:none}}button:not([disabled]):focus{outline:2px solid var(--vads-color-action-focus-on-light)}button[aria-expanded=false],button[aria-expanded=true]{background-image:none}@media (max-width: 767px){button{width:100%}}button{border:0;color:#005ea2;font-size:12px;margin:0;margin-left:0.313rem;padding-left:0;padding-right:0;position:relative}@media (max-width: 767px){button{-webkit-font-smoothing:inherit;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;margin:0;margin-bottom:-4px;text-align:left;left:0;position:absolute;bottom:0;top:0;color:#005ea2;display:block;height:auto;line-height:1.1;padding:0;text-decoration:none;width:100%}}button:hover{color:#1a4480;cursor:pointer}.button-text{position:absolute;left:-999em;right:auto;text-decoration:underline}@media (min-width: 768px){.button-text{position:static;display:inline}}@media (max-width: 767px){#header .header-action::after,#header.expanded .header-action::after{background-color:#005ea2}#header.expanded .header-action::after,#header .header-action::after{background:0 0;background-color:#005ea2;-webkit-mask: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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;mask: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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;display:inline-block;height:18px;width:18px;content:"";vertical-align:middle;margin-left:2px}}@media (min-width: 768px){button::after,button:hover::after{background-color:#005ea2;position:absolute}button::after,#header.expanded button::after{background:0 0;background-color:#005ea2;display:inline-block;height:18px;width:18px;content:"";vertical-align:middle;margin-left:2px;top:-1px}button::after{-webkit-mask: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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;mask: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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain}#header.expanded button::after{-webkit-mask: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 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;mask: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 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain}}@media (max-width: 767px){button[aria-expanded=true]:after{bottom:0;top:0;position:absolute;right:0}@supports ((-webkit-mask: url()) or (mask: url())){button[aria-expanded=true]::after{background:0 0;background-color:#005ea2 !important;-webkit-mask: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%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/24px 24px;mask: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%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/24px 24px}}button[aria-expanded=true]::after,button[aria-expanded=true]:before{position:absolute;content:"";height:48px;width:48px;bottom:0;top:0;right:0}button[aria-expanded=true]::after{background:0 0;background-color:#005ea2;-webkit-mask: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%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;mask: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%22M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain;display:inline-block;height:48px;width:48px;content:"";vertical-align:middle;margin-left:0}button[aria-expanded=true]:before{background-color:#dfe1e2;display:block}}button::after{position:absolute}.content{margin-left:auto;margin-right:auto;max-width:1024px;background-color:transparent;font-size:16px;overflow:hidden;padding:24px 32px 16px 16px}.content img{-ms-flex-negative:0;flex-shrink:0;margin-right:8px;width:45px}.content .media-block{-ms-flex:1 1 0%;flex:1 1 0%}.content svg{height:1.5ex;width:1.21875ex}.content p{margin-top:0;-webkit-margin-after:1em;margin-block-end:1em}',VaOfficialGovBannerStyle0=vaOfficialGovBannerCss;Build.isTesting&&instance.init({lng:"cimode"});const VaOfficialGovBanner=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.handleClick=()=>{var e,t,a;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".content"),n=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.querySelector("button"),o=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.querySelector("div#header");if(n.setAttribute("aria-expanded","true"===n.getAttribute("aria-expanded")?"false":"true"),o.classList.toggle("expanded"),i.hidden?i.removeAttribute("hidden"):i.setAttribute("hidden","true"),!this.disableAnalytics){const e={componentName:"va-official-gov-banner",action:"true"===n.getAttribute("aria-expanded")?"expand":"collapse"};this.componentLibraryAnalytics.emit(e)}},this.govSiteExplanationText=()=>{var e;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".gov-site-explanation-text");if(t){const e=instance.t("gov-site-explanation",{tld:this.tld});e&&(t.innerHTML=e.replace(`.${this.tld}`,`<strong>.${this.tld}</strong>`))}},this.govSiteLockText=()=>{var e;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".gov-site-lock-text");let a=instance.t("gov-site-lock",{image:"SVG",tld:this.tld});a=a.replace("SVG",'( <span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" width="52" height="64" viewBox="0 0 52 64" role="img" aria-labelledby="banner-lock-description" focusable="false">\n <title id="banner-lock-title">Lock</title>\n <desc id="banner-lock-description">Locked padlock icon</desc>\n <path fill="#000000" fill-rule="evenodd" d="M26 0c10.493 0 19 8.507 19 19v9h3a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V32a4 4 0 0 1 4-4h3v-9C7 8.507 15.507 0 26 0zm0 8c-5.979 0-10.843 4.77-10.996 10.712L15 19v9h22v-9c0-6.075-4.925-11-11-11z"></path>\n </svg></span> )'),a=a.replace("lock","<strong>lock</strong>"),a=a.replace("candado","<strong>candado</strong>"),a=a.replace("https://","<strong>https://</strong>"),t&&(t.innerHTML=a)},this.disableAnalytics=!1,this.tld="gov"}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}disconnectedCallback(){instance.off("languageChanged")}componentDidLoad(){this.govSiteExplanationText(),this.govSiteLockText()}render(){const{tld:e}=this;if("gov"===e||"mil"===e)return h(Host,{key:"6f9aeb2cb2db419faeb6b82af943b21e7accb5b7"},h("div",{key:"d2f87f49f67b6b14c1c91ffabb9f0c021f0aea45",class:"banner"},h("div",{key:"2e7d39ca06f55434e70f277e1f01a13cb01baa59",class:"accordion"},h("div",{key:"652eded07fd0f9f953d3e814f4abc6476b0701c0",id:"header"},h("div",{key:"d9a27ec47c7c2a0346c2005544b253a828d4d1be",class:"inner"},h("div",{key:"b8a8c9dc09088a43f114cdc509f23b4dce67816a",class:"grid-col-auto"},h("img",{key:"3e314e8c242bca4adf4830fa92a2a5144000b262",role:"presentation",class:"header-flag",src:"https://s3-us-gov-west-1.amazonaws.com/content.www.va.gov/img/tiny-usa-flag.png",alt:""})),h("div",{key:"aa6336982dc72fd4805ad92a44c942e3871ef07f",class:"grid-col-fill","aria-hidden":"true"},h("p",{key:"b41c2831130b25a6416c070c5f804c31fdab7f9b",class:"header-text"},instance.t("gov-site-label")),h("p",{key:"2d4a526e651cbce9a836e4e4eeef5d29c5d95b6f",class:"header-action"},instance.t("gov-site-button"))),h("button",{key:"3c64d2251ddcd9a20e3ab25a321bd083be8a3656",onClick:this.handleClick,type:"button","aria-expanded":"false","aria-controls":"official-gov-banner"},h("span",{key:"3a95d02acc4886be90bda95e4c0cc0ffcc334def",class:"button-text"},instance.t("gov-site-button"))))),h("div",{key:"6ac396b01113cb9b384a272fb7dd95834c16e458",class:"content",id:"official-gov-banner",hidden:!0},h("div",{key:"8499334de2c023a0123f5e9681867638655fe332",class:"grid-row"},h("div",{key:"b8bee619ccc4680da0102c589cd609e0b7a76042",class:"col"},h("img",{key:"29af4299ac44cc7cab91e7a8893a2b2929ebffc8",src:iconDotGovSvg,role:"presentation",alt:""}),h("div",{key:"cb7caa57c2e4133bdb77a299b693bc4bac94fa63",class:"media-block"},h("p",{key:"898adcec23908baa34350dc9bec6ce3e42a8261a"},h("strong",{key:"5948d078f03c00d153ce259a94d0e1907f6cd222"},instance.t("gov-site-website",{tld:e})),h("br",{key:"6a111b8adfae61cba46692e4eb985cfa165ebe04"}),h("span",{key:"1fb26cd3fc899d9714732a15b397355b42bb9a02",class:"gov-site-explanation-text"},this.govSiteExplanationText())))),h("div",{key:"93e1edc13bd27d8fecd5eaaa2e827e3aa4f18f03",class:"col"},h("img",{key:"207df00a766ea1b39200d881a732a719abf193eb",src:iconHttpsSvg,role:"presentation",alt:""}),h("div",{key:"ce684c9cca25aa15652c69c9d68e3d49a30dd024",class:"media-block"},h("p",{key:"acb2c7f0f0ec2aaf88e6d36fe44574f3606dcb5b"},h("strong",{key:"4a4d7d020a95f97f0e15061681f4e480c6491a84"},instance.t("gov-site-https",{tld:e})),h("br",{key:"b184da4667c77cf95353ac25631d06b5c2c12e07"}),h("span",{key:"1061015c5b1bfd206dfc2b7f263e5bfc22ba85a1",class:"gov-site-lock-text"},this.govSiteLockText())))))))))}get el(){return this}static get style(){return VaOfficialGovBannerStyle0}},[1,"va-official-gov-banner",{disableAnalytics:[4,"disable-analytics"],tld:[1]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-official-gov-banner"].forEach((e=>{"va-official-gov-banner"===e&&(customElements.get(e)||customElements.define(e,VaOfficialGovBanner))}))}export{VaOfficialGovBanner as V,defineCustomElement as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";const vaProgressBarCss='.usa-sr-only{position:absolute;left:-999em;right:auto}div{-webkit-box-sizing:border-box;box-sizing:border-box}.progress-bar{border:2px solid var(--vads-color-primary);border-radius:1em;display:block;height:1em;margin:1em 0;width:100%}.progress-bar-inner{background-color:var(--vads-color-primary);content:" ";display:block;height:100%;max-width:100%}',VaProgressBarStyle0=vaProgressBarCss,VaProgressBar=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.enableAnalytics=!1,this.percent=void 0,this.label=void 0,this.noPercentScreenReader=!1}componentDidRender(){!this.enableAnalytics||0!==this.percent&&100!==this.percent||this.componentLibraryAnalytics.emit({componentName:"va-progress-bar",action:"change",details:{label:this.label||`${this.percent}% complete`,percent:this.percent}})}render(){const{label:e=`${this.percent.toFixed(0)}% complete`,percent:r,noPercentScreenReader:t}=this;return h(Host,{key:"20198d473a23ce987bb0e067b1eb704b34e8a049"},h("div",{key:"aed6fb4b0ae48f08242f9be6ff8cceae8d292c5c","aria-label":e,"aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":r.toFixed(0),"aria-valuetext":e,class:"progress-bar",tabindex:"0",role:"progressbar"},h("div",{key:"f80efd911350027be245546df191fdc871a978a0",class:"progress-bar-inner",style:{width:`${r}%`}})),t?null:h("span",{"aria-atomic":"true","aria-live":"polite",class:"usa-sr-only"},r.toFixed(0),"% complete"))}static get style(){return VaProgressBarStyle0}},[1,"va-progress-bar",{enableAnalytics:[4,"enable-analytics"],percent:[2],label:[1],noPercentScreenReader:[4,"no-percent-screen-reader"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-progress-bar"].forEach((e=>{"va-progress-bar"===e&&(customElements.get(e)||customElements.define(e,VaProgressBar))}))}export{VaProgressBar as V,defineCustomElement as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Fragment,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import"./contacts.js";import{a as getSlottedNodes,i as isMessageSet,g as getHeaderLevel}from"./utils.js";import{i as instance}from"./i18next.js";const vaSelectCss='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}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 Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}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:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}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-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=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}h1 .usa-label,h2 .usa-label,h3 .usa-label,h4 .usa-label,h5 .usa-label,h6 .usa-label{font-family:inherit;font-size:inherit;font-weight:inherit}h1 .usa-label .usa-label--required,h2 .usa-label .usa-label--required,h3 .usa-label .usa-label--required,h4 .usa-label .usa-label--required,h5 .usa-label .usa-label--required,h6 .usa-label .usa-label--required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}: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),::slotted(optgroup){display:none}.va-select--full-width{max-width:100%;width:100%}',VaSelectStyle0=vaSelectCss,VaSelect=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.vaKeyDown=createEvent(this,"vaKeyDown",7),this.vaSelect=createEvent(this,"vaSelect",7),this.vaSelectBlur=createEvent(this,"vaSelectBlur",7),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.required=!1,this.hideRequiredText=!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.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0,this.width=void 0,this.fullWidth=!1,this.showError=!0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.options=void 0}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}disconnectedCallback(){instance.off("languageChanged")}handleKeyDown(){this.vaKeyDown.emit()}handleBlur(e){const a=e.target;this.value=a.value,this.vaSelectBlur.emit({value:this.value})}handleChange(e){const a=e.target;if(this.value=a.value,this.enableAnalytics){const e={componentName:"va-select",action:"change",details:{label:this.label,selectLabel:this.value}};this.componentLibraryAnalytics.emit(e)}this.vaSelect.emit({value:this.value})}populateOptions(){const{value:e}=this,a=getSlottedNodes(this.el,null,"#select-container slot").filter((e=>{const a=e.nodeName.toLowerCase();return"option"===a||"optgroup"===a}));this.options=a.map((a=>"optgroup"===a.nodeName.toLowerCase()?h("optgroup",{label:a.label},Array.from(a.children).map((a=>h("option",{value:a.value,selected:e===a.value},a.text)))):"option"===a.nodeName.toLowerCase()?h("option",{value:a.value,selected:e===a.value},a.textContent):void 0))}handleValueChange(){this.populateOptions()}render(){const{error:e,reflectInputError:a,invalid:t,label:s,required:i,hideRequiredText:r,name:o,hint:l,messageAriaDescribedby:n,width:d,fullWidth:u,showError:c,useFormsPattern:m,formHeadingLevel:b,headerAriaDescribedby:p,formHeading:f}=this,g="input-error-message",v=`${n?"input-message":""} ${e?g:""} ${l?"input-hint":""}`.trim()||null,w=getHeaderLevel(this.labelHeaderLevel),y=p?"header-message":null,x=classnames({"usa-label":!0,"usa-label--error":e}),k=classnames({"usa-select":!0,"usa-input--error":e||a,[`usa-input--${d}`]:d,"va-select--full-width":u});let z=null;if(["single","multiple"].includes(m)){const e=getHeaderLevel(b);z=h(Fragment,{key:"af3cbbc2589a094701b3cb5aaa4028f10e87c312"},f&&h(e,{key:"65a26102386bc62989c79511195c141f575b3319",id:"form-question",part:"form-header"},f),h("div",{key:"321b20bf97edc427bb4fe5ddb9796b296b983fc9",id:"form-description"},h("slot",{key:"6a24c3c0326f11ce38235a00476ec470099ffa98",name:"form-description"})))}const S=h("label",{key:"c7c0fb47d606ebb2ce2d7aadc49c61c80f52cb9d",htmlFor:"options",class:x,part:"label"},s,"multiple"===m&&p?h("span",{id:"header-message",class:"usa-sr-only"},h("span",null,s),h("span",null,p)):"multiple"===m?h("span",{id:"header-message",class:"usa-sr-only"},s):p?h("span",{id:"header-message",class:"usa-sr-only"},p):null,i&&!r&&h("span",{key:"d659fee32bc9573f8c31166a41bd31943dd6b9fc",class:"usa-label--required"}," ",instance.t("required")));return h(Host,{key:"b16ecabf52635c19a759f474f01a5671e71a79be"},z,s&&w?h(w,{part:"header","aria-describedby":y},S):S,l&&h("span",{key:"9fa8e0741693c0f9a93ee1077229c8ad4b80ae27",class:"usa-hint"},l),h("span",{key:"625d42365494f5056c3fd206cac42409aa7f3d41",id:g,role:"alert"},c&&e&&h(Fragment,{key:"025589594f8e78131296da08c3578d26db6337f3"},h("span",{key:"b4bb0ec823ac102363edb42e90c0b35e82ae69f8",class:"usa-sr-only"},instance.t("error")),h("span",{key:"ad1c13b46f19bc7e726caba616169b2174e38df7",class:"usa-error-message"},e))),h("div",{key:"03fb9f64ad2f30865f4f55fdc8c5a85c06f219f6",id:"select-container"},h("slot",{key:"6d2934623db555600ecf5b2364c0b65be83d05e1",onSlotchange:()=>this.populateOptions()}),h("select",{key:"ec5336864756fc95c488b5d5bde9d80ec7caf9d8",class:k,"aria-describedby":v,"aria-invalid":t||e?"true":"false",id:"options",name:o,required:i||null,onKeyDown:()=>this.handleKeyDown(),onChange:e=>this.handleChange(e),onBlur:e=>this.handleBlur(e),part:"select"},h("option",{key:"0",value:"",selected:!0},instance.t("select")),this.options)),isMessageSet(n)&&h("span",{key:"3d917428371791d77f8dc12d86bfd51c4d62b4ef",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},n))}get el(){return this}static get watchers(){return{value:["handleValueChange"]}}static get style(){return VaSelectStyle0}},[1,"va-select",{required:[4],hideRequiredText:[4,"hide-required-text"],label:[1],name:[1],value:[1537],error:[1],reflectInputError:[4,"reflect-input-error"],invalid:[4],enableAnalytics:[4,"enable-analytics"],labelHeaderLevel:[1,"label-header-level"],headerAriaDescribedby:[1,"header-aria-describedby"],hint:[1],messageAriaDescribedby:[1,"message-aria-describedby"],width:[1],fullWidth:[4,"full-width"],showError:[4,"show-error"],useFormsPattern:[1,"use-forms-pattern"],formHeadingLevel:[2,"form-heading-level"],formHeading:[1,"form-heading"],options:[32]},void 0,{value:["handleValueChange"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-select"].forEach((e=>{"va-select"===e&&(customElements.get(e)||customElements.define(e,VaSelect))}))}export{VaSelect as V,defineCustomElement as d};
|