@gitlab/ui 136.3.0 → 136.3.2

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/dist/components/base/collapse/collapse.js +3 -4
  2. package/dist/components/base/filtered_search/filtered_search.js +4 -5
  3. package/dist/components/base/filtered_search/filtered_search_token.js +8 -9
  4. package/dist/components/base/filtered_search/filtered_search_token_segment.js +13 -14
  5. package/dist/components/base/form/form_checkbox/form_checkbox.js +14 -15
  6. package/dist/components/base/form/form_input/form_input.js +9 -11
  7. package/dist/components/base/form/form_radio/form_radio.js +14 -15
  8. package/dist/components/base/form/form_textarea/form_textarea.js +13 -16
  9. package/dist/components/base/infinite_scroll/infinite_scroll.js +17 -19
  10. package/dist/components/base/new_dropdowns/listbox/listbox.js +17 -19
  11. package/dist/components/base/sorting/sorting.js +2 -2
  12. package/dist/components/base/tabs/tabs/scrollable_tabs.js +6 -8
  13. package/dist/components/base/toggle/toggle.js +1 -0
  14. package/dist/components/base/token_selector/token_selector.js +13 -15
  15. package/dist/index.css +2 -2
  16. package/dist/index.css.map +1 -1
  17. package/dist/tokens/build/js/tokens.dark.js +34 -17
  18. package/dist/tokens/build/js/tokens.js +34 -17
  19. package/package.json +4 -4
  20. package/src/components/base/collapse/collapse.vue +3 -4
  21. package/src/components/base/filtered_search/filtered_search.vue +4 -5
  22. package/src/components/base/filtered_search/filtered_search_token.vue +8 -9
  23. package/src/components/base/filtered_search/filtered_search_token_segment.vue +10 -11
  24. package/src/components/base/form/form_checkbox/form_checkbox.vue +14 -15
  25. package/src/components/base/form/form_input/form_input.vue +9 -11
  26. package/src/components/base/form/form_radio/form_radio.vue +14 -15
  27. package/src/components/base/form/form_textarea/form_textarea.vue +13 -16
  28. package/src/components/base/infinite_scroll/infinite_scroll.vue +16 -18
  29. package/src/components/base/new_dropdowns/listbox/listbox.vue +17 -19
  30. package/src/components/base/sorting/sorting.vue +3 -2
  31. package/src/components/base/tabs/tabs/scrollable_tabs.vue +7 -9
  32. package/src/components/base/toggle/toggle.scss +90 -22
  33. package/src/components/base/toggle/toggle.vue +1 -0
  34. package/src/components/base/token_selector/token_selector.vue +12 -14
  35. package/src/tokens/build/css/tokens.css +39 -22
  36. package/src/tokens/build/css/tokens.dark.css +39 -22
  37. package/src/tokens/build/figma/mode.dark.json +189 -24
  38. package/src/tokens/build/figma/mode.json +189 -24
  39. package/src/tokens/build/js/tokens.dark.js +33 -16
  40. package/src/tokens/build/js/tokens.js +33 -16
  41. package/src/tokens/build/json/tokens.dark.json +650 -42
  42. package/src/tokens/build/json/tokens.json +650 -42
  43. package/src/tokens/build/scss/_tokens.dark.scss +39 -22
  44. package/src/tokens/build/scss/_tokens.scss +39 -22
  45. package/src/tokens/build/scss/_tokens_custom_properties.scss +17 -0
  46. package/src/tokens/contextual/toggle.tokens.json +198 -33
  47. package/src/tokens/semantic/action.tokens.json +14 -0
@@ -71,10 +71,9 @@ var script = {
71
71
  }
72
72
  }
73
73
  },
