@momentum-ui/web-components 2.23.8 → 2.23.10
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/1439.js +1 -1
- package/dist/4974.js +1 -1
- package/dist/6273.js +13 -13
- package/dist/7119.js +10 -10
- package/dist/76.js +1 -1
- package/dist/8028.js +17 -16
- package/dist/8923.js +1 -1
- package/dist/comp/md-avatar-entry.js +13 -12
- package/dist/comp/md-coachmark-popover-entry.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-datepicker-entry.js +5 -5
- package/dist/comp/md-popover-entry.js +1 -1
- package/dist/comp/md-presence-entry.js +4 -4
- package/dist/index-entry.js +32 -24
- package/dist/types/components/avatar/Avatar.d.ts +3 -0
- package/dist/types/components/date-range-picker/DateRangePicker.d.ts +1 -0
- package/dist/types/components/datepicker/DatePicker.d.ts +5 -2
- package/dist/types/components/floating-button-bar/FloatingButtonBar.d.ts +1 -0
- package/dist/types/components/popover/Popover.d.ts +4 -0
- package/dist/types/components/presence/Presence.d.ts +5 -3
- package/dist/types/components/presence/Presence.utils.d.ts +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +1 -0
- package/package.json +1 -1
package/dist/1439.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1439,3820,6677,9058],{66677:(o,n,t)=>{function e(o,n=document){var t;const r=n instanceof ShadowRoot||n instanceof Document?n.querySelector(o):null===(t=n.shadowRoot)||void 0===t?void 0:t.querySelector(o);if(r)return r;const l=Array.from(n.querySelectorAll("*")).map((o=>{var n;return null!==(n=o.shadowRoot)&&void 0!==n?n:null})).filter((o=>null!==o));for(const n of l){const t=e(o,n);if(t)return t}return null}function r(o,n=document){if(n instanceof ShadowRoot||n instanceof Document){const t=n.getElementById(o);if(t)return t}const t=Array.from(n.querySelectorAll("*")).map((o=>{var n;return null!==(n=o.shadowRoot)&&void 0!==n?n:null})).filter((o=>null!==o));for(const n of t){const t=r(o,n);if(t)return t}return null}t.d(n,{XI:()=>r,qi:()=>e})}}]);
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1439,3820,6677,9058],{66677:(o,n,t)=>{function e(o,n=document){var t;const r=n instanceof ShadowRoot||n instanceof Document?n.querySelector(o):null===(t=n.shadowRoot)||void 0===t?void 0:t.querySelector(o);if(r)return r;const l=Array.from(n.querySelectorAll("*")).map((o=>{var n;return null!==(n=o.shadowRoot)&&void 0!==n?n:null})).filter((o=>null!==o));for(const n of l){const t=e(o,n);if(t)return t}return null}function r(o,n=document){if(n instanceof ShadowRoot||n instanceof Document){const t=n.getElementById(o);if(t)return t}const t=Array.from(n.querySelectorAll("*")).map((o=>{var n;return null!==(n=o.shadowRoot)&&void 0!==n?n:null})).filter((o=>null!==o));for(const n of t){const t=r(o,n);if(t)return t}return null}function l(){var o;let n=document.activeElement;for(;null===(o=null==n?void 0:n.shadowRoot)||void 0===o?void 0:o.activeElement;)n=n.shadowRoot.activeElement;return n}t.d(n,{XI:()=>r,dw:()=>l,qi:()=>e})}}]);
|
package/dist/4974.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[4974],{14974:(e,r,t)=>{t.d(r,{A:()=>a});const a=t(41488).css`.md-datepicker{overflow:visible}.md-datepicker__month-container{display:flex;flex-direction:column;height:19.25rem;justify-content:space-between;padding:12px 10px 8px}.md-datepicker__navigation--buttons{align-items:center;gap:.5rem;color:var(--datepicker-default-navigation-button,var(--md-primary-text-color,inherit));display:flex;justify-content:space-between;line-height:normal}.md-datepicker__navigation--buttons md-button::part(button)::after{margin:0;height:28px;width:28px}.md-datepicker__month{display:flex;flex-direction:column;width:15.5rem;gap:.25rem}.md-datepicker__week{display:flex;gap:.25rem;flex-wrap:nowrap;font-size:var(--brand-font-midsize,.875rem)}.md-datepicker__navigation--current-month{font-size:1rem;font-family:var(--brand-font-bold,inherit);line-height:var(--font-lineheight-body-large,1.5rem);font-weight:700;text-transform:capitalize;color:var(--datepicker-default-navigation-label,inherit)}.md-datepicker__navigation{display:flex;justify-content:space-between;align-items:center;padding:0 1px}.md-datepicker__day--names{display:flex}.md-datepicker__day{color:var(--datepicker-default-number-color,inherit);border-radius:100%;display:inline-flex;height:2rem;width:2rem;font-weight:400}.md-datepicker__day--names{color:var(--datepicker-default-days,var(--md-secondary-text-color));display:flex;gap:.25rem;font-size:var(--font-size-body-midsize,.625rem);font-family:var(--brand-font-bold, "CiscoSansTT Bold");font-weight:var(--brand-font-weight-bold,700);justify-content:center;align-items:center;line-height:.875rem;margin:12px 0 4px;text-transform:capitalize;text-align:center;width:15.5rem;letter-spacing:0}.md-datepicker__day--names .md-datepicker__day--name{display:flex;justify-content:center;align-items:center;width:2rem;height:2rem}.md-datepicker__day::part(button){align-items:center;justify-content:center;display:inline-flex}.md-datepicker__day::part(button):hover{background:var(--datepicker-default-hover-bg-color)}.md-datepicker__day[disabled]::part(button){background:0 0;color:var(--md-disabled-text-color,inherit)}.md-datepicker__day--today::part(button){font-weight:700}.md-datepicker__day--today::part(button)::after{outline:var(--datepicker-selected-today-border,1px solid var(--datepicker-range-text-color));outline-offset:-.25rem}.md-datepicker__day--focus::part(button){background:var(--datepicker-range-hover-bg-color)}.md-datepicker__day--selected::part(button){background:var(--datepicker-selected-bg-color,var(--md-primary-text-color));color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--selected::part(button):hover{background:var(--datepicker-selected-hover-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--selected::part(button):active{background:var(--datepicker-selected-pressed-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--outside-month{color:var(--datepicker-invalid-text-color,var(--md-disabled-text-color,inherit))}.md-datepicker__day--in-range::part(button){color:var(--datepicker-range-text-color);z-index:10}.md-datepicker__day--in-range::part(button)::before{background:var(--datepicker-range-bg-color);content:"";display:block;height:2rem;position:absolute;top:0;width:calc(2rem + 5px);z-index:-1}.md-datepicker__day--in-range::part(button):hover{color:var(--datepicker-range-text-color)}.md-datepicker__day--in-range::part(button):active{color:var(--datepicker-pressed-text-color)}.md-datepicker__day--in-range::part(button):focus{z-index:12;color:var(--datepicker-range-text-color)}.md-datepicker__day--week-first.md-datepicker__day--in-range::part(button)::before{width:2.125rem;left:0}.md-datepicker__day--start-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color));z-index:11;box-shadow:none}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-range-text-color)}.md-datepicker__day--start-date::part(button)::before{width:2rem;left:.125rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,transparent
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[4974],{14974:(e,r,t)=>{t.d(r,{A:()=>a});const a=t(41488).css`.md-datepicker{overflow:visible}.md-datepicker__month-container{display:flex;flex-direction:column;height:19.25rem;justify-content:space-between;padding:12px 10px 8px}.md-datepicker__navigation--buttons{align-items:center;gap:.5rem;color:var(--datepicker-default-navigation-button,var(--md-primary-text-color,inherit));display:flex;justify-content:space-between;line-height:normal}.md-datepicker__navigation--buttons md-button::part(button)::after{margin:0;height:28px;width:28px}.md-datepicker__month{display:flex;flex-direction:column;width:15.5rem;gap:.25rem}.md-datepicker__week{display:flex;gap:.25rem;flex-wrap:nowrap;font-size:var(--brand-font-midsize,.875rem)}.md-datepicker__navigation--current-month{font-size:1rem;font-family:var(--brand-font-bold,inherit);line-height:var(--font-lineheight-body-large,1.5rem);font-weight:700;text-transform:capitalize;color:var(--datepicker-default-navigation-label,inherit)}.md-datepicker__navigation{display:flex;justify-content:space-between;align-items:center;padding:0 1px}.md-datepicker__day--names{display:flex}.md-datepicker__day{color:var(--datepicker-default-number-color,inherit);border-radius:100%;display:inline-flex;height:2rem;width:2rem;font-weight:400}.md-datepicker__day--names{color:var(--datepicker-default-days,var(--md-secondary-text-color));display:flex;gap:.25rem;font-size:var(--font-size-body-midsize,.625rem);font-family:var(--brand-font-bold, "CiscoSansTT Bold");font-weight:var(--brand-font-weight-bold,700);justify-content:center;align-items:center;line-height:.875rem;margin:12px 0 4px;text-transform:capitalize;text-align:center;width:15.5rem;letter-spacing:0}.md-datepicker__day--names .md-datepicker__day--name{display:flex;justify-content:center;align-items:center;width:2rem;height:2rem}.md-datepicker__day::part(button){align-items:center;justify-content:center;display:inline-flex}.md-datepicker__day::part(button):hover{background:var(--datepicker-default-hover-bg-color)}.md-datepicker__day[disabled]::part(button){background:0 0;color:var(--md-disabled-text-color,inherit)}.md-datepicker__day--today::part(button){font-weight:700}.md-datepicker__day--today::part(button)::after{outline:var(--datepicker-selected-today-border,1px solid var(--datepicker-range-text-color));outline-offset:-.25rem}.md-datepicker__day--focus::part(button){background:var(--datepicker-range-hover-bg-color)}.md-datepicker__day--selected::part(button){background:var(--datepicker-selected-bg-color,var(--md-primary-text-color));color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--selected::part(button):hover{background:var(--datepicker-selected-hover-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--selected::part(button):active{background:var(--datepicker-selected-pressed-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--outside-month{color:var(--datepicker-invalid-text-color,var(--md-disabled-text-color,inherit))}.md-datepicker__day--in-range::part(button){color:var(--datepicker-range-text-color);z-index:10}.md-datepicker__day--in-range::part(button)::before{background:var(--datepicker-range-bg-color);content:"";display:block;height:2rem;position:absolute;top:0;width:calc(2rem + 5px);z-index:-1}.md-datepicker__day--in-range::part(button):hover{color:var(--datepicker-range-text-color)}.md-datepicker__day--in-range::part(button):active{color:var(--datepicker-pressed-text-color)}.md-datepicker__day--in-range::part(button):focus{z-index:12;color:var(--datepicker-range-text-color)}.md-datepicker__day--week-first.md-datepicker__day--in-range::part(button)::before{width:2.125rem;left:0}.md-datepicker__day--start-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color));z-index:11;box-shadow:none}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-range-text-color)}.md-datepicker__day--start-date::part(button)::before{width:2rem;left:.125rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,transparent 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%);border-bottom-left-radius:1rem;border-top-left-radius:1rem}.md-datepicker__day--start-date::part(button)::after{height:2rem;width:2rem;left:.125rem;top:.125rem;z-index:-1;background:radial-gradient(circle at 50% center,transparent 40%,var(--datepicker-range-edge-bg-color) 40%,var(--datepicker-range-edge-bg-color) 100%,transparent 100%);content:""}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-selected-text-color)}.md-datepicker__day--start-date::part(button):focus::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,rgba(0,0,0,0) 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%)}.md-datepicker__day--start-date::part(button):focus::after{z-index:-1;box-shadow:none;outline:.125rem solid var(--button-focus-ring-color);outline-offset:.125rem;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 40%,var(--datepicker-selected-bg-color) 40%,var(--datepicker-selected-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color);border-bottom-right-radius:1rem;border-top-right-radius:1rem}.md-datepicker__day--start-date::part(button):hover::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 50%,rgba(0,0,0,0) 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%)}.md-datepicker__day--start-date::part(button):hover::after{z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 40%,var(--datepicker-selected-hover-bg-color) 40%,var(--datepicker-selected-hover-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--end-date::part(button)::before{height:2rem;width:2.125rem;left:-.25rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 50%,transparent 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%);border-bottom-right-radius:1rem;border-top-right-radius:1rem}.md-datepicker__day--end-date::part(button)::after{height:2rem;width:2rem;left:.125rem;top:.125rem;z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-range-edge-bg-color) 30%,var(--datepicker-range-edge-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button):focus{color:var(--datepicker-selected-text-color)}.md-datepicker__day--end-date::part(button):focus::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 50%,transparent 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%)}.md-datepicker__day--end-date::part(button):focus::after{z-index:-1;box-shadow:none;outline:.125rem solid var(--button-focus-ring-color);outline-offset:.125rem;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-selected-bg-color) 30%,var(--datepicker-selected-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button):hover{color:var(--datepicker-selected-text-color)}.md-datepicker__day--end-date::part(button):hover::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 60%,rgba(0,0,0,0) 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%)}.md-datepicker__day--end-date::part(button):hover::after{z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-selected-hover-bg-color) 30%,var(--datepicker-selected-hover-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--week-first::part(button)::before{border-bottom-left-radius:1rem;border-top-left-radius:1rem}.md-datepicker__day--week-last::part(button)::before{border-bottom-right-radius:1rem;border-top-right-radius:1rem;width:calc(2rem + .25rem);left:-.25rem}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button),.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button){background:0 0}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::after,.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::before,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::before{border-radius:1rem;width:2rem;height:2rem;left:.125rem;top:.125rem;background:0 0}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::after{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 0,var(--datepicker-selected-bg-color) 100%,transparent 100%)}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button):hover::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button):hover::after{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 0,var(--datepicker-selected-hover-bg-color) 100%,transparent 100%)}.control-buttons{display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem .75rem .75rem}`}}]);
|
package/dist/6273.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6273],{38654:(e,
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6273],{38654:(t,e,i)=>{i.d(e,{DatePicker:()=>a}),i(63208),i(96408),i(11323);var a,o=i(90195),s=i(37719),r=i(31890),l=i(81625),n=i(66677),d=i(74548),p=i(41488),h=i(97822),c=i(65796),u=i(14974),m=function(t,e,i,a){var o,s=arguments.length,r=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.weekStartDays=["Sunday","Monday"];let e=class extends p.LitElement{constructor(){super(...arguments),this.shouldCloseOnSelect=!1,this.maxDate=void 0,this.minDate=void 0,this.value=void 0,this.weekStart="Sunday",this.placeholder=void 0,this.locale=void 0,this.useISOFormat=!0,this.validateDate=!0,this.includesTime=!1,this.disabled=!1,this.htmlId="",this.label="",this.ariaLabel=null,this.required=!1,this.errorMessage="",this.customTrigger=!1,this.isMenuOverlayOpen=!1,this.newMomentum=void 0,this.compactInput=void 0,this.controlButtons=void 0,this.positioningStrategy=void 0,this.showDefaultNowDate=!0,this.selectedDate=(0,l.tB)(),this.focusedDate=(0,l.tB)(),this.filterDate=void 0,this.maxDateData=void 0,this.minDateData=void 0,this.handleDateInputChange=t=>{var e,i;this.useISOFormat?this.value=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.value:this.value=null===(i=this.selectedDate)||void 0===i?void 0:i.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale}),this.dispatchEvent(new CustomEvent("date-input-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,value:this.value}}))},this.setOpen=t=>{this.menuOverlay.isOpen=t,this.isMenuOverlayOpen=t},this.setPreSelection=t=>{const e={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};(0,l.t_)(t,e)||(this.focusedDate=t)},this.handleInputKeyDown=t=>{t.code===o.Uz.ArrowDown&&this.setOpen(!0)},this.handleKeyDown=t=>{const e=t.detail.sourceEvent;let i=!1;const a=this.focusedDate;switch(!e.shiftKey&&e.code){case"Space":case"Enter":this.handleSelect(t),i=!0;break;case"Escape":this.setOpen(!1);break;case"ArrowUp":this.setPreSelection((0,l.WB)(a,1)),i=!0;break;case"ArrowLeft":this.setPreSelection((0,l.gg)(a,1)),i=!0;break;case"ArrowRight":this.setPreSelection((0,l.fi)(a,1)),i=!0;break;case"ArrowDown":this.setPreSelection((0,l.J4)(a,1)),i=!0}i&&(e.stopPropagation(),e.preventDefault())},this.getDefaultAriaLabel=()=>this.selectedDate&&this.selectedDate.isValid?`Choose Date, selected date is ${this.selectedDate.toLocaleString(c.DateTime.DATE_FULL)}`:"Choose Date",this.getValidRegexString=()=>this.includesTime?d.b.ISOString:d.b.ISODateString}get computedNewMomentum(){return void 0!==this.newMomentum?this.newMomentum:s.themeManager.isMomentumV2Enabled}static get styles(){return u.A}connectedCallback(){super.connectedCallback(),this.minDate&&(this.minDateData=(0,l.mA)(this.minDate)),this.maxDate&&(this.maxDateData=(0,l.mA)(this.maxDate))}firstUpdated(t){super.firstUpdated(t),!this.value&&this.showDefaultNowDate&&(this.value=this.getFormattedDate(this.selectedDate))}updated(t){if(super.updated(t),this.value&&t.has("value")){if((0,n.QZ)("md-date-range-picker",this))return;this.useISOFormat?this.selectedDate=(0,l.mA)(this.value):this.selectedDate=c.DateTime.fromFormat(this.value,(0,l.gq)(this.locale),{locale:this.locale}),this.setPreSelection(this.selectedDate)}t.has("locale")&&this.render(),this.minDate&&t.has("minDate")&&(this.minDateData=(0,l.mA)(this.minDate)),this.maxDate&&t.has("maxDate")&&(this.maxDateData=(0,l.mA)(this.maxDate))}handleSelect(t){var e;const i=t.detail.date,a=t.detail.sourceEvent;this.setPreSelection(i),this.dispatchEvent(new CustomEvent("date-pre-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:a,data:i}})),(null===(e=this.controlButtons)||void 0===e?void 0:e.apply)&&"apply-button-clicked"!==(null==a?void 0:a.type)||(this.setSelected(i,a),this.shouldCloseOnSelect&&this.setOpen(!1))}getISODateTime(t){return this.includesTime?t.startOf("second").toISO({suppressMilliseconds:!0}):t.toISODate()}setSelected(t,e){const i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!(0,l.t_)(t,i)){const e=this.getISODateTime(t);this.selectedDate=t,this.useISOFormat?this.value=e:this.value=t.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale})}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,data:t}}))}validateDateString(t){if(!t&&""!==t)return!0;if(this.useISOFormat){const e=RegExp(this.getValidRegexString()),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return!!t&&e.test(t)&&!(0,l.t_)((0,l.mA)(t),i)}const e=(0,l.gq)(this.locale);return c.DateTime.fromFormat(t,e,{locale:this.locale}).isValid}isValueValid(){return!this.validateDate||this.validateDateString(this.value)}get messageArray(){return this.errorMessage?[{message:this.errorMessage,type:"error"}]:this.isValueValid()?[]:[{message:"",type:"error"}]}onCancelClick(){this.setOpen(!1)}onApplyClick(){this.handleSelect(new CustomEvent("day-select",{detail:{date:this.focusedDate,sourceEvent:new Event("apply-button-clicked")}}))}renderControlButtons(){var t,e,i,a,o,s;return this.controlButtons?p.html`
|
|
2
2
|
<div class="control-buttons">
|
|
3
3
|
${this.controlButtons.cancel?p.html`
|
|
4
4
|
<md-button
|
|
5
5
|
class="cancel-button"
|
|
6
|
-
aria-label=${(0,
|
|
7
|
-
?disabled=${null!==(i=null===(
|
|
6
|
+
aria-label=${(0,h.ifDefined)(null===(t=this.controlButtons.cancel)||void 0===t?void 0:t.ariaLabel)}
|
|
7
|
+
?disabled=${null!==(i=null===(e=this.controlButtons.cancel)||void 0===e?void 0:e.disabled)&&void 0!==i&&i}
|
|
8
8
|
@click=${this.onCancelClick}
|
|
9
9
|
variant="secondary"
|
|
10
10
|
>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
${this.controlButtons.apply?p.html`
|
|
15
15
|
<md-button
|
|
16
16
|
class="apply-button"
|
|
17
|
-
aria-label=${(0,
|
|
17
|
+
aria-label=${(0,h.ifDefined)(null===(a=this.controlButtons.apply)||void 0===a?void 0:a.ariaLabel)}
|
|
18
18
|
?disabled=${null!==(s=null===(o=this.controlButtons.apply)||void 0===o?void 0:o.disabled)&&void 0!==s&&s}
|
|
19
19
|
@click=${this.onApplyClick}
|
|
20
20
|
variant="primary"
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
</md-button>
|
|
24
24
|
`:null}
|
|
25
25
|
</div>
|
|
26
|
-
`:p.html``}getPlaceHolderString(){var
|
|
26
|
+
`:p.html``}getPlaceHolderString(){var t;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(t=this.locale)&&void 0!==t?t:c.DateTime.local().locale).toUpperCase()}getFormattedDate(t){return t?this.useISOFormat?this.getISODateTime(t):this.includesTime?t.toLocaleString(c.DateTime.DATETIME_SHORT,{locale:this.locale}):t.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale}):null}getAriaLabel(){var t;return null!==(t=this.ariaLabel)&&void 0!==t?t:this.getDefaultAriaLabel()}render(){var t;return p.html`
|
|
27
27
|
<md-menu-overlay
|
|
28
28
|
is-date-picker
|
|
29
29
|
custom-width="272px"
|
|
30
30
|
?disabled=${this.disabled}
|
|
31
|
-
positioning-strategy=${(0,
|
|
31
|
+
positioning-strategy=${(0,h.ifDefined)(this.positioningStrategy)}
|
|
32
32
|
>
|
|
33
33
|
${this.customTrigger?p.html`
|
|
34
34
|
<span slot="menu-trigger">
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
role="combobox"
|
|
42
42
|
?newMomentum=${this.computedNewMomentum}
|
|
43
43
|
placeholder=${this.getPlaceHolderString()}
|
|
44
|
-
value=${(0,
|
|
44
|
+
value=${(0,h.ifDefined)(null!==(t=this.value)&&void 0!==t?t:void 0)}
|
|
45
45
|
htmlId=${this.htmlId}
|
|
46
46
|
label=${this.label}
|
|
47
|
-
ariaLabel=${this.
|
|
47
|
+
ariaLabel=${this.getAriaLabel()}
|
|
48
48
|
ariaExpanded=${this.isMenuOverlayOpen?"true":"false"}
|
|
49
49
|
ariaControls="date-overlay-content"
|
|
50
50
|
auxiliaryContentPosition="before"
|
|
51
51
|
?required=${this.required}
|
|
52
|
-
@keydown=${
|
|
53
|
-
@input-change="${
|
|
52
|
+
@keydown=${t=>this.handleInputKeyDown(t)}
|
|
53
|
+
@input-change="${t=>this.handleDateInputChange(t)}"
|
|
54
54
|
?disabled=${this.disabled}
|
|
55
55
|
?hide-message=${!this.errorMessage||this.isValueValid()}
|
|
56
56
|
ariaInvalid=${!!this.errorMessage||!this.isValueValid()}
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
|
|
64
64
|
<div class="date-overlay-content">
|
|
65
65
|
<md-datepicker-calendar
|
|
66
|
-
@day-select=${
|
|
67
|
-
@day-key-event=${
|
|
66
|
+
@day-select=${t=>this.handleSelect(t)}
|
|
67
|
+
@day-key-event=${t=>this.handleKeyDown(t)}
|
|
68
68
|
.datePickerProps=${{locale:this.locale,selected:this.selectedDate,focused:this.focusedDate,weekStart:this.weekStart}}
|
|
69
69
|
?short-day=${this.computedNewMomentum}
|
|
70
70
|
.filterParams=${{minDate:this.minDateData,maxDate:this.maxDateData,filterDate:this.filterDate}}
|
|
@@ -73,4 +73,4 @@
|
|
|
73
73
|
${this.renderControlButtons()}
|
|
74
74
|
</div>
|
|
75
75
|
</md-menu-overlay>
|
|
76
|
-
`}};m([(0,p.property)({type:Boolean,attribute:"should-close-on-select"})],
|
|
76
|
+
`}};m([(0,p.property)({type:Boolean,attribute:"should-close-on-select"})],e.prototype,"shouldCloseOnSelect",void 0),m([(0,p.property)({type:String})],e.prototype,"maxDate",void 0),m([(0,p.property)({type:String})],e.prototype,"minDate",void 0),m([(0,p.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,p.property)({type:String})],e.prototype,"weekStart",void 0),m([(0,p.property)({type:String,reflect:!0})],e.prototype,"placeholder",void 0),m([(0,p.property)({type:String})],e.prototype,"locale",void 0),m([(0,p.property)({type:Boolean})],e.prototype,"useISOFormat",void 0),m([(0,p.property)({type:Boolean})],e.prototype,"validateDate",void 0),m([(0,p.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],e.prototype,"includesTime",void 0),m([(0,p.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,p.property)({type:String})],e.prototype,"htmlId",void 0),m([(0,p.property)({type:String})],e.prototype,"label",void 0),m([(0,p.property)({type:String})],e.prototype,"ariaLabel",void 0),m([(0,p.property)({type:Boolean})],e.prototype,"required",void 0),m([(0,p.property)({type:String,reflect:!0})],e.prototype,"errorMessage",void 0),m([(0,p.property)({type:Boolean,attribute:"custom-trigger"})],e.prototype,"customTrigger",void 0),m([(0,p.property)({type:Boolean})],e.prototype,"isMenuOverlayOpen",void 0),m([(0,p.property)({type:Boolean})],e.prototype,"newMomentum",void 0),m([(0,p.property)({type:Boolean,attribute:"compact-input"})],e.prototype,"compactInput",void 0),m([(0,p.property)({type:Object,attribute:!1})],e.prototype,"controlButtons",void 0),m([(0,p.property)({type:String,attribute:"positioning-strategy"})],e.prototype,"positioningStrategy",void 0),m([(0,p.property)({type:Boolean,attribute:"show-default-now-date"})],e.prototype,"showDefaultNowDate",void 0),m([(0,p.internalProperty)()],e.prototype,"selectedDate",void 0),m([(0,p.internalProperty)()],e.prototype,"focusedDate",void 0),m([(0,p.internalProperty)()],e.prototype,"filterDate",void 0),m([(0,p.internalProperty)()],e.prototype,"maxDateData",void 0),m([(0,p.internalProperty)()],e.prototype,"minDateData",void 0),m([(0,p.query)("md-menu-overlay")],e.prototype,"menuOverlay",void 0),e=m([(0,r.w)("md-datepicker")],e),t.ELEMENT=e}(a||(a={}))}}]);
|
package/dist/7119.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7119],{15300:(e,t,
|
|
2
|
-
<div class="${(0,
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7119],{15300:(e,t,i)=>{i(61200);var s,n=i(31890),o=i(26272),a=i(41488),r=i(23968),l=i(38923),p=i(76877),c=function(e,t,i,s){var n,o=arguments.length,a=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.name="",this.size=48,this.title="",this.color="",this.presenceType="",this.newMomentum=!1,this.failurePresence=!1,this.avatarLinked=!1}static get styles(){return[o.A,p.A]}get presenceClassMap(){return{"avatar-presence-wrapper":this.avatarLinked}}render(){if(this.presenceType){const{presenceIcon:e,presenceColor:t}=(0,l.E)(this.presenceType,this.failurePresence,this.newMomentum);this.name=e,this.color=t}return a.html`
|
|
2
|
+
<div class="${(0,r.classMap)(this.presenceClassMap)}" data-size=${this.size} data-icon-size=${this.size}>
|
|
3
3
|
<md-icon
|
|
4
|
-
name="${this.
|
|
5
|
-
color="${this.
|
|
4
|
+
name="${this.name}"
|
|
5
|
+
color="${this.color}"
|
|
6
6
|
size=${this.size}
|
|
7
7
|
title="${this.title}"
|
|
8
8
|
.iconSet=${"momentumDesign"}
|
|
9
9
|
>
|
|
10
10
|
</md-icon>
|
|
11
11
|
</div>
|
|
12
|
-
`}};
|
|
13
|
-
<div class="md-loading ${(0,
|
|
14
|
-
<span class=${(0,
|
|
15
|
-
<span class=${(0,
|
|
16
|
-
<span class=${(0,
|
|
12
|
+
`}};c([(0,a.property)({type:String})],t.prototype,"name",void 0),c([(0,a.property)({type:Number})],t.prototype,"size",void 0),c([(0,a.property)({type:String})],t.prototype,"title",void 0),c([(0,a.property)({type:String})],t.prototype,"color",void 0),c([(0,a.property)({type:String,attribute:"presence-type"})],t.prototype,"presenceType",void 0),c([(0,a.property)({type:Boolean})],t.prototype,"newMomentum",void 0),c([(0,a.property)({type:Boolean})],t.prototype,"failurePresence",void 0),c([(0,a.property)({type:Boolean})],t.prototype,"avatarLinked",void 0),t=c([(0,n.w)("md-presence")],t),e.ELEMENT=t}(s||(s={}))},69788:(e,t,i)=>{var s,n=i(31890),o=i(26272),a=i(41488),r=i(17518),l=i(76700),p=function(e,t,i,s){var n,o=arguments.length,a=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.size="",this.isAnimating=!1,this.animationFrameId=null}static get styles(){return[o.A,l.A]}firstUpdated(e){super.firstUpdated(e),this.isAnimating=!0,this.startAnimation()}disconnectedCallback(){super.disconnectedCallback(),this.isAnimating=!1,this.stopAnimation()}startAnimation(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".md-loading__icon");if(!t)return;let i=null;const s=1400,n=e=>{if(!this.isAnimating)return;i||(i=e);const o=(e-i)%s;t.forEach(((e,t)=>{const i=(o-200*t+s)%s;let n=0,a=.1;if(i<280){const e=.1+i/280*.9;n=e,a=e}else if(i<1400){const e=Math.min((i-280)/1120*2,1);n=Math.max(1-.9*e,.9),a=Math.max(1-.9*e,.2)}e.style.transform=`scale(${n})`,e.style.opacity=`${a}`})),this.animationFrameId=requestAnimationFrame(n)};this.animationFrameId=requestAnimationFrame(n)}stopAnimation(){var e;null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null);const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".md-loading__icon");t&&t.forEach((e=>{e.style.transform="scale(0, 0)",e.style.opacity="0.1"}))}get loadingClassMap(){return{[`md-loading--${this.size}`]:!!this.size}}get loadingIconClassMap(){return{"md-loading__icon":!0}}render(){return a.html`
|
|
13
|
+
<div class="md-loading ${(0,r.classMap)(this.loadingClassMap)}">
|
|
14
|
+
<span class=${(0,r.classMap)(this.loadingIconClassMap)}></span>
|
|
15
|
+
<span class=${(0,r.classMap)(this.loadingIconClassMap)}></span>
|
|
16
|
+
<span class=${(0,r.classMap)(this.loadingIconClassMap)}></span>
|
|
17
17
|
</div>
|
|
18
|
-
`}};
|
|
18
|
+
`}};p([(0,a.property)({type:String})],t.prototype,"size",void 0),t=p([(0,n.w)("md-loading")],t),e.ELEMENT=t}(s||(s={}))}}]);
|
package/dist/76.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[76],{30076:(t,e,o)=>{o.d(e,{A:()=>a});const a=o(41488).css`:host{box-sizing:border-box}:host(:focus){box-shadow:none!important;outline:0}:host(:focus) .tab-content{outline:2px solid var(--tabs-default-focus-border);outline-offset:-.125rem;box-shadow:var(--tabs-default-focus-shadow);border-radius:.25rem .25rem 0 0}:host(:focus) .tab-content.newMomentum{outline:0;box-shadow:var(--tabs-default-focus-shadow-inner),var(--tabs-default-focus-shadow-middle),var(--tabs-default-focus-shadow-outer)!important}:host(:focus) .tab-content.rounded{border-radius:.5rem}:host(:focus) .tab-content.pill{border-radius:1rem}:host::part(indicator){width:100%;height:2px;bottom:0;position:absolute;visibility:hidden}:host([selected]) .tab-content{border-radius:.25rem .25rem 0 0;color:var(--tabs-default-active);font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold)}:host([selected]) .tab-content:active{border-radius:.25rem .25rem 0 0}:host([selected]) .tab-content.pill{box-shadow:none;border-radius:1rem;background-color:var(--tabs-default-pressed)}:host([selected]) .tab-content.pill:active{border-radius:1rem}:host([selected]) .tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected]) .tab-content.rounded:active{border-radius:.5rem}:host([selected]) .tab-content.primary{font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold);background-color:var(--tabs-primary-bg-color);color:var(--tabs-primary-text-color)}:host([selected]) .tab-content.primary:hover{background-color:var(--tabs-primary-hover-bg-color)}:host([selected]) .tab-content.primary:active{background-color:var(--tabs-primary-pressed-bg-color)}:host([selected]) .tab-content.primary.disabled,:host([selected]) .tab-content.primary:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .tab-content.primary.line{background:rgba(0,0,0,0);color:var(--tabs-default-active)}:host([selected]) .tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}:host([selected]) .tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}:host([selected]) .tab-content.primary.line.disabled,:host([selected]) .tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .tab-content.pill.onlyIcon{border-radius:100%}:host([selected]) .tab-content.pill.onlyIcon:active{border-radius:100%}:host([selected][type=line][visible-tab])::part(indicator){visibility:visible!important;background-color:var(--tabs-default-active)}.test-compatibility-button{display:none}.tab-content.primary{color:var(--tabs-default-text-color);font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium)}.tab-content.primary.line{background:rgba(0,0,0,0)}.tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}.tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}.tab-content.primary.line.disabled,.tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([vertical]) .tab-content{text-align:left!important;justify-content:flex-start}:host([vertical]) .tab-content .tab-slot{justify-content:flex-start}:host([vertical][type=line]) .tab-content{border-radius:0 .25rem .25rem 0}:host([selected][vertical])::part(indicator){visibility:hidden}:host([selected][vertical]) .tab-content{border-radius:0 .25rem .25rem 0;box-shadow:var(--tabs-default-active-vertical-border,inset 2px 0 0 0 var(--tabs-default-active-border))}:host([selected][vertical]) .tab-content:active{border-radius:0 .25rem .25rem 0}:host([selected][vertical]) .tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected][vertical]) .tab-content.rounded:active{border-radius:.5rem}:host([selected][vertical]) .tab-content.pill{border-radius:1rem;box-shadow:none}:host([selected][vertical]) .tab-content.pill:active{border-radius:1rem}:host([selected][vertical]) .tab-content.pill.onlyIcon{border-radius:100%}:host([selected][vertical]) .tab-content.pill.onlyIcon:active{border-radius:100%}:host(:focus[selected]){background:rgba(0,0,0,0)}:host([viewporthidden]){display:none;height:auto!important;pointer-events:none;position:absolute;right:0;top:0;visibility:hidden;width:auto!important;z-index:-1}:host([measuringrealwidth]){width:auto!important}.tab-slot{display:inline-flex;justify-content:center;align-items:center;gap:.5rem;max-width:100%;height:100%}md-tooltip{display:inline-flex;align-items:center}::part(tooltip_reference){display:flex;align-items:center}slot .tab-content{align-items:center;display:flex}slot .tab-content img,slot .tab-content md-icon{margin-right:.5rem}slot .tab-content img{height:1rem;width:1rem}.tab-action-button{display:inline-flex;align-items:center;justify-content:center;margin-left:calc(.125rem*4);height:16px;width:16px}.tab-action-button:hover{cursor:pointer}.closable{display:flex;justify-content:space-between;align-items:center}md-icon:focus{border-radius:calc(.25rem/2);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--md-focus-border-color)}.tab-content{font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium);background:rgba(0,0,0,0);border:none;border-radius:.25rem;color:var(--tabs-default-text-color);display:inline-flex;height:100%;min-height:2.8125rem;padding:.3rem 1rem;position:relative;text-align:center;text-decoration:none;white-space:nowrap;width:100%;justify-content:center;align-items:center;user-select:none}.tab-content.disabled,.tab-content:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important;cursor:not-allowed}@media screen and (forced-colors:active){.tab-content.disabled,.tab-content:disabled{filter:brightness(1) contrast(1) saturate(1.5)}}.tab-content.disabled:hover,.tab-content:disabled:hover{background:0 0}.tab-content.disabled:focus,.tab-content:disabled:focus{outline:0!important;border:none!important}.tab-content ::slotted(span){display:flex;align-items:center;justify-content:center;gap:.5rem}.tab-content span{display:flex;align-items:center;justify-content:center;gap:.5rem}.tab-content:hover{border-radius:.25rem .25rem 0 0;background-color:var(--tabs-default-hover)}.tab-content:active{background-color:var(--tabs-default-pressed);outline:0}.tab-content:focus{outline:0}.tab-content.rounded{border-radius:.5rem}.tab-content.pill{border-radius:1rem}.tab-content.pill.onlyIcon{border-radius:100%}.tab-content.newMomentum{cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;min-height:1.75rem;padding:0 .625rem 0 .625rem}@media(forced-colors:active){:host{background-color:Canvas;box-shadow:none}:host .tab-content{border:none}:host([selected]) .tab-content{border-radius:.25rem .25rem 0 0;color:HighlightText!important;background-color:Highlight!important;forced-color-adjust:none}:host([selected]) .tab-content:active{border-radius:.25rem}:host(:focus) .tab-content{outline:2px solid Highlight!important;outline-offset:-2px;box-shadow:none;border:none}:host(:focus[selected]){background:Canvas}.tab-content:hover{outline:1px solid Highlight;outline-offset:-1px}.tab-content:focus:not(.disabled){outline:1px solid Highlight;outline-offset:-1px}.tab-content.disabled{forced-color-adjust:none;background-color:none;color:GrayText}}:host{display:flex;flex-direction:column;font-size:var(--font-size-body-midsize,14px);height:100%;padding:0;position:relative}.visible-tabs-slot{display:block;height:0;visibility:hidden;width:0}.visible-tabs-container{display:flex;flex-direction:row;width:100%}.visible-new-tabs:not(.md-tab__justified){width:auto;gap:4px}.md-tab__list{display:inline-flex;height:3rem;min-height:3rem;padding-left:.125rem;padding-top:.125rem;text-align:center;width:100%}.md-tab__list .md-menu-overlay__more{height:100%;margin-left:auto;width:auto;max-width:128.5px}.md-tab__list .md-menu-overlay__more .md-menu-overlay__overflow-label{display:inline-block;max-width:80px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list .md-menu-overlay__more.md-menu-overlay__more--hidden{display:none;pointer-events:none;visibility:hidden;width:0!important;z-index:-1}.md-tab__list .md-menu-overlay__more_tab{height:2rem;min-height:2.8125rem}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--measuring{opacity:0}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring){pointer-events:none;visibility:hidden;z-index:-1}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring)::part(tab){padding:0;border:none}.md-tab__list .md-menu-overlay__more_list{display:flex;flex-direction:column;padding:8px;height:auto;max-width:100%;width:100%;overflow-x:hidden}.md-tab__list .md-menu-overlay__more_list md-tab::part(tab){text-align:left;padding-left:16px;padding-right:16px;box-shadow:none;justify-content:flex-start}.md-tab__list .md-menu-overlay__more_list md-tab[selected]::part(tab){background-color:var(--md-menu-active-background-color);color:var(--tabs-default-active)}.md-tab__list.tab-new-momentum .md-menu-overlay__more_tab{min-height:0;padding:0}.md-tab__list md-menu-overlay::part(overlay){top:-.8125rem}.tab-new-momentum{height:2rem;min-height:2rem;padding:0}.tab-new-momentum img,.tab-new-momentum md-icon{margin-right:0!important}.md-tab__content{height:100%;overflow:hidden auto;padding:.125rem}md-menu-overlay md-tab md-tooltip{width:170px;position:relative;display:inline-flex;min-height:28px;align-items:center;overflow:hidden}md-menu-overlay md-tab md-tooltip .text-ellipsis{display:inline-block;vertical-align:middle;width:100%;max-width:100%;position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list ::slotted([slot=tab]){display:inline-block}.visible-tabs-container.md-tab__justified{display:flex;justify-content:space-between;padding-right:.125rem}.visible-tabs-container.md-tab__justified md-tab{display:inline-block;width:100%}.visible-tabs-container.md-tab__justified.md-tab__hug md-tab{width:auto}.md-tab__list ::slotted([slot=tab][selected]),.md-tab__list md-tab[selected]{color:var(--tabs-default-active)}.md-tab__list ::slotted([slot=tab][disabled]),.md-tab__list md-tab[disabled]{color:var(--tabs-default-disabled)}.md-tab__list ::slotted([slot=tab]:focus),.md-tab__list md-tab:focus{box-shadow:none}.md-tab__content ::slotted([slot=panel]){display:none;visibility:hidden}.md-tab__content ::slotted([slot=panel][selected]){display:block;visibility:visible}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:focus-visible){outline:2px solid var(--tabs-default-focus-border);outline-offset:calc(.125rem solid transparent*-2);outline-style:solid}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:not(:focus-visible)){outline:0;outline-offset:none;outline-style:none}.md-tab__content{display:block;flex:1 1 auto}.no-tabs-visible{display:none!important}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper{display:flex;align-items:center;justify-content:space-between;width:100%;height:4rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-left-arrow{margin-right:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-right-arrow{margin-left:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list{overflow-x:auto;white-space:nowrap;scroll-behavior:smooth;position:relative;display:inline-flex;gap:.5rem;height:2.625rem;padding:.3125rem;-webkit-overflow-scrolling:touch;scrollbar-width:none}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list::-webkit-scrollbar{display:none}:host([direction=vertical]){flex-direction:row}:host([direction=vertical]) .md-tab__list{border-right:1px solid var(--tabs-default-border-color);display:inline-flex;flex-direction:column;height:100%;justify-content:flex-start;width:auto}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab]){border-left:.125rem solid transparent;display:block;height:2rem;text-align:left}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab])[selected]{color:var(--tabs-default-active)}:host([direction=vertical]) .md-tab__content ::slotted([slot=panel]){padding-left:.625rem}@media(forced-colors:active){:host{--tabs-default-border-color:ButtonFace}}`}}]);
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[76],{30076:(t,e,o)=>{o.d(e,{A:()=>a});const a=o(41488).css`:host{box-sizing:border-box}:host(:focus){box-shadow:none!important;outline:0}:host(:focus) .tab-content{outline:2px solid var(--tabs-default-focus-border);outline-offset:-.125rem;box-shadow:var(--tabs-default-focus-shadow);border-radius:.25rem .25rem 0 0}:host(:focus) .tab-content.newMomentum{outline:0;box-shadow:var(--tabs-default-focus-shadow-inner),var(--tabs-default-focus-shadow-middle),var(--tabs-default-focus-shadow-outer)!important}:host(:focus) .tab-content.rounded{border-radius:.5rem}:host(:focus) .tab-content.pill{border-radius:1rem}:host::part(indicator){width:100%;height:2px;bottom:0;position:absolute;visibility:hidden}:host([selected]) .tab-content{border-radius:.25rem .25rem 0 0;color:var(--tabs-default-active);font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold)}:host([selected]) .tab-content:active{border-radius:.25rem .25rem 0 0}:host([selected]) .tab-content.pill{box-shadow:none;border-radius:1rem;background-color:var(--tabs-default-pressed)}:host([selected]) .tab-content.pill:active{border-radius:1rem}:host([selected]) .tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected]) .tab-content.rounded:active{border-radius:.5rem}:host([selected]) .tab-content.primary{font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold);background-color:var(--tabs-primary-bg-color);color:var(--tabs-primary-text-color)}:host([selected]) .tab-content.primary:hover{background-color:var(--tabs-primary-hover-bg-color)}:host([selected]) .tab-content.primary:active{background-color:var(--tabs-primary-pressed-bg-color)}:host([selected]) .tab-content.primary.disabled,:host([selected]) .tab-content.primary:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .tab-content.primary.line{background:rgba(0,0,0,0);color:var(--tabs-default-active)}:host([selected]) .tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}:host([selected]) .tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}:host([selected]) .tab-content.primary.line.disabled,:host([selected]) .tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .tab-content.pill.onlyIcon{border-radius:100%}:host([selected]) .tab-content.pill.onlyIcon:active{border-radius:100%}:host([selected][type=line][visible-tab])::part(indicator){visibility:visible!important;background-color:var(--tabs-default-active)}.test-compatibility-button{display:none}.tab-content.primary{color:var(--tabs-default-text-color);font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium)}.tab-content.primary.line{background:rgba(0,0,0,0)}.tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}.tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}.tab-content.primary.line.disabled,.tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([vertical]) .tab-content{text-align:left!important;justify-content:flex-start}:host([vertical]) .tab-content .tab-slot{justify-content:flex-start}:host([vertical][type=line]) .tab-content{border-radius:0 .25rem .25rem 0}:host([selected][vertical])::part(indicator){visibility:hidden}:host([selected][vertical]) .tab-content{border-radius:0 .25rem .25rem 0;box-shadow:var(--tabs-default-active-vertical-border,inset 2px 0 0 0 var(--tabs-default-active-border))}:host([selected][vertical]) .tab-content:active{border-radius:0 .25rem .25rem 0}:host([selected][vertical]) .tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected][vertical]) .tab-content.rounded:active{border-radius:.5rem}:host([selected][vertical]) .tab-content.pill{border-radius:1rem;box-shadow:none}:host([selected][vertical]) .tab-content.pill:active{border-radius:1rem}:host([selected][vertical]) .tab-content.pill.onlyIcon{border-radius:100%}:host([selected][vertical]) .tab-content.pill.onlyIcon:active{border-radius:100%}:host(:focus[selected]){background:rgba(0,0,0,0)}:host([viewporthidden]){display:none;height:auto!important;pointer-events:none;position:absolute;right:0;top:0;visibility:hidden;width:auto!important;z-index:-1}:host([measuringrealwidth]){width:auto!important}.tab-slot{display:inline-flex;justify-content:center;align-items:center;gap:.5rem;max-width:100%;height:100%}md-tooltip{display:inline-flex;align-items:center}::part(tooltip_reference){display:flex;align-items:center}slot .tab-content{align-items:center;display:flex}slot .tab-content img,slot .tab-content md-icon{margin-right:.5rem}slot .tab-content img{height:1rem;width:1rem}.tab-action-button{display:inline-flex;align-items:center;justify-content:center;margin-left:calc(.125rem*4);height:16px;width:16px}.tab-action-button:hover{cursor:pointer}.closable{display:flex;justify-content:space-between;align-items:center}md-icon:focus{border-radius:calc(.25rem/2);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--md-focus-border-color)}.tab-content{font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium);background:rgba(0,0,0,0);border:none;border-radius:.25rem;color:var(--tabs-default-text-color);display:inline-flex;height:100%;min-height:2.8125rem;padding:.3rem 1rem;position:relative;text-align:center;text-decoration:none;white-space:nowrap;width:100%;justify-content:center;align-items:center;user-select:none}.tab-content.disabled,.tab-content:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important;cursor:not-allowed}@media screen and (forced-colors:active){.tab-content.disabled,.tab-content:disabled{filter:brightness(1) contrast(1) saturate(1.5)}}.tab-content.disabled:hover,.tab-content:disabled:hover{background:0 0}.tab-content.disabled:focus,.tab-content:disabled:focus{outline:0!important;border:none!important}.tab-content ::slotted(span){display:flex;align-items:center;justify-content:center;gap:.5rem}.tab-content span{display:flex;align-items:center;justify-content:center;gap:.5rem}.tab-content:hover{border-radius:.25rem .25rem 0 0;background-color:var(--tabs-default-hover)}.tab-content:active{background-color:var(--tabs-default-pressed);outline:0}.tab-content:focus{outline:0}.tab-content.rounded{border-radius:.5rem}.tab-content.pill{border-radius:1rem}.tab-content.pill.onlyIcon{border-radius:100%}.tab-content.newMomentum{cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;min-height:1.75rem;padding:0 .625rem 0 .625rem}@media(forced-colors:active){:host{background-color:Canvas;box-shadow:none}:host .tab-content{border:none}:host([selected]) .tab-content{border-radius:.25rem .25rem 0 0;color:HighlightText!important;background-color:Highlight!important;forced-color-adjust:none}:host([selected]) .tab-content:active{border-radius:.25rem}:host(:focus) .tab-content{outline:2px solid Highlight!important;outline-offset:-2px;box-shadow:none;border:none}:host(:focus[selected]){background:Canvas}.tab-content:hover{outline:1px solid Highlight;outline-offset:-1px}.tab-content:focus:not(.disabled){outline:1px solid Highlight;outline-offset:-1px}.tab-content.disabled{forced-color-adjust:none;background-color:none;color:GrayText}}:host{display:flex;flex-direction:column;font-size:var(--font-size-body-midsize,14px);height:100%;padding:0;position:relative}.visible-tabs-slot{display:block;height:0;visibility:hidden;width:0}.visible-tabs-container{display:flex;flex-direction:row;width:100%}.visible-new-tabs:not(.md-tab__justified){width:auto;gap:4px}.md-tab__list{display:inline-flex;height:3rem;min-height:3rem;padding-left:.125rem;padding-top:.125rem;text-align:center;width:100%}.md-tab__list .md-menu-overlay__more{height:100%;margin-left:auto;width:auto;max-width:128.5px}.md-tab__list .md-menu-overlay__more .md-menu-overlay__overflow-label{display:inline-block;max-width:80px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list .md-menu-overlay__more.md-menu-overlay__more--hidden{display:none;pointer-events:none;visibility:hidden;width:0!important;z-index:-1}.md-tab__list .md-menu-overlay__more_tab{height:1.75rem;min-height:2.8125rem}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--measuring{opacity:0}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring){pointer-events:none;visibility:hidden;z-index:-1}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring)::part(tab){padding:0;border:none}.md-tab__list .md-menu-overlay__more_list{display:flex;flex-direction:column;padding:8px;height:auto;max-width:100%;width:100%;overflow-x:hidden}.md-tab__list .md-menu-overlay__more_list md-tab::part(tab){text-align:left;padding-left:16px;padding-right:16px;box-shadow:none;justify-content:flex-start}.md-tab__list .md-menu-overlay__more_list md-tab[selected]::part(tab){background-color:var(--md-menu-active-background-color);color:var(--tabs-default-active)}.md-tab__list.tab-new-momentum .md-menu-overlay__more_tab{min-height:0;padding:0}.md-tab__list md-menu-overlay::part(overlay){top:-.8125rem}.tab-new-momentum{height:1.75rem;min-height:1.75rem;padding:0}.tab-new-momentum img,.tab-new-momentum md-icon{margin-right:0!important}.md-tab__content{height:100%;overflow:hidden auto;padding:.125rem}md-menu-overlay md-tab md-tooltip{width:170px;position:relative;display:inline-flex;min-height:28px;align-items:center;overflow:hidden}md-menu-overlay md-tab md-tooltip .text-ellipsis{display:inline-block;vertical-align:middle;width:100%;max-width:100%;position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list ::slotted([slot=tab]){display:inline-block}.visible-tabs-container.md-tab__justified{display:flex;justify-content:space-between;padding-right:.125rem}.visible-tabs-container.md-tab__justified md-tab{display:inline-block;width:100%}.visible-tabs-container.md-tab__justified.md-tab__hug md-tab{width:auto}.md-tab__list ::slotted([slot=tab][selected]),.md-tab__list md-tab[selected]{color:var(--tabs-default-active)}.md-tab__list ::slotted([slot=tab][disabled]),.md-tab__list md-tab[disabled]{color:var(--tabs-default-disabled)}.md-tab__list ::slotted([slot=tab]:focus),.md-tab__list md-tab:focus{box-shadow:none}.md-tab__content ::slotted([slot=panel]){display:none;visibility:hidden}.md-tab__content ::slotted([slot=panel][selected]){display:block;visibility:visible}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:focus-visible){outline:2px solid var(--tabs-default-focus-border);outline-offset:calc(.125rem solid transparent*-2);outline-style:solid}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:not(:focus-visible)){outline:0;outline-offset:none;outline-style:none}.md-tab__content{display:block;flex:1 1 auto}.no-tabs-visible{display:none!important}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper{display:flex;align-items:center;justify-content:space-between;width:100%;height:2.25rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-left-arrow{margin-right:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-right-arrow{margin-left:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list{overflow-x:auto;white-space:nowrap;scroll-behavior:smooth;position:relative;display:inline-flex;gap:.5rem;height:calc(2.25rem + 2px);padding:.3125rem;-webkit-overflow-scrolling:touch;scrollbar-width:none}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list::-webkit-scrollbar{display:none}:host([direction=vertical]){flex-direction:row}:host([direction=vertical]) .md-tab__list{border-right:1px solid var(--tabs-default-border-color);display:inline-flex;flex-direction:column;height:100%;gap:.25rem;justify-content:flex-start;width:auto}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab]){border-left:.125rem solid transparent;display:block;height:1.75rem;text-align:left}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab])[selected]{color:var(--tabs-default-active)}:host([direction=vertical]) .md-tab__content ::slotted([slot=panel]){padding-left:.625rem}@media(forced-colors:active){:host{--tabs-default-border-color:ButtonFace}}`}}]);
|
package/dist/8028.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8028],{38028:(t,
|
|
2
|
-
<span class="md-avatar__letter ${(0,
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8028],{38028:(e,t,i)=>{i(61200),i(69788),i(15300);var n,a=i(31890),o=i(26283),s=i(26272),r=i(41488),c=i(40333),l=i(23968),h=i(97822),p=i(8229),d=i(37782),m=i(38923),y=i(3553),u=function(e,t,i,n){var a,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(o<3?a(s):o>3?a(t,i,s):a(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};!function(e){let t=class extends r.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-call-inbound":"incoming-call-legacy-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-facebook":"social-facebook-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold","channel-monitoring":"monitoring-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(e){const t=this._tabIndex;this._tabIndex=e,this.requestUpdate("tabIndex",t)}static get styles(){return[s.A,y.A]}isPresenceType(e){return m.e.includes(e)}firstUpdated(){const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e){const{presenceColor:t,presenceIcon:i}=(0,m.E)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=i}}updated(e){super.updated(e);const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t&&(e.has("type")||e.has("presenceType")||e.has("newMomentum"))){const{presenceColor:e,presenceIcon:i}=(0,m.E)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}e.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const e=this.title.trim().split(" ");return 1===e.length?e[0].charAt(0):e[0].charAt(0)+e[e.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(e){return this.iconNameMap[e]||""}get chatIconSize(){return this.iconSize}get presenceSize(){return this.size<=24?10.5:this.size<=32?14:this.size<=48?13.94:this.size<=64?18.58:this.size<=72?20.9:this.size<=88?25.55:36}get iconSize(){return 24===this.size?"16":28===this.size?"18":32===this.size?"20":36===this.size?"22":40===this.size?"24":48===this.size?"28":56===this.size?"32":64===this.size?"36":72===this.size?"40":Math.round(this.size/1.7).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?r.html` <md-loading></md-loading> `:c.nothing}get avatarLetter(){return this.title?r.html`
|
|
2
|
+
<span class="md-avatar__letter ${(0,l.classMap)(this.avatarLetterClassMap)}">
|
|
3
3
|
${this.pretifyTitle}
|
|
4
4
|
<slot></slot>
|
|
5
5
|
${this.renderIsTyping}
|
|
6
6
|
</span>
|
|
7
|
-
`:
|
|
8
|
-
<span class="md-avatar__icon ${(0,
|
|
7
|
+
`:c.nothing}get avatarIcon(){return r.html`
|
|
8
|
+
<span class="md-avatar__icon ${(0,l.classMap)(this.avatarStyleMap)}">
|
|
9
9
|
<md-icon
|
|
10
10
|
.name=${this.iconName}
|
|
11
11
|
.iconSet=${this.newMomentum?"momentumDesign":"momentumUI"}
|
|
@@ -13,30 +13,31 @@
|
|
|
13
13
|
></md-icon>
|
|
14
14
|
</span>
|
|
15
15
|
`}get avatarImage(){return r.html`
|
|
16
|
-
${(0,d.until)(this.loadImage().then((
|
|
17
|
-
`}loadImage(){return
|
|
16
|
+
${(0,d.until)(this.loadImage().then((e=>(this.handleImageLoad(),r.html` ${e} `))).catch((()=>this.handleImageError())),r.html` ${this.iconName?this.avatarIcon:this.title?r.html` ${this.avatarLetter} `:c.nothing} `)}
|
|
17
|
+
`}loadImage(){return e=this,t=void 0,n=function*(){return new Promise(((e,t)=>{const i=document.createElement("img");i.src=this.src,i.alt=this.alt,i.onload=()=>e(i),i.onerror=e=>t(e),i.classList.add("md-avatar__img"),i.classList.toggle("md-avatar__img--hidden",!this.imageLoaded)}))},new((i=void 0)||(i=Promise))((function(a,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,r)}c((n=n.apply(e,t||[])).next())}));var e,t,i,n}handleImageLoad(){this.imageLoaded=!0}handleImageError(){this.imageErrored=!0}handleKeyDown(e){if(!this.clickable)return;const{code:t}=e;(0,o.o)(t)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:e}}))}handleClick(e){var t;this.clickable&&(null===(t=this.clickFunction)||void 0===t||t.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:e}})))}getBrandOrDesignIconSet(e){return new Set(["webex-app-icon-color-container","social-fbmessenger-color","social-facebook-color","apple-business-chat-color","social-line-color","social-viber-color","social-x","social-whatsapp-color","social-wechat-color"]).has(e)?"momentumBrandVisuals":"momentumDesign"}get avatarContent(){return this.src&&!this.imageErrored?this.avatarImage:this.iconName?this.avatarIcon:this.title?this.avatarLetter:c.nothing}renderPresence(){return this.newMomentum&&(this.presenceType||this.type)&&"self"!==this.type&&this.presenceIcon?r.html`
|
|
18
18
|
<md-presence
|
|
19
19
|
class="avatar-presence"
|
|
20
|
+
name="${this.presenceIcon}"
|
|
21
|
+
color="${this.presenceColor}"
|
|
20
22
|
size="${this.presenceSize}"
|
|
21
|
-
presence-type="${this.presenceType}"
|
|
22
23
|
.failurePresence=${this.failurePresence}
|
|
23
24
|
.newMomentum=${this.newMomentum}
|
|
24
25
|
.avatarLinked=${!0}
|
|
25
26
|
>
|
|
26
27
|
</md-presence>
|
|
27
|
-
`:
|
|
28
|
+
`:c.nothing}renderAvatarContent(){const e=this.getIconName(this.type);if("channel-custom"===this.type)return r.html`
|
|
28
29
|
<span class="md-avatar__logo" data-channel-style=${this.avatarStyle} data-channel-state=${this.state}>
|
|
29
30
|
<slot></slot>
|
|
30
31
|
</span>
|
|
31
|
-
`;if(
|
|
32
|
+
`;if(e){const t=this.getBrandOrDesignIconSet(e);return r.html`
|
|
32
33
|
<span
|
|
33
34
|
class="md-avatar__logo ${this.type}"
|
|
34
35
|
data-channel-style=${this.avatarStyle}
|
|
35
36
|
data-channel-state=${this.state}
|
|
36
37
|
>
|
|
37
38
|
<md-icon
|
|
38
|
-
.name=${
|
|
39
|
-
.iconSet=${
|
|
39
|
+
.name=${e}
|
|
40
|
+
.iconSet=${t}
|
|
40
41
|
.size=${this.chatIconSize}
|
|
41
42
|
color="var(--icon-color-${this.type})"
|
|
42
43
|
></md-icon>
|
|
@@ -45,10 +46,10 @@
|
|
|
45
46
|
<div
|
|
46
47
|
part="avatar"
|
|
47
48
|
class="md-avatar
|
|
48
|
-
${(0,
|
|
49
|
+
${(0,l.classMap)(this.avatarClassMap)}"
|
|
49
50
|
role=${this.role}
|
|
50
|
-
@click=${
|
|
51
|
-
@keydown=${
|
|
51
|
+
@click=${e=>this.handleClick(e)}
|
|
52
|
+
@keydown=${e=>this.handleKeyDown(e)}
|
|
52
53
|
tabindex=${(0,h.ifDefined)(this.tabIndex||void 0)}
|
|
53
54
|
aria-label=${(0,h.ifDefined)(this.label)}
|
|
54
55
|
>
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
<md-icon .name=${this.chatIconName} .iconSet=${"momentumDesign"} .size=${this.chatIconSize}></md-icon>
|
|
58
59
|
</span>
|
|
59
60
|
`:this.renderAvatarContent()}
|
|
60
|
-
${this.hasNotification?r.html` <span class="md-avatar__notification-badge"></span> `:
|
|
61
|
+
${this.hasNotification?r.html` <span class="md-avatar__notification-badge"></span> `:c.nothing}
|
|
61
62
|
${this.renderPresence()}
|
|
62
63
|
</div>
|
|
63
|
-
`}};u([(0,r.property)({type:Number,attribute:"tab-index",reflect:!0})],
|
|
64
|
+
`}};u([(0,r.property)({type:Number,attribute:"tab-index",reflect:!0})],t.prototype,"tabIndex",null),u([(0,r.property)({type:String})],t.prototype,"alt",void 0),u([(0,r.property)({type:String})],t.prototype,"src",void 0),u([(0,r.property)({type:String})],t.prototype,"label",void 0),u([(0,r.property)({type:String})],t.prototype,"title",void 0),u([(0,r.property)({type:String})],t.prototype,"color",void 0),u([(0,r.property)({type:Boolean})],t.prototype,"decrypting",void 0),u([(0,r.property)({type:String})],t.prototype,"role",void 0),u([(0,r.property)({type:String,attribute:"icon-name"})],t.prototype,"iconName",void 0),u([(0,r.property)({type:Boolean})],t.prototype,"failurePresence",void 0),u([(0,r.property)({type:String})],t.prototype,"type",void 0),u([(0,r.property)({type:String,attribute:"presence-type"})],t.prototype,"presenceType",void 0),u([(0,r.property)({type:Boolean})],t.prototype,"newMomentum",void 0),u([(0,r.property)({type:Boolean})],t.prototype,"typing",void 0),u([(0,r.property)({type:Number})],t.prototype,"size",void 0),u([(0,r.property)({type:Boolean,attribute:"has-notification"})],t.prototype,"hasNotification",void 0),u([(0,r.property)({type:Boolean})],t.prototype,"clickable",void 0),u([(0,r.property)({attribute:!1})],t.prototype,"clickFunction",void 0),u([(0,r.property)({type:String,attribute:"avatar-style"})],t.prototype,"avatarStyle",void 0),u([(0,r.property)({type:String})],t.prototype,"state",void 0),u([(0,r.internalProperty)()],t.prototype,"imageLoaded",void 0),u([(0,r.internalProperty)()],t.prototype,"imageErrored",void 0),u([(0,r.internalProperty)()],t.prototype,"presenceColor",void 0),u([(0,r.internalProperty)()],t.prototype,"presenceIcon",void 0),t=u([(0,a.w)("md-avatar")],t),e.ELEMENT=t}(n||(n={}))}}]);
|
package/dist/8923.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8923],{38923:(e,a,r)=>{r.d(a,{
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8923],{38923:(e,a,r)=>{r.d(a,{E:()=>s,e:()=>c});var n=r(31465);const c=["active","meeting","schedule","call","dnd","presenting","quiet-hours","away","idle","inactive","away-calling","ooo","busy","on-mobile","on-device","on-hold","engaged","rona",""],s=(e,a,r=!1)=>{let c="",s="";if(a)c="warning-badge-filled",s="var(--avatar-presence-warning)";else{if(!e)return{presenceIcon:void 0,presenceColor:void 0};switch(e){case"active":c="active-presence-small-filled",s="var(--avatar-presence-active)";break;case"meeting":c=r?"camera-presence-filled":"camera-presence_14",s="var(--avatar-presence-unstable)";break;case"schedule":c=r?"meetings-presence-badge-filled":"meetings-presence_14",s="var(--avatar-presence-unstable)";break;case"call":c=r?"handset-filled":"handset-active_16",s="var(--avatar-presence-unstable)";break;case"dnd":c=r?"dnd-presence-badge-filled":"dnd-presence_14",s="var(--avatar-presence-dnd)";break;case"presenting":c=r?"share-screen-badge-filled":"content-share_14",s="var(--avatar-presence-dnd)";break;case"quiet-hours":c="quiet-hours-presence-filled",s="var(--avatar-presence-inactive)";break;case"away":case"idle":case"inactive":c=r?"recents-presence-badge-filled":"recents-presence_14",s="var(--avatar-presence-inactive)";break;case"away-calling":c="away-calling-presence-filled",s="var(--avatar-presence-inactive)";break;case"ooo":c="pto-presence-filled",s="var(--avatar-presence-inactive)";break;case"busy":c="busy-presence-bold",s="var(--avatar-presence-unstable)";break;case"on-mobile":c="phone-filled",s="var(--avatar-presence-inactive)";break;case"on-device":c=r?"generic-device-video-filled":"generic-device-video_16",s="var(--avatar-presence-inactive)";break;case"on-hold":case n.j.HOLD:c="pause-badge-filled",s="var(--avatar-presence-inactive)";break;case"engaged":c="busy-presence-bold",s="var(--avatar-presence-engaged)";break;case"rona":c="dnd-presence-badge-filled",s="var(--avatar-presence-rona)";break;case n.j.CONSULTING:c="headset-bold",s="var(--avatar-presence-inactive)";break;case n.j.PLAY:c="play-bold",s="var(--avatar-presence-inactive)";break;case n.j.CONFERENCE:c="meet-bold",s="var(--avatar-presence-inactive)";break;case n.j.TRANSFERED:c="assign-privilege-bold",s="var(--avatar-presence-inactive)";break;case n.j.COURTESY_CALLBACK:c="callrate-bold",s="var(--avatar-presence-inactive)";break;case n.j.CAMPAIGN:c="announcement-bold",s="var(--avatar-presence-inactive)"}}return{presenceColor:s,presenceIcon:c}}}}]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/until.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/until.js"]);for(var
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/until.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/until.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,n,o,s,a,l,c)=>(()=>{"use strict";var p,h={8229:e=>{e.exports=t},17518:e=>{e.exports=l},23968:e=>{e.exports=r},32022:e=>{e.exports=o},37782:e=>{e.exports=c},38028:(e,t,i)=>{i.r(t),i.d(t,{Avatar:()=>r}),i(61200),i(69788),i(15300);var r,n=i(31890),o=i(26283),s=i(26272),a=i(41488),l=i(40333),c=i(23968),p=i(97822),h=i(8229),m=i(37782),d=i(38923),u=i(3553),y=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-call-inbound":"incoming-call-legacy-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-facebook":"social-facebook-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold","channel-monitoring":"monitoring-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(e){const t=this._tabIndex;this._tabIndex=e,this.requestUpdate("tabIndex",t)}static get styles(){return[s.A,u.A]}isPresenceType(e){return d.e.includes(e)}firstUpdated(){const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e){const{presenceColor:t,presenceIcon:i}=(0,d.E)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=i}}updated(e){super.updated(e);const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t&&(e.has("type")||e.has("presenceType")||e.has("newMomentum"))){const{presenceColor:e,presenceIcon:i}=(0,d.E)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}e.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const e=this.title.trim().split(" ");return 1===e.length?e[0].charAt(0):e[0].charAt(0)+e[e.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(e){return this.iconNameMap[e]||""}get chatIconSize(){return this.iconSize}get presenceSize(){return this.size<=24?10.5:this.size<=32?14:this.size<=48?13.94:this.size<=64?18.58:this.size<=72?20.9:this.size<=88?25.55:36}get iconSize(){return 24===this.size?"16":28===this.size?"18":32===this.size?"20":36===this.size?"22":40===this.size?"24":48===this.size?"28":56===this.size?"32":64===this.size?"36":72===this.size?"40":Math.round(this.size/1.7).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?a.html` <md-loading></md-loading> `:l.nothing}get avatarLetter(){return this.title?a.html`
|
|
2
2
|
<span class="md-avatar__letter ${(0,c.classMap)(this.avatarLetterClassMap)}">
|
|
3
3
|
${this.pretifyTitle}
|
|
4
4
|
<slot></slot>
|
|
5
5
|
${this.renderIsTyping}
|
|
6
6
|
</span>
|
|
7
|
-
`:l.nothing}get avatarIcon(){return
|
|
7
|
+
`:l.nothing}get avatarIcon(){return a.html`
|
|
8
8
|
<span class="md-avatar__icon ${(0,c.classMap)(this.avatarStyleMap)}">
|
|
9
9
|
<md-icon
|
|
10
10
|
.name=${this.iconName}
|
|
@@ -12,23 +12,24 @@
|
|
|
12
12
|
.size=${this.newMomentum?this.iconSize:""}
|
|
13
13
|
></md-icon>
|
|
14
14
|
</span>
|
|
15
|
-
`}get avatarImage(){return
|
|
16
|
-
${(0,m.until)(this.loadImage().then((e=>(this.handleImageLoad(),
|
|
17
|
-
`}loadImage(){return e=this,t=void 0,
|
|
15
|
+
`}get avatarImage(){return a.html`
|
|
16
|
+
${(0,m.until)(this.loadImage().then((e=>(this.handleImageLoad(),a.html` ${e} `))).catch((()=>this.handleImageError())),a.html` ${this.iconName?this.avatarIcon:this.title?a.html` ${this.avatarLetter} `:l.nothing} `)}
|
|
17
|
+
`}loadImage(){return e=this,t=void 0,r=function*(){return new Promise(((e,t)=>{const i=document.createElement("img");i.src=this.src,i.alt=this.alt,i.onload=()=>e(i),i.onerror=e=>t(e),i.classList.add("md-avatar__img"),i.classList.toggle("md-avatar__img--hidden",!this.imageLoaded)}))},new((i=void 0)||(i=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}));var e,t,i,r}handleImageLoad(){this.imageLoaded=!0}handleImageError(){this.imageErrored=!0}handleKeyDown(e){if(!this.clickable)return;const{code:t}=e;(0,o.o)(t)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:e}}))}handleClick(e){var t;this.clickable&&(null===(t=this.clickFunction)||void 0===t||t.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:e}})))}getBrandOrDesignIconSet(e){return new Set(["webex-app-icon-color-container","social-fbmessenger-color","social-facebook-color","apple-business-chat-color","social-line-color","social-viber-color","social-x","social-whatsapp-color","social-wechat-color"]).has(e)?"momentumBrandVisuals":"momentumDesign"}get avatarContent(){return this.src&&!this.imageErrored?this.avatarImage:this.iconName?this.avatarIcon:this.title?this.avatarLetter:l.nothing}renderPresence(){return this.newMomentum&&(this.presenceType||this.type)&&"self"!==this.type&&this.presenceIcon?a.html`
|
|
18
18
|
<md-presence
|
|
19
19
|
class="avatar-presence"
|
|
20
|
+
name="${this.presenceIcon}"
|
|
21
|
+
color="${this.presenceColor}"
|
|
20
22
|
size="${this.presenceSize}"
|
|
21
|
-
presence-type="${this.presenceType}"
|
|
22
23
|
.failurePresence=${this.failurePresence}
|
|
23
24
|
.newMomentum=${this.newMomentum}
|
|
24
25
|
.avatarLinked=${!0}
|
|
25
26
|
>
|
|
26
27
|
</md-presence>
|
|
27
|
-
`:l.nothing}renderAvatarContent(){const e=this.getIconName(this.type);if("channel-custom"===this.type)return
|
|
28
|
+
`:l.nothing}renderAvatarContent(){const e=this.getIconName(this.type);if("channel-custom"===this.type)return a.html`
|
|
28
29
|
<span class="md-avatar__logo" data-channel-style=${this.avatarStyle} data-channel-state=${this.state}>
|
|
29
30
|
<slot></slot>
|
|
30
31
|
</span>
|
|
31
|
-
`;if(e){const t=this.getBrandOrDesignIconSet(e);return
|
|
32
|
+
`;if(e){const t=this.getBrandOrDesignIconSet(e);return a.html`
|
|
32
33
|
<span
|
|
33
34
|
class="md-avatar__logo ${this.type}"
|
|
34
35
|
data-channel-style=${this.avatarStyle}
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
color="var(--icon-color-${this.type})"
|
|
42
43
|
></md-icon>
|
|
43
44
|
</span>
|
|
44
|
-
`}return this.avatarContent}render(){return
|
|
45
|
+
`}return this.avatarContent}render(){return a.html`
|
|
45
46
|
<div
|
|
46
47
|
part="avatar"
|
|
47
48
|
class="md-avatar
|
|
@@ -52,12 +53,12 @@
|
|
|
52
53
|
tabindex=${(0,p.ifDefined)(this.tabIndex||void 0)}
|
|
53
54
|
aria-label=${(0,p.ifDefined)(this.label)}
|
|
54
55
|
>
|
|
55
|
-
${"self"===this.type?
|
|
56
|
+
${"self"===this.type?a.html`
|
|
56
57
|
<span class="md-avatar__self" style=${(0,h.styleMap)(this.avatarStyleMap)}>
|
|
57
58
|
<md-icon .name=${this.chatIconName} .iconSet=${"momentumDesign"} .size=${this.chatIconSize}></md-icon>
|
|
58
59
|
</span>
|
|
59
60
|
`:this.renderAvatarContent()}
|
|
60
|
-
${this.hasNotification?
|
|
61
|
+
${this.hasNotification?a.html` <span class="md-avatar__notification-badge"></span> `:l.nothing}
|
|
61
62
|
${this.renderPresence()}
|
|
62
63
|
</div>
|
|
63
|
-
`}};y([(0,
|
|
64
|
+
`}};y([(0,a.property)({type:Number,attribute:"tab-index",reflect:!0})],t.prototype,"tabIndex",null),y([(0,a.property)({type:String})],t.prototype,"alt",void 0),y([(0,a.property)({type:String})],t.prototype,"src",void 0),y([(0,a.property)({type:String})],t.prototype,"label",void 0),y([(0,a.property)({type:String})],t.prototype,"title",void 0),y([(0,a.property)({type:String})],t.prototype,"color",void 0),y([(0,a.property)({type:Boolean})],t.prototype,"decrypting",void 0),y([(0,a.property)({type:String})],t.prototype,"role",void 0),y([(0,a.property)({type:String,attribute:"icon-name"})],t.prototype,"iconName",void 0),y([(0,a.property)({type:Boolean})],t.prototype,"failurePresence",void 0),y([(0,a.property)({type:String})],t.prototype,"type",void 0),y([(0,a.property)({type:String,attribute:"presence-type"})],t.prototype,"presenceType",void 0),y([(0,a.property)({type:Boolean})],t.prototype,"newMomentum",void 0),y([(0,a.property)({type:Boolean})],t.prototype,"typing",void 0),y([(0,a.property)({type:Number})],t.prototype,"size",void 0),y([(0,a.property)({type:Boolean,attribute:"has-notification"})],t.prototype,"hasNotification",void 0),y([(0,a.property)({type:Boolean})],t.prototype,"clickable",void 0),y([(0,a.property)({attribute:!1})],t.prototype,"clickFunction",void 0),y([(0,a.property)({type:String,attribute:"avatar-style"})],t.prototype,"avatarStyle",void 0),y([(0,a.property)({type:String})],t.prototype,"state",void 0),y([(0,a.internalProperty)()],t.prototype,"imageLoaded",void 0),y([(0,a.internalProperty)()],t.prototype,"imageErrored",void 0),y([(0,a.internalProperty)()],t.prototype,"presenceColor",void 0),y([(0,a.internalProperty)()],t.prototype,"presenceIcon",void 0),t=y([(0,n.w)("md-avatar")],t),e.ELEMENT=t}(r||(r={}))},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=s},85314:e=>{e.exports=a},97822:e=>{e.exports=n}},m={};function d(e){var t=m[e];if(void 0!==t)return t.exports;var i=m[e]={exports:{}};return h[e](i,i.exports,d),i.exports}d.m=h,p=[],d.O=(e,t,i,r)=>{if(!t){var n=1/0;for(l=0;l<p.length;l++){for(var[t,i,r]=p[l],o=!0,s=0;s<t.length;s++)(!1&r||n>=r)&&Object.keys(d.O).every((e=>d.O[e](t[s])))?t.splice(s--,1):(o=!1,r<n&&(n=r));if(o){p.splice(l--,1);var a=i();void 0!==a&&(e=a)}}return e}r=r||0;for(var l=p.length;l>0&&p[l-1][2]>r;l--)p[l]=p[l-1];p[l]=[t,i,r]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={8028:0,8115:0};d.O.j=t=>0===e[t];var t=(t,i)=>{var r,n,[o,s,a]=i,l=0;if(o.some((t=>0!==e[t]))){for(r in s)d.o(s,r)&&(d.m[r]=s[r]);if(a)var c=a(d)}for(t&&t(i);l<o.length;l++)n=o[l],d.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return d.O(c)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=d.O(void 0,[7678,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,3553,6877,6700,8923,7119,1465],(()=>d(38028)));return d.O(u)})()));
|