@ni/spright-components 1.0.27 → 1.0.29
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.
|
@@ -16280,7 +16280,7 @@
|
|
|
16280
16280
|
|
|
16281
16281
|
/**
|
|
16282
16282
|
* Do not edit directly
|
|
16283
|
-
* Generated on
|
|
16283
|
+
* Generated on Thu, 27 Jun 2024 17:09:09 GMT
|
|
16284
16284
|
*/
|
|
16285
16285
|
|
|
16286
16286
|
const Information100DarkUi = "#a46eff";
|
|
@@ -20796,12 +20796,32 @@
|
|
|
20796
20796
|
overflow-y: auto;
|
|
20797
20797
|
width: 100%;
|
|
20798
20798
|
--ni-private-listbox-padding: ${smallPadding};
|
|
20799
|
-
|
|
20799
|
+
--ni-private-listbox-filter-height: 0px;
|
|
20800
|
+
--ni-private-listbox-loading-indicator-height: 0px;
|
|
20801
|
+
max-height: min(
|
|
20802
|
+
calc(
|
|
20803
|
+
${smallPadding} + 2 * ${borderWidth} + ${controlHeight} * 10.5 +
|
|
20804
|
+
var(--ni-private-listbox-filter-height) +
|
|
20805
|
+
var(--ni-private-listbox-loading-indicator-height)
|
|
20806
|
+
),
|
|
20807
|
+
calc(
|
|
20808
|
+
var(--ni-private-listbox-available-viewport-height) -
|
|
20809
|
+
${smallPadding}
|
|
20810
|
+
)
|
|
20811
|
+
);
|
|
20800
20812
|
box-shadow: ${elevation2BoxShadow};
|
|
20801
|
-
border:
|
|
20813
|
+
border: ${borderWidth} solid ${popupBorderColor};
|
|
20802
20814
|
background-color: ${applicationBackgroundColor};
|
|
20803
20815
|
}
|
|
20804
20816
|
|
|
20817
|
+
.listbox:has(.filter-field) {
|
|
20818
|
+
--ni-private-listbox-filter-height: ${controlHeight};
|
|
20819
|
+
}
|
|
20820
|
+
|
|
20821
|
+
.listbox:has(.loading-container) {
|
|
20822
|
+
--ni-private-listbox-loading-indicator-height: ${controlHeight};
|
|
20823
|
+
}
|
|
20824
|
+
|
|
20805
20825
|
.listbox slot {
|
|
20806
20826
|
display: block;
|
|
20807
20827
|
background: transparent;
|
|
@@ -21146,6 +21166,7 @@
|
|
|
21146
21166
|
part="listbox"
|
|
21147
21167
|
role="listbox"
|
|
21148
21168
|
?disabled="${x => x.disabled}"
|
|
21169
|
+
style="--ni-private-listbox-available-viewport-height: ${x => x.availableViewportHeight}px;"
|
|
21149
21170
|
${ref('listbox')}
|
|
21150
21171
|
>
|
|
21151
21172
|
<slot name="option"
|
|
@@ -21203,11 +21224,11 @@
|
|
|
21203
21224
|
*/
|
|
21204
21225
|
this.listboxId = uniqueId('listbox-');
|
|
21205
21226
|
/**
|
|
21206
|
-
* The
|
|
21227
|
+
* The space available in the viewport for the listbox when opened.
|
|
21207
21228
|
*
|
|
21208
21229
|
* @internal
|
|
21209
21230
|
*/
|
|
21210
|
-
this.
|
|
21231
|
+
this.availableViewportHeight = 0;
|
|
21211
21232
|
this.valueUpdatedByInput = false;
|
|
21212
21233
|
this._value = '';
|
|
21213
21234
|
this.filter = '';
|
|
@@ -21587,7 +21608,7 @@
|
|
|
21587
21608
|
this.positionAttribute = this.forcedPosition
|
|
21588
21609
|
? this.positionAttribute
|
|
21589
21610
|
: this.position;
|
|
21590
|
-
this.
|
|
21611
|
+
this.availableViewportHeight = this.position === SelectPosition.above
|
|
21591
21612
|
? Math.trunc(currentBox.top)
|
|
21592
21613
|
: Math.trunc(availableBottom);
|
|
21593
21614
|
}
|
|
@@ -21665,9 +21686,6 @@
|
|
|
21665
21686
|
ariaLabelChanged(_oldValue, _newValue) {
|
|
21666
21687
|
this.updateInputAriaLabel();
|
|
21667
21688
|
}
|
|
21668
|
-
maxHeightChanged() {
|
|
21669
|
-
this.updateListboxMaxHeightCssVariable();
|
|
21670
|
-
}
|
|
21671
21689
|
/**
|
|
21672
21690
|
* Sets the value and to match the first selected option.
|
|
21673
21691
|
*/
|
|
@@ -21711,11 +21729,6 @@
|
|
|
21711
21729
|
: this.control.value;
|
|
21712
21730
|
this.updateValue(this.value !== newValue);
|
|
21713
21731
|
}
|
|
21714
|
-
updateListboxMaxHeightCssVariable() {
|
|
21715
|
-
if (this.listbox) {
|
|
21716
|
-
this.listbox.style.setProperty('--ni-private-select-max-height', `${this.maxHeight}px`);
|
|
21717
|
-
}
|
|
21718
|
-
}
|
|
21719
21732
|
updateInputAriaLabel() {
|
|
21720
21733
|
const inputElement = this.shadowRoot?.querySelector('.selected-value');
|
|
21721
21734
|
if (this.ariaLabel) {
|
|
@@ -21788,7 +21801,7 @@
|
|
|
21788
21801
|
], Combobox.prototype, "hasOverflow", void 0);
|
|
21789
21802
|
__decorate$1([
|
|
21790
21803
|
observable
|
|
21791
|
-
], Combobox.prototype, "
|
|
21804
|
+
], Combobox.prototype, "availableViewportHeight", void 0);
|
|
21792
21805
|
const nimbleCombobox = Combobox.compose({
|
|
21793
21806
|
baseName: 'combobox',
|
|
21794
21807
|
baseClass: FormAssociatedCombobox,
|
|
@@ -59805,6 +59818,7 @@ img.ProseMirror-separator {
|
|
|
59805
59818
|
part="listbox"
|
|
59806
59819
|
role="listbox"
|
|
59807
59820
|
?disabled="${x => x.disabled}"
|
|
59821
|
+
style="--ni-private-listbox-available-viewport-height: ${x => x.availableViewportHeight}px;"
|
|
59808
59822
|
${ref('listbox')}
|
|
59809
59823
|
>
|
|
59810
59824
|
${when(x => x.filterMode !== FilterMode.none, html `
|
|
@@ -59916,11 +59930,11 @@ img.ProseMirror-separator {
|
|
|
59916
59930
|
*/
|
|
59917
59931
|
this.filter = '';
|
|
59918
59932
|
/**
|
|
59919
|
-
* The
|
|
59933
|
+
* The space available in the viewport for the listbox when opened.
|
|
59920
59934
|
*
|
|
59921
59935
|
* @internal
|
|
59922
59936
|
*/
|
|
59923
|
-
this.
|
|
59937
|
+
this.availableViewportHeight = 0;
|
|
59924
59938
|
this._value = '';
|
|
59925
59939
|
this.forcedPosition = false;
|
|
59926
59940
|
}
|
|
@@ -60616,10 +60630,9 @@ img.ProseMirror-separator {
|
|
|
60616
60630
|
this.positionAttribute = this.forcedPosition
|
|
60617
60631
|
? this.positionAttribute
|
|
60618
60632
|
: this.position;
|
|
60619
|
-
this.
|
|
60633
|
+
this.availableViewportHeight = this.position === SelectPosition.above
|
|
60620
60634
|
? Math.trunc(currentBox.top)
|
|
60621
60635
|
: Math.trunc(availableBottom);
|
|
60622
|
-
this.updateListboxMaxHeightCssVariable();
|
|
60623
60636
|
}
|
|
60624
60637
|
updateAdjacentSeparatorState(element) {
|
|
60625
60638
|
const previousElement = this.getPreviousVisibleOptionOrGroup(element);
|
|
@@ -60782,9 +60795,6 @@ img.ProseMirror-separator {
|
|
|
60782
60795
|
};
|
|
60783
60796
|
this.$emit('filter-input', eventDetail, { bubbles: true });
|
|
60784
60797
|
}
|
|
60785
|
-
maxHeightChanged() {
|
|
60786
|
-
this.updateListboxMaxHeightCssVariable();
|
|
60787
|
-
}
|
|
60788
60798
|
initializeOpenState() {
|
|
60789
60799
|
this.setActiveOption(this.selectedIndex);
|
|
60790
60800
|
this.ariaControls = this.listboxId;
|
|
@@ -60792,11 +60802,6 @@ img.ProseMirror-separator {
|
|
|
60792
60802
|
this.setPositioning();
|
|
60793
60803
|
this.focusAndScrollOptionIntoView();
|
|
60794
60804
|
}
|
|
60795
|
-
updateListboxMaxHeightCssVariable() {
|
|
60796
|
-
if (this.listbox) {
|
|
60797
|
-
this.listbox.style.setProperty('--ni-private-select-max-height', `${this.maxHeight}px`);
|
|
60798
|
-
}
|
|
60799
|
-
}
|
|
60800
60805
|
}
|
|
60801
60806
|
__decorate$1([
|
|
60802
60807
|
attr
|
|
@@ -60851,7 +60856,7 @@ img.ProseMirror-separator {
|
|
|
60851
60856
|
], Select.prototype, "filter", void 0);
|
|
60852
60857
|
__decorate$1([
|
|
60853
60858
|
observable
|
|
60854
|
-
], Select.prototype, "
|
|
60859
|
+
], Select.prototype, "availableViewportHeight", void 0);
|
|
60855
60860
|
__decorate$1([
|
|
60856
60861
|
volatile
|
|
60857
60862
|
], Select.prototype, "collapsible", null);
|