@momentum-ui/web-components 2.23.27 → 2.23.28
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.
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
</div>
|
|
20
20
|
</span>
|
|
21
|
-
`}};a([(0,l.property)({type:Boolean})],e.prototype,"dynamic",void 0),a([(0,l.property)({type:String})],e.prototype,"color",void 0),a([(0,l.property)({type:String})],e.prototype,"label",void 0),a([(0,l.property)({type:String})],e.prototype,"displayFormat",void 0),a([(0,l.property)({type:String})],e.prototype,"type",void 0),a([(0,l.property)({type:Number})],e.prototype,"min",void 0),a([(0,l.property)({type:Number})],e.prototype,"max",void 0),a([(0,l.property)({type:Number})],e.prototype,"value",void 0),a([(0,l.property)({type:Number})],e.prototype,"adjustedValue",void 0),a([(0,l.property)({type:Number})],e.prototype,"valueFraction",void 0),a([(0,l.property)({type:String})],e.prototype,"meterWidth",void 0),e=a([(0,r.w)("md-progress-bar")],e),t.ELEMENT=e}(o||(o={}))},60046:(t,e,i)=>{i.r(e),i.d(e,{Chip:()=>o}),i(58287),i(83192);var o,r=i(90195),s=i(31890),l=i(26272),p=i(41488),n=i(40333),a=i(23968),h=i(97822),d=i(49618),c=function(t,e,i,o){var r,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(l=(s<3?r(l):s>3?r(e,i,l):r(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};!function(t){let e=class extends p.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.value="",this.textOverflow=!1,this.renderedText="",this.MAX_LENGTH=18,this.PRE_TRUNC_CHARS=6,this.POST_TRUNC_CHARS=9,this.DOT_COUNT=3,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:n.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:n.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:n.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?p.html`
|
|
21
|
+
`}};a([(0,l.property)({type:Boolean})],e.prototype,"dynamic",void 0),a([(0,l.property)({type:String})],e.prototype,"color",void 0),a([(0,l.property)({type:String})],e.prototype,"label",void 0),a([(0,l.property)({type:String})],e.prototype,"displayFormat",void 0),a([(0,l.property)({type:String})],e.prototype,"type",void 0),a([(0,l.property)({type:Number})],e.prototype,"min",void 0),a([(0,l.property)({type:Number})],e.prototype,"max",void 0),a([(0,l.property)({type:Number})],e.prototype,"value",void 0),a([(0,l.property)({type:Number})],e.prototype,"adjustedValue",void 0),a([(0,l.property)({type:Number})],e.prototype,"valueFraction",void 0),a([(0,l.property)({type:String})],e.prototype,"meterWidth",void 0),e=a([(0,r.w)("md-progress-bar")],e),t.ELEMENT=e}(o||(o={}))},60046:(t,e,i)=>{i.r(e),i.d(e,{Chip:()=>o}),i(58287),i(83192);var o,r=i(90195),s=i(31890),l=i(26272),p=i(41488),n=i(40333),a=i(23968),h=i(97822),d=i(49618),c=function(t,e,i,o){var r,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var p=t.length-1;p>=0;p--)(r=t[p])&&(l=(s<3?r(l):s>3?r(e,i,l):r(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l};!function(t){let e=class extends p.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.decorative=!1,this.value="",this.textOverflow=!1,this.renderedText="",this.MAX_LENGTH=18,this.PRE_TRUNC_CHARS=6,this.POST_TRUNC_CHARS=9,this.DOT_COUNT=3,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:n.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:n.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:n.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?p.html`
|
|
22
22
|
<style>
|
|
23
23
|
:host .md-chip {
|
|
24
24
|
${this.renderBgColor()};
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
size="${(0,h.ifDefined)(this.iconSize)}"
|
|
47
47
|
>
|
|
48
48
|
</md-icon>
|
|
49
|
-
`:n.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return p.html`<span class=${(0,a.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth};return p.html`
|
|
49
|
+
`:n.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return p.html`<span class=${(0,a.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth},e=this.decorative?void 0:this.selected?"true":"false";return p.html`
|
|
50
50
|
${this.getStyles()}
|
|
51
51
|
<md-tooltip
|
|
52
52
|
?disabled=${!this.tooltipText&&!this.textOverflow}
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
placement="${this.tooltipPlacement}"
|
|
55
55
|
>
|
|
56
56
|
<span
|
|
57
|
-
role
|
|
57
|
+
role=${(0,h.ifDefined)(this.decorative?void 0:"button")}
|
|
58
58
|
tabindex="0"
|
|
59
59
|
class="md-chip ${(0,a.classMap)(t)}"
|
|
60
60
|
part="chip"
|
|
61
|
-
aria-pressed=${
|
|
62
|
-
@click=${()=>
|
|
63
|
-
@keydown=${t=>
|
|
61
|
+
aria-pressed=${(0,h.ifDefined)(e)}
|
|
62
|
+
@click=${this.decorative?void 0:()=>this.handleClick()}
|
|
63
|
+
@keydown=${this.decorative?void 0:t=>this.handleKeydown(t)}
|
|
64
64
|
>
|
|
65
65
|
${this.loadingTemplate()} ${this.iconTemplate()}
|
|
66
66
|
<slot name="custom-left-content" part="chip-left"> </slot>
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
<slot name="custom-right-content" part="chip-right"> </slot>
|
|
69
69
|
</span>
|
|
70
70
|
</md-tooltip>
|
|
71
|
-
`}};c([(0,p.property)({type:String})],e.prototype,"color",void 0),c([(0,p.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,p.property)({type:String})],e.prototype,"textColor",void 0),c([(0,p.property)({type:String})],e.prototype,"height",void 0),c([(0,p.property)({type:String})],e.prototype,"icon",void 0),c([(0,p.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,p.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,p.property)({type:String})],e.prototype,"role",void 0),c([(0,p.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,p.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,p.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,p.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,p.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,p.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,p.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,p.internalProperty)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,p.internalProperty)()],e.prototype,"renderedText",void 0),e=c([(0,s.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},97822:t=>{t.exports=o}},l={};function p(t){var e=l[t];if(void 0!==e)return e.exports;var i=l[t]={exports:{}};return s[t](i,i.exports,p),i.exports}p.m=s,r=[],p.O=(t,e,i,o)=>{if(!e){var s=1/0;for(h=0;h<r.length;h++){for(var[e,i,o]=r[h],l=!0,n=0;n<e.length;n++)(!1&o||s>=o)&&Object.keys(p.O).every(t=>p.O[t](e[n]))?e.splice(n--,1):(l=!1,o<s&&(s=o));if(l){r.splice(h--,1);var a=i();void 0!==a&&(t=a)}}return t}o=o||0;for(var h=r.length;h>0&&r[h-1][2]>o;h--)r[h]=r[h-1];r[h]=[e,i,o]},p.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return p.d(e,{a:e}),e},p.d=(t,e)=>{for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),p.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={5369:0,8894:0};p.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[s,l,n]=i,a=0;if(s.some(e=>0!==t[e])){for(o in l)p.o(l,o)&&(p.m[o]=l[o]);if(n)var h=n(p)}for(e&&e(i);a<s.length;a++)r=s[a],p.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return p.O(h)},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 n=p.O(void 0,[1890,6272,8889,8373,4624,591,768,195,7251,7919,3192,5382,1107,9618],()=>p(60046));return p.O(n)})());
|
|
71
|
+
`}};c([(0,p.property)({type:String})],e.prototype,"color",void 0),c([(0,p.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,p.property)({type:String})],e.prototype,"textColor",void 0),c([(0,p.property)({type:String})],e.prototype,"height",void 0),c([(0,p.property)({type:String})],e.prototype,"icon",void 0),c([(0,p.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,p.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,p.property)({type:String})],e.prototype,"role",void 0),c([(0,p.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,p.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,p.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,p.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,p.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,p.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"decorative",void 0),c([(0,p.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,p.internalProperty)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,p.internalProperty)()],e.prototype,"renderedText",void 0),e=c([(0,s.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},97822:t=>{t.exports=o}},l={};function p(t){var e=l[t];if(void 0!==e)return e.exports;var i=l[t]={exports:{}};return s[t](i,i.exports,p),i.exports}p.m=s,r=[],p.O=(t,e,i,o)=>{if(!e){var s=1/0;for(h=0;h<r.length;h++){for(var[e,i,o]=r[h],l=!0,n=0;n<e.length;n++)(!1&o||s>=o)&&Object.keys(p.O).every(t=>p.O[t](e[n]))?e.splice(n--,1):(l=!1,o<s&&(s=o));if(l){r.splice(h--,1);var a=i();void 0!==a&&(t=a)}}return t}o=o||0;for(var h=r.length;h>0&&r[h-1][2]>o;h--)r[h]=r[h-1];r[h]=[e,i,o]},p.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return p.d(e,{a:e}),e},p.d=(t,e)=>{for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),p.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={5369:0,8894:0};p.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[s,l,n]=i,a=0;if(s.some(e=>0!==t[e])){for(o in l)p.o(l,o)&&(p.m[o]=l[o]);if(n)var h=n(p)}for(e&&e(i);a<s.length;a++)r=s[a],p.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return p.O(h)},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 n=p.O(void 0,[1890,6272,8889,8373,4624,591,768,195,7251,7919,3192,5382,1107,9618],()=>p(60046));return p.O(n)})());
|
package/dist/index-entry.js
CHANGED
|
@@ -1562,7 +1562,7 @@
|
|
|
1562
1562
|
</div>
|
|
1563
1563
|
</div>
|
|
1564
1564
|
`:c.nothing}
|
|
1565
|
-
`}};y([(0,p.property)({type:String})],e.prototype,"heading",void 0),y([(0,p.property)({type:String})],e.prototype,"label",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),y([(0,p.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),y([(0,p.property)({type:String,attribute:"maximize-icon-aria-label"})],e.prototype,"maximizeIconAriaLabel",void 0),y([(0,p.property)({type:Object})],e.prototype,"minPosition",void 0),y([(0,p.query)(".md-floating")],e.prototype,"container",void 0),y([(0,p.query)(".md-floating__header")],e.prototype,"header",void 0),y([(0,p.internalProperty)()],e.prototype,"dragOccured",void 0),y([(0,p.internalProperty)()],e.prototype,"containerTransform",void 0),e=y([(0,n.w)("md-floating-modal-minimized")],e),t.ELEMENT=e}(s||(s={}))},60046:(t,e,i)=>{i.d(e,{Chip:()=>s}),i(58287),i(83192);var s,o=i(90195),r=i(31890),n=i(26272),a=i(41488),l=i(40333),d=i(23968),h=i(97822),p=i(49618),c=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.value="",this.textOverflow=!1,this.renderedText="",this.MAX_LENGTH=18,this.PRE_TRUNC_CHARS=6,this.POST_TRUNC_CHARS=9,this.DOT_COUNT=3,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?a.html`
|
|
1565
|
+
`}};y([(0,p.property)({type:String})],e.prototype,"heading",void 0),y([(0,p.property)({type:String})],e.prototype,"label",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),y([(0,p.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),y([(0,p.property)({type:String,attribute:"maximize-icon-aria-label"})],e.prototype,"maximizeIconAriaLabel",void 0),y([(0,p.property)({type:Object})],e.prototype,"minPosition",void 0),y([(0,p.query)(".md-floating")],e.prototype,"container",void 0),y([(0,p.query)(".md-floating__header")],e.prototype,"header",void 0),y([(0,p.internalProperty)()],e.prototype,"dragOccured",void 0),y([(0,p.internalProperty)()],e.prototype,"containerTransform",void 0),e=y([(0,n.w)("md-floating-modal-minimized")],e),t.ELEMENT=e}(s||(s={}))},60046:(t,e,i)=>{i.d(e,{Chip:()=>s}),i(58287),i(83192);var s,o=i(90195),r=i(31890),n=i(26272),a=i(41488),l=i(40333),d=i(23968),h=i(97822),p=i(49618),c=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.decorative=!1,this.value="",this.textOverflow=!1,this.renderedText="",this.MAX_LENGTH=18,this.PRE_TRUNC_CHARS=6,this.POST_TRUNC_CHARS=9,this.DOT_COUNT=3,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?a.html`
|
|
1566
1566
|
<style>
|
|
1567
1567
|
:host .md-chip {
|
|
1568
1568
|
${this.renderBgColor()};
|
|
@@ -1590,7 +1590,7 @@
|
|
|
1590
1590
|
size="${(0,h.ifDefined)(this.iconSize)}"
|
|
1591
1591
|
>
|
|
1592
1592
|
</md-icon>
|
|
1593
|
-
`:l.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return a.html`<span class=${(0,d.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth};return a.html`
|
|
1593
|
+
`:l.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return a.html`<span class=${(0,d.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth},e=this.decorative?void 0:this.selected?"true":"false";return a.html`
|
|
1594
1594
|
${this.getStyles()}
|
|
1595
1595
|
<md-tooltip
|
|
1596
1596
|
?disabled=${!this.tooltipText&&!this.textOverflow}
|
|
@@ -1598,13 +1598,13 @@
|
|
|
1598
1598
|
placement="${this.tooltipPlacement}"
|
|
1599
1599
|
>
|
|
1600
1600
|
<span
|
|
1601
|
-
role
|
|
1601
|
+
role=${(0,h.ifDefined)(this.decorative?void 0:"button")}
|
|
1602
1602
|
tabindex="0"
|
|
1603
1603
|
class="md-chip ${(0,d.classMap)(t)}"
|
|
1604
1604
|
part="chip"
|
|
1605
|
-
aria-pressed=${
|
|
1606
|
-
@click=${()=>
|
|
1607
|
-
@keydown=${t=>
|
|
1605
|
+
aria-pressed=${(0,h.ifDefined)(e)}
|
|
1606
|
+
@click=${this.decorative?void 0:()=>this.handleClick()}
|
|
1607
|
+
@keydown=${this.decorative?void 0:t=>this.handleKeydown(t)}
|
|
1608
1608
|
>
|
|
1609
1609
|
${this.loadingTemplate()} ${this.iconTemplate()}
|
|
1610
1610
|
<slot name="custom-left-content" part="chip-left"> </slot>
|
|
@@ -1612,7 +1612,7 @@
|
|
|
1612
1612
|
<slot name="custom-right-content" part="chip-right"> </slot>
|
|
1613
1613
|
</span>
|
|
1614
1614
|
</md-tooltip>
|
|
1615
|
-
`}};c([(0,a.property)({type:String})],e.prototype,"color",void 0),c([(0,a.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,a.property)({type:String})],e.prototype,"textColor",void 0),c([(0,a.property)({type:String})],e.prototype,"height",void 0),c([(0,a.property)({type:String})],e.prototype,"icon",void 0),c([(0,a.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,a.property)({type:String})],e.prototype,"role",void 0),c([(0,a.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,a.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,a.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,a.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,a.internalProperty)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,a.internalProperty)()],e.prototype,"renderedText",void 0),e=c([(0,r.w)("md-chip")],e),t.ELEMENT=e}(s||(s={}))},60554:t=>{t.exports=n},61200:(t,e,i)=>{i.d(e,{Icon:()=>s}),i(96798);var s,o=i(31890),r=i(26272),n=i(32022),a=i.n(n),l=i(60554),d=i.n(l),h=i(41488),p=i(40333),c=i(23968),u=i(97822),m=i(8229),y=i(57955),v=i(66873),b=i(81786),g=i(9223),f=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!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,o=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const s="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);s&&(this.svgIcon=s,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(),this.requestUpdate())},new((s=void 0)||(s=Promise))(function(t,r){function n(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(n,a)}l((o=o.apply(e,i||[])).next())});var e,i,s,o}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}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)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):a().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`
|
|
1615
|
+
`}};c([(0,a.property)({type:String})],e.prototype,"color",void 0),c([(0,a.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,a.property)({type:String})],e.prototype,"textColor",void 0),c([(0,a.property)({type:String})],e.prototype,"height",void 0),c([(0,a.property)({type:String})],e.prototype,"icon",void 0),c([(0,a.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,a.property)({type:String})],e.prototype,"role",void 0),c([(0,a.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,a.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,a.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"decorative",void 0),c([(0,a.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,a.internalProperty)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,a.internalProperty)()],e.prototype,"renderedText",void 0),e=c([(0,r.w)("md-chip")],e),t.ELEMENT=e}(s||(s={}))},60554:t=>{t.exports=n},61200:(t,e,i)=>{i.d(e,{Icon:()=>s}),i(96798);var s,o=i(31890),r=i(26272),n=i(32022),a=i.n(n),l=i(60554),d=i.n(l),h=i(41488),p=i(40333),c=i(23968),u=i(97822),m=i(8229),y=i(57955),v=i(66873),b=i(81786),g=i(9223),f=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!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,o=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const s="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);s&&(this.svgIcon=s,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(),this.requestUpdate())},new((s=void 0)||(s=Promise))(function(t,r){function n(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(n,a)}l((o=o.apply(e,i||[])).next())});var e,i,s,o}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}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)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):a().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`
|
|
1616
1616
|
<i
|
|
1617
1617
|
part="icon"
|
|
1618
1618
|
id=${this.id}
|