@ship-ui/core 0.15.25 → 0.15.28

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.
@@ -1625,8 +1625,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1625
1625
  }] } });
1626
1626
 
1627
1627
  class ShipButtonGroupComponent {
1628
+ constructor() {
1629
+ this.id = '--' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 12);
1630
+ }
1628
1631
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ShipButtonGroupComponent, isStandalone: true, selector: "sh-button-group", ngImport: i0, template: `
1632
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ShipButtonGroupComponent, isStandalone: true, selector: "sh-button-group", host: { properties: { "style.--btng-id": "id" } }, ngImport: i0, template: `
1630
1633
  <ng-content />
1631
1634
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1632
1635
  }
@@ -1639,6 +1642,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1639
1642
  <ng-content />
1640
1643
  `,
1641
1644
  changeDetection: ChangeDetectionStrategy.OnPush,
1645
+ host: {
1646
+ '[style.--btng-id]': 'id',
1647
+ },
1642
1648
  }]
1643
1649
  }] });
1644
1650
 
@@ -6078,8 +6084,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
6078
6084
  }] } });
6079
6085
 
6080
6086
  class ShipTabsComponent {
6087
+ constructor() {
6088
+ this.id = '--' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 12);
6089
+ }
6081
6090
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6082
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ShipTabsComponent, isStandalone: true, selector: "sh-tabs", ngImport: i0, template: `
6091
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ShipTabsComponent, isStandalone: true, selector: "sh-tabs", host: { properties: { "style.--tabs-id": "id" } }, ngImport: i0, template: `
6083
6092
  <ng-content />
6084
6093
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6085
6094
  }
@@ -6092,6 +6101,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
6092
6101
  <ng-content />
6093
6102
  `,
6094
6103
  changeDetection: ChangeDetectionStrategy.OnPush,
6104
+ host: {
6105
+ '[style.--tabs-id]': 'id',
6106
+ },
6095
6107
  }]
6096
6108
  }] });
6097
6109
 
@@ -6569,9 +6581,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
6569
6581
  }] } });
6570
6582
 
6571
6583
  class ShipTooltipWrapper {
6572
- #selfRef;
6573
- #renderer;
6574
- #positionAbort;
6575
6584
  constructor() {
6576
6585
  this.positionAnchorName = input.required(...(ngDevMode ? [{ debugName: "positionAnchorName" }] : []));
6577
6586
  this.anchorEl = input.required(...(ngDevMode ? [{ debugName: "anchorEl" }] : []));
@@ -6604,6 +6613,7 @@ class ShipTooltipWrapper {
6604
6613
  const outOfBoundsTop = hostRect.top - tooltipRect.height < 0;
6605
6614
  this.isBelow.set(outOfBoundsTop);
6606
6615
  if (!this.SUPPORTS_ANCHOR) {
6616
+ const tooltipRect = tooltipEl.getBoundingClientRect();
6607
6617
  let newTop = hostRect.top - tooltipRect.height;
6608
6618
  let newLeft = hostRect.left + hostRect.width / 2 - tooltipRect.width / 2;
6609
6619
  if (outOfBoundsTop) {
@@ -6620,13 +6630,16 @@ class ShipTooltipWrapper {
6620
6630
  this.#renderer.setStyle(tooltipEl, 'position', 'fixed');
6621
6631
  }
6622
6632
  };
6623
- afterNextRender(() => {
6624
- this.#positionAbort = new AbortController();
6625
- const options = { signal: this.#positionAbort.signal, capture: true };
6626
- window?.addEventListener('scroll', this.calculateTooltipPosition, options);
6627
- window?.addEventListener('resize', this.calculateTooltipPosition, { signal: this.#positionAbort.signal });
6628
- setTimeout(() => this.calculateTooltipPosition());
6629
- });
6633
+ }
6634
+ #selfRef;
6635
+ #renderer;
6636
+ #positionAbort;
6637
+ ngAfterViewInit() {
6638
+ this.#positionAbort = new AbortController();
6639
+ const options = { signal: this.#positionAbort.signal, capture: true };
6640
+ window?.addEventListener('scroll', this.calculateTooltipPosition, options);
6641
+ window?.addEventListener('resize', this.calculateTooltipPosition, { signal: this.#positionAbort.signal });
6642
+ setTimeout(() => this.calculateTooltipPosition());
6630
6643
  }
6631
6644
  ngOnDestroy() {
6632
6645
  this.#positionAbort?.abort();
@@ -6655,7 +6668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
6655
6668
  '[class.below]': 'isBelow()',
6656
6669
  },
6657
6670
  }]
6658
- }], ctorParameters: () => [] });
6671
+ }] });
6659
6672
  let openRef = null;
6660
6673
  class ShipTooltipDirective {
6661
6674
  constructor() {