@eagami/ui 5.82.1 → 5.82.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.
@@ -23702,7 +23702,10 @@ var MultiSelectComponent = class MultiSelectComponent extends LabelledFieldContr
23702
23702
  event.preventDefault();
23703
23703
  this.close();
23704
23704
  this.triggerEl()?.nativeElement.focus();
23705
- } else if (event.key === "Tab") this.close();
23705
+ } else if (event.key === "Tab") {
23706
+ this.triggerEl()?.nativeElement.focus();
23707
+ this.close();
23708
+ }
23706
23709
  }
23707
23710
  moveFocusedRow(row) {
23708
23711
  this.focusedIndex.set(row);
@@ -29392,6 +29395,12 @@ var TabsComponent = class TabsComponent {
29392
29395
  orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
29393
29396
  ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
29394
29397
  activeTab = model("", ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
29398
+ selectedTab = computed(() => {
29399
+ const tabs = this.registeredTabs();
29400
+ const active = this.activeTab();
29401
+ if (tabs.some((t) => t.value() === active)) return active;
29402
+ return tabs.find((t) => !t.disabled())?.value();
29403
+ }, ...ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []);
29395
29404
  changed = output();
29396
29405
  registerTab(tab) {
29397
29406
  this.registeredTabs.update((tabs) => [...tabs, tab]);
@@ -29405,7 +29414,7 @@ var TabsComponent = class TabsComponent {
29405
29414
  }
29406
29415
  handleKeydown(event) {
29407
29416
  const tabList = this.registeredTabs().filter((t) => !t.disabled());
29408
- const currentIndex = tabList.findIndex((t) => t.value() === this.activeTab());
29417
+ const currentIndex = tabList.findIndex((t) => t.value() === this.selectedTab());
29409
29418
  let forwardKey = "ArrowDown";
29410
29419
  let backwardKey = "ArrowUp";
29411
29420
  if (this.orientation() === "horizontal") {
@@ -29564,7 +29573,7 @@ var TabComponent = class TabComponent {
29564
29573
  label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
29565
29574
  disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
29566
29575
  id = input(uniqueId("ea-tab"), ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
29567
- isActive = computed(() => this.tabs.activeTab() === this.value(), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
29576
+ isActive = computed(() => this.tabs.selectedTab() === this.value(), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
29568
29577
  vertical = computed(() => this.tabs.orientation() === "vertical", ...ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []);
29569
29578
  ngOnInit() {
29570
29579
  this.tabs.registerTab(this);