@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.
@@ -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, range } = virtualizer;
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 first = measurementsCache[(_a = range === null || range === void 0 ? void 0 : range.startIndex) !== null && _a !== void 0 ? _a : 0];
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`);
@@ -23,6 +23,8 @@ const styles = [
23
23
  position: absolute !important;
24
24
  top: var(--mdc-virtualizedlist-hidden-top) !important;
25
25
  left: 0 !important;
26
+ opacity: 0 !important;
27
+ pointer-events: none !important;
26
28
  }
27
29
 
28
30
  ::slotted(mdc-listitem) {