@momentum-ui/web-components 2.17.9 → 2.17.11
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/assets/styles/fonts.css +1 -1
- package/dist/chunks/md-11.js +1 -1
- package/dist/chunks/md-13.js +1 -1
- package/dist/chunks/md-17.js +1 -1
- package/dist/chunks/md-18.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-23.js +1 -1
- package/dist/chunks/md-24.js +1 -7
- package/dist/chunks/md-25.js +7 -8
- package/dist/chunks/md-26.js +8 -1
- package/dist/chunks/md-27.js +1 -1
- package/dist/chunks/md-31.js +1 -1
- package/dist/chunks/md-32.js +1 -1
- package/dist/chunks/md-4.js +1 -1
- package/dist/chunks/md-42.js +1 -1
- package/dist/chunks/md-43.js +1 -1
- package/dist/chunks/md-52.js +5 -5
- package/dist/chunks/md-56.js +4 -4
- package/dist/chunks/md-59.js +1 -1
- package/dist/chunks/md-6.js +3 -3
- package/dist/chunks/md-68.js +1 -1
- package/dist/chunks/md-7.js +1 -1
- package/dist/chunks/md-75.js +5 -5
- package/dist/chunks/md-79.js +1 -1
- package/dist/chunks/md-86.js +1 -1
- package/dist/chunks/md-88.js +2 -2
- package/dist/chunks/md-90.js +1 -1
- package/dist/comp/md-accordion-item-entry.js +1 -1
- package/dist/comp/md-activity-button-entry.js +1 -1
- package/dist/comp/md-advance-list-entry.js +1 -1
- package/dist/comp/md-alert-banner-entry.js +1 -1
- package/dist/comp/md-alert-entry.js +1 -1
- package/dist/comp/md-audio-player-entry.js +1 -1
- package/dist/comp/md-avatar-entry.js +1 -1
- package/dist/comp/md-avatar.js +1 -1
- package/dist/comp/md-card-ai-entry.js +1 -1
- package/dist/comp/md-card-entry.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-chip-entry.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.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 +2 -2
- package/dist/comp/md-date-time-picker-entry.js +1 -1
- package/dist/comp/md-datepicker-calendar-entry.js +1 -1
- package/dist/comp/md-datepicker-calendar.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-month.js +1 -1
- package/dist/comp/md-datepicker.js +2 -2
- package/dist/comp/md-dropdown-entry.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-grabber-entry.js +1 -1
- package/dist/comp/md-grabber.js +1 -0
- package/dist/comp/md-icon-entry.js +1 -1
- package/dist/comp/md-input-entry.js +1 -1
- package/dist/comp/md-loading-entry.js +1 -1
- package/dist/comp/md-loading.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-overlay-entry.js +1 -1
- package/dist/comp/md-modal-entry.js +1 -1
- package/dist/comp/md-modal.js +1 -1
- package/dist/comp/md-pagination-entry.js +1 -1
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-popover-entry.js +1 -1
- package/dist/comp/md-table-advanced-entry.js +1 -1
- package/dist/comp/md-table-entry.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-task-item-entry.js +1 -1
- package/dist/comp/md-timepicker-entry.js +1 -1
- package/dist/comp/md-timepicker.js +1 -1
- package/dist/index-entry.js +2 -2
- package/dist/index.js +3 -3
- package/dist/managers/thememanager-entry.js +1 -1
- package/dist/managers/thememanager.js +1 -1
- package/dist/types/components/button/Button.d.ts +1 -1
- package/dist/types/components/grabber/Grabber.d.ts +7 -1
- package/dist/types/components/popover/Popover.d.ts +1 -1
- package/dist/types/components/tabs/Tabs.d.ts +5 -1
- package/dist/types/components/tooltip/Tooltip.d.ts +3 -3
- package/package.json +1 -1
package/dist/chunks/md-52.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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 s}));var s,r=i(1),d=i(5),l=i(
|
|
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 s}));var s,r=i(1),d=i(5),l=i(33),a=i(6),o=i(0),n=i(32),c=o.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)}.selected-border-bottom{border-bottom:1px solid var(--md-gray-20)}`,h=function(t,e,i,s){var r,d=arguments.length,l=d<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(l=(d<3?r(l):d>3?r(e,i,l):r(e,i))||l);return d>3&&l&&Object.defineProperty(e,i,l),l};!function(t){t.prefixId="item-";let e=class extends(Object(l.a)(o.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.disabledItems=[],this.totalRecords=0,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=e=>{var i;const{ArrowDown:s,ArrowUp:d,Tab:l,Space:a,Enter:o}=r.b,{code:n}=e,c=n===s,h=n===d,p=n===l,u=n===a,v=n===o;if(c||h){if(e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0)return void(this.activeId=this.value[0]);if(""===this.activeId&&!h&&this.items.length>0)return void(this.activeId=this.items[0].id);const t=this.items.findIndex(t=>t.id===this.activeId);c?t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id):t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id)}else if(p)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((u||v)&&(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.updateItemSelection(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[a.a,c]}getStyles(){return o.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host .virtual-scroll {
|
|
4
4
|
height: ${this.containerHeight};
|
|
5
5
|
}
|
|
6
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.selectedItemsIds=this.value,this.updateSelectedState()}),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>!this.disabledItems.includes(t.id)).map(t=>t.id),this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,s,r,d;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?null===(d=e.querySelector("md-checkbox"))||void 0===d||d.removeAttribute("checked"):null===(r=e.querySelector("md-checkbox"))||void 0===r||r.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):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,s;const r=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,r),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0");(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.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"))||[]),s=t.composedPath(),r=i.find(t=>s.includes(t));if(r){return(null==r?void 0:r.hasAttribute("disabled"))||"true"===(null==r?void 0:r.getAttribute("aria-disabled"))?0:r}}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[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.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}renderItem(e,i){return"status-indicator"===e.id?
|
|
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;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&this.requestUpdate().then(()=>{this.selectedItemsIds=this.value,this.updateSelectedState()}),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>!this.disabledItems.includes(t.id)).map(t=>t.id),this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,s,r,d;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?null===(d=e.querySelector("md-checkbox"))||void 0===d||d.removeAttribute("checked"):null===(r=e.querySelector("md-checkbox"))||void 0===r||r.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):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,s;const r=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,r),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0");(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.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"))||[]),s=t.composedPath(),r=i.find(t=>s.includes(t));if(r){return(null==r?void 0:r.hasAttribute("disabled"))||"true"===(null==r?void 0:r.getAttribute("aria-disabled"))?0:r}}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[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.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}renderItem(e,i){return"status-indicator"===e.id?o.html`
|
|
8
8
|
<div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
|
|
9
|
-
`:
|
|
9
|
+
`:o.html`
|
|
10
10
|
<div
|
|
11
11
|
class="default-wrapper ${e.id}"
|
|
12
12
|
part="advance-list-item-wrapper"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
>
|
|
20
20
|
${e.template(e,i)}
|
|
21
21
|
</div>
|
|
22
|
-
`}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value[0]}`:""}render(){return
|
|
22
|
+
`}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value[0]}`:""}render(){return o.html`
|
|
23
23
|
${this.getStyles()}
|
|
24
24
|
<div
|
|
25
25
|
class="md-advance-list-wrapper virtual-scroll"
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
>
|
|
33
33
|
${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})}
|
|
34
34
|
</div>
|
|
35
|
-
`}};h([Object(
|
|
35
|
+
`}};h([Object(o.property)({type:Array})],e.prototype,"items",void 0),h([Object(o.property)({type:Boolean})],e.prototype,"isLoading",void 0),h([Object(o.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),h([Object(o.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),h([Object(o.property)({type:Array})],e.prototype,"value",void 0),h([Object(o.property)({type:String})],e.prototype,"ariaRoleList",void 0),h([Object(o.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),h([Object(o.property)({type:String})],e.prototype,"ariaLabelList",void 0),h([Object(o.property)({type:Boolean})],e.prototype,"isError",void 0),h([Object(o.property)({type:String})],e.prototype,"containerHeight",void 0),h([Object(o.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),h([Object(o.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),h([Object(o.property)({type:Array})],e.prototype,"disabledItems",void 0),h([Object(o.queryAll)("div.default-wrapper")],e.prototype,"lists",void 0),h([Object(o.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),h([Object(o.property)({type:Number})],e.prototype,"totalRecords",void 0),h([Object(o.internalProperty)()],e.prototype,"scrollIndex",void 0),h([Object(o.internalProperty)()],e.prototype,"activeId",void 0),h([Object(o.internalProperty)()],e.prototype,"selectedItemsIds",void 0),h([Object(o.internalProperty)()],e.prototype,"isUserNavigated",void 0),e=h([Object(d.a)("md-advance-list")],e),t.ELEMENT=e}(s||(s={}))}}]);
|
package/dist/chunks/md-56.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[56],{115:function(e,r,t){"use strict";t.r(r),t.d(r,"Breadcrumb",(function(){return a}));var a,n=t(
|
|
2
|
-
<nav aria-label="${Object(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[56],{115:function(e,r,t){"use strict";t.r(r),t.d(r,"Breadcrumb",(function(){return a}));var a,n=t(5),o=t(6),s=t(0),c=t(3),i=t(13),l=s.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-breadcrumb) .md-breadcrumb ul{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;margin:0;padding:.5625rem .875rem .5625rem;list-style:none}:host(md-breadcrumb) .md-breadcrumb li{display:flex;text-transform:capitalize;font-size:.875rem}:host(md-breadcrumb) .md-breadcrumb li:not(:first-child)::before{display:flex;margin:0 .75rem;color:var(--breadcrumb-color-slash);content:"/"}:host(md-breadcrumb) .md-breadcrumb a{color:var(--breadcrumb-color)}:host(md-breadcrumb) .md-breadcrumb a[aria-current=page]{pointer-events:none;cursor:default;color:var(--breadcrumb-color-current)}`,d=function(e,r,t,a){var n,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,r,t,a);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(s=(o<3?n(s):o>3?n(r,t,s):n(r,t))||s);return o>3&&s&&Object.defineProperty(r,t,s),s};!function(e){let r=class extends s.LitElement{constructor(){super(...arguments),this.label="Breadcrumb",this.navCrumbs=[]}static get styles(){return[o.a,l]}setLastAnchorCurrent(){var e;(null===(e=this.anchors)||void 0===e?void 0:e.length)&&this.anchors[this.anchors.length-1].setAttribute("aria-current","page")}firstUpdated(e){super.firstUpdated(e),this.setLastAnchorCurrent()}update(e){super.update(e),e.has("navCrumbs")&&this.setLastAnchorCurrent()}handleClick(e){var r;const t=e.target;if(null===(r=this.anchors)||void 0===r?void 0:r.length){const e=Array.from(this.anchors).indexOf(t);-1!==e&&(this.navCrumbs=[...this.navCrumbs.splice(0,e+1)])}}render(){return s.html`
|
|
2
|
+
<nav aria-label="${Object(c.ifDefined)(this.label?this.label:void 0)}" class="md-breadcrumb">
|
|
3
3
|
<ul @click=${e=>this.handleClick(e)}>
|
|
4
|
-
${Object(i.repeat)(this.navCrumbs,e=>e.link,e=>
|
|
4
|
+
${Object(i.repeat)(this.navCrumbs,e=>e.link,e=>s.html`
|
|
5
5
|
<li>
|
|
6
6
|
<a href="${e.link}"> ${e.label} </a>
|
|
7
7
|
</li>
|
|
8
8
|
`)}
|
|
9
9
|
</ul>
|
|
10
10
|
</nav>
|
|
11
|
-
`}};
|
|
11
|
+
`}};d([Object(s.property)({type:String,attribute:"aria-label"})],r.prototype,"label",void 0),d([Object(s.property)({type:Array,attribute:"nav-crumbs",reflect:!0})],r.prototype,"navCrumbs",void 0),d([Object(s.queryAll)("a[href]")],r.prototype,"anchors",void 0),r=d([Object(n.a)("md-breadcrumb")],r),e.ELEMENT=r}(a||(a={}))}}]);
|
package/dist/chunks/md-59.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[59],{118:function(e,t,d){"use strict";d.r(t),d.d(t,"Card",(function(){return r}));d(17),d(83),d(14),d(74),d(75),d(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[59],{118:function(e,t,d){"use strict";d.r(t),d.d(t,"Card",(function(){return r}));d(17),d(83),d(14),d(74),d(75),d(37),d(40);var r,o=d(5),a=d(6),i=d(0),n=d(2),c=d(13),m=d(1),s=i.css`:host(md-card){display:inline-block}:host(md-card) .md-card{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-tertiary-white-bg-color);border:var(--md-quaternary-bg-color);border-radius:.5rem;box-shadow:0 .125rem .25rem rgba(0,0,0,.16),0 0 .0625rem rgba(0,0,0,.16);color:var(--md-secondary-text-color);cursor:pointer;max-width:26.5rem;padding:calc(.5rem*2);position:relative;width:100%}:host(md-card) .md-card-header{align-content:flex-start;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:space-between;flex:1 0 100%;margin-bottom:.5rem}:host(md-card) .md-card-header md-favorite{padding-top:calc(.5rem*.5)}:host(md-card) .md-card-header-title{display:flex;flex:1 1 100%;flex-direction:column;margin:0 .5rem}:host(md-card) .md-card-header-title h1{color:var(--md-primary-text-color);font-family:var(--brand-font-medium, "CiscoSans-Medium", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:calc(.5rem*3);margin:0}:host(md-card) .md-card-header-title h2{color:var(--md-secondary-text-color);font-size:12px;line-height:calc(.5rem*2.25)}:host(md-card) .md-card-header-actions{align-self:stretch;display:inline-flex;position:relative;z-index:1}:host(md-card) .md-card-header-actions .md-card-info-icon,:host(md-card) .md-card-header-actions .md-card-max-icon{padding-right:.5rem}:host(md-card) .md-card-header-actions md-menu-overlay::part(overlay-content){max-width:9rem}:host(md-card) .md-card .md-card-menu-icon{border-radius:calc(.5rem/2);display:inline-flex}:host(md-card) .md-card .md-card-menu-icon::part(button){padding:calc(.5rem*.25)}:host(md-card) .md-card .md-card-menu-icon:hover{background-color:var(--md-tertiary-bg-color)}:host(md-card) .md-card .md-card-menu-icon:active{background-color:var(--md-quaternary-bg-color)}:host(md-card) .md-card .md-card-menu-list-items{padding:calc(.5rem*.25)}:host(md-card) .md-card-content{background:var(--md-secondary-bg-color);border:var(--md-quaternary-bg-color);border-radius:calc(.5rem/2);height:14rem;margin-bottom:calc(.5rem*2);overflow:hidden}:host(md-card) .md-card.full-screen{display:inline-block;height:100%!important;left:0;max-width:100%;position:absolute;top:0;width:100%}:host(md-card) .md-card.full-screen .md-card-content{height:auto}:host(md-card) .md-card-footer{display:flex;flex-wrap:wrap;gap:.5rem}@media(forced-colors:active){:host(md-card) .md-card{box-shadow:none;outline:1px solid CanvasText}:host(md-card) .md-card:focus{outline:2px solid Highlight}:host(md-card) .md-card-header md-favorite{color:windowText}}`,l=function(e,t,d,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,d):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,d,r);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(i=(a<3?o(i):a>3?o(t,d,i):o(t,d))||i);return a>3&&i&&Object.defineProperty(t,d,i),i};!function(e){let t=class extends i.LitElement{constructor(){super(...arguments),this.title="title",this.subtitle="",this.id="",this.info="",this.infoAriaLabel="Card Info",this.menuAriaLabel="Card Menu",this.menuOptions=[]}static get styles(){return[a.a,s]}handleCardClick(){this.dispatchEvent(new CustomEvent("card-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardKeyDown(e){e.code!==m.b.Enter&&e.code!==m.b.Space||this.dispatchEvent(new CustomEvent("card-keydown",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardMenuEvent(e,t){e.stopPropagation();const d=t.toLowerCase();this.dispatchEvent(new CustomEvent("card-menu-click",{detail:{id:this.id,type:d},bubbles:!0,composed:!0}))}handleCardMenuKeyDown(e,t){e.preventDefault(),this.dispatchEvent(new CustomEvent("card-menu-keydown",{detail:{id:this.id,type:t.toLowerCase(),keyCode:e.code},bubbles:!0,composed:!0}))}render(){return i.html`
|
|
2
2
|
<div
|
|
3
3
|
class="md-card"
|
|
4
4
|
id="${this.id}"
|