@momentum-ui/web-components 3.0.0-beta.11 → 3.0.0-beta.12

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/1200.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1200],{61200:(t,e,i)=>{i(96798);var o,n=i(31890),s=i(4313),r=i(32022),c=i.n(r),a=i(60554),h=i.n(a),l=i(87161),p=i(70429),d=i(85125),u=i(20291),m=i(10318),g=i(57955),v=i(24480),y=i(81786),S=i(9223),b=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){var e;let i=e=class extends l.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,n=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const o="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,S.Jp)(this.computedSvgPath,t,"svg"):yield(0,S.D6)(t);o&&(this.svgIcon=o,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes())},new((o=void 0)||(o=Promise))(function(t,s){function r(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(r,c)}a((n=n.apply(e,i||[])).next())});var e,i,o,n}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:y.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:h()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":c().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[s.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return l.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1200],{61200:(t,e,i)=>{i(96798);var o,n=i(31890),s=i(4313),r=i(32022),c=i.n(r),a=i(60554),l=i.n(a),h=i(87161),d=i(70429),p=i(85125),u=i(20291),m=i(10318),g=i(57955),v=i(24480),y=i(81786),S=i(9223),b=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var c=t.length-1;c>=0;c--)(n=t[c])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`);break;case"name-changed":console.warn(`[@momentum-ui/web-component] Icon: The name changed to '${e[0]}' before the SVG icon '${e[1]}' finished loading; skipping outdated result.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,n=function*(){var e,i,o,n;if(this.isSvgAlreadyLoaded(t))return;const s=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"),r="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,S.Jp)(this.computedSvgPath,t,"svg"):yield(0,S.D6)(t);if(!r)return;const c=null===(i=this.svgIcon)||void 0===i?void 0:i.getAttribute("class");s===c?(this.svgIcon=r,null===(o=this.svgIcon)||void 0===o||o.setAttribute("class",`icon ${t}`),null===(n=this.svgIcon)||void 0===n||n.setAttribute("part","icon"),this.setSvgIconAttributes()):this.consoleHandler("name-changed",[null!=c?c:"",t])},new((o=void 0)||(o=Promise))(function(t,s){function r(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(r,c)}a((n=n.apply(e,i||[])).next())});var e,i,o,n}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:y.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:l()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":c().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[s.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return h.html`
2
2
  <i
3
3
  part="icon"
4
4
  id=${this.id}
5
- class="md-icon icon ${(0,d.classMap)(this.iconClassMap)}"
5
+ class="md-icon icon ${(0,p.classMap)(this.iconClassMap)}"
6
6
  style=${(0,m.styleMap)(this.iconStyleMap)}
7
7
  role="img"
8
8
  aria-label=${this.ariaLabel}
@@ -11,7 +11,7 @@
11
11
  @click=${t=>this.handleIconClick(t)}
12
12
  >
13
13
  </i>
14
- `}renderSVGIcon(){var t;return l.html`
14
+ `}renderSVGIcon(){var t;return h.html`
15
15
  <div
16
16
  class="svg-icon-container"
17
17
  id=${this.id}
@@ -21,6 +21,6 @@
21
21
  aria-hidden=${(0,u.ifDefined)(null!==(t=this.ariaHidden)&&void 0!==t?t:void 0)}
22
22
  @click=${t=>this.handleIconClick(t)}
23
23
  >
24
- ${this.svgIcon?this.svgIcon:l.nothing}
24
+ ${this.svgIcon?this.svgIcon:h.nothing}
25
25
  </div>
26
- `}};i.designLookup=new Map(Object.entries(g)),b([(0,p.property)({type:String})],i.prototype,"color",void 0),b([(0,p.property)({type:String})],i.prototype,"description",void 0),b([(0,p.property)({type:String})],i.prototype,"name",void 0),b([(0,p.property)({type:String})],i.prototype,"id",void 0),b([(0,p.property)({type:String})],i.prototype,"size",void 0),b([(0,p.property)({type:String})],i.prototype,"title",void 0),b([(0,p.property)({type:String})],i.prototype,"ariaHidden",void 0),b([(0,p.property)({type:String})],i.prototype,"type",void 0),b([(0,p.property)({type:Boolean})],i.prototype,"isActive",void 0),b([(0,p.property)({type:Boolean})],i.prototype,"isComboBoxIcon",void 0),b([(0,p.property)({type:Boolean})],i.prototype,"sizeOverrided",void 0),b([(0,p.property)({type:String})],i.prototype,"iconSet",void 0),b([(0,p.property)({type:String,attribute:"svg-url"})],i.prototype,"svgUrl",void 0),b([(0,p.state)()],i.prototype,"svgIcon",void 0),b([(0,p.property)({type:String})],i.prototype,"ariaLabel",null),i=e=b([(0,n.w)("md-icon")],i),t.ELEMENT=i}(o||(o={}))}}]);
26
+ `}};i.designLookup=new Map(Object.entries(g)),b([(0,d.property)({type:String})],i.prototype,"color",void 0),b([(0,d.property)({type:String})],i.prototype,"description",void 0),b([(0,d.property)({type:String})],i.prototype,"name",void 0),b([(0,d.property)({type:String})],i.prototype,"id",void 0),b([(0,d.property)({type:String})],i.prototype,"size",void 0),b([(0,d.property)({type:String})],i.prototype,"title",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaHidden",void 0),b([(0,d.property)({type:String})],i.prototype,"type",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"isActive",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"isComboBoxIcon",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"sizeOverrided",void 0),b([(0,d.property)({type:String})],i.prototype,"iconSet",void 0),b([(0,d.property)({type:String,attribute:"svg-url"})],i.prototype,"svgUrl",void 0),b([(0,d.state)()],i.prototype,"svgIcon",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaLabel",null),i=e=b([(0,n.w)("md-icon")],i),t.ELEMENT=i}(o||(o={}))}}]);
@@ -1,13 +1,13 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,s,n,r,c)=>(()=>{"use strict";var a,l={10318:t=>{t.exports=o},20291:t=>{t.exports=s},32022:t=>{t.exports=n},60554:t=>{t.exports=r},61200:(t,e,i)=>{i.r(e),i.d(e,{Icon:()=>j,iconSet:()=>I,iconSize:()=>b,iconType:()=>S}),i(96798);var o=i(31890),s=i(4313),n=i(32022),r=i.n(n),c=i(60554),a=i.n(c),l=i(87161),m=i(70429),u=i(85125),d=i(20291),p=i(10318),h=i(57955),v=i(24480),g=i(81786),y=i(9223),f=function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const b=["14","16","18","20","28","36","56",14,16,18,20,28,36,56],S=["","white"],I=["momentumUI","preferMomentumDesign","momentumDesign","momentumBrandVisuals","svg"];var j;!function(t){var e;let i=e=class extends l.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const o="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,y.Jp)(this.computedSvgPath,t,"svg"):yield(0,y.D6)(t);o&&(this.svgIcon=o,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes())},new((o=void 0)||(o=Promise))(function(t,n){function r(t){try{a(s.next(t))}catch(t){n(t)}}function c(t){try{a(s.throw(t))}catch(t){n(t)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(r,c)}a((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:g.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:a()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":r().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[s.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return l.html`
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,s,n,r,c)=>(()=>{"use strict";var a,l={10318:t=>{t.exports=o},20291:t=>{t.exports=s},32022:t=>{t.exports=n},60554:t=>{t.exports=r},61200:(t,e,i)=>{i.r(e),i.d(e,{Icon:()=>j,iconSet:()=>I,iconSize:()=>b,iconType:()=>S}),i(96798);var o=i(31890),s=i(4313),n=i(32022),r=i.n(n),c=i(60554),a=i.n(c),l=i(87161),u=i(70429),d=i(85125),m=i(20291),p=i(10318),h=i(57955),v=i(24480),g=i(81786),y=i(9223),f=function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const b=["14","16","18","20","28","36","56",14,16,18,20,28,36,56],S=["","white"],I=["momentumUI","preferMomentumDesign","momentumDesign","momentumBrandVisuals","svg"];var j;!function(t){var e;let i=e=class extends l.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`);break;case"name-changed":console.warn(`[@momentum-ui/web-component] Icon: The name changed to '${e[0]}' before the SVG icon '${e[1]}' finished loading; skipping outdated result.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i,o,s;if(this.isSvgAlreadyLoaded(t))return;const n=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"),r="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,y.Jp)(this.computedSvgPath,t,"svg"):yield(0,y.D6)(t);if(!r)return;const c=null===(i=this.svgIcon)||void 0===i?void 0:i.getAttribute("class");n===c?(this.svgIcon=r,null===(o=this.svgIcon)||void 0===o||o.setAttribute("class",`icon ${t}`),null===(s=this.svgIcon)||void 0===s||s.setAttribute("part","icon"),this.setSvgIconAttributes()):this.consoleHandler("name-changed",[null!=c?c:"",t])},new((o=void 0)||(o=Promise))(function(t,n){function r(t){try{a(s.next(t))}catch(t){n(t)}}function c(t){try{a(s.throw(t))}catch(t){n(t)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(r,c)}a((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:g.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:a()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":r().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[s.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return l.html`
2
2
  <i
3
3
  part="icon"
4
4
  id=${this.id}
5
- class="md-icon icon ${(0,u.classMap)(this.iconClassMap)}"
5
+ class="md-icon icon ${(0,d.classMap)(this.iconClassMap)}"
6
6
  style=${(0,p.styleMap)(this.iconStyleMap)}
7
7
  role="img"
8
8
  aria-label=${this.ariaLabel}
9
9
  title=${this.title}
10
- aria-hidden=${(0,d.ifDefined)(null!==(t=this.ariaHidden)&&void 0!==t?t:void 0)}
10
+ aria-hidden=${(0,m.ifDefined)(null!==(t=this.ariaHidden)&&void 0!==t?t:void 0)}
11
11
  @click=${t=>this.handleIconClick(t)}
12
12
  >
13
13
  </i>
@@ -18,9 +18,9 @@
18
18
  role="img"
19
19
  aria-label=${this.ariaLabel}
20
20
  title=${this.title}
21
- aria-hidden=${(0,d.ifDefined)(null!==(t=this.ariaHidden)&&void 0!==t?t:void 0)}
21
+ aria-hidden=${(0,m.ifDefined)(null!==(t=this.ariaHidden)&&void 0!==t?t:void 0)}
22
22
  @click=${t=>this.handleIconClick(t)}
23
23
  >
24
24
  ${this.svgIcon?this.svgIcon:l.nothing}
25
25
  </div>
26
- `}};i.designLookup=new Map(Object.entries(h)),f([(0,m.property)({type:String})],i.prototype,"color",void 0),f([(0,m.property)({type:String})],i.prototype,"description",void 0),f([(0,m.property)({type:String})],i.prototype,"name",void 0),f([(0,m.property)({type:String})],i.prototype,"id",void 0),f([(0,m.property)({type:String})],i.prototype,"size",void 0),f([(0,m.property)({type:String})],i.prototype,"title",void 0),f([(0,m.property)({type:String})],i.prototype,"ariaHidden",void 0),f([(0,m.property)({type:String})],i.prototype,"type",void 0),f([(0,m.property)({type:Boolean})],i.prototype,"isActive",void 0),f([(0,m.property)({type:Boolean})],i.prototype,"isComboBoxIcon",void 0),f([(0,m.property)({type:Boolean})],i.prototype,"sizeOverrided",void 0),f([(0,m.property)({type:String})],i.prototype,"iconSet",void 0),f([(0,m.property)({type:String,attribute:"svg-url"})],i.prototype,"svgUrl",void 0),f([(0,m.state)()],i.prototype,"svgIcon",void 0),f([(0,m.property)({type:String})],i.prototype,"ariaLabel",null),i=e=f([(0,o.w)("md-icon")],i),t.ELEMENT=i}(j||(j={}))},70429:t=>{t.exports=e},85125:t=>{t.exports=i},85314:t=>{t.exports=c},87161:e=>{e.exports=t}},m={};function u(t){var e=m[t];if(void 0!==e)return e.exports;var i=m[t]={exports:{}};return l[t](i,i.exports,u),i.exports}u.m=l,a=[],u.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<a.length;l++){for(var[e,i,o]=a[l],n=!0,r=0;r<e.length;r++)(!1&o||s>=o)&&Object.keys(u.O).every(t=>u.O[t](e[r]))?e.splice(r--,1):(n=!1,o<s&&(s=o));if(n){a.splice(l--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var l=a.length;l>0&&a[l-1][2]>o;l--)a[l]=a[l-1];a[l]=[e,i,o]},u.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return u.d(e,{a:e}),e},u.d=(t,e)=>{for(var i in e)u.o(e,i)&&!u.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},u.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),u.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={1200:0,7927:0};u.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[n,r,c]=i,a=0;if(n.some(e=>0!==t[e])){for(o in r)u.o(r,o)&&(u.m[o]=r[o]);if(c)var l=c(u)}for(e&&e(i);a<n.length;a++)s=n[a],u.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return u.O(l)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var d=u.O(void 0,[750,1890,4313,510,5087,6283,2176,6798,6865,2576],()=>u(61200));return u.O(d)})());
26
+ `}};i.designLookup=new Map(Object.entries(h)),f([(0,u.property)({type:String})],i.prototype,"color",void 0),f([(0,u.property)({type:String})],i.prototype,"description",void 0),f([(0,u.property)({type:String})],i.prototype,"name",void 0),f([(0,u.property)({type:String})],i.prototype,"id",void 0),f([(0,u.property)({type:String})],i.prototype,"size",void 0),f([(0,u.property)({type:String})],i.prototype,"title",void 0),f([(0,u.property)({type:String})],i.prototype,"ariaHidden",void 0),f([(0,u.property)({type:String})],i.prototype,"type",void 0),f([(0,u.property)({type:Boolean})],i.prototype,"isActive",void 0),f([(0,u.property)({type:Boolean})],i.prototype,"isComboBoxIcon",void 0),f([(0,u.property)({type:Boolean})],i.prototype,"sizeOverrided",void 0),f([(0,u.property)({type:String})],i.prototype,"iconSet",void 0),f([(0,u.property)({type:String,attribute:"svg-url"})],i.prototype,"svgUrl",void 0),f([(0,u.state)()],i.prototype,"svgIcon",void 0),f([(0,u.property)({type:String})],i.prototype,"ariaLabel",null),i=e=f([(0,o.w)("md-icon")],i),t.ELEMENT=i}(j||(j={}))},70429:t=>{t.exports=e},85125:t=>{t.exports=i},85314:t=>{t.exports=c},87161:e=>{e.exports=t}},u={};function d(t){var e=u[t];if(void 0!==e)return e.exports;var i=u[t]={exports:{}};return l[t](i,i.exports,d),i.exports}d.m=l,a=[],d.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<a.length;l++){for(var[e,i,o]=a[l],n=!0,r=0;r<e.length;r++)(!1&o||s>=o)&&Object.keys(d.O).every(t=>d.O[t](e[r]))?e.splice(r--,1):(n=!1,o<s&&(s=o));if(n){a.splice(l--,1);var c=i();void 0!==c&&(t=c)}}return t}o=o||0;for(var l=a.length;l>0&&a[l-1][2]>o;l--)a[l]=a[l-1];a[l]=[e,i,o]},d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},d.d=(t,e)=>{for(var i in e)d.o(e,i)&&!d.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),d.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={1200:0,7927:0};d.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[n,r,c]=i,a=0;if(n.some(e=>0!==t[e])){for(o in r)d.o(r,o)&&(d.m[o]=r[o]);if(c)var l=c(d)}for(e&&e(i);a<n.length;a++)s=n[a],d.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return d.O(l)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var m=d.O(void 0,[750,1890,4313,510,5087,6283,2176,6798,6865,2576],()=>d(61200));return d.O(m)})());
@@ -1735,7 +1735,7 @@
1735
1735
  <slot name="custom-right-content" part="chip-right"> </slot>
