@gitlab/ui 113.4.0 → 113.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "113.4.0",
3
+ "version": "113.5.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -572,7 +572,7 @@ export default {
572
572
  >
573
573
  <div ref="dropdownArrow" class="gl-new-dropdown-arrow"></div>
574
574
  <div class="gl-new-dropdown-inner">
575
- <slot></slot>
575
+ <slot :visible="visible"></slot>
576
576
  </div>
577
577
  </div>
578
578
  </div>
@@ -26,7 +26,7 @@ import GlLoadingIcon from '../../loading_icon/loading_icon.vue';
26
26
  import GlIntersectionObserver from '../../../utilities/intersection_observer/intersection_observer.vue';
27
27
  import GlSearchBoxByType from '../../search_box_by_type/search_box_by_type.vue';
28
28
  import GlBaseDropdown from '../base_dropdown/base_dropdown.vue';
29
- import { translatePlural } from '../../../../utils/i18n';
29
+ import { translate, translatePlural } from '../../../../utils/i18n';
30
30
  import GlListboxItem from './listbox_item.vue';
31
31
  import GlListboxSearchInput from './listbox_search_input.vue';
32
32
  import GlListboxGroup from './listbox_group.vue';
@@ -373,13 +373,22 @@ export default {
373
373
  return {
374
374
  selectedValues: [],
375
375
  listboxId: uniqueId('listbox-'),
376
+ searchInputId: uniqueId('listbox-search-input-'),
376
377
  nextFocusedItemIndex: null,
377
378
  searchStr: '',
378
379
  topBoundaryVisible: true,
379
380
  bottomBoundaryVisible: true,
381
+ activeItemId: null,
382
+ itemIds: new Map(),
380
383
  };
381
384
  },
