@momentum-ui/web-components 2.14.0 → 2.14.2
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-23.js +1 -1
- package/dist/chunks/md-26.js +1 -1
- package/dist/chunks/md-27.js +1 -1
- package/dist/chunks/md-29.js +2 -2
- package/dist/chunks/md-31.js +1 -1
- package/dist/chunks/md-33.js +36 -33
- package/dist/chunks/md-34.js +32 -22
- package/dist/chunks/md-35.js +23 -5
- package/dist/chunks/md-36.js +5 -5
- package/dist/chunks/md-37.js +5 -1
- package/dist/chunks/md-38.js +1 -21
- package/dist/chunks/md-39.js +20 -41
- package/dist/chunks/md-40.js +42 -1
- package/dist/chunks/md-41.js +1 -30
- package/dist/chunks/md-42.js +30 -16
- package/dist/chunks/md-43.js +16 -1
- package/dist/chunks/md-44.js +1 -27
- package/dist/chunks/md-45.js +26 -4
- package/dist/chunks/md-46.js +4 -37
- package/dist/chunks/md-47.js +38 -13
- package/dist/chunks/md-48.js +13 -20
- package/dist/chunks/md-49.js +19 -119
- package/dist/chunks/md-50.js +114 -91
- package/dist/chunks/md-51.js +98 -11
- package/dist/chunks/md-52.js +11 -5
- package/dist/chunks/md-53.js +4 -76
- package/dist/chunks/md-54.js +68 -59
- package/dist/chunks/md-55.js +64 -18
- package/dist/chunks/md-56.js +22 -14
- package/dist/chunks/md-57.js +14 -5
- package/dist/chunks/md-58.js +5 -51
- package/dist/chunks/md-59.js +51 -22
- package/dist/chunks/md-60.js +21 -4
- package/dist/chunks/md-61.js +5 -1
- package/dist/chunks/md-62.js +1 -23
- package/dist/chunks/md-63.js +23 -5
- package/dist/chunks/md-64.js +4 -10
- package/dist/chunks/md-65.js +9 -140
- package/dist/chunks/md-66.js +139 -27
- package/dist/chunks/md-67.js +29 -69
- package/dist/chunks/md-68.js +70 -19
- package/dist/chunks/md-69.js +19 -21
- package/dist/chunks/md-70.js +20 -16
- package/dist/chunks/md-71.js +17 -36
- package/dist/chunks/md-72.js +1 -1
- package/dist/chunks/md-73.js +3 -3
- package/dist/chunks/md-76.js +1 -1
- package/dist/chunks/md-77.js +1 -1
- package/dist/chunks/md-78.js +1 -1
- package/dist/chunks/md-80.js +1 -1
- package/dist/chunks/md-81.js +1 -1
- package/dist/chunks/md-82.js +1 -1
- package/dist/chunks/md-83.js +9 -9
- package/dist/chunks/md-85.js +1 -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-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 +2 -1
- package/dist/comp/md-audio-player-entry.js +1 -1
- package/dist/comp/md-audio-player.js +1 -1
- package/dist/comp/md-badge-entry.js +1 -1
- package/dist/comp/md-badge.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 +3 -3
- 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 +2 -2
- package/dist/comp/md-checkboxgroup-entry.js +1 -1
- package/dist/comp/md-checkboxgroup.js +2 -2
- package/dist/comp/md-chip-entry.js +1 -1
- package/dist/comp/md-chip.js +2 -2
- package/dist/comp/md-coachmark-entry.js +1 -1
- package/dist/comp/md-coachmark.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 +2 -2
- 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-entry.js +1 -1
- package/dist/comp/md-datepicker.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 +2 -2
- package/dist/comp/md-draggable.js +2 -2
- 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-favorite.js +1 -1
- package/dist/comp/md-floating-minimize-entry.js +1 -1
- package/dist/comp/md-floating-minimize.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +1 -1
- package/dist/comp/md-floating-modal.js +2 -2
- 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-inpu.js +1 -1
- package/dist/comp/md-input-file.js +1 -1
- package/dist/comp/md-link-entry.js +1 -1
- package/dist/comp/md-link.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-list-item.js +1 -1
- package/dist/comp/md-list.js +1 -1
- package/dist/comp/md-loading-entry.js +1 -1
- package/dist/comp/md-meeting-alert-entry.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-item.js +1 -1
- package/dist/comp/md-menu.js +1 -1
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-progress-bar-entry.js +1 -1
- package/dist/comp/md-progress-bar.js +1 -1
- package/dist/comp/md-radio-entry.js +1 -1
- package/dist/comp/md-radio.js +1 -1
- package/dist/comp/md-radiogroup-entry.js +1 -1
- package/dist/comp/md-radiogroup.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.js +1 -1
- package/dist/comp/md-table-advanced-entry.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-tabs.js +1 -1
- 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/index-entry.js +2 -2
- package/dist/index.js +31 -31
- package/dist/types/components/alert/Alert.d.ts +8 -1
- package/dist/types/components/combobox/ComboBox.d.ts +2 -1
- package/dist/types/components/grabber/Grabber.d.ts +1 -1
- package/dist/types/components/table/Table.d.ts +2 -10
- package/dist/types/internal-components/color-table/ColorTable.d.ts +1 -5
- package/package.json +3 -3
package/dist/chunks/md-37.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[37],{
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[37],{71:function(e,t,s){"use strict";s.r(t),s.d(t,"ListItem",(function(){return r}));var r,i=s(7),l=s(6),o=s(5),d=s(0),p=s(4),c=s(61),n=function(e,t,s,r){var i,l=arguments.length,o=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(o=(l<3?i(o):l>3?i(t,s,o):i(t,s))||o);return l>3&&o&&Object.defineProperty(t,s,o),o};!function(e){let t=class extends(Object(i.a)(d.LitElement)){constructor(){super(...arguments),this.role="option",this.tabIndex=-1,this.shape="rounded",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.requestUpdate("disabled",t)}get selected(){return this._selected}set selected(e){const t=this._selected;this._selected=e,this.requestUpdate("selected",t)}get listItemTemplateClassMap(){return{["md-list-item--"+this.shape]:!!this.shape}}static get styles(){return[o.a,c.a]}render(){return d.html`
|
|
2
|
+
<li class="md-list-item ${Object(p.classMap)(this.listItemTemplateClassMap)}" part="list-item">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</li>
|
|
5
|
+
`}};n([Object(d.property)({type:String,reflect:!0})],t.prototype,"role",void 0),n([Object(d.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),n([Object(d.property)({type:String,reflect:!0})],t.prototype,"shape",void 0),n([Object(d.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),n([Object(d.property)({type:Boolean,reflect:!0})],t.prototype,"selected",null),t=n([Object(l.a)("md-list-item")],t),e.ELEMENT=t}(r||(r={}))}}]);
|
package/dist/chunks/md-38.js
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[38],{
|
|
2
|
-
<span>
|
|
3
|
-
<div class="progressbar-info" data-key="${this.min}">
|
|
4
|
-
<span class="progressbar-label">${this.label}</span>
|
|
5
|
-
<span class="progressbar-progress">${this.getDisplayFormat()}</span>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="progress ${Object(n.classMap)(e)}" data-key="${this.max}">
|
|
8
|
-
<span
|
|
9
|
-
class="meter"
|
|
10
|
-
role="progressbar"
|
|
11
|
-
aria-labelledby="progressbar"
|
|
12
|
-
aria-valuenow=${this.adjustedValue}
|
|
13
|
-
aria-valuemin=${this.min}
|
|
14
|
-
aria-valuemax=${this.max}
|
|
15
|
-
aria-valuetext=${this.meterWidth}
|
|
16
|
-
style="${"width: "+this.meterWidth+"; background: "+this.getColor()}"
|
|
17
|
-
>
|
|
18
|
-
</span>
|
|
19
|
-
</div>
|
|
20
|
-
</span>
|
|
21
|
-
`}};p([Object(i.property)({type:Boolean})],r.prototype,"dynamic",void 0),p([Object(i.property)({type:String})],r.prototype,"color",void 0),p([Object(i.property)({type:String})],r.prototype,"label",void 0),p([Object(i.property)({type:String})],r.prototype,"displayFormat",void 0),p([Object(i.property)({type:String})],r.prototype,"type",void 0),p([Object(i.property)({type:Number})],r.prototype,"min",void 0),p([Object(i.property)({type:Number})],r.prototype,"max",void 0),p([Object(i.property)({type:Number})],r.prototype,"value",void 0),p([Object(i.property)({type:Number})],r.prototype,"adjustedValue",void 0),p([Object(i.property)({type:Number})],r.prototype,"valueFraction",void 0),p([Object(i.property)({type:String})],r.prototype,"meterWidth",void 0),r=p([Object(o.a)("md-progress-bar")],r),e.ELEMENT=r}(a||(a={}))}}]);
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[38],{62:function(e,o,r){"use strict";var c=r(0);o.a=c.css`:host(:focus){box-shadow:none;outline:0}:host(md-checkbox){border-radius:.25rem;cursor:pointer;display:inline-flex;position:relative;vertical-align:middle}:host(md-checkbox) .checkbox-input{height:calc(1.25rem + .25rem);position:absolute;visibility:hidden;width:100%}:host(md-checkbox) .checkbox-label{cursor:pointer;display:inline-block;padding-left:2.25rem;padding-right:calc(.25rem/2);position:relative;width:100%;z-index:1}:host(md-checkbox) .checkbox-label::before{background:var(--checkbox-bg-color,#fff);border:.0625rem solid var(--checkbox-border-color,#545454);border-radius:.25rem;height:1.25rem;width:1.25rem}:host(md-checkbox) .checkbox-label::after,:host(md-checkbox) .checkbox-label::before{content:"";left:calc(.75rem*1.25);position:absolute;top:50%;transform:translate(-50%,-50%)}:host([focus-visible]:not([disabled])){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(:hover:not([disabled])) .checkbox-label::before{background:var(--checkbox-hover-bg-color,#ededed);border:.0625rem solid var(--checkbox-hover-border-color,#545454)}:host(:active:not([disabled])) .checkbox-label::before{background:var(--checkbox-pressed-bg-color,#dedede);border:.0625rem solid var(--checkbox-pressed-border-color,#ccc)}:host([disabled]){opacity:.4}:host([disabled]) .checkbox-label{cursor:not-allowed}:host([disabled]) .checkbox-label::before{background:var(--checkbox-hover-bg-color,#ededed);border:.0625rem solid var(--checkbox-hover-border-color,#545454)}:host([aria-checked=true]) .checkbox-label::after{border:solid var(--checkbox-icon-color,#fff);border-width:0 .12em .12em 0;display:block;height:.6em;transform:translateY(-65%) translateX(-50%) rotate(45deg);width:.35em}:host([aria-checked=true]) .checkbox-label::before{background:var(--checkbox-selected-bg-color,#00a0d1);border:.0625rem solid var(--checkbox-selected-border-color,#00a0d1)}:host([indeterminate]) .checkbox-label::after{border:solid var(--checkbox-icon-color,#fff);border-width:0 0 .12em;display:block;height:.2em;transform:translateY(-85%) translateX(-50%) rotate(0);width:.75em}:host([indeterminate]) .checkbox-label::before{background:var(--checkbox-selected-bg-color,#00a0d1);border:.0625rem solid var(--checkbox-selected-border-color,#00a0d1)}:host([aria-checked=true]:hover:not([disabled])) .checkbox-label::before,:host([indeterminate]:hover:not([disabled])) .checkbox-label::before{background:var(--checkbox-selected-hover-bg-color,#007aa3);border-color:var(--checkbox-selected-hover-border-color,#007aa3)}:host([aria-checked=true]:active:not([disabled])) .checkbox-label::before,:host([indeterminate]:active:not([disabled])) .checkbox-label::before{background:var(--checkbox-selected-pressed-bg-color,#005e7d);border-color:var(--checkbox-selected-pressed-border-color,#005e7d)}@media(forced-colors:active){:host([focus-visible]:not([disabled])){outline:2px solid Highlight;box-shadow:none}}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-checkbox:not(:last-child)){margin-bottom:calc(.25rem*6)}:host([alignment=horizontal]) div{display:flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-checkbox:not(:last-child)){margin-right:calc(.25rem*10)}`}}]);
|
package/dist/chunks/md-39.js
CHANGED
|
@@ -1,42 +1,21 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[39],{
|
|
2
|
-
<
|
|
3
|
-
${this.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</span>
|
|
7
|
-
`:c.html`
|
|
8
|
-
<md-input
|
|
9
|
-
class="date-input"
|
|
10
|
-
slot="menu-trigger"
|
|
11
|
-
role="combobox"
|
|
12
|
-
placeholder=${this.placeholder?this.placeholder:"YYYY-MM-DD"}
|
|
13
|
-
value=${Object(d.ifDefined)(this.value)}
|
|
14
|
-
htmlId=${this.htmlId}
|
|
15
|
-
label=${this.label}
|
|
16
|
-
ariaLabel=${this.ariaLabel+this.chosenDateLabel()}
|
|
17
|
-
ariaExpanded=${this.isMenuOverlayOpen?"true":"false"}
|
|
18
|
-
ariaControls="date-overlay-content"
|
|
19
|
-
auxiliaryContentPosition="before"
|
|
20
|
-
?required=${this.required}
|
|
21
|
-
@keydown=${e=>this.handleInputKeyDown(e)}
|
|
22
|
-
@input-change="${e=>this.handleDateInputChange(e)}"
|
|
23
|
-
?disabled=${this.disabled}
|
|
24
|
-
hide-message=${!this.errorMessage&&this.isValueValid()}
|
|
25
|
-
ariaInvalid=${!!this.errorMessage||!this.isValueValid()}
|
|
26
|
-
.messageArr=${this.errorMessage?[{message:this.errorMessage,type:"error"}]:[{message:"",type:this.isValueValid()?"":"error"}]}
|
|
27
|
-
>
|
|
28
|
-
<md-icon slot="input-section" name="calendar-month-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
29
|
-
</md-input>
|
|
30
|
-
`}
|
|
31
|
-
|
|
32
|
-
<div class="date-overlay-content">
|
|
33
|
-
<md-datepicker-calendar
|
|
34
|
-
@day-select=${e=>this.handleSelect(e)}
|
|
35
|
-
@day-key-event=${e=>this.handleKeyDown(e)}
|
|
36
|
-
.datePickerProps=${{locale:this.locale,selected:this.selectedDate,focused:this.focusedDate,weekStart:this.weekStart}}
|
|
37
|
-
.filterParams=${{minDate:this.minDateData,maxDate:this.maxDateData,filterDate:this.filterDate}}
|
|
38
|
-
></md-datepicker-calendar>
|
|
39
|
-
<slot name="time-picker"></slot>
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[39],{80:function(e,r,t){"use strict";t.r(r),t.d(r,"ProgressBar",(function(){return a}));var a,o=t(6),s=t(5),i=t(0),n=t(4),l=i.css`.progress-bar{background-color:var(--border-color);border-radius:var(--border-radius-small) var(--border-radius-small) 0;box-sizing:border-box;height:4px;margin-bottom:-4px;overflow:hidden;position:relative;width:100%}.progress-bar-value{animation:indeterminateAnimation 1s infinite linear;background-color:var(--link-color);border-radius:var(--border-radius-small) var(--border-radius-small) 0;height:100%;transform-origin:0 50%;width:100%}@keyframes indeterminateAnimation{0%{transform:translateX(0) scaleX(0)}40%{transform:translateX(0) scaleX(.4)}100%{transform:translateX(100%) scaleX(.5)}}.progressbar-label{text-align:left}.progressbar-progress{float:right}.progressbar-label,.progressbar-progress{color:var(--progress-bar-label-text-color,#000);font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.6875rem}.progress{background-color:var(--progress-bar-track-bg-color,#dedede);height:.25rem;margin-bottom:.625rem;overflow:hidden;padding:0;border-radius:var(--progress-bar-border-radius,4px)}.progress .meter{background:#00a0d1;display:block;height:100%}.progress--indeterminate .meter{animation:indeterminateAnimation 1s infinite linear;transform-origin:0 50%;width:100%}@keyframes indeterminateAnimation{0%{transform:translateX(0) scaleX(0)}40%{transform:translateX(0) scaleX(.4)}100%{transform:translateX(100%) scaleX(.5)}}.progress.secondary .meter{background:#545454;display:block;height:100%}.progress.success .meter{background:#00ab50;display:block;height:100%}.progress.danger .meter{background:#f7644a;display:block;height:100%}.progress.warning .meter{background:#d97f00;display:block;height:100%}.progress.info .meter{background:#16a693;display:block;height:100%}@media(forced-colors:active){.progress{background-color:HighlightText;outline:1px solid Highlight;outline-offset:-1px}.progress .meter{background-color:Highlight}}`,p=function(e,r,t,a){var o,s=arguments.length,i=s<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,a);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(i=(s<3?o(i):s>3?o(r,t,i):o(r,t))||i);return s>3&&i&&Object.defineProperty(r,t,i),i};!function(e){let r=class extends i.LitElement{constructor(){super(...arguments),this.dynamic=!1,this.color="",this.label="",this.displayFormat="percentage",this.type="indeterminate",this.min=0,this.max=100,this.value=25,this.adjustedValue=0,this.valueFraction=0,this.meterWidth="100",this.getDisplayFormat=()=>"indeterminate"===this.type?(this.value=100,null):(this.adjustedValue=this.max-this.value<0?this.max:this.value,this.valueFraction=this.adjustedValue/this.max*100||0,this.meterWidth=this.valueFraction.toFixed(0)+"%","none"===this.displayFormat?null:"percentage"===this.displayFormat?this.meterWidth:`${this.adjustedValue} / ${this.max}`),this.getColor=()=>this.color?this.color:this.dynamic?this.valueFraction<25?"success":this.valueFraction<50?"info":this.valueFraction<75?"warning":"danger":void 0}connectedCallback(){super.connectedCallback(),this.requestUpdate("value")}static get styles(){return[s.a,l]}render(){const e={["progress--"+this.type]:this.type,["progress--"+this.color]:this.color};return i.html`
|
|
2
|
+
<span>
|
|
3
|
+
<div class="progressbar-info" data-key="${this.min}">
|
|
4
|
+
<span class="progressbar-label">${this.label}</span>
|
|
5
|
+
<span class="progressbar-progress">${this.getDisplayFormat()}</span>
|
|
40
6
|
</div>
|
|
41
|
-
|
|
42
|
-
|
|
7
|
+
<div class="progress ${Object(n.classMap)(e)}" data-key="${this.max}">
|
|
8
|
+
<span
|
|
9
|
+
class="meter"
|
|
10
|
+
role="progressbar"
|
|
11
|
+
aria-labelledby="progressbar"
|
|
12
|
+
aria-valuenow=${this.adjustedValue}
|
|
13
|
+
aria-valuemin=${this.min}
|
|
14
|
+
aria-valuemax=${this.max}
|
|
15
|
+
aria-valuetext=${this.meterWidth}
|
|
16
|
+
style="${"width: "+this.meterWidth+"; background: "+this.getColor()}"
|
|
17
|
+
>
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
</span>
|
|
21
|
+
`}};p([Object(i.property)({type:Boolean})],r.prototype,"dynamic",void 0),p([Object(i.property)({type:String})],r.prototype,"color",void 0),p([Object(i.property)({type:String})],r.prototype,"label",void 0),p([Object(i.property)({type:String})],r.prototype,"displayFormat",void 0),p([Object(i.property)({type:String})],r.prototype,"type",void 0),p([Object(i.property)({type:Number})],r.prototype,"min",void 0),p([Object(i.property)({type:Number})],r.prototype,"max",void 0),p([Object(i.property)({type:Number})],r.prototype,"value",void 0),p([Object(i.property)({type:Number})],r.prototype,"adjustedValue",void 0),p([Object(i.property)({type:Number})],r.prototype,"valueFraction",void 0),p([Object(i.property)({type:String})],r.prototype,"meterWidth",void 0),r=p([Object(o.a)("md-progress-bar")],r),e.ELEMENT=r}(a||(a={}))}}]);
|
package/dist/chunks/md-40.js
CHANGED
|
@@ -1 +1,42 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[40],{
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[40],{43:function(e,t,a){"use strict";a.r(t),a.d(t,"DatePicker",(function(){return i}));a(72),a(28),a(30);var i,s=a(1),o=a(6),r=a(9),l=a(16),n=a(19),c=a(0),d=a(3),h=a(14),p=function(e,t,a,i){var s,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(r=(o<3?s(r):o>3?s(t,a,r):s(t,a))||r);return o>3&&r&&Object.defineProperty(t,a,r),r},u=function(e,t,a,i){return new(a||(a=Promise))((function(s,o){function r(e){try{n(i.next(e))}catch(e){o(e)}}function l(e){try{n(i.throw(e))}catch(e){o(e)}}function n(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,l)}n((i=i.apply(e,t||[])).next())}))};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends c.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="en-US",this.includesTime=!1,this.disabled=!1,this.htmlId="",this.label="",this.ariaLabel="Choose Date",this.required=!1,this.errorMessage="",this.customTrigger=!1,this.isMenuOverlayOpen=!1,this.selectedDate=Object(r.n)(),this.focusedDate=Object(r.n)(),this.filterDate=void 0,this.maxDateData=void 0,this.minDateData=void 0,this.handleDateInputChange=e=>{var t,a;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value)&&(this.value=null===(a=null==e?void 0:e.detail)||void 0===a?void 0:a.value),this.dispatchEvent(new CustomEvent("date-input-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,value:this.value}}))},this.setOpen=e=>{this.menuOverlay.isOpen=e,this.isMenuOverlayOpen=e},this.handleSelect=e=>{const t=e.detail.date,a=e.detail.sourceEvent;this.setPreSelection(t),this.setSelected(t,a),this.shouldCloseOnSelect&&this.setOpen(!1)},this.setSelected=(e,t)=>{const a={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!Object(r.j)(e,a)){const t=this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate();this.selectedDate=e,this.value=t}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,data:e}}))},this.setPreSelection=e=>{const t={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};Object(r.j)(e,t)||(this.focusedDate=e)},this.handleInputKeyDown=e=>{e.code===s.b.ArrowDown&&this.setOpen(!0)},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let a=!1;const i=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),a=!0;break;case"Escape":this.setOpen(!1);break;case"ArrowUp":this.setPreSelection(Object(r.s)(i,1)),a=!0;break;case"ArrowLeft":this.setPreSelection(Object(r.q)(i,1)),a=!0;break;case"ArrowRight":this.setPreSelection(Object(r.a)(i,1)),a=!0;break;case"ArrowDown":this.setPreSelection(Object(r.c)(i,1)),a=!0}a&&(t.stopPropagation(),t.preventDefault())},this.chosenDateLabel=()=>this.selectedDate?`, Selected date is ${this.selectedDate.weekdayLong} ${this.selectedDate.monthLong} ${this.selectedDate.day}, ${this.selectedDate.year}`:void 0,this.isValueValid=()=>{if(!this.value&&""!==this.value)return!0;const e=Object(l.a)("md-date-range-picker",this),t=e&&e.startDate&&e.endDate?n.a.dateRangeString:this.includesTime?n.a.ISOString:n.a.ISODateString,a=RegExp(t),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return this.value&&a.test(this.value)&&!Object(r.j)(h.DateTime.fromISO(this.value,{locale:this.locale}),i)}}connectedCallback(){super.connectedCallback(),this.minDate&&(this.minDateData=h.DateTime.fromISO(this.minDate,{locale:this.locale})),this.maxDate&&(this.maxDateData=h.DateTime.fromISO(this.maxDate,{locale:this.locale}))}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});var a,i;return u(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),""===this.value&&(this.value=this.includesTime?null===(a=this.selectedDate)||void 0===a?void 0:a.startOf("second").toISO({suppressMilliseconds:!0}):null===(i=this.selectedDate)||void 0===i?void 0:i.toISODate())}))}updated(e){if(super.updated(e),this.value&&e.has("value")){if(Object(l.a)("md-date-range-picker",this))return;this.selectedDate=h.DateTime.fromISO(this.value,{locale:this.locale}),this.setPreSelection(this.selectedDate)}e.has("locale")&&this.render(),this.minDate&&e.has("minDate")&&(this.minDateData=h.DateTime.fromISO(this.minDate,{locale:this.locale})),this.maxDate&&e.has("maxDate")&&(this.maxDateData=h.DateTime.fromISO(this.maxDate,{locale:this.locale}))}render(){return c.html`
|
|
2
|
+
<md-menu-overlay is-date-picker custom-width="248px" ?disabled=${this.disabled}>
|
|
3
|
+
${this.customTrigger?c.html`
|
|
4
|
+
<span slot="menu-trigger">
|
|
5
|
+
<slot name="date-trigger"></slot>
|
|
6
|
+
</span>
|
|
7
|
+
`:c.html`
|
|
8
|
+
<md-input
|
|
9
|
+
class="date-input"
|
|
10
|
+
slot="menu-trigger"
|
|
11
|
+
role="combobox"
|
|
12
|
+
placeholder=${this.placeholder?this.placeholder:"YYYY-MM-DD"}
|
|
13
|
+
value=${Object(d.ifDefined)(this.value)}
|
|
14
|
+
htmlId=${this.htmlId}
|
|
15
|
+
label=${this.label}
|
|
16
|
+
ariaLabel=${this.ariaLabel+this.chosenDateLabel()}
|
|
17
|
+
ariaExpanded=${this.isMenuOverlayOpen?"true":"false"}
|
|
18
|
+
ariaControls="date-overlay-content"
|
|
19
|
+
auxiliaryContentPosition="before"
|
|
20
|
+
?required=${this.required}
|
|
21
|
+
@keydown=${e=>this.handleInputKeyDown(e)}
|
|
22
|
+
@input-change="${e=>this.handleDateInputChange(e)}"
|
|
23
|
+
?disabled=${this.disabled}
|
|
24
|
+
hide-message=${!this.errorMessage&&this.isValueValid()}
|
|
25
|
+
ariaInvalid=${!!this.errorMessage||!this.isValueValid()}
|
|
26
|
+
.messageArr=${this.errorMessage?[{message:this.errorMessage,type:"error"}]:[{message:"",type:this.isValueValid()?"":"error"}]}
|
|
27
|
+
>
|
|
28
|
+
<md-icon slot="input-section" name="calendar-month-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
29
|
+
</md-input>
|
|
30
|
+
`}
|
|
31
|
+
|
|
32
|
+
<div class="date-overlay-content">
|
|
33
|
+
<md-datepicker-calendar
|
|
34
|
+
@day-select=${e=>this.handleSelect(e)}
|
|
35
|
+
@day-key-event=${e=>this.handleKeyDown(e)}
|
|
36
|
+
.datePickerProps=${{locale:this.locale,selected:this.selectedDate,focused:this.focusedDate,weekStart:this.weekStart}}
|
|
37
|
+
.filterParams=${{minDate:this.minDateData,maxDate:this.maxDateData,filterDate:this.filterDate}}
|
|
38
|
+
></md-datepicker-calendar>
|
|
39
|
+
<slot name="time-picker"></slot>
|
|
40
|
+
</div>
|
|
41
|
+
</md-menu-overlay>
|
|
42
|
+
`}};p([Object(c.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),p([Object(c.property)({type:String})],t.prototype,"maxDate",void 0),p([Object(c.property)({type:String})],t.prototype,"minDate",void 0),p([Object(c.property)({type:String,reflect:!0})],t.prototype,"value",void 0),p([Object(c.property)({type:String})],t.prototype,"weekStart",void 0),p([Object(c.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),p([Object(c.property)({type:String})],t.prototype,"locale",void 0),p([Object(c.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),p([Object(c.property)({type:Boolean})],t.prototype,"disabled",void 0),p([Object(c.property)({type:String})],t.prototype,"htmlId",void 0),p([Object(c.property)({type:String})],t.prototype,"label",void 0),p([Object(c.property)({type:String})],t.prototype,"ariaLabel",void 0),p([Object(c.property)({type:Boolean})],t.prototype,"required",void 0),p([Object(c.property)({type:String,reflect:!0})],t.prototype,"errorMessage",void 0),p([Object(c.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),p([Object(c.property)({type:Boolean})],t.prototype,"isMenuOverlayOpen",void 0),p([Object(c.internalProperty)()],t.prototype,"selectedDate",void 0),p([Object(c.internalProperty)()],t.prototype,"focusedDate",void 0),p([Object(c.internalProperty)()],t.prototype,"filterDate",void 0),p([Object(c.internalProperty)()],t.prototype,"maxDateData",void 0),p([Object(c.internalProperty)()],t.prototype,"minDateData",void 0),p([Object(c.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),t=p([Object(o.a)("md-datepicker")],t),e.ELEMENT=t}(i||(i={}))}}]);
|
package/dist/chunks/md-41.js
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[41],{
|
|
2
|
-
${this.show?m.html`
|
|
3
|
-
<div
|
|
4
|
-
class="md-floating ${this.minimize?"":"hide"} md-floating-minimize"
|
|
5
|
-
@click=${this.handleMinimize}
|
|
6
|
-
@keydown="${this.handleKeyDown}"
|
|
7
|
-
role="dialog"
|
|
8
|
-
tabindex="-1"
|
|
9
|
-
part="floating-minimized"
|
|
10
|
-
aria-label=${Object(p.ifDefined)(this.label||void 0)}
|
|
11
|
-
aria-modal="true"
|
|
12
|
-
style=${Object(p.ifDefined)(this.minPosition?`transform: translate(${this.minPosition.x}px, ${this.minPosition.y}px) !important`:`transform: ${this.containerTransform} !important`)}
|
|
13
|
-
>
|
|
14
|
-
<div tabindex="-1" class="md-floating__header ${this.minimize?"md-floating__header-minimize":""}">
|
|
15
|
-
<div class="md-floating__header-text">
|
|
16
|
-
${this.heading?m.html` ${this.heading} `:m.html` <slot></slot> `}
|
|
17
|
-
</div>
|
|
18
|
-
<md-button
|
|
19
|
-
color="color-none"
|
|
20
|
-
class="md-floating__close"
|
|
21
|
-
aria-label="${this.closeAriaLabel}"
|
|
22
|
-
circle
|
|
23
|
-
@click=${this.handleClose}
|
|
24
|
-
>
|
|
25
|
-
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
26
|
-
</md-button>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
`:h.nothing}
|
|
30
|
-
`}};f([Object(m.property)({type:String})],i.prototype,"heading",void 0),f([Object(m.property)({type:String})],i.prototype,"label",void 0),f([Object(m.property)({type:Boolean,reflect:!0})],i.prototype,"show",void 0),f([Object(m.property)({type:String,attribute:"close-aria-label"})],i.prototype,"closeAriaLabel",void 0),f([Object(m.property)({type:Boolean,reflect:!0})],i.prototype,"minimize",void 0),f([Object(m.property)({type:Object})],i.prototype,"minPosition",void 0),f([Object(m.query)(".md-floating")],i.prototype,"container",void 0),f([Object(m.query)(".md-floating__header")],i.prototype,"header",void 0),f([Object(m.internalProperty)()],i.prototype,"dragOccured",void 0),f([Object(m.internalProperty)()],i.prototype,"containerTransform",void 0),i=f([Object(r.a)("md-floating-modal-minimized")],i),t.ELEMENT=i}(n||(n={}))}}]);
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[41],{64:function(e,r,d){"use strict";var o=d(0);r.a=o.css`:host{display:block}.md-draggable-item.extended{align-items:center;background-color:var(--md-secondary-white-bg-color);border:1px solid var(--md-menu-overlay-border-color);display:flex;flex-direction:row;padding:.375rem}.md-draggable-item.extended md-icon{cursor:grab;margin-right:.375rem}.md-draggable-item.extended:hover{background-color:var(--md-secondary-bg-color)}.md-draggable-item.extended ::slotted(*){flex:1 1 auto;margin-right:calc(.375rem*2);text-align:left}.md-draggable-item.default{border:2px solid transparent;border-radius:.25rem;cursor:grab;display:flex;padding:calc(.375rem/2) .375rem}.md-draggable-item.default:hover{background-color:var(--md-tertiary-white-bg-color);border:2px solid var(--md-default-focus-outline-color);box-shadow:0 2px 4px rgba(0,0,0,.1),0 0 1px rgba(0,0,0,.18)}.md-draggable-item.disabled{cursor:default}.md-draggable-item.disabled:hover{background-color:rgba(0,0,0,0);border:2px solid transparent;box-shadow:none}@media(forced-colors:active){.md-draggable-item.extended{border:1px solid CanvasText}.md-draggable-item.default{border:none;outline:0}.md-draggable-item.default:hover{outline:1px solid Highlight;border:none}}`}}]);
|
package/dist/chunks/md-42.js
CHANGED
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[42],{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[42],{65:function(t,i,e){"use strict";var n=e(0);i.a=n.css`.md-floating{background-color:var(--floating-modal-main-bg-color,#fff);border:1px solid var(--floating-modal-outer-border-color,#ededed);border-radius:8px;box-shadow:var(--floating-modal-main-box-shadow,0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16));display:flex;flex-direction:column;max-height:100%;max-width:100%;position:absolute;touch-action:none;user-select:none;z-index:1040}.md-floating.fixed{position:fixed}.md-floating.hide{display:block;height:0;visibility:hidden;width:0}.md-floating.md-floating-minimize{background:var(--floating-modal-main-bg-color-alternate,#545454);border-radius:8px;width:100%}.md-floating.md-floating-minimize:focus{box-shadow:0 0 0 .125rem #005e7d;outline:0}.md-floating .md-floating__header{align-items:center;border-bottom:1px solid var(--floating-modal-main-border-color,#dedede);color:var(--floating-modal-main-text-color,#121212);display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;max-height:3rem;padding:.5rem .5rem .5rem .75rem;width:100%}.md-floating .md-floating__header-text{flex:2 1 auto;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:16px;text-align:left}.md-floating .md-floating__body{height:calc(100% - 3rem);overflow:auto;padding:.75rem 1.25rem}.md-floating .md-floating-body-minimize{display:block;height:0;visibility:hidden}.md-floating .md-floating__header-minimize{border-bottom:0;color:var(--floating-modal-main-text-color-alternate,#f7f7f7);font-size:16px;line-height:24px;width:100%}.md-floating-min-parent{bottom:0;height:3rem!important;position:absolute;right:0;width:223px!important}`},76:function(t,i,e){"use strict";e.r(i),e.d(i,"FloatingMinimizedModal",(function(){return n}));e(17),e(15);var n,o=e(1),a=e(7),r=e(6),s=e(16),l=e(5),d=(e(46),e(47),e(48),e(21)),c=e.n(d),m=(e(49),e(0)),h=e(2),p=e(3),u=e(65),f=function(t,i,e,n){var o,a=arguments.length,r=a<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(i,e,r):o(i,e))||r);return a>3&&r&&Object.defineProperty(i,e,r),r},g=function(t,i,e,n){return new(e||(e=Promise))((function(o,a){function r(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var i;t.done?o(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(r,s)}l((n=n.apply(t,i||[])).next())}))};!function(t){let i=class extends(Object(a.a)(m.LitElement)){constructor(){super(...arguments),this.heading="",this.label="",this.show=!1,this.closeAriaLabel="Close Modal",this.minimize=!1,this.dragOccured=!1,this.containerTransform="",this.applyInitialPosition=!0,this.getInitialPosition=()=>{var t,i;return this.applyInitialPosition&&this.minPosition?{initialX:Number(null===(t=this.minPosition)||void 0===t?void 0:t.x),initialY:Number(null===(i=this.minPosition)||void 0===i?void 0:i.y)}:{initialX:0,initialY:0}},this.dragMoveListener=t=>{const{target:i}=t,{x:e,y:n}=this.getTransformValues(t);this.setTargetPosition(i,e,n),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()}}static get styles(){return[l.a,u.a]}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",Object(s.b)(()=>this.setInteractInstance(),250))}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance(),this.setFocusOnContainer()):(this.cleanContainerStyles(),this.destroyInteractInstance())),this.container&&t.has("minPosition")&&!t.has("show")&&this.setInitialTargetPosition(),t.has("minimize")&&void 0!==t.get("minimize")&&this.setFocusOnContainer()}isNewPositionNotSame(){var t,i,e,n;if(this.container)return Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-x"))!==(null===(i=this.minPosition)||void 0===i?void 0:i.x)||Number(null===(e=this.container)||void 0===e?void 0:e.getAttribute("data-y"))!==(null===(n=this.minPosition)||void 0===n?void 0:n.y)}setInitialTargetPosition(){var t,i;this.container&&this.isNewPositionNotSame()&&this.setTargetPosition(this.container,Number(null===(t=this.minPosition)||void 0===t?void 0:t.x),Number(null===(i=this.minPosition)||void 0===i?void 0:i.y))}setFocusOnContainer(){this.container&&(this.container.setAttribute("tabindex","0"),this.container.focus())}cleanContainerStyles(){this.containerTransform=""}getContainerTransform(){const t=this.container.getAttribute("data-x"),i=this.container.getAttribute("data-y");return t&&i?(this.dispatchEvent(new CustomEvent("floating-modal-minimize-location",{composed:!0,bubbles:!0,detail:{transform:{x:t,y:i}}})),`translate(${t}px, ${i}px)`):this.container.style.transform}setContainerRect(){requestAnimationFrame(()=>g(this,void 0,void 0,(function*(){yield this.updateComplete,this.containerTransform=this.getContainerTransform()})))}setInteractInstance(){requestAnimationFrame(()=>{this.container&&c()(this.container).draggable({autoScroll:!0,allowFrom:this.header,listeners:{move:this.dragMoveListener,end:this.dragEndListener},modifiers:[c.a.modifiers.restrictRect({restriction:document.body.getBoundingClientRect(),endOnly:!0})]})})}handleKeyDown(t){t.code!==o.b.Enter&&t.code!==o.b.Space||this.handleMinimize(t)}handleClose(t){this.show=!1,this.dispatchEvent(new CustomEvent("floating-modal-close",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),t.stopPropagation()}handleMinimize(t){this.dragOccured||this.dispatchEvent(new CustomEvent("floating-min-modal-minimize",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),this.dragOccured=!1}getTransformValues(t){const{target:i,dx:e,dy:n}=t,{initialX:o,initialY:a}=this.getInitialPosition();return{x:(parseFloat(i.getAttribute("data-x"))||0)+e+o,y:(parseFloat(i.getAttribute("data-y"))||0)+n+a}}setTargetPosition(t,i,e){t.style.transform=`translate(${i}px, ${e}px)`,t.setAttribute("data-x",""+i),t.setAttribute("data-y",""+e)}destroyInteractInstance(){this.container&&c.a.isSet(this.container)&&c()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance(),window.removeEventListener("resize",Object(s.b)(()=>this.setInteractInstance(),250))}render(){return m.html`
|
|
2
|
+
${this.show?m.html`
|
|
3
|
+
<div
|
|
4
|
+
class="md-floating ${this.minimize?"":"hide"} md-floating-minimize"
|
|
5
|
+
@click=${this.handleMinimize}
|
|
6
|
+
@keydown="${this.handleKeyDown}"
|
|
7
|
+
role="dialog"
|
|
8
|
+
tabindex="-1"
|
|
9
|
+
part="floating-minimized"
|
|
10
|
+
aria-label=${Object(p.ifDefined)(this.label||void 0)}
|
|
11
|
+
aria-modal="true"
|
|
12
|
+
style=${Object(p.ifDefined)(this.minPosition?`transform: translate(${this.minPosition.x}px, ${this.minPosition.y}px) !important`:`transform: ${this.containerTransform} !important`)}
|
|
13
|
+
>
|
|
14
|
+
<div tabindex="-1" class="md-floating__header ${this.minimize?"md-floating__header-minimize":""}">
|
|
15
|
+
<div class="md-floating__header-text">
|
|
16
|
+
${this.heading?m.html` ${this.heading} `:m.html` <slot></slot> `}
|
|
17
|
+
</div>
|
|
18
|
+
<md-button
|
|
19
|
+
color="color-none"
|
|
20
|
+
class="md-floating__close"
|
|
21
|
+
aria-label="${this.closeAriaLabel}"
|
|
22
|
+
circle
|
|
23
|
+
@click=${this.handleClose}
|
|
24
|
+
>
|
|
25
|
+
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
26
|
+
</md-button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
`:h.nothing}
|
|
30
|
+
`}};f([Object(m.property)({type:String})],i.prototype,"heading",void 0),f([Object(m.property)({type:String})],i.prototype,"label",void 0),f([Object(m.property)({type:Boolean,reflect:!0})],i.prototype,"show",void 0),f([Object(m.property)({type:String,attribute:"close-aria-label"})],i.prototype,"closeAriaLabel",void 0),f([Object(m.property)({type:Boolean,reflect:!0})],i.prototype,"minimize",void 0),f([Object(m.property)({type:Object})],i.prototype,"minPosition",void 0),f([Object(m.query)(".md-floating")],i.prototype,"container",void 0),f([Object(m.query)(".md-floating__header")],i.prototype,"header",void 0),f([Object(m.internalProperty)()],i.prototype,"dragOccured",void 0),f([Object(m.internalProperty)()],i.prototype,"containerTransform",void 0),i=f([Object(r.a)("md-floating-modal-minimized")],i),t.ELEMENT=i}(n||(n={}))}}]);
|
package/dist/chunks/md-43.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[43],{
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[43],{57:function(e,t,d){"use strict";d.r(t),d.d(t,"MenuItem",(function(){return s}));var s,i=d(5),n=d(6),a=d(0),l=d(4),r=d(3),m=d(66),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
|
+
<li
|
|
3
|
+
role="menuitem"
|
|
4
|
+
part="menu-item"
|
|
5
|
+
class="md-menu-item ${Object(l.classMap)(this.menuItemClassMap)}"
|
|
6
|
+
?disabled=${this.disabled}
|
|
7
|
+
tabindex="-1"
|
|
8
|
+
aria-hidden="true"
|
|
9
|
+
aria-selected="false"
|
|
10
|
+
aria-label=${Object(r.ifDefined)(this.label)}
|
|
11
|
+
>
|
|
12
|
+
<a href="${Object(r.ifDefined)(this.href||void 0)}">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</a>
|
|
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={}))},66: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-44.js
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[44],{
|
|
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 r.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,isPill:"Pill"===this.type,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(r.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([Object(r.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),p([Object(r.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),p([Object(r.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),p([Object(r.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),p([Object(r.property)({type:String})],e.prototype,"ariaRole",void 0),p([Object(r.property)({type:String})],e.prototype,"type",void 0),p([Object(r.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([Object(r.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),p([Object(r.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([Object(r.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),p([Object(r.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),p([Object(r.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([[44],{68:function(o,e,r){"use strict";var i=r(0);e.a=i.css`:host{--radio-label-text-color:var(--radio-input-text-color, $lm-radio-input-text-color-light)}:host(md-radio) .md-radio-wrapper{max-height:1.4375rem;display:inline-flex}: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,#121212);cursor:pointer;font-size:14px;line-height:1.4375rem;padding-left:calc(1.25rem*1.8);padding-right:calc(.25rem/2);pointer-events:none;position:relative;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,#545454);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,#fff),inset 0 0 0 1.25rem var(--radio-input-bg-color,#fff);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,#005e7d)}:host(:hover:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color,#545454);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color,#545454),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color,#545454)}:host(:active:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-pressed-border-color,#ccc);box-shadow:inset 0 0 0 .36rem var(--radio-input-pressed-bg-color,#dedede),inset 0 0 0 1.25rem var(--radio-input-pressed-bg-color,#dedede)}:host([disabled]){cursor:not-allowed;opacity:.4}:host([disabled]) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color,#545454);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color,#545454),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color,#545454)}:host([aria-checked=true]) .md-radio-label:before{border-color:var(--radio-input-selected-border-color,#00a0d1);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-bg-color,#00a0d1),inset 0 0 0 1.25rem var(--radio-input-icon-color,#fff)}:host([aria-checked=true]:hover:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-hover-border-color,#007aa3);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-hover-bg-color,#007aa3),inset 0 0 0 1.25rem var(--radio-input-icon-color,#fff)}:host([aria-checked=true]:active:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-pressed-border-color,#005e7d);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-pressed-bg-color,#005e7d),inset 0 0 0 1.25rem var(--radio-input-icon-color,#fff)}@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-45.js
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[45],{
|
|
2
|
-
<div
|
|
3
|
-
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[45],{44:function(t,e,s){"use strict";s.r(e),s.d(e,"TAB_CROSS_WIDTH",(function(){return b})),s.d(e,"Tab",(function(){return h}));var i=s(1),o=s(7),a=s(6),l=s(5),r=s(0),n=s(4),d=s(3),c=s(38),p=function(t,e,s,i){var o,a=arguments.length,l=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,s,i);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(l=(a<3?o(l):a>3?o(e,s,l):o(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l};const b=22;var h;!function(t){let e=class extends(Object(o.a)(r.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._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[l.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===i.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 r.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 r.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,isPill:"Pill"===this.type,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(r.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([Object(r.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),p([Object(r.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),p([Object(r.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),p([Object(r.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),p([Object(r.property)({type:String})],e.prototype,"ariaRole",void 0),p([Object(r.property)({type:String})],e.prototype,"type",void 0),p([Object(r.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([Object(r.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),p([Object(r.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([Object(r.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),p([Object(r.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),p([Object(r.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-46.js
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[46],{85:function(e,t,
|
|
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([[46],{85: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(6),d=o(5),r=o(0),a=o(58),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={}))}}]);
|