@momentum-ui/web-components 2.16.13 → 2.16.15
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 +1 -1
- 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-33.js +1 -1
- package/dist/chunks/md-34.js +2 -2
- package/dist/chunks/md-35.js +1 -1
- 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 +35 -35
- package/dist/managers/thememanager-entry.js +1 -1
- package/dist/managers/thememanager.js +1 -1
- package/dist/types/components/combobox/ComboBox.d.ts +1 -1
- package/dist/types/components/grabber/Grabber.d.ts +1 -1
- package/dist/types/components/link/Link.d.ts +3 -0
- package/dist/types/components/modal/Modal.d.ts +4 -0
- package/dist/types/components/timepicker/TimePicker.d.ts +1 -1
- package/package.json +2 -2
package/dist/chunks/md-58.js
CHANGED
|
@@ -1,68 +1,77 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[58],{
|
|
2
|
-
|
|
3
|
-
class="md-card"
|
|
4
|
-
id="${this.id}"
|
|
5
|
-
part="card"
|
|
6
|
-
tabindex="0"
|
|
7
|
-
@click=${()=>this.handleCardClick()}
|
|
8
|
-
@keydown=${e=>this.handleCardKeyDown(e)}
|
|
9
|
-
>
|
|
10
|
-
<div class="md-card-header">
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[58],{117:function(t,e,r){"use strict";r.r(e),r.d(e,"CardAiVariant",(function(){return i})),r.d(e,"CardAi",(function(){return d}));r(17),r(14);var i,d,a=r(5),o=r(6),s=r(0),c=r(2),n=s.css`:host(md-card-ai){display:inline-block}:host(md-card-ai) .content-margin{margin-left:1.5rem}:host(md-card-ai) .md-card-ai{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);min-width:21.875rem;max-width:26.5rem;padding:0;position:relative;width:100%}:host(md-card-ai) .md-card-ai-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-ai) .md-card-ai-header md-icon{padding-top:calc(.5rem*.5)}:host(md-card-ai) .md-card-ai-header-title{display:flex;flex:1 1 100%;flex-direction:column;margin:0 .5rem;color:var(--md-primary-text-color)}:host(md-card-ai) .md-card-ai-header-title h3{font-weight:600}:host(md-card-ai) .md-card-ai-card-body-response,:host(md-card-ai) .md-card-ai-card-body-response-no-bottom-border-radius,:host(md-card-ai) .md-card-ai-card-body-response-with-bottom-border-radius{color:var(--md-primary-text-color);background:var(--md-secondary-bg-color);background-color:var(--md-background-tertiary);border:var(--md-quaternary-bg-color);margin-bottom:calc(.5rem*2);padding:.5rem .75rem .75rem .75rem}:host(md-card-ai) .md-card-ai-card-body-response-with-bottom-border-radius{border-radius:.5rem}:host(md-card-ai) .md-card-ai-card-body-response-no-bottom-border-radius{border-radius:.5rem .5rem 0 0}:host(md-card-ai) .md-card-ai-card-body-user-query{color:var(--md-primary-text-color);background:var(--md-secondary-bg-color);background-color:var(--card-ai-blue-bg-color);border:var(--md-quaternary-bg-color);border-radius:.5rem .5rem 0 .5rem;margin-bottom:calc(.5rem*2);padding:.5rem}:host(md-card-ai) .md-card-ai-divider{border-bottom:1px solid var(--md-primary-text-color);margin:1rem 0}:host(md-card-ai) .md-card-ai-time{font-weight:400;margin-right:.5rem}:host(md-card-ai) .md-card-ai-time-wrapper{display:flex;align-items:center}:host(md-card-ai) .md-card-ai-dot-separator{margin-right:.5rem}:host(md-card-ai) .md-card-ai-feedback{display:flex;align-items:center}:host(md-card-ai) .md-card-ai-thumbs-up{padding-right:.3125rem}:host(md-card-ai) .md-card-ai-copy-button-container{margin-left:auto}:host(md-card-ai) .md-card-ai-footer{display:flex;flex-wrap:wrap;gap:.5rem}`,m=r(12),h=function(t,e,r,i){var d,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,i);else for(var s=t.length-1;s>=0;s--)(d=t[s])&&(o=(a<3?d(o):a>3?d(e,r,o):d(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o};!function(t){t.USER_QUERY="user_query",t.RESPONSE="response"}(i||(i={})),function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.id="",this.title="",this.cardText="",this.timestamp="",this.summariseMoreVisible=!1,this.variant=i.RESPONSE,this.copyChecked=!1,this.thumbsUpChecked=!1,this.thumbsDownChecked=!1}static get styles(){return[o.a,n]}thumbsUpToggled(){this.thumbsDownChecked=!1,this.thumbsUpChecked=!this.thumbsUpChecked,this.dispatchEvent(new CustomEvent("thumbs-up-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}thumbsDownToggled(){this.thumbsUpChecked=!1,this.thumbsDownChecked=!this.thumbsDownChecked,this.dispatchEvent(new CustomEvent("thumbs-down-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}summariseMoreToggled(){this.dispatchEvent(new CustomEvent("summarise-more-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}copyToggled(){navigator.clipboard.writeText(this.cardText),this.copyChecked=!0,setTimeout(()=>{this.copyChecked=!1},2e3)}renderHeader(){return this.variant===i.RESPONSE&&""!==this.title?s.html`
|
|
2
|
+
<div class="md-card-ai-header">
|
|
11
3
|
<slot name="card-header-aside">
|
|
12
|
-
<md-
|
|
4
|
+
<md-icon name="cisco-ai-assistant-color" iconSet="momentumBrandVisuals"></md-icon>
|
|
13
5
|
</slot>
|
|
14
|
-
<div class="md-card-header-title">
|
|
6
|
+
<div class="md-card-ai-header-title">
|
|
15
7
|
<slot name="card-header-title">
|
|
16
|
-
<
|
|
17
|
-
<h2>${this.subtitle}</h2>
|
|
8
|
+
<h3>${this.title}</h3>
|
|
18
9
|
</slot>
|
|
19
10
|
</div>
|
|
20
|
-
<div class="md-card-header-actions">
|
|
21
|
-
${this.info?i.html`
|
|
22
|
-
<md-tooltip message="${this.info}" placement="bottom">
|
|
23
|
-
<md-button
|
|
24
|
-
ariaLabel="${this.infoAriaLabel}"
|
|
25
|
-
class="md-card-info-icon"
|
|
26
|
-
color="color-none"
|
|
27
|
-
size="size-none"
|
|
28
|
-
>
|
|
29
|
-
<md-icon slot="icon" name="info-circle-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
30
|
-
</md-button>
|
|
31
|
-
</md-tooltip>
|
|
32
|
-
`:n.nothing}
|
|
33
|
-
${this.menuOptions.length?i.html`
|
|
34
|
-
<md-menu-overlay class="md-card-menu" placement="bottom-start">
|
|
35
|
-
<md-button
|
|
36
|
-
ariaLabel="${this.menuAriaLabel}"
|
|
37
|
-
class="md-card-menu-icon"
|
|
38
|
-
color="color-none"
|
|
39
|
-
size="size-none"
|
|
40
|
-
slot="menu-trigger"
|
|
41
|
-
>
|
|
42
|
-
<md-icon slot="icon" name="more-adr-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
43
|
-
</md-button>
|
|
44
|
-
<div class="md-card-menu-list-items" style="width: 100%;">
|
|
45
|
-
<md-list>
|
|
46
|
-
${Object(c.repeat)(this.menuOptions,(e,t)=>i.html`
|
|
47
|
-
<md-list-item
|
|
48
|
-
class="${"menu-item-"+t}"
|
|
49
|
-
slot="list-item"
|
|
50
|
-
@click=${t=>this.handleCardMenuEvent(t,e)}
|
|
51
|
-
@keydown=${t=>this.handleCardMenuKeyDown(t,e)}
|
|
52
|
-
>${e}</md-list-item
|
|
53
|
-
>
|
|
54
|
-
`)}
|
|
55
|
-
</md-list>
|
|
56
|
-
</div>
|
|
57
|
-
</md-menu-overlay>
|
|
58
|
-
`:n.nothing}
|
|
59
|
-
</div>
|
|
60
11
|
</div>
|
|
61
|
-
|
|
62
|
-
|
|
12
|
+
`:c.nothing}renderCardText(){const t=this.timestamp?"with-bottom-border-radius":"no-bottom-border-radius",e={"md-card-ai-card-body-user-query":this.variant===i.USER_QUERY,["md-card-ai-card-body-response-"+t]:this.variant===i.RESPONSE};return""!==this.cardText?s.html`
|
|
13
|
+
<div class=${Object(m.classMap)(e)}>
|
|
14
|
+
<h3>${this.cardText}</h3>
|
|
15
|
+
${this.renderResponseCard()}
|
|
16
|
+
</div>
|
|
17
|
+
`:c.nothing}renderThumbsUpButton(){const t=this.thumbsUpChecked?"secondary":"ghost",e=this.thumbsUpChecked?"This is helpful, selected":"This is helpful";return s.html`
|
|
18
|
+
<div class="md-card-ai-thumbs-up">
|
|
19
|
+
<md-button
|
|
20
|
+
circle
|
|
21
|
+
variant=${t}
|
|
22
|
+
size="28"
|
|
23
|
+
ariaLabel=${e}
|
|
24
|
+
@click=${this.thumbsUpToggled}
|
|
25
|
+
>
|
|
26
|
+
<md-icon slot="icon" name="like-regular" iconSet="momentumDesign"></md-icon>
|
|
27
|
+
</md-button>
|
|
28
|
+
</div>
|
|
29
|
+
`}renderThumbsDownButton(){const t=this.thumbsDownChecked?"secondary":"ghost",e=this.thumbsDownChecked?"This is not helpful, selected":"This is not helpful";return s.html`
|
|
30
|
+
<div>
|
|
31
|
+
<md-button
|
|
32
|
+
circle
|
|
33
|
+
variant=${t}
|
|
34
|
+
size="28"
|
|
35
|
+
ariaLabel=${e}
|
|
36
|
+
@click=${this.thumbsDownToggled}
|
|
37
|
+
>
|
|
38
|
+
<md-icon slot="icon" name="dislike-regular" iconSet="momentumDesign"></md-icon>
|
|
39
|
+
</md-button>
|
|
40
|
+
</div>
|
|
41
|
+
`}renderCopyButton(){const t=this.copyChecked?"secondary":"ghost",e=this.copyChecked?"Copied, selected":"Copy summary";return s.html`
|
|
42
|
+
<div class="md-card-ai-copy-button-container">
|
|
43
|
+
<md-button
|
|
44
|
+
size="32"
|
|
45
|
+
variant=${t}
|
|
46
|
+
ariaLabel=${e}
|
|
47
|
+
outline
|
|
48
|
+
@click=${this.copyToggled}
|
|
49
|
+
>
|
|
50
|
+
<md-icon
|
|
51
|
+
slot="icon"
|
|
52
|
+
name=${this.copyChecked?"check-regular":"copy-regular"}
|
|
53
|
+
iconSet="momentumDesign"
|
|
54
|
+
></md-icon>
|
|
55
|
+
<span slot="text">${this.copyChecked?"Copied":"Copy"}</span>
|
|
56
|
+
</md-button>
|
|
57
|
+
</div>
|
|
58
|
+
`}renderResponseCard(){return this.variant===i.RESPONSE&&""!==this.timestamp?s.html`
|
|
59
|
+
<div class="md-card-ai-divider"></div>
|
|
60
|
+
<div class="md-card-ai-time-wrapper">
|
|
61
|
+
<time class="md-card-ai-time" aria-hidden="true" datetime=${this.timestamp}> ${this.timestamp} </time>
|
|
62
|
+
<span class="md-card-ai-dot-separator">•</span>
|
|
63
|
+
<div class="md-card-ai-feedback">${this.renderThumbsUpButton()} ${this.renderThumbsDownButton()}</div>
|
|
64
|
+
${this.renderCopyButton()}
|
|
63
65
|
</div>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
`:c.nothing}renderFooter(){return this.variant===i.RESPONSE&&this.summariseMoreVisible?s.html`
|
|
67
|
+
<div class="md-card-ai-footer">
|
|
68
|
+
<md-button size="32" variant="ghost" outline @click=${this.summariseMoreToggled}>
|
|
69
|
+
<span slot="text">Summarise more</span>
|
|
70
|
+
</md-button>
|
|
66
71
|
</div>
|
|
72
|
+
`:c.nothing}render(){return s.html`
|
|
73
|
+
<div class="md-card-ai" id="${this.id}" part="card" tabindex="0">
|
|
74
|
+
${this.renderHeader()}
|
|
75
|
+
<div class="content-margin">${this.renderCardText()} ${this.renderFooter()}</div>
|
|
67
76
|
</div>
|
|
68
|
-
`}};
|
|
77
|
+
`}};h([Object(s.property)({type:String})],e.prototype,"id",void 0),h([Object(s.property)({type:String})],e.prototype,"title",void 0),h([Object(s.property)({type:String})],e.prototype,"cardText",void 0),h([Object(s.property)({type:String})],e.prototype,"timestamp",void 0),h([Object(s.property)({type:Boolean})],e.prototype,"summariseMoreVisible",void 0),h([Object(s.property)({type:String})],e.prototype,"variant",void 0),h([Object(s.internalProperty)()],e.prototype,"copyChecked",void 0),h([Object(s.internalProperty)()],e.prototype,"thumbsUpChecked",void 0),h([Object(s.internalProperty)()],e.prototype,"thumbsDownChecked",void 0),e=h([Object(a.a)("md-card-ai")],e),t.ELEMENT=e}(d||(d={}))}}]);
|
package/dist/chunks/md-59.js
CHANGED
|
@@ -1,22 +1,68 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[59],{
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<div class="md-
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
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(36),d(43);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
|
+
<div
|
|
3
|
+
class="md-card"
|
|
4
|
+
id="${this.id}"
|
|
5
|
+
part="card"
|
|
6
|
+
tabindex="0"
|
|
7
|
+
@click=${()=>this.handleCardClick()}
|
|
8
|
+
@keydown=${e=>this.handleCardKeyDown(e)}
|
|
9
|
+
>
|
|
10
|
+
<div class="md-card-header">
|
|
11
|
+
<slot name="card-header-aside">
|
|
12
|
+
<md-favorite value="${"card-"+this.id}"></md-favorite>
|
|
13
|
+
</slot>
|
|
14
|
+
<div class="md-card-header-title">
|
|
15
|
+
<slot name="card-header-title">
|
|
16
|
+
<h1>${this.title}</h1>
|
|
17
|
+
<h2>${this.subtitle}</h2>
|
|
18
|
+
</slot>
|
|
16
19
|
</div>
|
|
17
|
-
<div class="md-
|
|
18
|
-
|
|
20
|
+
<div class="md-card-header-actions">
|
|
21
|
+
${this.info?i.html`
|
|
22
|
+
<md-tooltip message="${this.info}" placement="bottom">
|
|
23
|
+
<md-button
|
|
24
|
+
ariaLabel="${this.infoAriaLabel}"
|
|
25
|
+
class="md-card-info-icon"
|
|
26
|
+
color="color-none"
|
|
27
|
+
size="size-none"
|
|
28
|
+
>
|
|
29
|
+
<md-icon slot="icon" name="info-circle-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
30
|
+
</md-button>
|
|
31
|
+
</md-tooltip>
|
|
32
|
+
`:n.nothing}
|
|
33
|
+
${this.menuOptions.length?i.html`
|
|
34
|
+
<md-menu-overlay class="md-card-menu" placement="bottom-start">
|
|
35
|
+
<md-button
|
|
36
|
+
ariaLabel="${this.menuAriaLabel}"
|
|
37
|
+
class="md-card-menu-icon"
|
|
38
|
+
color="color-none"
|
|
39
|
+
size="size-none"
|
|
40
|
+
slot="menu-trigger"
|
|
41
|
+
>
|
|
42
|
+
<md-icon slot="icon" name="more-adr-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
43
|
+
</md-button>
|
|
44
|
+
<div class="md-card-menu-list-items" style="width: 100%;">
|
|
45
|
+
<md-list>
|
|
46
|
+
${Object(c.repeat)(this.menuOptions,(e,t)=>i.html`
|
|
47
|
+
<md-list-item
|
|
48
|
+
class="${"menu-item-"+t}"
|
|
49
|
+
slot="list-item"
|
|
50
|
+
@click=${t=>this.handleCardMenuEvent(t,e)}
|
|
51
|
+
@keydown=${t=>this.handleCardMenuKeyDown(t,e)}
|
|
52
|
+
>${e}</md-list-item
|
|
53
|
+
>
|
|
54
|
+
`)}
|
|
55
|
+
</md-list>
|
|
56
|
+
</div>
|
|
57
|
+
</md-menu-overlay>
|
|
58
|
+
`:n.nothing}
|
|
19
59
|
</div>
|
|
20
60
|
</div>
|
|
61
|
+
<div class="md-card-content">
|
|
62
|
+
<slot name="content"></slot>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="md-card-footer">
|
|
65
|
+
<slot name="footer"> </slot>
|
|
66
|
+
</div>
|
|
21
67
|
</div>
|
|
22
|
-
`}};
|
|
68
|
+
`}};l([Object(i.property)({type:String})],t.prototype,"title",void 0),l([Object(i.property)({type:String})],t.prototype,"subtitle",void 0),l([Object(i.property)({type:String})],t.prototype,"id",void 0),l([Object(i.property)({type:String})],t.prototype,"info",void 0),l([Object(i.property)({type:String,attribute:"info-aria-label"})],t.prototype,"infoAriaLabel",void 0),l([Object(i.property)({type:String,attribute:"menu-aria-label"})],t.prototype,"menuAriaLabel",void 0),l([Object(i.property)({type:Array})],t.prototype,"menuOptions",void 0),t=l([Object(o.a)("md-card")],t),e.ELEMENT=t}(r||(r={}))}}]);
|