@department-of-veterans-affairs/component-library 50.2.2 → 50.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1214.app.bundle.js +1 -1
- package/dist/1450.app.bundle.js +1 -1
- package/dist/2319.app.bundle.js +1 -1
- package/dist/2387.app.bundle.js +1 -1
- package/dist/2654.app.bundle.js +1 -1
- package/dist/2801.app.bundle.js +1 -1
- package/dist/2980.app.bundle.js +1 -0
- package/dist/3071.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/4715.app.bundle.js +1 -1
- package/dist/5155.app.bundle.js +1 -1
- package/dist/5306.app.bundle.js +1 -1
- package/dist/5610.app.bundle.js +1 -1
- package/dist/5830.app.bundle.js +1 -1
- package/dist/6034.app.bundle.js +1 -1
- package/dist/6246.app.bundle.js +1 -1
- package/dist/6247.app.bundle.js +1 -1
- package/dist/6349.app.bundle.js +1 -1
- package/dist/6527.app.bundle.js +1 -1
- package/dist/6655.app.bundle.js +1 -1
- package/dist/712.app.bundle.js +1 -1
- package/dist/7367.app.bundle.js +1 -1
- package/dist/746.app.bundle.js +2 -0
- package/dist/746.app.bundle.js.LICENSE.txt +5 -0
- package/dist/7531.app.bundle.js +1 -1
- package/dist/7663.app.bundle.js +1 -1
- package/dist/8175.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/9288.app.bundle.js +1 -1
- package/dist/9670.app.bundle.js +1 -1
- package/dist/9724.app.bundle.js +1 -1
- package/dist/9800.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/types/components.d.ts +135 -4
- package/dist/components/utils.js +1 -1
- package/dist/components/va-accordion2.js +1 -1
- package/dist/components/va-alert-sign-in.js +1 -1
- package/dist/components/va-combo-box.js +1 -18
- package/dist/components/va-combo-box2.js +20 -0
- package/dist/components/va-input-telephone.d.ts +11 -0
- package/dist/components/va-input-telephone.js +1 -0
- package/dist/components/va-language-toggle.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-minimal-footer.js +1 -1
- package/dist/components/va-need-help.js +1 -1
- package/dist/components/va-official-gov-banner2.js +1 -1
- package/dist/components/va-omb-info.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-bar2.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-select2.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-table-inner2.js +1 -1
- package/dist/components/va-table-row.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-telephone2.js +1 -1
- package/dist/components/va-text-input2.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/dist/react-bindings/index.d.ts +1 -0
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +1 -0
- package/package.json +2 -2
- package/dist/5533.app.bundle.js +0 -1
- /package/dist/components/{va-combo-box.js.LICENSE.txt → va-combo-box2.js.LICENSE.txt} +0 -0
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import{proxyCustomElement,HTMLElement,createEvent,forceUpdate,h,Fragment,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import"./i18n-setup.js";import"./contacts.js";import{i as isMessageSet}from"./utils.js";import{i as instance}from"./i18next.js";var keymap$1={exports:{}},keyboardeventKeyPolyfill={exports:{}};!function(e){!function(){var t,o={polyfill:function(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var t=o.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e},keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(t=1;t<25;t++)o.keys[111+t]="F"+t;var a="";for(t=65;t<91;t++)a=String.fromCharCode(t),o.keys[t]=[a.toLowerCase(),a.toUpperCase()];e.exports=o}()}(keyboardeventKeyPolyfill);const MODIFIERS={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"},MODIFIER_SEPARATOR="+",getEventKey=function(e,t){var o=e.key;if(t)for(var a in MODIFIERS)!0===e[MODIFIERS[a]]&&(o=[a,o].join("+"));return o};keymap$1.exports=function(e){const t=Object.keys(e).some((function(e){return e.indexOf("+")>-1}));return function(o){var a=getEventKey(o,t);return[a,a.toLowerCase()].reduce((function(t,s){return s in e&&(t=e[a].call(this,o)),t}),void 0)}},keymap$1.exports.MODIFIERS=MODIFIERS;const keymap=keymap$1.exports,isElement$1=e=>e&&"object"==typeof e&&1===e.nodeType;var select$1=(e,t)=>{if("string"!=typeof e)return[];t&&isElement$1(t)||(t=window.document);const o=t.querySelectorAll(e);return Array.prototype.slice.call(o)};const select=select$1,isElement=e=>e&&"object"==typeof e&&1===e.nodeType;var selectOrMatches=(e,t)=>{const o=select(e,t);return"string"!=typeof e||isElement(t)&&t.matches(e)&&o.push(t),o},getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}var objectAssign=shouldUseNative()?Object.assign:function(e,t){for(var o,a,s=toObject(e),r=1;r<arguments.length;r++){for(var i in o=Object(arguments[r]))hasOwnProperty.call(o,i)&&(s[i]=o[i]);if(getOwnPropertySymbols){a=getOwnPropertySymbols(o);for(var n=0;n<a.length;n++)propIsEnumerable.call(o,a[n])&&(s[a[n]]=o[a[n]])}}return s};!function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),a=0;o[a]&&o[a]!==t;)++a;return Boolean(o[a])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype);var delegate$2=function(e,t){return function(o){var a=o.target.closest(e);if(a)return t.call(a,o)}},compose$1=function(e){return function(t){return e.some((function(e){return!1===e.call(this,t)}),this)}};const delegate$1=delegate$2,compose=compose$1,SPLAT="*";var delegateAll$1=function(e){const t=Object.keys(e);if(1===t.length&&"*"===t[0])return e["*"];const o=t.reduce((function(t,o){return t.push(delegate$1(o,e[o])),t}),[]);return compose(o)};const assign$1=objectAssign,delegate=delegate$2,delegateAll=delegateAll$1,DELEGATE_PATTERN=/^(.+):delegate\((.+)\)$/,SPACE=" ",getListeners=function(e,t){var o,a,s=e.match(DELEGATE_PATTERN);s&&(e=s[1],o=s[2]),"object"==typeof t&&(a={capture:popKey(t,"capture"),passive:popKey(t,"passive")});var r={selector:o,delegate:"object"==typeof t?delegateAll(t):o?delegate(o,t):t,options:a};return e.indexOf(" ")>-1?e.split(" ").map((function(e){return assign$1({type:e},r)})):(r.type=e,[r])};var popKey=function(e,t){var o=e[t];return delete e[t],o},behavior$1=function(e,t){const o=Object.keys(e).reduce((function(t,o){var a=getListeners(o,e[o]);return t.concat(a)}),[]);return assign$1({add:function(e){o.forEach((function(t){e.addEventListener(t.type,t.delegate,t.options)}))},remove:function(e){o.forEach((function(t){e.removeEventListener(t.type,t.delegate,t.options)}))}},t)};const assign=objectAssign,Behavior=behavior$1,sequence=(...e)=>function(t=document.body){e.forEach((e=>{"function"==typeof this[e]&&this[e].call(this,t)}))};var behavior=(e,t)=>Behavior(e,assign({on:sequence("init","add"),off:sequence("teardown","remove")},t)),sanitizer={exports:{}};sanitizer.exports=function(){var e={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(t){return e._entities[t]},escapeHTML:function(t){for(var o="",a=0;a<t.length;a++)o+=t[a],a+1<arguments.length&&(o+=String(arguments[a+1]||"").replace(e._entity,e.getEntity));return o},createSafeHTML:function(t){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return{__html:e.escapeHTML.apply(e,[t].concat(a)),toString:function(){return"[object WrappedHTMLObject]"},info:"This is a wrapped HTML object. See https://developer.mozilla.org/en-US/Firefox_OS/Security/Security_Automation for more."}},unwrapSafeHTML:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.map((function(e){return e.__html})).join("")}};return e}();const Sanitizer=sanitizer.exports;var events={CLICK:"click"};const PREFIX="usa",COMBO_BOX_CLASS="usa-combo-box",COMBO_BOX_PRISTINE_CLASS="usa-combo-box--pristine",SELECT_CLASS="usa-combo-box__select",INPUT_CLASS="usa-combo-box__input",CLEAR_INPUT_BUTTON_CLASS="usa-combo-box__clear-input",CLEAR_INPUT_BUTTON_WRAPPER_CLASS=`${CLEAR_INPUT_BUTTON_CLASS}__wrapper`,INPUT_BUTTON_SEPARATOR_CLASS="usa-combo-box__input-button-separator",TOGGLE_LIST_BUTTON_CLASS="usa-combo-box__toggle-list",TOGGLE_LIST_BUTTON_WRAPPER_CLASS=`${TOGGLE_LIST_BUTTON_CLASS}__wrapper`,LIST_CLASS="usa-combo-box__list",LIST_OPTION_CLASS="usa-combo-box__list-option",LIST_OPTION_GROUP_CLASS=`${LIST_OPTION_CLASS}--group`,LIST_OPTION_GROUP_OPTION_CLASS=`${LIST_OPTION_CLASS}--group-option`,LIST_OPTION_FOCUSED_CLASS=`${LIST_OPTION_CLASS}--focused`,LIST_OPTION_SELECTED_CLASS=`${LIST_OPTION_CLASS}--selected`,STATUS_CLASS="usa-combo-box__status",ERROR_CLASS="usa-input--error",COMBO_BOX=".usa-combo-box",SELECT=`.${SELECT_CLASS}`,INPUT=`.${INPUT_CLASS}`,CLEAR_INPUT_BUTTON=`.${CLEAR_INPUT_BUTTON_CLASS}`,TOGGLE_LIST_BUTTON=`.${TOGGLE_LIST_BUTTON_CLASS}`,LIST=`.${LIST_CLASS}`,LIST_OPTION=`.${LIST_OPTION_CLASS}`,LIST_OPTION_FOCUSED=`.${LIST_OPTION_FOCUSED_CLASS}`,LIST_OPTION_SELECTED=`.${LIST_OPTION_SELECTED_CLASS}`,STATUS=`.${STATUS_CLASS}`,DEFAULT_FILTER=".*{{query}}.*",noop=()=>{},changeElementValue=(e,t="")=>{const o=e;o.value=t;const a=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});o.dispatchEvent(a)},getComboBoxContext=e=>{const t=e.closest(COMBO_BOX);if(!t)throw new Error(`Element is missing outer ${COMBO_BOX}`);const o=t.querySelector(SELECT),a=t.querySelector(INPUT),s=t.querySelector(LIST),r=t.querySelector(STATUS),i=t.querySelector(LIST_OPTION_FOCUSED),n=t.querySelector(LIST_OPTION_SELECTED),l=t.querySelector(TOGGLE_LIST_BUTTON),c=t.querySelector(CLEAR_INPUT_BUTTON),u=t.classList.contains(COMBO_BOX_PRISTINE_CLASS);return{comboBoxEl:t,selectEl:o,inputEl:a,listEl:s,statusEl:r,focusedOptionEl:i,selectedOptionEl:n,toggleListBtnEl:l,clearInputBtnEl:c,isPristine:u,disableFiltering:"true"===t.dataset.disableFiltering}},disable=e=>{const{inputEl:t,toggleListBtnEl:o,clearInputBtnEl:a}=getComboBoxContext(e);a.hidden=!0,a.disabled=!0,o.disabled=!0,t.disabled=!0},ariaDisable=e=>{const{inputEl:t,toggleListBtnEl:o,clearInputBtnEl:a}=getComboBoxContext(e);a.hidden=!0,a.setAttribute("aria-disabled",!0),o.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},enable=e=>{const{inputEl:t,toggleListBtnEl:o,clearInputBtnEl:a}=getComboBoxContext(e);a.hidden=!1,a.disabled=!1,o.disabled=!1,t.disabled=!1},handleMouseUp=e=>{const t=e.target;t.selectionStart===t.selectionEnd&&t.select()},enhanceComboBox=(e,t)=>{const o=e.closest(COMBO_BOX);if(o.dataset.enhanced)return;const a=o.querySelector("select");if(!a)throw new Error(`${COMBO_BOX} is missing inner select`);const s=a.id,r=t,i=`${s}--list`,n=`${s}-label`,l=`${s}--assistiveHint`,c=[],{defaultValue:u}=o.dataset,{placeholder:d}=o.dataset;let b;if(d&&c.push({placeholder:d}),u)for(let e=0,t=a.options.length;e<t;e+=1){const t=a.options[e];if(t.value===u){b=t;break}}if(!r||!r.matches(`label[for="${s}"]`))throw new Error(`${COMBO_BOX} for ${s} is either missing a label or a "for" attribute`);r.setAttribute("id",n),r.setAttribute("id",n),a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.classList.add("usa-sr-only",SELECT_CLASS),a.id="",a.value="",["required","aria-label","aria-labelledby"].forEach((e=>{if(a.hasAttribute(e)){const t=a.getAttribute(e);c.push({[e]:t}),a.removeAttribute(e)}}));const p=document.createElement("input");if(p.setAttribute("id",s),p.setAttribute("aria-owns",i),p.setAttribute("aria-controls",i),p.setAttribute("aria-autocomplete","list"),p.setAttribute("aria-describedby",l),p.setAttribute("aria-expanded","false"),p.setAttribute("autocapitalize","off"),p.setAttribute("autocomplete","off"),p.setAttribute("class",INPUT_CLASS),p.setAttribute("type","text"),p.setAttribute("role","combobox"),p.onmouseup=handleMouseUp,c.forEach((e=>Object.keys(e).forEach((t=>{const o=Sanitizer.escapeHTML`${e[t]}`;p.setAttribute(t,o)})))),"true"===o.dataset.error&&p.classList.add(ERROR_CLASS),o.insertAdjacentElement("beforeend",p),o.insertAdjacentHTML("beforeend",Sanitizer.escapeHTML`
|
|
3
|
-
<span class="${CLEAR_INPUT_BUTTON_WRAPPER_CLASS}" tabindex="-1">
|
|
4
|
-
<button type="button" class="${CLEAR_INPUT_BUTTON_CLASS}" aria-label="Clear the select contents"> </button>
|
|
5
|
-
</span>
|
|
6
|
-
<span class="${INPUT_BUTTON_SEPARATOR_CLASS}"> </span>
|
|
7
|
-
<span class="${TOGGLE_LIST_BUTTON_WRAPPER_CLASS}" tabindex="-1">
|
|
8
|
-
<button type="button" tabindex="-1" class="${TOGGLE_LIST_BUTTON_CLASS}" aria-label="Toggle the dropdown list"> </button>
|
|
9
|
-
</span>
|
|
10
|
-
<ul
|
|
11
|
-
tabindex="-1"
|
|
12
|
-
id="${i}"
|
|
13
|
-
class="${LIST_CLASS}"
|
|
14
|
-
role="listbox"
|
|
15
|
-
aria-labelledby="${n}"
|
|
16
|
-
hidden>
|
|
17
|
-
</ul>
|
|
18
|
-
<div class="${STATUS_CLASS} usa-sr-only" role="status"></div>`),b){const{inputEl:e}=getComboBoxContext(o);changeElementValue(a,b.value),changeElementValue(e,b.text),o.classList.add(COMBO_BOX_PRISTINE_CLASS)}a.disabled&&(disable(o),a.disabled=!1),a.hasAttribute("aria-disabled")&&(ariaDisable(o),a.removeAttribute("aria-disabled")),o.dataset.enhanced="true"},highlightOption=(e,t,{skipFocus:o,preventScroll:a}={})=>{const{inputEl:s,listEl:r,focusedOptionEl:i}=getComboBoxContext(e);if(i&&(i.classList.remove(LIST_OPTION_FOCUSED_CLASS),i.setAttribute("tabIndex","-1")),t){if(s.setAttribute("aria-activedescendant",t.id),t.setAttribute("tabIndex","0"),t.classList.add(LIST_OPTION_FOCUSED_CLASS),!a){const e=t.offsetTop+t.offsetHeight;e>r.scrollTop+r.offsetHeight&&(r.scrollTop=e-r.offsetHeight),t.offsetTop<r.scrollTop&&(r.scrollTop=t.offsetTop)}o||t.focus({preventScroll:a})}else s.setAttribute("aria-activedescendant",""),s.focus()},generateDynamicRegExp=(e,t="",o={})=>{const a=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");let s=e.replace(/{{(.*?)}}/g,((e,s)=>{const r=s.trim(),i=o[r];if("query"!==r&&i){const e=new RegExp(i,"i"),o=t.match(e);return o?a(o[1]):""}return a(t)}));return s=`^(?:${s})$`,new RegExp(s,"i")},isDataOptGroup=e=>"true"===e.getAttribute("data-optgroup"),displayList=e=>{const{comboBoxEl:t,selectEl:o,inputEl:a,listEl:s,statusEl:r,isPristine:i,disableFiltering:n}=getComboBoxContext(e);let l,c;const u=`${s.id}--option-`,d=(a.value||"").trim().toLowerCase(),b=t.dataset.filter||DEFAULT_FILTER,p=generateDynamicRegExp(b,d,t.dataset),m=[];let g="";for(let e=0,t=o.options.length;e<t;e+=1){const t=o.options[e],a=`${u}${m.length}`;if(t.value&&(n||i||!d||p.test(t.text))){if(o.value&&t.value===o.value&&(l=a),n&&!c&&p.test(t.text)&&(c=a),!d){m.push(t);continue}if(d&&p.test(t.text)&&"true"!==t.getAttribute("data-optgroup")){if("true"===t.getAttribute("data-optgroup-option")&&g!==t.getAttribute("aria-describedby")){g=t.getAttribute("aria-describedby");const e=o.querySelector("#"+g);m.push(e)}m.push(t)}}}const h=m.length;let _=!1,x=0,f=0;const S=m.filter((e=>!isDataOptGroup(e))).length,v=m.map(((e,t)=>{const a=isDataOptGroup(e),s=null!==e.getAttribute("data-optgroup-option");a&&(x+=1),a||(f+=1);const r=`${u}${t}`,i=a?[]:[LIST_OPTION_CLASS];let n="-1",c="false";o.value&&e.value===o.value&&(i.push(LIST_OPTION_SELECTED_CLASS,LIST_OPTION_FOCUSED_CLASS),n="0",c="true"),l||_||a||(i.push(LIST_OPTION_FOCUSED_CLASS),n="0",_=!0),a?i.push(LIST_OPTION_GROUP_CLASS):s&&i.push(LIST_OPTION_GROUP_OPTION_CLASS);const d=document.createElement("li");return a||(d.setAttribute("aria-setsize",S),d.setAttribute("aria-posinset",f),d.setAttribute("aria-describedby",e.getAttribute("aria-describedby"))),d.setAttribute("aria-selected",c),d.setAttribute("id",a?e.id:r),d.setAttribute("class",i.join(" ")),d.setAttribute("tabindex",n),d.setAttribute("role",a?"group":"option"),d.setAttribute("data-value",e.value),d.textContent=e.text,d})),E=document.createElement("li");E.setAttribute("class",`${LIST_OPTION_CLASS}--no-results`),E.textContent="No results found",s.hidden=!1,h?(s.innerHTML="",v.forEach((e=>s.insertAdjacentElement("beforeend",e)))):(s.innerHTML="",s.insertAdjacentElement("beforeend",E)),a.setAttribute("aria-expanded","true");const C=(e,t,o)=>e?`${e} ${e>1?o:t} available.`:"",w=C(x,"group","groups"),O=C(f,"result","results");let T;r.textContent=f?`${w} ${O}`:"No results.",i&&l?T=s.querySelector(`#${l}`):n&&c&&(T=s.querySelector(`#${c}`)),T&&highlightOption(s,T,{skipFocus:!0})},hideList=e=>{const{inputEl:t,listEl:o,statusEl:a,focusedOptionEl:s}=getComboBoxContext(e);a.innerHTML="",t.setAttribute("aria-expanded","false"),t.setAttribute("aria-activedescendant",""),s&&s.classList.remove(LIST_OPTION_FOCUSED_CLASS),o.scrollTop=0,o.hidden=!0},selectItem=e=>{const{comboBoxEl:t,selectEl:o,inputEl:a}=getComboBoxContext(e);changeElementValue(o,e.dataset.value),changeElementValue(a,e.textContent),t.classList.add(COMBO_BOX_PRISTINE_CLASS),hideList(t),a.focus()},clearInput=e=>{const{comboBoxEl:t,listEl:o,selectEl:a,inputEl:s}=getComboBoxContext(e),r=!o.hidden;a.value&&changeElementValue(a),s.value&&changeElementValue(s),t.classList.remove(COMBO_BOX_PRISTINE_CLASS),r&&displayList(t),s.focus()},completeSelection=e=>{const{comboBoxEl:t,selectEl:o,inputEl:a,statusEl:s}=getComboBoxContext(e);s.textContent="";const r=(a.value||"").trim().toLowerCase();if(r){const e=Array.from(o.options).find((e=>e.text.toLowerCase()===r));if(e)return changeElementValue(o,e.value),changeElementValue(a,e.text),void t.classList.add(COMBO_BOX_PRISTINE_CLASS)}changeElementValue(o,""),t.classList.remove(COMBO_BOX_PRISTINE_CLASS)},handleEscape=e=>{const{comboBoxEl:t,inputEl:o}=getComboBoxContext(e.target);hideList(t),completeSelection(t),o.focus()},handleDownFromInput=e=>{const{comboBoxEl:t,listEl:o}=getComboBoxContext(e.target);o.hidden&&displayList(t);let a=o.querySelector(LIST_OPTION_FOCUSED)||o.querySelector(LIST_OPTION);a&&("group"===a.getAttribute("role")&&(a=a.nextSibling),highlightOption(t,a)),e.preventDefault()},handleEnterFromInput=e=>{const{comboBoxEl:t,listEl:o}=getComboBoxContext(e.target),a=!o.hidden;completeSelection(t),a&&hideList(t),e.preventDefault()},handleDownFromListOption=e=>{const t=e.target;let o=t.nextSibling;o&&("group"===o.getAttribute("role")&&(o=o.nextSibling),highlightOption(t,o)),e.preventDefault()},handleSpaceFromListOption=e=>{selectItem(e.target),e.preventDefault()},handleEnterFromListOption=e=>{selectItem(e.target),e.preventDefault()},handleUpFromListOption=e=>{const{comboBoxEl:t,listEl:o,focusedOptionEl:a}=getComboBoxContext(e.target);let s=a&&a.previousSibling;const r=!o.hidden;s&&("group"===s.getAttribute("role")&&(s=s.previousSibling),highlightOption(a,s)),r&&e.preventDefault(),s||hideList(t)},handleMouseover=e=>{e.classList.contains(LIST_OPTION_FOCUSED_CLASS)||highlightOption(e,e,{preventScroll:!0})},toggleList=e=>{const{comboBoxEl:t,listEl:o,inputEl:a}=getComboBoxContext(e);o.hidden?displayList(t):hideList(t),a.focus()},handleClickFromInput=e=>{const{comboBoxEl:t,listEl:o}=getComboBoxContext(e);o.hidden&&displayList(t)},comboBox=behavior({[events.CLICK]:{[INPUT](){this.disabled||handleClickFromInput(this)},[TOGGLE_LIST_BUTTON](){this.disabled||toggleList(this)},[LIST_OPTION](){this.disabled||selectItem(this)},[CLEAR_INPUT_BUTTON](){this.disabled||clearInput(this)}},focusout:{[COMBO_BOX](e){this.contains(e.relatedTarget)||(completeSelection(this),hideList(this))}},keydown:{[COMBO_BOX]:keymap({Escape:handleEscape}),[INPUT]:keymap({Enter:handleEnterFromInput,ArrowDown:handleDownFromInput,Down:handleDownFromInput}),[LIST_OPTION]:keymap({ArrowUp:handleUpFromListOption,Up:handleUpFromListOption,ArrowDown:handleDownFromListOption,Down:handleDownFromListOption,Enter:handleEnterFromListOption," ":handleSpaceFromListOption,"Shift+Tab":noop})},input:{[INPUT](){this.closest(COMBO_BOX).classList.remove(COMBO_BOX_PRISTINE_CLASS),displayList(this)}},mouseover:{[LIST_OPTION](){handleMouseover(this)}}},{init(e,t){selectOrMatches(COMBO_BOX,e).forEach((e=>{enhanceComboBox(e,t)}))},getComboBoxContext:getComboBoxContext,enhanceComboBox:enhanceComboBox,generateDynamicRegExp:generateDynamicRegExp,disable:disable,enable:enable,displayList:displayList,hideList:hideList,COMBO_BOX_CLASS:"usa-combo-box"}),vaComboBoxCss='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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}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{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px}input,select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0.1rem solid var(--vads-color-base-dark);border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--vads-color-base-darkest);display:block;font-size:1.06rem;height:2.625rem;line-height:1.3;margin:0.2em 0;max-width:46rem;padding:1rem 0.7em;width:100%}.usa-hint,.usa-select,.usa-combo-box__input,.usa-combo-box__list,.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-combo-box__input,.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-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-combo-box{max-width:30rem;position:relative}.usa-combo-box--pristine .usa-combo-box__input{padding-right:calc(5em + 4px)}.usa-combo-box--pristine .usa-combo-box__input::-ms-clear{display:none}.usa-combo-box--pristine .usa-combo-box__clear-input{display:block}@media (forced-colors: active){.usa-combo-box--pristine .usa-combo-box__clear-input{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%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");background-repeat:no-repeat;background-position:center center;background-size:1rem 1rem;display:inline-block;height:1rem;width:1rem;height:1.5rem;width:auto;top:0.5rem}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-combo-box--pristine .usa-combo-box__clear-input{background:none;background-color:ButtonText;-webkit-mask-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%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"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-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%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"), linear-gradient(transparent, transparent);mask-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%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"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-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%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"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1rem 1rem;mask-size:1rem 1rem}}}.usa-combo-box__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-bottom:0;max-width:none;padding-right:calc(2.5em + 3px)}.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-combo-box__input:disabled:hover,.usa-combo-box__input:disabled:active,.usa-combo-box__input:disabled:focus,.usa-combo-box__input:disabled.usa-focus,.usa-combo-box__input[aria-disabled=true]:hover,.usa-combo-box__input[aria-disabled=true]:active,.usa-combo-box__input[aria-disabled=true]:focus,.usa-combo-box__input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{border:0;color:GrayText}.usa-combo-box__input:disabled:hover,.usa-combo-box__input:disabled:active,.usa-combo-box__input:disabled:focus,.usa-combo-box__input:disabled.usa-focus,.usa-combo-box__input[aria-disabled=true]:hover,.usa-combo-box__input[aria-disabled=true]:active,.usa-combo-box__input[aria-disabled=true]:focus,.usa-combo-box__input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-combo-box__input:disabled,.usa-combo-box__input[aria-disabled=true]{border:2px solid GrayText}}.usa-combo-box__input:disabled::-webkit-input-placeholder,.usa-combo-box__input[aria-disabled=true]::-webkit-input-placeholder{opacity:1}.usa-combo-box__input:disabled::-moz-placeholder,.usa-combo-box__input[aria-disabled=true]::-moz-placeholder{opacity:1}.usa-combo-box__input:disabled:-ms-input-placeholder,.usa-combo-box__input[aria-disabled=true]:-ms-input-placeholder{opacity:1}.usa-combo-box__input:disabled::-ms-input-placeholder,.usa-combo-box__input[aria-disabled=true]::-ms-input-placeholder{opacity:1}.usa-combo-box__input:disabled::placeholder,.usa-combo-box__input[aria-disabled=true]::placeholder{opacity:1}.usa-combo-box__input:disabled~.usa-combo-box__input-button-separator,.usa-combo-box__input[aria-disabled=true]~.usa-combo-box__input-button-separator{background-color:#454545;cursor:not-allowed}button.usa-combo-box__toggle-list:focus,button.usa-combo-box__clear-input:focus{outline-offset:-4px}button.usa-combo-box__toggle-list:disabled,button.usa-combo-box__toggle-list[aria-disabled=true],button.usa-combo-box__clear-input:disabled,button.usa-combo-box__clear-input[aria-disabled=true]{cursor:not-allowed}.usa-combo-box__toggle-list__wrapper:focus,.usa-combo-box__clear-input__wrapper:focus{outline:0}.usa-combo-box__toggle-list,.usa-combo-box__clear-input{background-color:transparent;background-position:center;background-size:auto 1.5rem;border:0;bottom:1px;cursor:pointer;margin-bottom:0;opacity:0.6;padding-right:2rem;position:absolute;top:1px;z-index:100}.usa-combo-box__clear-input{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%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"), -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%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"), linear-gradient(transparent, transparent);background-repeat:no-repeat;display:none;right:calc(2.5em + 3px)}.usa-combo-box__toggle-list{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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;background-size:auto 2rem;right:1px}@media (forced-colors: active){.usa-combo-box__toggle-list{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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center center;background-size:1rem 1rem;display:inline-block;height:1rem;width:1rem;height:auto;width:auto}@supports ((-webkit-mask: url("")) or (mask: url(""))){.usa-combo-box__toggle-list{background:none;background-color:ButtonText;-webkit-mask-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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));-webkit-mask-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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);mask-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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));mask-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%22M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1rem 1rem;mask-size:1rem 1rem}}.usa-combo-box__toggle-list:disabled,.usa-combo-box__toggle-list[aria-disabled=true]{background-color:GrayText}}.usa-combo-box__input-button-separator{background-color:#c6cace;position:absolute;top:1px;height:calc(100% - 1rem);margin-bottom:0.5rem;margin-top:0.5rem;width:1px;right:calc(2.5em + 2px);-webkit-box-sizing:border-box;box-sizing:border-box;z-index:200}@media (forced-colors: active){.usa-combo-box__input-button-separator{background-color:ButtonText}}.usa-combo-box__list{border-width:1px;border-color:#565c65;border-style:solid;background-color:white;border-radius:0;border-top:0;margin:0;max-height:12.1em;overflow-x:hidden;overflow-y:scroll;padding:0;position:absolute;width:100%;z-index:300}.usa-combo-box__list:focus{outline:0}.usa-combo-box__list-option{border-bottom:1px solid #dfe1e2;cursor:pointer;display:block;padding:0.5rem}.usa-combo-box__list-option--focused{outline:2px solid #162e51;outline-offset:-2px;position:relative;z-index:100}.usa-combo-box__list-option--focused:focus{outline-offset:-4px}.usa-combo-box__list-option--selected{background-color:#005ea2;border-color:#005ea2;color:white}.usa-combo-box__list-option--no-results{cursor:not-allowed;display:block;padding:0.5rem}.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-select{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), -webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:white;background-position:right 0.5rem center;background-size:1.25rem;padding-right:2rem}.usa-select::-ms-expand{display:none}.usa-select:-webkit-autofill{-webkit-appearance:menulist;appearance:menulist}.usa-select:-moz-focusring{color:transparent;text-shadow:0 0 0 black}.usa-select[multiple]{height:auto;background-image:none;padding-right:0}.usa-select option{overflow:hidden;text-overflow:ellipsis}.usa-select:disabled,.usa-select[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:0;color:GrayText}.usa-select:disabled:hover,.usa-select:disabled:active,.usa-select:disabled:focus,.usa-select:disabled.usa-focus,.usa-select[aria-disabled=true]:hover,.usa-select[aria-disabled=true]:active,.usa-select[aria-disabled=true]:focus,.usa-select[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-select:disabled,.usa-select[aria-disabled=true]{border:2px solid GrayText}}@media (forced-colors: active){.usa-select{-webkit-appearance:listbox;-moz-appearance:listbox;appearance:listbox;background-image:none;padding-right:0}}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1008px){:host([error]:not([error=""])){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1008px){:host([error]:not([error=""])[use-forms-pattern=multiple]){padding-left:0}}:host{display:block;font-family:var(--font-source-sans);color:var(--vads-color-base);max-width:30rem}:host([inert]) select{border:0;background:none}.usa-select{margin-bottom:0}::slotted(option),::slotted(optgroup){display:none}.usa-combo-box{max-width:auto}.usa-combo-box__list{width:calc(100% - 2px)}.usa-combo-box__list-option--focused{outline:2px solid var(--vads-color-action-border-base-active-on-light)}.usa-combo-box__list-option--focused:focus{outline-offset:-2px}.usa-combo-box__list-option--group{font-weight:bold;background-color:var(--vads-color-base-lightest);cursor:not-allowed;display:block;padding:0.5rem}.usa-combo-box__list-option--group-option{padding-left:24px}.usa-combo-box__clear-input{right:calc(2.5rem + 3px)}.usa-combo-box__input-button-separator{right:calc(2.5rem + 2px)}.usa-combo-box__clear-input{display:block !important}',VaComboBoxStyle0=vaComboBoxCss,VaComboBox$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.vaSelect=createEvent(this,"vaSelect",7),this.options=void 0,this.labelNode=void 0,this.required=!1,this.disabled=!1,this.label=void 0,this.placeholder=void 0,this.name=void 0,this.value=void 0,this.error=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0}connectedCallback(){instance.on("languageChanged",(()=>{forceUpdate(this.el)}))}componentDidLoad(){const e=this.el.shadowRoot.querySelector(".usa-combo-box"),t=this.el.shadowRoot.querySelector("label");e&&(comboBox.init(e,t),comboBox.on(e));const o=this.el.shadowRoot.querySelector("input");o&&this.error&&o.classList.add("usa-input--error");const a=`${this.messageAriaDescribedby?"input-message":""} ${this.error?"input-error-message":""} ${this.hint?"input-hint":""} ${o.getAttribute("aria-describedby")}`.trim();o.setAttribute("aria-describedby",a)}disconnectedCallback(){instance.off("languageChanged");const e=this.el.shadowRoot.querySelector(".usa-combo-box");e&&comboBox.off(e)}populateOptions(){const{value:e}=this,t=this.el.querySelectorAll("option, optgroup"),o=Array.from(t);this.options=o.map(((t,o)=>"optgroup"===t.nodeName.toLowerCase()?h(Fragment,null,h("option",{"data-optgroup":"true",id:"optgroup-"+o},t.label),Array.from(t.children).map((t=>h("option",{value:t.value,selected:e===t.value,"data-optgroup-option":"true","aria-describedby":"optgroup-"+o},t.text)))):"option"===t.nodeName.toLowerCase()&&"optgroup"!==t.parentElement.nodeName.toLowerCase()?h("option",{value:t.value,selected:e===t.value},t.textContent):void 0))}handleChange(e){const t=e.target;this.value=t.value,this.vaSelect.emit({value:this.value})}render(){const{error:e,value:t,disabled:o,placeholder:a,label:s,required:r,name:i,hint:n,messageAriaDescribedby:l}=this,c=classnames({"usa-label":!0,"usa-label--error":e});return h(Host,{key:"dd9301d6d8b9d37801e6cca5d9cebe46a0e0a016"},h("label",{key:"1e06e7fd2a1f3e64914ef1e89d235a2a4425cf25",htmlFor:"options",class:c,id:"options-label"},s,r&&h("span",{key:"659d61aaeb4142924d78edc5296eb29366d27e53",class:"usa-label--required"}," ",instance.t("required"))),n&&h("span",{key:"3eb59b9e72f58954ea8a2e2fa7e2cacc41bc56bc",class:"usa-hint",id:"input-hint"},n),h("span",{key:"cc2522597365abca27646dc9c1b1ce0d9d78bc81",id:"input-error-message",role:"alert"},e&&h(Fragment,{key:"05655f400fc3fa5fa3abadb07e1c385ece3f0d89"},h("span",{key:"bd4a6dc088dc962df9137e02432af8dbcc54bbe4",class:"usa-sr-only"},instance.t("error")),h("span",{key:"b85987f619f84a60a3ed89b2b389343a8cdfd79c",class:"usa-error-message"},e))),h("slot",{key:"5bb4fefcadf051e0726d81bc184e80a844022d35",onSlotchange:()=>this.populateOptions()}),h("div",{key:"cc216edd9eeeaf5f3840eb658688f5a0bcabfc40",class:"usa-combo-box","data-default-value":t,"data-placeholder":a,"data-error":!!e},h("select",{key:"f5ce10bcbdf61f866793fc378658fe5d8fdb0e8b",class:"usa-select",name:i,id:"options",onChange:e=>this.handleChange(e),disabled:o},this.options)),isMessageSet(l)&&h("span",{key:"c87199e93e54dbcc3e795ceb30e53f716bc0dc65",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},l))}get el(){return this}static get style(){return VaComboBoxStyle0}},[1,"va-combo-box",{required:[4],disabled:[4],label:[1],placeholder:[1],name:[1],value:[1537],error:[1],hint:[1],messageAriaDescribedby:[1,"message-aria-describedby"],options:[32],labelNode:[32]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-combo-box"].forEach((e=>{"va-combo-box"===e&&(customElements.get(e)||customElements.define(e,VaComboBox$1))}))}const VaComboBox=VaComboBox$1,defineCustomElement=defineCustomElement$1;export{VaComboBox,defineCustomElement};
|
|
1
|
+
import{V as VaComboBox$1,d as defineCustomElement$1}from"./va-combo-box2.js";const VaComboBox=VaComboBox$1,defineCustomElement=defineCustomElement$1;export{VaComboBox,defineCustomElement};
|