74
- mounted() {
75
- this.$nextTick(() => {
76
- this.emitState();
77
- });
74
+ async mounted() {
75
+ await this.$nextTick();
76
+ this.emitState();
78
77
  },
79
78
  beforeDestroy() {
80
79
  // Trigger state emit if needed
@@ -427,11 +427,10 @@ var script = {
427
427
  this.activeTokenIdx = null;
428
428
  }
429
429
  },
430
- onClear() {
431
- this.$nextTick(() => {
432
- this.activeTokenIdx = this.lastTokenIdx;
433
- this.$emit('clear');
434
- });
430
+ async onClear() {
431
+ await this.$nextTick();
432
+ this.activeTokenIdx = this.lastTokenIdx;
433
+ this.$emit('clear');
435
434
  },
436
435
  submit() {
437
436
  /**
@@ -245,20 +245,19 @@ var script = {
245
245
  this.$emit('replace', createTerm(this.config.title));
246
246
  }
247
247
  },
248
- replaceToken(newType) {
248
+ async replaceToken(newType) {
249
249
  const newTokenConfig = this.availableTokens.find(_ref => {
250
250
  let type = _ref.type;
251
251
  return type === newType;
252
252
  });
253
253
  if (newTokenConfig === this.config) {
254
- this.$nextTick(() => {
255
- /**
256
- * Emitted when this term token will lose its focus.
257
- *
258
- * @event deactivate
259
- */
260
- this.$emit('deactivate');
261
- });
254
+ await this.$nextTick();
255
+ /**
256
+ * Emitted when this term token will lose its focus.
257
+ *
258
+ * @event deactivate
259
+ */
260
+ this.$emit('deactivate');
262
261
  return;
263
262
  }
