@momentum-design/components 0.98.0 → 0.98.1

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.
@@ -1396,25 +1396,31 @@
1396
1396
  </div>
1397
1397
  </slot>`}}return f([Ft({slot:"footer-link"})],i.prototype,"footerLink",2),f([Ft({slot:"footer-button-primary"})],i.prototype,"footerButtonPrimary",2),f([Ft({slot:"footer-button-secondary"})],i.prototype,"footerButtonSecondary",2),i};var ib=H`
1398
1398
  :host {
1399
+ --mdc-card-width: 20rem;
1399
1400
  align-items: flex-start;
1400
1401
  border-radius: 0.5rem;
1401
1402
  border: 1px solid var(--mds-color-theme-outline-primary-normal);
1402
1403
  box-shadow: none;
1403
1404
  transition: box-shadow 0.2s;
1405
+ width: var(--mdc-card-width);
1404
1406
  }
1407
+
1405
1408
  :host([variant='ghost']) {
1406
1409
  border-color: transparent;
1407
1410
  }
1411
+
1408
1412
  :host([orientation='horizontal']) {
1409
- max-width: 40rem;
1413
+ min-width: 40rem;
1414
+ --mdc-card-width: 40rem;
1410
1415
  }
1411
1416
 
1412
1417
  :host([orientation='vertical']) {
1413
- max-width: 20rem;
1418
+ min-width: 20rem;
1414
1419
  flex-direction: column;
1415
1420
  }
1416
1421
 
1417
1422
  :host([orientation='vertical'])::part(image) {
1423
+ object-fit: cover;
1418
1424
  height: 12.5rem;
1419
1425
  width: 100%;
1420
1426
  border-top-left-radius: 0.5rem;
@@ -1422,12 +1428,19 @@
1422
1428
  }
1423
1429
 
1424
1430
  :host([orientation='horizontal'])::part(image) {
1431
+ object-fit: cover;
1425
1432
  width: 10rem;
1426
1433
  height: 100%;
1427
1434
  border-top-left-radius: 0.5rem;
1428
1435
  border-bottom-left-radius: 0.5rem;
1429
1436
  }
1430
1437
 
1438
+ :host::part(text-content) {
1439
+ display: flex;
1440
+ flex-direction: column;
1441
+ flex-grow: 1;
1442
+ }
1443
+
1431
1444
  :host::part(header) {
1432
1445
  display: flex;
1433
1446
  gap: 0.5rem;
@@ -1439,6 +1452,7 @@
1439
1452
 
1440
1453
  :host::part(body) {
1441
1454
  width: 100%;
1455
+ height: inherit;
1442
1456
  padding: 1.5rem;
1443
1457
  display: flex;
1444
1458
  flex-direction: column;
@@ -1475,6 +1489,11 @@
1475
1489
  gap: 1rem;
1476
1490
  }
1477
1491
 
1492
+ ::slotted([slot='before-body']),
1493
+ ::slotted([slot='after-body']) {
1494
+ margin-top: 1rem;
1495
+ }
1496
+
1478
1497
  ::slotted([slot='footer-link']),
1479
1498
  ::slotted([slot='footer-button-primary']),
1480
1499
  ::slotted([slot='footer-button-secondary']) {
@@ -1484,16 +1503,18 @@
1484
1503
  :host::part(text) {
1485
1504
  margin: unset;
1486
1505
  }
1487
- `,tm=[Et,ib];var qs=class extends kn(Cn(q)){constructor(){super(...arguments);this.handleIconButtons=()=>{var t;if((t=this.iconButtons)==null||t.forEach(s=>{!s.matches(ee.BUTTON)&&s.getAttribute("data-btn-type")!=="icon"?s.remove():(s.setAttribute("variant",Bt.TERTIARY),s.setAttribute("size","32"))}),this.iconButtons&&this.iconButtons.length>3)for(let s=3;s<this.iconButtons.length;s+=1)this.iconButtons[s].remove()}}update(t){super.update(t),t.has("variant")&&this.updateFooterButtonColors(this.variant)}renderHeader(){return this.cardTitle?L`<div part="header">
1506
+ `,tm=[Et,ib];var qs=class extends kn(Cn(q)){constructor(){super(...arguments);this.handleIconButtons=()=>{var t;(t=this.iconButtons)==null||t.forEach(s=>{s.matches(ee.BUTTON)&&(s.setAttribute("variant",Bt.TERTIARY),s.setAttribute("size","32"))})}}update(t){super.update(t),t.has("variant")&&this.updateFooterButtonColors(this.variant)}renderHeader(){return this.cardTitle?L`<div part="header">
1488
1507
  ${this.renderIcon()} ${this.renderTitle()}
1489
1508
  <div part="icon-button"><slot name="icon-button" @slotchange=${this.handleIconButtons}></slot></div>
1490
1509
  </div>`:W}render(){return L`
1491
1510
  ${this.renderImage()}
1492
1511
  <div part="body">
1493
1512
  ${this.renderHeader()}
1494
- <slot name="before-body"></slot>
1495
- <slot name="body"></slot>
1496
- <slot name="after-body"></slot>
1513
+ <div part="text-content">
1514
+ <slot name="before-body"></slot>
1515
+ <slot name="body"></slot>
1516
+ <slot name="after-body"></slot>
1517
+ </div>
1497
1518
  ${this.renderFooter()}
1498
1519
  </div>
1499
1520
  `}};qs.styles=[...q.styles,...tm],f([Ft({slot:"icon-button"})],qs.prototype,"iconButtons",2);var lr=qs;lr.register(Qp);var ob=lr;var sb=H`