@cfpb/cfpb-design-system 3.12.0 → 3.13.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/dist/base/index.css +1 -1
  3. package/dist/base/index.css.map +2 -2
  4. package/dist/base/index.js +1 -1
  5. package/dist/base/index.js.map +1 -1
  6. package/dist/components/cfpb-buttons/index.css +1 -1
  7. package/dist/components/cfpb-buttons/index.css.map +2 -2
  8. package/dist/components/cfpb-buttons/index.js +1 -1
  9. package/dist/components/cfpb-buttons/index.js.map +1 -1
  10. package/dist/components/cfpb-expandables/index.css +1 -2
  11. package/dist/components/cfpb-expandables/index.css.map +3 -3
  12. package/dist/components/cfpb-expandables/index.js +1 -1
  13. package/dist/components/cfpb-expandables/index.js.map +4 -4
  14. package/dist/components/cfpb-forms/index.css +1 -2
  15. package/dist/components/cfpb-forms/index.css.map +3 -3
  16. package/dist/components/cfpb-forms/index.js +1 -1
  17. package/dist/components/cfpb-forms/index.js.map +4 -4
  18. package/dist/components/cfpb-icons/index.css +1 -1
  19. package/dist/components/cfpb-icons/index.css.map +2 -2
  20. package/dist/components/cfpb-icons/index.js +1 -1
  21. package/dist/components/cfpb-icons/index.js.map +1 -1
  22. package/dist/components/cfpb-layout/index.css +1 -1
  23. package/dist/components/cfpb-layout/index.css.map +2 -2
  24. package/dist/components/cfpb-layout/index.js +1 -1
  25. package/dist/components/cfpb-layout/index.js.map +1 -1
  26. package/dist/components/cfpb-notifications/index.css +1 -1
  27. package/dist/components/cfpb-notifications/index.css.map +2 -2
  28. package/dist/components/cfpb-notifications/index.js +1 -1
  29. package/dist/components/cfpb-notifications/index.js.map +1 -1
  30. package/dist/components/cfpb-pagination/index.css +1 -1
  31. package/dist/components/cfpb-pagination/index.css.map +2 -2
  32. package/dist/components/cfpb-pagination/index.js +1 -1
  33. package/dist/components/cfpb-pagination/index.js.map +1 -1
  34. package/dist/components/cfpb-tables/index.css +1 -1
  35. package/dist/components/cfpb-tables/index.css.map +2 -2
  36. package/dist/components/cfpb-tables/index.js +1 -1
  37. package/dist/components/cfpb-tables/index.js.map +1 -1
  38. package/dist/components/cfpb-tooltips/index.css +1 -2
  39. package/dist/components/cfpb-tooltips/index.css.map +3 -3
  40. package/dist/components/cfpb-tooltips/index.js +1 -1
  41. package/dist/components/cfpb-tooltips/index.js.map +4 -4
  42. package/dist/components/cfpb-typography/index.css +1 -1
  43. package/dist/components/cfpb-typography/index.css.map +2 -2
  44. package/dist/components/cfpb-typography/index.js +1 -1
  45. package/dist/components/cfpb-typography/index.js.map +1 -1
  46. package/dist/elements/cfpb-button/index.js +30 -0
  47. package/dist/elements/cfpb-button/index.js.map +7 -0
  48. package/dist/elements/cfpb-file-upload/index.js +39 -0
  49. package/dist/elements/cfpb-file-upload/index.js.map +7 -0
  50. package/dist/index.css +1 -1
  51. package/dist/index.css.map +2 -2
  52. package/dist/index.js +39 -1
  53. package/dist/index.js.map +4 -4
  54. package/dist/utilities/index.css +1 -2
  55. package/dist/utilities/index.css.map +3 -3
  56. package/dist/utilities/index.js +1 -1
  57. package/dist/utilities/index.js.map +4 -4
  58. package/package.json +1 -1
  59. package/src/components/cfpb-forms/tag.scss +2 -1
  60. package/src/components/cfpb-tooltips/index.js +1 -1
  61. package/src/elements/cfpb-button/cfpb-button.component.scss +8 -0
  62. package/src/elements/cfpb-button/index.js +53 -0
  63. package/src/elements/cfpb-file-upload/cfpb-file-upload.component.scss +14 -0
  64. package/src/elements/cfpb-file-upload/index.js +81 -0
  65. package/src/index.js +3 -0
  66. package/src/utilities/behavior/behavior.js +2 -1
  67. package/src/utilities/behavior/flyout-menu.js +4 -7
  68. package/src/utilities/transition/alpha-transition.js +2 -1
  69. package/src/utilities/transition/max-height-transition.js +2 -1
  70. package/src/utilities/transition/move-transition.js +2 -1
