@gitlab/ui 44.1.0 → 46.0.0

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/components/base/alert/alert.js +9 -1
  3. package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +8 -0
  4. package/dist/components/base/new_dropdowns/listbox/listbox.js +116 -18
  5. package/dist/utility_classes.css +1 -1
  6. package/dist/utility_classes.css.map +1 -1
  7. package/package.json +2 -2
  8. package/src/components/base/alert/alert.spec.js +13 -14
  9. package/src/components/base/alert/alert.vue +14 -1
  10. package/src/components/base/banner/banner.spec.js +4 -4
  11. package/src/components/base/datepicker/datepicker.spec.js +1 -1
  12. package/src/components/base/daterange_picker/daterange_picker.spec.js +4 -4
  13. package/src/components/base/drawer/drawer.spec.js +2 -2
  14. package/src/components/base/dropdown/dropdown.spec.js +5 -5
  15. package/src/components/base/filtered_search/filtered_search.spec.js +4 -4
  16. package/src/components/base/filtered_search/filtered_search_token.spec.js +9 -9
  17. package/src/components/base/filtered_search/filtered_search_token_segment.spec.js +12 -12
  18. package/src/components/base/form/form_textarea/form_textarea.spec.js +2 -2
  19. package/src/components/base/infinite_scroll/infinite_scroll.spec.js +6 -6
  20. package/src/components/base/label/label.spec.js +5 -5
  21. package/src/components/base/modal/modal.spec.js +1 -1
  22. package/src/components/base/nav/nav.spec.js +1 -1
  23. package/src/components/base/nav/nav_item_dropdown.spec.js +3 -3
  24. package/src/components/base/new_dropdowns/base_dropdown/base_dropdown.vue +6 -0
  25. package/src/components/base/new_dropdowns/listbox/listbox.md +22 -0
  26. package/src/components/base/new_dropdowns/listbox/listbox.spec.js +101 -7
  27. package/src/components/base/new_dropdowns/listbox/listbox.stories.js +244 -20
  28. package/src/components/base/new_dropdowns/listbox/listbox.vue +138 -12
  29. package/src/components/base/paginated_list/paginated_list.spec.js +1 -1
  30. package/src/components/base/pagination/pagination.spec.js +2 -2
  31. package/src/components/base/search_box_by_click/search_box_by_click.spec.js +7 -7
  32. package/src/components/base/search_box_by_type/search_box_by_type.spec.js +2 -2
  33. package/src/components/base/sorting/sorting.spec.js +1 -1
  34. package/src/components/base/sorting/sorting_item.spec.js +2 -2
  35. package/src/components/base/tabs/tabs/scrollable_tabs.spec.js +1 -1
  36. package/src/components/base/tabs/tabs/tabs.spec.js +6 -6
  37. package/src/components/base/token/token.spec.js +1 -1
  38. package/src/components/base/token_selector/token_container.spec.js +1 -1
  39. package/src/components/base/token_selector/token_selector.spec.js +4 -4
  40. package/src/components/base/token_selector/token_selector_dropdown.spec.js +1 -1
  41. package/src/components/charts/column/column_chart.spec.js +1 -1
  42. package/src/components/charts/sparkline/sparkline.spec.js +2 -2
  43. package/src/directives/resize_observer/resize_observer.spec.js +5 -5
  44. package/src/scss/utilities.scss +0 -202
  45. package/src/scss/utility-mixins/display.scss +0 -35
  46. package/src/scss/utility-mixins/flex.scss +0 -7
  47. package/src/scss/utility-mixins/spacing.scss +0 -91
