@momentum-ui/web-components 2.16.12 → 2.16.14
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/chunks/md-10.js +1 -1
- package/dist/chunks/md-11.js +1 -1
- package/dist/chunks/md-14.js +2 -2
- package/dist/chunks/md-15.js +1 -1
- package/dist/chunks/md-17.js +1 -1
- package/dist/chunks/md-18.js +1 -1
- package/dist/chunks/md-19.js +1 -1
- package/dist/chunks/md-20.js +1 -1
- package/dist/chunks/md-21.js +1 -1
- package/dist/chunks/md-22.js +1 -1
- package/dist/chunks/md-25.js +1 -1
- package/dist/chunks/md-27.js +1 -1
- package/dist/chunks/md-28.js +1 -1
- package/dist/chunks/md-29.js +1 -1
- package/dist/chunks/md-30.js +1 -1
- package/dist/chunks/md-31.js +1 -1
- package/dist/chunks/md-32.js +1 -1
- package/dist/chunks/md-33.js +1 -1
- package/dist/chunks/md-34.js +9 -9
- package/dist/chunks/md-35.js +3 -3
- package/dist/chunks/md-37.js +1 -1
- package/dist/chunks/md-38.js +1 -1
- package/dist/chunks/md-39.js +1 -1
- package/dist/chunks/md-41.js +1 -1
- package/dist/chunks/md-42.js +1 -1
- package/dist/chunks/md-43.js +1 -1
- package/dist/chunks/md-44.js +1 -1
- package/dist/chunks/md-45.js +2 -2
- package/dist/chunks/md-46.js +1 -1
- package/dist/chunks/md-47.js +1 -27
- package/dist/chunks/md-48.js +26 -4
- package/dist/chunks/md-49.js +4 -37
- package/dist/chunks/md-5.js +1 -1
- package/dist/chunks/md-50.js +38 -13
- package/dist/chunks/md-51.js +12 -33
- package/dist/chunks/md-52.js +34 -20
- package/dist/chunks/md-53.js +18 -119
- package/dist/chunks/md-54.js +114 -91
- package/dist/chunks/md-55.js +98 -11
- package/dist/chunks/md-56.js +11 -5
- package/dist/chunks/md-57.js +4 -76
- package/dist/chunks/md-58.js +68 -59
- package/dist/chunks/md-59.js +64 -18
- package/dist/chunks/md-6.js +2 -2
- package/dist/chunks/md-60.js +22 -14
- package/dist/chunks/md-61.js +14 -5
- package/dist/chunks/md-62.js +5 -51
- package/dist/chunks/md-63.js +51 -22
- package/dist/chunks/md-64.js +19 -44
- package/dist/chunks/md-65.js +46 -4
- package/dist/chunks/md-66.js +5 -1
- package/dist/chunks/md-67.js +1 -23
- package/dist/chunks/md-68.js +23 -5
- package/dist/chunks/md-69.js +4 -10
- package/dist/chunks/md-70.js +9 -136
- package/dist/chunks/md-71.js +135 -27
- package/dist/chunks/md-72.js +29 -69
- package/dist/chunks/md-73.js +70 -19
- package/dist/chunks/md-74.js +19 -22
- package/dist/chunks/md-75.js +21 -16
- package/dist/chunks/md-76.js +17 -76
- package/dist/chunks/md-77.js +76 -7
- package/dist/chunks/md-78.js +7 -72
- package/dist/chunks/md-79.js +72 -77
- package/dist/chunks/md-80.js +78 -71
- package/dist/chunks/md-81.js +69 -15
- package/dist/chunks/md-82.js +16 -4
- package/dist/chunks/md-83.js +4 -18
- package/dist/chunks/md-84.js +19 -1
- package/dist/chunks/md-85.js +1 -168
- package/dist/chunks/md-86.js +167 -42
- package/dist/chunks/md-87.js +41 -99
- package/dist/chunks/md-88.js +94 -75
- package/dist/chunks/md-89.js +81 -11
- package/dist/chunks/md-90.js +11 -42
- package/dist/chunks/md-91.js +41 -32
- package/dist/chunks/md-92.js +34 -1
- package/dist/comp/md-accordion-entry.js +1 -1
- package/dist/comp/md-accordion-item-entry.js +1 -1
- package/dist/comp/md-accordion-item.js +1 -1
- package/dist/comp/md-accordion.js +1 -1
- package/dist/comp/md-activity-button-entry.js +1 -1
- package/dist/comp/md-activity-button.js +1 -1
- package/dist/comp/md-advance-list-entry.js +1 -1
- package/dist/comp/md-advance-list.js +1 -1
- package/dist/comp/md-alert-banner-entry.js +1 -1
- package/dist/comp/md-alert-banner.js +1 -1
- package/dist/comp/md-alert-entry.js +1 -1
- package/dist/comp/md-alert.js +1 -1
- package/dist/comp/md-audio-player-entry.js +1 -1
- package/dist/comp/md-audio-player.js +1 -1
- package/dist/comp/md-avatar-entry.js +1 -1
- package/dist/comp/md-badge-entry.js +1 -1
- package/dist/comp/md-breadcrumb-entry.js +1 -1
- package/dist/comp/md-breadcrumb.js +1 -1
- package/dist/comp/md-button-group-entry.js +1 -1
- package/dist/comp/md-button-group.js +1 -1
- package/dist/comp/md-card-ai-entry.js +1 -1
- package/dist/comp/md-card-ai.js +1 -1
- package/dist/comp/md-card-entry.js +1 -1
- package/dist/comp/md-card.js +1 -1
- package/dist/comp/md-chat-message-entry.js +1 -1
- package/dist/comp/md-chat-message.js +1 -1
- package/dist/comp/md-checkbox-entry.js +1 -1
- package/dist/comp/md-checkbox.js +1 -1
- package/dist/comp/md-checkboxgroup-entry.js +1 -1
- package/dist/comp/md-checkboxgroup.js +1 -1
- package/dist/comp/md-chip-entry.js +1 -1
- package/dist/comp/md-chip.js +1 -1
- package/dist/comp/md-coachmark-entry.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +1 -1
- package/dist/comp/md-coachmark-popover.js +1 -1
- package/dist/comp/md-coachmark.js +1 -1
- package/dist/comp/md-combobox-entry.js +1 -1
- package/dist/comp/md-composite-avatar-entry.js +1 -1
- package/dist/comp/md-composite-avatar.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-range-picker.js +1 -1
- package/dist/comp/md-date-time-picker-entry.js +1 -1
- package/dist/comp/md-date-time-picker.js +1 -1
- package/dist/comp/md-datepicker-calendar-entry.js +1 -1
- package/dist/comp/md-datepicker-day-entry.js +1 -1
- package/dist/comp/md-datepicker-entry.js +1 -1
- package/dist/comp/md-datepicker-month-entry.js +1 -1
- package/dist/comp/md-datepicker-week-entry.js +1 -1
- package/dist/comp/md-draggable-entry.js +1 -1
- package/dist/comp/md-draggable-item-entry.js +1 -1
- package/dist/comp/md-draggable-item.js +1 -1
- package/dist/comp/md-draggable.js +1 -1
- package/dist/comp/md-dropdown-entry.js +1 -1
- package/dist/comp/md-dropdown.js +1 -1
- package/dist/comp/md-editable-field-entry.js +1 -1
- package/dist/comp/md-editable-field.js +1 -1
- package/dist/comp/md-favorite-entry.js +1 -1
- package/dist/comp/md-floating-minimize-entry.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +1 -1
- package/dist/comp/md-floating-modal.js +1 -1
- package/dist/comp/md-form-entry.js +1 -1
- package/dist/comp/md-form.js +1 -1
- package/dist/comp/md-grabber-entry.js +1 -1
- package/dist/comp/md-grabber.js +1 -1
- package/dist/comp/md-help-text-entry.js +1 -1
- package/dist/comp/md-icon-entry.js +1 -1
- package/dist/comp/md-inpu.js +1 -1
- package/dist/comp/md-input-entry.js +1 -1
- package/dist/comp/md-input-file.js +1 -1
- package/dist/comp/md-label-entry.js +1 -1
- package/dist/comp/md-list-entry.js +1 -1
- package/dist/comp/md-list-item-entry.js +1 -1
- package/dist/comp/md-meeting-alert-entry.js +1 -1
- package/dist/comp/md-meeting-alert.js +1 -1
- package/dist/comp/md-menu-entry.js +1 -1
- package/dist/comp/md-menu-item-entry.js +1 -1
- package/dist/comp/md-menu.js +1 -1
- package/dist/comp/md-modal-entry.js +1 -1
- package/dist/comp/md-modal.js +2 -1
- package/dist/comp/md-pagination-entry.js +1 -1
- package/dist/comp/md-pagination.js +1 -1
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-phone-input.js +1 -1
- package/dist/comp/md-popover-entry.js +1 -1
- package/dist/comp/md-radio-entry.js +1 -1
- package/dist/comp/md-radio.js +2 -2
- package/dist/comp/md-radiogroup-entry.js +1 -1
- package/dist/comp/md-radiogroup.js +2 -2
- package/dist/comp/md-slider-entry.js +1 -1
- package/dist/comp/md-slider.js +1 -1
- package/dist/comp/md-spinner-entry.js +1 -1
- package/dist/comp/md-tab-entry.js +1 -1
- package/dist/comp/md-tab-panel-entry.js +1 -1
- package/dist/comp/md-tab-panel.js +1 -1
- package/dist/comp/md-tab.js +1 -1
- package/dist/comp/md-table-advanced-entry.js +1 -1
- package/dist/comp/md-table-advanced.js +1 -1
- package/dist/comp/md-table-entry.js +1 -1
- package/dist/comp/md-table.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-tabs.js +2 -2
- package/dist/comp/md-task-item-entry.js +1 -1
- package/dist/comp/md-task-item.js +1 -1
- package/dist/comp/md-theme-entry.js +1 -1
- package/dist/comp/md-theme.js +1 -1
- package/dist/comp/md-timepicker-entry.js +1 -1
- package/dist/comp/md-timepicker.js +1 -1
- package/dist/comp/md-toggle-switch-entry.js +1 -1
- package/dist/comp/md-toggle-switch.js +1 -1
- package/dist/index-entry.js +2 -2
- package/dist/index.js +36 -36
- package/dist/managers/thememanager-entry.js +1 -1
- package/dist/managers/thememanager.js +1 -1
- package/dist/types/components/grabber/Grabber.d.ts +1 -0
- package/dist/types/components/link/Link.d.ts +7 -0
- package/dist/types/components/modal/Modal.d.ts +4 -0
- package/package.json +2 -2
package/dist/chunks/md-45.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[45],{
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[45],{61:function(e,t,d){"use strict";d.r(t),d.d(t,"MenuItem",(function(){return s}));var s,i=d(6),n=d(5),a=d(0),l=d(4),r=d(3),m=d(70),o=function(e,t,d,s){var i,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,d):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,d,s);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(n<3?i(a):n>3?i(t,d,a):i(t,d))||a);return n>3&&a&&Object.defineProperty(t,d,a),a};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.href="",this.label="",this.tabIndex=-1,this._disabled=!1,this._selected=!1}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",""+e),this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}get selected(){return this._selected}set selected(e){const t=this._selected;this._selected=e,e&&this.notifySelectedItem(),this.setAttribute("aria-selected",""+e),this.requestUpdate("selected",t)}static get styles(){return[i.a,m.a]}setupEvents(){this.addEventListener("mousedown",this.handleClick),this.addEventListener("keydown",this.handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this.label&&this.setAttribute("aria-label",this.label),this.setupEvents()}update(e){super.update(e),e.has("disabled")&&(this.selected=!1,this.setAttribute("aria-disabled",""+this.disabled))}handleClick(e){e.preventDefault(),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("menu-item-keydown",{detail:{id:this.id,key:e.code,srcEvent:e},bubbles:!0,composed:!0}))}notifySelectedItem(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}get menuItemClassMap(){return{"md-menu-item--selected":this.selected,disabled:this.disabled}}render(){return a.html`
|
|
2
2
|
<li
|
|
3
3
|
role="menuitem"
|
|
4
4
|
part="menu-item"
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
<slot></slot>
|
|
14
14
|
</a>
|
|
15
15
|
</li>
|
|
16
|
-
`}};o([Object(a.property)({type:String})],t.prototype,"href",void 0),o([Object(a.property)({type:String})],t.prototype,"label",void 0),o([Object(a.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),o([Object(a.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),o([Object(a.property)({type:Boolean,reflect:!0})],t.prototype,"selected",null),t=o([Object(n.a)("md-menu-item")],t),e.ELEMENT=t}(s||(s={}))},
|
|
16
|
+
`}};o([Object(a.property)({type:String})],t.prototype,"href",void 0),o([Object(a.property)({type:String})],t.prototype,"label",void 0),o([Object(a.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),o([Object(a.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),o([Object(a.property)({type:Boolean,reflect:!0})],t.prototype,"selected",null),t=o([Object(n.a)("md-menu-item")],t),e.ELEMENT=t}(s||(s={}))},70:function(e,t,d){"use strict";var s=d(0);t.a=s.css`.md-menu{margin:0;padding:0}.md-menu--horizontal .md-menu-list ::slotted(*){display:inline-flex}.md-menu--vertical .md-menu-list ::slotted(*){display:flex}.md-menu.justified .md-menu-list{display:flex;justify-content:space-between}.md-menu .md-menu-list{margin:0}.md-menu-item{list-style:none;padding:.125rem}.md-menu-item a{color:var(--menu-text-color,var(--menu-default,#121212));display:flex;padding:.375rem .75rem}.md-menu-item ::slotted(*){padding:0 .1875rem}.md-menu-item:hover{background:var(--menu-hover-bg,var(--menu-hover-bg,#c9f4ff))}.md-menu-item:active{background:var(--menu-pressed-bg,var(--menu-pressed-bg,#91ebff))}.md-menu-item--selected{background:var(--menu-selected-default-bg,var(--menu-pressed-bg,#91ebff))}.md-menu-item--selected:hover{background:var(--menu-selected-hover-bg,var(--menu-hover-bg,#c9f4ff))}.md-menu-item--selected:active{background:var(--menu-selected-pressed-bg,var(--menu-pressed-bg,#91ebff))}.md-menu-item.disabled{pointer-events:none}.md-menu-item.disabled a{background:rgba(0,0,0,0);color:var(--md-disabled-text-color)}@media(forced-colors:active){.md-menu-item--selected,.md-menu-item:active,.md-menu-item:focus,.md-menu-item:hover{outline:1px solid Highlight}.md-menu-item.disabled a{color:GrayText}}`}}]);
|
package/dist/chunks/md-46.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[46],{
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[46],{46:function(e,t,a){"use strict";a.r(t),a.d(t,"themeManager",(function(){return s})),a.d(t,"ThemeManager",(function(){return i}));var o=a(26),n=function(e,t,a,o){var n,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,a,o);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(s=(i<3?n(s):i>3?n(t,a,s):n(t,a))||s);return i>3&&s&&Object.defineProperty(t,a,s),s};class i{constructor(e){this.isDarkMode=!1,this.themeName="lumos",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,e&&this.update(e)}update(e){void 0!==e.isDarkMode&&(this.isDarkMode=e.isDarkMode),void 0!==e.themeName&&(this.themeName=e.themeName),void 0!==e.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=e.isVisualRebrandEnabled),void 0!==e.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=e.isMomentumAvatarEnabled)}setDarkMode(e){this.isDarkMode=e}setThemeName(e){this.themeName=e}setVisualRebrandEnabled(e){this.isVisualRebrandEnabled=e}setMomentumAvatar(e){this.isMomentumAvatarEnabled=e}get isMomentumV2Enabled(){return"momentumV2"===this.themeName}}n([o.observable],i.prototype,"isDarkMode",void 0),n([o.observable],i.prototype,"themeName",void 0),n([o.observable],i.prototype,"isVisualRebrandEnabled",void 0),n([o.observable],i.prototype,"isMomentumAvatarEnabled",void 0),n([o.action],i.prototype,"update",null),n([o.action],i.prototype,"setDarkMode",null),n([o.action],i.prototype,"setThemeName",null),n([o.action],i.prototype,"setVisualRebrandEnabled",null),n([o.action],i.prototype,"setMomentumAvatar",null),n([o.computed],i.prototype,"isMomentumV2Enabled",null);const s=new i}}]);
|
package/dist/chunks/md-47.js
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[47],{
|
|
2
|
-
<div
|
|
3
|
-
?disabled=${this.disabled}
|
|
4
|
-
tabindex="-1"
|
|
5
|
-
class="tab-action-button"
|
|
6
|
-
@click=${t=>this.handleCrossClick(t)}
|
|
7
|
-
@keydown=${t=>this.handleCrossKeydown(t)}
|
|
8
|
-
>
|
|
9
|
-
<md-icon tabindex="0" name="cancel-bold" size="14" iconSet="momentumDesign"></md-icon>
|
|
10
|
-
</div>
|
|
11
|
-
`}render(){return l.html`
|
|
12
|
-
<button
|
|
13
|
-
type="button"
|
|
14
|
-
role="button"
|
|
15
|
-
?disabled=${this.disabled}
|
|
16
|
-
aria-selected="false"
|
|
17
|
-
aria-label=${Object(d.ifDefined)(this.ariaLabel||void 0)}
|
|
18
|
-
aria-hidden="true"
|
|
19
|
-
tabindex="-1"
|
|
20
|
-
part="tab"
|
|
21
|
-
class="${Object(n.classMap)({closable:""!==this.closable,pill:"pill"===this.type,rounded:"rounded"===this.type,line:"line"===this.type,primary:"primary"===this.variant,newMomentum:this.newMomentum,onlyIcon:this.onlyIcon})}"
|
|
22
|
-
@click=${t=>this.handleClick(t)}
|
|
23
|
-
>
|
|
24
|
-
<slot class="tab-slot"></slot>
|
|
25
|
-
${this.isCrossVisible&&this.closable?this.renderCrossButton():""}
|
|
26
|
-
</button>
|
|
27
|
-
`}};p([Object(l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([Object(l.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),p([Object(l.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),p([Object(l.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),p([Object(l.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaRole",void 0),p([Object(l.property)({type:String})],e.prototype,"type",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),p([Object(l.property)({type:String})],e.prototype,"variant",void 0),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"viewportHidden",void 0),e=p([Object(a.a)("md-tab")],e),t.ELEMENT=e}(h||(h={}))}}]);
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[47],{72:function(o,e,r){"use strict";var i=r(0);e.a=i.css`:host{--radio-label-text-color:var(--radio-input-text-color)}:host(md-radio) .md-radio-wrapper{max-height:1.4375rem;display:inline-flex;max-width:100%}:host(md-radio) .md-radio-input{height:1.4375rem;position:absolute;visibility:hidden;width:100%}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color);cursor:pointer;font-size:14px;line-height:1.4375rem;padding-left:1.875rem;padding-right:.5rem;pointer-events:none;position:relative;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host(md-radio) .md-radio-label::before{content:"";position:absolute;border:.0625rem solid var(--radio-input-border-color);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;box-shadow:inset 0 0 0 .36rem var(--radio-input-bg-color),inset 0 0 0 1.25rem var(--radio-input-bg-color);box-sizing:border-box;height:1.25rem;left:.125rem;top:.0625rem;width:1.25rem}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color)}:host(:hover:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color)}:host(:active:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-pressed-border-color);box-shadow:inset 0 0 0 .36rem var(--radio-input-pressed-bg-color),inset 0 0 0 1.25rem var(--radio-input-pressed-bg-color)}:host([disabled]){cursor:not-allowed;opacity:.4}:host([disabled]) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color)}:host([aria-checked=true]) .md-radio-label:before{border-color:var(--radio-input-selected-border-color);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-bg-color),inset 0 0 0 1.25rem var(--radio-input-icon-color)}:host([aria-checked=true]:hover:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-hover-border-color);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-hover-bg-color),inset 0 0 0 1.25rem var(--radio-input-icon-color)}:host([aria-checked=true]:active:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-pressed-border-color);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-pressed-bg-color),inset 0 0 0 1.25rem var(--radio-input-icon-color)}@media(forced-colors:active){:host(md-radio) .md-radio-label::before{border:1px solid CanvasText}:host(:active:not([disabled])) .md-radio-label:before,:host(:hover:not([disabled])) .md-radio-label:before{border:none;outline:2px solid Highlight;outline-offset:-1px}:host([aria-checked=true]) .md-radio-label:before{background-color:Highlight;border:none;outline:0}:host([aria-checked=true]:hover:not([disabled])) .md-radio-label:before{background-color:Highlight}:host([aria-checked=true]) .md-radio-label:after{content:"";position:absolute;top:50%;left:12px;transform:translate(-50%,-50%);width:8px;height:8px;background-color:Canvas;border-radius:50%}:host([focus-visible]:not([disabled])){outline:2px solid Highlight;outline-offset:-1px}}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem*3)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-right:calc(.25rem*8)}:host([disabled]) div ::slotted(md-radio){pointer-events:none}`}}]);
|
package/dist/chunks/md-48.js
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[48],{
|
|
2
|
-
<div
|
|
3
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[48],{48:function(t,e,i){"use strict";i.r(e),i.d(e,"TAB_CROSS_WIDTH",(function(){return b})),i.d(e,"Tab",(function(){return h}));var s=i(1),o=i(7),a=i(5),r=i(6),l=i(0),n=i(4),d=i(3),c=i(41),p=function(t,e,i,s){var o,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const b=22;var h;!function(t){let e=class extends(Object(o.a)(l.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.ariaLabel="",this.closable="",this.name="",this.isCrossVisible=!1,this.ariaRole="tab",this.type="line",this.newMomentum=!1,this.onlyIcon=!1,this.variant="ghost",this._disabled=!1,this._selected=0===this.tabIndex,this.vertical=!1,this.viewportHidden=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-disabled",""+t),this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}get selected(){return this._selected}set selected(t){const e=this._selected;this._selected=t,t&&this.notifySelectedTab(),this.setAttribute("aria-selected",""+t),this.requestUpdate("selected",e)}static get styles(){return[r.a,c.a]}handleClick(t){t.preventDefault(),this.id&&this.dispatchEvent(new CustomEvent("tab-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCrossKeydown(t){t.stopPropagation(),t.code===s.b.Enter&&this.handleCrossEventDispatch()}handleCrossClick(t){t.preventDefault(),!0!==this.disabled&&this.handleCrossEventDispatch()}handleCrossEventDispatch(){this.id&&("auto"===this.closable?this.dispatchEvent(new CustomEvent("tab-cross-click",{detail:{id:this.id},bubbles:!0,composed:!0})):"custom"===this.closable&&this.dispatchEvent(new CustomEvent("tab-close-click",{detail:{id:this.id,name:this.name},bubbles:!0,composed:!0})))}notifySelectedTab(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}update(t){super.update(t),t.has("disabled")&&(this.selected=!1,this.setAttribute("aria-disabled",""+this.disabled))}connectedCallback(){super.connectedCallback()}firstUpdated(t){super.firstUpdated(t),this.ariaRole&&this.setAttribute("role",this.ariaRole)}renderCrossButton(){return l.html`
|
|
2
|
+
<div
|
|
3
|
+
?disabled=${this.disabled}
|
|
4
|
+
tabindex="-1"
|
|
5
|
+
class="tab-action-button"
|
|
6
|
+
@click=${t=>this.handleCrossClick(t)}
|
|
7
|
+
@keydown=${t=>this.handleCrossKeydown(t)}
|
|
8
|
+
>
|
|
9
|
+
<md-icon tabindex="0" name="cancel-bold" size="14" iconSet="momentumDesign"></md-icon>
|
|
4
10
|
</div>
|
|
5
|
-
`}
|
|
11
|
+
`}render(){return l.html`
|
|
12
|
+
<button
|
|
13
|
+
type="button"
|
|
14
|
+
role="button"
|
|
15
|
+
?disabled=${this.disabled}
|
|
16
|
+
aria-selected="false"
|
|
17
|
+
aria-label=${Object(d.ifDefined)(this.ariaLabel||void 0)}
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
tabindex="-1"
|
|
20
|
+
part="tab"
|
|
21
|
+
class="${Object(n.classMap)({closable:""!==this.closable,pill:"pill"===this.type,rounded:"rounded"===this.type,line:"line"===this.type,primary:"primary"===this.variant,newMomentum:this.newMomentum,onlyIcon:this.onlyIcon})}"
|
|
22
|
+
@click=${t=>this.handleClick(t)}
|
|
23
|
+
>
|
|
24
|
+
<slot class="tab-slot"></slot>
|
|
25
|
+
${this.isCrossVisible&&this.closable?this.renderCrossButton():""}
|
|
26
|
+
</button>
|
|
27
|
+
`}};p([Object(l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([Object(l.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),p([Object(l.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),p([Object(l.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),p([Object(l.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaRole",void 0),p([Object(l.property)({type:String})],e.prototype,"type",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),p([Object(l.property)({type:String})],e.prototype,"variant",void 0),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),p([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"viewportHidden",void 0),e=p([Object(a.a)("md-tab")],e),t.ELEMENT=e}(h||(h={}))}}]);
|
package/dist/chunks/md-49.js
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[49],{
|
|
2
|
-
<div class="md-accordion
|
|
3
|
-
<
|
|
4
|
-
<button
|
|
5
|
-
type="button"
|
|
6
|
-
aria-expanded=${this.expanded}
|
|
7
|
-
class="md-accordion-expander"
|
|
8
|
-
aria-label=${Object(l.ifDefined)(this.label||void 0)}
|
|
9
|
-
aria-controls="panel-${this.uniqueId}"
|
|
10
|
-
aria-disabled=${this.disabled}
|
|
11
|
-
?disabled=${this.disabled}
|
|
12
|
-
id="header-${this.uniqueId}"
|
|
13
|
-
part="accordion-button"
|
|
14
|
-
tabindex=${Object(l.ifDefined)(this.disabled?-1:void 0)}
|
|
15
|
-
@mousedown=${this.handleMouseDown}
|
|
16
|
-
@keydown=${this.handleKeyDown}
|
|
17
|
-
>
|
|
18
|
-
<slot name="header-content">
|
|
19
|
-
<span class="md-accordion-expander-label">${this.label}</span>
|
|
20
|
-
</slot>
|
|
21
|
-
<md-icon
|
|
22
|
-
iconSet=${"momentumDesign"}
|
|
23
|
-
size="14"
|
|
24
|
-
name=${this.expanded?"arrow-up-bold":"arrow-down-bold"}
|
|
25
|
-
></md-icon>
|
|
26
|
-
</button>
|
|
27
|
-
</div>
|
|
28
|
-
<div
|
|
29
|
-
role="region"
|
|
30
|
-
id="panel-${this.uniqueId}"
|
|
31
|
-
aria-labelledby="header-${this.uniqueId}"
|
|
32
|
-
class="md-accordion-panel"
|
|
33
|
-
part="accordion-panel"
|
|
34
|
-
>
|
|
35
|
-
<slot></slot>
|
|
36
|
-
</div>
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[49],{90:function(e,t,o){"use strict";o.r(t),o.d(t,"Accordion",(function(){return c}));var c,s=o(1),i=o(7),n=o(5),d=o(6),r=o(0),a=o(62),l=function(e,t,o,c){var s,i=arguments.length,n=i<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,o):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,c);else for(var d=e.length-1;d>=0;d--)(s=e[d])&&(n=(i<3?s(n):i>3?s(t,o,n):s(t,o))||n);return i>3&&n&&Object.defineProperty(t,o,n),n};!function(e){let t=class extends(Object(i.e)(r.LitElement)){constructor(){super(...arguments),this.multiple=!1,this.handleAccordionItemFocus=()=>{this.toggleAttribute("focusable",!0)},this.handleAccordionItemBlur=()=>{this.toggleAttribute("focusable",!1)}}get slotItem(){return this.accordionItemSlotElement}filterSlotted(){return this.accordionItemSlotElement.assignedElements()}switchFocusedAccordionItem(e){const t=this.slotted.findIndex(e=>e.hasAttribute("focus-visible")),o=this.slotted.length;let c=t;for(c=(o+c+e)%o;this.slotted[c].disabled;)c=(o+c+e)%o;this.focusAccordionItem(this.slotted[c])}focusAccordionItem(e){e.hasAttribute("focus-visible")||requestAnimationFrame(()=>e.header.focus())}setActiveAccordionItem(e){this.multiple?e.expanded=!e.expanded:(this.slotted.forEach(t=>{const o=t;o.expanded&&!t.isEqualNode(e)&&(o.expanded=!1)}),e.expanded=!0)}setupExpandedAccordionItems(){this.multiple||this.slotted.filter(e=>e.expanded).forEach((e,t)=>{const o=e;o.expanded&&t>0&&(o.expanded=!1)})}setupFocusAccordionItems(){this.slotted.forEach(e=>{e.addEventListener("focus",this.handleAccordionItemFocus),e.addEventListener("blur",this.handleAccordionItemBlur)})}removeFocusAccordionItems(){this.slotted.forEach(e=>{e.removeEventListener("focus",this.handleAccordionItemFocus),e.removeEventListener("blur",this.handleAccordionItemBlur)})}handleKeyDown(e){const{srcEvent:t}=e.detail,{code:o}=t;switch(o){case s.b.Space:case s.b.Enter:{const{target:t}=e;t&&this.setActiveAccordionItem(t);break}case s.b.ArrowDown:this.switchFocusedAccordionItem(1);break;case s.b.ArrowUp:this.switchFocusedAccordionItem(-1);break;case s.b.Home:{const e=this.slotted[0];this.focusAccordionItem(e);break}case s.b.End:{const e=this.slotted[this.slotted.length-1];this.focusAccordionItem(e);break}}}handleClick(e){const{target:t}=e,o=this.slotted.find(e=>e.isSameNode(t));o&&this.setActiveAccordionItem(o)}updated(e){super.updated(e),e.has("slotted")&&(this.setupExpandedAccordionItems(),this.setupFocusAccordionItems())}connectedCallback(){super.connectedCallback(),this.addEventListener("accordion-item-keydown",this.handleKeyDown),this.addEventListener("accordion-item-click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accordion-item-keydown",this.handleKeyDown),this.removeEventListener("accordion-item-click",this.handleClick),this.removeFocusAccordionItems()}static get styles(){return[d.a,a.a]}render(){return r.html`
|
|
2
|
+
<div class="md-accordion" part="accordion">
|
|
3
|
+
<slot name="accordion-item"></slot>
|
|
37
4
|
</div>
|
|
38
|
-
`}};
|
|
5
|
+
`}};l([Object(r.property)({type:Boolean,reflect:!0})],t.prototype,"multiple",void 0),l([Object(r.query)('slot[name="accordion-item"]')],t.prototype,"accordionItemSlotElement",void 0),t=l([Object(n.a)("md-accordion")],t),e.ELEMENT=t}(c||(c={}))}}]);
|
package/dist/chunks/md-5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[5],{
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[5],{55:function(e,t,r){"use strict";r.r(t),r.d(t,"Spinner",(function(){return n}));var n,o=r(6),i=r(8),s=r(0),p=s.css`:host(:focus){box-shadow:none;outline:0}:host(md-spinner){line-height:1rem}:host(md-spinner) .md-spinner{border-radius:50%;display:block;position:relative;border:1px solid var(--spinner-bg-color)}:host(md-spinner) .md-spinner::after{border-bottom:1px solid transparent;border-left:1px solid var(--spinner-color);border-right:1px solid transparent;border-top:1px solid transparent}:host(md-spinner) .md-spinner::after{animation:load8 1s infinite linear;border-radius:50%;content:"";height:calc(100% + 2px);left:-1px;position:absolute;top:-1px;width:calc(100% + 2px)}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@media(forced-colors:active){:host(md-spinner) .md-spinner:after{border-bottom:2px solid Highlight;border-left:2px solid HighlightText;border-right:2px solid Highlight;border-top:2px solid Highlight}}`,d=r(5),l=function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(o=e[p])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};!function(e){let t=class extends s.LitElement{constructor(){super(...arguments),this.size=56}static get styles(){return[o.a,p]}get spinnerStyleMap(){return{width:this.size+"px",height:this.size+"px"}}render(){return s.html` <i class="md-spinner" part="spinner" style=${Object(i.styleMap)(this.spinnerStyleMap)}></i> `}};l([Object(s.property)({type:Number,reflect:!0})],t.prototype,"size",void 0),t=l([Object(d.a)("md-spinner")],t),e.ELEMENT=t}(n||(n={}))}}]);
|
package/dist/chunks/md-50.js
CHANGED
|
@@ -1,13 +1,38 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[50],{
|
|
2
|
-
<md-
|
|
3
|
-
aria-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[50],{91:function(e,t,d){"use strict";d.r(t),d.d(t,"AccordionItem",(function(){return i}));d(14);var i,n=d(7),o=d(5),s=d(6),a=d(0),l=d(3),r=d(27),c=d(62),p=function(e,t,d,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,d):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,d,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,d,s):n(t,d))||s);return o>3&&s&&Object.defineProperty(t,d,s),s};!function(e){let t=class extends(Object(n.a)(a.LitElement)){constructor(){super(...arguments),this._expanded=!1,this._level=3,this.uniqueId=Object(r.nanoid)(),this.label="",this.disabled=!1}get expanded(){return this._expanded}set expanded(e){const t=this._expanded;this._expanded=e,e?(this.notifyAccordionFocus(),this.notifyExpandedHeader()):this.notifyCollapsedHeader(),this.requestUpdate("expanded",t)}get level(){return this._level}set level(e){const t=this.level;e<1||e>6?(console.warn("Please set appropriate section heading level"),this._level=3):this._level=e,this.requestUpdate("level",t)}notifyExpandedHeader(){this.dispatchEvent(new CustomEvent("accordion-item-expanded",{composed:!0,bubbles:!0,detail:{id:this.uniqueId}}))}notifyCollapsedHeader(){this.dispatchEvent(new CustomEvent("accordion-item-collapsed",{composed:!0,bubbles:!0,detail:{id:this.uniqueId}}))}notifyAccordionFocus(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}firstUpdated(e){super.firstUpdated(e),this.setAttribute("id",this.uniqueId)}static get styles(){return[s.a,c.a]}handleMouseDown(e){this.disabled||this.dispatchEvent(new CustomEvent("accordion-item-click",{detail:{srcEvent:e},composed:!0,bubbles:!0}))}handleKeyDown(e){this.disabled||this.dispatchEvent(new CustomEvent("accordion-item-keydown",{detail:{srcEvent:e},bubbles:!0,composed:!0}))}render(){return a.html`
|
|
2
|
+
<div class="md-accordion-item">
|
|
3
|
+
<div role="heading" aria-level=${this.level} class="md-accordion-header" part="accordion-header">
|
|
4
|
+
<button
|
|
5
|
+
type="button"
|
|
6
|
+
aria-expanded=${this.expanded}
|
|
7
|
+
class="md-accordion-expander"
|
|
8
|
+
aria-label=${Object(l.ifDefined)(this.label||void 0)}
|
|
9
|
+
aria-controls="panel-${this.uniqueId}"
|
|
10
|
+
aria-disabled=${this.disabled}
|
|
11
|
+
?disabled=${this.disabled}
|
|
12
|
+
id="header-${this.uniqueId}"
|
|
13
|
+
part="accordion-button"
|
|
14
|
+
tabindex=${Object(l.ifDefined)(this.disabled?-1:void 0)}
|
|
15
|
+
@mousedown=${this.handleMouseDown}
|
|
16
|
+
@keydown=${this.handleKeyDown}
|
|
17
|
+
>
|
|
18
|
+
<slot name="header-content">
|
|
19
|
+
<span class="md-accordion-expander-label">${this.label}</span>
|
|
20
|
+
</slot>
|
|
21
|
+
<md-icon
|
|
22
|
+
iconSet=${"momentumDesign"}
|
|
23
|
+
size="14"
|
|
24
|
+
name=${this.expanded?"arrow-up-bold":"arrow-down-bold"}
|
|
25
|
+
></md-icon>
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
<div
|
|
29
|
+
role="region"
|
|
30
|
+
id="panel-${this.uniqueId}"
|
|
31
|
+
aria-labelledby="header-${this.uniqueId}"
|
|
32
|
+
class="md-accordion-panel"
|
|
33
|
+
part="accordion-panel"
|
|
34
|
+
>
|
|
35
|
+
<slot></slot>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
`}};p([Object(a.property)({type:String})],t.prototype,"label",void 0),p([Object(a.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),p([Object(a.property)({type:Boolean,reflect:!0})],t.prototype,"expanded",null),p([Object(a.property)({type:Number,reflect:!0})],t.prototype,"level",null),p([Object(a.query)(".md-accordion-expander")],t.prototype,"header",void 0),t=p([Object(o.a)("md-accordion-item")],t),e.ELEMENT=t}(i||(i={}))}}]);
|
package/dist/chunks/md-51.js
CHANGED
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[51],{
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<div
|
|
11
|
-
class="default-wrapper ${e.id}"
|
|
12
|
-
part="advance-list-item-wrapper"
|
|
13
|
-
aria-setsize="${this.totalRecords}"
|
|
14
|
-
aria-posinset="${i+1}"
|
|
15
|
-
role="${this.ariaRoleListItem}"
|
|
16
|
-
aria-label=${e.name}
|
|
17
|
-
id="${t.prefixId}${e.id}"
|
|
18
|
-
index="${i}"
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[51],{92:function(t,e,i){"use strict";i.r(e),i.d(e,"activityButtonSize",(function(){return c})),i.d(e,"activityButtonType",(function(){return p})),i.d(e,"ActivityButton",(function(){return y}));var r=i(6),n=i(5),o=i(0),s=(i(17),i(14),i(63)),a=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const c=["56","68","84",56,68,84],p=["chat","camera","contact-card","meetings","whiteboard","files","share-screen","tasks"];var y;!function(t){let e=class extends o.LitElement{constructor(){super(...arguments),this.ariaLabel="",this.disabled=!1,this.label="",this.size="68",this._type="chat"}get type(){return this._type}set type(t){const e=this.type;p.includes(t)?this._type=t:this._type="chat",this.requestUpdate("type",e)}get buttonToIconSizeMapping(){return{56:"24",68:"28",84:"36"}}get formatClass(){return{"md-activity":!0,["md-activity__"+this.type]:this.type}}static get styles(){return[r.a,s.a]}render(){return o.html`
|
|
2
|
+
<md-button
|
|
3
|
+
aria-label=${this.ariaLabel}
|
|
4
|
+
circle
|
|
5
|
+
.activityType=${this.type}
|
|
6
|
+
?containerLarge=${"84"===this.size}
|
|
7
|
+
?disabled=${this.disabled}
|
|
8
|
+
.size=${this.size}
|
|
9
|
+
.label=${this.label}
|
|
19
10
|
>
|
|
20
|
-
${
|
|
21
|
-
</
|
|
22
|
-
`}
|
|
23
|
-
${this.getStyles()}
|
|
24
|
-
<div
|
|
25
|
-
class="md-advance-list-wrapper virtual-scroll"
|
|
26
|
-
tabindex="0"
|
|
27
|
-
aria-activedescendant=${this.getActiveDescendant()}
|
|
28
|
-
aria-label=${this.ariaLabelList}
|
|
29
|
-
role=${this.ariaRoleList}
|
|
30
|
-
@rangechange=${this.handleRangeChange}
|
|
31
|
-
>
|
|
32
|
-
${Object(n.scroll)({items:this.items,renderItem:(t,e)=>this.renderItem(t,e||0),useShadowDOM:!0,scrollToIndex:this.isUserNavigated?{index:this.scrollIndex,position:0===this.scrollIndex?"start":"center"}:void 0})}
|
|
33
|
-
</div>
|
|
34
|
-
`}};p([Object(l.property)({type:Array})],e.prototype,"items",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"isLoading",void 0),p([Object(l.property)({type:String})],e.prototype,"selectedItemId",void 0),p([Object(l.property)({type:String})],e.prototype,"value",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaRoleList",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaLabelList",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"isError",void 0),p([Object(l.property)({type:String})],e.prototype,"containerHeight",void 0),p([Object(l.queryAll)("div.default-wrapper")],e.prototype,"lists",void 0),p([Object(l.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),p([Object(l.property)({type:Number})],e.prototype,"totalRecords",void 0),p([Object(l.internalProperty)()],e.prototype,"scrollIndex",void 0),p([Object(l.internalProperty)()],e.prototype,"activeId",void 0),p([Object(l.internalProperty)()],e.prototype,"isUserNavigated",void 0),e=p([Object(a.a)("md-advance-list")],e),t.ELEMENT=e}(r||(r={}))}}]);
|
|
11
|
+
<md-icon name=${`icon-${this.type}_${this.buttonToIconSizeMapping[this.size]}`}></md-icon>
|
|
12
|
+
</md-button>
|
|
13
|
+
`}};a([Object(o.property)({type:String})],e.prototype,"ariaLabel",void 0),a([Object(o.property)({type:Boolean})],e.prototype,"disabled",void 0),a([Object(o.property)({type:String})],e.prototype,"label",void 0),a([Object(o.property)({type:String})],e.prototype,"size",void 0),a([Object(o.property)({type:String})],e.prototype,"type",null),e=a([Object(n.a)("md-activity-button")],e),t.ELEMENT=e}(y||(y={}))}}]);
|
package/dist/chunks/md-52.js
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[52],{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[52],{111:function(t,e,i){"use strict";i.r(e),i.d(e,"AdvanceList",(function(){return r}));var r,s=i(1),a=i(5),o=i(32),d=i(6),l=i(0),n=i(31),c=l.css`:host(md-advance-list){list-style:none;margin:0;padding:2px;overflow:auto;position:relative;line-height:1.125rem;display:flex;flex-direction:column}.virtual-scroll{width:100%;overflow-y:auto;overflow-x:hidden;position:relative;padding:1px}.virtual-scroll:focus-visible{outline:2px solid var(--md-default-focus-outline-color)}.default-wrapper:focus,.default-wrapper:focus-visible{outline:2px solid var(--md-default-focus-outline-color);outline-offset:-2px}.default-wrapper:has([disabled]),.default-wrapper:has([disabled]):hover,.default-wrapper[aria-disabled=true]{color:var(--advance-list-disabled-text-color);background-color:rgba(0,0,0,0)}.spin-loader{display:flex;justify-content:center;width:100%}.default-wrapper.selected{background-color:var(--list-active-background);color:var(--list-active-text-color)}.default-wrapper.focused{outline:2px solid var(--md-default-focus-outline-color);outline-offset:-2px}.default-wrapper{padding:11px 12px;color:var(--advance-list-text-color);cursor:pointer;width:calc(100% - 2px);box-sizing:border-box;position:relative;border-radius:var(--advance-list-border-radius-rounded,0);display:flex;gap:.5rem}.default-wrapper-status-indicator{padding:5px;color:var(--advance-list-text-color);cursor:pointer;width:calc(100% - 2px);box-sizing:border-box;position:relative;border-radius:var(--advance-list-border-radius-rounded,0)}.default-wrapper:hover{background-color:var(--list-hover-background);color:var(--list-hover-text-color)}.default-wrapper.selected:hover{background-color:var(--list-active-background);color:var(--list-active-text-color)}`,p=function(t,e,i,r){var s,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,r);else for(var d=t.length-1;d>=0;d--)(s=t[d])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o};!function(t){t.prefixId="item-";let e=class extends(Object(o.a)(l.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.selectedItemId="",this.value="",this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.totalRecords=0,this.scrollIndex=-1,this.activeId="",this.isUserNavigated=!1,this.handleKeyDown=e=>{var i;switch(e.key){case s.b.ArrowDown:{e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value&&(this.activeId=this.value);const t=this.items.findIndex(t=>t.id===this.activeId);t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id)}break;case s.b.ArrowUp:{e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value&&(this.activeId=this.value);const t=this.items.findIndex(t=>t.id===this.activeId);t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id)}break;case s.b.Enter:if(e.preventDefault(),this.activeId){const e=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(`#${t.prefixId}${this.activeId}`);if(e){"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||this.selectItem(e)}}}},this.handleRangeChange=t=>{const{last:e}=t;this.updateSelectedState(),this.items.length<this.totalRecords&&e>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick)}static get styles(){return[d.a,c]}getStyles(){return l.html`
|
|
2
|
+
<style>
|
|
3
|
+
:host .virtual-scroll {
|
|
4
|
+
height: ${this.containerHeight};
|
|
5
|
+
}
|
|
6
|
+
</style>
|
|
7
|
+
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.addEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}updated(t){t.has("value")&&this.requestUpdate().then(()=>{this.selectedItemId=""+this.value,this.updateSelectedState()})}updateWrapperAttributes(t,e){t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,r;const s=e.id===`${t.prefixId}${this.selectedItemId}`;this.updateWrapperAttributes(e,s),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value}`&&e.setAttribute("tabindex","0");(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(r=e.firstElementChild)||void 0===r?void 0:r.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),r=t.composedPath(),s=i.find(t=>r.includes(t));if(s){return(null==s?void 0:s.hasAttribute("disabled"))||"true"===(null==s?void 0:s.getAttribute("aria-disabled"))?0:s}}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}selectItem(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.selectedItemId=this.activeId,this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.selectItem(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemId},bubbles:!0,composed:!0}))}renderItem(e,i){return"status-indicator"===e.id?l.html`
|
|
8
|
+
<div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
|
|
9
|
+
`:l.html`
|
|
10
|
+
<div
|
|
11
|
+
class="default-wrapper ${e.id}"
|
|
12
|
+
part="advance-list-item-wrapper"
|
|
13
|
+
aria-setsize="${this.totalRecords}"
|
|
14
|
+
aria-posinset="${i+1}"
|
|
15
|
+
role="${this.ariaRoleListItem}"
|
|
16
|
+
aria-label=${e.name}
|
|
17
|
+
id="${t.prefixId}${e.id}"
|
|
18
|
+
index="${i}"
|
|
19
|
+
>
|
|
20
|
+
${e.template(e,i)}
|
|
21
|
+
</div>
|
|
22
|
+
`}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value}`:""}render(){return l.html`
|
|
23
|
+
${this.getStyles()}
|
|
24
|
+
<div
|
|
25
|
+
class="md-advance-list-wrapper virtual-scroll"
|
|
26
|
+
tabindex="0"
|
|
27
|
+
aria-activedescendant=${this.getActiveDescendant()}
|
|
28
|
+
aria-label=${this.ariaLabelList}
|
|
29
|
+
role=${this.ariaRoleList}
|
|
30
|
+
@rangechange=${this.handleRangeChange}
|
|
31
|
+
>
|
|
32
|
+
${Object(n.scroll)({items:this.items,renderItem:(t,e)=>this.renderItem(t,e||0),useShadowDOM:!0,scrollToIndex:this.isUserNavigated?{index:this.scrollIndex,position:0===this.scrollIndex?"start":"center"}:void 0})}
|
|
33
|
+
</div>
|
|
34
|
+
`}};p([Object(l.property)({type:Array})],e.prototype,"items",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"isLoading",void 0),p([Object(l.property)({type:String})],e.prototype,"selectedItemId",void 0),p([Object(l.property)({type:String})],e.prototype,"value",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaRoleList",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),p([Object(l.property)({type:String})],e.prototype,"ariaLabelList",void 0),p([Object(l.property)({type:Boolean})],e.prototype,"isError",void 0),p([Object(l.property)({type:String})],e.prototype,"containerHeight",void 0),p([Object(l.queryAll)("div.default-wrapper")],e.prototype,"lists",void 0),p([Object(l.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),p([Object(l.property)({type:Number})],e.prototype,"totalRecords",void 0),p([Object(l.internalProperty)()],e.prototype,"scrollIndex",void 0),p([Object(l.internalProperty)()],e.prototype,"activeId",void 0),p([Object(l.internalProperty)()],e.prototype,"isUserNavigated",void 0),e=p([Object(a.a)("md-advance-list")],e),t.ELEMENT=e}(r||(r={}))}}]);
|