@@ -0,0 +1,39 @@
1
+ (()=>{var Zt=Object.defineProperty;var ft=i=>{throw TypeError(i)};var Jt=(i,t,e)=>t in i?Zt(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var k=(i,t,e)=>Jt(i,typeof t!="symbol"?t+"":t,e),Qt=(i,t,e)=>t.has(i)||ft("Cannot "+e);var _t=(i,t,e)=>t.has(i)?ft("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e);var F=(i,t,e)=>(Qt(i,t,"access private method"),e);var At=(i,t,e)=>new Promise((s,r)=>{var n=a=>{try{h(e.next(a))}catch(l){r(l)}},o=a=>{try{h(e.throw(a))}catch(l){r(l)}},h=a=>a.done?s(a.value):Promise.resolve(a.value).then(n,o);h((e=e.apply(i,t)).next())});var L=globalThis,B=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),mt=new WeakMap,P=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(B&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&mt.set(e,t))}return t}toString(){return this.cssText}},I=i=>new P(typeof i=="string"?i:i+"",void 0,Y),X=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((s,r,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[n+1],i[0]);return new P(e,i,Y)},vt=(i,t)=>{if(B)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=L.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},tt=B?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return I(e)})(i):i;var{is:Ft,defineProperty:Yt,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:te,getOwnPropertySymbols:ee,getPrototypeOf:se}=Object,A=globalThis,gt=A.trustedTypes,ie=gt?gt.emptyScript:"",et=A.reactiveElementPolyfillSupport,T=(i,t)=>i,st={toAttribute(i,t){switch(t){case Boolean:i=i?ie:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch(s){e=null}}return e}},Ct=(i,t)=>!Ft(i,t),yt={attribute:!0,type:String,converter:st,reflect:!1,useDefault:!1,hasChanged:Ct},bt,St;(bt=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(St=A.litPropertyMetadata)!=null||(A.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=yt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Yt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){var o;let{get:r,set:n}=(o=Xt(this.prototype,t))!=null?o:{get(){return this[e]},set(h){this[e]=h}};return{get:r,set(h){let a=r==null?void 0:r.call(this);n==null||n.call(this,h),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:yt}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;let t=se(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){let e=this.properties,s=[...te(e),...ee(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(tt(r))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return vt(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(s=>{var r;return(r=s.hostConnected)==null?void 0:r.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:st).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n,o,h,a;let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let l=s.getPropertyOptions(r),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:st;this._$Em=r,this[r]=(a=(h=d.fromAttribute(e,l.type))!=null?h:(o=this._$Ej)==null?void 0:o.get(r))!=null?a:null,this._$Em=null}}requestUpdate(t,e,s){var r,n;if(t!==void 0){let o=this.constructor,h=this[t];if(s!=null||(s=o.getPropertyOptions(t)),!(((r=s.hasChanged)!=null?r:Ct)(h,e)||s.useDefault&&s.reflect&&h===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:n},o){var h,a,l;s&&!((h=this._$Ej)!=null?h:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(a=o!=null?o:e)!=null?a:this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}_$EP(){return At(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,h]of this._$Ep)this[o]=h;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,h]of n){let{wrapped:a}=h,l=this[o];a!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,h,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(r=this._$EO)==null||r.forEach(n=>{var o;return(o=n.hostUpdate)==null?void 0:o.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}},Et;$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[T("elementProperties")]=new Map,$[T("finalized")]=new Map,et==null||et({ReactiveElement:$}),((Et=A.reactiveElementVersions)!=null?Et:A.reactiveElementVersions=[]).push("2.1.0");var N=globalThis,z=N.trustedTypes,xt=z?z.createPolicy("lit-html",{createHTML:i=>i}):void 0,ot="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,nt="?"+f,re=`<${nt}>`,y=document,U=()=>y.createComment(""),M=i=>i===null||typeof i!="object"&&typeof i!="function",at=Array.isArray,Mt=i=>at(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",it=`[
2
+ \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wt=/-->/g,Pt=/>/g,v=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Tt=/'/g,Ht=/"/g,Rt=/^(?:script|style|textarea|title)$/i,ht=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Ot=ht(1),fe=ht(2),_e=ht(3),b=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),Nt=new WeakMap,g=y.createTreeWalker(y,129);function Dt(i,t){if(!at(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return xt!==void 0?xt.createHTML(t):t}var kt=(i,t)=>{let e=i.length-1,s=[],r,n=t===2?"<svg>":t===3?"<math>":"",o=H;for(let h=0;h<e;h++){let a=i[h],l,d,c=-1,u=0;for(;u<a.length&&(o.lastIndex=u,d=o.exec(a),d!==null);)u=o.lastIndex,o===H?d[1]==="!--"?o=wt:d[1]!==void 0?o=Pt:d[2]!==void 0?(Rt.test(d[2])&&(r=RegExp("</"+d[2],"g")),o=v):d[3]!==void 0&&(o=v):o===v?d[0]===">"?(o=r!=null?r:H,c=-1):d[1]===void 0?c=-2:(c=o.lastIndex-d[2].length,l=d[1],o=d[3]===void 0?v:d[3]==='"'?Ht:Tt):o===Ht||o===Tt?o=v:o===wt||o===Pt?o=H:(o=v,r=void 0);let _=o===v&&i[h+1].startsWith("/>")?" ":"";n+=o===H?a+re:c>=0?(s.push(l),a.slice(0,c)+ot+a.slice(c)+f+_):a+f+(c===-2?h:_)}return[Dt(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},R=class i{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0,h=t.length-1,a=this.parts,[l,d]=kt(t,e);if(this.el=i.createElement(l,s),g.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=g.nextNode())!==null&&a.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith(ot)){let u=d[o++],_=r.getAttribute(c).split(f),D=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:D[2],strings:_,ctor:D[1]==="."?j:D[1]==="?"?G:D[1]==="@"?W:E}),r.removeAttribute(c)}else c.startsWith(f)&&(a.push({type:6,index:n}),r.removeAttribute(c));if(Rt.test(r.tagName)){let c=r.textContent.split(f),u=c.length-1;if(u>0){r.textContent=z?z.emptyScript:"";for(let _=0;_<u;_++)r.append(c[_],U()),g.nextNode(),a.push({type:2,index:++n});r.append(c[u],U())}}}else if(r.nodeType===8)if(r.data===nt)a.push({type:2,index:n});else{let c=-1;for(;(c=r.data.indexOf(f,c+1))!==-1;)a.push({type:7,index:n}),c+=f.length-1}n++}}static createElement(t,e){let s=y.createElement("template");return s.innerHTML=t,s}};function S(i,t,e=i,s){var o,h,a;if(t===b)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl,n=M(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?((a=e._$Co)!=null?a:e._$Co=[])[s]=r:e._$Cl=r),r!==void 0&&(t=S(i,r._$AS(i,t.values),r,s)),t}var V=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,r=((l=t==null?void 0:t.creationScope)!=null?l:y).importNode(e,!0);g.currentNode=r;let n=g.nextNode(),o=0,h=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new x(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new q(n,this,t)),this._$AV.push(d),a=s[++h]}o!==(a==null?void 0:a.index)&&(n=g.nextNode(),o++)}return g.currentNode=y,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},x=class i{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,r){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=(n=r==null?void 0:r.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),M(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==b&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Mt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=R.createElement(Dt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{let o=new V(r,this),h=o.u(this.options);o.p(e),this.T(h),this._$AH=o}}_$AC(t){let e=Nt.get(t.strings);return e===void 0&&Nt.set(t.strings,e=new R(t)),e}k(t){at(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let n of t)r===e.length?e.push(s=new i(this.O(U()),this.O(U()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},E=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,r){let n=this.strings,o=!1;if(n===void 0)t=S(this,t,e,0),o=!M(t)||t!==this._$AH&&t!==b,o&&(this._$AH=t);else{let h=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=S(this,h[s+a],e,a),l===b&&(l=this._$AH[a]),o||(o=!M(l)||l!==this._$AH[a]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+n[a+1]),this._$AH[a]=l}o&&!r&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},j=class extends E{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},G=class extends E{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},W=class extends E{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){var o;if((t=(o=S(this,t,e,0))!=null?o:p)===b)return;let s=this._$AH,r=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},q=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Lt={M:ot,P:f,A:nt,C:1,L:kt,R:V,D:Mt,V:S,I:x,H:E,N:G,U:W,B:j,F:q},rt=N.litHtmlPolyfillSupport,Ut;rt==null||rt(R,x),((Ut=N.litHtmlVersions)!=null?Ut:N.litHtmlVersions=[]).push("3.3.0");var Bt=(i,t,e)=>{var n,o;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,r=s._$litPart$;if(r===void 0){let h=(o=e==null?void 0:e.renderBefore)!=null?o:null;s._$litPart$=r=new x(t.insertBefore(U(),h),h,void 0,e!=null?e:{})}return r._$AI(i),r};var C=globalThis,m=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return b}},It;m._$litElement$=!0,m.finalized=!0,(It=C.litElementHydrateSupport)==null||It.call(C,{LitElement:m});var lt=C.litElementPolyfillSupport;lt==null||lt({LitElement:m});var zt;((zt=C.litElementVersions)!=null?zt:C.litElementVersions=[]).push("4.2.0");var{I:He}=Lt;var Vt=i=>i.strings===void 0;var jt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ct=i=>(...t)=>({_$litDirective$:i,values:t}),K=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var O=(i,t)=>{var s;let e=i._$AN;if(e===void 0)return!1;for(let r of e)(s=r._$AO)==null||s.call(r,t,!1),O(r,t);return!0},Z=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while((e==null?void 0:e.size)===0)},Gt=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),ae(t)}};function oe(i){this._$AN!==void 0?(Z(this),this._$AM=i,Gt(this)):this._$AM=i}function ne(i,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)O(s[n],!1),Z(s[n]);else s!=null&&(O(s,!1),Z(s));else O(this,i)}var ae=i=>{var t,e;i.type==jt.CHILD&&((t=i._$AP)!=null||(i._$AP=ne),(e=i._$AQ)!=null||(i._$AQ=oe))},J=class extends K{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Gt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,r;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(r=this.disconnected)==null||r.call(this)),e&&(O(this,t),Z(this))}setValue(t){if(Vt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ut=()=>new pt,pt=class{},dt=new WeakMap,$t=ct(class extends J{render(i){return p}update(i,[t]){var s;let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=(s=i.options)==null?void 0:s.host,this.rt(this.ct=i.element)),p}rt(i){var t;if(this.isConnected||(i=void 0),typeof this.G=="function"){let e=(t=this.ht)!=null?t:globalThis,s=dt.get(e);s===void 0&&(s=new WeakMap,dt.set(e,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,i),i!==void 0&&this.G.call(this.ht,i)}else this.G.value=i}get lt(){var i,t,e;return typeof this.G=="function"?(t=dt.get((i=this.ht)!=null?i:globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Wt=":root{--input-text-default:var(--black);--input-text-disabled-default:var(--gray-dark);--input-text-placeholder-default:var(--gray-dark);--input-border-default:var(--gray-60);--input-border-disabled:var(--gray-60);--input-border-success:var(--green);--input-border-warning:var(--gold);--input-border-error:var(--red);--input-border-hover-default:var(--pacific);--input-border-focus-default:var(--pacific);--input-bg-default:var(--white);--input-bg-disabled-default:var(--gray-10);--form-alert-icon-color-default:var(--gray);--form-alert-icon-color-success:var(--green);--form-alert-icon-color-warning:var(--gold);--form-alert-icon-color-error:var(--red);--select-border-default:var(--gray-60);--select-border-width-default:1px;--select-border-error:var(--red);--select-border-width-error:2px;--select-border-hover-default:var(--pacific);--select-border-focus-default:var(--pacific);--select-bg-disabled-default:var(--gray-10);--select-icon-bg-default:var(--gray-10);--select-text-disabled-default:var(--gray-dark);--choice-border-default:var(--gray-60);--choice-border-disabled:var(--gray-60);--choice-border-success:var(--green);--choice-border-warning:var(--gold);--choice-border-error:var(--red);--choice-border-hover-default:var(--pacific);--choice-border-focus-default:var(--pacific);--choice-outline-focus-default:var(--pacific);--choice-bg-default:var(--white);--choice-bg-disabled:var(--gray-10);--choice-bg-selected-default:var(--pacific);--choice-bg-selected-disabled:var(--gray-40);--choice-bg-selected-focus-default:var(--pacific);--choice-label-disabled-default:var(--gray-dark)}:host{display:flex;flex-direction:column;width:fit-content}:host::part(upload-details)[hidden=true]{display:none}";var w,qt,Kt,Q=class extends m{constructor(){super();_t(this,w);k(this,"fileInput",ut());k(this,"fileDetails",ut());this.isDetailHidden=!0,this.fileName=""}static get properties(){return{isDetailHidden:{type:Boolean},fileName:{type:String}}}render(){return Ot`<cfpb-button type="secondary" @click="${()=>{this.fileInput.value.click()}}"><slot></slot></cfpb-button><input id="file-upload" class="a-btn a-btn--secondary" type="file" hidden @input="${()=>F(this,w,Kt).call(this)}" ${$t(this.fileInput)}><div part="upload-details" ?hidden="${this.isDetailHidden}" ${$t(this.fileDetails)}><h4>File added</h4><ul><li>${this.fileName} ${this.isDetailHidden}</li></ul><p>To remove or replace your file, select a new file and upload again.</p></div>`}};w=new WeakSet,qt=function(e){let s=e;if(s.indexOf("\\")>-1){let r=s.split("\\");s=r[r.length-1]}return s},Kt=function(){this.fileName=F(this,w,qt).call(this,this.fileInput.value.value),this.isDetailHidden=!1},k(Q,"styles",X`${I(Wt)}`);window.customElements.define("cfpb-file-upload",Q);})();
4
+ /*! Bundled license information:
5
+
6
+ @lit/reactive-element/css-tag.js:
7
+ (**
8
+ * @license
9
+ * Copyright 2019 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ *)
12
+
13
+ @lit/reactive-element/reactive-element.js:
14
+ lit-html/lit-html.js:
15
+ lit-element/lit-element.js:
16
+ lit-html/directive.js:
17
+ lit-html/async-directive.js:
18
+ (**
19
+ * @license
20
+ * Copyright 2017 Google LLC
21
+ * SPDX-License-Identifier: BSD-3-Clause
22
+ *)
23
+
24
+ lit-html/is-server.js:
25
+ (**
26
+ * @license
27
+ * Copyright 2022 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ *)
30
+
31
+ lit-html/directive-helpers.js:
32
+ lit-html/directives/ref.js:
33
+ (**
34
+ * @license
35
+ * Copyright 2020 Google LLC
36
+ * SPDX-License-Identifier: BSD-3-Clause
37
+ *)
38
+ */
39
+ //# sourceMappingURL=index.js.map