@ni/nimble-components 11.0.0 → 11.0.1

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.
@@ -18710,14 +18710,13 @@
18710
18710
  overflow-y: auto;
18711
18711
  position: absolute;
18712
18712
  width: 100%;
18713
- ${
18714
- /*
18715
- * The --max-height custom property is defined by fast-foundation.
18716
- * See: https://github.com/microsoft/fast/blob/af1f8736ae9ff54a7449324bad952865981d1ece/packages/web-components/fast-foundation/src/select/select.ts#L199
18717
- */ ''}
18718
- max-height: calc(var(--max-height) - ${controlHeight});
18713
+ --ni-private-listbox-padding: 4px;
18714
+ max-height: calc(
18715
+ var(--ni-private-select-max-height) - 2 *
18716
+ var(--ni-private-listbox-padding)
18717
+ );
18719
18718
  z-index: 1;
18720
- padding: 4px;
18719
+ padding: var(--ni-private-listbox-padding);
18721
18720
  box-shadow: 0px 3px 3px ${popupBoxShadowColor};
18722
18721
  border: 1px solid ${popupBorderColor};
18723
18722
  background-color: ${applicationBackgroundColor};
@@ -18841,6 +18840,7 @@
18841
18840
  return;
18842
18841
  }
18843
18842
  super.setPositioning();
18843
+ this.updateListboxMaxHeightCssVariable();
18844
18844
  }
18845
18845
  // Workaround for https://github.com/microsoft/fast/issues/5773
18846
18846
  slottedOptionsChanged(prev, next) {
@@ -18850,6 +18850,14 @@
18850
18850
  this.value = value;
18851
18851
  }
18852
18852
  }
18853
+ maxHeightChanged() {
18854
+ this.updateListboxMaxHeightCssVariable();
18855
+ }
18856
+ updateListboxMaxHeightCssVariable() {
18857
+ if (this.listbox) {
18858
+ this.listbox.style.setProperty('--ni-private-select-max-height', `${this.maxHeight}px`);
18859
+ }
18860
+ }
18853
18861
  }
18854
18862
  const nimbleSelect = Select.compose({
18855
18863
  baseName: 'select',