@momentum-design/components 0.129.2 → 0.129.4
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 +8 -2
- package/dist/browser/index.js.map +3 -3
- package/dist/components/card/card.component.d.ts +1 -0
- package/dist/components/card/card.component.js +1 -0
- package/dist/components/cardbutton/cardbutton.component.d.ts +1 -0
- package/dist/components/cardbutton/cardbutton.component.js +1 -0
- package/dist/components/virtualizedlist/virtualizedlist.component.js +5 -5
- package/dist/components/virtualizedlist/virtualizedlist.styles.js +2 -0
- package/dist/custom-elements.json +5047 -5023
- package/dist/react/card/index.d.ts +1 -0
- package/dist/react/card/index.js +1 -0
- package/dist/react/cardbutton/index.d.ts +1 -0
- package/dist/react/cardbutton/index.js +1 -0
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/utils/mixins/CardComponentMixin.js +5 -1
- package/package.json +1 -1
|
@@ -25,6 +25,7 @@ declare const Card_base: import("../../utils/mixins/index.types").Constructor<im
|
|
|
25
25
|
*
|
|
26
26
|
* Interactive card additionally supports 'promotional' variant that represents the border styling - 'promotional'.
|
|
27
27
|
*
|
|
28
|
+
* @slot image - This slot is for overriding the image content of the card
|
|
28
29
|
* @slot before-body - This slot is for passing the content before the body
|
|
29
30
|
* @slot body - This slot is for passing the text content for the card
|
|
30
31
|
* @slot after-body - This slot is for passing the content after the body
|
|
@@ -39,6 +39,7 @@ import styles from './card.styles';
|
|
|
39
39
|
*
|
|
40
40
|
* Interactive card additionally supports 'promotional' variant that represents the border styling - 'promotional'.
|
|
41
41
|
*
|
|
42
|
+
* @slot image - This slot is for overriding the image content of the card
|
|
42
43
|
* @slot before-body - This slot is for passing the content before the body
|
|
43
44
|
* @slot body - This slot is for passing the text content for the card
|
|
44
45
|
* @slot after-body - This slot is for passing the content after the body
|
|
@@ -19,6 +19,7 @@ declare const CardButton_base: import("../../utils/mixins/index.types").Construc
|
|
|
19
19
|
* It fires the click event when space key is used.
|
|
20
20
|
* @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
|
|
21
21
|
*
|
|
22
|
+
* @slot image - This slot is for overriding the image content of the card
|
|
22
23
|
* @slot before-body - This slot is for passing the content before the body
|
|
23
24
|
* @slot body - This slot is for passing the text content for the card
|
|
24
25
|
* @slot after-body - This slot is for passing the content after the body
|
|
@@ -21,6 +21,7 @@ import styles from './cardbutton.styles';
|
|
|
21
21
|
* It fires the click event when space key is used.
|
|
22
22
|
* @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
|
|
23
23
|
*
|
|
24
|
+
* @slot image - This slot is for overriding the image content of the card
|
|
24
25
|
* @slot before-body - This slot is for passing the content before the body
|
|
25
26
|
* @slot body - This slot is for passing the text content for the card
|
|
26
27
|
* @slot after-body - This slot is for passing the content after the body
|
|
@@ -435,21 +435,21 @@ class VirtualizedList extends DataAriaLabelMixin(List) {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
this.updateHiddenItemsPosition();
|
|
438
|
+
this.updateHiddenItemsPosition(range);
|
|
439
439
|
defaultIndexes.sort((a, b) => a - b);
|
|
440
440
|
return defaultIndexes;
|
|
441
441
|
}
|
|
442
442
|
/** @internal */
|
|
443
|
-
updateHiddenItemsPosition() {
|
|
443
|
+
updateHiddenItemsPosition(range) {
|
|
444
444
|
const { navItems, virtualizerProps, virtualizer } = this;
|
|
445
445
|
if (!virtualizer || virtualizerProps.count === 0)
|
|
446
446
|
return;
|
|
447
|
-
const { measurementsCache
|
|
447
|
+
const { measurementsCache } = virtualizer;
|
|
448
448
|
this.hiddenIndexes.forEach(index => {
|
|
449
|
-
var _a;
|
|
450
449
|
const el = navItems.at(index);
|
|
451
450
|
if (el) {
|
|
452
|
-
const
|
|
451
|
+
const startIndex = Math.max(range.startIndex - range.overscan, 0);
|
|
452
|
+
const first = measurementsCache[startIndex];
|
|
453
453
|
const current = measurementsCache[index];
|
|
454
454
|
el.setAttribute('data-virtualized-hidden', 'true');
|
|
455
455
|
el.style.setProperty('--mdc-virtualizedlist-hidden-top', `${current.start - first.start}px`);
|