@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.
- package/dist/browser/index.js +27 -6
- package/dist/browser/index.js.map +3 -3
- package/dist/components/card/card.component.d.ts +14 -6
- package/dist/components/card/card.component.js +20 -19
- package/dist/components/card/card.styles.js +21 -2
- package/dist/components/cardbutton/cardbutton.component.d.ts +18 -4
- package/dist/components/cardbutton/cardbutton.component.js +18 -4
- package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +18 -0
- package/dist/components/cardcheckbox/cardcheckbox.component.js +18 -0
- package/dist/components/cardradio/cardradio.component.d.ts +18 -0
- package/dist/components/cardradio/cardradio.component.js +18 -0
- package/dist/custom-elements.json +316 -16
- package/dist/react/card/index.d.ts +14 -6
- package/dist/react/card/index.js +14 -6
- package/dist/react/cardbutton/index.d.ts +18 -4
- package/dist/react/cardbutton/index.js +18 -4
- package/dist/react/cardcheckbox/index.d.ts +18 -0
- package/dist/react/cardcheckbox/index.js +18 -0
- package/dist/react/cardradio/index.d.ts +18 -0
- package/dist/react/cardradio/index.js +18 -0
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
@@ -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
|
-
|
1413
|
+
min-width: 40rem;
|
1414
|
+
--mdc-card-width: 40rem;
|
1410
1415
|
}
|
1411
1416
|
|
1412
1417
|
:host([orientation='vertical']) {
|
1413
|
-
|
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;
|
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
|
-
<
|
1495
|
-
|
1496
|
-
|
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`
|