package/CHANGELOG.md CHANGED
@@ -1,3 +1,68 @@
1
+ # [46.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v45.0.0...v46.0.0) (2022-10-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove gl-sm-pb-[0-5] utils ([c94b46d](https://gitlab.com/gitlab-org/gitlab-ui/commit/c94b46d269db023f0a2f63c96ff8bb97d7addf68))
7
+ * remove gl-sm-pl-[1-4] utils ([802a32c](https://gitlab.com/gitlab-org/gitlab-ui/commit/802a32ce8c3e54ba358e8aaf704a09b5d3d27411))
8
+ * remove gl-sm-pr-[014] utils ([8e9c3ee](https://gitlab.com/gitlab-org/gitlab-ui/commit/8e9c3ee43eae4818d031ae4a84772953284611e5))
9
+ * remove gl-xs-align-items-baseline util ([359dd98](https://gitlab.com/gitlab-org/gitlab-ui/commit/359dd989bb6822c9fe4ab14cd69f0fae887d24c4))
10
+ * remove gl-xs-display-block util ([03b1f51](https://gitlab.com/gitlab-org/gitlab-ui/commit/03b1f5168ecdc4fe013b4d305c1eb9f80cabb110))
11
+ * remove gl-xs-display-flex util ([0416358](https://gitlab.com/gitlab-org/gitlab-ui/commit/0416358ecc19f0c2e51acb4f8493ae64ed3a04ee))
12
+ * remove gl-xs-display-inline util ([637f1c8](https://gitlab.com/gitlab-org/gitlab-ui/commit/637f1c8b3ff1d2c3c57ebb5bd33b552621b99c33))
13
+ * remove gl-xs-display-inline-block util ([288bf3e](https://gitlab.com/gitlab-org/gitlab-ui/commit/288bf3ef32915f6a6c66ad1f93d42bcfce2046e5))
14
+ * remove gl-xs-display-inline-flex util ([ceeab81](https://gitlab.com/gitlab-org/gitlab-ui/commit/ceeab8161656b9204d3377188d771491316a8102))
15
+
16
+
17
+ ### Features
18
+
19
+ * **GlAlert:** `role` status based on alert type ([377137d](https://gitlab.com/gitlab-org/gitlab-ui/commit/377137df829a2e0b77190499194c005e688be7f7)), closes [/gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/3045#note_1124896838](https://gitlab.com//gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/3045/issues/note_1124896838) [/gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/3045#note_1124893205](https://gitlab.com//gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/3045/issues/note_1124893205)
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * This removes the `gl-xs-align-items-baseline`
25
+ desktop-first CSS util. If you were relying on it, please
26
+ migrate to a mobile-first approach.
27
+ * This removes the `gl-xs-display-inline-block`
28
+ desktop-first CSS util. If you were relying on it, please
29
+ migrate to a mobile-first approach.
30
+ * This removes the `gl-xs-display-inline` desktop-first
31
+ CSS util. If you were relying on it, please migrate to a
32
+ mobile-first approach.
33
+ * This removes the `gl-xs-display-block` desktop-first
34
+ CSS util. If you were relying on it, please migrate to a
35
+ mobile-first approach.
36
+ * This removes the `gl-xs-display-inline-flex`
37
+ desktop-first CSS util. If you were relying on it, please
38
+ migrate to a mobile-first approach.
39
+ * This removes the `gl-xs-display-flex` desktop-first
40
+ CSS util. If you were relying on it, please migrate to a
41
+ mobile-first approach.
42
+ * This removes `gl-sm-pr-[014]` desktop-first
43
+ CSS utils. If you were relying on them, please migrate to a
44
+ mobile-first approach.
45
+ * This removes `gl-sm-pl-[1-4]` desktop-first
46
+ CSS utils. If you were relying on them, please migrate to a
47
+ mobile-first approach.
48
+ * This removes `gl-sm-pb-[0-5]` desktop-first
49
+ CSS utils. If you were relying on them, please migrate to a
50
+ mobile-first approach.
51
+
52
+ # [45.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v44.1.0...v45.0.0) (2022-10-05)
53
+
54
+
55
+ ### Features
56
+
57
+ * **GlListbox:** add support for listbox filtering ([c6edcc4](https://gitlab.com/gitlab-org/gitlab-ui/commit/c6edcc44966891ce4e2682c9b9785e6bd16ae642))
58
+
59
+
60
+ ### BREAKING CHANGES
61
+
62
+ * **GlListbox:** `ariaLabelledby` property was renamed
63
+ to `toggleAriaLabelledBy `for better consistency
64
+ with a new `listAriaLabelledBy` property
65
+
1
66
  # [44.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v44.0.0...v44.1.0) (2022-10-05)
2
67
 
3
68
 
@@ -101,6 +101,14 @@ var script = {
101
101
  return 'polite';
102
102
  },
103
103
 
104
+ role() {
105
+ if ([alertVariantOptions.danger, alertVariantOptions.warning, alertVariantOptions.success].includes(this.variant)) {
106
+ return 'alert';
107
+ }
108
+
109
+ return 'status';
110
+ },
111
+
104
112
  iconName() {
105
113
  return alertVariantIconMap[this.variant];
106
114
  },
@@ -195,7 +203,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
195
203
  { 'gl-alert-sticky': _vm.sticky },
196
204
  { 'gl-alert-not-dismissible': !_vm.dismissible },
197
205
  { 'gl-alert-no-icon': !_vm.showIcon },
198
- _vm.variantClass ]},[(_vm.showIcon)?_c('gl-icon',{class:{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !_vm.title },attrs:{"name":_vm.iconName}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":"alert","aria-live":_vm.ariaLive}},[(_vm.title)?_c('h2',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",function(){return _vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])})})],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
206
+ _vm.variantClass ]},[(_vm.showIcon)?_c('gl-icon',{class:{ 'gl-alert-icon': true, 'gl-alert-icon-no-title': !_vm.title },attrs:{"name":_vm.iconName}}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":_vm.role,"aria-live":_vm.ariaLive}},[(_vm.title)?_c('h2',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",function(){return _vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])})})],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
199
207
  var __vue_staticRenderFns__ = [];
200
208
 
201
209
  /* style */
@@ -177,6 +177,14 @@ var script = {
177
177
  }
178
178
  },
179
179
 
180
+ open() {
181
+ if (this.visible) {
182
+ return;
183
+ }
184
+
185
+ this.toggle();
186
+ },
187
+
180
188
  close() {
181
189
  if (!this.visible) {
182
190
  return;
@@ -3,6 +3,8 @@ import _clamp from 'lodash/clamp';
3
3
  import { stopEvent } from '../../../../utils/utils';
4
4
  import { GL_DROPDOWN_SHOWN, GL_DROPDOWN_HIDDEN, HOME, END, ARROW_UP, ARROW_DOWN } from '../constants';
5
5
  import { buttonCategoryOptions, dropdownVariantOptions, buttonSizeOptions } from '../../../../utils/constants';
6
+ import GlLoadingIcon from '../../loading_icon/loading_icon';
7
+ import GlSearchBoxByType from '../../search_box_by_type/search_box_by_type';
6
8
  import GlBaseDropdown from '../base_dropdown/base_dropdown';
7
9
  import GlListboxItem from './listbox_item';
8
10
  import GlListboxGroup from './listbox_group';
@@ -11,6 +13,7 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
11
13
 
12
14
  const ITEM_SELECTOR = '[role="option"]';
13
15
  const GROUP_TOP_BORDER_CLASSES = ['gl-border-t', 'gl-pt-3', 'gl-mt-3'];
16
+ const SEARCH_INPUT_SELECTOR = '.gl-search-box-by-type-input';
14
17
  var script = {
15
18
  events: {
16
19
  GL_DROPDOWN_SHOWN,
@@ -19,7 +22,9 @@ var script = {
19
22
  components: {
20
23
  GlBaseDropdown,
21
24
  GlListboxItem,
22
- GlListboxGroup
25
+ GlListboxGroup,
26
+ GlSearchBoxByType,
27
+ GlLoadingIcon
23
28
  },
24
29
  model: {
25
30
  prop: 'selected',
@@ -122,6 +127,7 @@ var script = {
122
127
 
123
128
  /**
124
129
  * Set to "true" when dropdown content (items) is loading
130
+ * It will render a small loader in the dropdown toggle and make it disabled
125
131
  */
126
132
  loading: {
127
133
  type: Boolean,
@@ -167,11 +173,50 @@ var script = {
167
173
 
168
174
  /**
169
175
  * The `aria-labelledby` attribute value for the toggle button
176
+ * Provide the string of ids seperated by space
170
177
  */
171
- ariaLabelledby: {
178
+ toggleAriaLabelledBy: {
172
179
  type: String,
173
180
  required: false,
174
181
  default: null
182
+ },
183
+
184
+ /**
185
+ * The `aria-labelledby` attribute value for the list of options
186
+ * Provide the string of ids seperated by space
187
+ */
188
+ listAriaLabelledBy: {
189
+ type: String,
190
+ required: false,
191
+ default: null
192
+ },
193
+
194
+ /**
195
+ * Enable search
196
+ */
197
+ searchable: {
198
+ type: Boolean,
199
+ required: false,
200
+ default: false
201
+ },
202
+
203
+ /**
204
+ * Set to "true" when items search is in progress.
205
+ * It will display loading icon below the search input
206
+ */
207
+ searching: {
208
+ type: Boolean,
209
+ required: false,
210
+ default: false
211
+ },
212
+
213
+ /**
214
+ * Message to be displayed when filtering produced no results
215
+ */
216
+ noResultsText: {
217
+ type: String,
218
+ required: false,
219
+ default: 'No results found'
175
220
  }
176
221
  },
177
222
 
@@ -179,7 +224,9 @@ var script = {
179
224
  return {
180
225
  selectedValues: [],
181
226
  toggleId: _uniqueId('dropdown-toggle-btn-'),
182
- nextFocusedItemIndex: null
227
+ listboxId: _uniqueId('listbox-'),
228
+ nextFocusedItemIndex: null,
229
+ searchStr: ''
183
230
  };
184
231
  },
185
232
 
@@ -219,6 +266,18 @@ var script = {
219
266
  } = _ref2;
220
267
  return value === selected;
221
268
  })).sort();
269
+ },
270
+
271
+ showList() {
272
+ return this.flattenedOptions.length && !this.searching;
273
+ },
274
+
275
+ showNoResultsText() {
276
+ return !this.flattenedOptions.length && !this.searching;
277
+ },
278
+
279
+ announceSRSearchResults() {
280
+ return this.searchable && !this.showNoResultsText && this.$scopedSlots['search-summary-sr-only'];
222
281
  }
223
282
 
224
283
  },
@@ -241,21 +300,34 @@ var script = {
241
300
  }
242
301
  },
243
302
  methods: {
303
+ open() {
304
+ this.$refs.baseDropdown.open();
305
+ },
306
+
307
+ close() {
308
+ this.$refs.baseDropdown.close();
309
+ },
310
+
244
311
  groupClasses(index) {
245
312
  return index === 0 ? null : GROUP_TOP_BORDER_CLASSES;
246
313
  },
247
314
 
248
315
  onShow() {
249
316
  this.$nextTick(() => {
250
- var _this$selectedIndices;
317
+ if (this.searchable) {
318
+ this.focusSearchInput();
319
+ } else {
320
+ var _this$selectedIndices;
251
321
 
252
- this.focusItem((_this$selectedIndices = this.selectedIndices[0]) !== null && _this$selectedIndices !== void 0 ? _this$selectedIndices : 0, this.getFocusableListItemElements());
322
+ this.focusItem((_this$selectedIndices = this.selectedIndices[0]) !== null && _this$selectedIndices !== void 0 ? _this$selectedIndices : 0, this.getFocusableListItemElements());
323
+ }
253
324
  /**
254
325
  * Emitted when dropdown is shown
255
326
  *
256
327
  * @event shown
257
328
  */
258
329
 
330
+
259
331
  this.$emit(GL_DROPDOWN_SHOWN);
260
332
  });
261
333
  },
@@ -272,20 +344,34 @@ var script = {
272
344
 
273
345
  onKeydown(event) {
274
346
  const {
275
- code
347
+ code,
348
+ target
276
349
  } = event;
277
350
  const elements = this.getFocusableListItemElements();
278
351
  if (elements.length < 1) return;
279
352
  let stop = true;
353
+ const isSearchInput = target.matches(SEARCH_INPUT_SELECTOR);
280
354
 
281
355
  if (code === HOME) {
282
356
  this.focusItem(0, elements);
283
357
  } else if (code === END) {
284
358
  this.focusItem(elements.length - 1, elements);
285
359
  } else if (code === ARROW_UP) {
286
- this.focusNextItem(event, elements, -1);
360
+ if (isSearchInput) {
361
+ return;
362
+ }
363
+
364
+ if (this.searchable && elements.indexOf(target) === 0) {
365
+ this.focusSearchInput();
366
+ } else {
367
+ this.focusNextItem(event, elements, -1);
368
+ }
287
369
  } else if (code === ARROW_DOWN) {
288
- this.focusNextItem(event, elements, 1);
370
+ if (isSearchInput) {
371
+ this.focusItem(0, elements);
372
+ } else {
373
+ this.focusNextItem(event, elements, 1);
374
+ }
289
375
  } else {
290
376
  stop = false;
291
377
  }
@@ -296,8 +382,10 @@ var script = {
296
382
  },
297
383
 
298
384
  getFocusableListItemElements() {
299
- const items = this.$refs.list.querySelectorAll(ITEM_SELECTOR);
300
- return Array.from(items);
385
+ var _this$$refs$list;
386
+
387
+ const items = (_this$$refs$list = this.$refs.list) === null || _this$$refs$list === void 0 ? void 0 : _this$$refs$list.querySelectorAll(ITEM_SELECTOR);
388
+ return Array.from(items || []);
301
389
  },
302
390
 
303
391
  focusNextItem(event, elements, offset) {
@@ -320,15 +408,15 @@ var script = {
320
408
  });
321
409
  },
322
410
 
323
- onSelect(_ref3, isSelected) {
324
- let {
325
- value
326
- } = _ref3;
411
+ focusSearchInput() {
412
+ this.$refs.searchBox.focusInput();
413
+ },
327
414
 
415
+ onSelect(item, isSelected) {
328
416
  if (this.multiple) {
329
- this.onMultiSelect(value, isSelected);
417
+ this.onMultiSelect(item.value, isSelected);
330
418
  } else {
331
- this.onSingleSelect(value, isSelected);
419
+ this.onSingleSelect(item.value, isSelected);
332
420
  }
333
421
  },
334
422
 
@@ -361,6 +449,16 @@ var script = {
361
449
  }
362
450
  },
363
451
 
452
+ search(searchTerm) {
453
+ /**
454
+ * Emitted when the search query string is changed
455
+ *
456
+ * @event search
457
+ * @type {string}
458
+ */
459
+ this.$emit('search', searchTerm);
460
+ },
461
+
364
462
  isOption
365
463
  }
366
464
  };
@@ -369,7 +467,7 @@ var script = {
369
467
  const __vue_script__ = script;
370
468
 
371
469
  /* template */
372
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-base-dropdown',{ref:"baseDropdown",attrs:{"aria-haspopup":"listbox","aria-labelledby":_vm.ariaLabelledby,"toggle-id":_vm.toggleId,"toggle-text":_vm.listboxToggleText,"toggle-class":_vm.toggleClass,"text-sr-only":_vm.textSrOnly,"category":_vm.category,"variant":_vm.variant,"size":_vm.size,"icon":_vm.icon,"disabled":_vm.disabled,"loading":_vm.loading,"no-caret":_vm.noCaret,"right":_vm.right},on:_vm._d({},[_vm.$options.events.GL_DROPDOWN_SHOWN,_vm.onShow,_vm.$options.events.GL_DROPDOWN_HIDDEN,_vm.onHide])},[_vm._t("header"),_vm._v(" "),_c(_vm.listboxTag,{ref:"list",tag:"component",staticClass:"gl-new-dropdown-contents gl-list-style-none gl-pl-0 gl-mb-0",attrs:{"aria-labelledby":_vm.toggleId,"role":"listbox","tabindex":"-1"},on:{"keydown":_vm.onKeydown}},[_vm._l((_vm.items),function(item,index){return [(_vm.isOption(item))?[_c('gl-listbox-item',{key:item.value,attrs:{"is-selected":_vm.isSelected(item),"is-focused":_vm.isFocused(item),"is-check-centered":_vm.isCheckCentered},on:{"select":function($event){return _vm.onSelect(item, $event)}}},[_vm._t("list-item",function(){return [_vm._v("\n "+_vm._s(item.text)+"\n ")]},{"item":item})],2)]:[_c('gl-listbox-group',{key:item.text,class:_vm.groupClasses(index),attrs:{"name":item.text},scopedSlots:_vm._u([(_vm.$scopedSlots['group-label'])?{key:"group-label",fn:function(){return [_vm._t("group-label",null,{"group":item})]},proxy:true}:null],null,true)},[_vm._v(" "),_vm._l((item.options),function(option){return _c('gl-listbox-item',{key:option.value,attrs:{"is-selected":_vm.isSelected(option),"is-focused":_vm.isFocused(option),"is-check-centered":_vm.isCheckCentered},on:{"select":function($event){return _vm.onSelect(option, $event)}}},[_vm._t("list-item",function(){return [_vm._v("\n "+_vm._s(option.text)+"\n ")]},{"item":option})],2)})],2)]]})],2),_vm._v(" "),_vm._t("footer")],2)};
470
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-base-dropdown',{ref:"baseDropdown",attrs:{"aria-haspopup":"listbox","aria-labelledby":_vm.toggleAriaLabelledBy,"toggle-id":_vm.toggleId,"toggle-text":_vm.listboxToggleText,"toggle-class":_vm.toggleClass,"text-sr-only":_vm.textSrOnly,"category":_vm.category,"variant":_vm.variant,"size":_vm.size,"icon":_vm.icon,"disabled":_vm.disabled,"loading":_vm.loading,"no-caret":_vm.noCaret,"right":_vm.right},on:_vm._d({},[_vm.$options.events.GL_DROPDOWN_SHOWN,_vm.onShow,_vm.$options.events.GL_DROPDOWN_HIDDEN,_vm.onHide])},[_vm._t("header"),_vm._v(" "),(_vm.searchable)?_c('div',{staticClass:"gl-border-b-1 gl-border-b-solid gl-border-b-gray-200"},[_c('gl-search-box-by-type',{ref:"searchBox",attrs:{"aria-owns":_vm.listboxId,"data-testid":"listbox-search-input"},on:{"input":_vm.search,"keydown":_vm.onKeydown},model:{value:(_vm.searchStr),callback:function ($$v) {_vm.searchStr=$$v;},expression:"searchStr"}}),_vm._v(" "),(_vm.searching)?_c('gl-loading-icon',{staticClass:"gl-my-3",attrs:{"data-testid":"listbox-search-loader","size":"md"}}):_vm._e()],1):_vm._e(),_vm._v(" "),(_vm.showList)?_c(_vm.listboxTag,{ref:"list",tag:"component",staticClass:"gl-new-dropdown-contents gl-list-style-none gl-pl-0 gl-mb-0",attrs:{"id":"listbox","aria-labelledby":_vm.listAriaLabelledBy || _vm.toggleId,"role":"listbox","tabindex":"-1"},on:{"keydown":_vm.onKeydown}},[_vm._l((_vm.items),function(item,index){return [(_vm.isOption(item))?[_c('gl-listbox-item',{key:item.value,attrs:{"is-selected":_vm.isSelected(item),"is-focused":_vm.isFocused(item),"is-check-centered":_vm.isCheckCentered},on:{"select":function($event){return _vm.onSelect(item, $event)}}},[_vm._t("list-item",function(){return [_vm._v("\n "+_vm._s(item.text)+"\n ")]},{"item":item})],2)]:[_c('gl-listbox-group',{key:item.text,class:_vm.groupClasses(index),attrs:{"name":item.text},scopedSlots:_vm._u([(_vm.$scopedSlots['group-label'])?{key:"group-label",fn:function(){return [_vm._t("group-label",null,{"group":item})]},proxy:true}:null],null,true)},[_vm._v(" "),_vm._l((item.options),function(option){return _c('gl-listbox-item',{key:option.value,attrs:{"is-selected":_vm.isSelected(option),"is-focused":_vm.isFocused(option),"is-check-centered":_vm.isCheckCentered},on:{"select":function($event){return _vm.onSelect(option, $event)}}},[_vm._t("list-item",function(){return [_vm._v("\n "+_vm._s(option.text)+"\n ")]},{"item":option})],2)})],2)]]})],2):_vm._e(),_vm._v(" "),(_vm.announceSRSearchResults)?_c('span',{staticClass:"gl-sr-only",attrs:{"data-testid":"listbox-number-of-results","aria-live":"assertive"}},[_vm._t("search-summary-sr-only")],2):(_vm.showNoResultsText)?_c('div',{staticClass:"gl-pl-7 gl-pr-5 gl-pt-3 gl-font-base gl-text-gray-600",attrs:{"aria-live":"assertive","data-testid":"listbox-no-results-text"}},[_vm._v("\n "+_vm._s(_vm.noResultsText)+"\n ")]):_vm._e(),_vm._v(" "),_vm._t("footer")],2)};
373
471
  var __vue_staticRenderFns__ = [];
374
472
 
375
473
  /* style */
@@ -402,4 +500,4 @@ var __vue_staticRenderFns__ = [];
402
500
  );
403
501
 
404
502
  export default __vue_component__;
405
- export { ITEM_SELECTOR };
503
+ export { ITEM_SELECTOR, SEARCH_INPUT_SELECTOR };