@momentum-design/components 0.18.6 → 0.18.7
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 +236 -66
- package/dist/browser/index.js.map +4 -4
- package/dist/components/iconprovider/iconprovider.constants.js +2 -1
- package/dist/components/toggle/index.d.ts +8 -0
- package/dist/components/toggle/index.js +5 -0
- package/dist/components/toggle/toggle.component.d.ts +84 -0
- package/dist/components/toggle/toggle.component.js +166 -0
- package/dist/components/toggle/toggle.constants.d.ts +17 -0
- package/dist/components/toggle/toggle.constants.js +18 -0
- package/dist/components/toggle/toggle.styles.d.ts +2 -0
- package/dist/components/toggle/toggle.styles.js +148 -0
- package/dist/components/toggle/toggle.types.d.ts +4 -0
- package/dist/components/toggle/toggle.types.js +1 -0
- package/dist/custom-elements.json +1263 -757
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +4 -3
- package/dist/react/index.js +4 -3
- package/dist/react/toggle/index.d.ts +34 -0
- package/dist/react/toggle/index.js +43 -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 Oo=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var a=(o,t,e,r)=>{for(var i=r>1?void 0:r?$o(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Oo(t,e,i),i};var je=globalThis,We=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),mr=new WeakMap,Ce=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==yt)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(We&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=mr.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&mr.set(e,t))}return t}toString(){return this.cssText}},pr=o=>new Ce(typeof o=="string"?o:o+"",void 0,yt),p=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,n)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new Ce(e,o,yt)},xt=(o,t)=>{if(We)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=je.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},Ke=We?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return pr(e)})(o):o;var{is:Do,defineProperty:Uo,getOwnPropertyDescriptor:Po,getOwnPropertyNames:Vo,getOwnPropertySymbols:Ho,getPrototypeOf:Go}=Object,F=globalThis,hr=F.trustedTypes,Bo=hr?hr.emptyScript:"",Et=F.reactiveElementPolyfillSupport,ze=(o,t)=>o,Re={toAttribute(o,t){switch(t){case Boolean:o=o?Bo: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}},Qe=(o,t)=>!Do(o,t),ur={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:Qe},gr,fr;(gr=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(fr=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=ur){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&&Uo(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var s;let{get:i,set:n}=(s=Po(this.prototype,t))!=null?s:{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);n.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:ur}static _$Ei(){if(this.hasOwnProperty(ze("elementProperties")))return;let t=Go(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ze("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ze("properties"))){let e=this.properties,r=[...Vo(e),...Ho(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(Ke(i))}else t!==void 0&&e.push(Ke(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 xt(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 n;let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let s=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Re).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var n;let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let s=r.getPropertyOptions(i),c=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)==null?void 0:n.fromAttribute)!==void 0?s.converter:Re;this._$Em=i,this[i]=c.fromAttribute(e,s.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:Qe)(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[s,c]of this._$Ep)this[s]=c;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,c]of n)c.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],c)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var s;return(s=n.hostUpdate)==null?void 0:s.call(n)}),this.update(e)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}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){}},br;P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[ze("elementProperties")]=new Map,P[ze("finalized")]=new Map,Et==null||Et({ReactiveElement:P}),((br=F.reactiveElementVersions)!=null?br:F.reactiveElementVersions=[]).push("2.0.4");var Fo={attribute:!0,type:String,converter:Re,reflect:!1,hasChanged:Qe},Xo=(o=Fo,t,e)=>{let{kind:r,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,o),r==="accessor"){let{name:s}=e;return{set(c){let l=t.get.call(this);t.set.call(this,c),this.requestUpdate(s,l,o)},init(c){return c!==void 0&&this.P(s,void 0,o),c}}}if(r==="setter"){let{name:s}=e;return function(c){let l=this[s];t.call(this,c),this.requestUpdate(s,l,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?Xo(o,t,e):((r,i,n)=>{let s=i.hasOwnProperty(n);return i.constructor.createProperty(n,s?{...r,wrapped:!0}:r),s?Object.getOwnPropertyDescriptor(i,n):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 vr(o,t){return(e,r,i)=>{let n=s=>{var c,l;return(l=(c=s.renderRoot)==null?void 0:c.querySelector(o))!=null?l:null};if(t){let{get:s,set:c}=typeof r=="object"?e:i!=null?i:(()=>{let l=Symbol();return{get(){return this[l]},set(v){this[l]=v}}})();return te(e,r,{get(){let l=s.call(this);return l===void 0&&(l=n(this),(l!==null||this.hasUpdated)&&c.call(this,l)),l}})}return te(e,r,{get(){return n(this)}})}}var Zo={PREFIX:"mdc",SEPARATOR:"-"},Yo={NAMESPACE:Zo},Tt=Yo;var qo=o=>[Tt.NAMESPACE.PREFIX,o].join(Tt.NAMESPACE.SEPARATOR),g={constructTagName:qo};var Je=g.constructTagName("themeprovider"),At={THEMECLASS:"mds-theme-stable-darkWebex"};var Le=globalThis,et=Le.trustedTypes,yr=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ir="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,Nr="?"+X,jo=`<${Nr}>`,ie=document,we=()=>ie.createComment(""),Me=o=>o===null||typeof o!="object"&&typeof o!="function",kt=Array.isArray,Wo=o=>kt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",_t=`[
|
2
|
+
\f\r]`,ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xr=/-->/g,Er=/>/g,re=RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Tr=/'/g,Ar=/"/g,Cr=/^(?:script|style|textarea|title)$/i,Lt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),m=Lt(1),As=Lt(2),_s=Lt(3),V=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),_r=new WeakMap,oe=ie.createTreeWalker(ie,129);function zr(o,t){if(!kt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return yr!==void 0?yr.createHTML(t):t}var Ko=(o,t)=>{let e=o.length-1,r=[],i,n=t===2?"<svg>":t===3?"<math>":"",s=ke;for(let c=0;c<e;c++){let l=o[c],v,x,y=-1,U=0;for(;U<l.length&&(s.lastIndex=U,x=s.exec(l),x!==null);)U=s.lastIndex,s===ke?x[1]==="!--"?s=xr:x[1]!==void 0?s=Er:x[2]!==void 0?(Cr.test(x[2])&&(i=RegExp("</"+x[2],"g")),s=re):x[3]!==void 0&&(s=re):s===re?x[0]===">"?(s=i!=null?i:ke,y=-1):x[1]===void 0?y=-2:(y=s.lastIndex-x[2].length,v=x[1],s=x[3]===void 0?re:x[3]==='"'?Ar:Tr):s===Ar||s===Tr?s=re:s===xr||s===Er?s=ke:(s=re,i=void 0);let B=s===re&&o[c+1].startsWith("/>")?" ":"";n+=s===ke?l+jo:y>=0?(r.push(v),l.slice(0,y)+Ir+l.slice(y)+X+B):l+X+(y===-2?c:B)}return[zr(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Oe=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,s=0,c=t.length-1,l=this.parts,[v,x]=Ko(t,e);if(this.el=o.createElement(v,r),oe.currentNode=this.el.content,e===2||e===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(i=oe.nextNode())!==null&&l.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let y of i.getAttributeNames())if(y.endsWith(Ir)){let U=x[s++],B=i.getAttribute(y).split(X),qe=/([.?@])?(.*)/.exec(U);l.push({type:1,index:n,name:qe[2],strings:B,ctor:qe[1]==="."?Nt:qe[1]==="?"?Ct:qe[1]==="@"?zt:pe}),i.removeAttribute(y)}else y.startsWith(X)&&(l.push({type:6,index:n}),i.removeAttribute(y));if(Cr.test(i.tagName)){let y=i.textContent.split(X),U=y.length-1;if(U>0){i.textContent=et?et.emptyScript:"";for(let B=0;B<U;B++)i.append(y[B],we()),oe.nextNode(),l.push({type:2,index:++n});i.append(y[U],we())}}}else if(i.nodeType===8)if(i.data===Nr)l.push({type:2,index:n});else{let y=-1;for(;(y=i.data.indexOf(X,y+1))!==-1;)l.push({type:7,index:n}),y+=X.length-1}n++}}static createElement(t,e){let r=ie.createElement("template");return r.innerHTML=t,r}};function me(o,t,e=o,r){var s,c,l;if(t===V)return t;let i=r!==void 0?(s=e.o)==null?void 0:s[r]:e.l,n=Me(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(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=me(o,i._$AS(o,t.values),i,r)),t}var It=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 v;let{el:{content:e},parts:r}=this._$AD,i=((v=t==null?void 0:t.creationScope)!=null?v:ie).importNode(e,!0);oe.currentNode=i;let n=oe.nextNode(),s=0,c=0,l=r[0];for(;l!==void 0;){if(s===l.index){let x;l.type===2?x=new $e(n,n.nextSibling,this,t):l.type===1?x=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(x=new Rt(n,this,t)),this._$AV.push(x),l=r[++c]}s!==(l==null?void 0:l.index)&&(n=oe.nextNode(),s++)}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++}},$e=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 n;this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this.v=(n=i==null?void 0:i.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=me(this,t,e),Me(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):Wo(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&&Me(this._$AH)?this._$AA.nextSibling.data=t:this.T(ie.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Oe.createElement(zr(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let s=new It(i,this),c=s.u(this.options);s.p(e),this.T(c),this._$AH=s}}_$AC(t){let e=_r.get(t.strings);return e===void 0&&_r.set(t.strings,e=new Oe(t)),e}k(t){kt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let n of t)i===e.length?e.push(r=new o(this.O(we()),this.O(we()),this,this.options)):r=e[i],r._$AI(n),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))}},pe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,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 n=this.strings,s=!1;if(n===void 0)t=me(this,t,e,0),s=!Me(t)||t!==this._$AH&&t!==V,s&&(this._$AH=t);else{let c=t,l,v;for(t=n[0],l=0;l<n.length-1;l++)v=me(this,c[r+l],e,l),v===V&&(v=this._$AH[l]),s||(s=!Me(v)||v!==this._$AH[l]),v===h?t=h:t!==h&&(t+=(v!=null?v:"")+n[l+1]),this._$AH[l]=v}s&&!i&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},Nt=class extends pe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},Ct=class extends pe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},zt=class extends pe{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=me(this,t,e,0))!=null?s:h)===V)return;let r=this._$AH,i=t===h&&r!==h||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==h&&(r===h||i);i&&this.element.removeEventListener(this.name,this,r),n&&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)}},Rt=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){me(this,t)}};var St=Le.litHtmlPolyfillSupport,Sr;St==null||St(Oe,$e),((Sr=Le.litHtmlVersions)!=null?Sr:Le.litHtmlVersions=[]).push("3.2.0");var Rr=(o,t,e)=>{var n,s;let r=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=r._$litPart$;if(i===void 0){let c=(s=e==null?void 0:e.renderBefore)!=null?s:null;r._$litPart$=i=new $e(t.insertBefore(we(),c),c,void 0,e!=null?e:{})}return i._$AI(o),i};var Z=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=Rr(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}},kr;Z._$litElement$=!0,Z.finalized=!0,(kr=globalThis.litElementHydrateSupport)==null||kr.call(globalThis,{LitElement:Z});var wt=globalThis.litElementPolyfillSupport;wt==null||wt({LitElement:Z});var Lr;((Lr=globalThis.litElementVersions)!=null?Lr:globalThis.litElementVersions=[]).push("4.1.0");var wr=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 tt=class extends Z{static register(t){customElements.get(t)||customElements.define(t,this)}};tt.styles=[wr];var Mr=tt;var u=Mr;var Y=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 he=class{constructor(t,e,r,i){var n;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(s,c)=>{this.unsubscribe&&(this.unsubscribe!==c&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=s,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(s,c)),this.unsubscribe=c},this.host=t,e.context!==void 0){let s=e;this.context=s.context,this.callback=s.callback,this.subscribe=(n=s.subscribe)!=null?n:!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 Y(this.context,this.t,this.subscribe))}};var rt=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 Mt=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},ue=class extends rt{constructor(t,e,r){var i,n;super(e.context!==void 0?e.initialValue:r),this.onContextRequest=s=>{let c=s.composedPath()[0];s.context===this.context&&c!==this.host&&(s.stopPropagation(),this.addCallback(s.callback,c,s.subscribe))},this.onProviderRequest=s=>{let c=s.composedPath()[0];if(s.context!==this.context||c===this.host)return;let l=new Set;for(let[v,{consumerHost:x}]of this.subscriptions)l.has(v)||(l.add(v),x.dispatchEvent(new Y(this.context,v,!0)));s.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(n=(i=this.host).addController)==null||n.call(i,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Mt(this.context))}};var Qo=p`
|
14
14
|
:host {
|
15
15
|
display: contents;
|
16
16
|
}
|
17
|
-
|
17
|
+
`,$r=Qo;var ot=class extends u{constructor({context:t,initialValue:e}){super(),this.context=new ue(this,{context:t,initialValue:e})}render(){return this.updateContext(),m`<slot></slot>`}};ot.styles=[...u.styles,$r];var Dr=ot;var ge=Dr;var it=class{constructor(t){this.themeclass=t}};it.context=Je;var st=it;var Jo=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
|
+
`,Ur=[Jo];var fe=class extends ge{constructor(){super({context:st.context,initialValue:new st(At.THEMECLASS)});this.themeclass=At.THEMECLASS}static get Context(){return st.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(" "))}};fe.styles=[...ge.styles,...Ur],a([z()],fe.prototype,"currentThemeClass",2),a([d({type:String})],fe.prototype,"themeclass",2);var Ot=fe;Ot.register(Je);var ei=Ot;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
|
+
`,R=(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 ti=[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
|
+
`,...R()],Pr=ti;var ri=o=>{let{host:t,context:e,subscribe:r}=o;return new he(t,{context:e,subscribe:r!=null?r:!0})},oi={consume:ri},Vr=oi;var nt=g.constructTagName("iconprovider"),Hr=["svg"],Gr=["em","rem","px","%"],ii={px:16,em:1,rem:1,"%":100},q={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",SIZE:ii.em};var at=class{};at.context=nt;var dt=at;var se=class extends ge{constructor(){super({context:dt.context,initialValue:new dt});this.fileExtension=q.FILE_EXTENSION;this.lengthUnit=q.LENGTH_UNIT;this.size=q.SIZE}static get Context(){return dt.context}updateValuesInContext(){this.fileExtension&&Hr.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&&Gr.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})],se.prototype,"url",2),a([d({type:String,attribute:"file-extension",reflect:!0})],se.prototype,"fileExtension",2),a([d({type:String,attribute:"length-unit",reflect:!0})],se.prototype,"lengthUnit",2),a([d({type:Number,reflect:!0})],se.prototype,"size",2);var De=se;var Br=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 n=await i.text(),s=new DOMParser().parseFromString(n,"text/html").body.children[0];return s.setAttribute("data-name",t),s.setAttribute("part","icon"),s.setAttribute("aria-hidden","true"),s};var Fr=g.constructTagName("icon"),$t={NAME:void 0,SIZE:1};var L=class extends u{constructor(){super();this.name=$t.NAME;this.ariaLabel=null;this.iconProviderContext=Vr.consume({host:this,context:De.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 Br(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:$t.SIZE}updated(e){var r,i,n,s;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!==((n=this.iconProviderContext.value)==null?void 0:n.size)&&(this.sizeFromContext=(s=this.iconProviderContext.value)==null?void 0:s.size,this.updateSize())}render(){return m` ${this.iconData} `}};L.styles=[...u.styles,...Pr],a([z()],L.prototype,"iconData",2),a([z()],L.prototype,"lengthUnitFromContext",2),a([z()],L.prototype,"sizeFromContext",2),a([d({type:String,reflect:!0})],L.prototype,"name",2),a([d({type:Number})],L.prototype,"size",2),a([d({type:String,attribute:"length-unit"})],L.prototype,"lengthUnit",2),a([d({type:String,attribute:"aria-label"})],L.prototype,"ariaLabel",2),a([z()],L.prototype,"abortController",2);var Dt=L;Dt.register(Fr);var si=Dt;De.register(nt);var ni=De;var f=o=>o!=null?o:h;var Xr=g.constructTagName("avatar"),C={COUNTER:"counter",ICON:"icon",PHOTO:"photo",TEXT:"text"},Ut=99,ai="user-regular",b={24:24,32:32,48:48,64:64,72:72,88:88,124:124},be={TYPE:C.PHOTO,SIZE:b[32],ICON_NAME:ai};var ct=o=>{class t extends o{constructor(){super(...arguments);this.size=be.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 di=[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="${
|
230
|
+
`],Zr=di;var Yr=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"},ve={TYPE:I.ACTIVE,SIZE:A.SMALL};var Ue=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"},_={H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",P:"p",SMALL:"small",SPAN:"span",DIV:"div"},k={TYPE:N.BODY_LARGE_REGULAR,TEXT_ELEMENT_TAGNAME:_.P,CSS_PART_TEXT:"text",CHILDREN:"The quick brown fox jumps over the lazy dog"};var qr=o=>({[b[124]]:A.XX_LARGE,[b[88]]:A.X_LARGE,[b[72]]:A.LARGE,[b[64]]:A.MIDSIZE,[b[48]]:A.SMALL,[b[32]]:A.X_SMALL,[b[24]]:A.XX_SMALL})[o]||A.X_SMALL,jr=o=>({[b[124]]:4.75,[b[88]]:3,[b[72]]:2.5,[b[64]]:2.25,[b[48]]:1.75,[b[32]]:1.25,[b[24]]:1})[o]||1.25,Wr=o=>({[b[124]]:N.HEADING_XLARGE_MEDIUM,[b[88]]:N.HEADING_LARGE_MEDIUM,[b[72]]:N.HEADING_MIDSIZE_MEDIUM,[b[64]]:N.HEADING_SMALL_MEDIUM,[b[48]]:N.HEADING_SMALL_MEDIUM,[b[32]]:N.BODY_MIDSIZE_MEDIUM,[b[24]]:N.BODY_SMALL_MEDIUM})[o]||N.BODY_MIDSIZE_MEDIUM;var Pe=class extends ct(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="${qr(this.size)}"></mdc-presence>
|
232
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="${f(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||be.ICON_NAME;return m`
|
242
242
|
<mdc-icon
|
243
|
-
name="${
|
243
|
+
name="${f(e)}"
|
244
244
|
length-unit="rem"
|
245
|
-
size="${
|
245
|
+
size="${jr(this.size)}"
|
246
246
|
></mdc-icon>
|
247
247
|
`}textTemplate(e){return m`
|
248
248
|
<mdc-text
|
249
|
-
type="${
|
249
|
+
type="${Wr(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>Ut?`${Ut}+`: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
|
+
`}};Pe.styles=[...u.styles,...Zr],a([z()],Pe.prototype,"isPhotoLoaded",2);var Pt=Pe;var ci=[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
|
+
`],Kr=ci;var Qr=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 ne=class extends u{constructor(){super(...arguments);this.type=ve.TYPE;this.size=ve.SIZE;this.currentIconType=ve.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=ve.SIZE,.875}}get icon(){let e=Qr(this.type);return e==="active-presence-small-filled"&&(this.type=ve.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
|
+
`}};ne.styles=[...u.styles,...Kr],a([d({type:String,reflect:!0})],ne.prototype,"type",2),a([d({type:String,reflect:!0})],ne.prototype,"size",2),a([z()],ne.prototype,"currentIconType",2);var Vt=ne;Vt.register(Yr);var li=Vt;var Jr=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 mi=[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
|
+
`,Jr],eo=mi;var ye=class extends u{constructor(){super(...arguments);this.type=k.TYPE;this.tagname=k.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case _.H1:return m`<h1 part=${k.CSS_PART_TEXT}><slot></slot></h1>`;case _.H2:return m`<h2 part=${k.CSS_PART_TEXT}><slot></slot></h2>`;case _.H3:return m`<h3 part=${k.CSS_PART_TEXT}><slot></slot></h3>`;case _.H4:return m`<h4 part=${k.CSS_PART_TEXT}><slot></slot></h4>`;case _.H5:return m`<h5 part=${k.CSS_PART_TEXT}><slot></slot></h5>`;case _.H6:return m`<h6 part=${k.CSS_PART_TEXT}><slot></slot></h6>`;case _.DIV:return m`<div part=${k.CSS_PART_TEXT}><slot></slot></div>`;case _.SPAN:return m`<span part=${k.CSS_PART_TEXT}><slot></slot></span>`;case _.SMALL:return m`<small part=${k.CSS_PART_TEXT}><slot></slot></small>`;case _.P:default:return m`<p part=${k.CSS_PART_TEXT}><slot></slot></p>`}}};ye.styles=[...u.styles,...eo],a([d({attribute:"type",reflect:!0,type:String})],ye.prototype,"type",2),a([d({attribute:"tagname",reflect:!0,type:String})],ye.prototype,"tagname",2);var Ht=ye;Ht.register(Ue);var pi=Ht;Pt.register(Xr);var hi=Pt;var to={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ro=o=>(...t)=>({_$litDirective$:o,values:t}),lt=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 mt=ro(class extends lt{constructor(o){var t;if(super(o),o.type!==to.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(n=>n!=="")));for(let n in t)t[n]&&!((r=this.nt)!=null&&r.has(n))&&this.st.add(n);return this.render(t)}let e=o.element.classList;for(let n of this.st)n in t||(e.remove(n),this.st.delete(n));for(let n in t){let s=!!t[n];s===this.st.has(n)||(i=this.nt)!=null&&i.has(n)||(s?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return V}});var oo=g.constructTagName("badge"),H={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},pt={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},ht={PRIMARY:"primary",SECONDARY:"secondary"},Ve={SUCCESS:"success",WARNING:"warning",ERROR:"error"},ec={...ht,...Ve},j={TYPE:H.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:ht.PRIMARY,ICON_SIZE:1};var ui=[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
|
+
`],io=ui;var M=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="${
|
686
|
+
class="mdc-badge-icon ${mt({"mdc-badge-overlay":this.overlay,[`mdc-badge-icon__${r}`]:!0})}"
|
687
|
+
name="${f(e)}"
|
688
688
|
size="${j.ICON_SIZE}"
|
689
689
|
></mdc-icon>
|
690
|
-
`}getBadgeDot(){return m`<div class="mdc-badge-dot ${
|
690
|
+
`}getBadgeDot(){return m`<div class="mdc-badge-dot ${mt({"mdc-badge-overlay":this.overlay})}"></div>`}getBadgeCounterText(){return m`
|
691
691
|
<mdc-text
|
692
692
|
type="${N.BODY_SMALL_MEDIUM}"
|
693
|
-
tagname="${
|
694
|
-
class="mdc-badge-text ${
|
693
|
+
tagname="${_.DIV}"
|
694
|
+
class="mdc-badge-text ${mt({"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(ht).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(pt.SUCCESS_ICON_NAME,Ve.SUCCESS);case H.WARNING:return this.getBadgeIcon(pt.WARNING_ICON_NAME,Ve.WARNING);case H.ERROR:return this.getBadgeIcon(pt.ERROR_ICON_NAME,Ve.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()}};M.styles=[...u.styles,...io],a([d({type:String,reflect:!0})],M.prototype,"type",2),a([d({type:String,attribute:"icon-name"})],M.prototype,"iconName",2),a([d({type:String,reflect:!0})],M.prototype,"variant",2),a([d({type:Number})],M.prototype,"counter",2),a([d({type:Number,attribute:"max-counter",reflect:!0})],M.prototype,"maxCounter",2),a([d({type:Boolean})],M.prototype,"overlay",2),a([d({type:String,attribute:"aria-label"})],M.prototype,"ariaLabel",2);var Gt=M;Gt.register(oo);var gi=Gt;var fi=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
|
+
`,so=[fi];var Ic=g.constructTagName("buttonsimple"),bi={20:20,24:24,28:28,32:32,40:40,48:48,52:52,64:64,72:72,88:88,124:124},xe={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},ut={SIZE:bi[32],TYPE:xe.BUTTON,ROLE:"button"};var He=g.constructTagName("button"),ae={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary"},gt={40:40,32:32,28:28,24:24},G={64:64,52:52,20:20,...gt},Bt={POSITIVE:"positive",NEGATIVE:"negative",ACCENT:"accent",PROMOTIONAL:"promotional",DEFAULT:"default"},Ee={PILL:"pill",ICON:"icon",PILL_WITH_ICON:"pill-with-icon"},O={VARIANT:ae.PRIMARY,SIZE:gt[32],COLOR:Bt.DEFAULT,TYPE_INTERNAL:Ee.ICON,TYPE:xe.BUTTON};var no=o=>{switch(o){case G[64]:return 2;case G[52]:return 1.75;case G[40]:return 1.25;default:return 1}},Ft=o=>{let t=o.split("-"),e=["bold","filled","regular","light"];return t.filter(r=>!e.includes(r)).join("-")};var vi=[T,p`
|
870
870
|
:host {
|
871
871
|
border: 0.0625rem solid transparent;
|
872
872
|
cursor: pointer;
|
@@ -922,9 +922,9 @@
|
|
922
922
|
:host([size="20"]){
|
923
923
|
height: var(--mdc-button-height-size-20);
|
924
924
|
}
|
925
|
-
`,...
|
925
|
+
`,...R()],ao=vi;var Te=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return a([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var co=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 co(Te(u)){constructor(){super();this.active=!1;this.softDisabled=!1;this.size=ut.SIZE;this.role=ut.ROLE;this.type=ut.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===xe.SUBMIT&&this.internals.form&&this.internals.form.requestSubmit(),this.type===xe.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
|
-
`}};$.formAssociated=!0,$.styles=[...u.styles,...
|
927
|
+
`}};$.formAssociated=!0,$.styles=[...u.styles,...ao],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 Ge=$;var w=class extends Ge{constructor(){super(...arguments);this.variant=O.VARIANT;this.size=O.SIZE;this.color=O.COLOR;this.role="button";this.typeInternal=O.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=`${Ft(this.prefixIcon)}-filled`),this.postfixIcon&&(this.prevPostfixIcon=this.postfixIcon,this.postfixIcon=`${Ft(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:O.VARIANT)}setSize(e){let i=this.typeInternal===Ee.ICON?Object.values(G).includes(e)&&!(e===G[20]&&this.variant!==ae.TERTIARY):Object.values(gt).includes(e);this.setAttribute("size",i?`${e}`:`${O.SIZE}`),this.iconSize=no(e)}setColor(e){!Object.values(Bt).includes(e)||this.variant===ae.TERTIARY?this.setAttribute("color",`${O.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=Ee.PILL_WITH_ICON,this.setAttribute("data-btn-type","pill-with-icon")):!e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=Ee.ICON,this.setAttribute("data-btn-type","icon")):(this.typeInternal=Ee.PILL,this.setAttribute("data-btn-type","pill"))}render(){return m`
|
928
928
|
${this.prefixIcon?m`
|
929
929
|
<mdc-icon
|
930
930
|
name="${this.prefixIcon}"
|
@@ -940,7 +940,7 @@
|
|
940
940
|
size=${this.iconSize}
|
941
941
|
length-unit="rem">
|
942
942
|
</mdc-icon>`:""}
|
943
|
-
`}};w.styles=[...
|
943
|
+
`}};w.styles=[...Ge.styles,...so],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 Xt=w;Xt.register(He);var yi=Xt;var xi=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
|
+
`,lo=[xi];var mo=g.constructTagName("bullet"),po={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var Be=class extends u{constructor(){super(...arguments);this.size=po.SMALL}};Be.styles=[...u.styles,...lo],a([d({type:String,reflect:!0})],Be.prototype,"size",2);var Zt=Be;Zt.register(mo);var Ei=Zt;var Ti=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
|
+
`,ho=[Ti];var uo=g.constructTagName("marker"),go={SOLID:"solid",STRIPED:"striped"};var Fe=class extends u{constructor(){super(...arguments);this.variant=go.SOLID}};Fe.styles=[...u.styles,...ho],a([d({type:String,reflect:!0})],Fe.prototype,"variant",2);var Yt=Fe;Yt.register(uo);var Ai=Yt;var _i=[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,29 @@
|
|
1130
1130
|
font-size: var(--mdc-divider-text-size);
|
1131
1131
|
line-height: var(--mdc-divider-text-line-height);
|
1132
1132
|
}
|
1133
|
-
`],
|
1133
|
+
`],fo=_i;var bo=g.constructTagName("divider"),Xe={HORIZONTAL:"horizontal",VERTICAL:"vertical"},qt={SOLID:"solid",GRADIENT:"gradient"},W={POSITIVE:"positive",NEGATIVE:"negative"},Ze={UP:"arrow-up-regular",DOWN:"arrow-down-regular",LEFT:"arrow-left-regular",RIGHT:"arrow-right-regular"},de={ORIENTATION:Xe.HORIZONTAL,VARIANT:qt.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(qt).includes(e)?e:de.VARIANT)}setOrientation(e){this.setAttribute("orientation",Object.values(Xe).includes(e)?e:de.ORIENTATION)}ensureValidDirections(){let e=this.orientation===Xe.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===Xe.HORIZONTAL,r=this.arrowDirection===W.POSITIVE;return e?r?Ze.UP:Ze.DOWN:r?Ze.RIGHT:Ze.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 s;let e=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"),r=(e==null?void 0:e.assignedElements({flatten:!0}))||[];if(r.length>1)return;let i=r.some(c=>c.tagName===Ue.toUpperCase()),n=r.some(c=>c.tagName===He.toUpperCase());i&&!n?this.setAttribute("data-type","mdc-text-divider"):!i&&n&&(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
|
-
`}};K.styles=[...u.styles,...
|
1137
|
+
`}};K.styles=[...u.styles,...fo],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 jt=K;jt.register(bo);var Si=jt;var Ii=[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
|
+
`,...R()],vo=Ii;var Ye=class extends ct(Ge){constructor(){super();this.ariaLabel=null;this.active=void 0,this.disabled=void 0,this.softDisabled=void 0,this.role="button",this.type=O.TYPE}update(e){super.update(e),e.has("size")&&this.setSize(this.size)}setSize(e){this.setAttribute("size",Object.values(b).includes(e)?`${e}`:be.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="${f(this.counter)}"
|
1149
|
+
icon-name="${f(this.iconName)}"
|
1150
|
+
initials="${f(this.initials)}"
|
1151
|
+
presence="${f(this.presence)}"
|
1152
|
+
size="${f(this.size)}"
|
1153
|
+
src="${f(this.src)}"
|
1154
1154
|
></mdc-avatar>
|
1155
|
-
`}};
|
1155
|
+
`}};Ye.styles=[...vo],a([d({type:String,attribute:"aria-label"})],Ye.prototype,"ariaLabel",2);var Wt=Ye;var yo=g.constructTagName("avatarbutton");Wt.register(yo);var Ni=Wt;var Ci=[p`
|
1156
1156
|
:host{
|
1157
1157
|
--mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
1158
1158
|
--mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
@@ -1266,7 +1266,7 @@
|
|
1266
1266
|
opacity: 0;
|
1267
1267
|
pointer-events: none;
|
1268
1268
|
}
|
1269
|
-
`,...
|
1269
|
+
`,...R(!0)],xo=Ci;var S=[];for(let o=0;o<256;++o)S.push((o+256).toString(16).slice(1));function Eo(o,t=0){return(S[o[t+0]]+S[o[t+1]]+S[o[t+2]]+S[o[t+3]]+"-"+S[o[t+4]]+S[o[t+5]]+"-"+S[o[t+6]]+S[o[t+7]]+"-"+S[o[t+8]]+S[o[t+9]]+"-"+S[o[t+10]]+S[o[t+11]]+S[o[t+12]]+S[o[t+13]]+S[o[t+14]]+S[o[t+15]]).toLowerCase()}var Kt,zi=new Uint8Array(16);function Qt(){if(!Kt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Kt=crypto.getRandomValues.bind(crypto)}return Kt(zi)}var Ri=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jt={randomUUID:Ri};function ki(o,t,e){var i,n,s;if(Jt.randomUUID&&!t&&!o)return Jt.randomUUID();o=o||{};let r=(s=(n=o.random)!=null?n:(i=o.rng)==null?void 0:i.call(o))!=null?s:Qt();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 Eo(r)}var er=ki;var Li=[T,p`
|
1270
1270
|
:host {
|
1271
1271
|
flex-direction: column;
|
1272
1272
|
align-items: flex-start;
|
@@ -1311,11 +1311,11 @@
|
|
1311
1311
|
:host([help-text-type='priority']) .mdc-help-text {
|
1312
1312
|
color: var(--mds-color-theme-text-accent-normal);
|
1313
1313
|
}
|
1314
|
-
`],
|
1314
|
+
`],To=Li;var Ao=g.constructTagName("formfieldwrapper"),D={DEFAULT:"default",ERROR:"error",PRIORITY:"priority",SUCCESS:"success",WARNING:"warning"},tr={VALIDATION:D.DEFAULT},rr={TAGNAME:_.SPAN,TYPE:N.BODY_MIDSIZE_REGULAR};var _o=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 Te(u){constructor(){super(...arguments);this.id=`mdc-input-${er()}`;this.helpTextType=tr.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=_o(this.helpTextType||tr.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
1315
|
<mdc-text
|
1316
1316
|
part="help-text"
|
1317
|
-
tagname=${
|
1318
|
-
type=${
|
1317
|
+
tagname=${rr.TAGNAME}
|
1318
|
+
type=${rr.TYPE}
|
1319
1319
|
>
|
1320
1320
|
${this.helpText}
|
1321
1321
|
</mdc-text>
|
@@ -1325,7 +1325,7 @@
|
|
1325
1325
|
</div>`}renderHelperText(){return m`<div class="mdc-help-text" part="mdc-help-text">
|
1326
1326
|
<slot name="help-icon">${this.renderHelpTextIcon()}</slot>
|
1327
1327
|
<slot name="help-text">${this.renderHelpText()}</slot>
|
1328
|
-
</div>`}};Q.styles=[...u.styles,...
|
1328
|
+
</div>`}};Q.styles=[...u.styles,...To],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 Ae=Q;Ae.register(Ao);var _e=Ae;var Se=o=>{class t extends o{constructor(){super(...arguments);this.name=""}}return a([d({reflect:!0,type:String})],t.prototype,"name",2),t};var So=g.constructTagName("input"),Io={OFF:"off",NONE:"none",ON:"on",SENTENCES:"sentences",WORDS:"words",CHARACTERS:"characters"},No={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:_.SPAN};var Ie=o=>{class t extends o{constructor(){super(...arguments);this.value=""}}return a([d({reflect:!0,type:String})],t.prototype,"value",2),t};var Ne=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 Ne(Ie(Se(_e))){constructor(){super();this.placeholder="";this.required=!1;this.readonly=!1;this.trailingButton=!1;this.autocapitalize=Io.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(s=>{this.onerror&&this.onerror(s)})}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
1329
|
<mdc-icon
|
1330
1330
|
class="leading-icon"
|
1331
1331
|
part="leading-icon"
|
@@ -1340,7 +1340,7 @@
|
|
1340
1340
|
type="${J.PREFIX_TEXT_TYPE}"
|
1341
1341
|
aria-hidden="true"
|
1342
1342
|
>
|
1343
|
-
${this.prefixText.slice(0,
|
1343
|
+
${this.prefixText.slice(0,No.MAX_LENGTH)}
|
1344
1344
|
</mdc-text>
|
1345
1345
|
`:h}clearInputText(){var e;this.value="",(e=this.inputElement)==null||e.focus()}renderTrailingButton(){return this.trailingButton?m`
|
1346
1346
|
<mdc-button
|
@@ -1370,16 +1370,16 @@
|
|
1370
1370
|
?readonly="${this.readonly}"
|
1371
1371
|
?required="${this.required}"
|
1372
1372
|
type="text"
|
1373
|
-
placeholder=${
|
1374
|
-
minlength=${
|
1375
|
-
maxlength=${
|
1373
|
+
placeholder=${f(this.placeholder)}
|
1374
|
+
minlength=${f(this.minlength)}
|
1375
|
+
maxlength=${f(this.maxlength)}
|
1376
1376
|
autocapitalize=${this.autocapitalize}
|
1377
1377
|
autocomplete=${this.autocomplete}
|
1378
1378
|
?autofocus="${this.autofocus}"
|
1379
|
-
dirname=${
|
1380
|
-
pattern=${
|
1381
|
-
list=${
|
1382
|
-
size=${
|
1379
|
+
dirname=${f(this.dirname)}
|
1380
|
+
pattern=${f(this.pattern)}
|
1381
|
+
list=${f(this.list)}
|
1382
|
+
size=${f(this.size)}
|
1383
1383
|
@input=${this.onInput}
|
1384
1384
|
@change=${this.onChange}
|
1385
1385
|
/>
|
@@ -1388,7 +1388,7 @@
|
|
1388
1388
|
<slot name="trailing-button">${this.renderTrailingButton()}</slot>
|
1389
1389
|
</div>
|
1390
1390
|
${this.helpText?this.renderHelperText():h}
|
1391
|
-
`}};E.formAssociated=!0,E.styles=[...
|
1391
|
+
`}};E.formAssociated=!0,E.styles=[..._e.styles,...xo],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([vr("input")],E.prototype,"inputElement",2);var or=E;or.register(So);var wi=or;var Co=g.constructTagName("link"),ft={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},bt={LARGE:1,MIDSIZE:.875,SMALL:.75},vt={INLINE:!1,INVERTED:!1,LINK_SIZE:ft.LARGE};var Mi=[T,p`
|
1392
1392
|
|
1393
1393
|
:host {
|
1394
1394
|
|
@@ -1499,11 +1499,181 @@
|
|
1499
1499
|
:host([inverted][disabled]) {
|
1500
1500
|
color: var(--mdc-link-inverted-color-disabled);
|
1501
1501
|
}
|
1502
|
-
`,...
|
1502
|
+
`,...R(),p`
|
1503
1503
|
:host(:active) {
|
1504
1504
|
box-shadow: none;
|
1505
1505
|
}
|
1506
|
-
`],
|
1506
|
+
`],zo=Mi;var ee=class extends Te(u){constructor(){super(...arguments);this.inline=vt.INLINE;this.inverted=vt.INVERTED;this.size=vt.LINK_SIZE;this.prevTabindex=null}getIconSize(){switch(this.size){case ft.SMALL:return bt.SMALL;case ft.MIDSIZE:return bt.MIDSIZE;default:return bt.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,n;let e=(n=(i=this.shadowRoot)==null?void 0:i.querySelector("slot"))==null?void 0:n.assignedElements({flatten:!0}).find(s=>s.tagName==="A"),r=this.getIconSize();if(this.iconName&&e){let s=document.createElement("mdc-icon");s.setAttribute("name",this.iconName),s.setAttribute("size",`${r}`),s.setAttribute("length-unit","rem"),e.appendChild(s)}}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this.disabled)}render(){return m`<slot @slotchange=${this.updateTrailingIcon}></slot>`}};ee.styles=[...u.styles,...zo],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 ir=ee;ir.register(Co);var Oi=ir;var $i=[T,p`
|
1507
|
+
:host {
|
1508
|
+
--mdc-toggle-width: 3rem;
|
1509
|
+
--mdc-toggle-height: 1.5rem;
|
1510
|
+
--mdc-toggle-width-compact: 2rem;
|
1511
|
+
--mdc-toggle-height-compact: 1rem;
|
1512
|
+
--mdc-toggle-border-radius: 0.75rem;
|
1513
|
+
--mdc-toggle-border-radius-compact: 0.5rem;
|
1514
|
+
--mdc-toggle-border: 0.0625rem solid var(--mds-color-theme-outline-input-normal);
|
1515
|
+
|
1516
|
+
--mdc-toggle-inactive-rest-color: var(--mds-color-theme-control-inactive-normal);
|
1517
|
+
--mdc-toggle-inactive-hover-color: var(--mds-color-theme-control-inactive-hover);
|
1518
|
+
--mdc-toggle-inactive-pressed-color: var(--mds-color-theme-control-inactive-pressed);
|
1519
|
+
--mdc-toggle-inactive-disabled-color: var(--mds-color-theme-control-inactive-disabled);
|
1520
|
+
--mdc-toggle-active-rest-color: var(--mds-color-theme-control-active-normal);
|
1521
|
+
--mdc-toggle-active-hover-color: var(--mds-color-theme-control-active-hover);
|
1522
|
+
--mdc-toggle-active-pressed-color: var(--mds-color-theme-control-active-pressed);
|
1523
|
+
--mdc-toggle-active-disabled-color: var(--mds-color-theme-control-active-disabled);
|
1524
|
+
|
1525
|
+
--mdc-toggle-label-lineheight: var(--mds-font-lineheight-body-midsize);
|
1526
|
+
--mdc-toggle-label-fontsize: var(--mds-font-size-body-midsize);
|
1527
|
+
--mdc-toggle-label-fontweight: 400;
|
1528
|
+
--mdc-toggle-label-color-disabled: var(--mds-color-theme-text-primary-disabled);
|
1529
|
+
--mdc-toggle-help-text-color: var(--mds-color-theme-text-secondary-normal);
|
1530
|
+
|
1531
|
+
--mdc-toggle-icon-color-normal: var(--mds-color-theme-common-inverted-text-primary-normal);
|
1532
|
+
--mdc-toggle-icon-color-disabled: var(--mds-color-theme-common-inverted-text-primary-disabled);
|
1533
|
+
--mdc-toggle-icon-background-color-normal: var(--mds-color-theme-common-text-primary-normal);
|
1534
|
+
--mdc-toggle-icon-background-color-disabled: var(--mds-color-theme-common-text-primary-disabled);
|
1535
|
+
|
1536
|
+
display: grid;
|
1537
|
+
grid-template-rows: auto auto;
|
1538
|
+
grid-template-columns: auto auto;
|
1539
|
+
column-gap: 0.75rem;
|
1540
|
+
row-gap: 0.25rem;
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
:host([help-text='']) {
|
1544
|
+
row-gap: 0rem;
|
1545
|
+
}
|
1546
|
+
|
1547
|
+
.mdc-toggle__container {
|
1548
|
+
position: relative;
|
1549
|
+
border-radius: var(--mdc-toggle-border-radius);
|
1550
|
+
}
|
1551
|
+
|
1552
|
+
.mdc-toggle__input {
|
1553
|
+
opacity: 0;
|
1554
|
+
position: absolute;
|
1555
|
+
width: var(--mdc-toggle-width);
|
1556
|
+
height: var(--mdc-toggle-height);
|
1557
|
+
cursor: pointer;
|
1558
|
+
}
|
1559
|
+
|
1560
|
+
.mdc-toggle__slider {
|
1561
|
+
width: var(--mdc-toggle-width);
|
1562
|
+
height: var(--mdc-toggle-height);
|
1563
|
+
background: var(--mdc-toggle-inactive-rest-color);
|
1564
|
+
border-radius: var(--mdc-toggle-border-radius);
|
1565
|
+
border: var(--mdc-toggle-border);
|
1566
|
+
display: flex;
|
1567
|
+
align-items: center;
|
1568
|
+
justify-content: flex-start;
|
1569
|
+
transition: background-color 0.3s ease;
|
1570
|
+
outline: none;
|
1571
|
+
padding: 0.0625rem;
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
:host([checked]) .mdc-toggle__slider {
|
1575
|
+
background-color: var(--mdc-toggle-active-rest-color);
|
1576
|
+
justify-content: flex-end;
|
1577
|
+
border-color: transparent;
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
:host([size='compact']) .mdc-toggle__slider {
|
1581
|
+
width: var(--mdc-toggle-width-compact);
|
1582
|
+
height: var(--mdc-toggle-height-compact);
|
1583
|
+
border-radius: var(--mdc-toggle-border-radius-compact);
|
1584
|
+
}
|
1585
|
+
|
1586
|
+
.mdc-toggle__icon {
|
1587
|
+
padding: 0.25rem;
|
1588
|
+
--mdc-icon-fill-color: var(--mdc-toggle-icon-color-normal);
|
1589
|
+
background-color: var(--mdc-toggle-icon-background-color-normal);
|
1590
|
+
border-radius: 50%;
|
1591
|
+
}
|
1592
|
+
|
1593
|
+
:host([disabled]) .mdc-toggle__icon {
|
1594
|
+
--mdc-icon-fill-color: var(--mdc-toggle-icon-color-disabled);
|
1595
|
+
}
|
1596
|
+
|
1597
|
+
:host([size='compact']) .mdc-toggle__icon {
|
1598
|
+
padding: 0.125rem;
|
1599
|
+
}
|
1600
|
+
|
1601
|
+
:host(:not([disabled])) .mdc-toggle__container:hover .mdc-toggle__slider {
|
1602
|
+
background-color: var(--mdc-toggle-inactive-hover-color);
|
1603
|
+
}
|
1604
|
+
|
1605
|
+
:host(:not([disabled])) .mdc-toggle__container:active .mdc-toggle__slider {
|
1606
|
+
background-color: var(--mdc-toggle-inactive-pressed-color);
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
:host(:not([disabled])[checked]) .mdc-toggle__container:hover .mdc-toggle__slider {
|
1610
|
+
background-color: var(--mdc-toggle-active-hover-color);
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
:host(:not([disabled])[checked]) .mdc-toggle__container:active .mdc-toggle__slider {
|
1614
|
+
background-color: var(--mdc-toggle-active-pressed-color);
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
:host([disabled]) .mdc-toggle__slider {
|
1618
|
+
background-color: var(--mdc-toggle-inactive-disabled-color);
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
:host([disabled][checked]) .mdc-toggle__slider {
|
1622
|
+
background-color: var(--mdc-toggle-active-disabled-color);
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
:host([disabled]) .mdc-toggle__icon {
|
1626
|
+
background-color: var(--mdc-toggle-icon-background-color-disabled);
|
1627
|
+
}
|
1628
|
+
|
1629
|
+
.mdc-label-text, .mdc-help-text {
|
1630
|
+
font-size: var(--mdc-toggle-label-fontsize);
|
1631
|
+
font-weight: var(--mdc-toggle-label-fontweight);
|
1632
|
+
line-height: var(--mdc-toggle-label-lineheight);
|
1633
|
+
grid-column: 2;
|
1634
|
+
}
|
1635
|
+
|
1636
|
+
.mdc-help-text {
|
1637
|
+
color: var(--mdc-toggle-help-text-color);
|
1638
|
+
}
|
1639
|
+
|
1640
|
+
:host([disabled]) .mdc-label-text, :host([disabled]) .mdc-help-text {
|
1641
|
+
color: var(--mdc-toggle-label-color-disabled);
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
/* High Contrast Mode */
|
1645
|
+
@media (forced-colors: active) {
|
1646
|
+
:host([checked]) .mdc-toggle__slider, .mdc-toggle__icon {
|
1647
|
+
border: var(--mdc-toggle-border);
|
1648
|
+
}
|
1649
|
+
}
|
1650
|
+
`,...R(!0)],Ro=$i;var ko=g.constructTagName("toggle"),sr={DEFAULT:"default",COMPACT:"compact"},nr={CHECKED:"check-bold",UNCHECKED:"cancel-bold"},Lo={compact:.75,default:1.25},ar={SIZE:sr.DEFAULT};var ce=class extends Se(Ie(Ne(_e))){constructor(){super();this.checked=!1;this.size=ar.SIZE;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:"isActive"),this.internals.setFormValue(e)}toggleState(){this.disabled||(this.checked=!this.checked)}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}setToggleSize(e){this.setAttribute("size",Object.values(sr).includes(e)?e:ar.SIZE)}update(e){super.update(e),e.has("checked")&&this.setFormValue(),e.has("size")&&this.setToggleSize(this.size)}render(){var e;return m`
|
1651
|
+
<div class="mdc-toggle__container mdc-focus-ring">
|
1652
|
+
<input
|
1653
|
+
id="${this.id}"
|
1654
|
+
type="checkbox"
|
1655
|
+
class="mdc-toggle__input"
|
1656
|
+
role="switch"
|
1657
|
+
name="${f(this.name)}"
|
1658
|
+
value="${f(this.value)}"
|
1659
|
+
.checked="${this.checked}"
|
1660
|
+
.disabled="${this.disabled}"
|
1661
|
+
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
1662
|
+
tabindex="${this.disabled?-1:0}"
|
1663
|
+
@change="${this.handleChange}"
|
1664
|
+
/>
|
1665
|
+
<div class="mdc-toggle__slider">
|
1666
|
+
<mdc-icon
|
1667
|
+
name="${this.checked?nr.CHECKED:nr.UNCHECKED}"
|
1668
|
+
class="mdc-toggle__icon"
|
1669
|
+
length-unit="rem"
|
1670
|
+
size="${Lo[this.size]}"
|
1671
|
+
></mdc-icon>
|
1672
|
+
</div>
|
1673
|
+
</div>
|
1674
|
+
${this.renderLabel()}
|
1675
|
+
${this.renderHelperText()}
|
1676
|
+
`}};ce.formAssociated=!0,ce.styles=[..._e.styles,...Ro],a([d({type:Boolean,reflect:!0})],ce.prototype,"checked",2),a([d({type:String,reflect:!0})],ce.prototype,"size",2);var dr=ce;dr.register(ko);var Di=dr;var wo=g.constructTagName("checkbox"),cr={CHECKED:"check-bold",INDETERMINATE:"minus-bold"};var Ui=[p`
|
1507
1677
|
:host {
|
1508
1678
|
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
1509
1679
|
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
@@ -1605,10 +1775,10 @@
|
|
1605
1775
|
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
1606
1776
|
}
|
1607
1777
|
}
|
1608
|
-
`,...
|
1778
|
+
`,...R(!0)],Mo=Ui;var le=class extends Se(Ie(Ne(Ae))){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`
|
1609
1779
|
<mdc-icon
|
1610
1780
|
class="icon"
|
1611
|
-
name="${this.indeterminate?
|
1781
|
+
name="${this.indeterminate?cr.INDETERMINATE:cr.CHECKED}"
|
1612
1782
|
size="1"
|
1613
1783
|
length-unit="rem"
|
1614
1784
|
></mdc-icon>
|
@@ -1618,8 +1788,8 @@
|
|
1618
1788
|
id="${this.id}"
|
1619
1789
|
type="checkbox"
|
1620
1790
|
class="input"
|
1621
|
-
name="${
|
1622
|
-
value="${
|
1791
|
+
name="${f(this.name)}"
|
1792
|
+
value="${f(this.value)}"
|
1623
1793
|
.checked="${this.checked}"
|
1624
1794
|
.indeterminate="${this.indeterminate}"
|
1625
1795
|
.disabled="${this.disabled}"
|
@@ -1632,7 +1802,7 @@
|
|
1632
1802
|
${this.renderLabel()}
|
1633
1803
|
${r}
|
1634
1804
|
</div>
|
1635
|
-
`}};
|
1805
|
+
`}};le.formAssociated=!0,le.styles=[...Ae.styles,...Mo],a([d({type:Boolean,reflect:!0})],le.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],le.prototype,"indeterminate",2);var lr=le;lr.register(wo);var Pi=lr;})();
|
1636
1806
|
/*! Bundled license information:
|
1637
1807
|
|
1638
1808
|
@lit/reactive-element/decorators/custom-element.js:
|