@momentum-design/components 0.18.3 → 0.18.5
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 +250 -76
- package/dist/browser/index.js.map +4 -4
- package/dist/components/badge/badge.component.d.ts +12 -0
- package/dist/components/badge/badge.component.js +12 -0
- package/dist/components/checkbox/checkbox.component.d.ts +71 -0
- package/dist/components/checkbox/checkbox.component.js +150 -0
- package/dist/components/checkbox/checkbox.constants.d.ts +6 -0
- package/dist/components/checkbox/checkbox.constants.js +7 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.styles.js +106 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +5 -0
- package/dist/components/icon/icon.component.d.ts +2 -0
- package/dist/components/icon/icon.component.js +2 -0
- package/dist/components/presence/presence.component.d.ts +16 -0
- package/dist/components/presence/presence.component.js +16 -0
- package/dist/components/presence/presence.styles.js +0 -14
- package/dist/custom-elements.json +656 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/badge/index.d.ts +12 -0
- package/dist/react/badge/index.js +12 -0
- package/dist/react/checkbox/index.d.ts +27 -0
- package/dist/react/checkbox/index.js +36 -0
- package/dist/react/icon/index.d.ts +2 -0
- package/dist/react/icon/index.js +2 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/presence/index.d.ts +16 -0
- package/dist/react/presence/index.js +16 -0
- package/dist/utils/mixins/DataAriaLabelMixin.d.ts +6 -0
- package/dist/utils/mixins/DataAriaLabelMixin.js +29 -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 bo=Object.defineProperty;var vo=Object.getOwnPropertyDescriptor;var a=(o,t,e,r)=>{for(var i=r>1?void 0:r?vo(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&&bo(t,e,i),i};var He=globalThis,Ge=He.ShadowRoot&&(He.ShadyCSS===void 0||He.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mt=Symbol(),Jt=new WeakMap,ve=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==mt)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(Ge&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Jt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Jt.set(e,t))}return t}toString(){return this.cssText}},er=o=>new ve(typeof o=="string"?o:o+"",void 0,mt),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 ve(e,o,mt)},pt=(o,t)=>{if(Ge)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=He.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},Ve=Ge?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return er(e)})(o):o;var{is:yo,defineProperty:xo,getOwnPropertyDescriptor:Eo,getOwnPropertyNames:To,getOwnPropertySymbols:Ao,getPrototypeOf:So}=Object,G=globalThis,tr=G.trustedTypes,_o=tr?tr.emptyScript:"",ht=G.reactiveElementPolyfillSupport,ye=(o,t)=>o,xe={toAttribute(o,t){switch(t){case Boolean:o=o?_o: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}},Be=(o,t)=>!yo(o,t),rr={attribute:!0,type:String,converter:xe,reflect:!1,hasChanged:Be},or,ir;(or=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ir=G.litPropertyMetadata)!=null||(G.litPropertyMetadata=new WeakMap);var D=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=rr){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&&xo(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var s;let{get:i,set:n}=(s=Eo(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 m=i==null?void 0:i.call(this);n.call(this,c),this.requestUpdate(t,m,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:rr}static _$Ei(){if(this.hasOwnProperty(ye("elementProperties")))return;let t=So(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ye("properties"))){let e=this.properties,r=[...To(e),...Ao(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(Ve(i))}else t!==void 0&&e.push(Ve(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 pt(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:xe).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:xe;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:Be)(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){}},sr;D.elementStyles=[],D.shadowRootOptions={mode:"open"},D[ye("elementProperties")]=new Map,D[ye("finalized")]=new Map,ht==null||ht({ReactiveElement:D}),((sr=G.reactiveElementVersions)!=null?sr:G.reactiveElementVersions=[]).push("2.0.4");var Io={attribute:!0,type:String,converter:xe,reflect:!1,hasChanged:Be},No=(o=Io,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 m=t.get.call(this);t.set.call(this,c),this.requestUpdate(s,m,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 m=this[s];t.call(this,c),this.requestUpdate(s,m,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?No(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 N(o){return d({...o,state:!0,attribute:!1})}var zo={PREFIX:"mdc",SEPARATOR:"-"},Co={NAMESPACE:zo},ut=Co;var Ro=o=>[ut.NAMESPACE.PREFIX,o].join(ut.NAMESPACE.SEPARATOR),f={constructTagName:Ro};var Ye=f.constructTagName("themeprovider"),ft={THEMECLASS:"mds-theme-stable-darkWebex"};var Te=globalThis,Xe=Te.trustedTypes,nr=Xe?Xe.createPolicy("lit-html",{createHTML:o=>o}):void 0,hr="$lit$",V=`lit$${Math.random().toFixed(9).slice(2)}$`,ur="?"+V,Lo=`<${ur}>`,J=document,Ae=()=>J.createComment(""),Se=o=>o===null||typeof o!="object"&&typeof o!="function",At=Array.isArray,ko=o=>At(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",gt=`[
|
2
|
+
\f\r]`,Ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ar=/-->/g,dr=/>/g,K=RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),cr=/'/g,lr=/"/g,fr=/^(?:script|style|textarea|title)$/i,St=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=St(1),ts=St(2),rs=St(3),U=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),mr=new WeakMap,Q=J.createTreeWalker(J,129);function gr(o,t){if(!At(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return nr!==void 0?nr.createHTML(t):t}var wo=(o,t)=>{let e=o.length-1,r=[],i,n=t===2?"<svg>":t===3?"<math>":"",s=Ee;for(let c=0;c<e;c++){let m=o[c],y,v,b=-1,$=0;for(;$<m.length&&(s.lastIndex=$,v=s.exec(m),v!==null);)$=s.lastIndex,s===Ee?v[1]==="!--"?s=ar:v[1]!==void 0?s=dr:v[2]!==void 0?(fr.test(v[2])&&(i=RegExp("</"+v[2],"g")),s=K):v[3]!==void 0&&(s=K):s===K?v[0]===">"?(s=i!=null?i:Ee,b=-1):v[1]===void 0?b=-2:(b=s.lastIndex-v[2].length,y=v[1],s=v[3]===void 0?K:v[3]==='"'?lr:cr):s===lr||s===cr?s=K:s===ar||s===dr?s=Ee:(s=K,i=void 0);let H=s===K&&o[c+1].startsWith("/>")?" ":"";n+=s===Ee?m+Lo:b>=0?(r.push(y),m.slice(0,b)+hr+m.slice(b)+V+H):m+V+(b===-2?c:H)}return[gr(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},_e=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,s=0,c=t.length-1,m=this.parts,[y,v]=wo(t,e);if(this.el=o.createElement(y,r),Q.currentNode=this.el.content,e===2||e===3){let b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(i=Q.nextNode())!==null&&m.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let b of i.getAttributeNames())if(b.endsWith(hr)){let $=v[s++],H=i.getAttribute(b).split(V),Pe=/([.?@])?(.*)/.exec($);m.push({type:1,index:n,name:Pe[2],strings:H,ctor:Pe[1]==="."?yt:Pe[1]==="?"?xt:Pe[1]==="@"?Et:ae}),i.removeAttribute(b)}else b.startsWith(V)&&(m.push({type:6,index:n}),i.removeAttribute(b));if(fr.test(i.tagName)){let b=i.textContent.split(V),$=b.length-1;if($>0){i.textContent=Xe?Xe.emptyScript:"";for(let H=0;H<$;H++)i.append(b[H],Ae()),Q.nextNode(),m.push({type:2,index:++n});i.append(b[$],Ae())}}}else if(i.nodeType===8)if(i.data===ur)m.push({type:2,index:n});else{let b=-1;for(;(b=i.data.indexOf(V,b+1))!==-1;)m.push({type:7,index:n}),b+=V.length-1}n++}}static createElement(t,e){let r=J.createElement("template");return r.innerHTML=t,r}};function ne(o,t,e=o,r){var s,c,m;if(t===U)return t;let i=r!==void 0?(s=e.o)==null?void 0:s[r]:e.l,n=Se(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?((m=e.o)!=null?m:e.o=[])[r]=i:e.l=i),i!==void 0&&(t=ne(o,i._$AS(o,t.values),i,r)),t}var vt=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 y;let{el:{content:e},parts:r}=this._$AD,i=((y=t==null?void 0:t.creationScope)!=null?y:J).importNode(e,!0);Q.currentNode=i;let n=Q.nextNode(),s=0,c=0,m=r[0];for(;m!==void 0;){if(s===m.index){let v;m.type===2?v=new Ie(n,n.nextSibling,this,t):m.type===1?v=new m.ctor(n,m.name,m.strings,this,t):m.type===6&&(v=new Tt(n,this,t)),this._$AV.push(v),m=r[++c]}s!==(m==null?void 0:m.index)&&(n=Q.nextNode(),s++)}return Q.currentNode=J,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++}},Ie=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=u,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=ne(this,t,e),Se(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==U&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ko(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!==u&&Se(this._$AH)?this._$AA.nextSibling.data=t:this.T(J.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=_e.createElement(gr(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 vt(i,this),c=s.u(this.options);s.p(e),this.T(c),this._$AH=s}}_$AC(t){let e=mr.get(t.strings);return e===void 0&&mr.set(t.strings,e=new _e(t)),e}k(t){At(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(Ae()),this.O(Ae()),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))}},ae=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=u,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=u}_$AI(t,e=this,r,i){let n=this.strings,s=!1;if(n===void 0)t=ne(this,t,e,0),s=!Se(t)||t!==this._$AH&&t!==U,s&&(this._$AH=t);else{let c=t,m,y;for(t=n[0],m=0;m<n.length-1;m++)y=ne(this,c[r+m],e,m),y===U&&(y=this._$AH[m]),s||(s=!Se(y)||y!==this._$AH[m]),y===u?t=u:t!==u&&(t+=(y!=null?y:"")+n[m+1]),this._$AH[m]=y}s&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},yt=class extends ae{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},xt=class extends ae{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},Et=class extends ae{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=ne(this,t,e,0))!=null?s:u)===U)return;let r=this._$AH,i=t===u&&r!==u||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==u&&(r===u||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)}},Tt=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){ne(this,t)}};var bt=Te.litHtmlPolyfillSupport,pr;bt==null||bt(_e,Ie),((pr=Te.litHtmlVersions)!=null?pr:Te.litHtmlVersions=[]).push("3.2.0");var br=(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 Ie(t.insertBefore(Ae(),c),c,void 0,e!=null?e:{})}return i._$AI(o),i};var B=class extends D{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=br(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 U}},vr;B._$litElement$=!0,B.finalized=!0,(vr=globalThis.litElementHydrateSupport)==null||vr.call(globalThis,{LitElement:B});var _t=globalThis.litElementPolyfillSupport;_t==null||_t({LitElement:B});var yr;((yr=globalThis.litElementVersions)!=null?yr:globalThis.litElementVersions=[]).push("4.1.0");var xr=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 Ze=class extends B{static register(t){customElements.get(t)||customElements.define(t,this)}};Ze.styles=[xr];var Er=Ze;var h=Er;var F=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 de=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 F(this.context,this.t,this.subscribe))}};var je=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 It=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},ce=class extends je{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 m=new Set;for(let[y,{consumerHost:v}]of this.subscriptions)m.has(y)||(m.add(y),v.dispatchEvent(new F(this.context,y,!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 It(this.context))}};var Mo=p`
|
14
14
|
:host {
|
15
15
|
display: contents;
|
16
16
|
}
|
17
|
-
`,
|
17
|
+
`,Ar=Mo;var qe=class extends h{constructor({context:t,initialValue:e}){super(),this.context=new ce(this,{context:t,initialValue:e})}render(){return this.updateContext(),l`<slot></slot>`}};qe.styles=[...h.styles,Ar];var Sr=qe;var le=Sr;var We=class{constructor(t){this.themeclass=t}};We.context=Ye;var Ke=We;var Oo=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
|
+
`,_r=[Oo];var me=class extends le{constructor(){super({context:Ke.context,initialValue:new Ke(ft.THEMECLASS)});this.themeclass=ft.THEMECLASS}static get Context(){return Ke.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(" "))}};me.styles=[...le.styles,..._r],a([N()],me.prototype,"currentThemeClass",2),a([d({type:String})],me.prototype,"themeclass",2);var Nt=me;Nt.register(Ye);var $o=Nt;var x=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
|
+
`,w=(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);
|
@@ -52,10 +52,10 @@
|
|
52
52
|
--mdc-focus-ring-middle-offset: var(--mdc-focus-ring-inner-width);
|
53
53
|
--mdc-focus-ring-outer-offset: calc(var(--mdc-focus-ring-inner-width) + var(--mdc-focus-ring-middle-width));
|
54
54
|
}
|
55
|
-
`,
|
55
|
+
`,e=p`0 0 0 var(--mdc-focus-ring-inner-width) var(--mdc-focus-ring-inner-color),
|
56
56
|
0 0 0 var(--mdc-focus-ring-middle-width) var(--mdc-focus-ring-middle-color),
|
57
57
|
0 0 0 var(--mdc-focus-ring-outer-width) var(--mdc-focus-ring-outer-color)
|
58
|
-
`;return
|
58
|
+
`;return o?[t,p`
|
59
59
|
.mdc-focus-ring:focus-visible {
|
60
60
|
outline: none;
|
61
61
|
}
|
@@ -64,7 +64,7 @@
|
|
64
64
|
}
|
65
65
|
.mdc-focus-ring:focus-within {
|
66
66
|
position: relative;
|
67
|
-
box-shadow: ${
|
67
|
+
box-shadow: ${e};
|
68
68
|
}
|
69
69
|
/* High Contrast Mode */
|
70
70
|
@media (forced-colors: active) {
|
@@ -72,7 +72,7 @@
|
|
72
72
|
outline: 0.125rem solid var(--mds-color-theme-focus-default-0);
|
73
73
|
}
|
74
74
|
}
|
75
|
-
`]:[
|
75
|
+
`]:[t,p`
|
76
76
|
:host(:focus-visible) {
|
77
77
|
outline: none;
|
78
78
|
}
|
@@ -81,7 +81,7 @@
|
|
81
81
|
}
|
82
82
|
:host(:focus), :host(:focus-within) {
|
83
83
|
position: relative;
|
84
|
-
box-shadow: ${
|
84
|
+
box-shadow: ${e};
|
85
85
|
}
|
86
86
|
/* High Contrast Mode */
|
87
87
|
@media (forced-colors: active) {
|
@@ -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 Do=[x,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
|
+
`,...w()],Ir=Do;var Uo=o=>{let{host:t,context:e,subscribe:r}=o;return new de(t,{context:e,subscribe:r!=null?r:!0})},Po={consume:Uo},Nr=Po;var Qe=f.constructTagName("iconprovider"),zr=["svg"],Cr=["em","rem","px"],Ho={px:16,em:1,rem:1},Y={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",SIZE:Ho.em};var Je=class{};Je.context=Qe;var et=Je;var ee=class extends le{constructor(){super({context:et.context,initialValue:new et});this.fileExtension=Y.FILE_EXTENSION;this.lengthUnit=Y.LENGTH_UNIT;this.size=Y.SIZE}static get Context(){return et.context}updateValuesInContext(){this.fileExtension&&zr.includes(this.fileExtension)?this.context.value.fileExtension=this.fileExtension:(this.fileExtension=Y.FILE_EXTENSION,this.context.value.fileExtension=Y.FILE_EXTENSION),this.context.value.url=this.url,this.context.value.size=this.size,this.lengthUnit&&Cr.includes(this.lengthUnit)?this.context.value.lengthUnit=this.lengthUnit:(this.lengthUnit=Y.LENGTH_UNIT,this.context.value.lengthUnit=Y.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})],ee.prototype,"url",2),a([d({type:String,attribute:"file-extension",reflect:!0})],ee.prototype,"fileExtension",2),a([d({type:String,attribute:"length-unit",reflect:!0})],ee.prototype,"lengthUnit",2),a([d({type:Number,reflect:!0})],ee.prototype,"size",2);var Ne=ee;var Rr=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 Lr=f.constructTagName("icon"),zt={NAME:void 0,SIZE:1};var R=class extends h{constructor(){super();this.name=zt.NAME;this.ariaLabel=null;this.iconProviderContext=Nr.consume({host:this,context:Ne.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 Rr(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:zt.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 l` ${this.iconData} `}};R.styles=[...h.styles,...Ir],a([N()],R.prototype,"iconData",2),a([N()],R.prototype,"lengthUnitFromContext",2),a([N()],R.prototype,"sizeFromContext",2),a([d({type:String,reflect:!0})],R.prototype,"name",2),a([d({type:Number})],R.prototype,"size",2),a([d({type:String,attribute:"length-unit"})],R.prototype,"lengthUnit",2),a([d({type:String,attribute:"aria-label"})],R.prototype,"ariaLabel",2),a([N()],R.prototype,"abortController",2);var Ct=R;Ct.register(Lr);var Go=Ct;Ne.register(Qe);var Vo=Ne;var _=o=>o!=null?o:u;var kr=f.constructTagName("avatar"),I={COUNTER:"counter",ICON:"icon",PHOTO:"photo",TEXT:"text"},Rt=99,Bo="user-regular",g={24:24,32:32,48:48,64:64,72:72,88:88,124:124},pe={TYPE:I.PHOTO,SIZE:g[32],ICON_NAME:Bo};var tt=o=>{class t extends o{constructor(){super(...arguments);this.size=pe.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 Fo=[x,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,67 +227,53 @@
|
|
227
227
|
outline: 0.125rem solid;
|
228
228
|
}
|
229
229
|
}
|
230
|
-
`],
|
231
|
-
<mdc-presence class="presence" type="${this.presence}" size="${
|
232
|
-
`:
|
230
|
+
`],wr=Fo;var Mr=f.constructTagName("presence"),A={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"},E={XX_SMALL:"xx_small",X_SMALL:"x_small",SMALL:"small",MIDSIZE:"midsize",LARGE:"large",X_LARGE:"x_large",XX_LARGE:"xx_large"},he={TYPE:A.ACTIVE,SIZE:E.SMALL};var ze=f.constructTagName("text"),z={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"},C={TYPE:z.BODY_LARGE_REGULAR,TEXT_ELEMENT_TAGNAME:S.P,CSS_PART_TEXT:"text",CHILDREN:"The quick brown fox jumps over the lazy dog"};var Or=o=>({[g[124]]:E.XX_LARGE,[g[88]]:E.X_LARGE,[g[72]]:E.LARGE,[g[64]]:E.MIDSIZE,[g[48]]:E.SMALL,[g[32]]:E.X_SMALL,[g[24]]:E.XX_SMALL})[o]||E.X_SMALL,$r=o=>({[g[124]]:4.75,[g[88]]:3,[g[72]]:2.5,[g[64]]:2.25,[g[48]]:1.75,[g[32]]:1.25,[g[24]]:1})[o]||1.25,Dr=o=>({[g[124]]:z.HEADING_XLARGE_MEDIUM,[g[88]]:z.HEADING_LARGE_MEDIUM,[g[72]]:z.HEADING_MIDSIZE_MEDIUM,[g[64]]:z.HEADING_SMALL_MEDIUM,[g[48]]:z.HEADING_SMALL_MEDIUM,[g[32]]:z.BODY_MIDSIZE_MEDIUM,[g[24]]:z.BODY_SMALL_MEDIUM})[o]||z.BODY_MIDSIZE_MEDIUM;var Ce=class extends tt(h){constructor(){super(...arguments);this.isPhotoLoaded=!1}getPresenceTemplateBasedOnType(e){return e===I.COUNTER&&(this.counter||this.counter===0)?u:this.presence?l`
|
231
|
+
<mdc-presence class="presence" type="${this.presence}" size="${Or(this.size)}"></mdc-presence>
|
232
|
+
`:u}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 l`
|
233
233
|
<img
|
234
234
|
class="photo"
|
235
|
-
src="${
|
235
|
+
src="${_(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
|
241
|
+
`}iconTemplate(){let e=this.iconName||pe.ICON_NAME;return l`
|
242
242
|
<mdc-icon
|
243
|
-
name="${
|
243
|
+
name="${_(e)}"
|
244
244
|
length-unit="rem"
|
245
|
-
size="${
|
245
|
+
size="${$r(this.size)}"
|
246
246
|
></mdc-icon>
|
247
|
-
`}textTemplate(
|
247
|
+
`}textTemplate(e){return l`
|
248
248
|
<mdc-text
|
249
|
-
type="${
|
249
|
+
type="${Dr(this.size)}"
|
250
250
|
tagname="span"
|
251
251
|
>
|
252
|
-
${
|
252
|
+
${e}
|
253
253
|
</mdc-text>
|
254
|
-
`}generateCounterText(
|
254
|
+
`}generateCounterText(e){return e<0?"0":e>Rt?`${Rt}+`:e.toString()}generateInitialsText(e){return e.toUpperCase().slice(0,2)}generateTextContent(e){let r="";return e===I.TEXT&&this.initials&&(r=this.generateInitialsText(this.initials)),e===I.COUNTER&&(this.counter||this.counter===0)&&(r=this.generateCounterText(this.counter)),this.textTemplate(r)}getTypeBasedOnInputs(){return this.src?I.PHOTO:this.iconName?I.ICON:this.initials?I.TEXT:this.counter||this.counter===0?I.COUNTER:I.ICON}getTemplateBasedOnType(e){switch(e){case I.PHOTO:return this.photoTemplate();case I.TEXT:case I.COUNTER:return this.generateTextContent(e);case I.ICON:default:return this.iconTemplate()}}getLoadingContent(){return this.isTyping?l`<div class="loading__wrapper"><div class="loader"></div></div>`:u}getPhotoPlaceHolderContent(e){return this.isPhotoLoaded?u:e===I.PHOTO?this.initials?this.textTemplate(this.generateInitialsText(this.initials)):this.iconTemplate():u}update(e){super.update(e),e.has("src")&&!this.src&&(this.isPhotoLoaded=!1)}render(){let e=this.getTypeBasedOnInputs();return l`
|
255
255
|
<div class="content" aria-hidden="true">
|
256
|
-
${this.getPhotoPlaceHolderContent(
|
257
|
-
${this.getTemplateBasedOnType(
|
256
|
+
${this.getPhotoPlaceHolderContent(e)}
|
257
|
+
${this.getTemplateBasedOnType(e)}
|
258
258
|
${this.getLoadingContent()}
|
259
|
-
${this.getPresenceTemplateBasedOnType(
|
259
|
+
${this.getPresenceTemplateBasedOnType(e)}
|
260
260
|
</div>
|
261
|
-
`}};
|
261
|
+
`}};Ce.styles=[...h.styles,...wr],a([N()],Ce.prototype,"isPhotoLoaded",2);var Lt=Ce;var Yo=[x,p`
|
262
262
|
:host {
|
263
263
|
--mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);
|
264
|
-
|
265
264
|
--mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);
|
266
|
-
|
267
265
|
--mdc-presence-away-calling-background-color: var(--mds-color-theme-indicator-locked);
|
268
|
-
|
269
266
|
--mdc-presence-busy-background-color: var(--mds-color-theme-indicator-unstable);
|
270
|
-
|
271
267
|
--mdc-presence-dnd-background-color: var(--mds-color-theme-indicator-attention);
|
272
|
-
|
273
268
|
--mdc-presence-meeting-background-color: var(--mds-color-theme-indicator-unstable);
|
274
|
-
|
275
269
|
--mdc-presence-on-call-background-color: var(--mds-color-theme-indicator-unstable);
|
276
|
-
|
277
270
|
--mdc-presence-on-device-background-color: var(--mds-color-theme-indicator-locked);
|
278
|
-
|
279
271
|
--mdc-presence-on-mobile-background-color: var(--mds-color-theme-indicator-locked);
|
280
|
-
|
281
272
|
--mdc-presence-pause-background-color: var(--mds-color-theme-indicator-locked);
|
282
|
-
|
283
273
|
--mdc-presence-pto-background-color: var(--mds-color-theme-indicator-locked);
|
284
|
-
|
285
274
|
--mdc-presence-presenting-background-color: var(--mds-color-theme-indicator-attention);
|
286
|
-
|
287
275
|
--mdc-presence-quiet-background-color: var(--mds-color-theme-indicator-locked);
|
288
|
-
|
289
276
|
--mdc-presence-scheduled-background-color: var(--mds-color-theme-indicator-unstable);
|
290
|
-
|
291
277
|
--mdc-presence-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);
|
292
278
|
}
|
293
279
|
|
@@ -366,7 +352,7 @@
|
|
366
352
|
.mdc-presence-icon__scheduled {
|
367
353
|
color: var(--mdc-presence-scheduled-background-color);
|
368
354
|
}
|
369
|
-
`],
|
355
|
+
`],Ur=Yo;var Pr=o=>{switch(o){case A.AWAY:return"recents-presence-badge-filled";case A.AWAY_CALLING:return"away-calling-presence-filled";case A.BUSY:return"busy-presence-bold";case A.DND:return"dnd-presence-badge-filled";case A.MEETING:return"camera-filled";case A.ON_CALL:return"handset-filled";case A.ON_DEVICE:return"generic-device-video-badge-filled";case A.ON_MOBILE:return"phone-badge-filled";case A.PAUSE:return"pause-badge-filled";case A.PTO:return"pto-presence-filled";case A.PRESENTING:return"share-screen-badge-filled";case A.QUIET:return"quiet-hours-presence-filled";case A.SCHEDULED:return"meetings-presence-badge-filled";case A.ACTIVE:default:return"active-presence-small-filled"}};var te=class extends h{constructor(){super(...arguments);this.type=he.TYPE;this.size=he.SIZE;this.currentIconType=he.TYPE}get iconSize(){switch(this.size){case E.MIDSIZE:return 1.16125;case E.LARGE:return 1.30625;case E.X_LARGE:return 1.596875;case E.XX_LARGE:return 2.25;case E.XX_SMALL:case E.X_SMALL:case E.SMALL:default:return this.size=he.SIZE,.875}}get icon(){let e=Pr(this.type);return e==="active-presence-small-filled"&&(this.type=he.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 l`
|
370
356
|
<div class="mdc-presence mdc-presence__${this.size}">
|
371
357
|
<mdc-icon
|
372
358
|
class="mdc-presence-icon mdc-presence-icon__${this.currentIconType}"
|
@@ -376,7 +362,7 @@
|
|
376
362
|
@error="${this.handleOnError}"
|
377
363
|
></mdc-icon>
|
378
364
|
</div>
|
379
|
-
`}};
|
365
|
+
`}};te.styles=[...h.styles,...Ur],a([d({type:String,reflect:!0})],te.prototype,"type",2),a([d({type:String,reflect:!0})],te.prototype,"size",2),a([N()],te.prototype,"currentIconType",2);var kt=te;kt.register(Mr);var Xo=kt;var Hr=p`
|
380
366
|
:host::part(text) {
|
381
367
|
font-size: unset;
|
382
368
|
font-weight: unset;
|
@@ -619,14 +605,14 @@
|
|
619
605
|
text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);
|
620
606
|
text-transform: var(--mds-font-apps-body-small-regular-text-case);
|
621
607
|
}
|
622
|
-
`;var
|
608
|
+
`;var Zo=[p`
|
623
609
|
:host {
|
624
610
|
--mdc-text-font-family: var(--mdc-themeprovider-font-family);
|
625
611
|
|
626
612
|
display: block;
|
627
613
|
font-family: var(--mdc-text-font-family);
|
628
614
|
}
|
629
|
-
`,
|
615
|
+
`,Hr],Gr=Zo;var ue=class extends h{constructor(){super(...arguments);this.type=C.TYPE;this.tagname=C.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case S.H1:return l`<h1 part=${C.CSS_PART_TEXT}><slot></slot></h1>`;case S.H2:return l`<h2 part=${C.CSS_PART_TEXT}><slot></slot></h2>`;case S.H3:return l`<h3 part=${C.CSS_PART_TEXT}><slot></slot></h3>`;case S.H4:return l`<h4 part=${C.CSS_PART_TEXT}><slot></slot></h4>`;case S.H5:return l`<h5 part=${C.CSS_PART_TEXT}><slot></slot></h5>`;case S.H6:return l`<h6 part=${C.CSS_PART_TEXT}><slot></slot></h6>`;case S.DIV:return l`<div part=${C.CSS_PART_TEXT}><slot></slot></div>`;case S.SPAN:return l`<span part=${C.CSS_PART_TEXT}><slot></slot></span>`;case S.SMALL:return l`<small part=${C.CSS_PART_TEXT}><slot></slot></small>`;case S.P:default:return l`<p part=${C.CSS_PART_TEXT}><slot></slot></p>`}}};ue.styles=[...h.styles,...Gr],a([d({attribute:"type",reflect:!0,type:String})],ue.prototype,"type",2),a([d({attribute:"tagname",reflect:!0,type:String})],ue.prototype,"tagname",2);var wt=ue;wt.register(ze);var jo=wt;Lt.register(kr);var qo=Lt;var Vr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Br=o=>(...t)=>({_$litDirective$:o,values:t}),rt=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 ot=Br(class extends rt{constructor(o){var t;if(super(o),o.type!==Vr.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 U}});var Fr=f.constructTagName("badge"),P={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},it={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},st={PRIMARY:"primary",SECONDARY:"secondary"},Re={SUCCESS:"success",WARNING:"warning",ERROR:"error"},kd={...st,...Re},X={TYPE:P.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:st.PRIMARY,ICON_SIZE:1};var Wo=[x,p`
|
630
616
|
:host {
|
631
617
|
--mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
632
618
|
--mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);
|
@@ -695,21 +681,21 @@
|
|
695
681
|
outline: 0.125rem solid;
|
696
682
|
}
|
697
683
|
}
|
698
|
-
`],
|
684
|
+
`],Yr=Wo;var k=class extends h{constructor(){super(...arguments);this.variant=X.VARIANT;this.maxCounter=X.MAX_COUNTER;this.overlay=!1;this.ariaLabel=null}getCounterText(e,r){return r===void 0||typeof r!="number"||e===0?"":r>e?`${e}+`:e>X.MAX_COUNTER_LIMIT||r>X.MAX_COUNTER_LIMIT?`${X.MAX_COUNTER_LIMIT}+`:r.toString()}getBadgeIcon(e,r){return l`
|
699
685
|
<mdc-icon
|
700
|
-
class="mdc-badge-icon ${
|
701
|
-
name="${
|
702
|
-
size="${
|
686
|
+
class="mdc-badge-icon ${ot({"mdc-badge-overlay":this.overlay,[`mdc-badge-icon__${r}`]:!0})}"
|
687
|
+
name="${_(e)}"
|
688
|
+
size="${X.ICON_SIZE}"
|
703
689
|
></mdc-icon>
|
704
|
-
`}getBadgeDot(){return
|
690
|
+
`}getBadgeDot(){return l`<div class="mdc-badge-dot ${ot({"mdc-badge-overlay":this.overlay})}"></div>`}getBadgeCounterText(){return l`
|
705
691
|
<mdc-text
|
706
|
-
type="${
|
707
|
-
tagname="${
|
708
|
-
class="mdc-badge-text ${
|
692
|
+
type="${z.BODY_SMALL_MEDIUM}"
|
693
|
+
tagname="${S.DIV}"
|
694
|
+
class="mdc-badge-text ${ot({"mdc-badge-overlay":this.overlay})}"
|
709
695
|
>
|
710
696
|
${this.getCounterText(this.maxCounter,this.counter)}
|
711
697
|
</mdc-text>
|
712
|
-
`}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(st).includes(this.variant)&&(this.variant=X.VARIANT);let{iconName:e,type:r,variant:i}=this;switch(r){case P.ICON:return this.getBadgeIcon(e||"",i);case P.COUNTER:return this.getBadgeCounterText();case P.SUCCESS:return this.getBadgeIcon(it.SUCCESS_ICON_NAME,Re.SUCCESS);case P.WARNING:return this.getBadgeIcon(it.WARNING_ICON_NAME,Re.WARNING);case P.ERROR:return this.getBadgeIcon(it.ERROR_ICON_NAME,Re.ERROR);case P.DOT:default:return this.type=P.DOT,this.getBadgeDot()}}update(e){super.update(e),e.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};k.styles=[...h.styles,...Yr],a([d({type:String,reflect:!0})],k.prototype,"type",2),a([d({type:String,attribute:"icon-name"})],k.prototype,"iconName",2),a([d({type:String,reflect:!0})],k.prototype,"variant",2),a([d({type:Number})],k.prototype,"counter",2),a([d({type:Number,attribute:"max-counter",reflect:!0})],k.prototype,"maxCounter",2),a([d({type:Boolean})],k.prototype,"overlay",2),a([d({type:String,attribute:"aria-label"})],k.prototype,"ariaLabel",2);var Mt=k;Mt.register(Fr);var Ko=Mt;var Qo=p`
|
713
699
|
:host {
|
714
700
|
background-color: transparent;
|
715
701
|
border-radius: 1.25rem;
|
@@ -880,7 +866,7 @@
|
|
880
866
|
--mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);
|
881
867
|
--mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);
|
882
868
|
}
|
883
|
-
`,
|
869
|
+
`,Xr=[Qo];var ic=f.constructTagName("buttonsimple"),Jo={20:20,24:24,28:28,32:32,40:40,48:48,52:52,64:64,72:72,88:88,124:124},fe={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},nt={SIZE:Jo[32],TYPE:fe.BUTTON,ROLE:"button"};var Le=f.constructTagName("button"),ke={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary"},at={40:40,32:32,28:28,24:24},re={64:64,52:52,20:20,...at},Ot={POSITIVE:"positive",NEGATIVE:"negative",ACCENT:"accent",PROMOTIONAL:"promotional",DEFAULT:"default"},ge={PILL:"pill",ICON:"icon",PILL_WITH_ICON:"pill-with-icon"},M={VARIANT:ke.PRIMARY,SIZE:at[32],COLOR:Ot.DEFAULT,TYPE_INTERNAL:ge.ICON,TYPE:fe.BUTTON};var Zr=o=>{switch(o){case re[64]:return 2;case re[52]:return 1.75;case re[40]:return 1.25;default:return 1}},$t=o=>{let t=o.split("-"),e=["bold","filled","regular","light"];return t.filter(r=>!e.includes(r)).join("-")};var ei=[x,p`
|
884
870
|
:host {
|
885
871
|
border: 0.0625rem solid transparent;
|
886
872
|
cursor: pointer;
|
@@ -936,10 +922,10 @@
|
|
936
922
|
:host([size="20"]){
|
937
923
|
height: var(--mdc-button-height-size-20);
|
938
924
|
}
|
939
|
-
`,...
|
925
|
+
`,...w()],jr=ei;var be=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return a([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var qr=o=>{class t extends o{constructor(){super(...arguments);this.tabIndex=0}}return a([d({reflect:!0,type:Number})],t.prototype,"tabIndex",2),t};var O=class extends qr(be(h)){constructor(){super();this.active=!1;this.softDisabled=!1;this.size=nt.SIZE;this.role=nt.ROLE;this.type=nt.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===fe.SUBMIT&&this.internals.form&&this.internals.form.requestSubmit(),this.type===fe.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 l`
|
940
926
|
<slot></slot>
|
941
|
-
`}};O.formAssociated=!0,O.styles=[...h.styles,...
|
942
|
-
${this.prefixIcon?
|
927
|
+
`}};O.formAssociated=!0,O.styles=[...h.styles,...jr],a([d({type:Boolean})],O.prototype,"active",2),a([d({type:Boolean,attribute:"soft-disabled"})],O.prototype,"softDisabled",2),a([d({type:Number,reflect:!0})],O.prototype,"size",2),a([d({type:String,reflect:!0})],O.prototype,"role",2),a([d({reflect:!0})],O.prototype,"type",2);var we=O;var L=class extends we{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=`${$t(this.prefixIcon)}-filled`),this.postfixIcon&&(this.prevPostfixIcon=this.postfixIcon,this.postfixIcon=`${$t(this.postfixIcon)}-filled`)):(this.prevPrefixIcon&&(this.prefixIcon=this.prevPrefixIcon),this.prevPostfixIcon&&(this.postfixIcon=this.prevPostfixIcon))}setVariant(e){this.setAttribute("variant",Object.values(ke).includes(e)?e:M.VARIANT)}setSize(e){let i=this.typeInternal===ge.ICON?Object.values(re).includes(e)&&!(e===re[20]&&this.variant!==ke.TERTIARY):Object.values(at).includes(e);this.setAttribute("size",i?`${e}`:`${M.SIZE}`),this.iconSize=Zr(e)}setColor(e){!Object.values(Ot).includes(e)||this.variant===ke.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=ge.PILL_WITH_ICON,this.setAttribute("data-btn-type","pill-with-icon")):!e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=ge.ICON,this.setAttribute("data-btn-type","icon")):(this.typeInternal=ge.PILL,this.setAttribute("data-btn-type","pill"))}render(){return l`
|
928
|
+
${this.prefixIcon?l`
|
943
929
|
<mdc-icon
|
944
930
|
name="${this.prefixIcon}"
|
945
931
|
part="prefix-icon"
|
@@ -947,14 +933,14 @@
|
|
947
933
|
length-unit="rem">
|
948
934
|
</mdc-icon>`:""}
|
949
935
|
<slot @slotchange=${this.inferButtonType}></slot>
|
950
|
-
${this.postfixIcon?
|
936
|
+
${this.postfixIcon?l`
|
951
937
|
<mdc-icon
|
952
938
|
name="${this.postfixIcon}"
|
953
939
|
part="postfix-icon"
|
954
940
|
size=${this.iconSize}
|
955
941
|
length-unit="rem">
|
956
942
|
</mdc-icon>`:""}
|
957
|
-
`}};
|
943
|
+
`}};L.styles=[...we.styles,...Xr],a([d({type:String,attribute:"prefix-icon",reflect:!0})],L.prototype,"prefixIcon",2),a([d({type:String,attribute:"postfix-icon",reflect:!0})],L.prototype,"postfixIcon",2),a([d({type:String})],L.prototype,"variant",2),a([d({type:Number})],L.prototype,"size",2),a([d({type:String})],L.prototype,"color",2),a([d({type:String,reflect:!0})],L.prototype,"role",2),a([N()],L.prototype,"typeInternal",2),a([N()],L.prototype,"iconSize",2);var Dt=L;Dt.register(Le);var ti=Dt;var ri=p`
|
958
944
|
:host {
|
959
945
|
--mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);
|
960
946
|
--mdc-bullet-size-small: 0.25rem;
|
@@ -975,7 +961,7 @@
|
|
975
961
|
:host([size="large"]) {
|
976
962
|
height: var(--mdc-bullet-size-large);
|
977
963
|
}
|
978
|
-
`,
|
964
|
+
`,Wr=[ri];var Kr=f.constructTagName("bullet"),Qr={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var Me=class extends h{constructor(){super(...arguments);this.size=Qr.SMALL}};Me.styles=[...h.styles,...Wr],a([d({type:String,reflect:!0})],Me.prototype,"size",2);var Ut=Me;Ut.register(Kr);var oi=Ut;var ii=p`
|
979
965
|
:host {
|
980
966
|
--mdc-marker-width: 0.25rem;
|
981
967
|
--mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);
|
@@ -1000,7 +986,7 @@
|
|
1000
986
|
var(--mdc-marker-striped-background-color) 0.375rem
|
1001
987
|
);
|
1002
988
|
}
|
1003
|
-
`,
|
989
|
+
`,Jr=[ii];var eo=f.constructTagName("marker"),to={SOLID:"solid",STRIPED:"striped"};var Oe=class extends h{constructor(){super(...arguments);this.variant=to.SOLID}};Oe.styles=[...h.styles,...Jr],a([d({type:String,reflect:!0})],Oe.prototype,"variant",2);var Pt=Oe;Pt.register(eo);var si=Pt;var ni=[x,p`
|
1004
990
|
:host {
|
1005
991
|
--mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);
|
1006
992
|
--mdc-divider-width: 0.0625rem;
|
@@ -1144,29 +1130,29 @@
|
|
1144
1130
|
font-size: var(--mdc-divider-text-size);
|
1145
1131
|
line-height: var(--mdc-divider-text-line-height);
|
1146
1132
|
}
|
1147
|
-
`],
|
1133
|
+
`],ro=ni;var oo=f.constructTagName("divider"),$e={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Ht={SOLID:"solid",GRADIENT:"gradient"},Z={POSITIVE:"positive",NEGATIVE:"negative"},De={UP:"arrow-up-regular",DOWN:"arrow-down-regular",LEFT:"arrow-left-regular",RIGHT:"arrow-right-regular"},oe={ORIENTATION:$e.HORIZONTAL,VARIANT:Ht.SOLID,ARROW_DIRECTION:Z.NEGATIVE,BUTTON_DIRECTION:Z.NEGATIVE};var j=class extends h{constructor(){super();this.orientation=oe.ORIENTATION;this.variant=oe.VARIANT;this.arrowDirection=oe.ARROW_DIRECTION;this.buttonPosition=oe.BUTTON_DIRECTION;this.setAttribute("data-type","mdc-primary-divider")}setVariant(e){this.setAttribute("variant",Object.values(Ht).includes(e)?e:oe.VARIANT)}setOrientation(e){this.setAttribute("orientation",Object.values($e).includes(e)?e:oe.ORIENTATION)}ensureValidDirections(){let e=this.orientation===$e.HORIZONTAL?Z.NEGATIVE:Z.POSITIVE;Object.values(Z).includes(this.buttonPosition)||(this.buttonPosition=e),Object.values(Z).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===$e.HORIZONTAL,r=this.arrowDirection===Z.POSITIVE;return e?r?De.UP:De.DOWN:r?De.RIGHT:De.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===ze.toUpperCase()),n=r.some(c=>c.tagName===Le.toUpperCase());i&&!n?this.setAttribute("data-type","mdc-text-divider"):!i&&n&&(this.setAttribute("data-type","mdc-grabber-divider"),this.setGrabberButton())}render(){return l`
|
1148
1134
|
<div></div>
|
1149
1135
|
<slot @slotchange=${this.inferDividerType}></slot>
|
1150
1136
|
<div></div>
|
1151
|
-
`}};
|
1137
|
+
`}};j.styles=[...h.styles,...ro],a([d({type:String,reflect:!0})],j.prototype,"orientation",2),a([d({type:String,reflect:!0})],j.prototype,"variant",2),a([d({type:String,attribute:"arrow-direction",reflect:!0})],j.prototype,"arrowDirection",2),a([d({type:String,attribute:"button-position",reflect:!0})],j.prototype,"buttonPosition",2);var Gt=j;Gt.register(oo);var ai=Gt;var di=[x,p`
|
1152
1138
|
:host {
|
1153
1139
|
padding: unset;
|
1154
1140
|
margin: unset;
|
1155
1141
|
outline: none;
|
1156
1142
|
border-radius: 0.25rem;
|
1157
1143
|
}
|
1158
|
-
`,...
|
1144
|
+
`,...w()],io=di;var Ue=class extends tt(we){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(g).includes(e)?`${e}`:pe.SIZE.toString())}render(){return l`
|
1159
1145
|
<mdc-avatar
|
1160
1146
|
slot="prefixIcon"
|
1161
1147
|
?is-typing="${this.isTyping}"
|
1162
|
-
counter="${
|
1163
|
-
icon-name="${
|
1164
|
-
initials="${
|
1165
|
-
presence="${
|
1166
|
-
size="${
|
1167
|
-
src="${
|
1148
|
+
counter="${_(this.counter)}"
|
1149
|
+
icon-name="${_(this.iconName)}"
|
1150
|
+
initials="${_(this.initials)}"
|
1151
|
+
presence="${_(this.presence)}"
|
1152
|
+
size="${_(this.size)}"
|
1153
|
+
src="${_(this.src)}"
|
1168
1154
|
></mdc-avatar>
|
1169
|
-
`}};
|
1155
|
+
`}};Ue.styles=[...io],a([d({type:String,attribute:"aria-label"})],Ue.prototype,"ariaLabel",2);var Vt=Ue;var so=f.constructTagName("avatarbutton");Vt.register(so);var ci=Vt;var no=f.constructTagName("link"),dt={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},ct={LARGE:1,MIDSIZE:.875,SMALL:.75},lt={INLINE:!1,INVERTED:!1,LINK_SIZE:dt.LARGE};var li=[x,p`
|
1170
1156
|
|
1171
1157
|
:host {
|
1172
1158
|
|
@@ -1277,11 +1263,199 @@
|
|
1277
1263
|
:host([inverted][disabled]) {
|
1278
1264
|
color: var(--mdc-link-inverted-color-disabled);
|
1279
1265
|
}
|
1280
|
-
`,...
|
1266
|
+
`,...w(),p`
|
1281
1267
|
:host(:active) {
|
1282
1268
|
box-shadow: none;
|
1283
1269
|
}
|
1284
|
-
`],
|
1270
|
+
`],ao=li;var q=class extends be(h){constructor(){super(...arguments);this.inline=lt.INLINE;this.inverted=lt.INVERTED;this.size=lt.LINK_SIZE;this.prevTabindex=null}getIconSize(){switch(this.size){case dt.SMALL:return ct.SMALL;case dt.MIDSIZE:return ct.MIDSIZE;default:return ct.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 l`<slot @slotchange=${this.updateTrailingIcon}></slot>`}};q.styles=[...h.styles,...ao],a([d({type:String,attribute:"icon-name"})],q.prototype,"iconName",2),a([d({type:Boolean,reflect:!0})],q.prototype,"inline",2),a([d({type:Boolean,reflect:!0})],q.prototype,"inverted",2),a([d({type:String,reflect:!0})],q.prototype,"size",2);var Bt=q;Bt.register(no);var mi=Bt;var co=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 lo=o=>{class t extends o{constructor(){super(...arguments);this.name=""}}return a([d({reflect:!0,type:String})],t.prototype,"name",2),t};var mo=o=>{class t extends o{constructor(){super(...arguments);this.value=""}}return a([d({reflect:!0,type:String})],t.prototype,"value",2),t};var T=[];for(let o=0;o<256;++o)T.push((o+256).toString(16).slice(1));function po(o,t=0){return(T[o[t+0]]+T[o[t+1]]+T[o[t+2]]+T[o[t+3]]+"-"+T[o[t+4]]+T[o[t+5]]+"-"+T[o[t+6]]+T[o[t+7]]+"-"+T[o[t+8]]+T[o[t+9]]+"-"+T[o[t+10]]+T[o[t+11]]+T[o[t+12]]+T[o[t+13]]+T[o[t+14]]+T[o[t+15]]).toLowerCase()}var Ft,pi=new Uint8Array(16);function Yt(){if(!Ft){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ft=crypto.getRandomValues.bind(crypto)}return Ft(pi)}var hi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xt={randomUUID:hi};function ui(o,t,e){var i,n,s;if(Xt.randomUUID&&!t&&!o)return Xt.randomUUID();o=o||{};let r=(s=(n=o.random)!=null?n:(i=o.rng)==null?void 0:i.call(o))!=null?s:Yt();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 po(r)}var Zt=ui;var fi=[x,p`
|
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`
|
1330
|
+
:host {
|
1331
|
+
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
1332
|
+
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
1333
|
+
--mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);
|
1334
|
+
--mdc-checkbox-checked-background-color: var(--mds-color-theme-control-active-normal);
|
1335
|
+
--mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);
|
1336
|
+
--mdc-checkbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);
|
1337
|
+
--mdc-checkbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
1338
|
+
--mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
|
1339
|
+
--mdc-checkbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);
|
1340
|
+
--mdc-checkbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);
|
1341
|
+
--mdc-checkbox-icon-border-color: var(--mds-color-theme-outline-input-normal);
|
1342
|
+
--mdc-checkbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);
|
1343
|
+
--mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);
|
1344
|
+
|
1345
|
+
flex-direction: row;
|
1346
|
+
align-items: flex-start;
|
1347
|
+
}
|
1348
|
+
.mdc-label, .input {
|
1349
|
+
cursor: pointer;
|
1350
|
+
}
|
1351
|
+
:host([checked]) .icon-container,
|
1352
|
+
:host([indeterminate]) .icon-container {
|
1353
|
+
background: var(--mdc-checkbox-checked-background-color);
|
1354
|
+
border: unset;
|
1355
|
+
}
|
1356
|
+
:host([checked]) .container:hover .icon-container,
|
1357
|
+
:host([indeterminate]) .container:hover .icon-container {
|
1358
|
+
background: var(--mdc-checkbox-checked-background-color-hover);
|
1359
|
+
}
|
1360
|
+
:host([checked]) .container:active .icon-container,
|
1361
|
+
:host([indeterminate]) .container:active .icon-container {
|
1362
|
+
background: var(--mdc-checkbox-checked-pressed-icon-color);
|
1363
|
+
}
|
1364
|
+
:host([disabled]) .mdc-label,
|
1365
|
+
:host([disabled]) .input {
|
1366
|
+
cursor: default;
|
1367
|
+
}
|
1368
|
+
:host([disabled]) .container:hover {
|
1369
|
+
background: unset;
|
1370
|
+
}
|
1371
|
+
:host([disabled]) .icon-container {
|
1372
|
+
border-color: var(--mdc-checkbox-disabled-border-color);
|
1373
|
+
background: var(--mdc-checkbox-disabled-background-color);
|
1374
|
+
}
|
1375
|
+
:host([disabled]) .icon {
|
1376
|
+
--mdc-icon-fill-color: var(--mdc-checkbox-disabled-icon-color);
|
1377
|
+
}
|
1378
|
+
:host([disabled][checked]) .icon-container,
|
1379
|
+
:host([disabled][indeterminate]) .icon-container {
|
1380
|
+
background: var(--mdc-checkbox-disabled-checked-icon-color);
|
1381
|
+
border: 0.0625rem solid var(--mdc-checkbox-disabled-border-color);
|
1382
|
+
}
|
1383
|
+
.input {
|
1384
|
+
margin: 0;
|
1385
|
+
padding: 0;
|
1386
|
+
position: absolute;
|
1387
|
+
opacity: 0.1%;
|
1388
|
+
overflow: visible;
|
1389
|
+
z-index: 1;
|
1390
|
+
}
|
1391
|
+
.icon-container {
|
1392
|
+
display: flex;
|
1393
|
+
align-items: center;
|
1394
|
+
border: 0.0625rem solid var(--mdc-checkbox-icon-border-color);
|
1395
|
+
background: var(--mdc-checkbox-icon-background-color);
|
1396
|
+
}
|
1397
|
+
.container:hover {
|
1398
|
+
background: var(--mdc-checkbox-background-color-hover);
|
1399
|
+
}
|
1400
|
+
.container:active {
|
1401
|
+
background: var(--mdc-checkbox-pressed-icon-color);
|
1402
|
+
}
|
1403
|
+
.input, .icon-container {
|
1404
|
+
width: 1rem;
|
1405
|
+
height: 1rem;
|
1406
|
+
}
|
1407
|
+
.input,
|
1408
|
+
.icon-container,
|
1409
|
+
.container {
|
1410
|
+
border-radius: 0.125rem;
|
1411
|
+
}
|
1412
|
+
.icon {
|
1413
|
+
--mdc-icon-fill-color: var(--mdc-checkbox-icon-color);
|
1414
|
+
}
|
1415
|
+
.container {
|
1416
|
+
margin: 0.125rem 0;
|
1417
|
+
}
|
1418
|
+
.text-container {
|
1419
|
+
display: flex;
|
1420
|
+
flex-direction: column;
|
1421
|
+
gap: 0.25rem;
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
/* High Contrast Mode */
|
1425
|
+
@media (forced-colors: active) {
|
1426
|
+
:host([checked]) .icon-container,
|
1427
|
+
:host([indeterminate]) .icon-container {
|
1428
|
+
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
1429
|
+
}
|
1430
|
+
}
|
1431
|
+
`,...w(!0)],go=gi;var se=class extends lo(mo(co(Wt))){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?l`
|
1432
|
+
<mdc-icon
|
1433
|
+
class="icon"
|
1434
|
+
name="${this.indeterminate?Kt.INDETERMINATE:Kt.CHECKED}"
|
1435
|
+
size="1"
|
1436
|
+
length-unit="rem"
|
1437
|
+
></mdc-icon>
|
1438
|
+
`:u,r=this.helpText?this.renderHelperText():u;return l`
|
1439
|
+
<div class="container mdc-focus-ring">
|
1440
|
+
<input
|
1441
|
+
id="${this.id}"
|
1442
|
+
type="checkbox"
|
1443
|
+
class="input"
|
1444
|
+
name="${_(this.name)}"
|
1445
|
+
value="${_(this.value)}"
|
1446
|
+
.checked="${this.checked}"
|
1447
|
+
.indeterminate="${this.indeterminate}"
|
1448
|
+
.disabled="${this.disabled}"
|
1449
|
+
aria-label="${(i=this.dataAriaLabel)!=null?i:""}"
|
1450
|
+
@change=${this.handleChange}
|
1451
|
+
/>
|
1452
|
+
<div class="icon-container">${e}</div>
|
1453
|
+
</div>
|
1454
|
+
<div class="text-container">
|
1455
|
+
${this.renderLabel()}
|
1456
|
+
${r}
|
1457
|
+
</div>
|
1458
|
+
`}};se.formAssociated=!0,se.styles=[...Wt.styles,...go],a([d({type:Boolean,reflect:!0})],se.prototype,"checked",2),a([d({type:Boolean,reflect:!0})],se.prototype,"indeterminate",2);var Qt=se;Qt.register(fo);var bi=Qt;})();
|
1285
1459
|
/*! Bundled license information:
|
1286
1460
|
|
1287
1461
|
@lit/reactive-element/decorators/custom-element.js:
|