382
385
  computed: {
386
+ ariaLabelledByID() {
387
+ if (this.searchable) {
388
+ return this.searchInputId;
389
+ }
390
+ return this.listAriaLabelledBy || this.headerId || this.toggleIdComputed;
391
+ },
383
392
  toggleIdComputed() {
384
393
  return this.toggleId || uniqueId('dropdown-toggle-btn-');
385
394
  },
@@ -477,6 +486,9 @@ export default {
477
486
  showIntersectionObserver() {
478
487
  return this.infiniteScroll && !this.infiniteScrollLoading && !this.loading && !this.searching;
479
488
  },
489
+ isBusy() {
490
+ return this.infiniteScrollLoading || this.loading || this.searching;
491
+ },
480
492
  hasCustomToggle() {
481
493
  return Boolean(this.$scopedSlots.toggle);
482
494
  },
@@ -497,6 +509,24 @@ export default {
497
509
  hasFooter() {
498
510
  return Boolean(this.$scopedSlots.footer);
499
511
  },
512
+ loadingAnnouncementText() {
513
+ if (this.infiniteScrollLoading) {
514
+ return translate(
515
+ 'GlCollapsibleListbox.loadingAnnouncementText.loadingMoreItems',
516
+ 'Loading more items'
517
+ );
518
+ }
519
+ if (this.searching) {
520
+ return translate('GlCollapsibleListbox.loadingAnnouncementText.searching', 'Searching');
521
+ }
522
+ if (this.loading) {
523
+ return translate(
524
+ 'GlCollapsibleListbox.loadingAnnouncementText.loadingItems',
525
+ 'Loading items'
526
+ );
527
+ }
528
+ return '';
529
+ },
500
530
  },
501
531
  watch: {
502
532
  selected: {
@@ -595,6 +625,9 @@ export default {
595
625
  */
596
626
  if (this.searchHasOptions) {
597
627
  this.nextFocusedItemIndex = 0;
628
+ // Set activeItemId for the first item
629
+ const firstItem = this.flattenedOptions[0];
630
+ this.activeItemId = this.generateItemId(firstItem);
598
631
  }
599
632
  } else {
600
633
  this.focusItem(this.selectedIndices[0] ?? 0, this.getFocusableListItemElements());
@@ -615,54 +648,80 @@ export default {
615
648
  this.$emit(GL_DROPDOWN_HIDDEN);
616
649
  this.nextFocusedItemIndex = null;
617
650
  },
651
+ getNextIndex(currentIndex, keyCode, totalLength) {
652
+ // For UP: move up or wrap to end
653
+ if (keyCode === ARROW_UP) {
654
+ return currentIndex > 0 ? currentIndex - 1 : totalLength - 1;
655
+ }
656
+
657
+ // For DOWN: move down or wrap to start
658
+ return currentIndex < totalLength - 1 ? currentIndex + 1 : 0;
659
+ },
660
+ handleListNavigation(keyCode, elements) {
661
+ const currentIndex = this.nextFocusedItemIndex ?? -1;
662
+ const nextIndex = this.getNextIndex(currentIndex, keyCode, elements.length);
663
+ this.focusItem(nextIndex, elements, this.searchable);
664
+ },
618
665
  onKeydown(event) {
619
666
  const { code, target } = event;
620
667
  const elements = this.getFocusableListItemElements();
621
668
 
622
669
  if (elements.length < 1) return;
623
670
 
624
- let stop = true;
625
671
  const isSearchInput = target.matches(SEARCH_INPUT_SELECTOR);
672
+ let stop = true;
626
673
 
627
- if (code === HOME) {
628
- if (isSearchInput) {
629
- return;
630
- }
631
- this.focusItem(0, elements);
632
- } else if (code === END) {
633
- if (isSearchInput) {
634
- return;
635
- }
636
- this.focusItem(elements.length - 1, elements);
637
- } else if (code === ARROW_UP) {
638
- if (isSearchInput) {
639
- return;
640
- }
641
- if (this.searchable && elements.indexOf(target) === 0) {
642
- this.focusSearchInput();
643
- if (!this.searchHasOptions) {
644
- this.nextFocusedItemIndex = null;
674
+ switch (code) {
675
+ case HOME:
676
+ // Jump to first item if searchable or not in search input
677
+ if (this.searchable || !isSearchInput) {
678
+ this.focusItem(0, elements, this.searchable);
645
679
  }
646
- } else {
647
- this.focusNextItem(event, elements, -1);
648
- }
649
- } else if (code === ARROW_DOWN) {
650
- if (isSearchInput) {
651
- this.focusItem(0, elements);
652
- } else {
653
- this.focusNextItem(event, elements, 1);
654
- }
655
- } else if (code === ENTER && isSearchInput) {
656
- if (this.searchHasOptions && elements.length > 0) {
657
- // Toggle selection state of the first item
658
- const firstItem = this.flattenedOptions[0];
659
- this.onSelect(firstItem, !this.isSelected(firstItem));
660
- }
661
- stop = true;
662
- } else {
663
- stop = false;
680
+ break;
681
+
682
+ case END:
683
+ // Jump to last item if searchable or not in search input
684
+ if (this.searchable || !isSearchInput) {
685
+ this.focusItem(elements.length - 1, elements, this.searchable);
686
+ }
687
+ break;
688
+
689
+ case ARROW_UP:
690
+ // Let default behavior work for non-searchable input
691
+ if (isSearchInput && !this.searchable) {
692
+ return;
693
+ }
694
+ this.handleListNavigation(ARROW_UP, elements);
695
+ break;
696
+
697
+ case ARROW_DOWN:
698
+ // Focus first item from search input, otherwise navigate down
699
+ if (isSearchInput && !this.searchable) {
700
+ this.focusItem(0, elements);
701
+ } else {
702
+ this.handleListNavigation(ARROW_DOWN, elements);
703
+ }
704
+ break;
705
+
706
+ case ENTER:
707
+ if (isSearchInput) {
708
+ // Toggle selection of highlighted item if one exists
709
+ if (elements.length > 0 && this.nextFocusedItemIndex !== null) {
710
+ const highlightedItem = this.flattenedOptions[this.nextFocusedItemIndex];
711
+ this.onSelect(highlightedItem, !this.isSelected(highlightedItem));
712
+ }
713
+ } else {
714
+ stop = false;
715
+ }
716
+ break;
717
+
718
+ default:
719
+ // Allow default behavior for unhandled keys
720
+ stop = false;
721
+ break;
664
722
  }
665
723
 
724
+ // Prevent default behavior for handled keys
666
725
  if (stop) {
667
726
  stopEvent(event);
668
727
  }
@@ -678,10 +737,25 @@ export default {
678
737
 
679
738
  this.focusItem(nextIndex, elements);
680
739
  },
681
- focusItem(index, elements) {
740
+ focusItem(index, elements, keepSearchFocused = false) {
682
741
  this.nextFocusedItemIndex = index;
683
742
 
684
- elements[index]?.focus();
743
+ // Always update the activeItemId when focus changes
744
+ const item = this.flattenedOptions[index];
745
+ if (item) {
746
+ this.activeItemId = this.generateItemId(item);
747
+ } else {
748
+ this.activeItemId = null;
749
+ }
750
+
751
+ // If we're not keeping the search focused, focus the item
752
+ if (!keepSearchFocused) {
753
+ elements[index]?.focus();
754
+ }
755
+
756
+ this.$nextTick(() => {
757
+ this.scrollActiveItemIntoView();
758
+ });
685
759
  },
686
760
  focusSearchInput() {
687
761
  this.$refs.searchBox.focusInput();
@@ -806,6 +880,41 @@ export default {
806
880
  this.scrollObserver = observer;
807
881
  },
808
882
  isOption,
883
+ generateItemId(item) {
884
+ const key = item.value === null ? ITEM_NULL_KEY : item.value;
885
+ if (!this.itemIds.has(key)) {
886
+ this.itemIds.set(key, uniqueId('listbox-item-'));
887
+ }
888
+ return this.itemIds.get(key);
889
+ },
890
+ scrollActiveItemIntoView() {
891
+ const listContainer = this.$refs.list;
892
+ if (!this.activeItemId || !this.searchable || !listContainer) return;
893
+
894
+ const activeElement = document.getElementById(this.activeItemId);
895
+ if (!activeElement) return;
896
+
897
+ const containerRect = listContainer.getBoundingClientRect();
898
+ const itemRect = activeElement.getBoundingClientRect();
899
+ const itemTop = activeElement.offsetTop;
900
+ const padding = 30;
901
+
902
+ // If item is above the visible area
903
+ if (itemRect.top < containerRect.top) {
904
+ listContainer.scrollTo({
905
+ top: itemTop - padding,
906
+ behavior: 'smooth',
907
+ });
908
+ }
909
+
910
+ // If item is below the visible area
911
+ else if (itemRect.bottom > containerRect.bottom) {
912
+ listContainer.scrollTo({
913
+ top: itemTop - containerRect.height + activeElement.offsetHeight + padding,
914
+ behavior: 'smooth',
915
+ });
916
+ }
917
+ },
809
918
  },
810
919
  };
811
920
  </script>
@@ -839,165 +948,191 @@ export default {
839
948
  <slot name="toggle"></slot>
840
949
  </template>
841
950
 
842
- <div
843
- v-if="headerText"
844
- class="gl-flex gl-min-h-8 gl-items-center !gl-p-4"
845
- :class="$options.HEADER_ITEMS_BORDER_CLASSES"
846
- >
951
+ <template #default="{ visible }">
847
952
  <div
848
- :id="headerId"
849
- class="gl-grow gl-pr-2 gl-text-sm gl-font-bold gl-text-strong"
850
- data-testid="listbox-header-text"
851
- >
852
- {{ headerText }}
853
- </div>
854
- <gl-button
855
- v-if="showResetButton"
856
- category="tertiary"
857
- class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-flex-shrink-0 gl-text-ellipsis !gl-px-2 !gl-text-sm focus:!gl-focus-inset"
858
- size="small"
859
- data-testid="listbox-reset-button"
860
- @click="onResetButtonClicked"
953
+ v-if="headerText"
954
+ class="gl-flex gl-min-h-8 gl-items-center !gl-p-4"
955
+ :class="$options.HEADER_ITEMS_BORDER_CLASSES"
861
956
  >
862
- {{ resetButtonLabel }}
863
- </gl-button>
864
- <gl-button
865
- v-if="showSelectAllButton"
866
- category="tertiary"
867
- class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-flex-shrink-0 gl-text-ellipsis !gl-px-2 !gl-text-sm focus:!gl-focus-inset"
868
- size="small"
869
- data-testid="listbox-select-all-button"
870
- @click="onSelectAllButtonClicked"
871
- >
872
- {{ showSelectAllButtonLabel }}
873
- </gl-button>
874
- </div>
875
-
876
- <div v-if="searchable" :class="$options.HEADER_ITEMS_BORDER_CLASSES">
877
- <gl-listbox-search-input
878
- ref="searchBox"
879
- v-model="searchStr"
880
- data-testid="listbox-search-input"
881
- :placeholder="searchPlaceholder"
882
- :class="{ 'gl-listbox-topmost': !headerText }"
883
- @input="search"
884
- @keydown.enter.prevent
885
- @keydown="onKeydown"
886
- />
887
- <gl-loading-icon
888
- v-if="searching"
889
- data-testid="listbox-search-loader"
890
- size="md"
891
- class="gl-my-3"
892
- />
893
- </div>
894
-
895
- <component
896
- :is="listboxTag"
897
- v-if="showList"
898
- :id="listboxId"
899
- ref="list"
900
- :aria-labelledby="listAriaLabelledBy || headerId || toggleIdComputed"
901
- role="listbox"
902
- class="gl-new-dropdown-contents gl-new-dropdown-contents-with-scrim-overlay"
903
- :class="listboxClasses"
904
- tabindex="0"
905
- @keydown="onKeydown"
906
- >
907
- <component :is="itemTag" class="top-scrim-wrapper" aria-hidden="true" data-testid="top-scrim">
908
957
  <div
909
- class="top-scrim"
910
- :class="{ 'top-scrim-light': !hasHeader, 'top-scrim-dark': hasHeader }"
911
- ></div>
912
- </component>
913
- <component :is="itemTag" ref="top-boundary" aria-hidden="true" />
914
- <template v-for="(item, index) in items">
915
- <template v-if="isOption(item)">
916
- <gl-listbox-item
917
- :key="listboxItemKey(item)"
918
- :data-testid="`listbox-item-${item.value}`"
919
- :is-highlighted="isHighlighted(item)"
920
- :is-selected="isSelected(item)"
921
- :is-focused="isFocused(item)"
922
- :is-check-centered="isCheckCentered"
923
- v-bind="listboxItemMoreItemsAriaAttributes(index)"
924
- @select="onSelect(item, $event)"
925
- >
926
- <!-- @slot Custom template of the listbox item -->
927
- <slot name="list-item" :item="item">
928
- {{ item.text }}
929
- </slot>
930
- </gl-listbox-item>
931
- </template>
958
+ :id="headerId"
959
+ class="gl-grow gl-pr-2 gl-text-sm gl-font-bold gl-text-strong"
960
+ data-testid="listbox-header-text"
961
+ >
962
+ {{ headerText }}
963
+ </div>
964
+ <gl-button
965
+ v-if="showResetButton"
966
+ category="tertiary"
967
+ class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-flex-shrink-0 gl-text-ellipsis !gl-px-2 !gl-text-sm focus:!gl-focus-inset"
968
+ size="small"
969
+ data-testid="listbox-reset-button"
970
+ @click="onResetButtonClicked"
971
+ >
972
+ {{ resetButtonLabel }}
973
+ </gl-button>
974
+ <gl-button
975
+ v-if="showSelectAllButton"
976
+ category="tertiary"
977
+ class="!gl-m-0 !gl-w-auto gl-max-w-1/2 gl-flex-shrink-0 gl-text-ellipsis !gl-px-2 !gl-text-sm focus:!gl-focus-inset"
978
+ size="small"
979
+ data-testid="listbox-select-all-button"
980
+ @click="onSelectAllButtonClicked"
981
+ >
982
+ {{ showSelectAllButtonLabel }}
983
+ </gl-button>
984
+ </div>
932
985
 
933
- <template v-else>
934
- <gl-listbox-group
935
- :key="item.text"
936
- :name="item.text"
937
- :text-sr-only="item.textSrOnly"
938
- :class="groupClasses(index)"
939
- >
940
- <template v-if="$scopedSlots['group-label']" #group-label>
941
- <!-- @slot Custom template for group names -->
942
- <slot name="group-label" :group="item"></slot>
943
- </template>
986
+ <div v-if="searchable" :class="$options.HEADER_ITEMS_BORDER_CLASSES">
987
+ <gl-listbox-search-input
988
+ :id="searchInputId"
989
+ ref="searchBox"
990
+ v-model="searchStr"
991
+ data-testid="listbox-search-input"
992
+ role="combobox"
993
+ :aria-expanded="String(visible)"
994
+ :aria-controls="listboxId"
995
+ :aria-activedescendant="activeItemId"
996
+ aria-haspopup="listbox"
997
+ :placeholder="searchPlaceholder"
998
+ :class="{ 'gl-listbox-topmost': !headerText }"
999
+ @input="search"
1000
+ @keydown.enter.prevent
1001
+ @keydown="onKeydown"
1002
+ />
1003
+ <gl-loading-icon
1004
+ v-if="searching"
1005
+ data-testid="listbox-search-loader"
1006
+ size="md"
1007
+ class="gl-my-3"
1008
+ />
1009
+ </div>
944
1010
 
1011
+ <component
1012
+ :is="listboxTag"
1013
+ v-if="showList"
1014
+ :id="listboxId"
1015
+ ref="list"
1016
+ :aria-busy="isBusy"
1017
+ :aria-labelledby="ariaLabelledByID"
1018
+ :aria-multiselectable="multiple ? 'true' : undefined"
1019
+ role="listbox"
1020
+ class="gl-new-dropdown-contents gl-new-dropdown-contents-with-scrim-overlay"
1021
+ :class="listboxClasses"
1022
+ tabindex="0"
1023
+ @keydown="onKeydown"
1024
+ >
1025
+ <component
1026
+ :is="itemTag"
1027
+ class="top-scrim-wrapper"
1028
+ aria-hidden="true"
1029
+ data-testid="top-scrim"
1030
+ >
1031
+ <div
1032
+ class="top-scrim"
1033
+ :class="{ 'top-scrim-light': !hasHeader, 'top-scrim-dark': hasHeader }"
1034
+ ></div>
1035
+ </component>
1036
+ <component :is="itemTag" ref="top-boundary" aria-hidden="true" />
1037
+ <template v-for="(item, index) in items">
1038
+ <template v-if="isOption(item)">
945
1039
  <gl-listbox-item
946
- v-for="option in item.options"
947
- :key="listboxItemKey(option)"
948
- :data-testid="`listbox-item-${option.value}`"
949
- :is-highlighted="isHighlighted(option)"
950
- :is-selected="isSelected(option)"
951
- :is-focused="isFocused(option)"
1040
+ :id="generateItemId(item)"
1041
+ :key="listboxItemKey(item)"
1042
+ :data-testid="`listbox-item-${item.value}`"
1043
+ :is-highlighted="isHighlighted(item)"
1044
+ :is-selected="isSelected(item)"
1045
+ :is-focused="isFocused(item)"
952
1046
  :is-check-centered="isCheckCentered"
953
- @select="onSelect(option, $event)"
1047
+ v-bind="listboxItemMoreItemsAriaAttributes(index)"
1048
+ @select="onSelect(item, $event)"
954
1049
  >
955
1050
  <!-- @slot Custom template of the listbox item -->
956
- <slot name="list-item" :item="option">
957
- {{ option.text }}
1051
+ <slot name="list-item" :item="item">
1052
+ {{ item.text }}
958
1053
  </slot>
959
1054
  </gl-listbox-item>
960
- </gl-listbox-group>
1055
+ </template>
1056
+
1057
+ <template v-else>
1058
+ <gl-listbox-group
1059
+ :key="item.text"
1060
+ :name="item.text"
1061
+ :text-sr-only="item.textSrOnly"
1062
+ :class="groupClasses(index)"
1063
+ >
1064
+ <template v-if="$scopedSlots['group-label']" #group-label>
1065
+ <!-- @slot Custom template for group names -->
1066
+ <slot name="group-label" :group="item"></slot>
1067
+ </template>
1068
+
1069
+ <gl-listbox-item
1070
+ v-for="option in item.options"
1071
+ :id="generateItemId(option)"
1072
+ :key="listboxItemKey(option)"
1073
+ :data-testid="`listbox-item-${option.value}`"
1074
+ :is-highlighted="isHighlighted(option)"
1075
+ :is-selected="isSelected(option)"
1076
+ :is-focused="isFocused(option)"
1077
+ :is-check-centered="isCheckCentered"
1078
+ @select="onSelect(option, $event)"
1079
+ >
1080
+ <!-- @slot Custom template of the listbox item -->
1081
+ <slot name="list-item" :item="option">
1082
+ {{ option.text }}
1083
+ </slot>
1084
+ </gl-listbox-item>
1085
+ </gl-listbox-group>
1086
+ </template>
961
1087
  </template>
962
- </template>
963
- <component :is="itemTag" v-if="infiniteScrollLoading">
964
- <gl-loading-icon data-testid="listbox-infinite-scroll-loader" size="md" class="gl-my-3" />
1088
+ <component :is="itemTag" v-if="infiniteScrollLoading">
1089
+ <gl-loading-icon data-testid="listbox-infinite-scroll-loader" size="md" class="gl-my-3" />
1090
+ </component>
1091
+ <gl-intersection-observer
1092
+ v-if="showIntersectionObserver"
1093
+ @appear="onIntersectionObserverAppear"
1094
+ />
1095
+ <component :is="itemTag" ref="bottom-boundary" aria-hidden="true" />
1096
+ <component
1097
+ :is="itemTag"
1098
+ class="bottom-scrim-wrapper"
1099
+ aria-hidden="true"
1100
+ data-testid="bottom-scrim"
1101
+ >
1102
+ <div class="bottom-scrim" :class="{ '!gl-rounded-none': hasFooter }"></div>
1103
+ </component>
965
1104
  </component>
966
- <gl-intersection-observer
967
- v-if="showIntersectionObserver"
968
- @appear="onIntersectionObserverAppear"
969
- />
970
- <component :is="itemTag" ref="bottom-boundary" aria-hidden="true" />
971
- <component
972
- :is="itemTag"
973
- class="bottom-scrim-wrapper"
974
- aria-hidden="true"
975
- data-testid="bottom-scrim"
1105
+ <span
1106
+ v-if="announceSRSearchResults"
1107
+ data-testid="listbox-number-of-results"
1108
+ class="gl-sr-only"
1109
+ aria-live="assertive"
976
1110
  >
977
- <div class="bottom-scrim" :class="{ '!gl-rounded-none': hasFooter }"></div>
978
- </component>
979
- </component>
980
- <span
981
- v-if="announceSRSearchResults"
982
- data-testid="listbox-number-of-results"
983
- class="gl-sr-only"
984
- aria-live="assertive"
985
- >
986
- <!-- @slot Text read by screen reader announcing a number of search results -->
987
- <slot name="search-summary-sr-only">
988
- {{ srOnlyResultsLabel(flattenedOptions.length) }}
989
- </slot>
990
- </span>
991
-
992
- <div
993
- v-else-if="showNoResultsText"
994
- aria-live="assertive"
995
- class="gl-py-3 gl-pl-7 gl-pr-5 gl-text-base gl-text-subtle"
996
- data-testid="listbox-no-results-text"
997
- >
998
- {{ noResultsText }}
999
- </div>
1000
- <!-- @slot Content to display in dropdown footer -->
1001
- <slot name="footer"></slot>
1111
+ <!-- @slot Text read by screen reader announcing a number of search results -->
1112
+ <slot name="search-summary-sr-only">
1113
+ {{ srOnlyResultsLabel(flattenedOptions.length) }}
1114
+ </slot>
1115
+ </span>
1116
+ <span
1117
+ v-if="isBusy"
1118
+ class="gl-sr-only"
1119
+ aria-live="polite"
1120
+ data-testid="listbox-loading-announcement"
1121
+ >
1122
+ {{ loadingAnnouncementText }}
1123
+ </span>
1124
+
1125
+ <div
1126
+ v-else-if="showNoResultsText"
1127
+ aria-live="assertive"
1128
+ class="gl-py-3 gl-pl-7 gl-pr-5 gl-text-base gl-text-subtle"
1129
+ data-testid="listbox-no-results-text"
1130
+ >
1131
+ {{ noResultsText }}
1132
+ </div>
1133
+
1134
+ <!-- @slot Content to display in dropdown footer -->
1135
+ <slot name="footer"></slot>
1136
+ </template>
1002
1137
  </gl-base-dropdown>
1003
1138
  </template>
@@ -8,6 +8,7 @@ export default {
8
8
  GlClearIconButton,
9
9
  GlIcon,
10
10
  },
11
+ inheritAttrs: false,
11
12
  model: {
12
13
  prop: 'value',
13
14
  event: 'input',
@@ -65,6 +66,7 @@ export default {
65
66
  class="gl-listbox-search-input"
66
67
  :aria-label="placeholder"
67
68
  :placeholder="placeholder"
69
+ v-bind="$attrs"
68
70
  v-on="inputListeners"
69
71
  />
70
72
  <gl-clear-icon-button
@@ -54,14 +54,15 @@ $limited-layout-width: 990px !default;
54
54
  $container-xl: 1280px !default;
55
55
 
56
56
  // Color schema
57
+ /* stylelint-disable @gitlab/no-gl-deprecated-design-tokens */
57
58
  $black-normal: #333 !default;
58
59
 
59
60
  $white-contrast: #fff !default;
60
61
  $white-normal: #f0f0f0 !default;
61
62
  $white-dark: #eaeaea !default;
62
63
  $white-transparent: rgba(255, 255, 255, 0.8) !default;
63
- /* stylelint-disable-next-line @gitlab/no-gl-deprecated-design-tokens */
64
64
  $transparent-rgba: rgba($white, 0);
65
+ /* stylelint-enable @gitlab/no-gl-deprecated-design-tokens */
65
66
 
66
67
  // Text
67
68
  $gl-text-color: $gl-text-color-default !default;
package/translations.js CHANGED
@@ -10,6 +10,9 @@ export default {
10
10
  'GlChartLegend.current': 'Current',
11
11
  'GlChartLegend.max': 'Max',
12
12
  'GlChartLegend.min': 'Min',
13
+ 'GlCollapsibleListbox.loadingAnnouncementText.loadingItems': 'Loading items',
14
+ 'GlCollapsibleListbox.loadingAnnouncementText.loadingMoreItems': 'Loading more items',
15
+ 'GlCollapsibleListbox.loadingAnnouncementText.searching': 'Searching',
13
16
  'GlCollapsibleListbox.srOnlyResultsLabel': null,
14
17
  'GlDatepicker.monthLabel': 'Month',
15
18
  'GlDatepicker.yearLabel': 'Year',