@momentum-design/components 0.18.5 → 0.18.6
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/browser/index.js +294 -117
- package/dist/browser/index.js.map +4 -4
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +3 -3
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +3 -3
- package/dist/components/formfieldwrapper/formfieldwrapper.utils.js +4 -4
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input/index.js +7 -0
- package/dist/components/input/input.component.d.ts +208 -0
- package/dist/components/input/input.component.js +401 -0
- package/dist/components/input/input.constants.d.ts +25 -0
- package/dist/components/input/input.constants.js +29 -0
- package/dist/components/input/input.styles.d.ts +2 -0
- package/dist/components/input/input.styles.js +118 -0
- package/dist/components/input/input.types.d.ts +4 -0
- package/dist/components/input/input.types.js +1 -0
- package/dist/custom-elements.json +1091 -281
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +3 -2
- package/dist/react/index.js +3 -2
- package/dist/react/input/index.d.ts +39 -0
- package/dist/react/input/index.js +48 -0
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
"use strict";(()=>{var
|
2
|
-
\f\r]`,
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
1
|
+
"use strict";(()=>{var No=Object.defineProperty;var Co=Object.getOwnPropertyDescriptor;var a=(o,t,e,r)=>{for(var i=r>1?void 0:r?Co(t,e):t,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(t,e,i):n(i))||i);return r&&i&&No(t,e,i),i};var Fe=globalThis,Xe=Fe.ShadowRoot&&(Fe.ShadyCSS===void 0||Fe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),sr=new WeakMap,Ae=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==bt)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(Xe&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=sr.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&sr.set(e,t))}return t}toString(){return this.cssText}},ar=o=>new Ae(typeof o=="string"?o:o+"",void 0,bt),p=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,s)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[s+1],o[0]);return new Ae(e,o,bt)},vt=(o,t)=>{if(Xe)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=Fe.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},Ye=Xe?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return ar(e)})(o):o;var{is:zo,defineProperty:Ro,getOwnPropertyDescriptor:Lo,getOwnPropertyNames:ko,getOwnPropertySymbols:wo,getPrototypeOf:Oo}=Object,F=globalThis,dr=F.trustedTypes,Mo=dr?dr.emptyScript:"",yt=F.reactiveElementPolyfillSupport,Se=(o,t)=>o,_e={toAttribute(o,t){switch(t){case Boolean:o=o?Mo:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},Ze=(o,t)=>!zo(o,t),cr={attribute:!0,type:String,converter:_e,reflect:!1,hasChanged:Ze},lr,mr;(lr=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(mr=F.litPropertyMetadata)!=null||(F.litPropertyMetadata=new WeakMap);var P=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=cr){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&Ro(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var n;let{get:i,set:s}=(n=Lo(this.prototype,t))!=null?n:{get(){return this[e]},set(c){this[e]=c}};return{get(){return i==null?void 0:i.call(this)},set(c){let l=i==null?void 0:i.call(this);s.call(this,c),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:cr}static _$Ei(){if(this.hasOwnProperty(Se("elementProperties")))return;let t=Oo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Se("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Se("properties"))){let e=this.properties,r=[...ko(e),...wo(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(Ye(i))}else t!==void 0&&e.push(Ye(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r: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,r;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);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(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){var s;let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let n=(((s=r.converter)==null?void 0:s.toAttribute)!==void 0?r.converter:_e).toAttribute(e,r.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var s;let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let n=r.getPropertyOptions(i),c=typeof n.converter=="function"?{fromAttribute:n.converter}:((s=n.converter)==null?void 0:s.fromAttribute)!==void 0?n.converter:_e;this._$Em=i,this[i]=c.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,r){var i;if(t!==void 0){if(r!=null||(r=this.constructor.getPropertyOptions(t)),!((i=r.hasChanged)!=null?i:Ze)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){var i;this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&((i=this._$Ej)!=null?i:this._$Ej=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((r=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,c]of this._$Ep)this[n]=c;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[n,c]of s)c.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],c)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}},pr;P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[Se("elementProperties")]=new Map,P[Se("finalized")]=new Map,yt==null||yt({ReactiveElement:P}),((pr=F.reactiveElementVersions)!=null?pr:F.reactiveElementVersions=[]).push("2.0.4");var $o={attribute:!0,type:String,converter:_e,reflect:!1,hasChanged:Ze},Do=(o=$o,t,e)=>{let{kind:r,metadata:i}=e,s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(e.name,o),r==="accessor"){let{name:n}=e;return{set(c){let l=t.get.call(this);t.set.call(this,c),this.requestUpdate(n,l,o)},init(c){return c!==void 0&&this.P(n,void 0,o),c}}}if(r==="setter"){let{name:n}=e;return function(c){let l=this[n];t.call(this,c),this.requestUpdate(n,l,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?Do(o,t,e):((r,i,s)=>{let n=i.hasOwnProperty(s);return i.constructor.createProperty(s,n?{...r,wrapped:!0}:r),n?Object.getOwnPropertyDescriptor(i,s):void 0})(o,t,e)}function z(o){return d({...o,state:!0,attribute:!1})}var te=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function hr(o,t){return(e,r,i)=>{let s=n=>{var c,l;return(l=(c=n.renderRoot)==null?void 0:c.querySelector(o))!=null?l:null};if(t){let{get:n,set:c}=typeof r=="object"?e:i!=null?i:(()=>{let l=Symbol();return{get(){return this[l]},set(b){this[l]=b}}})();return te(e,r,{get(){let l=n.call(this);return l===void 0&&(l=s(this),(l!==null||this.hasUpdated)&&c.call(this,l)),l}})}return te(e,r,{get(){return s(this)}})}}var Uo={PREFIX:"mdc",SEPARATOR:"-"},Po={NAMESPACE:Uo},xt=Po;var Vo=o=>[xt.NAMESPACE.PREFIX,o].join(xt.NAMESPACE.SEPARATOR),g={constructTagName:Vo};var qe=g.constructTagName("themeprovider"),Et={THEMECLASS:"mds-theme-stable-darkWebex"};var Ne=globalThis,je=Ne.trustedTypes,ur=je?je.createPolicy("lit-html",{createHTML:o=>o}):void 0,Er="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,Tr="?"+X,Ho=`<${Tr}>`,ie=document,Ce=()=>ie.createComment(""),ze=o=>o===null||typeof o!="object"&&typeof o!="function",zt=Array.isArray,Go=o=>zt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Tt=`[
|
2
|
+
\f\r]`,Ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gr=/-->/g,fr=/>/g,re=RegExp(`>|${Tt}(?:([^\\s"'>=/]+)(${Tt}*=${Tt}*(?:[^
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),br=/'/g,vr=/"/g,Ar=/^(?:script|style|textarea|title)$/i,Rt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),m=Rt(1),un=Rt(2),gn=Rt(3),V=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),yr=new WeakMap,oe=ie.createTreeWalker(ie,129);function Sr(o,t){if(!zt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ur!==void 0?ur.createHTML(t):t}var Bo=(o,t)=>{let e=o.length-1,r=[],i,s=t===2?"<svg>":t===3?"<math>":"",n=Ie;for(let c=0;c<e;c++){let l=o[c],b,y,v=-1,U=0;for(;U<l.length&&(n.lastIndex=U,y=n.exec(l),y!==null);)U=n.lastIndex,n===Ie?y[1]==="!--"?n=gr:y[1]!==void 0?n=fr:y[2]!==void 0?(Ar.test(y[2])&&(i=RegExp("</"+y[2],"g")),n=re):y[3]!==void 0&&(n=re):n===re?y[0]===">"?(n=i!=null?i:Ie,v=-1):y[1]===void 0?v=-2:(v=n.lastIndex-y[2].length,b=y[1],n=y[3]===void 0?re:y[3]==='"'?vr:br):n===vr||n===br?n=re:n===gr||n===fr?n=Ie:(n=re,i=void 0);let B=n===re&&o[c+1].startsWith("/>")?" ":"";s+=n===Ie?l+Ho:v>=0?(r.push(b),l.slice(0,v)+Er+l.slice(v)+X+B):l+X+(v===-2?c:B)}return[Sr(o,s+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Re=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let s=0,n=0,c=t.length-1,l=this.parts,[b,y]=Bo(t,e);if(this.el=o.createElement(b,r),oe.currentNode=this.el.content,e===2||e===3){let v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(i=oe.nextNode())!==null&&l.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let v of i.getAttributeNames())if(v.endsWith(Er)){let U=y[n++],B=i.getAttribute(v).split(X),Be=/([.?@])?(.*)/.exec(U);l.push({type:1,index:s,name:Be[2],strings:B,ctor:Be[1]==="."?_t:Be[1]==="?"?It:Be[1]==="@"?Nt:me}),i.removeAttribute(v)}else v.startsWith(X)&&(l.push({type:6,index:s}),i.removeAttribute(v));if(Ar.test(i.tagName)){let v=i.textContent.split(X),U=v.length-1;if(U>0){i.textContent=je?je.emptyScript:"";for(let B=0;B<U;B++)i.append(v[B],Ce()),oe.nextNode(),l.push({type:2,index:++s});i.append(v[U],Ce())}}}else if(i.nodeType===8)if(i.data===Tr)l.push({type:2,index:s});else{let v=-1;for(;(v=i.data.indexOf(X,v+1))!==-1;)l.push({type:7,index:s}),v+=X.length-1}s++}}static createElement(t,e){let r=ie.createElement("template");return r.innerHTML=t,r}};function le(o,t,e=o,r){var n,c,l;if(t===V)return t;let i=r!==void 0?(n=e.o)==null?void 0:n[r]:e.l,s=ze(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),s===void 0?i=void 0:(i=new s(o),i._$AT(o,e,r)),r!==void 0?((l=e.o)!=null?l:e.o=[])[r]=i:e.l=i),i!==void 0&&(t=le(o,i._$AS(o,t.values),i,r)),t}var St=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 b;let{el:{content:e},parts:r}=this._$AD,i=((b=t==null?void 0:t.creationScope)!=null?b:ie).importNode(e,!0);oe.currentNode=i;let s=oe.nextNode(),n=0,c=0,l=r[0];for(;l!==void 0;){if(n===l.index){let y;l.type===2?y=new Le(s,s.nextSibling,this,t):l.type===1?y=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(y=new Ct(s,this,t)),this._$AV.push(y),l=r[++c]}n!==(l==null?void 0:l.index)&&(s=oe.nextNode(),n++)}return oe.currentNode=ie,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},Le=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this.v}constructor(t,e,r,i){var s;this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this.v=(s=i==null?void 0:i.isConnected)!=null?s:!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=le(this,t,e),ze(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==V&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Go(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!==h&&ze(this._$AH)?this._$AA.nextSibling.data=t:this.T(ie.createTextNode(t)),this._$AH=t}$(t){var s;let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Re.createElement(Sr(r.h,r.h[0]),this.options)),r);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(e);else{let n=new St(i,this),c=n.u(this.options);n.p(e),this.T(c),this._$AH=n}}_$AC(t){let e=yr.get(t.strings);return e===void 0&&yr.set(t.strings,e=new Re(t)),e}k(t){zt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let s of t)i===e.length?e.push(r=new o(this.O(Ce()),this.O(Ce()),this,this.options)):r=e[i],r._$AI(s),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}},me=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,s){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h}_$AI(t,e=this,r,i){let s=this.strings,n=!1;if(s===void 0)t=le(this,t,e,0),n=!ze(t)||t!==this._$AH&&t!==V,n&&(this._$AH=t);else{let c=t,l,b;for(t=s[0],l=0;l<s.length-1;l++)b=le(this,c[r+l],e,l),b===V&&(b=this._$AH[l]),n||(n=!ze(b)||b!==this._$AH[l]),b===h?t=h:t!==h&&(t+=(b!=null?b:"")+s[l+1]),this._$AH[l]=b}n&&!i&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},_t=class extends me{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},It=class extends me{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},Nt=class extends me{constructor(t,e,r,i,s){super(t,e,r,i,s),this.type=5}_$AI(t,e=this){var n;if((t=(n=le(this,t,e,0))!=null?n:h)===V)return;let r=this._$AH,i=t===h&&r!==h||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==h&&(r===h||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,r;typeof this._$AH=="function"?this._$AH.call((r=(e=this.options)==null?void 0:e.host)!=null?r:this.element,t):this._$AH.handleEvent(t)}},Ct=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){le(this,t)}};var At=Ne.litHtmlPolyfillSupport,xr;At==null||At(Re,Le),((xr=Ne.litHtmlVersions)!=null?xr:Ne.litHtmlVersions=[]).push("3.2.0");var _r=(o,t,e)=>{var s,n;let r=(s=e==null?void 0:e.renderBefore)!=null?s:t,i=r._$litPart$;if(i===void 0){let c=(n=e==null?void 0:e.renderBefore)!=null?n:null;r._$litPart$=i=new Le(t.insertBefore(Ce(),c),c,void 0,e!=null?e:{})}return i._$AI(o),i};var Y=class extends P{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e,r;let t=super.createRenderRoot();return(r=(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.o=_r(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return V}},Ir;Y._$litElement$=!0,Y.finalized=!0,(Ir=globalThis.litElementHydrateSupport)==null||Ir.call(globalThis,{LitElement:Y});var Lt=globalThis.litElementPolyfillSupport;Lt==null||Lt({LitElement:Y});var Nr;((Nr=globalThis.litElementVersions)!=null?Nr:globalThis.litElementVersions=[]).push("4.1.0");var Cr=p`
|
4
4
|
:host {
|
5
5
|
box-sizing: border-box;
|
6
6
|
}
|
@@ -10,11 +10,11 @@
|
|
10
10
|
:host *::after {
|
11
11
|
box-sizing: inherit;
|
12
12
|
}
|
13
|
-
`;var
|
13
|
+
`;var We=class extends Y{static register(t){customElements.get(t)||customElements.define(t,this)}};We.styles=[Cr];var zr=We;var u=zr;var Z=class extends Event{constructor(t,e,r){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=r!=null?r:!1}};var pe=class{constructor(t,e,r,i){var s;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(n,c)=>{this.unsubscribe&&(this.unsubscribe!==c&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=n,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(n,c)),this.unsubscribe=c},this.host=t,e.context!==void 0){let n=e;this.context=n.context,this.callback=n.callback,this.subscribe=(s=n.subscribe)!=null?s:!1}else this.context=e,this.callback=r,this.subscribe=i!=null?i:!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Z(this.context,this.t,this.subscribe))}};var Ke=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){let r=e||!Object.is(t,this.o);this.o=t,r&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:r}]of this.subscriptions)e(this.o,r)},t!==void 0&&(this.value=t)}addCallback(t,e,r){if(!r)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});let{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var kt=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},he=class extends Ke{constructor(t,e,r){var i,s;super(e.context!==void 0?e.initialValue:r),this.onContextRequest=n=>{let c=n.composedPath()[0];n.context===this.context&&c!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,c,n.subscribe))},this.onProviderRequest=n=>{let c=n.composedPath()[0];if(n.context!==this.context||c===this.host)return;let l=new Set;for(let[b,{consumerHost:y}]of this.subscriptions)l.has(b)||(l.add(b),y.dispatchEvent(new Z(this.context,b,!0)));n.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(s=(i=this.host).addController)==null||s.call(i,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new kt(this.context))}};var Fo=p`
|
14
14
|
:host {
|
15
15
|
display: contents;
|
16
16
|
}
|
17
|
-
`,
|
17
|
+
`,Lr=Fo;var Qe=class extends u{constructor({context:t,initialValue:e}){super(),this.context=new he(this,{context:t,initialValue:e})}render(){return this.updateContext(),m`<slot></slot>`}};Qe.styles=[...u.styles,Lr];var kr=Qe;var ue=kr;var Je=class{constructor(t){this.themeclass=t}};Je.context=qe;var et=Je;var Xo=p`
|
18
18
|
:host {
|
19
19
|
--mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);
|
20
20
|
--mdc-themeprovider-font-family: var(--mds-font-family-primary);
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
font-feature-settings: var(--mdc-themeprovider-font-feature-settings);
|
33
33
|
}
|
34
|
-
`,
|
34
|
+
`,wr=[Xo];var ge=class extends ue{constructor(){super({context:et.context,initialValue:new et(Et.THEMECLASS)});this.themeclass=Et.THEMECLASS}static get Context(){return et.context}updated(e){super.updated(e),e.has("themeclass")&&(this.setThemeInClassList(),this.currentThemeClass=this.themeclass)}updateContext(){this.context.value.themeclass!==this.themeclass&&(this.context.value.themeclass=this.themeclass,this.context.updateObservers())}setThemeInClassList(){this.currentThemeClass&&this.classList.remove(...this.currentThemeClass.split(" ")),this.themeclass&&this.classList.add(...this.themeclass.split(" "))}};ge.styles=[...ue.styles,...wr],a([z()],ge.prototype,"currentThemeClass",2),a([d({type:String})],ge.prototype,"themeclass",2);var wt=ge;wt.register(qe);var Yo=wt;var T=p`
|
35
35
|
:host {
|
36
36
|
align-items: center;
|
37
37
|
display: flex;
|
@@ -39,7 +39,7 @@
|
|
39
39
|
justify-content: center;
|
40
40
|
width: fit-content;
|
41
41
|
}
|
42
|
-
`,
|
42
|
+
`,L=(o=!1)=>{let t=p`
|
43
43
|
:host {
|
44
44
|
--mdc-focus-ring-inner-color: var(--mds-color-theme-focus-default-0);
|
45
45
|
--mdc-focus-ring-middle-color: var(--mds-color-theme-focus-default-1);
|
@@ -89,7 +89,7 @@
|
|
89
89
|
outline: 0.125rem solid var(--mds-color-theme-focus-default-0);
|
90
90
|
}
|
91
91
|
}
|
92
|
-
`]};var
|
92
|
+
`]};var Zo=[T,p`
|
93
93
|
:host {
|
94
94
|
--mdc-icon-fill-color: currentColor;
|
95
95
|
--mdc-icon-size: var(--computed-icon-size);
|
@@ -104,7 +104,7 @@
|
|
104
104
|
width: 100%;
|
105
105
|
fill: var(--mdc-icon-fill-color);
|
106
106
|
}
|
107
|
-
`,...
|
107
|
+
`,...L()],Or=Zo;var qo=o=>{let{host:t,context:e,subscribe:r}=o;return new pe(t,{context:e,subscribe:r!=null?r:!0})},jo={consume:qo},Mr=jo;var tt=g.constructTagName("iconprovider"),$r=["svg"],Dr=["em","rem","px"],Wo={px:16,em:1,rem:1},q={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",SIZE:Wo.em};var rt=class{};rt.context=tt;var ot=rt;var ne=class extends ue{constructor(){super({context:ot.context,initialValue:new ot});this.fileExtension=q.FILE_EXTENSION;this.lengthUnit=q.LENGTH_UNIT;this.size=q.SIZE}static get Context(){return ot.context}updateValuesInContext(){this.fileExtension&&$r.includes(this.fileExtension)?this.context.value.fileExtension=this.fileExtension:(this.fileExtension=q.FILE_EXTENSION,this.context.value.fileExtension=q.FILE_EXTENSION),this.context.value.url=this.url,this.context.value.size=this.size,this.lengthUnit&&Dr.includes(this.lengthUnit)?this.context.value.lengthUnit=this.lengthUnit:(this.lengthUnit=q.LENGTH_UNIT,this.context.value.lengthUnit=q.LENGTH_UNIT)}updateContext(){(this.context.value.fileExtension!==this.fileExtension||this.context.value.url!==this.url||this.context.value.lengthUnit!==this.lengthUnit||this.context.value.size!==this.size)&&(this.updateValuesInContext(),this.context.updateObservers())}};a([d({type:String})],ne.prototype,"url",2),a([d({type:String,attribute:"file-extension",reflect:!0})],ne.prototype,"fileExtension",2),a([d({type:String,attribute:"length-unit",reflect:!0})],ne.prototype,"lengthUnit",2),a([d({type:Number,reflect:!0})],ne.prototype,"size",2);var ke=ne;var Ur=async(o,t,e,r)=>{let i=await fetch(`${o}/${t}.${e}`,{signal:r});if(!i.ok)throw new Error("There was a problem while fetching the icon!");let s=await i.text(),n=new DOMParser().parseFromString(s,"text/html").body.children[0];return n.setAttribute("data-name",t),n.setAttribute("part","icon"),n.setAttribute("aria-hidden","true"),n};var Pr=g.constructTagName("icon"),Ot={NAME:void 0,SIZE:1};var k=class extends u{constructor(){super();this.name=Ot.NAME;this.ariaLabel=null;this.iconProviderContext=Mr.consume({host:this,context:ke.Context});this.abortController=new AbortController}async getIconData(){if(this.iconProviderContext.value){let{fileExtension:e,url:r}=this.iconProviderContext.value;if(r&&e&&this.name){this.abortController.abort(),this.abortController=new AbortController;try{let i=await Ur(r,this.name,e,this.abortController.signal);this.handleIconLoadedSuccess(i)}catch(i){this.handleIconLoadedFailure(i)}}}}handleIconLoadedSuccess(e){this.iconData=e;let r=new Event("load",{bubbles:!0,cancelable:!0});this.dispatchEvent(r)}handleIconLoadedFailure(e){let r=new CustomEvent("error",{bubbles:!0,cancelable:!0,detail:{error:e}});this.dispatchEvent(r)}updateSize(){var e;if(this.computedIconSize&&(this.lengthUnit||this.lengthUnitFromContext)){let r=`${this.computedIconSize}${(e=this.lengthUnit)!=null?e:this.lengthUnitFromContext}`;this.style.setProperty("--computed-icon-size",r)}}get computedIconSize(){var e,r;return(r=(e=this.size)!=null?e:this.sizeFromContext)!=null?r:Ot.SIZE}updated(e){var r,i,s,n;super.updated(e),e.has("name")&&this.getIconData().catch(c=>{c.name!=="AbortError"&&this.onerror&&this.onerror(c)}),e.has("ariaLabel")&&(this.role=this.ariaLabel?"img":null),(e.has("size")||e.has("lengthUnit"))&&this.updateSize(),this.lengthUnitFromContext!==((r=this.iconProviderContext.value)==null?void 0:r.lengthUnit)&&(this.lengthUnitFromContext=(i=this.iconProviderContext.value)==null?void 0:i.lengthUnit,this.updateSize()),this.sizeFromContext!==((s=this.iconProviderContext.value)==null?void 0:s.size)&&(this.sizeFromContext=(n=this.iconProviderContext.value)==null?void 0:n.size,this.updateSize())}render(){return m` ${this.iconData} `}};k.styles=[...u.styles,...Or],a([z()],k.prototype,"iconData",2),a([z()],k.prototype,"lengthUnitFromContext",2),a([z()],k.prototype,"sizeFromContext",2),a([d({type:String,reflect:!0})],k.prototype,"name",2),a([d({type:Number})],k.prototype,"size",2),a([d({type:String,attribute:"length-unit"})],k.prototype,"lengthUnit",2),a([d({type:String,attribute:"aria-label"})],k.prototype,"ariaLabel",2),a([z()],k.prototype,"abortController",2);var Mt=k;Mt.register(Pr);var Ko=Mt;ke.register(tt);var Qo=ke;var x=o=>o!=null?o:h;var Vr=g.constructTagName("avatar"),C={COUNTER:"counter",ICON:"icon",PHOTO:"photo",TEXT:"text"},$t=99,Jo="user-regular",f={24:24,32:32,48:48,64:64,72:72,88:88,124:124},fe={TYPE:C.PHOTO,SIZE:f[32],ICON_NAME:Jo};var it=o=>{class t extends o{constructor(){super(...arguments);this.size=fe.SIZE;this.isTyping=!1}}return a([d({type:String})],t.prototype,"src",2),a([d({type:String})],t.prototype,"initials",2),a([d({type:String})],t.prototype,"presence",2),a([d({type:Number,reflect:!0,attribute:"size"})],t.prototype,"size",2),a([d({type:String,attribute:"icon-name"})],t.prototype,"iconName",2),a([d({type:Number})],t.prototype,"counter",2),a([d({type:Boolean,attribute:"is-typing"})],t.prototype,"isTyping",2),t};var ei=[T,p`
|
108
108
|
:host {
|
109
109
|
--mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);
|
110
110
|
--mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
@@ -227,38 +227,38 @@
|
|
227
227
|
outline: 0.125rem solid;
|
228
228
|
}
|
229
229
|
}
|
230
|
-
`],
|
231
|
-
<mdc-presence class="presence" type="${this.presence}" size="${
|
232
|
-
`:
|
230
|
+
`],Hr=ei;var Gr=g.constructTagName("presence"),I={ACTIVE:"active",AWAY:"away",AWAY_CALLING:"away-calling",BUSY:"busy",DND:"dnd",MEETING:"meeting",ON_CALL:"on-call",ON_DEVICE:"on-device",ON_MOBILE:"on-mobile",PAUSE:"pause",PTO:"pto",PRESENTING:"presenting",QUIET:"quiet",SCHEDULED:"scheduled"},A={XX_SMALL:"xx_small",X_SMALL:"x_small",SMALL:"small",MIDSIZE:"midsize",LARGE:"large",X_LARGE:"x_large",XX_LARGE:"xx_large"},be={TYPE:I.ACTIVE,SIZE:A.SMALL};var we=g.constructTagName("text"),N={BODY_SMALL_REGULAR:"body-small-regular",BODY_SMALL_MEDIUM:"body-small-medium",BODY_SMALL_BOLD:"body-small-bold",BODY_MIDSIZE_REGULAR:"body-midsize-regular",BODY_MIDSIZE_MEDIUM:"body-midsize-medium",BODY_MIDSIZE_BOLD:"body-midsize-bold",BODY_LARGE_REGULAR:"body-large-regular",BODY_LARGE_MEDIUM:"body-large-medium",BODY_LARGE_BOLD:"body-large-bold",BODY_SMALL_REGULAR_UNDERLINE:"body-small-regular-underline",BODY_SMALL_MEDIUM_UNDERLINE:"body-small-medium-underline",BODY_MIDSIZE_REGULAR_UNDERLINE:"body-midsize-regular-underline",BODY_MIDSIZE_MEDIUM_UNDERLINE:"body-midsize-medium-underline",BODY_LARGE_REGULAR_UNDERLINE:"body-large-regular-underline",BODY_LARGE_MEDIUM_UNDERLINE:"body-large-medium-underline",HEADING_SMALL_REGULAR:"heading-small-regular",HEADING_SMALL_MEDIUM:"heading-small-medium",HEADING_SMALL_BOLD:"heading-small-bold",HEADING_MIDSIZE_REGULAR:"heading-midsize-regular",HEADING_MIDSIZE_MEDIUM:"heading-midsize-medium",HEADING_MIDSIZE_BOLD:"heading-midsize-bold",HEADING_LARGE_REGULAR:"heading-large-regular",HEADING_LARGE_MEDIUM:"heading-large-medium",HEADING_LARGE_BOLD:"heading-large-bold",HEADING_XLARGE_REGULAR:"heading-xlarge-regular",HEADING_XLARGE_MEDIUM:"heading-xlarge-medium",HEADING_XLARGE_BOLD:"heading-xlarge-bold",HEADLINE_SMALL_LIGHT:"headline-small-light",HEADLINE_SMALL_REGULAR:"headline-small-regular"},S={H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",P:"p",SMALL:"small",SPAN:"span",DIV:"div"},R={TYPE:N.BODY_LARGE_REGULAR,TEXT_ELEMENT_TAGNAME:S.P,CSS_PART_TEXT:"text",CHILDREN:"The quick brown fox jumps over the lazy dog"};var Br=o=>({[f[124]]:A.XX_LARGE,[f[88]]:A.X_LARGE,[f[72]]:A.LARGE,[f[64]]:A.MIDSIZE,[f[48]]:A.SMALL,[f[32]]:A.X_SMALL,[f[24]]:A.XX_SMALL})[o]||A.X_SMALL,Fr=o=>({[f[124]]:4.75,[f[88]]:3,[f[72]]:2.5,[f[64]]:2.25,[f[48]]:1.75,[f[32]]:1.25,[f[24]]:1})[o]||1.25,Xr=o=>({[f[124]]:N.HEADING_XLARGE_MEDIUM,[f[88]]:N.HEADING_LARGE_MEDIUM,[f[72]]:N.HEADING_MIDSIZE_MEDIUM,[f[64]]:N.HEADING_SMALL_MEDIUM,[f[48]]:N.HEADING_SMALL_MEDIUM,[f[32]]:N.BODY_MIDSIZE_MEDIUM,[f[24]]:N.BODY_SMALL_MEDIUM})[o]||N.BODY_MIDSIZE_MEDIUM;var Oe=class extends it(u){constructor(){super(...arguments);this.isPhotoLoaded=!1}getPresenceTemplateBasedOnType(e){return e===C.COUNTER&&(this.counter||this.counter===0)?h:this.presence?m`
|
231
|
+
<mdc-presence class="presence" type="${this.presence}" size="${Br(this.size)}"></mdc-presence>
|
232
|
+
`:h}handleOnLoad(){this.isPhotoLoaded=!0}handleOnError(){this.isPhotoLoaded=!1,this.onerror&&this.onerror("There was a problem while fetching the <img/>. Please check the src attribute and try again.")}photoTemplate(){return m`
|
233
233
|
<img
|
234
234
|
class="photo"
|
235
|
-
src="${
|
235
|
+
src="${x(this.src)}"
|
236
236
|
aria-hidden="true"
|
237
237
|
?hidden="${!this.isPhotoLoaded}"
|
238
238
|
@load="${this.handleOnLoad}"
|
239
239
|
@error="${this.handleOnError}"
|
240
240
|
/>
|
241
|
-
`}iconTemplate(){let e=this.iconName||
|
241
|
+
`}iconTemplate(){let e=this.iconName||fe.ICON_NAME;return m`
|
242
242
|
<mdc-icon
|
243
|
-
name="${
|
243
|
+
name="${x(e)}"
|
244
244
|
length-unit="rem"
|
245
|
-
size="${
|
245
|
+
size="${Fr(this.size)}"
|
246
246
|
></mdc-icon>
|
247
|
-
`}textTemplate(e){return
|
247
|
+
`}textTemplate(e){return m`
|
248
248
|
<mdc-text
|
249
|
-
type="${
|
249
|
+
type="${Xr(this.size)}"
|
250
250
|
tagname="span"
|
251
251
|
>
|
252
252
|
${e}
|
253
253
|
</mdc-text>
|
254
|
-
`}generateCounterText(e){return e<0?"0":e
|
254
|
+
`}generateCounterText(e){return e<0?"0":e>$t?`${$t}+`:e.toString()}generateInitialsText(e){return e.toUpperCase().slice(0,2)}generateTextContent(e){let r="";return e===C.TEXT&&this.initials&&(r=this.generateInitialsText(this.initials)),e===C.COUNTER&&(this.counter||this.counter===0)&&(r=this.generateCounterText(this.counter)),this.textTemplate(r)}getTypeBasedOnInputs(){return this.src?C.PHOTO:this.iconName?C.ICON:this.initials?C.TEXT:this.counter||this.counter===0?C.COUNTER:C.ICON}getTemplateBasedOnType(e){switch(e){case C.PHOTO:return this.photoTemplate();case C.TEXT:case C.COUNTER:return this.generateTextContent(e);case C.ICON:default:return this.iconTemplate()}}getLoadingContent(){return this.isTyping?m`<div class="loading__wrapper"><div class="loader"></div></div>`:h}getPhotoPlaceHolderContent(e){return this.isPhotoLoaded?h:e===C.PHOTO?this.initials?this.textTemplate(this.generateInitialsText(this.initials)):this.iconTemplate():h}update(e){super.update(e),e.has("src")&&!this.src&&(this.isPhotoLoaded=!1)}render(){let e=this.getTypeBasedOnInputs();return m`
|
255
255
|
<div class="content" aria-hidden="true">
|
256
256
|
${this.getPhotoPlaceHolderContent(e)}
|
257
257
|
${this.getTemplateBasedOnType(e)}
|
258
258
|
${this.getLoadingContent()}
|
259
259
|
${this.getPresenceTemplateBasedOnType(e)}
|
260
260
|
</div>
|
261
|
-
`}};
|
261
|
+
`}};Oe.styles=[...u.styles,...Hr],a([z()],Oe.prototype,"isPhotoLoaded",2);var Dt=Oe;var ti=[T,p`
|
262
262
|
:host {
|
263
263
|
--mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);
|
264
264
|
--mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);
|
@@ -352,7 +352,7 @@
|
|
352
352
|
.mdc-presence-icon__scheduled {
|
353
353
|
color: var(--mdc-presence-scheduled-background-color);
|
354
354
|
}
|
355
|
-
`],
|
355
|
+
`],Yr=ti;var Zr=o=>{switch(o){case I.AWAY:return"recents-presence-badge-filled";case I.AWAY_CALLING:return"away-calling-presence-filled";case I.BUSY:return"busy-presence-bold";case I.DND:return"dnd-presence-badge-filled";case I.MEETING:return"camera-filled";case I.ON_CALL:return"handset-filled";case I.ON_DEVICE:return"generic-device-video-badge-filled";case I.ON_MOBILE:return"phone-badge-filled";case I.PAUSE:return"pause-badge-filled";case I.PTO:return"pto-presence-filled";case I.PRESENTING:return"share-screen-badge-filled";case I.QUIET:return"quiet-hours-presence-filled";case I.SCHEDULED:return"meetings-presence-badge-filled";case I.ACTIVE:default:return"active-presence-small-filled"}};var se=class extends u{constructor(){super(...arguments);this.type=be.TYPE;this.size=be.SIZE;this.currentIconType=be.TYPE}get iconSize(){switch(this.size){case A.MIDSIZE:return 1.16125;case A.LARGE:return 1.30625;case A.X_LARGE:return 1.596875;case A.XX_LARGE:return 2.25;case A.XX_SMALL:case A.X_SMALL:case A.SMALL:default:return this.size=be.SIZE,.875}}get icon(){let e=Zr(this.type);return e==="active-presence-small-filled"&&(this.type=be.TYPE),e}handleOnLoad(){this.currentIconType=this.type}handleOnError(){this.onerror&&this.onerror("There was a problem while fetching the icon. Please check the icon name and try again.")}render(){return m`
|
356
356
|
<div class="mdc-presence mdc-presence__${this.size}">
|
357
357
|
<mdc-icon
|
358
358
|
class="mdc-presence-icon mdc-presence-icon__${this.currentIconType}"
|
@@ -362,7 +362,7 @@
|
|
362
362
|
@error="${this.handleOnError}"
|
363
363
|
></mdc-icon>
|
364
364
|
</div>
|
365
|
-
`}};
|
365
|
+
`}};se.styles=[...u.styles,...Yr],a([d({type:String,reflect:!0})],se.prototype,"type",2),a([d({type:String,reflect:!0})],se.prototype,"size",2),a([z()],se.prototype,"currentIconType",2);var Ut=se;Ut.register(Gr);var ri=Ut;var qr=p`
|
366
366
|
:host::part(text) {
|
367
367
|
font-size: unset;
|
368
368
|
font-weight: unset;
|
@@ -605,14 +605,14 @@
|
|
605
605
|
text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);
|
606
606
|
text-transform: var(--mds-font-apps-body-small-regular-text-case);
|
607
607
|
}
|
608
|
-
`;var
|
608
|
+
`;var oi=[p`
|
609
609
|
:host {
|
610
610
|
--mdc-text-font-family: var(--mdc-themeprovider-font-family);
|
611
611
|
|
612
612
|
display: block;
|
613
613
|
font-family: var(--mdc-text-font-family);
|
614
614
|
}
|
615
|
-
`,
|
615
|
+
`,qr],jr=oi;var ve=class extends u{constructor(){super(...arguments);this.type=R.TYPE;this.tagname=R.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case S.H1:return m`<h1 part=${R.CSS_PART_TEXT}><slot></slot></h1>`;case S.H2:return m`<h2 part=${R.CSS_PART_TEXT}><slot></slot></h2>`;case S.H3:return m`<h3 part=${R.CSS_PART_TEXT}><slot></slot></h3>`;case S.H4:return m`<h4 part=${R.CSS_PART_TEXT}><slot></slot></h4>`;case S.H5:return m`<h5 part=${R.CSS_PART_TEXT}><slot></slot></h5>`;case S.H6:return m`<h6 part=${R.CSS_PART_TEXT}><slot></slot></h6>`;case S.DIV:return m`<div part=${R.CSS_PART_TEXT}><slot></slot></div>`;case S.SPAN:return m`<span part=${R.CSS_PART_TEXT}><slot></slot></span>`;case S.SMALL:return m`<small part=${R.CSS_PART_TEXT}><slot></slot></small>`;case S.P:default:return m`<p part=${R.CSS_PART_TEXT}><slot></slot></p>`}}};ve.styles=[...u.styles,...jr],a([d({attribute:"type",reflect:!0,type:String})],ve.prototype,"type",2),a([d({attribute:"tagname",reflect:!0,type:String})],ve.prototype,"tagname",2);var Pt=ve;Pt.register(we);var ii=Pt;Dt.register(Vr);var ni=Dt;var Wr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Kr=o=>(...t)=>({_$litDirective$:o,values:t}),nt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this.t=t,this._$AM=e,this.i=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var st=Kr(class extends nt{constructor(o){var t;if(super(o),o.type!==Wr.ATTRIBUTE||o.name!=="class"||((t=o.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){var r,i;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in t)t[s]&&!((r=this.nt)!=null&&r.has(s))&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let n=!!t[s];n===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(n?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return V}});var Qr=g.constructTagName("badge"),H={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},at={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},dt={PRIMARY:"primary",SECONDARY:"secondary"},Me={SUCCESS:"success",WARNING:"warning",ERROR:"error"},Fd={...dt,...Me},j={TYPE:H.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:dt.PRIMARY,ICON_SIZE:1};var si=[T,p`
|
616
616
|
:host {
|
617
617
|
--mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
618
618
|
--mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);
|
@@ -681,21 +681,21 @@
|
|
681
681
|
outline: 0.125rem solid;
|
682
682
|
}
|
683
683
|
}
|
684
|
-
`],
|
684
|
+
`],Jr=si;var O=class extends u{constructor(){super(...arguments);this.variant=j.VARIANT;this.maxCounter=j.MAX_COUNTER;this.overlay=!1;this.ariaLabel=null}getCounterText(e,r){return r===void 0||typeof r!="number"||e===0?"":r>e?`${e}+`:e>j.MAX_COUNTER_LIMIT||r>j.MAX_COUNTER_LIMIT?`${j.MAX_COUNTER_LIMIT}+`:r.toString()}getBadgeIcon(e,r){return m`
|
685
685
|
<mdc-icon
|
686
|
-
class="mdc-badge-icon ${
|
687
|
-
name="${
|
688
|
-
size="${
|
686
|
+
class="mdc-badge-icon ${st({"mdc-badge-overlay":this.overlay,[`mdc-badge-icon__${r}`]:!0})}"
|
687
|
+
name="${x(e)}"
|
688
|
+
size="${j.ICON_SIZE}"
|
689
689
|
></mdc-icon>
|
690
|
-
`}getBadgeDot(){return
|
690
|
+
`}getBadgeDot(){return m`<div class="mdc-badge-dot ${st({"mdc-badge-overlay":this.overlay})}"></div>`}getBadgeCounterText(){return m`
|
691
691
|
<mdc-text
|
692
|
-
type="${
|
692
|
+
type="${N.BODY_SMALL_MEDIUM}"
|
693
693
|
tagname="${S.DIV}"
|
694
|
-
class="mdc-badge-text ${
|
694
|
+
class="mdc-badge-text ${st({"mdc-badge-overlay":this.overlay})}"
|
695
695
|
>
|
696
696
|
${this.getCounterText(this.maxCounter,this.counter)}
|
697
697
|
</mdc-text>
|
698
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(
|
698
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(dt).includes(this.variant)&&(this.variant=j.VARIANT);let{iconName:e,type:r,variant:i}=this;switch(r){case H.ICON:return this.getBadgeIcon(e||"",i);case H.COUNTER:return this.getBadgeCounterText();case H.SUCCESS:return this.getBadgeIcon(at.SUCCESS_ICON_NAME,Me.SUCCESS);case H.WARNING:return this.getBadgeIcon(at.WARNING_ICON_NAME,Me.WARNING);case H.ERROR:return this.getBadgeIcon(at.ERROR_ICON_NAME,Me.ERROR);case H.DOT:default:return this.type=H.DOT,this.getBadgeDot()}}update(e){super.update(e),e.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};O.styles=[...u.styles,...Jr],a([d({type:String,reflect:!0})],O.prototype,"type",2),a([d({type:String,attribute:"icon-name"})],O.prototype,"iconName",2),a([d({type:String,reflect:!0})],O.prototype,"variant",2),a([d({type:Number})],O.prototype,"counter",2),a([d({type:Number,attribute:"max-counter",reflect:!0})],O.prototype,"maxCounter",2),a([d({type:Boolean})],O.prototype,"overlay",2),a([d({type:String,attribute:"aria-label"})],O.prototype,"ariaLabel",2);var Vt=O;Vt.register(Qr);var ai=Vt;var di=p`
|
699
699
|
:host {
|
700
700
|
background-color: transparent;
|
701
701
|
border-radius: 1.25rem;
|
@@ -866,7 +866,7 @@
|
|
866
866
|
--mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);
|
867
867
|
--mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);
|
868
868
|
}
|
869
|
-
`,
|
869
|
+
`,eo=[di];var fc=g.constructTagName("buttonsimple"),ci={20:20,24:24,28:28,32:32,40:40,48:48,52:52,64:64,72:72,88:88,124:124},ye={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},ct={SIZE:ci[32],TYPE:ye.BUTTON,ROLE:"button"};var $e=g.constructTagName("button"),ae={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary"},lt={40:40,32:32,28:28,24:24},G={64:64,52:52,20:20,...lt},Ht={POSITIVE:"positive",NEGATIVE:"negative",ACCENT:"accent",PROMOTIONAL:"promotional",DEFAULT:"default"},xe={PILL:"pill",ICON:"icon",PILL_WITH_ICON:"pill-with-icon"},M={VARIANT:ae.PRIMARY,SIZE:lt[32],COLOR:Ht.DEFAULT,TYPE_INTERNAL:xe.ICON,TYPE:ye.BUTTON};var to=o=>{switch(o){case G[64]:return 2;case G[52]:return 1.75;case G[40]:return 1.25;default:return 1}},Gt=o=>{let t=o.split("-"),e=["bold","filled","regular","light"];return t.filter(r=>!e.includes(r)).join("-")};var li=[T,p`
|
870
870
|
:host {
|
871
871
|
border: 0.0625rem solid transparent;
|
872
872
|
cursor: pointer;
|
@@ -922,10 +922,10 @@
|
|
922
922
|
:host([size="20"]){
|
923
923
|
height: var(--mdc-button-height-size-20);
|
924
924
|
}
|
925
|
-
`,...
|
925
|
+
`,...L()],ro=li;var Ee=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return a([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var oo=o=>{class t extends o{constructor(){super(...arguments);this.tabIndex=0}}return a([d({reflect:!0,type:Number})],t.prototype,"tabIndex",2),t};var $=class extends oo(Ee(u)){constructor(){super();this.active=!1;this.softDisabled=!1;this.size=ct.SIZE;this.role=ct.ROLE;this.type=ct.TYPE;this.prevTabindex=0;this.addEventListener("click",this.executeAction.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.addEventListener("keyup",this.handleKeyUp.bind(this)),this.internals=this.attachInternals()}get form(){return this.internals.form}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this,this.disabled),e.has("softDisabled")&&this.setSoftDisabled(this,this.softDisabled),e.has("active")&&this.setAriaPressed(this,this.active)}executeAction(){this.type===ye.SUBMIT&&this.internals.form&&this.internals.form.requestSubmit(),this.type===ye.RESET&&this.internals.form&&this.internals.form.reset()}setAriaPressed(e,r){r?e.setAttribute("aria-pressed","true"):e.removeAttribute("aria-pressed")}setSoftDisabled(e,r){r?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}setDisabled(e,r){r?(e.setAttribute("aria-disabled","true"),this.prevTabindex=this.tabIndex,this.tabIndex=-1):(this.tabIndex=this.prevTabindex,e.removeAttribute("aria-disabled"))}triggerClickEvent(){let e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});this.dispatchEvent(e),this.executeAction()}handleKeyDown(e){["Enter"," "].includes(e.key)&&(this.classList.add("pressed"),e.key==="Enter"&&this.triggerClickEvent())}handleKeyUp(e){["Enter"," "].includes(e.key)&&(this.classList.remove("pressed"),e.key===" "&&this.triggerClickEvent())}render(){return m`
|
926
926
|
<slot></slot>
|
927
|
-
`}}
|
928
|
-
${this.prefixIcon?
|
927
|
+
`}};$.formAssociated=!0,$.styles=[...u.styles,...ro],a([d({type:Boolean})],$.prototype,"active",2),a([d({type:Boolean,attribute:"soft-disabled"})],$.prototype,"softDisabled",2),a([d({type:Number,reflect:!0})],$.prototype,"size",2),a([d({type:String,reflect:!0})],$.prototype,"role",2),a([d({reflect:!0})],$.prototype,"type",2);var De=$;var w=class extends De{constructor(){super(...arguments);this.variant=M.VARIANT;this.size=M.SIZE;this.color=M.COLOR;this.role="button";this.typeInternal=M.TYPE_INTERNAL;this.iconSize=1}update(e){super.update(e),e.has("active")&&this.modifyIconName(this.active),e.has("size")&&this.setSize(this.size),e.has("variant")&&(this.setVariant(this.variant),this.setSize(this.size)),e.has("color")&&this.setColor(this.color),e.has("typeInternal")&&this.setSize(this.size),(e.has("prefixIcon")||e.has("postfixIcon"))&&this.inferButtonType()}modifyIconName(e){e?(this.prefixIcon&&(this.prevPrefixIcon=this.prefixIcon,this.prefixIcon=`${Gt(this.prefixIcon)}-filled`),this.postfixIcon&&(this.prevPostfixIcon=this.postfixIcon,this.postfixIcon=`${Gt(this.postfixIcon)}-filled`)):(this.prevPrefixIcon&&(this.prefixIcon=this.prevPrefixIcon),this.prevPostfixIcon&&(this.postfixIcon=this.prevPostfixIcon))}setVariant(e){this.setAttribute("variant",Object.values(ae).includes(e)?e:M.VARIANT)}setSize(e){let i=this.typeInternal===xe.ICON?Object.values(G).includes(e)&&!(e===G[20]&&this.variant!==ae.TERTIARY):Object.values(lt).includes(e);this.setAttribute("size",i?`${e}`:`${M.SIZE}`),this.iconSize=to(e)}setColor(e){!Object.values(Ht).includes(e)||this.variant===ae.TERTIARY?this.setAttribute("color",`${M.COLOR}`):this.setAttribute("color",e)}inferButtonType(){var r,i;let e=(i=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:i.assignedNodes().length;e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=xe.PILL_WITH_ICON,this.setAttribute("data-btn-type","pill-with-icon")):!e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=xe.ICON,this.setAttribute("data-btn-type","icon")):(this.typeInternal=xe.PILL,this.setAttribute("data-btn-type","pill"))}render(){return m`
|
928
|
+
${this.prefixIcon?m`
|
929
929
|
<mdc-icon
|
930
930
|
name="${this.prefixIcon}"
|
931
931
|
part="prefix-icon"
|
@@ -933,14 +933,14 @@
|
|
933
933
|
length-unit="rem">
|
934
934
|
</mdc-icon>`:""}
|
935
935
|
<slot @slotchange=${this.inferButtonType}></slot>
|
936
|
-
${this.postfixIcon?
|
936
|
+
${this.postfixIcon?m`
|
937
937
|
<mdc-icon
|
938
938
|
name="${this.postfixIcon}"
|
939
939
|
part="postfix-icon"
|
940
940
|
size=${this.iconSize}
|
941
941
|
length-unit="rem">
|
942
942
|
</mdc-icon>`:""}
|
943
|
-
`}};
|
943
|
+
`}};w.styles=[...De.styles,...eo],a([d({type:String,attribute:"prefix-icon",reflect:!0})],w.prototype,"prefixIcon",2),a([d({type:String,attribute:"postfix-icon",reflect:!0})],w.prototype,"postfixIcon",2),a([d({type:String})],w.prototype,"variant",2),a([d({type:Number})],w.prototype,"size",2),a([d({type:String})],w.prototype,"color",2),a([d({type:String,reflect:!0})],w.prototype,"role",2),a([z()],w.prototype,"typeInternal",2),a([z()],w.prototype,"iconSize",2);var Bt=w;Bt.register($e);var mi=Bt;var pi=p`
|
944
944
|
:host {
|
945
945
|
--mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);
|
946
946
|
--mdc-bullet-size-small: 0.25rem;
|
@@ -961,7 +961,7 @@
|
|
961
961
|
:host([size="large"]) {
|
962
962
|
height: var(--mdc-bullet-size-large);
|
963
963
|
}
|
964
|
-
`,
|
964
|
+
`,io=[pi];var no=g.constructTagName("bullet"),so={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var Ue=class extends u{constructor(){super(...arguments);this.size=so.SMALL}};Ue.styles=[...u.styles,...io],a([d({type:String,reflect:!0})],Ue.prototype,"size",2);var Ft=Ue;Ft.register(no);var hi=Ft;var ui=p`
|
965
965
|
:host {
|
966
966
|
--mdc-marker-width: 0.25rem;
|
967
967
|
--mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);
|
@@ -986,7 +986,7 @@
|
|
986
986
|
var(--mdc-marker-striped-background-color) 0.375rem
|
987
987
|
);
|
988
988
|
}
|
989
|
-
`,
|
989
|
+
`,ao=[ui];var co=g.constructTagName("marker"),lo={SOLID:"solid",STRIPED:"striped"};var Pe=class extends u{constructor(){super(...arguments);this.variant=lo.SOLID}};Pe.styles=[...u.styles,...ao],a([d({type:String,reflect:!0})],Pe.prototype,"variant",2);var Xt=Pe;Xt.register(co);var gi=Xt;var fi=[T,p`
|
990
990
|
:host {
|
991
991
|
--mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);
|
992
992
|
--mdc-divider-width: 0.0625rem;
|
@@ -1130,29 +1130,265 @@
|
|
1130
1130
|
font-size: var(--mdc-divider-text-size);
|
1131
1131
|
line-height: var(--mdc-divider-text-line-height);
|
1132
1132
|
}
|
1133
|
-
`],
|
1133
|
+
`],mo=fi;var po=g.constructTagName("divider"),Ve={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Yt={SOLID:"solid",GRADIENT:"gradient"},W={POSITIVE:"positive",NEGATIVE:"negative"},He={UP:"arrow-up-regular",DOWN:"arrow-down-regular",LEFT:"arrow-left-regular",RIGHT:"arrow-right-regular"},de={ORIENTATION:Ve.HORIZONTAL,VARIANT:Yt.SOLID,ARROW_DIRECTION:W.NEGATIVE,BUTTON_DIRECTION:W.NEGATIVE};var K=class extends u{constructor(){super();this.orientation=de.ORIENTATION;this.variant=de.VARIANT;this.arrowDirection=de.ARROW_DIRECTION;this.buttonPosition=de.BUTTON_DIRECTION;this.setAttribute("data-type","mdc-primary-divider")}setVariant(e){this.setAttribute("variant",Object.values(Yt).includes(e)?e:de.VARIANT)}setOrientation(e){this.setAttribute("orientation",Object.values(Ve).includes(e)?e:de.ORIENTATION)}ensureValidDirections(){let e=this.orientation===Ve.HORIZONTAL?W.NEGATIVE:W.POSITIVE;Object.values(W).includes(this.buttonPosition)||(this.buttonPosition=e),Object.values(W).includes(this.arrowDirection)||(this.arrowDirection=e)}setGrabberButton(){this.ensureValidDirections();let e=this.querySelector("mdc-button");if(e){let r=this.getArrowIcon();e.setAttribute("variant","secondary"),e.setAttribute("prefix-icon",r)}}getArrowIcon(){let e=this.orientation===Ve.HORIZONTAL,r=this.arrowDirection===W.POSITIVE;return e?r?He.UP:He.DOWN:r?He.RIGHT:He.LEFT}update(e){super.update(e),e.has("orientation")&&this.setOrientation(this.orientation),e.has("variant")&&this.setVariant(this.variant),(e.has("orientation")||e.has("arrowDirection")||e.has("buttonPosition"))&&this.setGrabberButton()}inferDividerType(){var n;let e=(n=this.shadowRoot)==null?void 0:n.querySelector("slot"),r=(e==null?void 0:e.assignedElements({flatten:!0}))||[];if(r.length>1)return;let i=r.some(c=>c.tagName===we.toUpperCase()),s=r.some(c=>c.tagName===$e.toUpperCase());i&&!s?this.setAttribute("data-type","mdc-text-divider"):!i&&s&&(this.setAttribute("data-type","mdc-grabber-divider"),this.setGrabberButton())}render(){return m`
|
1134
1134
|
<div></div>
|
1135
1135
|
<slot @slotchange=${this.inferDividerType}></slot>
|
1136
1136
|
<div></div>
|
1137
|
-
`}};
|
1137
|
+
`}};K.styles=[...u.styles,...mo],a([d({type:String,reflect:!0})],K.prototype,"orientation",2),a([d({type:String,reflect:!0})],K.prototype,"variant",2),a([d({type:String,attribute:"arrow-direction",reflect:!0})],K.prototype,"arrowDirection",2),a([d({type:String,attribute:"button-position",reflect:!0})],K.prototype,"buttonPosition",2);var Zt=K;Zt.register(po);var bi=Zt;var vi=[T,p`
|
1138
1138
|
:host {
|
1139
1139
|
padding: unset;
|
1140
1140
|
margin: unset;
|
1141
1141
|
outline: none;
|
1142
1142
|
border-radius: 0.25rem;
|
1143
1143
|
}
|
1144
|
-
`,...
|
1144
|
+
`,...L()],ho=vi;var Ge=class extends it(De){constructor(){super();this.ariaLabel=null;this.active=void 0,this.disabled=void 0,this.softDisabled=void 0,this.role="button",this.type=M.TYPE}update(e){super.update(e),e.has("size")&&this.setSize(this.size)}setSize(e){this.setAttribute("size",Object.values(f).includes(e)?`${e}`:fe.SIZE.toString())}render(){return m`
|
1145
1145
|
<mdc-avatar
|
1146
1146
|
slot="prefixIcon"
|
1147
1147
|
?is-typing="${this.isTyping}"
|
1148
|
-
counter="${
|
1149
|
-
icon-name="${
|
1150
|
-
initials="${
|
1151
|
-
presence="${
|
1152
|
-
size="${
|
1153
|
-
src="${
|
1148
|
+
counter="${x(this.counter)}"
|
1149
|
+
icon-name="${x(this.iconName)}"
|
1150
|
+
initials="${x(this.initials)}"
|
1151
|
+
presence="${x(this.presence)}"
|
1152
|
+
size="${x(this.size)}"
|
1153
|
+
src="${x(this.src)}"
|
1154
1154
|
></mdc-avatar>
|
1155
|
-
`}};
|
1155
|
+
`}};Ge.styles=[...ho],a([d({type:String,attribute:"aria-label"})],Ge.prototype,"ariaLabel",2);var qt=Ge;var uo=g.constructTagName("avatarbutton");qt.register(uo);var yi=qt;var xi=[p`
|
1156
|
+
:host{
|
1157
|
+
--mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
1158
|
+
--mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
1159
|
+
--mdc-input-disabled-background-color: var(--mds-color-theme-background-primary-disabled);
|
1160
|
+
--mdc-input-border-color: var(--mds-color-theme-outline-input-normal);
|
1161
|
+
--mdc-input-text-color: var(--mds-color-theme-text-primary-normal);
|
1162
|
+
--mdc-input-background-color: var(--mds-color-theme-background-primary-ghost);
|
1163
|
+
--mdc-input-selection-background-color: var(--mds-color-theme-background-accent-active);
|
1164
|
+
--mdc-input-selection-text-color: var(--mds-color-theme-inverted-text-primary-normal);
|
1165
|
+
--mdc-input-support-text-color: var(--mds-color-theme-text-secondary-normal);
|
1166
|
+
--mdc-input-hover-background-color: var(--mds-color-theme-background-primary-hover);
|
1167
|
+
--mdc-input-focused-background-color: var(--mds-color-theme-background-primary-active);
|
1168
|
+
--mdc-input-focused-border-color: var(--mds-color-theme-outline-input-active);
|
1169
|
+
--mdc-input-error-border-color: var(--mds-color-theme-text-error-normal);
|
1170
|
+
--mdc-input-warning-border-color: var(--mds-color-theme-text-warning-normal);
|
1171
|
+
--mdc-input-success-border-color: var(--mds-color-theme-text-success-normal);
|
1172
|
+
--mdc-input-primary-border-color: var(--mds-color-theme-text-accent-normal);
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
:host, .input-container, .input-section, .input{
|
1176
|
+
width: 100%;
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
:host([readonly]) .leading-icon {
|
1180
|
+
color: var(--mdc-input-support-text-color);
|
1181
|
+
}
|
1182
|
+
|
1183
|
+
:host([disabled]) .input,
|
1184
|
+
:host([disabled]) .input::placeholder,
|
1185
|
+
:host([disabled]) .prefix-text{
|
1186
|
+
color: var(--mdc-input-disabled-text-color);
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
:host([disabled]) .input,
|
1190
|
+
:host([readonly]) .input{
|
1191
|
+
border-color: var(--mdc-input-disabled-border-color);
|
1192
|
+
background: var(--mdc-input-disabled-background-color);
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
:host([disabled][help-text-type="default"]) .input-container,
|
1196
|
+
:host([disabled][help-text-type="success"]) .input-container,
|
1197
|
+
:host([disabled][help-text-type="warning"]) .input-container,
|
1198
|
+
:host([disabled][help-text-type="error"]) .input-container,
|
1199
|
+
:host([disabled][help-text-type="priority"]) .input-container{
|
1200
|
+
border-color: var(--mdc-input-disabled-border-color);
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
.leading-icon{
|
1204
|
+
aspect-ratio: 1;
|
1205
|
+
}
|
1206
|
+
|
1207
|
+
.input-container{
|
1208
|
+
height: 2rem;
|
1209
|
+
border-radius: 0.5rem;
|
1210
|
+
border: 0.0625rem solid var(--mdc-input-border-color);
|
1211
|
+
display: flex;
|
1212
|
+
align-items: center;
|
1213
|
+
gap: 0.375rem;
|
1214
|
+
padding: 0.34375rem 0.375rem 0.34375rem 0.75rem;
|
1215
|
+
}
|
1216
|
+
|
1217
|
+
.input-section{
|
1218
|
+
display: flex;
|
1219
|
+
gap: 0.25rem;
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
.input {
|
1223
|
+
border: none;
|
1224
|
+
color: var(--mdc-input-text-color);
|
1225
|
+
background-color: var(--mdc-input-background-color);
|
1226
|
+
outline: none;
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
.input::selection {
|
1230
|
+
background-color: var(--mdc-input-selection-background-color);
|
1231
|
+
color: var(--mdc-input-selection-text-color);
|
1232
|
+
}
|
1233
|
+
|
1234
|
+
.prefix-text{
|
1235
|
+
color: var(--mdc-input-support-text-color);
|
1236
|
+
white-space: nowrap; // restirct prefix text to be in one line
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
:host(:not([disabled])) .input-container:hover{
|
1240
|
+
background-color: var(--mdc-input-hover-background-color);
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
:host(:not([disabled])) .input-container:active, :host(:not([disabled])) .input-container:focus-within{
|
1244
|
+
background-color: var(--mdc-input-focused-background-color);
|
1245
|
+
border-color: var(--mdc-input-focused-border-color);
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
.input::placeholder{
|
1249
|
+
color: var(--mdc-input-support-text-color);
|
1250
|
+
}
|
1251
|
+
|
1252
|
+
:host([help-text-type="error"]) .input-container {
|
1253
|
+
border-color: var(--mdc-input-error-border-color);
|
1254
|
+
}
|
1255
|
+
:host([help-text-type="warning"]) .input-container {
|
1256
|
+
border-color: var(--mdc-input-warning-border-color);
|
1257
|
+
}
|
1258
|
+
:host([help-text-type="success"]) .input-container {
|
1259
|
+
border-color: var(--mdc-input-success-border-color);
|
1260
|
+
}
|
1261
|
+
:host([help-text-type="priority"]) .input-container {
|
1262
|
+
border-color: var(--mdc-input-primary-border-color);
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
.hidden{
|
1266
|
+
opacity: 0;
|
1267
|
+
pointer-events: none;
|
1268
|
+
}
|
1269
|
+
`,...L(!0)],go=xi;var _=[];for(let o=0;o<256;++o)_.push((o+256).toString(16).slice(1));function fo(o,t=0){return(_[o[t+0]]+_[o[t+1]]+_[o[t+2]]+_[o[t+3]]+"-"+_[o[t+4]]+_[o[t+5]]+"-"+_[o[t+6]]+_[o[t+7]]+"-"+_[o[t+8]]+_[o[t+9]]+"-"+_[o[t+10]]+_[o[t+11]]+_[o[t+12]]+_[o[t+13]]+_[o[t+14]]+_[o[t+15]]).toLowerCase()}var jt,Ei=new Uint8Array(16);function Wt(){if(!jt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");jt=crypto.getRandomValues.bind(crypto)}return jt(Ei)}var Ti=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Kt={randomUUID:Ti};function Ai(o,t,e){var i,s,n;if(Kt.randomUUID&&!t&&!o)return Kt.randomUUID();o=o||{};let r=(n=(s=o.random)!=null?s:(i=o.rng)==null?void 0:i.call(o))!=null?n:Wt();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(e=e||0,e<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let c=0;c<16;++c)t[e+c]=r[c];return t}return fo(r)}var Qt=Ai;var Si=[T,p`
|
1270
|
+
:host {
|
1271
|
+
flex-direction: column;
|
1272
|
+
align-items: flex-start;
|
1273
|
+
gap: 0.5rem;
|
1274
|
+
}
|
1275
|
+
:host([disabled]),
|
1276
|
+
:host([disabled]) .mdc-label,
|
1277
|
+
:host([disabled]) .mdc-help-text,
|
1278
|
+
:host([disabled][help-text-type='error']) .mdc-help-text,
|
1279
|
+
:host([disabled][help-text-type='success']) .mdc-help-text,
|
1280
|
+
:host([disabled][help-text-type='warning']) .mdc-help-text,
|
1281
|
+
:host([disabled][help-text-type='priority']) .mdc-help-text {
|
1282
|
+
color: var(--mds-color-theme-text-primary-disabled);
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
.mdc-label-text,
|
1286
|
+
.mdc-help-text {
|
1287
|
+
font-size: var(--mds-font-size-body-midsize);
|
1288
|
+
line-height: var(--mds-font-lineheight-body-midsize);
|
1289
|
+
display: flex;
|
1290
|
+
align-items: center;
|
1291
|
+
gap: 0.5rem;
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
.mdc-label {
|
1295
|
+
color: var(--mds-color-theme-text-primary-normal);
|
1296
|
+
}
|
1297
|
+
|
1298
|
+
.mdc-help-text {
|
1299
|
+
color: var(--mds-color-theme-text-secondary-normal);
|
1300
|
+
}
|
1301
|
+
|
1302
|
+
:host([help-text-type='error']) .mdc-help-text {
|
1303
|
+
color: var(--mds-color-theme-text-error-normal);
|
1304
|
+
}
|
1305
|
+
:host([help-text-type='warning']) .mdc-help-text {
|
1306
|
+
color: var(--mds-color-theme-text-warning-normal);
|
1307
|
+
}
|
1308
|
+
:host([help-text-type='success']) .mdc-help-text {
|
1309
|
+
color: var(--mds-color-theme-text-success-normal);
|
1310
|
+
}
|
1311
|
+
:host([help-text-type='priority']) .mdc-help-text {
|
1312
|
+
color: var(--mds-color-theme-text-accent-normal);
|
1313
|
+
}
|
1314
|
+
`],bo=Si;var vo=g.constructTagName("formfieldwrapper"),D={DEFAULT:"default",ERROR:"error",PRIORITY:"priority",SUCCESS:"success",WARNING:"warning"},Jt={VALIDATION:D.DEFAULT},er={TAGNAME:S.SPAN,TYPE:N.BODY_MIDSIZE_REGULAR};var yo=o=>({[D.ERROR]:"error-legacy-badge-filled",[D.WARNING]:"warning-badge-filled",[D.SUCCESS]:"check-circle-badge-filled",[D.PRIORITY]:"priority-badge-filled",[D.DEFAULT]:""})[o]||"";var Q=class extends Ee(u){constructor(){super(...arguments);this.id=`mdc-input-${Qt()}`;this.helpTextType=Jt.VALIDATION}renderLabelElement(){return this.label?m`<label for="${this.id}" class="mdc-label" part="label">${this.label}</label>`:h}renderHelpTextIcon(){if(!this.helpText)return h;let e=yo(this.helpTextType||Jt.VALIDATION);return e&&!this.disabled?m`<mdc-icon part="helper-icon" size="1" length-unit="rem" name=${e}></mdc-icon>`:h}renderHelpText(){return this.helpText?m`
|
1315
|
+
<mdc-text
|
1316
|
+
part="help-text"
|
1317
|
+
tagname=${er.TAGNAME}
|
1318
|
+
type=${er.TYPE}
|
1319
|
+
>
|
1320
|
+
${this.helpText}
|
1321
|
+
</mdc-text>
|
1322
|
+
`:h}renderLabel(){return m`<div class="mdc-label-text" part="label-text">
|
1323
|
+
<slot name="label">${this.renderLabelElement()}</slot>
|
1324
|
+
<slot name="label-info"></slot>
|
1325
|
+
</div>`}renderHelperText(){return m`<div class="mdc-help-text" part="mdc-help-text">
|
1326
|
+
<slot name="help-icon">${this.renderHelpTextIcon()}</slot>
|
1327
|
+
<slot name="help-text">${this.renderHelpText()}</slot>
|
1328
|
+
</div>`}};Q.styles=[...u.styles,...bo],a([d({reflect:!0,type:String})],Q.prototype,"label",2),a([d({type:String})],Q.prototype,"id",2),a([d({reflect:!0,attribute:"help-text-type"})],Q.prototype,"helpTextType",2),a([d({type:String,reflect:!0,attribute:"help-text"})],Q.prototype,"helpText",2);var Te=Q;Te.register(vo);var tr=Te;var mt=o=>{class t extends o{constructor(){super(...arguments);this.name=""}}return a([d({reflect:!0,type:String})],t.prototype,"name",2),t};var xo=g.constructTagName("input"),Eo={OFF:"off",NONE:"none",ON:"on",SENTENCES:"sentences",WORDS:"words",CHARACTERS:"characters"},To={MAX_LENGTH:10,HELPERTEXT:"Prefix text should not exceed 10 characters",VALIDATION:D.ERROR},J={VALIDATION:D.DEFAULT,ICON_SIZE_VALUE:1,ICON_SIZE_UNIT:"rem",CLEAR_BUTTON_ICON:"cancel-bold",CLEAR_BUTTON_VARIANT:ae.TERTIARY,CLEAR_BUTTON_SIZE:G[20],PREFIX_TEXT_TYPE:N.BODY_MIDSIZE_REGULAR,PREFIX_TEXT_TAG:S.SPAN};var pt=o=>{class t extends o{constructor(){super(...arguments);this.value=""}}return a([d({reflect:!0,type:String})],t.prototype,"value",2),t};var ht=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabel=null}}return a([d({type:String,reflect:!0,attribute:"data-aria-label"})],t.prototype,"dataAriaLabel",2),t};var E=class extends ht(pt(mt(tr))){constructor(){super();this.placeholder="";this.required=!1;this.readonly=!1;this.trailingButton=!1;this.autocapitalize=Eo.OFF;this.autocomplete="off";this.autofocus=!1;this.clearAriaLabel="";this.internals=this.attachInternals()}checkValidity(){return this.setValidityFromInput(),this.internals.checkValidity()}reportValidity(){return this.setValidityFromInput(),this.internals.reportValidity()}get form(){return this.internals.form}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.inputElement&&(this.inputElement.checkValidity(),this.setValidityFromInput(),this.internals.setFormValue(this.inputElement.value))}).catch(e=>{this.onerror&&this.onerror(e)})}updated(e){super.updated(e),e.has("value")&&this.handleValueChange()}handleValueChange(){this.internals.setFormValue(this.value),this.updateComplete.then(()=>{this.setValidityFromInput()}).catch(e=>{this.onerror&&this.onerror(e)})}attributeChangedCallback(e,r,i){super.attributeChangedCallback(e,r,i),["maxlength","minlength","pattern","required"].includes(e)&&this.updateComplete.then(()=>{this.setValidityFromInput()}).catch(n=>{this.onerror&&this.onerror(n)})}setValidityFromInput(){this.inputElement&&this.internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage,this.inputElement)}updateValue(){this.value=this.inputElement.value,this.internals.setFormValue(this.inputElement.value)}onInput(){this.updateValue(),this.setValidityFromInput()}onChange(e){this.updateValue(),this.setValidityFromInput();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}renderLeadingIcon(){return this.leadingIcon?m`
|
1329
|
+
<mdc-icon
|
1330
|
+
class="leading-icon"
|
1331
|
+
part="leading-icon"
|
1332
|
+
name=${this.leadingIcon}
|
1333
|
+
size="${J.ICON_SIZE_VALUE}"
|
1334
|
+
length-unit="${J.ICON_SIZE_UNIT}">
|
1335
|
+
</mdc-icon>
|
1336
|
+
`:h}renderPrefixText(){return this.prefixText?m`
|
1337
|
+
<mdc-text
|
1338
|
+
class="prefix-text"
|
1339
|
+
tagname="${J.PREFIX_TEXT_TAG}"
|
1340
|
+
type="${J.PREFIX_TEXT_TYPE}"
|
1341
|
+
aria-hidden="true"
|
1342
|
+
>
|
1343
|
+
${this.prefixText.slice(0,To.MAX_LENGTH)}
|
1344
|
+
</mdc-text>
|
1345
|
+
`:h}clearInputText(){var e;this.value="",(e=this.inputElement)==null||e.focus()}renderTrailingButton(){return this.trailingButton?m`
|
1346
|
+
<mdc-button
|
1347
|
+
class='${this.value?"":"hidden"}'
|
1348
|
+
prefix-icon='${J.CLEAR_BUTTON_ICON}'
|
1349
|
+
variant='${J.CLEAR_BUTTON_VARIANT}'
|
1350
|
+
size="${J.CLEAR_BUTTON_SIZE}"
|
1351
|
+
aria-label="${this.clearAriaLabel}"
|
1352
|
+
@click=${this.clearInputText}
|
1353
|
+
?disabled=${this.disabled||this.readonly||!this.value}
|
1354
|
+
></mdc-button>
|
1355
|
+
`:h}render(){var e;return m`
|
1356
|
+
${this.renderLabel()}
|
1357
|
+
<div class="input-container mdc-focus-ring" part="input-container">
|
1358
|
+
<slot name="input-leading-icon">${this.renderLeadingIcon()}</slot>
|
1359
|
+
<div class="input-section" part="input-section">
|
1360
|
+
<slot name="input-prefix-text">${this.renderPrefixText()}</slot>
|
1361
|
+
<slot name="input">
|
1362
|
+
<input
|
1363
|
+
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
1364
|
+
class='input'
|
1365
|
+
part='input'
|
1366
|
+
id="${this.id}"
|
1367
|
+
name="${this.name}"
|
1368
|
+
.value="${this.value}"
|
1369
|
+
?disabled="${this.disabled}"
|
1370
|
+
?readonly="${this.readonly}"
|
1371
|
+
?required="${this.required}"
|
1372
|
+
type="text"
|
1373
|
+
placeholder=${x(this.placeholder)}
|
1374
|
+
minlength=${x(this.minlength)}
|
1375
|
+
maxlength=${x(this.maxlength)}
|
1376
|
+
autocapitalize=${this.autocapitalize}
|
1377
|
+
autocomplete=${this.autocomplete}
|
1378
|
+
?autofocus="${this.autofocus}"
|
1379
|
+
dirname=${x(this.dirname)}
|
1380
|
+
pattern=${x(this.pattern)}
|
1381
|
+
list=${x(this.list)}
|
1382
|
+
size=${x(this.size)}
|
1383
|
+
@input=${this.onInput}
|
1384
|
+
@change=${this.onChange}
|
1385
|
+
/>
|
1386
|
+
</slot>
|
1387
|
+
</div>
|
1388
|
+
<slot name="trailing-button">${this.renderTrailingButton()}</slot>
|
1389
|
+
</div>
|
1390
|
+
${this.helpText?this.renderHelperText():h}
|
1391
|
+
`}};E.formAssociated=!0,E.styles=[...tr.styles,...go],a([d({type:String})],E.prototype,"placeholder",2),a([d({type:Boolean})],E.prototype,"required",2),a([d({type:Boolean})],E.prototype,"readonly",2),a([d({type:String,attribute:"prefix-text"})],E.prototype,"prefixText",2),a([d({type:String,attribute:"leading-icon"})],E.prototype,"leadingIcon",2),a([d({type:Boolean,attribute:"trailing-button"})],E.prototype,"trailingButton",2),a([d({type:Number})],E.prototype,"maxlength",2),a([d({type:Number})],E.prototype,"minlength",2),a([d({type:String})],E.prototype,"autocapitalize",2),a([d({type:String})],E.prototype,"autocomplete",2),a([d({type:Boolean})],E.prototype,"autofocus",2),a([d({type:String})],E.prototype,"dirname",2),a([d({type:String})],E.prototype,"pattern",2),a([d({type:String})],E.prototype,"list",2),a([d({type:Number})],E.prototype,"size",2),a([d({type:String,attribute:"clear-aria-label"})],E.prototype,"clearAriaLabel",2),a([hr("input")],E.prototype,"inputElement",2);var rr=E;rr.register(xo);var _i=rr;var Ao=g.constructTagName("link"),ut={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},gt={LARGE:1,MIDSIZE:.875,SMALL:.75},ft={INLINE:!1,INVERTED:!1,LINK_SIZE:ut.LARGE};var Ii=[T,p`
|
1156
1392
|
|
1157
1393
|
:host {
|
1158
1394
|
|
@@ -1263,70 +1499,11 @@
|
|
1263
1499
|
:host([inverted][disabled]) {
|
1264
1500
|
color: var(--mdc-link-inverted-color-disabled);
|
1265
1501
|
}
|
1266
|
-
`,...
|
1502
|
+
`,...L(),p`
|
1267
1503
|
:host(:active) {
|
1268
1504
|
box-shadow: none;
|
1269
1505
|
}
|
1270
|
-
`],
|
1271
|
-
:host {
|
1272
|
-
flex-direction: column;
|
1273
|
-
align-items: flex-start;
|
1274
|
-
gap: 0.5rem;
|
1275
|
-
}
|
1276
|
-
:host([disabled]),
|
1277
|
-
:host([disabled]) .mdc-label,
|
1278
|
-
:host([disabled]) .mdc-help-text,
|
1279
|
-
:host([disabled][help-text-type='error']) .mdc-help-text,
|
1280
|
-
:host([disabled][help-text-type='success']) .mdc-help-text,
|
1281
|
-
:host([disabled][help-text-type='warning']) .mdc-help-text,
|
1282
|
-
:host([disabled][help-text-type='priority']) .mdc-help-text {
|
1283
|
-
color: var(--mds-color-theme-text-primary-disabled);
|
1284
|
-
}
|
1285
|
-
|
1286
|
-
.mdc-label-text,
|
1287
|
-
.mdc-help-text {
|
1288
|
-
font-size: var(--mds-font-size-body-midsize);
|
1289
|
-
line-height: var(--mds-font-lineheight-body-midsize);
|
1290
|
-
display: flex;
|
1291
|
-
align-items: center;
|
1292
|
-
gap: 0.5rem;
|
1293
|
-
}
|
1294
|
-
|
1295
|
-
.mdc-label {
|
1296
|
-
color: var(--mds-color-theme-text-primary-normal);
|
1297
|
-
}
|
1298
|
-
|
1299
|
-
.mdc-help-text {
|
1300
|
-
color: var(--mds-color-theme-text-secondary-normal);
|
1301
|
-
}
|
1302
|
-
|
1303
|
-
:host([help-text-type='error']) .mdc-help-text {
|
1304
|
-
color: var(--mds-color-theme-text-error-normal);
|
1305
|
-
}
|
1306
|
-
:host([help-text-type='warning']) .mdc-help-text {
|
1307
|
-
color: var(--mds-color-theme-text-warning-normal);
|
1308
|
-
}
|
1309
|
-
:host([help-text-type='success']) .mdc-help-text {
|
1310
|
-
color: var(--mds-color-theme-text-success-normal);
|
1311
|
-
}
|
1312
|
-
:host([help-text-type='priority']) .mdc-help-text {
|
1313
|
-
color: var(--mds-color-theme-text-accent-normal);
|
1314
|
-
}
|
1315
|
-
`],ho=fi;var Ym=f.constructTagName("formfieldwrapper"),ie={ERROR:"error",WARNING:"warning",SUCCESS:"success",PRIORITY:"priority",DEFAULT:"default"},jt={VALIDATION:ie.DEFAULT},qt={TAGNAME:S.SPAN,TYPE:z.BODY_MIDSIZE_REGULAR};var uo=o=>({[ie.ERROR]:"error-legacy-filled",[ie.WARNING]:"warning-filled",[ie.SUCCESS]:"check-circle-filled",[ie.PRIORITY]:"priority-circle-filled",[ie.DEFAULT]:""})[o]||"";var W=class extends be(h){constructor(){super(...arguments);this.id=`mdc-input-${Zt()}`;this.helpTextType=jt.VALIDATION}renderLabelElement(){return this.label?l`<label for="${this.id}" class="mdc-label" part="label">${this.label}</label>`:u}renderHelpTextIcon(){if(!this.helpText)return u;let e=uo(this.helpTextType||jt.VALIDATION);return e&&!this.disabled?l`<mdc-icon part="helper-icon" size="1" length-unit="rem" name=${e}></mdc-icon>`:u}renderHelpText(){return this.helpText?l`
|
1316
|
-
<mdc-text
|
1317
|
-
part="help-text"
|
1318
|
-
tagname=${qt.TAGNAME}
|
1319
|
-
type=${qt.TYPE}
|
1320
|
-
>
|
1321
|
-
${this.helpText}
|
1322
|
-
</mdc-text>
|
1323
|
-
`:u}renderLabel(){return l`<div class="mdc-label-text" part="label-text">
|
1324
|
-
<slot name="label">${this.renderLabelElement()}</slot>
|
1325
|
-
<slot name="label-info"></slot>
|
1326
|
-
</div>`}renderHelperText(){return l`<div class="mdc-help-text" part="mdc-help-text">
|
1327
|
-
<slot name="help-icon">${this.renderHelpTextIcon()}</slot>
|
1328
|
-
<slot name="help-text">${this.renderHelpText()}</slot>
|
1329
|
-
</div>`}};W.styles=[...h.styles,...ho],a([d({reflect:!0,type:String})],W.prototype,"label",2),a([d({type:String})],W.prototype,"id",2),a([d({reflect:!0,attribute:"help-text-type"})],W.prototype,"helpTextType",2),a([d({type:String,reflect:!0,attribute:"help-text"})],W.prototype,"helpText",2);var Wt=W;var fo=f.constructTagName("checkbox"),Kt={CHECKED:"check-bold",INDETERMINATE:"minus-bold"};var gi=[p`
|
1506
|
+
`],So=Ii;var ee=class extends Ee(u){constructor(){super(...arguments);this.inline=ft.INLINE;this.inverted=ft.INVERTED;this.size=ft.LINK_SIZE;this.prevTabindex=null}getIconSize(){switch(this.size){case ut.SMALL:return gt.SMALL;case ut.MIDSIZE:return gt.MIDSIZE;default:return gt.LARGE}}setDisabled(e){e?(this.prevTabindex=this.hasAttribute("tabindex")?this.tabIndex:null,this.tabIndex=-1,this.setAttribute("aria-disabled","true")):this.prevTabindex===null?(this.removeAttribute("tabindex"),this.removeAttribute("aria-disabled")):(this.tabIndex=this.prevTabindex,this.removeAttribute("aria-disabled"))}updateTrailingIcon(){var i,s;let e=(s=(i=this.shadowRoot)==null?void 0:i.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}).find(n=>n.tagName==="A"),r=this.getIconSize();if(this.iconName&&e){let n=document.createElement("mdc-icon");n.setAttribute("name",this.iconName),n.setAttribute("size",`${r}`),n.setAttribute("length-unit","rem"),e.appendChild(n)}}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this.disabled)}render(){return m`<slot @slotchange=${this.updateTrailingIcon}></slot>`}};ee.styles=[...u.styles,...So],a([d({type:String,attribute:"icon-name"})],ee.prototype,"iconName",2),a([d({type:Boolean,reflect:!0})],ee.prototype,"inline",2),a([d({type:Boolean,reflect:!0})],ee.prototype,"inverted",2),a([d({type:String,reflect:!0})],ee.prototype,"size",2);var or=ee;or.register(Ao);var Ni=or;var _o=g.constructTagName("checkbox"),ir={CHECKED:"check-bold",INDETERMINATE:"minus-bold"};var Ci=[p`
|
1330
1507
|
:host {
|
1331
1508
|
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
1332
1509
|
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
@@ -1428,21 +1605,21 @@
|
|
1428
1605
|
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
1429
1606
|
}
|
1430
1607
|
}
|
1431
|
-
`,...
|
1608
|
+
`,...L(!0)],Io=Ci;var ce=class extends mt(pt(ht(Te))){constructor(){super();this.checked=!1;this.indeterminate=!1;this.internals=this.attachInternals(),this.helpTextType=void 0}get form(){return this.internals.form}setFormValue(){let e=null;this.checked&&(e=this.value?this.value:"on"),this.internals.setFormValue(e)}toggleState(){this.disabled||(this.checked=!this.checked,this.indeterminate=!1)}handleChange(e){this.toggleState(),this.dispatchEvent(new Event(e.type,e))}update(e){super.update(e),e.has("checked")&&this.setFormValue()}render(){var i;let e=this.checked||this.indeterminate?m`
|
1432
1609
|
<mdc-icon
|
1433
1610
|
class="icon"
|
1434
|
-
name="${this.indeterminate?
|
1611
|
+
name="${this.indeterminate?ir.INDETERMINATE:ir.CHECKED}"
|
1435
1612
|
size="1"
|
1436
1613
|
length-unit="rem"
|
1437
1614
|
></mdc-icon>
|
1438
|
-
`:
|
1615
|
+
`:h,r=this.helpText?this.renderHelperText():h;return m`
|
1439
1616
|
<div class="container mdc-focus-ring">
|
1440
1617
|
<input
|
1441
1618
|
id="${this.id}"
|
1442
1619
|
type="checkbox"
|
1443
1620
|
class="input"
|
1444
|
-
name="${
|
1445
|
-
value="${
|
1621
|
+
name="${x(this.name)}"
|
1622
|
+
value="${x(this.value)}"
|
1446
1623
|
.checked="${this.checked}"
|
1447
1624
|
.indeterminate="${this.indeterminate}"
|
1448
1625
|
.disabled="${this.disabled}"
|
@@ -1455,7 +1632,7 @@
|
|
1455
1632
|
${this.renderLabel()}
|
1456
1633
|
${r}
|
1457
1634
|
</div>
|
1458
|
-
`}};
|
1635
|
+
`}};ce.formAssociated=!0,ce.styles=[...Te.styles,...Io],a([d({type:Boolean,reflect:!0})],ce.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],ce.prototype,"indeterminate",2);var nr=ce;nr.register(_o);var zi=nr;})();
|
1459
1636
|
/*! Bundled license information:
|
1460
1637
|
|
1461
1638
|
@lit/reactive-element/decorators/custom-element.js:
|