264
263
  if (newTokenConfig) {
@@ -312,22 +312,21 @@ var script = {
312
312
  loose = _ref2.loose;
313
313
  return (_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.find(option => loose ? match(option[this.optionTextField], inputValue) : option[this.optionTextField] === inputValue);
314
314
  },
315
- activate() {
315
+ async activate() {
316
316
  this.fallbackValue = this.value;
317
- this.$nextTick(() => {
318
- const input = this.$refs.input;
319
- if (input) {
320
- input.focus();
321
- input.scrollIntoView({
322
- block: 'nearest',
323
- inline: 'end'
324
- });
325
- this.alignSuggestions(input);
326
- if (this.cursorPosition === 'start') {
327
- input === null || input === void 0 ? void 0 : input.setSelectionRange(0, 0);
328
- }
317
+ await this.$nextTick();
318
+ const input = this.$refs.input;
319
+ if (input) {
320
+ input.focus();
321
+ input.scrollIntoView({
322
+ block: 'nearest',
323
+ inline: 'end'
324
+ });
325
+ this.alignSuggestions(input);
326
+ if (this.cursorPosition === 'start') {
327
+ input === null || input === void 0 ? void 0 : input.setSelectionRange(0, 0);
329
328
  }
330
- });
329
+ }
331
330
  },
332
331
  deactivate() {
333
332
  var _this$matchingOption;
@@ -221,7 +221,7 @@ var script = {
221
221
  }
222
222
  }
223
223
  },
224
- handleChange(_ref) {
224
+ async handleChange(_ref) {
225
225
  let _ref$target = _ref.target,
226
226
  checked = _ref$target.checked,
227
227
  indeterminate = _ref$target.indeterminate;
@@ -245,25 +245,24 @@ var script = {
245
245
  this.computedLocalChecked = localChecked;
246
246
 
247
247
  // Fire events in a `$nextTick()` to ensure the `v-model` is updated
248
- this.$nextTick(() => {
248
+ await this.$nextTick();
249
+ /**
250
+ * Emitted when selected value(s) is changed due to user interaction.
251
+ *
252
+ * @event change
253
+ */
254
+ this.$emit('change', localChecked);
255
+
256
+ // If this is a child of a group, we emit a change event on it as well
257
+ if (this.isGroup) {
249
258
  /**
250
259
  * Emitted when selected value(s) is changed due to user interaction.
251
260
  *
252
261
  * @event change
253
262
  */
254
- this.$emit('change', localChecked);
255
-
256
- // If this is a child of a group, we emit a change event on it as well
257
- if (this.isGroup) {
258
- /**
259
- * Emitted when selected value(s) is changed due to user interaction.
260
- *
261
- * @event change
262
- */
263
- this.group.$emit('change', localChecked);
264
- }
265
- this.$emit('indeterminate', indeterminate);
266
- });
263
+ this.group.$emit('change', localChecked);
264
+ }
265
+ this.$emit('indeterminate', indeterminate);
267
266
  },
268
267
  setIndeterminate(state) {
269
268
  // Indeterminate only supported in single checkbox mode
@@ -429,14 +429,13 @@ var script = {
429
429
  // Create private non-reactive props
430
430
  this.$_inputDebounceTimer = null;
431
431
  },
432
- mounted() {
432
+ async mounted() {
433
433
  this.setWheelStopper(this.noWheel);
434
434
  this.handleAutofocus();
435
- this.$nextTick(() => {
436
- // Update DOM with auto-generated ID after mount
437
- // to prevent SSR hydration errors
438
- this.localId = uniqueId('gl-form-input-');
439
- });
435
+ await this.$nextTick();
436
+ // Update DOM with auto-generated ID after mount
437
+ // to prevent SSR hydration errors
438
+ this.localId = uniqueId('gl-form-input-');
440
439
  },
441
440
  deactivated() {
442
441
  // Turn off listeners when keep-alive component deactivated
@@ -600,11 +599,10 @@ var script = {
600
599
  });
601
600
  this.blur();
602
601
  },
603
- handleAutofocus() {
604
- this.$nextTick(() => {
605
- window.requestAnimationFrame(() => {
606
- if (this.autofocus && isVisible(this.$refs.input)) this.focus();
607
- });
602
+ async handleAutofocus() {
603
+ await this.$nextTick();
604
+ window.requestAnimationFrame(() => {
605
+ if (this.autofocus && isVisible(this.$refs.input)) this.focus();
608
606
  });
609
607
  },
610
608
  select() {
@@ -173,33 +173,32 @@ var script = {
173
173
  this.$emit('input', newValue);
174
174
  }
175
175
  },
176
- handleChange() {
176
+ async handleChange() {
177
177
  const value = this.value;
178
178
 
179
179
  // Update `computedLocalChecked`
180
180
  this.computedLocalChecked = value;
181
181
 
182
182
  // Fire events in a `$nextTick()` to ensure the `v-model` is updated
183
- this.$nextTick(() => {
183
+ await this.$nextTick();
184
+ /**
185
+ * Emitted when the selected value is changed due to user interaction
186
+ *
187
+ * @event change
188
+ * @type {boolean} current selected value of radio group
189
+ */
190
+ this.$emit('change', value);
191
+
192
+ // If this is a child of a group, we emit a change event on it as well
193
+ if (this.isGroup) {
184
194
  /**
185
195
  * Emitted when the selected value is changed due to user interaction
186
196
  *
187
197
  * @event change
188
198
  * @type {boolean} current selected value of radio group
189
199
  */
190
- this.$emit('change', value);
191
-
192
- // If this is a child of a group, we emit a change event on it as well
193
- if (this.isGroup) {
194
- /**
195
- * Emitted when the selected value is changed due to user interaction
196
- *
197
- * @event change
198
- * @type {boolean} current selected value of radio group
199
- */
200
- this.group.$emit('change', value);
201
- }
202
- });
200
+ this.group.$emit('change', value);
201
+ }
203
202
  },
204
203
  focus() {
205
204
  if (!this.disabled) {
@@ -309,11 +309,10 @@ var script = {
309
309
  created() {
310
310
  this.$_inputDebounceTimer = null;
311
311
  },
312
- mounted() {
312
+ async mounted() {
313
313
  this.handleAutofocus();
314
- this.$nextTick(() => {
315
- this.localId = uniqueId('gl-form-textarea-');
316
- });
314
+ await this.$nextTick();
315
+ this.localId = uniqueId('gl-form-textarea-');
317
316
  },
318
317
  beforeDestroy() {
319
318
  this.clearDebounce();
@@ -423,13 +422,12 @@ var script = {
423
422
  */
424
423
  this.$emit('blur', event);
425
424
  },
426
- handleAutofocus() {
427
- this.$nextTick(() => {
428
- window.requestAnimationFrame(() => {
429
- if (this.autofocus && isVisible(this.$refs.input)) {
430
- this.focus();
431
- }
432
- });
425
+ async handleAutofocus() {
426
+ await this.$nextTick();
427
+ window.requestAnimationFrame(() => {
428
+ if (this.autofocus && isVisible(this.$refs.input)) {
429
+ this.focus();
430
+ }
433
431
  });
434
432
  },
435
433
  handleKeyPress(e) {
@@ -442,11 +440,10 @@ var script = {
442
440
  this.$emit('submit');
443
441
  }
444
442
  },
445
- setHeight() {
446
- this.$nextTick(() => {
447
- window.requestAnimationFrame(() => {
448
- this.heightInPx = this.computeHeight();
449
- });
443
+ async setHeight() {
444
+ await this.$nextTick();
445
+ window.requestAnimationFrame(() => {
446
+ this.heightInPx = this.computeHeight();
450
447
  });
451
448
  },
452
449
  computeHeight() {
@@ -49,7 +49,7 @@ var script = {
49
49
  }
50
50
  },
51
51
  watch: {
52
- fetchedItems(newVal, oldVal) {
52
+ async fetchedItems(newVal, oldVal) {
53
53
  // Re-adjust scroll to the current item if more items are added
54
54
  if (newVal > oldVal) {
55
55
  const _this$$refs$infiniteC = this.$refs.infiniteContainer,
@@ -58,32 +58,30 @@ var script = {
58
58
  // Only when scrolled to the top
59
59
  if (scrollHeight !== 0 && scrollTop === 0) {
60
60
  // Wait until the DOM is fully updated to adjust scroll
61
- this.$nextTick(() => {
62
- const newScrollHeight = this.$refs.infiniteContainer.scrollHeight;
61
+ await this.$nextTick();
62
+ const newScrollHeight = this.$refs.infiniteContainer.scrollHeight;
63
63
 
64
- // New scrollTop is the new height, minus the old height
65
- // minus a small space to allow the user to trigger a scroll once more
66
- let top = newScrollHeight - scrollHeight - adjustScrollGap;
64
+ // New scrollTop is the new height, minus the old height
65
+ // minus a small space to allow the user to trigger a scroll once more
66
+ let top = newScrollHeight - scrollHeight - adjustScrollGap;
67
67
 
68
- // Never adjust to 0, or a new event may be be triggered
69
- if (top < 1) {
70
- top = 1;
71
- }
72
- this.scrollTo({
73
- top
74
- });
68
+ // Never adjust to 0, or a new event may be be triggered
69
+ if (top < 1) {
70
+ top = 1;
71
+ }
72
+ this.scrollTo({
73
+ top
75
74
  });
76
75
  }
77
76
  }
78
77
  }
79
78
  },
80
- mounted() {
79
+ async mounted() {
81
80
  // Scroll to bottom for reverse effect
82
- this.$nextTick(() => {
83
- if (this.$listeners.topReached && !this.$listeners.bottomReached) {
84
- this.scrollDown();
85
- }
86
- });
81
+ await this.$nextTick();
82
+ if (this.$listeners.topReached && !this.$listeners.bottomReached) {
83
+ this.scrollDown();
84
+ }
87
85
  },
88
86
  methods: {
89
87
  /**
@@ -569,22 +569,21 @@ var script = {
569
569
  }
570
570
  },
571
571
  items: {
572
- handler() {
573
- this.$nextTick(() => {
574
- /* Every time the list of items changes (on search),
575
- * the observed elements are recreated, thus we need to start obesrving them again */
576
- this.observeScroll();
572
+ async handler() {
573
+ await this.$nextTick();
574
+ /* Every time the list of items changes (on search),
575
+ * the observed elements are recreated, thus we need to start obesrving them again */
576
+ this.observeScroll();
577
577
 
578
- /**
579
- * Every time the list of items changes, and there is a search string,
580
- * we want to visually highlight the first enabled item
581
- */
582
- if (this.searchHasOptions) {
583
- this.nextFocusedItemIndex = this.getFirstEnabledIndex();
584
- } else {
585
- this.nextFocusedItemIndex = null;
586
- }
587
- });
578
+ /**
579
+ * Every time the list of items changes, and there is a search string,
580
+ * we want to visually highlight the first enabled item
581
+ */
582
+ if (this.searchHasOptions) {
583
+ this.nextFocusedItemIndex = this.getFirstEnabledIndex();
584
+ } else {
585
+ this.nextFocusedItemIndex = null;
586
+ }
588
587
  }
589
588
  },
590
589
  ...(process.env.NODE_ENV !== 'production' ? {
@@ -774,7 +773,7 @@ var script = {
774
773
  const nextIndex = clamp(currentIndex + offset, 0, elements.length - 1);
775
774
  this.focusItem(nextIndex, elements);
776
775
  },
777
- focusItem(index, elements) {
776
+ async focusItem(index, elements) {
778
777
  let keepSearchFocused = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
779
778
  this.nextFocusedItemIndex = index;
780
779
 
@@ -791,9 +790,8 @@ var script = {
791
790
  var _elements$index;
792
791
  (_elements$index = elements[index]) === null || _elements$index === void 0 ? void 0 : _elements$index.focus();
793
792
  }
794
- this.$nextTick(() => {
795
- this.scrollActiveItemIntoView();
796
- });
793
+ await this.$nextTick();
794
+ this.scrollActiveItemIntoView();
797
795
  },
798
796
  focusSearchInput() {
799
797
  this.$refs.searchBox.focusInput();
@@ -96,7 +96,7 @@ var script = {
96
96
  block: {
97
97
  type: Boolean,
98
98
  required: false,
99
- default: false
99
+ default: true
100
100
  }
101
101
  },
102
102
  data() {
@@ -166,7 +166,7 @@ var script = {
166
166
  const __vue_script__ = script;
167
167
 
168
168
  /* template */
169
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting"},[_c('gl-collapsible-listbox',{class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.dropdownToggleClass,"placement":"bottom-end","block":_vm.block,"toggle-aria-labelled-by":_vm.sortingListboxId},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only",attrs:{"id":_vm.sortingListboxId}},[_vm._v(_vm._s(_vm.sortingListboxLabel))]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText,"disabled":_vm.isDirectionToggleDisabled,"accessible-disabled":_vm.isDirectionToggleDisabled},on:{"click":_vm.toggleSortDirection}})],1)};
169
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-button-group',{staticClass:"gl-sorting gl-flex"},[_c('gl-collapsible-listbox',{staticClass:"gl-w-full",class:_vm.dropdownClass,attrs:{"toggle-text":_vm.text,"items":_vm.sortOptions,"selected":_vm.sortBy,"toggle-class":_vm.dropdownToggleClass,"placement":"bottom-end","block":_vm.block,"toggle-aria-labelled-by":_vm.sortingListboxId},on:{"select":_vm.onSortByChanged}}),_vm._v(" "),_c('span',{staticClass:"gl-sr-only",attrs:{"id":_vm.sortingListboxId}},[_vm._v(_vm._s(_vm.sortingListboxLabel))]),_vm._v(" "),_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],class:['sorting-direction-button', _vm.sortDirectionToggleClass],attrs:{"title":_vm.sortDirectionText,"icon":_vm.localSortDirection,"aria-label":_vm.sortDirectionText,"disabled":_vm.isDirectionToggleDisabled,"accessible-disabled":_vm.isDirectionToggleDisabled},on:{"click":_vm.toggleSortDirection}})],1)};
170
170
  var __vue_staticRenderFns__ = [];
171
171
 
172
172
  /* style */
@@ -68,23 +68,21 @@ var script = {
68
68
  }), {});
69
69
  }
70
70
  },
71
- mounted() {
72
- this.$nextTick(() => {
73
- this.navScrollWidth = this.getScrollWidth();
74
- });
71
+ async mounted() {
75
72
  this.handleNavScroll = debounce(e => {
76
73
  this.scrollLeft = e.target.scrollLeft;
77
74
  }, 100);
78
75
  this.getNavContainer().addEventListener('scroll', this.handleNavScroll);
76
+ await this.$nextTick();
77
+ this.navScrollWidth = this.getScrollWidth();
79
78
  },
80
79
  beforeDestroy() {
81
80
  this.getNavContainer().removeEventListener('scroll', this.handleNavScroll);
82
81
  },
83
- updated() {
82
+ async updated() {
84
83
  // Whenever tabs are added or removed we need to recalculate the reactive scrollWidth
85
- this.$nextTick(() => {
86
- this.navScrollWidth = this.getScrollWidth();
87
- });
84
+ await this.$nextTick();
85
+ this.navScrollWidth = this.getScrollWidth();
88
86
  },
89
87
  methods: {
90
88
  handleResize(_ref) {
@@ -146,6 +146,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
146
146
  },attrs:{"data-testid":"toggle-wrapper"}},[_c('span',{staticClass:"gl-toggle-label gl-shrink-0",class:_vm.toggleClasses,attrs:{"id":_vm.labelId,"data-testid":"toggle-label"}},[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.label))]})],2),_vm._v(" "),(_vm.shouldRenderDescription)?_c('span',{staticClass:"gl-description-label gl-mb-3",attrs:{"data-testid":"toggle-description"}},[_vm._t("description",function(){return [_vm._v(_vm._s(_vm.description))]})],2):_vm._e(),_vm._v(" "),(_vm.name)?_c('input',{attrs:{"name":_vm.name,"type":"hidden"},domProps:{"value":_vm.value}}):_vm._e(),_vm._v(" "),_c('button',{staticClass:"gl-toggle gl-shrink-0",class:{
147
147
  'is-checked': _vm.value,
148
148
  'is-disabled': _vm.disabled || _vm.isLoading,
149
+ 'is-loading': _vm.isLoading,
149
150
  },attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"aria-disabled":_vm.disabled,"type":"button","disabled":_vm.disabled},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature.apply(null, arguments)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"dark"}}):_c('span',{staticClass:"toggle-icon"},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":12}})],1)],1),_vm._v(" "),(_vm.shouldRenderHelp)?_c('span',{staticClass:"gl-help-label",attrs:{"id":_vm.helpId,"data-testid":"toggle-help"}},[_vm._t("help",function(){return [_vm._v(_vm._s(_vm.help))]})],2):_vm._e()])};
150
151
  var __vue_staticRenderFns__ = [];
151
152
 
@@ -216,7 +216,7 @@ var script = {
216
216
  }
217
217
  },
218
218
  watch: {
219
- inputText(newValue, oldValue) {
219
+ async inputText(newValue, oldValue) {
220
220
  if (newValue !== oldValue) {
221
221
  /**
222
222
  * Fired when user types in the token selector
@@ -234,13 +234,12 @@ var script = {
234
234
  // Wait a tick so `text-input` event can be used to validate
235
235
  // the value and change the `allowUserDefinedTokens` and/or
236
236
  // `hideDropdownWithNoItems` props
237
- this.$nextTick(() => {
238
- if (this.hideDropdown) {
239
- this.closeDropdown();
240
- } else if (newValue !== '') {
241
- this.openDropdown();
242
- }
243
- });
237
+ await this.$nextTick();
238
+ if (this.hideDropdown) {
239
+ this.closeDropdown();
240
+ } else if (newValue !== '') {
241
+ this.openDropdown();
242
+ }
244
243
  }
245
244
  }
246
245
  },
@@ -272,7 +271,8 @@ var script = {
272
271
  this.triggerTokenFocusNextBackspace = true;
273
272
  }
274
273
  },
275
- handleBlur(event) {
274
+ async handleBlur(event) {
275
+ var _event$relatedTarget, _event$relatedTarget$;
276
276
  /**
277
277
  * Fired when the token selector is blurred
278
278
  *
@@ -285,12 +285,10 @@ var script = {
285
285
  // Workaround is to:
286
286
  // 1. Explicitly focus the dropdown menu item button on `mousedown` event. (see './token_selector_dropdown.vue')
287
287
  // 2. Use `nextTick` so `blur` event is fired after the `mousedown` event
288
- this.$nextTick(() => {
289
- var _event$relatedTarget, _event$relatedTarget$;
290
- if (!((_event$relatedTarget = event.relatedTarget) !== null && _event$relatedTarget !== void 0 && (_event$relatedTarget$ = _event$relatedTarget.closest) !== null && _event$relatedTarget$ !== void 0 && _event$relatedTarget$.call(_event$relatedTarget, '.dropdown-item'))) {
291
- this.closeDropdown();
292
- }
293
- });
288
+ await this.$nextTick();
289
+ if (!((_event$relatedTarget = event.relatedTarget) !== null && _event$relatedTarget !== void 0 && (_event$relatedTarget$ = _event$relatedTarget.closest) !== null && _event$relatedTarget$ !== void 0 && _event$relatedTarget$.call(_event$relatedTarget, '.dropdown-item'))) {
290
+ this.closeDropdown();
291
+ }
294
292
  },
295
293
  handleEnter() {
296
294
  if (this.focusedDropdownItem && this.dropdownIsOpen) {