1736
1736
  </span>
1737
1737
  </md-tooltip>
1738
- `}};p([(0,l.property)({type:String})],e.prototype,"color",void 0),p([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,l.property)({type:String})],e.prototype,"textColor",void 0),p([(0,l.property)({type:String})],e.prototype,"height",void 0),p([(0,l.property)({type:String})],e.prototype,"icon",void 0),p([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),p([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),p([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),p([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),p([(0,l.state)()],e.prototype,"renderedText",void 0),e=p([(0,r.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},60554:t=>{t.exports=a},61200:(t,e,i)=>{i.d(e,{Icon:()=>o}),i(96798);var o,s=i(31890),r=i(4313),a=i(32022),n=i.n(a),l=i(60554),d=i.n(l),h=i(87161),c=i(70429),p=i(85125),u=i(20291),m=i(10318),y=i(57955),v=i(24480),b=i(81786),g=i(9223),f=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const o="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);o&&(this.svgIcon=o,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes())},new((o=void 0)||(o=Promise))(function(t,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:b.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:d()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":n().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[r.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return h.html`
1738
+ `}};p([(0,l.property)({type:String})],e.prototype,"color",void 0),p([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,l.property)({type:String})],e.prototype,"textColor",void 0),p([(0,l.property)({type:String})],e.prototype,"height",void 0),p([(0,l.property)({type:String})],e.prototype,"icon",void 0),p([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),p([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),p([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),p([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),p([(0,l.state)()],e.prototype,"renderedText",void 0),e=p([(0,r.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},60554:t=>{t.exports=a},61200:(t,e,i)=>{i.d(e,{Icon:()=>o}),i(96798);var o,s=i(31890),r=i(4313),a=i(32022),n=i.n(a),l=i(60554),d=i.n(l),h=i(87161),c=i(70429),p=i(85125),u=i(20291),m=i(10318),y=i(57955),v=i(24480),b=i(81786),g=i(9223),f=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`);break;case"name-changed":console.warn(`[@momentum-ui/web-component] Icon: The name changed to '${e[0]}' before the SVG icon '${e[1]}' finished loading; skipping outdated result.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i,o,s;if(this.isSvgAlreadyLoaded(t))return;const r=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"),a="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);if(!a)return;const n=null===(i=this.svgIcon)||void 0===i?void 0:i.getAttribute("class");r===n?(this.svgIcon=a,null===(o=this.svgIcon)||void 0===o||o.setAttribute("class",`icon ${t}`),null===(s=this.svgIcon)||void 0===s||s.setAttribute("part","icon"),this.setSvgIconAttributes()):this.consoleHandler("name-changed",[null!=n?n:"",t])},new((o=void 0)||(o=Promise))(function(t,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:b.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:d()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":n().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[r.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return h.html`
1739
1739
  <i
1740
1740
  part="icon"
1741
1741
  id=${this.id}
@@ -75,7 +75,7 @@ export declare namespace Avatar {
75
75
  private get chatIconSize();
76
76
  private get presenceSize();
77
77
  private get iconSize();
78
- get renderIsTyping(): typeof nothing | import("lit").TemplateResult<1>;
78
+ get renderIsTyping(): import("lit").TemplateResult<1> | typeof nothing;
79
79
  private get avatarLetter();
80
80
  private get avatarIcon();
81
81
  private get avatarImage();
@@ -85,8 +85,8 @@ export declare namespace Avatar {
85
85
  handleKeyDown(event: KeyboardEvent): void;
86
86
  handleClick(event: MouseEvent): void;
87
87
  private getBrandOrDesignIconSet;
88
- get avatarContent(): typeof nothing | import("lit").TemplateResult<1>;
89
- renderPresence(): typeof nothing | import("lit").TemplateResult<1>;
88
+ get avatarContent(): import("lit").TemplateResult<1> | typeof nothing;
89
+ renderPresence(): import("lit").TemplateResult<1> | typeof nothing;
90
90
  private renderAvatarContent;
91
91
  render(): import("lit").TemplateResult<1>;
92
92
  }
@@ -31,7 +31,7 @@ export declare namespace Badge {
31
31
  renderTextColor: () => string | typeof nothing;
32
32
  renderHeight: () => string | typeof nothing;
33
33
  renderWidth: () => string | typeof nothing;
34
- getStyles: () => typeof nothing | import("lit").TemplateResult<1>;
34
+ getStyles: () => import("lit").TemplateResult<1> | typeof nothing;
35
35
  static get styles(): import("lit").CSSResult[];
36
36
  private get computedAriaHiddenSplits();
37
37
  private get computedTabIndex();
@@ -129,10 +129,10 @@ export declare namespace Button {
129
129
  get slottedText(): string | null | undefined;
130
130
  get hasIcon(): boolean;
131
131
  iconTemplate: () => import("lit").TemplateResult<1>;
132
- textTemplate: () => typeof nothing | import("lit").TemplateResult<1>;
132
+ textTemplate: () => import("lit").TemplateResult<1> | typeof nothing;
133
133
  childrenTemplate(): import("lit").TemplateResult<1>;
134
134
  get computedAriaExpand(): "true" | "false" | undefined;
135
- buttonTemplate(tag: Button.Tag): typeof nothing | import("lit").TemplateResult<1>;
135
+ buttonTemplate(tag: Button.Tag): import("lit").TemplateResult<1> | typeof nothing;
136
136
  get buttonContainerClassMap(): {
137
137
  "md-button__container": boolean;
138
138
  "md-button__container--small": boolean;
@@ -52,10 +52,10 @@ export declare namespace Chip {
52
52
  protected renderBgColor: () => string | typeof nothing;
53
53
  protected renderTextColor: () => string | typeof nothing;
54
54
  protected renderHeight: () => string | typeof nothing;
55
- protected getStyles: () => typeof nothing | import("lit").TemplateResult<1>;
55
+ protected getStyles: () => import("lit").TemplateResult<1> | typeof nothing;
56
56
  static get styles(): import("lit").CSSResult[];
57
- protected loadingTemplate(): typeof nothing | import("lit").TemplateResult<1>;
58
- protected iconTemplate(): typeof nothing | import("lit").TemplateResult<1>;
57
+ protected loadingTemplate(): import("lit").TemplateResult<1> | typeof nothing;
58
+ protected iconTemplate(): import("lit").TemplateResult<1> | typeof nothing;
59
59
  getToolTipContent(): string;
60
60
  private get textContentClassMap();
61
61
  private get textContentTemplate();
@@ -199,7 +199,7 @@ export declare namespace ComboBox {
199
199
  arrowButtonTemplate(): TemplateResult<1>;
200
200
  groupArrowButtonTemplate(data: string): TemplateResult<1>;
201
201
  getSelectAllOption(): TemplateResult<1>;
202
- getSelctedCount(): typeof nothing | TemplateResult<1>;
202
+ getSelctedCount(): TemplateResult<1> | typeof nothing;
203
203
  checkForVirtualScroll(): boolean;
204
204
  rangeChanged(): void;
205
205
  getCustomErrorContent(): DocumentFragment;
@@ -210,8 +210,8 @@ export declare namespace ComboBox {
210
210
  addStyle(): import("lit-html/development/directive").DirectiveResult<typeof import("lit/directives/style-map.js").StyleMapDirective>;
211
211
  renderItem(option: OptionMember | string, index: number): TemplateResult;
212
212
  inputTitle(): string;
213
- helpTextTemplate(): typeof nothing | TemplateResult<1>;
214
- messagesTemplate(): typeof nothing | TemplateResult<1>;
213
+ helpTextTemplate(): TemplateResult<1> | typeof nothing;
214
+ messagesTemplate(): TemplateResult<1> | typeof nothing;
215
215
  get newArrowButtonTemplate(): TemplateResult<1>;
216
216
  get renderNewMomentumArrow(): TemplateResult;
217
217
  get renderTrailingInputControls(): TemplateResult;
@@ -138,8 +138,8 @@ export declare namespace Dropdown {
138
138
  };
139
139
  handleInput(event: Event): void;
140
140
  private notifyInputValueChanged;
141
- helpTextTemplate(): typeof nothing | import("lit").TemplateResult<1>;
142
- messagesTemplate(): typeof nothing | import("lit").TemplateResult<1>;
141
+ helpTextTemplate(): import("lit").TemplateResult<1> | typeof nothing;
142
+ messagesTemplate(): import("lit").TemplateResult<1> | typeof nothing;
143
143
  iconTemplate(): import("lit").TemplateResult<1>;
144
144
  clearButtonTemplate(): import("lit").TemplateResult<1>;
145
145
  arrowButtonTemplate(): import("lit").TemplateResult<1>;
@@ -40,7 +40,7 @@ export declare namespace EditableTextfield {
40
40
  showAlert(): void;
41
41
  static get styles(): CSSResultArray;
42
42
  get overflowStyles(): string | false | 0;
43
- messagesTemplate(): typeof nothing | import("lit").TemplateResult<1>;
43
+ messagesTemplate(): import("lit").TemplateResult<1> | typeof nothing;
44
44
  render(): import("lit").TemplateResult<1>;
45
45
  }
46
46
  }
@@ -163,7 +163,7 @@ export declare namespace Icon {
163
163
  get buttonClassMap(): {
164
164
  [x: string]: boolean;
165
165
  };
166
- consoleHandler: (message: string, data: string) => void;
166
+ consoleHandler: (message: string, data: string | string[]) => void;
167
167
  get iconFontSize(): string | 16;
168
168
  get iconColor(): any;
169
169
  get iconClassMap(): {
@@ -161,15 +161,15 @@ export declare namespace Input {
161
161
  get ariaExpandedValue(): "true" | "false" | undefined;
162
162
  get hasRightIcon(): boolean;
163
163
  inputTemplate(): import("lit").TemplateResult<1>;
164
- inputLeftTemplate(): typeof nothing | import("lit").TemplateResult<1>;
164
+ inputLeftTemplate(): import("lit").TemplateResult<1> | typeof nothing;
165
165
  private get inputRightTemplateClassMap();
166
166
  inputRightTemplate(): import("lit").TemplateResult<1> | undefined;
167
167
  private get comboBoxButtonTemplate();
168
168
  private characterCountLabelTemplate;
169
- secondaryLabelTemplate(): typeof nothing | import("lit").TemplateResult<1>;
170
- helpTextTemplate(): typeof nothing | import("lit").TemplateResult<1>;
171
- messagesTemplate(): typeof nothing | import("lit").TemplateResult<1>;
172
- labelTemplate(): typeof nothing | import("lit").TemplateResult<1>;
169
+ secondaryLabelTemplate(): import("lit").TemplateResult<1> | typeof nothing;
170
+ helpTextTemplate(): import("lit").TemplateResult<1> | typeof nothing;
171
+ messagesTemplate(): import("lit").TemplateResult<1> | typeof nothing;
172
+ labelTemplate(): import("lit").TemplateResult<1> | typeof nothing;
173
173
  static get styles(): import("lit").CSSResult[];
174
174
  render(): import("lit").TemplateResult<1>;
175
175
  }
@@ -5,4 +5,4 @@ export declare const getChannelAvatar: (selected: boolean, status: string | null
5
5
  export declare const renderTaskType: (mediaType: string, selected: boolean, status: string | null, iconSrc: string) => TemplateResult<1>;
6
6
  export declare const renderStatus: (status: string) => TemplateResult<1>;
7
7
  export declare const renderLegacyTaskType: (mediaType: string, selected: boolean, iconSrc: string) => TemplateResult<1>;
8
- export declare const renderChatCount: (quantity: number, isRestyle: boolean, element: HTMLElement) => typeof nothing | TemplateResult<1>;
8
+ export declare const renderChatCount: (quantity: number, isRestyle: boolean, element: HTMLElement) => TemplateResult<1> | typeof nothing;
@@ -3,7 +3,7 @@ import { LitElement, nothing, PropertyValues } from "lit";
3
3
  export declare class ColorTableSandbox extends LitElement {
4
4
  private colorTokenTableData;
5
5
  firstUpdated(changedProperties: PropertyValues): void;
6
- renderColorTable(): typeof nothing | import("lit").TemplateResult<1>;
6
+ renderColorTable(): import("lit").TemplateResult<1> | typeof nothing;
7
7
  static get styles(): import("lit").CSSResult[];
8
8
  render(): import("lit").TemplateResult<1>;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "3.0.0-beta.11",
3
+ "version": "3.0.0-beta.12",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",