@ni/nimble-components 30.3.0 → 30.3.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.
- package/dist/all-components-bundle.js +42 -2
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +7 -4
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/select/index.js +41 -1
- package/dist/esm/select/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -16032,7 +16032,7 @@
|
|
|
16032
16032
|
|
|
16033
16033
|
/**
|
|
16034
16034
|
* Do not edit directly
|
|
16035
|
-
* Generated on Thu, 01 Aug 2024
|
|
16035
|
+
* Generated on Thu, 01 Aug 2024 16:35:55 GMT
|
|
16036
16036
|
*/
|
|
16037
16037
|
|
|
16038
16038
|
const Information100DarkUi = "#a46eff";
|
|
@@ -60871,14 +60871,54 @@ img.ProseMirror-separator {
|
|
|
60871
60871
|
*/
|
|
60872
60872
|
keydownHandler(e) {
|
|
60873
60873
|
const initialSelectedIndex = this.selectedIndex;
|
|
60874
|
-
super.keydownHandler(e);
|
|
60875
60874
|
const key = e.key;
|
|
60876
60875
|
if (e.ctrlKey || e.shiftKey) {
|
|
60877
60876
|
return true;
|
|
60878
60877
|
}
|
|
60878
|
+
if (key !== keyArrowDown && key !== keyArrowUp) {
|
|
60879
|
+
super.keydownHandler(e);
|
|
60880
|
+
}
|
|
60879
60881
|
let currentActiveIndex = this.openActiveIndex ?? this.selectedIndex;
|
|
60880
60882
|
let commitValueThenClose = false;
|
|
60881
60883
|
switch (key) {
|
|
60884
|
+
case keyArrowDown: {
|
|
60885
|
+
const selectedOption = this.options[this.selectedIndex];
|
|
60886
|
+
if (this.open
|
|
60887
|
+
&& isListOption(selectedOption)
|
|
60888
|
+
&& !isOptionOrGroupVisible(selectedOption)) {
|
|
60889
|
+
if (this.openActiveIndex === this.selectedIndex) {
|
|
60890
|
+
this.selectFirstOption();
|
|
60891
|
+
}
|
|
60892
|
+
else {
|
|
60893
|
+
this.selectNextOption();
|
|
60894
|
+
}
|
|
60895
|
+
}
|
|
60896
|
+
else {
|
|
60897
|
+
super.keydownHandler(e);
|
|
60898
|
+
}
|
|
60899
|
+
// update currentActiveIndex again as dependent state may have changed
|
|
60900
|
+
currentActiveIndex = this.openActiveIndex ?? this.selectedIndex;
|
|
60901
|
+
break;
|
|
60902
|
+
}
|
|
60903
|
+
case keyArrowUp: {
|
|
60904
|
+
const selectedOption = this.options[this.selectedIndex];
|
|
60905
|
+
if (this.open
|
|
60906
|
+
&& isListOption(selectedOption)
|
|
60907
|
+
&& !isOptionOrGroupVisible(selectedOption)) {
|
|
60908
|
+
if (this.openActiveIndex === this.selectedIndex) {
|
|
60909
|
+
this.selectLastOption();
|
|
60910
|
+
}
|
|
60911
|
+
else {
|
|
60912
|
+
this.selectPreviousOption();
|
|
60913
|
+
}
|
|
60914
|
+
}
|
|
60915
|
+
else {
|
|
60916
|
+
super.keydownHandler(e);
|
|
60917
|
+
}
|
|
60918
|
+
// update currentActiveIndex again as dependent state may have changed
|
|
60919
|
+
currentActiveIndex = this.openActiveIndex ?? this.selectedIndex;
|
|
60920
|
+
break;
|
|
60921
|
+
}
|
|
60882
60922
|
case keySpace: {
|
|
60883
60923
|
// when dropdown is open allow user to enter a space for filter text
|
|
60884
60924
|
if (this.open && this.filterMode !== FilterMode.none) {
|