@momentum-design/components 0.129.0 → 0.129.2

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.
@@ -22,7 +22,7 @@ const styles = css `
22
22
  position: absolute;
23
23
  right: 50%;
24
24
  bottom: 50%;
25
- transform: translate(50%, 50%);
25
+ transform: translateX(round(to-zero, 50%, 1px)) translateY(round(to-zero, 50%, 1px));
26
26
  }
27
27
 
28
28
  :host > [part='body']:first-of-type {
@@ -281,7 +281,7 @@ declare class VirtualizedList extends VirtualizedList_base {
281
281
  private checkAtBottom;
282
282
  protected handleNavigationKeyDown(event: KeyboardEvent): void;
283
283
  protected resetTabIndexes(index: number, focusElement?: boolean): void;
284
- protected resetTabIndexAndSetFocus(newIndex: number, oldIndex?: number, focusNewItem?: boolean): void;
284
+ protected resetTabIndexAndSetFocus(newIndex: number, oldIndex?: number, focusNewItem?: boolean, scrollToNewItem?: boolean): void;
285
285
  /** @internal */
286
286
  private setAriaSetSize;
287
287
  /**
@@ -467,9 +467,6 @@ class VirtualizedList extends DataAriaLabelMixin(List) {
467
467
  const { count, getItemKey } = this.virtualizer.options;
468
468
  this.selectedIndex = Math.max(0, Math.min(count - 1, newIndex));
469
469
  this.selectedKey = getItemKey(newIndex);
470
- if (this.scrollAnchoring && this.selectedIndex + 1 === count) {
471
- this.atBottom = 'yes';
472
- }
473
470
  }
474
471
  }
475
472
  onElementStoreUpdate(item, changeType) {
@@ -564,17 +561,17 @@ class VirtualizedList extends DataAriaLabelMixin(List) {
564
561
  super.resetTabIndexes(index, focusElement);
565
562
  this.setSelectedIndex(index);
566
563
  }
567
- resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem) {
564
+ resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem = true, scrollToNewItem = focusNewItem) {
568
565
  const elementToFocus = this.navItems.find(element => { var _a; return ((_a = this.virtualizer) === null || _a === void 0 ? void 0 : _a.indexFromElement(element)) === newIndex; });
569
566
  if (elementToFocus === undefined) {
570
567
  this.scrollToIndex(newIndex, {});
571
568
  this.endOfScrollQueue.push(() => {
572
- super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem);
569
+ super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem, scrollToNewItem);
573
570
  this.setSelectedIndex(newIndex);
574
571
  });
575
572
  return;
576
573
  }
577
- super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem);
574
+ super.resetTabIndexAndSetFocus(newIndex, oldIndex, focusNewItem, scrollToNewItem);
578
575
  this.setSelectedIndex(newIndex);
579
576
  }
580
577
  /** @internal */